/**
 * Knowledge Asset Audit — 问题五十七核心机制之二。
 *
 * 扫描所有知识资产，输出审计报告，识别:
 * - frontmatter 缺失字段
 * - 重复 ID / canonical 冲突
 * - owner/evidence 缺失
 * - deprecated/draft/quarantine 注入风险
 * - checklist 硬规则越权
 * - 消费链路不可追踪
 */
import type { KnowledgeAssetFrontmatter } from "./knowledge_asset_schema.js";
/** 审计发现类型 */
export type AuditFindingKind = "missing_required_field" | "duplicate_id" | "duplicate_canonical" | "trigger_conflict" | "semantic_conflict" | "owner_missing" | "required_evidence_missing" | "deprecated_injected" | "consumption_path_missing" | "language_quality_issue" | "schema_migration_required";
/** 知识资产审计发现 */
export interface KnowledgeAssetAuditFinding {
    asset_id: string;
    file_path: string;
    severity: "hard_fail" | "warning" | "advisory" | "info";
    kind: AuditFindingKind;
    detail: string;
    suggested_action: "repair" | "merge" | "mark_supporting" | "deprecate" | "manual_required";
}
/** 审计报告摘要 */
export interface KnowledgeAssetAuditReport {
    report_id: string;
    generated_at: string;
    total_assets: number;
    findings: KnowledgeAssetAuditFinding[];
    hard_fail_count: number;
    warning_count: number;
    info_count: number;
    passed: boolean;
    summary_zh: string;
}
/**
 * 使用 gray-matter 解析知识资产文件的 frontmatter。
 * 返回正确类型的 frontmatter（数组是数组，不是字符串）。
 */
export declare function parseKnowledgeAssetFrontmatter(rawContent: string): Record<string, unknown>;
/**
 * 解析文件并返回可审计的资产对象。
 */
export declare function parseAssetFile(filePath: string, rawContent: string): {
    frontmatter: Partial<KnowledgeAssetFrontmatter>;
    file_path: string;
    body: string;
};
/**
 * 执行知识资产全量审计。
 * 接受已解析的 frontmatter 对象（推荐使用 parseAssetFile 预处理）。
 */
export declare function auditKnowledgeAssets(assets: Array<{
    frontmatter: Partial<KnowledgeAssetFrontmatter>;
    file_path: string;
    body?: string;
}>): KnowledgeAssetAuditReport;
/**
 * 快速审计 — 对已有资产做最小化检查，返回是否通过。
 */
export declare function quickAuditPassed(assets: Array<{
    frontmatter: Partial<KnowledgeAssetFrontmatter>;
    file_path: string;
}>): boolean;
//# sourceMappingURL=knowledge_asset_audit.d.ts.map