Interface GMITurnInput

Represents a single turn of input to the GMI.

Interface

GMITurnInput

interface GMITurnInput {
    interactionId: string;
    userId: string;
    sessionId?: string;
    type: GMIInteractionType;
    content: string | Record<string, any> | ToolCallResult | ToolCallResult[] | Record<string, any>[];
    timestamp?: Date;
    userContextOverride?: Partial<UserContext>;
    taskContextOverride?: Partial<TaskContext>;
    metadata?: Record<string, any> & {
        options?: Partial<ModelCompletionOptions & {
            preferredModelId?: string;
            preferredProviderId?: string;
            toolChoice?: any;
            responseFormat?: any;
        }>;
        userApiKeys?: Record<string, string>;
        userFeedback?: any;
        explicitPersonaSwitchId?: string;
        conversationHistoryForPrompt?: any[];
        rollingSummary?: null | {
            text?: string;
            json?: any;
        };
        promptProfile?: null | {
            id: string;
            systemInstructions?: string;
            reason?: string;
        };
        executionPolicy?: null | {
            plannerVersion?: string;
            toolFailureMode?: "fail_open" | "fail_closed";
            toolSelectionMode?: "all" | "discovered";
        };
        capabilityDiscovery?: null | {
            query?: string;
            kind?: string;
            selectedToolNames?: string[];
            promptContext?: string;
            fallbackReason?: string;
            result?: any;
        };
    };
}

Properties

interactionId: string
userId: string
sessionId?: string
content: string | Record<string, any> | ToolCallResult | ToolCallResult[] | Record<string, any>[]
timestamp?: Date
userContextOverride?: Partial<UserContext>
taskContextOverride?: Partial<TaskContext>
metadata?: Record<string, any> & {
    options?: Partial<ModelCompletionOptions & {
        preferredModelId?: string;
        preferredProviderId?: string;
        toolChoice?: any;
        responseFormat?: any;
    }>;
    userApiKeys?: Record<string, string>;
    userFeedback?: any;
    explicitPersonaSwitchId?: string;
    conversationHistoryForPrompt?: any[];
    rollingSummary?: null | {
        text?: string;
        json?: any;
    };
    promptProfile?: null | {
        id: string;
        systemInstructions?: string;
        reason?: string;
    };
    executionPolicy?: null | {
        plannerVersion?: string;
        toolFailureMode?: "fail_open" | "fail_closed";
        toolSelectionMode?: "all" | "discovered";
    };
    capabilityDiscovery?: null | {
        query?: string;
        kind?: string;
        selectedToolNames?: string[];
        promptContext?: string;
        fallbackReason?: string;
        result?: any;
    };
}

Type declaration

  • Optional options?: Partial<ModelCompletionOptions & {
        preferredModelId?: string;
        preferredProviderId?: string;
        toolChoice?: any;
        responseFormat?: any;
    }>
  • Optional userApiKeys?: Record<string, string>
  • Optional userFeedback?: any
  • Optional explicitPersonaSwitchId?: string
  • Optional conversationHistoryForPrompt?: any[]

    Optional conversation history snapshot to use for prompt construction. When provided, the GMI should prefer this over any internal ephemeral history so persona switches share conversation memory.

  • Optional rollingSummary?: null | {
        text?: string;
        json?: any;
    }

    Optional rolling summary block (text + structured metadata) maintained by ConversationContext and injected into prompts for long conversations.

  • Optional promptProfile?: null | {
        id: string;
        systemInstructions?: string;
        reason?: string;
    }

    Optional prompt-profile selection for this turn (e.g., concise/deep_dive/planner/reviewer).

  • Optional executionPolicy?: null | {
        plannerVersion?: string;
        toolFailureMode?: "fail_open" | "fail_closed";
        toolSelectionMode?: "all" | "discovered";
    }

    Optional planner-selected execution policy for this turn.

  • Optional capabilityDiscovery?: null | {
        query?: string;
        kind?: string;
        selectedToolNames?: string[];
        promptContext?: string;
        fallbackReason?: string;
        result?: any;
    }

    Optional capability discovery payload for this turn. result is intentionally any to avoid hard-coupling the GMI contract to a specific discovery-engine type.