Skip to content
1 min read · 88 words

Type Alias: DispatchMediaBytesStoreFn

ts
type DispatchMediaBytesStoreFn = (
  ctx: DispatchContext,
  id: string,
  bytes: ConduitBytes,
) => MediaReader | Promise<MediaReader>;

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

Persists 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.

Parameters

ParameterType
ctxDispatchContext
idstring
bytesConduitBytes

Returns

| MediaReader | Promise<MediaReader>