@tanstack/ai
Version:
Type-safe TypeScript AI SDK for streaming chat, tool calling, agents, structured outputs, and multimodal generation.
17 lines (16 loc) • 962 B
TypeScript
import { ModelMessage, UIMessage } from '../../../types.js';
/**
* Loads the stored transcript of a finished subagent run by its
* `subagentRunId`. Returns `undefined` for an unknown id. A persistence
* middleware provides it. The agent tools read it to continue a
* child by `sessionId`. When `agent` is set, only that agent can continue
* the child. A middleware that provides it must list `LoadChildCapability`
* in `provides`. Only then do the agent tools take `sessionId`.
*/
export type LoadChild = (subagentRunId: string) => Promise<{
messages: Array<ModelMessage | UIMessage>;
/** The name of the agent the child ran under. */
agent?: string;
} | undefined>;
export declare const LoadChildCapability: import('./capabilities.js').Capability<LoadChild, "load-child">;
export declare const getLoadChild: import('./capabilities.js').CapabilityGetter<LoadChild>, provideLoadChild: import('./capabilities.js').CapabilityProvider<LoadChild>;