/** 注入优先级层级 */
export type InjectionPriorityTier = "route_required" | "project_core_active" | "project_normal_active" | "product_constraints" | "global_core_active" | "global_normal_active" | "advisory_pending";
/** 排除原因 */
export type ExclusionReason = "status_blocked" | "scope_mismatch" | "product_mismatch" | "route_mismatch" | "conflict" | "budget_limit" | "token_budget_exceeded" | "manual_reference_only" | "deprecated" | "stage_mismatch";
/** 知识引用（注入报告用） */
export interface KnowledgeRef {
    id: string;
    name: string;
    priority_tier: InjectionPriorityTier;
    consumption_mode: string;
    tier: string;
    /** 警告信息（如 pending_review_not_injected） */
    warning?: string;
    /** 多条警告 */
    warnings?: string[];
}
/** 知识冲突记录 */
export interface KnowledgeConflict {
    winner_id: string;
    loser_id: string;
    field: string;
    reason: string;
}
/** 缺失的必需知识条目 */
export interface MissingRequiredKnowledge {
    kind?: string;
    template?: string;
    pipeline_hint?: string;
    reason: string;
}
/** 产物 Schema 独立注入结果 — 绕过三道门预算的结构约束注入 */
export interface ArtifactSchemaInjection {
    /** 结构定义文本（Schema 章节和表格要求） */
    schema_text: string;
    /** 过程规则文本（按操作类型选择的指令和约束） */
    process_rules_text: string;
}
/** 知识注入报告 */
export interface KnowledgeInjectionReport {
    indexed: KnowledgeRef[];
    injectable: KnowledgeRef[];
    injected_required: KnowledgeRef[];
    injected_supporting: KnowledgeRef[];
    advisory_only: KnowledgeRef[];
    excluded: Array<{
        id: string;
        name: string;
        reason: ExclusionReason;
    }>;
    missing_required_knowledge: MissingRequiredKnowledge[];
    governance_findings?: Array<{
        severity: "hard_fail" | "advisory";
        subject_id: string;
        field: string;
        message: string;
    }>;
    conflicts: KnowledgeConflict[];
    budget: {
        requested: number;
        injected: number;
        advisory: number;
        dropped: number;
    };
    generated_at: string;
    /** 产物 Schema 独立注入 — 绕过三道门预算，始终注入到 prompt */
    artifact_schema_injection?: ArtifactSchemaInjection;
}
/** 知识条目 */
export interface KnowledgeEntry {
    /** 知识唯一标识 */
    id: string;
    /** 文件路径 */
    file_path: string;
    /** 知识名称 */
    name: string;
    /** 知识类型 */
    type: "pattern" | "procedure" | "domain" | "acceptance_template" | "review_rule" | "governance_rule" | "pipeline_procedure" | "artifact_template" | "checklist";
    /** 适用任务阶段（8 个中文值），未声明时不参与阶段过滤 */
    stages?: string[];
    /** 触发条件 */
    when: string;
    /** 知识正文 */
    body?: string;
    /** 适用范围 */
    scope: string[];
    /** 适用产品 */
    products: string[];
    /** 适用技术栈 */
    tech_stack?: string;
    /** 最后使用时间 */
    last_used_at?: string;
    /** 创建时间 */
    created_at: string;
    /** 更新时间 */
    updated_at: string;
    /** 使用次数 */
    usage_count: number;
    /** 置信度 (0-1) */
    confidence: number;
    /** 适用路由；未声明时不参与路由过滤，声明标准路由时必须匹配 */
    routes?: string[];
    /** 状态: draft=草稿, active=活跃, staged=暂存, deprecated=已废弃, pending_review=待审查 */
    status: "draft" | "active" | "staged" | "deprecated" | "pending_review";
    /** 生命周期状态别名 — 与 knowledge_lifecycle.ts 中的 knowledge_lifecycle_status 一致 */
    lifecycle_status?: "draft" | "active" | "staged" | "deprecated" | "pending_review";
}
/** 知识索引 */
export interface KnowledgeIndex {
    /** 索引版本 */
    version: number;
    /** 构建时间 */
    built_at: string;
    /** 全局知识条目 */
    global_entries: KnowledgeEntry[];
    /** 项目级知识条目 */
    project_entries: KnowledgeEntry[];
}
//# sourceMappingURL=knowledge.d.ts.map