/**
 * Configuration Precedence Contract — Type Definitions
 *
 * 配置优先级、覆盖规则、冲突检测和治理检查的所有类型定义。
 * ConfigSource / ConfigLifetime / ConfigValueEvidence / ConfigConflict / ConfigResolutionReport
 * 已移至 types/pipeline.ts 消除循环依赖，此处通过 re-export 保持向后兼容。
 */
import type { ConfigSource, ConfigLifetime, ConfigValueEvidence, ConfigResolutionReport } from "../../../types/pipeline.js";
export type { ConfigSource, ConfigLifetime, ConfigValueEvidence, ConfigConflict, ConfigResolutionReport, } from "../../../types/pipeline.js";
/** 证据元数据来源 — 通过 mapEvidenceSource() 映射到规范来源 */
export type EvidenceMetadataSource = "user_declared" | "confirmed" | "detected";
export type OverrideDecision = "selected" | "overridden" | "blocked_by_guard" | "stale_warning" | "advisory_only";
export interface ConfigEvidenceEntry {
    field_path: string;
    value_hash: string;
    source: ConfigSource | EvidenceMetadataSource;
    confidence: number;
    evidence_refs: string[];
    confirmed_by?: string;
    lifetime: ConfigLifetime;
    collected_at: string;
    expires_at?: string;
}
export interface ConfigPrecedenceRule {
    id: string;
    higher_source: ConfigSource;
    lower_source: ConfigSource;
    description: string;
    override_behavior: OverrideDecision;
    requires_report: boolean;
}
export interface ConfigPrecedenceGovernanceFinding {
    severity: "hard_fail" | "advisory";
    rule: string;
    field_path?: string;
    message: string;
}
/** 上位约束列表 — 这些约束不可被任何配置覆盖 */
export declare const UPPER_BOUND_GUARDS: readonly ["enforced_guard", "privacy_secret_policy", "contract_state", "command_safety", "delivery_authorization", "data_sovereignty", "destructive_action_gate", "human_sovereignty"];
export type UpperBoundGuard = (typeof UPPER_BOUND_GUARDS)[number];
export interface StaleRule {
    id: string;
    trigger: "config_vs_fingerprint_mismatch" | "config_vs_blueprint_mismatch" | "fingerprint_drift";
    severity: "warning" | "hard_fail";
    description: string;
    action: string;
}
export interface GuardCheckResult {
    blocked: boolean;
    report: ConfigResolutionReport;
}
export interface ConfigFieldResolution {
    field_path: string;
    resolved_value: unknown;
    source: ConfigSource;
    stale_warning?: string;
    conflict_report?: string;
}
/**
 * 逐字段候选来源 — 支持所有 ConfigSource 类型。
 * 每个键为字段路径，值为候选证据数组。
 */
export interface FieldCandidates {
    [fieldPath: string]: ConfigValueEvidence[];
}
/**
 * 旧版三来源简写 (向后兼容)。
 */
export interface LegacyFieldSources {
    config_value: unknown;
    fingerprint_value?: unknown;
    user_override?: unknown;
}
export interface ResolveProjectConfigOptions {
    /** 来自当前用户任务意图的逐字段覆盖 */
    user_task_overrides?: Record<string, unknown>;
    /** 来自 CLI 参数的逐字段覆盖 */
    cli_overrides?: Record<string, unknown>;
    /** 来自 MCP 参数的逐字段覆盖 */
    mcp_overrides?: Record<string, unknown>;
    /** 除默认集之外需要额外解析的字段 */
    extra_fields?: string[];
    /** 指定需要解析的字段 (默认为标准集) */
    fields?: string[];
}
export interface ResolveProjectConfigResult {
    reports: ConfigResolutionReport[];
    resolutions: ConfigFieldResolution[];
    warnings: string[];
    entries: ConfigEvidenceEntry[];
}
//# sourceMappingURL=types.d.ts.map