/** * Telling the user when an agent turn did not finish. * * The in-process runtime reports a turn that was cut off, refused, or ran * out of steps (`AgentRunResult.incomplete`). The text from such a turn is * a fragment: the agent may well have written "I'll create the team" and * then been stopped before creating anything. Shipping that fragment as * the reply is the worst outcome — the user reads a promise as a result. * * So the fragment is kept (it is often useful) and a short, plain line is * appended saying the turn stopped early and the work may be unfinished. * * @module utils/incomplete-turn */ /** The runtime's report of a turn that ended early. */ export interface IncompleteTurn { reason: 'truncated' | 'abnormal-finish' | 'steps-exhausted' | 'content-filter' | 'desktop-unverified'; detail: string; finishReason: string; recoveryAttempts: number; } /** * Drop thinking-aloud paragraphs from an interrupted turn's text. * * @param text - Accumulated turn text * @returns The text without narration paragraphs (may be empty) */ export declare function stripNarration(text: string): string; export declare function appendIncompleteNotice(text: string, incomplete?: IncompleteTurn): string; //# sourceMappingURL=incomplete-turn.utils.d.ts.map