ActionContext
type ActionContext<TInput> = { input: z.infer<TInput>; items?: ToolItems; logger: Logger; resumption?: ToolResumption; services: Services; userId?: string;};Defined in: core/src/action/action.types.ts:14
Everything an action’s execute receives: the validated input, the shared
Services container, an optional userId, a Logger, the
resumption answer if the call is being resumed after an interrupt, and
access to conversation items.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TInput extends z.ZodType |
z.ZodType |
Properties
Section titled “Properties”input: z.infer<TInput>;Defined in: core/src/action/action.types.ts:15
items?
Section titled “items?”optional items?: ToolItems;Defined in: core/src/action/action.types.ts:24
Absent when the action runs outside a conversation (e.g. invoked directly, or inside a sandbox script).
logger
Section titled “logger”logger: Logger;Defined in: core/src/action/action.types.ts:18
resumption?
Section titled “resumption?”optional resumption?: ToolResumption;Defined in: core/src/action/action.types.ts:19
services
Section titled “services”services: Services;Defined in: core/src/action/action.types.ts:16
userId?
Section titled “userId?”optional userId?: string;Defined in: core/src/action/action.types.ts:17