import type { PartialToolCall } from '../../../../providers/interface.js'; import type { ConversationDomainState } from '../../domains/conversation.js'; export declare const TERMINAL_LIFECYCLE_STATES: readonly ["completed", "failed", "cancelled"]; export declare function isTerminalLifecycleState(s: string): boolean; export declare function computeActiveIds(map: Map): string[]; export declare function uniq(items: T[]): T[]; export declare function now(): number; export declare function updateDomainMetadata(domain: T, source: string): T; export declare function isTerminalTurnState(state: ConversationDomainState['turnState']): boolean; export declare function canStartNewTurn(domain: ConversationDomainState): boolean; export declare function isCurrentTurnEvent(domain: ConversationDomainState, turnId: string): boolean; /** * formatPartialToolPreview - The name of the tool call now in flight, or * undefined when no tool call has been named yet. * * This value is a STATUS label: surfaces render it in an ambient "what is * happening right now" region (the agent's activity sidebar, the thinking * fragment). It is recomputed on every STREAM_DELTA, so it must depend only on * facts that are stable across the deltas of a single tool call. * * A tool call's `arguments` string is NOT such a fact, it arrives a few * characters at a time as the provider streams the call's JSON. Including it * here made the status region redraw a longer fragment on every delta, which * reads as the label flashing through the model's output character by * character until the turn ends. Streamed characters belong to the transcript; * the status region gets the stable phrase. The tool NAME is delivered whole * before its arguments begin, so it holds still for the life of the call, and * it is the useful part: it says which tool is running. */ export declare function formatPartialToolPreview(toolCalls?: PartialToolCall[]): string | undefined; export declare function resetStreamState(): ConversationDomainState['stream']; //# sourceMappingURL=shared.d.ts.map