import type { ChatMessageMetadata, ChatUiMessageChunk } from "../../chat/protocol.js"; /** Public API contract for hosted child pending tool call phase. */ export type HostedChildPendingToolCallPhase = "input_streaming" | "awaiting_result"; /** State for hosted child pending tool call. */ export interface HostedChildPendingToolCallState { phase: HostedChildPendingToolCallPhase; toolName?: string; input?: unknown; } /** Public API contract for hosted child pending tool lifecycle close reason. */ export type HostedChildPendingToolLifecycleCloseReason = { kind: "ended"; } | { kind: "aborted"; } | { kind: "error"; error: unknown; }; /** Public API contract for hosted child pending tool lifecycle close log. */ export interface HostedChildPendingToolLifecycleCloseLog { reason: HostedChildPendingToolLifecycleCloseReason["kind"]; toolCallIds: string[]; errorMessage: string | null; } /** Public API contract for hosted child pending tool lifecycle unknown tool log. */ export interface HostedChildPendingToolLifecycleUnknownToolLog { toolCallId: string; phase: HostedChildPendingToolCallPhase; reason: HostedChildPendingToolLifecycleCloseReason["kind"]; hasInputSnapshot: boolean; } /** Public API contract for hosted child pending tool lifecycle logger. */ export interface HostedChildPendingToolLifecycleLogger { warnIncompleteToolLifecycles?: (input: HostedChildPendingToolLifecycleCloseLog) => void; warnUnknownToolIdentity?: (input: HostedChildPendingToolLifecycleUnknownToolLog) => void; } /** Context for hosted child pending tool lifecycle log. */ export interface HostedChildPendingToolLifecycleLogContext { conversationId?: string; parentRunId?: string; childRunId?: string; description: string; } /** Public API contract for hosted child pending tool lifecycle log writer. */ export interface HostedChildPendingToolLifecycleLogWriter { warn: (message: string, context: Record) => void; } /** Create hosted child pending tool lifecycle logger. */ export declare function createHostedChildPendingToolLifecycleLogger(context: HostedChildPendingToolLifecycleLogContext, writer: HostedChildPendingToolLifecycleLogWriter): HostedChildPendingToolLifecycleLogger; /** Input payload for hosted child pending tool lifecycle. */ export interface HostedChildPendingToolLifecycleInput { appendMirrorChunk: (chunk: ChatUiMessageChunk) => Promise | void; logger?: HostedChildPendingToolLifecycleLogger; } /** Create hosted child pending tool lifecycle. */ export declare function createHostedChildPendingToolLifecycle(input: HostedChildPendingToolLifecycleInput): { upsertPendingToolCall: (toolCallId: string, state: HostedChildPendingToolCallState) => void; emitToolInputStartIfNeeded: (toolCallId: string, toolName: string) => Promise; deletePendingToolCall: (toolCallId: string) => void; closePendingToolCalls: (reason: HostedChildPendingToolLifecycleCloseReason) => Promise; }; //# sourceMappingURL=child-pending-tool-lifecycle.d.ts.map