/** Public API contract for hosted child stream watchdog phase. */ export type HostedChildStreamWatchdogPhase = "tool_running" | "post_tool_idle" | "generic_idle"; /** State for hosted child stream watchdog. */ export interface HostedChildStreamWatchdogState { phase: HostedChildStreamWatchdogPhase; timeoutMs: number; } /** Error shape for hosted child stream idle timeout. */ export declare class HostedChildStreamIdleTimeoutError extends Error { readonly timeoutMs: number; readonly phase: HostedChildStreamWatchdogPhase; constructor(input: HostedChildStreamWatchdogState); } /** Shared hosted child stream timeout token value. */ export declare const HOSTED_CHILD_STREAM_TIMEOUT_TOKEN: unique symbol; /** State for resolve hosted child stream watchdog. */ export declare function resolveHostedChildStreamWatchdogState(input: { activeToolCallId: string | null; completedToolResults: number; idleTimeoutMs: number; activeToolTimeoutMs: number; postToolIdleTimeoutMs: number; }): HostedChildStreamWatchdogState; /** Compose abort signals helper. */ export declare function composeAbortSignals(signals: Array): AbortSignal | undefined; /** Applies hosted child stream idle timeout. */ export declare function withHostedChildStreamIdleTimeout(input: { stream: AsyncIterable; getWatchdogState: () => HostedChildStreamWatchdogState; abortSignal?: AbortSignal; onIdleTimeout?: (state: HostedChildStreamWatchdogState) => undefined | "continue" | Promise; }): AsyncGenerator; /** Resolves hosted child promise with timeout. */ export declare function resolveHostedChildPromiseWithTimeout(promise: PromiseLike, timeoutMs: number): Promise; //# sourceMappingURL=child-stream-watchdog.d.ts.map