Skip to content
7 min read · 1,366 words

@nhtio/adk/types ​

Type-only export surface for raw shapes, callbacks, events, hooks, and internal contracts.

Remarks ​

Type-only barrel — re-exports every shape consumers might annotate against: raw constructor inputs, callback function signatures, event payloads, hook event maps, middleware function signatures, validator-resolved configuration shapes, and the runtime-internal context/exception types (TurnContext, DispatchContext, BaseException, TurnGate) for which only a type and a runtime guard (see the guards barrel) are exposed.

No runtime values are re-exported here; importing this barrel produces no JavaScript output after type-erasure. Use this when you want one place to grab types without dragging in the corresponding runtime classes.

Interfaces ​

InterfaceDescription
DispatchContextContext object for a single LLM execution call.
RawDispatchContextPlain input object supplied to DispatchContext at construction time.
RawTurnContextPlain input object supplied to TurnContext at construction time.
TurnContextThe validated, strongly-typed context object threaded through every middleware step in a single agent turn.

Type Aliases ​

Type AliasDescription
ConduitBytesPayload accepted by the byte-persistence conduits — text, raw bytes, or a stream.
DispatchContextHookRegistrationsOptional hook registrations supplied to @nhtio/adk!DispatchContext at construction time.
DispatchContextHooksHook event map for @nhtio/adk!DispatchContext.
DispatchMediaBytesStoreFnPersists tool-generated media bytes into consumer storage and returns a @nhtio/adk!MediaReader (LLM execution context variant). Unlike the store* mutation callbacks this returns a value and does NOT add anything to the turn Sets — the handler builds a @nhtio/adk!Media from the reader and persists it via storeMessage/storeToolCall separately.
DispatchMemoryDeleteFnRemoves a memory by ID (LLM execution context variant).
DispatchMemoryMutateFnUpdates an existing memory (LLM execution context variant).
DispatchMemoryRetrievalFnRetrieves memories for an LLM execution context.
DispatchMemoryStoreFnStores a new memory (LLM execution context variant).
DispatchMessageDeleteFnRemoves a message by ID (LLM execution context variant).
DispatchMessageMutateFnUpdates an existing message (LLM execution context variant).
DispatchMessageRetrievalFnRetrieves messages for an LLM execution context.
DispatchMessageStoreFnStores a new message (LLM execution context variant).
DispatchRetrievableBytesStoreFnPersists extracted retrievable text bytes into consumer storage and returns a @nhtio/adk!SpoolReader (LLM execution context variant). The handler wraps the reader in a @nhtio/adk!SpooledArtifact for new Retrievable({ content }) and persists the record via storeRetrievable separately. Returns a value; does NOT touch the turn Sets.
DispatchRetrievableDeleteFnRemoves a retrievable record by ID (LLM execution context variant).
DispatchRetrievableMutateFnUpdates an existing retrievable record (LLM execution context variant).
DispatchRetrievableRetrievalFnRetrieves retrievable records for an LLM execution context.
DispatchRetrievableStoreFnStores a new retrievable record (LLM execution context variant).
DispatchStandingInstructionDeleteFnRemoves a standing instruction (LLM execution context variant).
DispatchStandingInstructionMutateFnUpdates an existing standing instruction (LLM execution context variant).
DispatchStandingInstructionsRefreshFnRefreshes and returns standing instructions for an LLM execution context.
DispatchStandingInstructionStoreFnStores a new standing instruction (LLM execution context variant).
DispatchThoughtDeleteFnRemoves a thought by ID (LLM execution context variant).
DispatchThoughtMutateFnUpdates an existing thought (LLM execution context variant).
DispatchThoughtRetrievalFnRetrieves thoughts for an LLM execution context.
DispatchThoughtStoreFnStores a new thought (LLM execution context variant).
DispatchToolCallDeleteFnRemoves a tool call by ID (LLM execution context variant).
DispatchToolCallMutateFnUpdates an existing tool call (LLM execution context variant).
DispatchToolCallRetrievalFnRetrieves tool calls for an LLM execution context.
DispatchToolCallStoreFnStores a new tool call (LLM execution context variant).
DispatchToolsRetrievalFnRetrieves tools for an LLM execution context.
MediaBytesStoreFnPersists tool-generated media bytes into consumer storage and returns a @nhtio/adk!MediaReader. A byte-persistence conduit, not a mutation — returns a value and touches no turn state.
MemoryDeleteFnRemoves a memory from the persistence layer by ID.
MemoryMutateFnUpdates an existing memory in the persistence layer.
MemoryRetrievalFnA function that retrieves the memories relevant to the current turn.
MemoryStoreFnStores a new memory in the persistence layer.
MessageDeleteFnRemoves a message from the persistence layer by ID.
MessageMutateFnUpdates an existing message in the persistence layer.
MessageRetrievalFnA function that retrieves the conversation messages relevant to the current turn.
MessageStoreFnStores a new message in the persistence layer.
ResolvedTurnContextA fully-resolved RawTurnContext where all optional fields have been filled in by the schema (e.g. stash defaulted to {}).
RetrievableBytesStoreFnPersists extracted retrievable text bytes into consumer storage and returns a @nhtio/adk!SpoolReader. A byte-persistence conduit, not a mutation.
RetrievableDeleteFnRemoves a retrievable record from the persistence layer by ID.
RetrievableMutateFnUpdates an existing retrievable record in the persistence layer.
RetrievableRetrievalFnA function that retrieves the retrievable (RAG) records relevant to the current turn.
RetrievableStoreFnStores a new retrievable record in the persistence layer.
StandingInstructionDeleteFnRemoves a standing instruction from the persistence layer.
StandingInstructionMutateFnUpdates an existing standing instruction in the persistence layer.
StandingInstructionsRefreshFnA function that refreshes and returns the standing instructions for the current turn.
StandingInstructionStoreFnStores a new standing instruction in the persistence layer.
ThoughtDeleteFnRemoves a thought from the persistence layer by ID.
ThoughtMutateFnUpdates an existing thought in the persistence layer.
ThoughtRetrievalFnA function that retrieves the thought traces relevant to the current turn.
ThoughtStoreFnStores a new thought in the persistence layer.
ToolCallDeleteFnRemoves a tool call from the persistence layer by ID.
ToolCallMutateFnUpdates an existing tool call in the persistence layer.
ToolCallRetrievalFnA function that retrieves the tool call records relevant to the current turn.
ToolCallStoreFnStores a new tool call in the persistence layer.
ToolsRetrievalFnA function that retrieves the tools available for the current turn.

References ​

ArtifactToolHandler ​

Re-exports ArtifactToolHandler


BaseException ​

Re-exports BaseException


DispatchEndEvent ​

Re-exports DispatchEndEvent


DispatchExecutorFn ​

Re-exports DispatchExecutorFn


DispatchExecutorHelpers ​

Re-exports DispatchExecutorHelpers


DispatchExecutorLogChannel ​

Re-exports DispatchExecutorLogChannel


DispatchExecutorLogEntry ​

Re-exports DispatchExecutorLogEntry


DispatchExecutorLogLevel ​

Re-exports DispatchExecutorLogLevel


DispatchPipelineMiddlewareFn ​

Re-exports DispatchPipelineMiddlewareFn


DispatchRunnerFunctionalHookRegistrations ​

Re-exports DispatchRunnerFunctionalHookRegistrations


DispatchRunnerFunctionalHooks ​

Re-exports DispatchRunnerFunctionalHooks


DispatchRunnerObservabilityHookRegistrations ​

Re-exports DispatchRunnerObservabilityHookRegistrations


DispatchRunnerObservabilityHooks ​

Re-exports DispatchRunnerObservabilityHooks


DispatchStartEvent ​

Re-exports DispatchStartEvent


EmitMessageFn ​

Re-exports EmitMessageFn


EmitThoughtFn ​

Re-exports EmitThoughtFn


EmitToolCallFn ​

Re-exports EmitToolCallFn


EmitToolExecutionEndFn ​

Re-exports EmitToolExecutionEndFn


EmitToolExecutionStartFn ​

Re-exports EmitToolExecutionStartFn


IterationEndEvent ​

Re-exports IterationEndEvent


IterationStartEvent ​

Re-exports IterationStartEvent


JsonArtifactFormat ​

Re-exports JsonArtifactFormat


LogEvent ​

Re-exports LogEvent


MarkdownCodeEntry ​

Re-exports MarkdownCodeEntry


MarkdownHeadingEntry ​

Re-exports MarkdownHeadingEntry


MarkdownSection ​

Re-exports MarkdownSection


MergeOptions ​

Re-exports MergeOptions


MessageRole ​

Re-exports MessageRole


OpenGateFn ​

Re-exports OpenGateFn


RawArtifactTool ​

Re-exports RawArtifactTool


RawDispatchRunnerInput ​

Re-exports RawDispatchRunnerInput


RawIdentity ​

Re-exports RawIdentity


RawMemory ​

Re-exports RawMemory


RawMessage ​

Re-exports RawMessage


RawThought ​

Re-exports RawThought


RawTool ​

Re-exports RawTool


RawToolCall ​

Re-exports RawToolCall


RawTurnGate ​

Re-exports RawTurnGate


ResolvedTurnRunnerConfig ​

Re-exports ResolvedTurnRunnerConfig


SpooledArtifactConstructor ​

Re-exports SpooledArtifactConstructor


SpoolReader ​

Re-exports SpoolReader


TokenEncoding ​

Re-exports TokenEncoding


TokenEncodingId ​

Re-exports TokenEncodingId


TokenEstimatorFn ​

Re-exports TokenEstimatorFn


ToolExecutionEndEvent ​

Re-exports ToolExecutionEndEvent


ToolExecutionStartEvent ​

Re-exports ToolExecutionStartEvent


ToolHandler ​

Re-exports ToolHandler


ToolMethodDescriptor ​

Re-exports ToolMethodDescriptor


TurnEndEvent ​

Re-exports TurnEndEvent


TurnEvent ​

Re-exports TurnEvent


TurnEventListener ​

Re-exports TurnEventListener


TurnEvents ​

Re-exports TurnEvents


TurnGate ​

Re-exports TurnGate


TurnGateClosedEvent ​

Re-exports TurnGateClosedEvent


TurnObservabilityEvent ​

Re-exports TurnObservabilityEvent


TurnObservabilityEventListener ​

Re-exports TurnObservabilityEventListener


TurnObservabilityEvents ​

Re-exports TurnObservabilityEvents


TurnPipelineMiddlewareFn ​

Re-exports TurnPipelineMiddlewareFn


TurnRunnerConfig ​

Re-exports TurnRunnerConfig


TurnStartEvent ​

Re-exports TurnStartEvent


TurnStreamableContent ​

Re-exports TurnStreamableContent


TurnToolCallContent ​

Re-exports TurnToolCallContent


WarningEvent ​

Re-exports WarningEvent