Skip to content
4 min read · 709 words

Interface: RawDispatchContext

Defined in: lib/contracts/dispatch_context.ts:169

Plain input object supplied to DispatchContext at construction time.

Remarks

All fetch and mutation callbacks are required — every execution context must have a persistence layer wired up, even in standalone mode. Optional pre-fetched arrays populate the context's Sets at construction time without replacing the callbacks (the callbacks are still invoked on subsequent fetch calls).

Properties

PropertyTypeDescriptionDefined in
deleteMemoryDispatchMemoryDeleteFnRemoves a memory by ID.lib/contracts/dispatch_context.ts:221
deleteMessageDispatchMessageDeleteFnRemoves a message by ID.lib/contracts/dispatch_context.ts:233
deleteRetrievableDispatchRetrievableDeleteFnRemoves a retrievable record by ID.lib/contracts/dispatch_context.ts:227
deleteStandingInstructionDispatchStandingInstructionDeleteFnRemoves a standing instruction.lib/contracts/dispatch_context.ts:215
deleteThoughtDispatchThoughtDeleteFnRemoves a thought by ID.lib/contracts/dispatch_context.ts:239
deleteToolCallDispatchToolCallDeleteFnRemoves a tool call by ID.lib/contracts/dispatch_context.ts:245
fetchMemoriesDispatchMemoryRetrievalFnRetrieves memories for this execution.lib/contracts/dispatch_context.ts:195
fetchMessagesDispatchMessageRetrievalFnRetrieves messages for this execution.lib/contracts/dispatch_context.ts:199
fetchRetrievablesDispatchRetrievableRetrievalFnRetrieves retrievable records for this execution.lib/contracts/dispatch_context.ts:197
fetchThoughtsDispatchThoughtRetrievalFnRetrieves thoughts for this execution.lib/contracts/dispatch_context.ts:201
fetchToolCallsDispatchToolCallRetrievalFnRetrieves tool calls for this execution.lib/contracts/dispatch_context.ts:203
fetchToolsDispatchToolsRetrievalFnRetrieves tools for this execution.lib/contracts/dispatch_context.ts:205
hooks?DispatchContextHookRegistrationsOptional hook registrations for emit events.lib/contracts/dispatch_context.ts:252
memories?Memory[]Pre-fetched memories to populate the context at construction.lib/contracts/dispatch_context.ts:181
messages?Message[]Pre-fetched messages to populate the context at construction.lib/contracts/dispatch_context.ts:185
mutateMemoryDispatchMemoryMutateFnUpdates an existing memory.lib/contracts/dispatch_context.ts:219
mutateMessageDispatchMessageMutateFnUpdates an existing message.lib/contracts/dispatch_context.ts:231
mutateRetrievableDispatchRetrievableMutateFnUpdates an existing retrievable record.lib/contracts/dispatch_context.ts:225
mutateStandingInstructionDispatchStandingInstructionMutateFnUpdates an existing standing instruction.lib/contracts/dispatch_context.ts:213
mutateThoughtDispatchThoughtMutateFnUpdates an existing thought.lib/contracts/dispatch_context.ts:237
mutateToolCallDispatchToolCallMutateFnUpdates an existing tool call.lib/contracts/dispatch_context.ts:243
refreshStandingInstructionsDispatchStandingInstructionsRefreshFnRefreshes and returns standing instructions for this execution.lib/contracts/dispatch_context.ts:207
retrievables?Retrievable[]Pre-fetched retrievable records to populate the context at construction.lib/contracts/dispatch_context.ts:183
standingInstructions?(string | Tokenizable)[]Standing instructions for this execution.lib/contracts/dispatch_context.ts:177
stash?Record<string, unknown>Arbitrary key-value store for cross-step state.lib/contracts/dispatch_context.ts:173
storeMediaBytesDispatchMediaBytesStoreFnPersists tool-generated media bytes; returns a MediaReader.lib/contracts/dispatch_context.ts:247
storeMemoryDispatchMemoryStoreFnStores a new memory.lib/contracts/dispatch_context.ts:217
storeMessageDispatchMessageStoreFnStores a new message.lib/contracts/dispatch_context.ts:229
storeRetrievableDispatchRetrievableStoreFnStores a new retrievable record.lib/contracts/dispatch_context.ts:223
storeRetrievableBytesDispatchRetrievableBytesStoreFnPersists extracted retrievable text bytes; returns a SpoolReader.lib/contracts/dispatch_context.ts:249
storeStandingInstructionDispatchStandingInstructionStoreFnStores a new standing instruction.lib/contracts/dispatch_context.ts:211
storeThoughtDispatchThoughtStoreFnStores a new thought.lib/contracts/dispatch_context.ts:235
storeToolCallDispatchToolCallStoreFnStores a new tool call.lib/contracts/dispatch_context.ts:241
systemPromptstring | TokenizableThe system prompt for this execution.lib/contracts/dispatch_context.ts:175
thoughts?Thought[]Pre-fetched thoughts to populate the context at construction.lib/contracts/dispatch_context.ts:187
toolCalls?ToolCall[]Pre-fetched tool calls to populate the context at construction.lib/contracts/dispatch_context.ts:189
tools?Tool<SpooledArtifact>[]Pre-fetched tools to populate the tool registry at construction.lib/contracts/dispatch_context.ts:191
turnAbortController?AbortControllerAbortController whose signal can cancel execution mid-flight.lib/contracts/dispatch_context.ts:171
waitFor?OpenGateFnOptional gate suspension function. When absent, waitFor rejects with @nhtio/adk!E_LLM_EXECUTION_GATE_NOT_SUPPORTED.lib/contracts/dispatch_context.ts:254