/** * Rendering for channel replies: runtime event -> render event -> message body. * * Split out of reply-pipeline.ts so the pipeline holds the delivery decisions * (what to send, when, once) and this module holds the text decisions (what a * given surface is allowed to show, and how it reads). */ import type { RuntimeEventEnvelope, AnyRuntimeEvent } from '../runtime/events/index.js'; import type { ChannelRenderEvent, ChannelRenderPhase, ChannelRenderPolicy, ChannelReasoningVisibility } from './types.js'; export declare function trimText(value: string, limit: number): string; /** * Replace any agent completion report with the summary it carries. * * The report is an internal contract between an agent and the WRFC controller. * It belongs in the transcript, so only the report SPAN is rewritten, prose * written around it survives intact. * * BOTH forms are handled, because the report reached the owner's phone in both: * once as `{"version":1,"archetype":"engineer",...}`, and again, after that * was fixed, as the prose form the base agent prompt asks for, a filled-in * `Summary: / Changes: / Decisions:` template with `Changes: None` under a * greeting. The prose half lives in completion-report-prose.ts. * * The JSON pass runs first: a report can carry BOTH (prose sections above, a * fenced JSON block below), and the JSON pass would otherwise be handed text * the prose pass had already truncated. */ export declare function renderWithoutCompletionReport(text: string): string; export declare function eventLine(event: ChannelRenderEvent, reasoningVisibility: ChannelReasoningVisibility): string | null; /** * Reduce whatever the caller passed as progress to ONE bounded line a person * can act on, or null when it says nothing. * * Newlines are collapsed rather than kept, which is what makes this safe by * construction: a caller who wrongly hands over accumulating content cannot * turn a progress notification into a growing transcript, because the result * is always a single bounded line whose head is stable, so the pipeline's * identical-body check suppresses the repeat instead of shipping it. * * Callers must still pass a STATUS ("what is happening now"), never content: * `AgentRecord.progress` is exactly that, and `streamingContent` is not. */ export declare function channelStatusLine(rawText: string, maxChars?: number): string | null; export declare function buildRenderedText(explicitText: string, events: readonly ChannelRenderEvent[], policy: ChannelRenderPolicy, phase: ChannelRenderPhase): string; export declare function normalizeChannelRenderEventFromRuntime(envelope: RuntimeEventEnvelope): ChannelRenderEvent[]; //# sourceMappingURL=reply-render.d.ts.map