/**
 * TODO: 已设计但未接入运行时的治理机制。待治理管线完善后启用。
 *
 * 契约状态覆盖存储 — 持久化人工确认的契约状态变更。
 *
 * 问题二十核心规则:
 * - enforced 降级/禁用必须人工确认
 * - draft/advisory/experimental 不得自动晋级 enforced
 * - deprecated/removed 状态更新必须记录 replacement 或 migration note
 * - 持久化审计记录，不能只改内存
 * - 状态变更必须有 evidence_refs + human confirmation
 */
import type { ContractState } from "./contract_registry.js";
/** 契约状态覆盖记录 */
export interface ContractStateOverride {
    contract_id: string;
    previous_state: ContractState;
    new_state: ContractState;
    reason: string;
    evidence_refs: string[];
    confirmed_by: string;
    updated_at: string;
    replacement_contract_id?: string;
    migration_note?: string;
}
/** 契约状态更新请求 */
export interface ContractStateUpdateRequest {
    contract_id: string;
    target_state: ContractState;
    reason: string;
    evidence_refs: string[];
    confirmed_by: string;
    confirm: boolean;
    dry_run: boolean;
    replacement_contract_id?: string;
    migration_note?: string;
}
/** 契约状态更新结果 */
export interface ContractStateUpdateResult {
    contract_id: string;
    previous_state: ContractState;
    new_state: ContractState;
    updated: boolean;
    dry_run: boolean;
    validation_errors: string[];
    override: ContractStateOverride | null;
}
/**
 * 契约状态存储 — 管理人工确认的契约状态变更
 */
export declare class ContractStateStore {
    private filePath;
    private overrides;
    private loaded;
    constructor(stateDir: string);
    private ensureLoaded;
    private persist;
    /** 获取契约的生效状态 */
    getEffectiveState(contractId: string, defaultState: ContractState): ContractState;
    /** 列出所有状态覆盖记录 */
    list(): ContractStateOverride[];
    /** 校验契约状态更新请求 */
    validate(request: ContractStateUpdateRequest): ContractStateUpdateResult;
    /** 校验并应用状态更新 */
    apply(request: ContractStateUpdateRequest): ContractStateUpdateResult;
    /** 清空所有覆盖记录 */
    clear(): void;
}
//# sourceMappingURL=contract_state_store.d.ts.map