/** * Durable state for the subagent adapter, split from the adapter itself so * harness code can identify a delegated child run without reaching the * adapter's workflow-coupled behavior (`runtime-boundary.test.ts`). */ /** * Durable adapter kind used for delegated subagent child runs. * * Framework-owned — authored channel code never constructs a subagent * adapter directly. Emitted by `buildSubagentRunInput` * (`execution/subagent-tool.ts`) when a parent dispatches a child * subagent. */ export declare const SUBAGENT_ADAPTER_KIND = "subagent"; /** * Durable state carried on a subagent adapter instance. * * Populated by `buildSubagentRunInput` at dispatch time so the child * run retains the parent lineage metadata required to resume its parent * when the child finishes and to forward HITL requests up the chain. * * The parent's turn identifier is not duplicated here — it lives on * `RunInput.parent.turn.id` which is the single source of truth for the * child's parent-turn lineage. */ export interface SubagentAdapterState extends Record { readonly callId: string; readonly parentContinuationToken: string; readonly parentSessionId: string; readonly subagentName: string; } /** * Narrow runtime guard for {@link SubagentAdapterState}. * * Framework adapters live through a JSON round-trip at every workflow * step boundary, so consumers that want to treat the adapter state as * a structured record must validate the shape explicitly. */ export declare function isSubagentAdapterState(value: unknown): value is SubagentAdapterState;