/**
 * Shared constants and helpers for the dual-layer mechanism registry.
 */
// ── 已知注册表名称 ──
export const KNOWN_REGISTRIES = new Set([
    "mechanism_contract_registry",
    "workflow_contract_registry",
    "tool_invocation_contract_registry",
    "consumable_asset_registry",
    "capability_registry",
    "artifact_contract_registry",
    "input_material_contract_registry",
    "main_path_integration_contract",
    "command_execution_contract",
    "config_precedence_contract",
    "privacy_secret_contract",
    "user_feedback_contract",
    "decision_contract",
    "dual_layer_mechanism_registry",
    "contract_registry",
    "explicit_asset_registry",
]);
// ── 契约到 LayerMap 的转换 ──
export function contractToLayerMap(c) {
    return {
        mechanism_id: c.mechanism_id,
        mechanism_name: c.mechanism_name,
        owner_issue_id: c.owner_issue_id,
        priority: c.priority,
        template_assets: c.template_layer.assets,
        template_consumers: c.template_layer.injected_routes,
        code_enforcers: c.enforcement_layer.enforcers,
        code_entrypoints: c.enforcement_layer.entrypoints,
        registries: c.enforcement_layer.registries,
        evidence_outputs: c.evidence_layer.outputs,
        diagnostics: c.evidence_layer.diagnostic_codes,
        tests: c.verification_layer.tests,
        status: c.status,
        layer_status: c.status,
        injected_routes: c.template_layer.injected_routes,
        injected_workflows: c.template_layer.injected_workflows,
        target_hosts: c.template_layer.target_hosts,
        language_policy: c.template_layer.language_policy,
        state_effects: c.enforcement_layer.state_effects,
        hard_fail_conditions: c.enforcement_layer.hard_fail_conditions,
        degradation_behavior: c.enforcement_layer.degradation_behavior,
        reports: c.evidence_layer.reports,
        task_context_facts: c.evidence_layer.task_context_facts,
        runtime_checks: c.verification_layer.runtime_checks,
        regression_cases: c.verification_layer.regression_cases,
        drift_checks: c.verification_layer.drift_checks,
    };
}
// ── 基础设施文件豁免（这些是注册表本身，不在其他注册表中追踪） ──
export const INFRASTRUCTURE_EXCEPTIONS = new Set([
    "src/engine/contracts/dual_layer_mechanism_registry.ts",
    "src/engine/contracts/mechanism_contract_registry/index.ts",
    "src/engine/templates/consumable_asset_registry.ts",
]);
//# sourceMappingURL=shared.js.map