Interface ToolLearningContext

What a tool call is told about the turn it runs in: ToolExecutionContext.sessionData.learning.

interface ToolLearningContext {
    learner: "none" | "bound";
    mode: LearningMode;
    scopes?: TurnScopes;
    recordSelfChange?: (<T>(input) => Promise<ProposalResult<T>>);
    turnUserId?: string;
    frozen?: (() => boolean);
    threadIds?: readonly string[];
}

Properties

learner: "none" | "bound"
scopes?: TurnScopes

The turn's scope ids; with them the memory tools file and read the turn's own memory.

recordSelfChange?: (<T>(input) => Promise<ProposalResult<T>>)

The session's recorder, bound by the GMI to the call's own turn: the memory tools write through it.

Type declaration

turnUserId?: string

On a second user's turn with no learner: that user's explicit id, written into each trace a memory tool files.

frozen?: (() => boolean)

Whether a freeze holds right now; read at the call.

Type declaration

    • (): boolean
    • Returns boolean

threadIds?: readonly string[]

The ids the turn's own thread scope is filed and read under, in place of the call's conversation and session ids, where the turn's memory names a session of its own: a gmi() session id's generation, which tools never see as the session id. The memory tools file a thread trace under the first, in the session's form.