import { type ChecklistItemStatus, type GoalChecklistItem } from './checklist-types.js';
import type { ServerLocale as GoalUiLocale } from '../../i18n/locale.js';
/** Persisted under `SessionMetadata.customData.persistentGoal`. */
export declare const PERSISTENT_GOAL_CUSTOM_KEY = "persistentGoal";
export type PersistentGoalStatus = 'active' | 'paused' | 'done' | 'cleared';
export interface PersistentGoalState {
    goal: string;
    status: PersistentGoalStatus;
    turnsUsed: number;
    maxTurns: number;
    createdAt: number;
    lastTurnAt: number;
    lastVerdict?: 'done' | 'continue' | 'skipped' | 'decompose';
    lastReason?: string;
    pausedReason?: string;
    judgeModelRef?: string;
    /** Hermes-style: judge JSON parse failures in a row (API errors do not increment). */
    consecutiveParseFailures?: number;
    /** After first successful decomposition, checklist drives Phase-B judging. */
    decomposed?: boolean;
    checklist?: GoalChecklistItem[];
    /** Gateway console language: drives judge `reason` language and system messages. */
    uiLocale?: GoalUiLocale;
}
export declare function defaultMaxTurns(cfg: {
    maxTurns?: number;
} | undefined): number;
export declare function readPersistentGoal(customData: Record<string, unknown> | undefined): PersistentGoalState | null;
export declare function serializePersistentGoal(s: PersistentGoalState): Record<string, unknown>;
/** Render checklist for continuation prompt (Hermes-style, no numbers in body). */
export declare function renderChecklistPlain(items: GoalChecklistItem[]): string;
/** Numbered checklist for judge user prompts (1-based indices). */
export declare function renderChecklistNumbered(items: GoalChecklistItem[]): string;
/**
 * After LLM decomposition, keep existing checklist rows (e.g. user-added acceptance criteria)
 * and append judge-generated items, skipping duplicate text (case-insensitive trim).
 */
export declare function mergeDecomposedChecklistItems(existing: GoalChecklistItem[], decomposedTexts: {
    text: string;
}[]): GoalChecklistItem[];
export declare function applyJudgeChecklistUpdates(items: GoalChecklistItem[], parsed: {
    updates: {
        index: number;
        status: ChecklistItemStatus;
        evidence?: string | null;
    }[];
    newItems: {
        text: string;
    }[];
}): GoalChecklistItem[];
export declare function mergeCustomDataPatch(existingCustom: Record<string, unknown> | undefined, patch: Record<string, unknown>): Record<string, unknown>;
