/**
 * Knowledge Asset Consumer — 问题五十七消费链路实现。
 *
 * 为 intent_router、expander、verifier、adapter prompt、sync/migration、observability
 * 提供统一的知识资产消费接口。所有组件通过此模块消费 KnowledgeAssetFrontmatter 标准字段。
 */
import type { KnowledgeConsumptionSnapshot } from "./knowledge_consumption_snapshot.js";
/** 知识资产消费记录 */
export interface AssetConsumptionRecord {
    asset_id: string;
    asset_name: string;
    file_path: string;
    fields_consumed: string[];
    consumer: string;
    consumed_at: string;
}
/** 路由器消费的字段 */
export interface RouterConsumptionFields {
    routes: string[];
    primary_triggers: string[];
    negative_triggers: string[];
    specificity: number;
}
/** 扩展器消费的字段 */
export interface ExpanderConsumptionFields {
    authority: string;
    priority: string;
    required_evidence: string[];
    asset_kind: string;
}
/** 验证器消费的字段 */
export interface VerifierConsumptionFields {
    hard_blocks: string[];
    required_evidence: string[];
    fallback: string;
    lifecycle_status: string;
}
/** 适配器 Prompt 消费的字段 */
export interface AdapterPromptConsumptionFields {
    name: string;
    scope: string[];
    version: string;
}
/** 全量消费报告 */
export interface KnowledgeConsumptionReport {
    generated_at: string;
    /** 静态资产目录扫描结果 — 来自离线 frontmatter/registry 扫描，非真实消费证据 */
    indexed_catalog: {
        total_assets: number;
        assets: Array<{
            asset_id: string;
            file_path: string;
            asset_kind: string;
            priority: string;
        }>;
    };
    /** registry 静态记录 — 来自 consumeFor* 离线扫描，不作为真实消费证据 */
    registry_records: {
        router: AssetConsumptionRecord[];
        expander: AssetConsumptionRecord[];
        verifier: AssetConsumptionRecord[];
        adapter_prompt: AssetConsumptionRecord[];
    };
    /** 真实消费 trace — 来自 runtime trace store，仅此可作为 通过证据 */
    runtime_consumption_traces: {
        router: AssetConsumptionRecord[];
        expander: AssetConsumptionRecord[];
        verifier: AssetConsumptionRecord[];
        adapter_prompt: AssetConsumptionRecord[];
    };
    consumers: {
        router: AssetConsumptionRecord[];
        expander: AssetConsumptionRecord[];
        verifier: AssetConsumptionRecord[];
        adapter_prompt: AssetConsumptionRecord[];
    };
    snapshot: KnowledgeConsumptionSnapshot;
    total_assets_indexed: number;
    total_assets_injected: number;
    real_trace_evidence?: {
        router_entries: number;
        verifier_entries: number;
        expander_entries: number;
        adapter_entries: number;
        p0p1_injected?: number;
        p2p3_backlog?: number;
    };
}
/**
 * 加载知识资产注册表 — 使用 gray-matter YAML 解析 templates/** (internal/rules, procedures, rules/shared, checklists, artifacts/shared, domain, internal/patterns, profiles) 和 templates/patterns/**。
 */
export declare function loadKnowledgeAssetRegistry(baseDir: string): Array<{
    asset_id: string;
    frontmatter: Record<string, unknown>;
    file_path: string;
}>;
/**
 * 为 intent_router 消费知识资产字段。
 * 消费: routes, primary_triggers, negative_triggers, specificity
 * 兼容旧格式：when → primary_triggers
 */
export declare function consumeForRouter(assets: Array<{
    asset_id: string;
    frontmatter: Record<string, unknown>;
    file_path: string;
}>): {
    fields: RouterConsumptionFields[];
    records: AssetConsumptionRecord[];
};
/**
 * 为 intent_expander 消费知识资产字段。
 * 消费: authority, priority, required_evidence, asset_kind
 */
export declare function consumeForExpander(assets: Array<{
    asset_id: string;
    frontmatter: Record<string, unknown>;
    file_path: string;
}>): {
    fields: ExpanderConsumptionFields[];
    records: AssetConsumptionRecord[];
};
/**
 * 为 verifier 消费知识资产字段。
 * 消费: hard_blocks, required_evidence, fallback, lifecycle_status
 */
export declare function consumeForVerifier(assets: Array<{
    asset_id: string;
    frontmatter: Record<string, unknown>;
    file_path: string;
}>): {
    fields: VerifierConsumptionFields[];
    records: AssetConsumptionRecord[];
};
/**
 * 为 adapter_prompt 消费知识资产字段。
 * 消费: name, scope, version
 */
export declare function consumeForAdapterPrompt(assets: Array<{
    asset_id: string;
    frontmatter: Record<string, unknown>;
    file_path: string;
}>): {
    fields: AdapterPromptConsumptionFields[];
    records: AssetConsumptionRecord[];
};
/**
 * 生成完整的知识消费报告。
 */
export declare function generateKnowledgeConsumptionReport(baseDir: string): KnowledgeConsumptionReport;
//# sourceMappingURL=knowledge_asset_consumer.d.ts.map