Skip to main content

Interface: CallerTurnContext

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:184

Live objects of the turn that made a tool call; set by gmi()'s tool hook and by a runtime seat's view.

Properties​

approvalGate?​

optional approvalGate: ApprovalGateFn

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:186

The approval gate the turn's tool calls are asked.


budget?​

optional budget: SpendBudget

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:188

The turn's spend budget.


dispatch()?​

optional dispatch: (requestDetails) => Promise<ToolCallResult>

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:196

The processToolCall of the view that made the call; the step gate runs each step of a composed tool through it.

Async

Processes a tool call request from a GMI. This involves permission checking, argument validation (delegated), execution (delegated), and formatting the result.

Parameters​

requestDetails​

ToolExecutionRequestDetails

The comprehensive details of the tool call request, including the raw ToolCallRequest from the LLM, GMI ID, Persona context, and user context.

Returns​

Promise<ToolCallResult>

The result of the tool call, formatted for the GMI. This will include success/failure status, output, or error information.


providerUserId?​

optional providerUserId: string

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:190

The explicit user id the turn's session named; undefined when it named none.


toolCallGate?​

optional toolCallGate: GMIToolCallGate

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:203

The full runtime: the gate the turn's output guardrails that judge tool calls (config.evaluateToolCalls) ask before each call of the turn's own tool round. A GMI whose turn has one passes it with every call it makes, asked beside the sources the turn retrieved, and a team a call launches gives it to each of its seats' turns, so a seat's calls are judged as the launching turn's are, beside what that turn read.


toolHooks?​

optional toolHooks: readonly (info) => Promise<ToolCallHookInfo | null>[]

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:194

gmi(): the onBeforeToolExecution hooks the turn's calls run under, outermost first.


toolNames?​

optional toolNames: ReadonlySet<string>

Defined in: packages/agentos/src/api/runtime/agencyLaunch/types.ts:192

A seat's tool names: the only tools its turn lists and runs, a composed tool's steps included.