/** * Represents a tool call currently tracked by the voice agent. */ export type ActiveToolCallState = { argumentText: string; callId: string; itemId: string; name?: string; responseId: string; status: "running" | "streaming"; updatedAtMs: number; }; /** * Represents the public render-state contract exposed by `VoiceAgent`. */ export type VoiceAgentRenderState = { activeToolCalls: ActiveToolCallState[]; canConnect: boolean; canDisconnect: boolean; canStartVoiceInput: boolean; canStopVoiceInput: boolean; isConnected: boolean; isRunning: boolean; lastError?: { message: string; type: string; }; sendEvent: (event: { type: string; } & Record) => void; startVoiceInput: () => Promise; start: () => void; status: "connecting" | "error" | "idle" | "running" | "stopping"; stopVoiceInput: (options?: { commit?: boolean; }) => void; stop: () => void; voiceInputStatus: "idle" | "recording" | "unsupported"; }; /** * React context carrying the nearest `VoiceAgent` render-state. */ export declare const VoiceAgentContext: import("react").Context; /** * Reads the nearest `VoiceAgent` render-state from context. * * @returns Current voice agent state, or `null` when outside `VoiceAgent`. */ export declare const useVoiceAgent: () => VoiceAgentRenderState | null; //# sourceMappingURL=use-voice-agent.d.ts.map