/** * Transcript assembly for the LLM-role copilot mode. * * Builds a role-labeled plain-text transcript of the tail window of a * session's conversation, for consumption by the copilot decision policy * and prompt builder. This module owns NO prompt template text — it only * formats. On read failure or timeout it returns null and the caller * treats that as "no transcript available". */ import type { ISessionClient } from "../platform/ports/session-client.ts"; export interface TranscriptOptions { /** Number of most recent messages to include in the transcript window. */ window_size: number; /** Hard cap on the returned transcript length; tail-truncated when exceeded. */ max_chars: number; /** When true, append brief one-line summaries of tool results; when false, drop tool parts. */ include_tools: boolean; } /** * Assemble a role-labeled plain-text transcript of the tail window of a * session's conversation. * * - Reads messages via `client.messages(sid, { limit: window_size })`, * guarded by `withTimeout` (ROLEBOX_CLIENT_TIMEOUT_MS override applies, * see src/utils/timeout.ts). The tail window is enforced defensively * even if the client returns more messages than requested. * - Emits `user: ` / `assistant: ` lines from text parts. When * `include_tools` is true, tool results are appended as brief one-line * summaries; when false, tool parts are dropped entirely. * - Enforces `max_chars` by TAIL truncation: keeps the most recent content. * - Returns null on read failure or timeout; returns "" for an empty window. */ export declare function assembleTranscript(client: ISessionClient, sid: string, opts: TranscriptOptions): Promise; //# sourceMappingURL=transcript.d.ts.map