/** 知识验证层与探针载荷的唯一声明。 */ export declare const KNOWLEDGE_VERIFICATION_LAYERS: readonly ["L0", "L1", "L2", "L3"]; export type KnowledgeVerificationLayer = typeof KNOWLEDGE_VERIFICATION_LAYERS[number]; export declare const KNOWLEDGE_PROBE_KINDS: readonly ["builtin", "semgrep", "rego", "property"]; export type KnowledgeProbeKind = typeof KNOWLEDGE_PROBE_KINDS[number]; /** 知识条目 keywords 单项长度上限 — 中文子串索引对每词生成全部 ≥2 字符子串,成本随长度平方增长;超长描述属于 body 职责。schema/parse/service 三处同源引用。 */ export declare const MAX_KEYWORD_ITEM_CHARS = 64; /** * 知识条目 status 全集(单一真相源:index_manager 加载校验与 probe_rule 执法过滤同源引用, * 与 context/types/knowledge.ts 的 status 联合类型按约定同步——index_manager 以 * Set 构造兜住漂移)。 * superseded 与 deprecated 语义区分:deprecated=废弃无继任;superseded=被明确继任(原文保留可追溯)。 */ export declare const KNOWLEDGE_STATUSES: readonly ["draft", "active", "staged", "deprecated", "pending_review", "superseded"]; export type KnowledgeStatus = typeof KNOWLEDGE_STATUSES[number]; /** 存量兼容值:retired 在加载层映射为 deprecated,不再作为合法新值(index_manager.parseEntry)。 */ export declare const LEGACY_KNOWLEDGE_STATUS_ALIASES: Readonly>; /** enforcement 值形态:`probe`(本条自带 L0/L1 探针)或 `external:<标识>`(项目自建执法点,如 external:check-currency)。 */ export declare const KNOWLEDGE_ENFORCEMENT_PROBE = "probe"; /** * 校验执法点声明(enforcement 字段,可选);返回 null 表示合法(含缺省=未执法)。 * 执法点唯一原则:值形态二选一,probe 声明要求本条确为探针条目(L0/L1,与层×探针互斥校验同源); * external 声明要求本条不带任何探针载荷(自带探针又登记外部执法点=双执法,正是本字段要禁止的形态)。 * probePayload 由调用点传入本条的 probe/probe_path/pattern(缺省视为无探针载荷,层互斥校验另行负责)。 */ export declare function validateKnowledgeEnforcement(enforcement: unknown, verificationLayer?: unknown, probePayload?: { probe?: unknown; probe_path?: unknown; pattern?: unknown; }): string | null; export declare const KNOWLEDGE_PROBE_POLICY: Readonly>; export declare function isDeterministicKnowledgeLayer(layer: KnowledgeVerificationLayer): layer is "L0" | "L1"; export interface KnowledgeVerificationShape { verification_layer?: unknown; probe?: unknown; probe_path?: unknown; pattern?: unknown; /** builtin 自验样本(可选):加载时对样本跑 pattern,命中 0 处=拒载该 probe(防静默失效假执法) */ selftest_sample?: unknown; } /** * 校验知识层级、探针类型和载荷的组合;返回 null 表示合法。 * builtin 使用内联 pattern,其余确定性探针使用 knowledge 目录内的 probe_path。 */ export declare function validateKnowledgeVerificationShape(input: KnowledgeVerificationShape, requireLayer?: boolean): string | null;