import { type CallOauthLlmFallback } from "../../../../../lib/oauth-llm/dist/index.js"; export interface TimelineEventForRewriter { occurredAt: string; kind: string; summary: string; } /** Admin-twin label set (Task 392). All five carry `compiledTruth`. */ export type AdminTwinLabel = "Person" | "Organization" | "Concept" | "Project" | "LocalBusiness"; /** Public-twin label set (Task 392). Four labels carry `compiledTruthPublic`; :Person is excluded by design. */ export type PublicTwinLabel = "Organization" | "Concept" | "Project" | "LocalBusiness"; export type RewriteMode = "admin" | "public"; /** Cap on operator hints fed into the rewriter prompt (Task 413). Larger hints * become essays and dilute the rewriter's precedence rule. The rewriter still * produces a ≤ COMPILED_TRUTH_MAX_CHARS summary regardless. */ export declare const OPERATOR_HINT_MAX_CHARS = 1000; interface BaseRewriteParams { /** Display name of the subject (Person.name, Organization.name, etc.). */ subjectName: string; /** Current compiled-truth field — empty string is fine. */ currentTruth: string; /** Most recent N :TimelineEvent rows, newest-first. */ events: TimelineEventForRewriter[]; /** Override the model. Default: claude-haiku-4-5. */ model?: string; /** * Task 413 (admin) + Task 420 (public) — operator correction supplied via chat. * When present, the rewriter folds it into the prompt and treats it as * authoritative over the timeline. The caller (memory-update) is responsible * for stamping the matching `compiledTruth*Source = 'operator'` on the * resulting write. Valid in both admin and public modes; precedence wording * is identical for both. In admin mode the public-twin auto-fire is skipped * so admin-side corrections do not leak unreviewed to the public surface. */ operatorHint?: string; } interface AdminRewriteParams extends BaseRewriteParams { mode?: "admin"; subjectLabel: AdminTwinLabel; } interface PublicRewriteParams extends BaseRewriteParams { mode: "public"; subjectLabel: PublicTwinLabel; } export type RewriteParams = AdminRewriteParams | PublicRewriteParams; export type RewriteResult = { kind: "ok"; compiledTruth: string; } | { kind: "refused"; reason: "no-events"; } | { kind: "too-long"; attemptedLen: number; } | { kind: "llm-failure"; fallback: CallOauthLlmFallback; }; export declare function rewriteCompiledTruth(p: RewriteParams): Promise; export {}; //# sourceMappingURL=compiled-truth-rewriter.d.ts.map