import type { ContextCompactionItem } from "./types.js"; import { type OpenGeniText } from "../messages/runtime.js"; /** Headline for a compaction that could not produce a checkpoint. */ export declare const COMPACTION_FAILURE_TITLE: (t: OpenGeniText) => string; /** * Headline for a compaction cut short by its own attempt's cancellation (for * example a worker restarting during a deploy). Not a failure: the recovered * attempt checks again and compacts if the history still needs it. */ export declare const COMPACTION_INTERRUPTED_TITLE: (t: OpenGeniText) => string; /** * Headline for an automatic idle checkpoint dropped because no subscription * had capacity. Not a failure: the next turn compacts if still needed. */ export declare const COMPACTION_POSTPONED_TITLE: (t: OpenGeniText) => string; /** Headline for a settled `skipped` compaction landmark. */ export declare function compactionSkipTitle(t: OpenGeniText, reason: string | null): string; /** Why a definitive provider rejection repeats; shown behind Details. */ export declare const COMPACTION_REJECTION_NOTE: (t: OpenGeniText) => string; /** * Subtitle for a settled compaction landmark. Kept short: a definitive provider * rejection withholds the generic retry promise, names the one recovery step, * and moves its identifiers behind Details ({@link compactionFailureDetails}). */ export declare function compactionSkipSubtitle(t: OpenGeniText, reason: string | null, providerRejection?: ContextCompactionItem["providerRejection"]): string; export type CompactionFailureDetails = { /** One plain sentence on why it failed, when known. */ note: string | null; /** Provider identifiers or the recorded error text, in display order. */ facts: Array<{ label: string; value: string; }>; }; /** * Technical diagnostics for a failed compaction landmark, or null when it has * none: a definitive provider rejection lists its content-free identifiers; * any other failure shows the turn's recorded error text. Presentation only. */ export declare function compactionFailureDetails(t: OpenGeniText, item: Pick): CompactionFailureDetails | null; /** How a turn's failure reads on its chip and notice; see {@link presentTurnFailureText}. */ export type TurnFailurePresentation = { summary: string; /** The recorded text the summary replaced, offered behind Details. */ detail?: string; /** The summary names a compaction failure, whose own landmark owns the detail. */ compaction?: true; }; /** * Short copy for a turn's failure reason. A compaction failure records the raw * provider text after a fixed prefix, and a diagnostic failure (an unclassified * error or operator text; see `presentFailure`) records text not written for * people. Both name the outcome instead (`diagnosticOutcome` for a diagnostic) * and keep the recorded text as `detail`, behind Details. Copy the worker * wrote for people passes through unchanged. Presentation only: the stored * (and model-facing) event keeps its text. */ export declare function presentTurnFailureText(t: OpenGeniText, failureText: string | null | undefined, diagnosticOutcome?: string | null): TurnFailurePresentation | null; /** `HTTP 400 invalid_request_error, param input[3].encrypted_content`; identifiers only. */ export declare function describeCompactionProviderRejection(rejection: NonNullable): string;