limen-ai 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/LICENSE +190 -0
- package/README.md +546 -0
- package/dist/api/agents/agent_api.d.ts +126 -0
- package/dist/api/agents/agent_api.d.ts.map +1 -0
- package/dist/api/agents/agent_api.js +467 -0
- package/dist/api/agents/agent_api.js.map +1 -0
- package/dist/api/agents/trust_progression.d.ts +78 -0
- package/dist/api/agents/trust_progression.d.ts.map +1 -0
- package/dist/api/agents/trust_progression.js +124 -0
- package/dist/api/agents/trust_progression.js.map +1 -0
- package/dist/api/chat/chat_pipeline.d.ts +91 -0
- package/dist/api/chat/chat_pipeline.d.ts.map +1 -0
- package/dist/api/chat/chat_pipeline.js +630 -0
- package/dist/api/chat/chat_pipeline.js.map +1 -0
- package/dist/api/chat/technique_injector.d.ts +86 -0
- package/dist/api/chat/technique_injector.d.ts.map +1 -0
- package/dist/api/chat/technique_injector.js +125 -0
- package/dist/api/chat/technique_injector.js.map +1 -0
- package/dist/api/data/data_api.d.ts +91 -0
- package/dist/api/data/data_api.d.ts.map +1 -0
- package/dist/api/data/data_api.js +306 -0
- package/dist/api/data/data_api.js.map +1 -0
- package/dist/api/enforcement/cost_tracker.d.ts +105 -0
- package/dist/api/enforcement/cost_tracker.d.ts.map +1 -0
- package/dist/api/enforcement/cost_tracker.js +227 -0
- package/dist/api/enforcement/cost_tracker.js.map +1 -0
- package/dist/api/enforcement/latency_harness.d.ts +94 -0
- package/dist/api/enforcement/latency_harness.d.ts.map +1 -0
- package/dist/api/enforcement/latency_harness.js +120 -0
- package/dist/api/enforcement/latency_harness.js.map +1 -0
- package/dist/api/enforcement/rate_guard.d.ts +52 -0
- package/dist/api/enforcement/rate_guard.d.ts.map +1 -0
- package/dist/api/enforcement/rate_guard.js +79 -0
- package/dist/api/enforcement/rate_guard.js.map +1 -0
- package/dist/api/enforcement/rbac_guard.d.ts +55 -0
- package/dist/api/enforcement/rbac_guard.d.ts.map +1 -0
- package/dist/api/enforcement/rbac_guard.js +77 -0
- package/dist/api/enforcement/rbac_guard.js.map +1 -0
- package/dist/api/errors/limen_error.d.ts +81 -0
- package/dist/api/errors/limen_error.d.ts.map +1 -0
- package/dist/api/errors/limen_error.js +324 -0
- package/dist/api/errors/limen_error.js.map +1 -0
- package/dist/api/facades/claim_facade.d.ts +47 -0
- package/dist/api/facades/claim_facade.d.ts.map +1 -0
- package/dist/api/facades/claim_facade.js +67 -0
- package/dist/api/facades/claim_facade.js.map +1 -0
- package/dist/api/facades/working_memory_facade.d.ts +47 -0
- package/dist/api/facades/working_memory_facade.d.ts.map +1 -0
- package/dist/api/facades/working_memory_facade.js +74 -0
- package/dist/api/facades/working_memory_facade.js.map +1 -0
- package/dist/api/governance/governed_orchestration.d.ts +76 -0
- package/dist/api/governance/governed_orchestration.d.ts.map +1 -0
- package/dist/api/governance/governed_orchestration.js +413 -0
- package/dist/api/governance/governed_orchestration.js.map +1 -0
- package/dist/api/index.d.ts +84 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +847 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/infer/infer_pipeline.d.ts +51 -0
- package/dist/api/infer/infer_pipeline.d.ts.map +1 -0
- package/dist/api/infer/infer_pipeline.js +291 -0
- package/dist/api/infer/infer_pipeline.js.map +1 -0
- package/dist/api/interfaces/api.d.ts +940 -0
- package/dist/api/interfaces/api.d.ts.map +1 -0
- package/dist/api/interfaces/api.js +21 -0
- package/dist/api/interfaces/api.js.map +1 -0
- package/dist/api/knowledge/knowledge_api.d.ts +55 -0
- package/dist/api/knowledge/knowledge_api.d.ts.map +1 -0
- package/dist/api/knowledge/knowledge_api.js +89 -0
- package/dist/api/knowledge/knowledge_api.js.map +1 -0
- package/dist/api/migration/023_agent_persistence.d.ts +32 -0
- package/dist/api/migration/023_agent_persistence.d.ts.map +1 -0
- package/dist/api/migration/023_agent_persistence.js +158 -0
- package/dist/api/migration/023_agent_persistence.js.map +1 -0
- package/dist/api/migration/024_trust_learning.d.ts +36 -0
- package/dist/api/migration/024_trust_learning.d.ts.map +1 -0
- package/dist/api/migration/024_trust_learning.js +194 -0
- package/dist/api/migration/024_trust_learning.js.map +1 -0
- package/dist/api/migration/025_knowledge_graph.d.ts +29 -0
- package/dist/api/migration/025_knowledge_graph.d.ts.map +1 -0
- package/dist/api/migration/025_knowledge_graph.js +97 -0
- package/dist/api/migration/025_knowledge_graph.js.map +1 -0
- package/dist/api/migration/026_replay_pipeline.d.ts +30 -0
- package/dist/api/migration/026_replay_pipeline.d.ts.map +1 -0
- package/dist/api/migration/026_replay_pipeline.js +118 -0
- package/dist/api/migration/026_replay_pipeline.js.map +1 -0
- package/dist/api/missions/mission_api.d.ts +74 -0
- package/dist/api/missions/mission_api.d.ts.map +1 -0
- package/dist/api/missions/mission_api.js +408 -0
- package/dist/api/missions/mission_api.js.map +1 -0
- package/dist/api/observability/health.d.ts +36 -0
- package/dist/api/observability/health.d.ts.map +1 -0
- package/dist/api/observability/health.js +92 -0
- package/dist/api/observability/health.js.map +1 -0
- package/dist/api/observability/metrics.d.ts +95 -0
- package/dist/api/observability/metrics.d.ts.map +1 -0
- package/dist/api/observability/metrics.js +260 -0
- package/dist/api/observability/metrics.js.map +1 -0
- package/dist/api/roles/roles_api.d.ts +45 -0
- package/dist/api/roles/roles_api.d.ts.map +1 -0
- package/dist/api/roles/roles_api.js +77 -0
- package/dist/api/roles/roles_api.js.map +1 -0
- package/dist/api/sessions/session_manager.d.ts +110 -0
- package/dist/api/sessions/session_manager.d.ts.map +1 -0
- package/dist/api/sessions/session_manager.js +278 -0
- package/dist/api/sessions/session_manager.js.map +1 -0
- package/dist/budget/harness/dba_harness.d.ts +36 -0
- package/dist/budget/harness/dba_harness.d.ts.map +1 -0
- package/dist/budget/harness/dba_harness.js +58 -0
- package/dist/budget/harness/dba_harness.js.map +1 -0
- package/dist/budget/impl/dba_impl.d.ts +47 -0
- package/dist/budget/impl/dba_impl.d.ts.map +1 -0
- package/dist/budget/impl/dba_impl.js +402 -0
- package/dist/budget/impl/dba_impl.js.map +1 -0
- package/dist/budget/interfaces/dba_types.d.ts +708 -0
- package/dist/budget/interfaces/dba_types.d.ts.map +1 -0
- package/dist/budget/interfaces/dba_types.js +124 -0
- package/dist/budget/interfaces/dba_types.js.map +1 -0
- package/dist/claims/evidence/capability_scope_validator.d.ts +32 -0
- package/dist/claims/evidence/capability_scope_validator.d.ts.map +1 -0
- package/dist/claims/evidence/capability_scope_validator.js +72 -0
- package/dist/claims/evidence/capability_scope_validator.js.map +1 -0
- package/dist/claims/evidence/evidence_validator.d.ts +35 -0
- package/dist/claims/evidence/evidence_validator.d.ts.map +1 -0
- package/dist/claims/evidence/evidence_validator.js +118 -0
- package/dist/claims/evidence/evidence_validator.js.map +1 -0
- package/dist/claims/harness/claim_harness.d.ts +22 -0
- package/dist/claims/harness/claim_harness.d.ts.map +1 -0
- package/dist/claims/harness/claim_harness.js +26 -0
- package/dist/claims/harness/claim_harness.js.map +1 -0
- package/dist/claims/interfaces/claim_types.d.ts +858 -0
- package/dist/claims/interfaces/claim_types.d.ts.map +1 -0
- package/dist/claims/interfaces/claim_types.js +201 -0
- package/dist/claims/interfaces/claim_types.js.map +1 -0
- package/dist/claims/migration/019_ccp_claims.d.ts +23 -0
- package/dist/claims/migration/019_ccp_claims.d.ts.map +1 -0
- package/dist/claims/migration/019_ccp_claims.js +196 -0
- package/dist/claims/migration/019_ccp_claims.js.map +1 -0
- package/dist/claims/store/claim_stores.d.ts +27 -0
- package/dist/claims/store/claim_stores.d.ts.map +1 -0
- package/dist/claims/store/claim_stores.js +1352 -0
- package/dist/claims/store/claim_stores.js.map +1 -0
- package/dist/context/harness/cgp_harness.d.ts +32 -0
- package/dist/context/harness/cgp_harness.d.ts.map +1 -0
- package/dist/context/harness/cgp_harness.js +295 -0
- package/dist/context/harness/cgp_harness.js.map +1 -0
- package/dist/context/interfaces/cgp_types.d.ts +905 -0
- package/dist/context/interfaces/cgp_types.d.ts.map +1 -0
- package/dist/context/interfaces/cgp_types.js +112 -0
- package/dist/context/interfaces/cgp_types.js.map +1 -0
- package/dist/context/stores/cgp_stores.d.ts +42 -0
- package/dist/context/stores/cgp_stores.d.ts.map +1 -0
- package/dist/context/stores/cgp_stores.js +856 -0
- package/dist/context/stores/cgp_stores.js.map +1 -0
- package/dist/execution/harness/egp_harness.d.ts +43 -0
- package/dist/execution/harness/egp_harness.d.ts.map +1 -0
- package/dist/execution/harness/egp_harness.js +54 -0
- package/dist/execution/harness/egp_harness.js.map +1 -0
- package/dist/execution/interfaces/egp_types.d.ts +1042 -0
- package/dist/execution/interfaces/egp_types.d.ts.map +1 -0
- package/dist/execution/interfaces/egp_types.js +195 -0
- package/dist/execution/interfaces/egp_types.js.map +1 -0
- package/dist/execution/stores/egp_stores.d.ts +29 -0
- package/dist/execution/stores/egp_stores.d.ts.map +1 -0
- package/dist/execution/stores/egp_stores.js +1250 -0
- package/dist/execution/stores/egp_stores.js.map +1 -0
- package/dist/execution/wiring/execution_gate.d.ts +56 -0
- package/dist/execution/wiring/execution_gate.d.ts.map +1 -0
- package/dist/execution/wiring/execution_gate.js +77 -0
- package/dist/execution/wiring/execution_gate.js.map +1 -0
- package/dist/execution/wiring/floor_enforcer.d.ts +68 -0
- package/dist/execution/wiring/floor_enforcer.d.ts.map +1 -0
- package/dist/execution/wiring/floor_enforcer.js +96 -0
- package/dist/execution/wiring/floor_enforcer.js.map +1 -0
- package/dist/execution/wiring/invocation_gate.d.ts +58 -0
- package/dist/execution/wiring/invocation_gate.d.ts.map +1 -0
- package/dist/execution/wiring/invocation_gate.js +69 -0
- package/dist/execution/wiring/invocation_gate.js.map +1 -0
- package/dist/execution/wiring/terminal_release.d.ts +56 -0
- package/dist/execution/wiring/terminal_release.d.ts.map +1 -0
- package/dist/execution/wiring/terminal_release.js +85 -0
- package/dist/execution/wiring/terminal_release.js.map +1 -0
- package/dist/governance/harness/governance_harness.d.ts +54 -0
- package/dist/governance/harness/governance_harness.d.ts.map +1 -0
- package/dist/governance/harness/governance_harness.js +60 -0
- package/dist/governance/harness/governance_harness.js.map +1 -0
- package/dist/governance/migration/012_governance_runs_traces.d.ts +21 -0
- package/dist/governance/migration/012_governance_runs_traces.d.ts.map +1 -0
- package/dist/governance/migration/012_governance_runs_traces.js +115 -0
- package/dist/governance/migration/012_governance_runs_traces.js.map +1 -0
- package/dist/governance/migration/013_governance_contracts.d.ts +18 -0
- package/dist/governance/migration/013_governance_contracts.d.ts.map +1 -0
- package/dist/governance/migration/013_governance_contracts.js +59 -0
- package/dist/governance/migration/013_governance_contracts.js.map +1 -0
- package/dist/governance/migration/014_governance_supervisor.d.ts +16 -0
- package/dist/governance/migration/014_governance_supervisor.d.ts.map +1 -0
- package/dist/governance/migration/014_governance_supervisor.js +75 -0
- package/dist/governance/migration/014_governance_supervisor.js.map +1 -0
- package/dist/governance/migration/015_governance_eval.d.ts +18 -0
- package/dist/governance/migration/015_governance_eval.d.ts.map +1 -0
- package/dist/governance/migration/015_governance_eval.js +65 -0
- package/dist/governance/migration/015_governance_eval.js.map +1 -0
- package/dist/governance/migration/016_governance_capabilities.d.ts +16 -0
- package/dist/governance/migration/016_governance_capabilities.d.ts.map +1 -0
- package/dist/governance/migration/016_governance_capabilities.js +60 -0
- package/dist/governance/migration/016_governance_capabilities.js.map +1 -0
- package/dist/governance/migration/017_governance_handoffs_idempotency.d.ts +20 -0
- package/dist/governance/migration/017_governance_handoffs_idempotency.d.ts.map +1 -0
- package/dist/governance/migration/017_governance_handoffs_idempotency.js +103 -0
- package/dist/governance/migration/017_governance_handoffs_idempotency.js.map +1 -0
- package/dist/governance/migration/018_supervisor_decision_delete_trigger.d.ts +17 -0
- package/dist/governance/migration/018_supervisor_decision_delete_trigger.d.ts.map +1 -0
- package/dist/governance/migration/018_supervisor_decision_delete_trigger.js +37 -0
- package/dist/governance/migration/018_supervisor_decision_delete_trigger.js.map +1 -0
- package/dist/governance/stores/governance_stores.d.ts +78 -0
- package/dist/governance/stores/governance_stores.d.ts.map +1 -0
- package/dist/governance/stores/governance_stores.js +1117 -0
- package/dist/governance/stores/governance_stores.js.map +1 -0
- package/dist/kernel/audit/audit_trail.d.ts +24 -0
- package/dist/kernel/audit/audit_trail.d.ts.map +1 -0
- package/dist/kernel/audit/audit_trail.js +569 -0
- package/dist/kernel/audit/audit_trail.js.map +1 -0
- package/dist/kernel/crypto/crypto_engine.d.ts +49 -0
- package/dist/kernel/crypto/crypto_engine.d.ts.map +1 -0
- package/dist/kernel/crypto/crypto_engine.js +350 -0
- package/dist/kernel/crypto/crypto_engine.js.map +1 -0
- package/dist/kernel/database/database_lifecycle.d.ts +24 -0
- package/dist/kernel/database/database_lifecycle.d.ts.map +1 -0
- package/dist/kernel/database/database_lifecycle.js +404 -0
- package/dist/kernel/database/database_lifecycle.js.map +1 -0
- package/dist/kernel/database/migrations.d.ts +21 -0
- package/dist/kernel/database/migrations.d.ts.map +1 -0
- package/dist/kernel/database/migrations.js +407 -0
- package/dist/kernel/database/migrations.js.map +1 -0
- package/dist/kernel/events/event_bus.d.ts +25 -0
- package/dist/kernel/events/event_bus.d.ts.map +1 -0
- package/dist/kernel/events/event_bus.js +302 -0
- package/dist/kernel/events/event_bus.js.map +1 -0
- package/dist/kernel/events/webhook_delivery.d.ts +90 -0
- package/dist/kernel/events/webhook_delivery.d.ts.map +1 -0
- package/dist/kernel/events/webhook_delivery.js +324 -0
- package/dist/kernel/events/webhook_delivery.js.map +1 -0
- package/dist/kernel/index.d.ts +39 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +263 -0
- package/dist/kernel/index.js.map +1 -0
- package/dist/kernel/interfaces/audit.d.ts +146 -0
- package/dist/kernel/interfaces/audit.d.ts.map +1 -0
- package/dist/kernel/interfaces/audit.js +15 -0
- package/dist/kernel/interfaces/audit.js.map +1 -0
- package/dist/kernel/interfaces/capability_manifest.d.ts +104 -0
- package/dist/kernel/interfaces/capability_manifest.d.ts.map +1 -0
- package/dist/kernel/interfaces/capability_manifest.js +44 -0
- package/dist/kernel/interfaces/capability_manifest.js.map +1 -0
- package/dist/kernel/interfaces/common.d.ts +91 -0
- package/dist/kernel/interfaces/common.d.ts.map +1 -0
- package/dist/kernel/interfaces/common.js +10 -0
- package/dist/kernel/interfaces/common.js.map +1 -0
- package/dist/kernel/interfaces/crypto.d.ts +95 -0
- package/dist/kernel/interfaces/crypto.d.ts.map +1 -0
- package/dist/kernel/interfaces/crypto.js +14 -0
- package/dist/kernel/interfaces/crypto.js.map +1 -0
- package/dist/kernel/interfaces/database.d.ts +157 -0
- package/dist/kernel/interfaces/database.d.ts.map +1 -0
- package/dist/kernel/interfaces/database.js +10 -0
- package/dist/kernel/interfaces/database.js.map +1 -0
- package/dist/kernel/interfaces/eval.d.ts +93 -0
- package/dist/kernel/interfaces/eval.d.ts.map +1 -0
- package/dist/kernel/interfaces/eval.js +17 -0
- package/dist/kernel/interfaces/eval.js.map +1 -0
- package/dist/kernel/interfaces/events.d.ts +73 -0
- package/dist/kernel/interfaces/events.d.ts.map +1 -0
- package/dist/kernel/interfaces/events.js +13 -0
- package/dist/kernel/interfaces/events.js.map +1 -0
- package/dist/kernel/interfaces/governance_ids.d.ts +93 -0
- package/dist/kernel/interfaces/governance_ids.d.ts.map +1 -0
- package/dist/kernel/interfaces/governance_ids.js +18 -0
- package/dist/kernel/interfaces/governance_ids.js.map +1 -0
- package/dist/kernel/interfaces/idempotency.d.ts +143 -0
- package/dist/kernel/interfaces/idempotency.d.ts.map +1 -0
- package/dist/kernel/interfaces/idempotency.js +22 -0
- package/dist/kernel/interfaces/idempotency.js.map +1 -0
- package/dist/kernel/interfaces/index.d.ts +29 -0
- package/dist/kernel/interfaces/index.d.ts.map +1 -0
- package/dist/kernel/interfaces/index.js +9 -0
- package/dist/kernel/interfaces/index.js.map +1 -0
- package/dist/kernel/interfaces/kernel.d.ts +79 -0
- package/dist/kernel/interfaces/kernel.d.ts.map +1 -0
- package/dist/kernel/interfaces/kernel.js +13 -0
- package/dist/kernel/interfaces/kernel.js.map +1 -0
- package/dist/kernel/interfaces/lifecycle.d.ts +115 -0
- package/dist/kernel/interfaces/lifecycle.d.ts.map +1 -0
- package/dist/kernel/interfaces/lifecycle.js +53 -0
- package/dist/kernel/interfaces/lifecycle.js.map +1 -0
- package/dist/kernel/interfaces/mission_contract.d.ts +106 -0
- package/dist/kernel/interfaces/mission_contract.d.ts.map +1 -0
- package/dist/kernel/interfaces/mission_contract.js +20 -0
- package/dist/kernel/interfaces/mission_contract.js.map +1 -0
- package/dist/kernel/interfaces/namespace.d.ts +30 -0
- package/dist/kernel/interfaces/namespace.d.ts.map +1 -0
- package/dist/kernel/interfaces/namespace.js +12 -0
- package/dist/kernel/interfaces/namespace.js.map +1 -0
- package/dist/kernel/interfaces/rate_limiter.d.ts +42 -0
- package/dist/kernel/interfaces/rate_limiter.d.ts.map +1 -0
- package/dist/kernel/interfaces/rate_limiter.js +12 -0
- package/dist/kernel/interfaces/rate_limiter.js.map +1 -0
- package/dist/kernel/interfaces/rbac.d.ts +58 -0
- package/dist/kernel/interfaces/rbac.d.ts.map +1 -0
- package/dist/kernel/interfaces/rbac.js +13 -0
- package/dist/kernel/interfaces/rbac.js.map +1 -0
- package/dist/kernel/interfaces/retention.d.ts +58 -0
- package/dist/kernel/interfaces/retention.d.ts.map +1 -0
- package/dist/kernel/interfaces/retention.js +13 -0
- package/dist/kernel/interfaces/retention.js.map +1 -0
- package/dist/kernel/interfaces/run_identity.d.ts +132 -0
- package/dist/kernel/interfaces/run_identity.d.ts.map +1 -0
- package/dist/kernel/interfaces/run_identity.js +16 -0
- package/dist/kernel/interfaces/run_identity.js.map +1 -0
- package/dist/kernel/interfaces/supervisor.d.ts +175 -0
- package/dist/kernel/interfaces/supervisor.d.ts.map +1 -0
- package/dist/kernel/interfaces/supervisor.js +25 -0
- package/dist/kernel/interfaces/supervisor.js.map +1 -0
- package/dist/kernel/interfaces/tenant.d.ts +34 -0
- package/dist/kernel/interfaces/tenant.d.ts.map +1 -0
- package/dist/kernel/interfaces/tenant.js +12 -0
- package/dist/kernel/interfaces/tenant.js.map +1 -0
- package/dist/kernel/interfaces/time.d.ts +29 -0
- package/dist/kernel/interfaces/time.d.ts.map +1 -0
- package/dist/kernel/interfaces/time.js +13 -0
- package/dist/kernel/interfaces/time.js.map +1 -0
- package/dist/kernel/interfaces/trace.d.ts +264 -0
- package/dist/kernel/interfaces/trace.d.ts.map +1 -0
- package/dist/kernel/interfaces/trace.js +17 -0
- package/dist/kernel/interfaces/trace.js.map +1 -0
- package/dist/kernel/namespace/namespace_enforcer.d.ts +20 -0
- package/dist/kernel/namespace/namespace_enforcer.d.ts.map +1 -0
- package/dist/kernel/namespace/namespace_enforcer.js +91 -0
- package/dist/kernel/namespace/namespace_enforcer.js.map +1 -0
- package/dist/kernel/rate_limiter/rate_limiter.d.ts +23 -0
- package/dist/kernel/rate_limiter/rate_limiter.d.ts.map +1 -0
- package/dist/kernel/rate_limiter/rate_limiter.js +146 -0
- package/dist/kernel/rate_limiter/rate_limiter.js.map +1 -0
- package/dist/kernel/rbac/rbac_engine.d.ts +20 -0
- package/dist/kernel/rbac/rbac_engine.d.ts.map +1 -0
- package/dist/kernel/rbac/rbac_engine.js +257 -0
- package/dist/kernel/rbac/rbac_engine.js.map +1 -0
- package/dist/kernel/retention/retention_scheduler.d.ts +41 -0
- package/dist/kernel/retention/retention_scheduler.d.ts.map +1 -0
- package/dist/kernel/retention/retention_scheduler.js +218 -0
- package/dist/kernel/retention/retention_scheduler.js.map +1 -0
- package/dist/kernel/tenant/tenant_context.d.ts +22 -0
- package/dist/kernel/tenant/tenant_context.d.ts.map +1 -0
- package/dist/kernel/tenant/tenant_context.js +107 -0
- package/dist/kernel/tenant/tenant_context.js.map +1 -0
- package/dist/kernel/tenant/tenant_scope.d.ts +81 -0
- package/dist/kernel/tenant/tenant_scope.d.ts.map +1 -0
- package/dist/kernel/tenant/tenant_scope.js +168 -0
- package/dist/kernel/tenant/tenant_scope.js.map +1 -0
- package/dist/kernel/time/time_provider.d.ts +39 -0
- package/dist/kernel/time/time_provider.d.ts.map +1 -0
- package/dist/kernel/time/time_provider.js +58 -0
- package/dist/kernel/time/time_provider.js.map +1 -0
- package/dist/learning/applicator/technique_applicator.d.ts +41 -0
- package/dist/learning/applicator/technique_applicator.d.ts.map +1 -0
- package/dist/learning/applicator/technique_applicator.js +200 -0
- package/dist/learning/applicator/technique_applicator.js.map +1 -0
- package/dist/learning/cold_start/cold_start_manager.d.ts +35 -0
- package/dist/learning/cold_start/cold_start_manager.d.ts.map +1 -0
- package/dist/learning/cold_start/cold_start_manager.js +146 -0
- package/dist/learning/cold_start/cold_start_manager.js.map +1 -0
- package/dist/learning/cycle/learning_cycle_orchestrator.d.ts +45 -0
- package/dist/learning/cycle/learning_cycle_orchestrator.d.ts.map +1 -0
- package/dist/learning/cycle/learning_cycle_orchestrator.js +165 -0
- package/dist/learning/cycle/learning_cycle_orchestrator.js.map +1 -0
- package/dist/learning/extractor/technique_extractor.d.ts +48 -0
- package/dist/learning/extractor/technique_extractor.d.ts.map +1 -0
- package/dist/learning/extractor/technique_extractor.js +357 -0
- package/dist/learning/extractor/technique_extractor.js.map +1 -0
- package/dist/learning/harness/learning_harness.d.ts +26 -0
- package/dist/learning/harness/learning_harness.d.ts.map +1 -0
- package/dist/learning/harness/learning_harness.js +58 -0
- package/dist/learning/harness/learning_harness.js.map +1 -0
- package/dist/learning/interfaces/index.d.ts +7 -0
- package/dist/learning/interfaces/index.d.ts.map +1 -0
- package/dist/learning/interfaces/index.js +10 -0
- package/dist/learning/interfaces/index.js.map +1 -0
- package/dist/learning/interfaces/learning_types.d.ts +398 -0
- package/dist/learning/interfaces/learning_types.d.ts.map +1 -0
- package/dist/learning/interfaces/learning_types.js +69 -0
- package/dist/learning/interfaces/learning_types.js.map +1 -0
- package/dist/learning/migration/007_learning_techniques.d.ts +23 -0
- package/dist/learning/migration/007_learning_techniques.d.ts.map +1 -0
- package/dist/learning/migration/007_learning_techniques.js +86 -0
- package/dist/learning/migration/007_learning_techniques.js.map +1 -0
- package/dist/learning/migration/008_learning_outcomes.d.ts +23 -0
- package/dist/learning/migration/008_learning_outcomes.d.ts.map +1 -0
- package/dist/learning/migration/008_learning_outcomes.js +79 -0
- package/dist/learning/migration/008_learning_outcomes.js.map +1 -0
- package/dist/learning/migration/009_learning_applications.d.ts +25 -0
- package/dist/learning/migration/009_learning_applications.d.ts.map +1 -0
- package/dist/learning/migration/009_learning_applications.js +82 -0
- package/dist/learning/migration/009_learning_applications.js.map +1 -0
- package/dist/learning/migration/010_learning_quarantine.d.ts +22 -0
- package/dist/learning/migration/010_learning_quarantine.d.ts.map +1 -0
- package/dist/learning/migration/010_learning_quarantine.js +78 -0
- package/dist/learning/migration/010_learning_quarantine.js.map +1 -0
- package/dist/learning/migration/011_learning_transfers.d.ts +22 -0
- package/dist/learning/migration/011_learning_transfers.d.ts.map +1 -0
- package/dist/learning/migration/011_learning_transfers.js +77 -0
- package/dist/learning/migration/011_learning_transfers.js.map +1 -0
- package/dist/learning/quarantine/quarantine_manager.d.ts +34 -0
- package/dist/learning/quarantine/quarantine_manager.d.ts.map +1 -0
- package/dist/learning/quarantine/quarantine_manager.js +200 -0
- package/dist/learning/quarantine/quarantine_manager.js.map +1 -0
- package/dist/learning/retirement/retirement_evaluator.d.ts +35 -0
- package/dist/learning/retirement/retirement_evaluator.d.ts.map +1 -0
- package/dist/learning/retirement/retirement_evaluator.js +131 -0
- package/dist/learning/retirement/retirement_evaluator.js.map +1 -0
- package/dist/learning/specialization/over_specialization_detector.d.ts +32 -0
- package/dist/learning/specialization/over_specialization_detector.d.ts.map +1 -0
- package/dist/learning/specialization/over_specialization_detector.js +105 -0
- package/dist/learning/specialization/over_specialization_detector.js.map +1 -0
- package/dist/learning/store/technique_store.d.ts +22 -0
- package/dist/learning/store/technique_store.d.ts.map +1 -0
- package/dist/learning/store/technique_store.js +369 -0
- package/dist/learning/store/technique_store.js.map +1 -0
- package/dist/learning/tracker/effectiveness_tracker.d.ts +26 -0
- package/dist/learning/tracker/effectiveness_tracker.d.ts.map +1 -0
- package/dist/learning/tracker/effectiveness_tracker.js +158 -0
- package/dist/learning/tracker/effectiveness_tracker.js.map +1 -0
- package/dist/learning/transfer/cross_agent_transfer.d.ts +35 -0
- package/dist/learning/transfer/cross_agent_transfer.d.ts.map +1 -0
- package/dist/learning/transfer/cross_agent_transfer.js +245 -0
- package/dist/learning/transfer/cross_agent_transfer.js.map +1 -0
- package/dist/orchestration/artifacts/artifact_store.d.ts +19 -0
- package/dist/orchestration/artifacts/artifact_store.d.ts.map +1 -0
- package/dist/orchestration/artifacts/artifact_store.js +213 -0
- package/dist/orchestration/artifacts/artifact_store.js.map +1 -0
- package/dist/orchestration/artifacts/cascade_walker.d.ts +39 -0
- package/dist/orchestration/artifacts/cascade_walker.d.ts.map +1 -0
- package/dist/orchestration/artifacts/cascade_walker.js +107 -0
- package/dist/orchestration/artifacts/cascade_walker.js.map +1 -0
- package/dist/orchestration/budget/budget_governance.d.ts +20 -0
- package/dist/orchestration/budget/budget_governance.d.ts.map +1 -0
- package/dist/orchestration/budget/budget_governance.js +182 -0
- package/dist/orchestration/budget/budget_governance.js.map +1 -0
- package/dist/orchestration/checkpoints/checkpoint_coordinator.d.ts +22 -0
- package/dist/orchestration/checkpoints/checkpoint_coordinator.d.ts.map +1 -0
- package/dist/orchestration/checkpoints/checkpoint_coordinator.js +252 -0
- package/dist/orchestration/checkpoints/checkpoint_coordinator.js.map +1 -0
- package/dist/orchestration/checkpoints/drift_engine.d.ts +52 -0
- package/dist/orchestration/checkpoints/drift_engine.d.ts.map +1 -0
- package/dist/orchestration/checkpoints/drift_engine.js +126 -0
- package/dist/orchestration/checkpoints/drift_engine.js.map +1 -0
- package/dist/orchestration/compaction/bounded_cognition.d.ts +22 -0
- package/dist/orchestration/compaction/bounded_cognition.d.ts.map +1 -0
- package/dist/orchestration/compaction/bounded_cognition.js +124 -0
- package/dist/orchestration/compaction/bounded_cognition.js.map +1 -0
- package/dist/orchestration/conversation/conversation_manager.d.ts +25 -0
- package/dist/orchestration/conversation/conversation_manager.d.ts.map +1 -0
- package/dist/orchestration/conversation/conversation_manager.js +260 -0
- package/dist/orchestration/conversation/conversation_manager.js.map +1 -0
- package/dist/orchestration/events/event_propagation.d.ts +20 -0
- package/dist/orchestration/events/event_propagation.d.ts.map +1 -0
- package/dist/orchestration/events/event_propagation.js +160 -0
- package/dist/orchestration/events/event_propagation.js.map +1 -0
- package/dist/orchestration/index.d.ts +28 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +147 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/interfaces/orchestration.d.ts +494 -0
- package/dist/orchestration/interfaces/orchestration.d.ts.map +1 -0
- package/dist/orchestration/interfaces/orchestration.js +64 -0
- package/dist/orchestration/interfaces/orchestration.js.map +1 -0
- package/dist/orchestration/migration/003_orchestration.d.ts +27 -0
- package/dist/orchestration/migration/003_orchestration.d.ts.map +1 -0
- package/dist/orchestration/migration/003_orchestration.js +336 -0
- package/dist/orchestration/migration/003_orchestration.js.map +1 -0
- package/dist/orchestration/migration/004_tenant_isolation.d.ts +22 -0
- package/dist/orchestration/migration/004_tenant_isolation.d.ts.map +1 -0
- package/dist/orchestration/migration/004_tenant_isolation.js +179 -0
- package/dist/orchestration/migration/004_tenant_isolation.js.map +1 -0
- package/dist/orchestration/migration/005_immutability_triggers.d.ts +30 -0
- package/dist/orchestration/migration/005_immutability_triggers.d.ts.map +1 -0
- package/dist/orchestration/migration/005_immutability_triggers.js +93 -0
- package/dist/orchestration/migration/005_immutability_triggers.js.map +1 -0
- package/dist/orchestration/migration/006_audit_tombstone.d.ts +26 -0
- package/dist/orchestration/migration/006_audit_tombstone.d.ts.map +1 -0
- package/dist/orchestration/migration/006_audit_tombstone.js +71 -0
- package/dist/orchestration/migration/006_audit_tombstone.js.map +1 -0
- package/dist/orchestration/missions/mission_recovery.d.ts +60 -0
- package/dist/orchestration/missions/mission_recovery.d.ts.map +1 -0
- package/dist/orchestration/missions/mission_recovery.js +251 -0
- package/dist/orchestration/missions/mission_recovery.js.map +1 -0
- package/dist/orchestration/missions/mission_store.d.ts +16 -0
- package/dist/orchestration/missions/mission_store.d.ts.map +1 -0
- package/dist/orchestration/missions/mission_store.js +280 -0
- package/dist/orchestration/missions/mission_store.js.map +1 -0
- package/dist/orchestration/syscalls/create_artifact.d.ts +13 -0
- package/dist/orchestration/syscalls/create_artifact.d.ts.map +1 -0
- package/dist/orchestration/syscalls/create_artifact.js +23 -0
- package/dist/orchestration/syscalls/create_artifact.js.map +1 -0
- package/dist/orchestration/syscalls/emit_event.d.ts +13 -0
- package/dist/orchestration/syscalls/emit_event.d.ts.map +1 -0
- package/dist/orchestration/syscalls/emit_event.js +13 -0
- package/dist/orchestration/syscalls/emit_event.js.map +1 -0
- package/dist/orchestration/syscalls/propose_mission.d.ts +14 -0
- package/dist/orchestration/syscalls/propose_mission.d.ts.map +1 -0
- package/dist/orchestration/syscalls/propose_mission.js +27 -0
- package/dist/orchestration/syscalls/propose_mission.js.map +1 -0
- package/dist/orchestration/syscalls/propose_task_execution.d.ts +13 -0
- package/dist/orchestration/syscalls/propose_task_execution.d.ts.map +1 -0
- package/dist/orchestration/syscalls/propose_task_execution.js +84 -0
- package/dist/orchestration/syscalls/propose_task_execution.js.map +1 -0
- package/dist/orchestration/syscalls/propose_task_graph.d.ts +13 -0
- package/dist/orchestration/syscalls/propose_task_graph.d.ts.map +1 -0
- package/dist/orchestration/syscalls/propose_task_graph.js +22 -0
- package/dist/orchestration/syscalls/propose_task_graph.js.map +1 -0
- package/dist/orchestration/syscalls/read_artifact.d.ts +14 -0
- package/dist/orchestration/syscalls/read_artifact.d.ts.map +1 -0
- package/dist/orchestration/syscalls/read_artifact.js +31 -0
- package/dist/orchestration/syscalls/read_artifact.js.map +1 -0
- package/dist/orchestration/syscalls/request_budget.d.ts +14 -0
- package/dist/orchestration/syscalls/request_budget.d.ts.map +1 -0
- package/dist/orchestration/syscalls/request_budget.js +46 -0
- package/dist/orchestration/syscalls/request_budget.js.map +1 -0
- package/dist/orchestration/syscalls/request_capability.d.ts +13 -0
- package/dist/orchestration/syscalls/request_capability.d.ts.map +1 -0
- package/dist/orchestration/syscalls/request_capability.js +136 -0
- package/dist/orchestration/syscalls/request_capability.js.map +1 -0
- package/dist/orchestration/syscalls/respond_checkpoint.d.ts +12 -0
- package/dist/orchestration/syscalls/respond_checkpoint.d.ts.map +1 -0
- package/dist/orchestration/syscalls/respond_checkpoint.js +12 -0
- package/dist/orchestration/syscalls/respond_checkpoint.js.map +1 -0
- package/dist/orchestration/syscalls/submit_result.d.ts +15 -0
- package/dist/orchestration/syscalls/submit_result.d.ts.map +1 -0
- package/dist/orchestration/syscalls/submit_result.js +97 -0
- package/dist/orchestration/syscalls/submit_result.js.map +1 -0
- package/dist/orchestration/tasks/task_graph.d.ts +26 -0
- package/dist/orchestration/tasks/task_graph.d.ts.map +1 -0
- package/dist/orchestration/tasks/task_graph.js +204 -0
- package/dist/orchestration/tasks/task_graph.js.map +1 -0
- package/dist/orchestration/tasks/task_store.d.ts +18 -0
- package/dist/orchestration/tasks/task_store.d.ts.map +1 -0
- package/dist/orchestration/tasks/task_store.js +99 -0
- package/dist/orchestration/tasks/task_store.js.map +1 -0
- package/dist/reference-agent/artifact_manager.d.ts +119 -0
- package/dist/reference-agent/artifact_manager.d.ts.map +1 -0
- package/dist/reference-agent/artifact_manager.js +149 -0
- package/dist/reference-agent/artifact_manager.js.map +1 -0
- package/dist/reference-agent/checkpoint_handler.d.ts +186 -0
- package/dist/reference-agent/checkpoint_handler.d.ts.map +1 -0
- package/dist/reference-agent/checkpoint_handler.js +423 -0
- package/dist/reference-agent/checkpoint_handler.js.map +1 -0
- package/dist/reference-agent/index.d.ts +43 -0
- package/dist/reference-agent/index.d.ts.map +1 -0
- package/dist/reference-agent/index.js +53 -0
- package/dist/reference-agent/index.js.map +1 -0
- package/dist/reference-agent/mission_planner.d.ts +163 -0
- package/dist/reference-agent/mission_planner.d.ts.map +1 -0
- package/dist/reference-agent/mission_planner.js +375 -0
- package/dist/reference-agent/mission_planner.js.map +1 -0
- package/dist/reference-agent/reference_agent.d.ts +130 -0
- package/dist/reference-agent/reference_agent.d.ts.map +1 -0
- package/dist/reference-agent/reference_agent.js +360 -0
- package/dist/reference-agent/reference_agent.js.map +1 -0
- package/dist/reference-agent/reference_agent.types.d.ts +199 -0
- package/dist/reference-agent/reference_agent.types.d.ts.map +1 -0
- package/dist/reference-agent/reference_agent.types.js +59 -0
- package/dist/reference-agent/reference_agent.types.js.map +1 -0
- package/dist/reference-agent/result_aggregator.d.ts +107 -0
- package/dist/reference-agent/result_aggregator.d.ts.map +1 -0
- package/dist/reference-agent/result_aggregator.js +219 -0
- package/dist/reference-agent/result_aggregator.js.map +1 -0
- package/dist/reference-agent/system_call_client.d.ts +106 -0
- package/dist/reference-agent/system_call_client.d.ts.map +1 -0
- package/dist/reference-agent/system_call_client.js +231 -0
- package/dist/reference-agent/system_call_client.js.map +1 -0
- package/dist/reference-agent/task_executor.d.ts +108 -0
- package/dist/reference-agent/task_executor.d.ts.map +1 -0
- package/dist/reference-agent/task_executor.js +249 -0
- package/dist/reference-agent/task_executor.js.map +1 -0
- package/dist/substrate/accounting/resource_accounting.d.ts +52 -0
- package/dist/substrate/accounting/resource_accounting.d.ts.map +1 -0
- package/dist/substrate/accounting/resource_accounting.js +200 -0
- package/dist/substrate/accounting/resource_accounting.js.map +1 -0
- package/dist/substrate/adapters/capability_registry.d.ts +28 -0
- package/dist/substrate/adapters/capability_registry.d.ts.map +1 -0
- package/dist/substrate/adapters/capability_registry.js +196 -0
- package/dist/substrate/adapters/capability_registry.js.map +1 -0
- package/dist/substrate/gateway/llm_gateway.d.ts +68 -0
- package/dist/substrate/gateway/llm_gateway.d.ts.map +1 -0
- package/dist/substrate/gateway/llm_gateway.js +442 -0
- package/dist/substrate/gateway/llm_gateway.js.map +1 -0
- package/dist/substrate/heartbeat/heartbeat_monitor.d.ts +40 -0
- package/dist/substrate/heartbeat/heartbeat_monitor.d.ts.map +1 -0
- package/dist/substrate/heartbeat/heartbeat_monitor.js +170 -0
- package/dist/substrate/heartbeat/heartbeat_monitor.js.map +1 -0
- package/dist/substrate/index.d.ts +59 -0
- package/dist/substrate/index.d.ts.map +1 -0
- package/dist/substrate/index.js +143 -0
- package/dist/substrate/index.js.map +1 -0
- package/dist/substrate/interfaces/substrate.d.ts +486 -0
- package/dist/substrate/interfaces/substrate.d.ts.map +1 -0
- package/dist/substrate/interfaces/substrate.js +14 -0
- package/dist/substrate/interfaces/substrate.js.map +1 -0
- package/dist/substrate/migration/002_substrate.d.ts +24 -0
- package/dist/substrate/migration/002_substrate.d.ts.map +1 -0
- package/dist/substrate/migration/002_substrate.js +188 -0
- package/dist/substrate/migration/002_substrate.js.map +1 -0
- package/dist/substrate/migration/022_transport_deliberation.d.ts +31 -0
- package/dist/substrate/migration/022_transport_deliberation.d.ts.map +1 -0
- package/dist/substrate/migration/022_transport_deliberation.js +77 -0
- package/dist/substrate/migration/022_transport_deliberation.js.map +1 -0
- package/dist/substrate/replay/replay_engine.d.ts +65 -0
- package/dist/substrate/replay/replay_engine.d.ts.map +1 -0
- package/dist/substrate/replay/replay_engine.js +316 -0
- package/dist/substrate/replay/replay_engine.js.map +1 -0
- package/dist/substrate/scheduler/task_scheduler.d.ts +38 -0
- package/dist/substrate/scheduler/task_scheduler.d.ts.map +1 -0
- package/dist/substrate/scheduler/task_scheduler.js +486 -0
- package/dist/substrate/scheduler/task_scheduler.js.map +1 -0
- package/dist/substrate/transport/adapters/anthropic_adapter.d.ts +57 -0
- package/dist/substrate/transport/adapters/anthropic_adapter.d.ts.map +1 -0
- package/dist/substrate/transport/adapters/anthropic_adapter.js +455 -0
- package/dist/substrate/transport/adapters/anthropic_adapter.js.map +1 -0
- package/dist/substrate/transport/adapters/gemini_adapter.d.ts +86 -0
- package/dist/substrate/transport/adapters/gemini_adapter.d.ts.map +1 -0
- package/dist/substrate/transport/adapters/gemini_adapter.js +456 -0
- package/dist/substrate/transport/adapters/gemini_adapter.js.map +1 -0
- package/dist/substrate/transport/adapters/groq_adapter.d.ts +50 -0
- package/dist/substrate/transport/adapters/groq_adapter.d.ts.map +1 -0
- package/dist/substrate/transport/adapters/groq_adapter.js +179 -0
- package/dist/substrate/transport/adapters/groq_adapter.js.map +1 -0
- package/dist/substrate/transport/adapters/mistral_adapter.d.ts +50 -0
- package/dist/substrate/transport/adapters/mistral_adapter.d.ts.map +1 -0
- package/dist/substrate/transport/adapters/mistral_adapter.js +179 -0
- package/dist/substrate/transport/adapters/mistral_adapter.js.map +1 -0
- package/dist/substrate/transport/adapters/ollama_adapter.d.ts +66 -0
- package/dist/substrate/transport/adapters/ollama_adapter.d.ts.map +1 -0
- package/dist/substrate/transport/adapters/ollama_adapter.js +347 -0
- package/dist/substrate/transport/adapters/ollama_adapter.js.map +1 -0
- package/dist/substrate/transport/adapters/openai_adapter.d.ts +68 -0
- package/dist/substrate/transport/adapters/openai_adapter.d.ts.map +1 -0
- package/dist/substrate/transport/adapters/openai_adapter.js +439 -0
- package/dist/substrate/transport/adapters/openai_adapter.js.map +1 -0
- package/dist/substrate/transport/adapters/openai_compat.d.ts +64 -0
- package/dist/substrate/transport/adapters/openai_compat.d.ts.map +1 -0
- package/dist/substrate/transport/adapters/openai_compat.js +326 -0
- package/dist/substrate/transport/adapters/openai_compat.js.map +1 -0
- package/dist/substrate/transport/index.d.ts +17 -0
- package/dist/substrate/transport/index.d.ts.map +1 -0
- package/dist/substrate/transport/index.js +25 -0
- package/dist/substrate/transport/index.js.map +1 -0
- package/dist/substrate/transport/stream_parser.d.ts +69 -0
- package/dist/substrate/transport/stream_parser.d.ts.map +1 -0
- package/dist/substrate/transport/stream_parser.js +280 -0
- package/dist/substrate/transport/stream_parser.js.map +1 -0
- package/dist/substrate/transport/transport_engine.d.ts +53 -0
- package/dist/substrate/transport/transport_engine.d.ts.map +1 -0
- package/dist/substrate/transport/transport_engine.js +444 -0
- package/dist/substrate/transport/transport_engine.js.map +1 -0
- package/dist/substrate/transport/transport_types.d.ts +207 -0
- package/dist/substrate/transport/transport_types.d.ts.map +1 -0
- package/dist/substrate/transport/transport_types.js +13 -0
- package/dist/substrate/transport/transport_types.js.map +1 -0
- package/dist/substrate/workers/worker_runtime.d.ts +40 -0
- package/dist/substrate/workers/worker_runtime.d.ts.map +1 -0
- package/dist/substrate/workers/worker_runtime.js +294 -0
- package/dist/substrate/workers/worker_runtime.js.map +1 -0
- package/dist/techniques/harness/tgp_harness.d.ts +39 -0
- package/dist/techniques/harness/tgp_harness.d.ts.map +1 -0
- package/dist/techniques/harness/tgp_harness.js +49 -0
- package/dist/techniques/harness/tgp_harness.js.map +1 -0
- package/dist/techniques/interfaces/tgp_types.d.ts +646 -0
- package/dist/techniques/interfaces/tgp_types.d.ts.map +1 -0
- package/dist/techniques/interfaces/tgp_types.js +160 -0
- package/dist/techniques/interfaces/tgp_types.js.map +1 -0
- package/dist/techniques/migration/020_tgp_governance.d.ts +36 -0
- package/dist/techniques/migration/020_tgp_governance.d.ts.map +1 -0
- package/dist/techniques/migration/020_tgp_governance.js +249 -0
- package/dist/techniques/migration/020_tgp_governance.js.map +1 -0
- package/dist/techniques/store/tgp_stores.d.ts +36 -0
- package/dist/techniques/store/tgp_stores.d.ts.map +1 -0
- package/dist/techniques/store/tgp_stores.js +854 -0
- package/dist/techniques/store/tgp_stores.js.map +1 -0
- package/dist/working-memory/harness/wmp_harness.d.ts +43 -0
- package/dist/working-memory/harness/wmp_harness.d.ts.map +1 -0
- package/dist/working-memory/harness/wmp_harness.js +81 -0
- package/dist/working-memory/harness/wmp_harness.js.map +1 -0
- package/dist/working-memory/interfaces/wmp_types.d.ts +635 -0
- package/dist/working-memory/interfaces/wmp_types.d.ts.map +1 -0
- package/dist/working-memory/interfaces/wmp_types.js +144 -0
- package/dist/working-memory/interfaces/wmp_types.js.map +1 -0
- package/dist/working-memory/migration/021_wmp.d.ts +21 -0
- package/dist/working-memory/migration/021_wmp.d.ts.map +1 -0
- package/dist/working-memory/migration/021_wmp.js +139 -0
- package/dist/working-memory/migration/021_wmp.js.map +1 -0
- package/dist/working-memory/stores/wmp_stores.d.ts +28 -0
- package/dist/working-memory/stores/wmp_stores.d.ts.map +1 -0
- package/dist/working-memory/stores/wmp_stores.js +754 -0
- package/dist/working-memory/stores/wmp_stores.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CCP (Claim Protocol) interface types.
|
|
3
|
+
* Spec ref: CCP v2.0 Design Source, Architecture Freeze CF-05/CF-12/CF-13
|
|
4
|
+
*
|
|
5
|
+
* Phase: v3.3.0 — Claim Protocol Truth Model
|
|
6
|
+
* Status: FROZEN — interfaces defined before implementation.
|
|
7
|
+
*
|
|
8
|
+
* Implements: All TypeScript types for the Claim subsystem:
|
|
9
|
+
* §6 (Claim schema), §7 (Evidence model), §8 (Relationship model),
|
|
10
|
+
* §9 (Artifact junction), §10 (System calls SC-11/SC-12/SC-13),
|
|
11
|
+
* §11 (SC-4/SC-9 amendments), §12 (Canonical admission),
|
|
12
|
+
* §13 (Retention), §14 (Events),
|
|
13
|
+
* CF-05 (Grounding), CF-12 (Object Mutability), CF-13 (Audit Sufficiency)
|
|
14
|
+
*
|
|
15
|
+
* THE KERNEL NEVER REASONS. The kernel stores, validates structure, links,
|
|
16
|
+
* and audits. CCP extends this to knowledge. Claims make knowledge a
|
|
17
|
+
* first-class citizen without making Limen an intelligent system.
|
|
18
|
+
*/
|
|
19
|
+
import type { TenantId, AgentId, MissionId, TaskId, ArtifactId, Result, OperationContext } from '../../kernel/interfaces/index.js';
|
|
20
|
+
import type { DatabaseConnection } from '../../kernel/interfaces/database.js';
|
|
21
|
+
import type { TraceEmitter } from '../../kernel/interfaces/trace.js';
|
|
22
|
+
/** §6: Claim identifier — unique across all tenants */
|
|
23
|
+
export type ClaimId = string & {
|
|
24
|
+
readonly __brand: 'ClaimId';
|
|
25
|
+
};
|
|
26
|
+
/** §8: Relationship identifier — unique across all tenants */
|
|
27
|
+
export type RelationshipId = string & {
|
|
28
|
+
readonly __brand: 'RelationshipId';
|
|
29
|
+
};
|
|
30
|
+
/** §6: Claim object value types — determines validation rules */
|
|
31
|
+
export type ObjectType = 'string' | 'number' | 'boolean' | 'date' | 'json';
|
|
32
|
+
/**
|
|
33
|
+
* §7: Evidence source types — polymorphic FK discriminator.
|
|
34
|
+
* Each type maps to a different target table for FK validation:
|
|
35
|
+
* 'memory' → memory store (NOT IN v3.2 — forward obligation)
|
|
36
|
+
* 'artifact' → core_artifacts (ArtifactStore)
|
|
37
|
+
* 'claim' → claim_assertions (ClaimStore — self-referential)
|
|
38
|
+
* 'capability_result' → capability result storage (NOT IN v3.2 — forward obligation)
|
|
39
|
+
*/
|
|
40
|
+
export type EvidenceType = 'memory' | 'artifact' | 'claim' | 'capability_result';
|
|
41
|
+
/** §8: Relationship types — directed edges between claims */
|
|
42
|
+
export type RelationshipType = 'supports' | 'contradicts' | 'supersedes' | 'derived_from';
|
|
43
|
+
/** §10.3: Archive mode for queries — controls visibility of archived claims */
|
|
44
|
+
export type ArchiveMode = 'exclude' | 'include' | 'only';
|
|
45
|
+
/** CF-05: Grounding mode — how claim truth is anchored */
|
|
46
|
+
export type GroundingMode = 'evidence_path' | 'runtime_witness';
|
|
47
|
+
/** §6: Claim epistemic status — one forward transition only */
|
|
48
|
+
export type ClaimStatus = 'active' | 'retracted';
|
|
49
|
+
/**
|
|
50
|
+
* §7, AMB-CCP-01: Evidence source lifecycle state.
|
|
51
|
+
* Initial value 'live'. Updated to 'tombstoned' when source is purged.
|
|
52
|
+
*/
|
|
53
|
+
export type SourceState = 'live' | 'tombstoned';
|
|
54
|
+
/**
|
|
55
|
+
* §6, CCP-I1: Claim — the 9th core object in Limen.
|
|
56
|
+
*
|
|
57
|
+
* All content fields frozen at creation (CCP-I1). Two mutable fields:
|
|
58
|
+
* - status: one forward transition (active → retracted), audited atomically per I-03
|
|
59
|
+
* - archived: forward-only (false → true), audited atomically per I-03
|
|
60
|
+
*
|
|
61
|
+
* CF-12: Immutable content, governed status transitions.
|
|
62
|
+
*/
|
|
63
|
+
export interface Claim {
|
|
64
|
+
/** §6: Unique identifier */
|
|
65
|
+
readonly id: ClaimId;
|
|
66
|
+
/** §6, AMB-CCP-02: Tenant scope — always derived from OperationContext via SC-11 */
|
|
67
|
+
readonly tenantId: TenantId | null;
|
|
68
|
+
/** §6: Subject URN — entity:<type>:<identifier>, case-sensitive */
|
|
69
|
+
readonly subject: string;
|
|
70
|
+
/** §6: Predicate namespace — <domain>.<property>, reserved: system.*, lifecycle.* */
|
|
71
|
+
readonly predicate: string;
|
|
72
|
+
/** §6: Object value with declared type */
|
|
73
|
+
readonly object: {
|
|
74
|
+
readonly type: ObjectType;
|
|
75
|
+
readonly value: unknown;
|
|
76
|
+
};
|
|
77
|
+
/** §6: Confidence score [0.0, 1.0] inclusive */
|
|
78
|
+
readonly confidence: number;
|
|
79
|
+
/** §6: Temporal anchor — independent of createdAt */
|
|
80
|
+
readonly validAt: string;
|
|
81
|
+
/** §6: Agent that asserted this claim */
|
|
82
|
+
readonly sourceAgentId: AgentId;
|
|
83
|
+
/** §6: Mission context — set from SC-11 input.missionId */
|
|
84
|
+
readonly sourceMissionId: MissionId | null;
|
|
85
|
+
/** §6: Task context — set from SC-11 input.taskId */
|
|
86
|
+
readonly sourceTaskId: TaskId | null;
|
|
87
|
+
/** §6, CF-05: Grounding mode used at assertion — immutable */
|
|
88
|
+
readonly groundingMode: GroundingMode;
|
|
89
|
+
/** §6, CF-05: Runtime witness data — present when groundingMode='runtime_witness', immutable */
|
|
90
|
+
readonly runtimeWitness: RuntimeWitnessInput | null;
|
|
91
|
+
/** §6, CCP-I2: Epistemic status — mutable, one forward transition */
|
|
92
|
+
readonly status: ClaimStatus;
|
|
93
|
+
/** §6, CCP-I11: Archive flag — forward-only (false → true) */
|
|
94
|
+
readonly archived: boolean;
|
|
95
|
+
/** §6: Creation timestamp */
|
|
96
|
+
readonly createdAt: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* §13, CCP-I10: Tombstone identity preservation.
|
|
100
|
+
* Hard deletion of claim identity never permitted. Content fields NULLed.
|
|
101
|
+
* id, tenantId, status, archived, purgedAt, purgeReason survive.
|
|
102
|
+
*/
|
|
103
|
+
export interface ClaimTombstone {
|
|
104
|
+
readonly id: ClaimId;
|
|
105
|
+
readonly tenantId: TenantId | null;
|
|
106
|
+
readonly status: ClaimStatus;
|
|
107
|
+
readonly archived: boolean;
|
|
108
|
+
readonly purgedAt: string;
|
|
109
|
+
readonly purgeReason: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* §7, CCP-I5: Evidence reference — provenance chain link.
|
|
113
|
+
* Polymorphic FK: type determines target table, id is the foreign key.
|
|
114
|
+
* Immutable after creation. sourceState tracks source availability.
|
|
115
|
+
* AMB-CCP-01: sourceState is lifecycle metadata, not content mutation.
|
|
116
|
+
*/
|
|
117
|
+
export interface ClaimEvidence {
|
|
118
|
+
/** §7: Owning claim */
|
|
119
|
+
readonly claimId: ClaimId;
|
|
120
|
+
/** §7: Source type discriminator */
|
|
121
|
+
readonly evidenceType: EvidenceType;
|
|
122
|
+
/** §7: Source identifier (foreign key in target table) */
|
|
123
|
+
readonly evidenceId: string;
|
|
124
|
+
/** §7, AMB-CCP-01: Source lifecycle — 'live' at creation, 'tombstoned' on purge */
|
|
125
|
+
readonly sourceState: SourceState;
|
|
126
|
+
/** §7: Reference creation timestamp */
|
|
127
|
+
readonly createdAt: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* §8, CCP-I6: Directed relationship between claims.
|
|
131
|
+
* Both claims must exist + same tenant. fromClaimId must be active.
|
|
132
|
+
* toClaimId may be any status (audit continuity). No self-reference.
|
|
133
|
+
* Append-only — no modification, no deletion.
|
|
134
|
+
*/
|
|
135
|
+
export interface ClaimRelationship {
|
|
136
|
+
/** §8: Relationship identifier */
|
|
137
|
+
readonly id: RelationshipId;
|
|
138
|
+
/** §8: Tenant scope */
|
|
139
|
+
readonly tenantId: TenantId | null;
|
|
140
|
+
/** §8: Source claim (must be active) */
|
|
141
|
+
readonly fromClaimId: ClaimId;
|
|
142
|
+
/** §8: Target claim (any status) */
|
|
143
|
+
readonly toClaimId: ClaimId;
|
|
144
|
+
/** §8: Relationship type */
|
|
145
|
+
readonly type: RelationshipType;
|
|
146
|
+
/** §8: Agent that declared this relationship */
|
|
147
|
+
readonly declaredByAgentId: AgentId;
|
|
148
|
+
/** §8: Mission context */
|
|
149
|
+
readonly missionId: MissionId;
|
|
150
|
+
/** §8: Creation timestamp */
|
|
151
|
+
readonly createdAt: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* §9, AMB-CCP-04: Claim-artifact junction row.
|
|
155
|
+
* Created via two paths:
|
|
156
|
+
* 1. SC-4 create_artifact with claims field
|
|
157
|
+
* 2. SC-11 assert_claim with evidenceType='artifact'
|
|
158
|
+
* Both paths create junction rows to enable "what claims reference this artifact?" queries.
|
|
159
|
+
*/
|
|
160
|
+
export interface ClaimArtifactRef {
|
|
161
|
+
/** §9: Referenced artifact */
|
|
162
|
+
readonly artifactId: ArtifactId;
|
|
163
|
+
/** §9: Referencing claim */
|
|
164
|
+
readonly claimId: ClaimId;
|
|
165
|
+
/** §9: Creation timestamp */
|
|
166
|
+
readonly createdAt: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* §7: Evidence reference for claim creation.
|
|
170
|
+
* Type + id pair validated via polymorphic FK lookup.
|
|
171
|
+
*/
|
|
172
|
+
export interface EvidenceRef {
|
|
173
|
+
/** §7: Source type — determines validation target */
|
|
174
|
+
readonly type: EvidenceType;
|
|
175
|
+
/** §7: Source identifier — FK in type's target table */
|
|
176
|
+
readonly id: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* §10.1, SC-11: Claim creation input.
|
|
180
|
+
* Derived from CCP SC-11 with CF-05 grounding extension.
|
|
181
|
+
*/
|
|
182
|
+
export interface ClaimCreateInput {
|
|
183
|
+
/** §6: Subject URN — entity:<type>:<identifier>, strict 3-segment */
|
|
184
|
+
readonly subject: string;
|
|
185
|
+
/** §6: Predicate — <domain>.<property>, strict 2-segment, reserved: system.*, lifecycle.* */
|
|
186
|
+
readonly predicate: string;
|
|
187
|
+
/** §6: Object value with declared type */
|
|
188
|
+
readonly object: {
|
|
189
|
+
readonly type: ObjectType;
|
|
190
|
+
readonly value: unknown;
|
|
191
|
+
};
|
|
192
|
+
/** §10.1: Confidence score [0.0, 1.0] inclusive */
|
|
193
|
+
readonly confidence: number;
|
|
194
|
+
/** §6: Temporal anchor — ISO 8601 strict, independent of createdAt */
|
|
195
|
+
readonly validAt: string;
|
|
196
|
+
/** §10.1: Mission context — maps to sourceMissionId */
|
|
197
|
+
readonly missionId: MissionId;
|
|
198
|
+
/** §10.1: Task context — maps to sourceTaskId */
|
|
199
|
+
readonly taskId: TaskId | null;
|
|
200
|
+
/** §7, CCP-I5: Evidence references — min 1 for evidence-path, min 0 for runtime-witness */
|
|
201
|
+
readonly evidenceRefs: readonly EvidenceRef[];
|
|
202
|
+
/** CF-05: Grounding mode — how claim truth is anchored */
|
|
203
|
+
readonly groundingMode: GroundingMode;
|
|
204
|
+
/** CF-05, §6: Runtime witness data — required when groundingMode = 'runtime_witness' */
|
|
205
|
+
readonly runtimeWitness?: RuntimeWitnessInput;
|
|
206
|
+
/** DC-CCP-307: Optional idempotency key for duplicate detection on retry */
|
|
207
|
+
readonly idempotencyKey?: ClaimIdempotencyInput;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* §10.4: Retraction input.
|
|
211
|
+
* Authorization derived from OperationContext (sourceAgentId or admin).
|
|
212
|
+
*/
|
|
213
|
+
export interface RetractClaimInput {
|
|
214
|
+
/** §14.4: Target claim */
|
|
215
|
+
readonly claimId: ClaimId;
|
|
216
|
+
/** §14.4: Required reason for retraction (non-empty) */
|
|
217
|
+
readonly reason: string;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* SC-12: Relationship creation input.
|
|
221
|
+
*/
|
|
222
|
+
export interface RelationshipCreateInput {
|
|
223
|
+
/** SC-12: Source claim (must be active) */
|
|
224
|
+
readonly fromClaimId: ClaimId;
|
|
225
|
+
/** SC-12: Target claim (any status) */
|
|
226
|
+
readonly toClaimId: ClaimId;
|
|
227
|
+
/** SC-12: Relationship type */
|
|
228
|
+
readonly type: RelationshipType;
|
|
229
|
+
/** SC-12: Mission context */
|
|
230
|
+
readonly missionId: MissionId;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* §10.3, SC-13: Claim query input.
|
|
234
|
+
* status=null → unfiltered (returns both active and retracted).
|
|
235
|
+
* Filters support trailing wildcard (*) for prefix matching.
|
|
236
|
+
*/
|
|
237
|
+
export interface ClaimQueryInput {
|
|
238
|
+
/** SC-13: Subject filter — exact match or trailing wildcard ("entity:company:*") */
|
|
239
|
+
readonly subject?: string | null;
|
|
240
|
+
/** SC-13: Predicate filter — exact match or trailing wildcard ("financial.*") */
|
|
241
|
+
readonly predicate?: string | null;
|
|
242
|
+
/** SC-13, AMB-10: Status filter — null = unfiltered, default 'active' when omitted */
|
|
243
|
+
readonly status?: ClaimStatus | null;
|
|
244
|
+
/** SC-13: Minimum confidence threshold */
|
|
245
|
+
readonly minConfidence?: number | null;
|
|
246
|
+
/** SC-13: Source agent filter */
|
|
247
|
+
readonly sourceAgentId?: AgentId | null;
|
|
248
|
+
/** SC-13: Source mission filter */
|
|
249
|
+
readonly sourceMissionId?: MissionId | null;
|
|
250
|
+
/** SC-13: Temporal range — from (inclusive) */
|
|
251
|
+
readonly validAtFrom?: string | null;
|
|
252
|
+
/** SC-13: Temporal range — to (inclusive) */
|
|
253
|
+
readonly validAtTo?: string | null;
|
|
254
|
+
/** §14.7: Archive mode — 'exclude' (default), 'include', 'only' */
|
|
255
|
+
readonly archiveMode?: ArchiveMode;
|
|
256
|
+
/** SC-13: Include evidence array per claim */
|
|
257
|
+
readonly includeEvidence?: boolean;
|
|
258
|
+
/** SC-13: Include relationships array per claim */
|
|
259
|
+
readonly includeRelationships?: boolean;
|
|
260
|
+
/** SC-13: Maximum results (max CLAIM_QUERY_MAX_LIMIT) */
|
|
261
|
+
readonly limit?: number;
|
|
262
|
+
/** SC-13: Pagination offset */
|
|
263
|
+
readonly offset?: number;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* §11, SC-4 Amendment: Claim input for artifact creation.
|
|
267
|
+
* Subset of ClaimCreateInput WITHOUT missionId/taskId,
|
|
268
|
+
* which are inherited from the SC-4 call context.
|
|
269
|
+
* groundingMode is per-claim (not inherited from context) per AMB-CCP-03.
|
|
270
|
+
*/
|
|
271
|
+
export interface ClaimInput {
|
|
272
|
+
/** §6: Subject URN */
|
|
273
|
+
readonly subject: string;
|
|
274
|
+
/** §6: Predicate namespace */
|
|
275
|
+
readonly predicate: string;
|
|
276
|
+
/** §6: Object value */
|
|
277
|
+
readonly object: {
|
|
278
|
+
readonly type: ObjectType;
|
|
279
|
+
readonly value: unknown;
|
|
280
|
+
};
|
|
281
|
+
/** §10.1: Confidence [0.0, 1.0] */
|
|
282
|
+
readonly confidence: number;
|
|
283
|
+
/** §6: Temporal anchor */
|
|
284
|
+
readonly validAt: string;
|
|
285
|
+
/** §7: Evidence references (artifact evidence auto-added) */
|
|
286
|
+
readonly evidenceRefs: readonly EvidenceRef[];
|
|
287
|
+
/** CF-05: Grounding mode — per-claim, not inherited from SC-4 context */
|
|
288
|
+
readonly groundingMode: GroundingMode;
|
|
289
|
+
/** CF-05: Runtime witness — required when groundingMode='runtime_witness' */
|
|
290
|
+
readonly runtimeWitness?: RuntimeWitnessInput;
|
|
291
|
+
}
|
|
292
|
+
/** SC-11: assert_claim output */
|
|
293
|
+
export interface AssertClaimOutput {
|
|
294
|
+
/** The created claim */
|
|
295
|
+
readonly claim: Claim;
|
|
296
|
+
/** CF-05: Grounding result */
|
|
297
|
+
readonly grounding: GroundingResult;
|
|
298
|
+
}
|
|
299
|
+
/** SC-12: relate_claims output */
|
|
300
|
+
export interface RelateClaimsOutput {
|
|
301
|
+
/** The created relationship */
|
|
302
|
+
readonly relationship: ClaimRelationship;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* SC-13: query_claims result — paginated.
|
|
306
|
+
*/
|
|
307
|
+
export interface ClaimQueryResult {
|
|
308
|
+
/** Matching claims */
|
|
309
|
+
readonly claims: readonly ClaimQueryResultItem[];
|
|
310
|
+
/** Total matching count (before pagination) */
|
|
311
|
+
readonly total: number;
|
|
312
|
+
/** Whether more results exist beyond offset+limit */
|
|
313
|
+
readonly hasMore: boolean;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* SC-13: Individual claim in query results.
|
|
317
|
+
* Includes optional evidence/relationships and computed properties.
|
|
318
|
+
*/
|
|
319
|
+
export interface ClaimQueryResultItem {
|
|
320
|
+
/** The claim */
|
|
321
|
+
readonly claim: Claim;
|
|
322
|
+
/** Optional evidence array (when includeEvidence=true) */
|
|
323
|
+
readonly evidence?: readonly ClaimEvidence[];
|
|
324
|
+
/** Optional relationships array (when includeRelationships=true) */
|
|
325
|
+
readonly relationships?: readonly ClaimRelationship[];
|
|
326
|
+
/** §14.7: Computed — claim has been superseded by a relationship */
|
|
327
|
+
readonly superseded: boolean;
|
|
328
|
+
/** §14.7: Computed — claim has been contradicted by a relationship */
|
|
329
|
+
readonly disputed: boolean;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* CF-05, CCP-I4: Grounding evaluation result.
|
|
333
|
+
* Contains proof structure for audit sufficiency (CCP-I9).
|
|
334
|
+
*/
|
|
335
|
+
export interface GroundingResult {
|
|
336
|
+
/** CF-05: Whether grounding succeeded */
|
|
337
|
+
readonly grounded: boolean;
|
|
338
|
+
/** CF-05: Mode used for grounding */
|
|
339
|
+
readonly mode: GroundingMode;
|
|
340
|
+
/** CF-05: Traversal proof for evidence-path mode */
|
|
341
|
+
readonly traversalPath?: GroundingTraversalPath;
|
|
342
|
+
/** CF-05: Witness binding for runtime-witness mode */
|
|
343
|
+
readonly witnessBinding?: RuntimeWitnessInput;
|
|
344
|
+
/** CF-05: Error reason when grounding fails */
|
|
345
|
+
readonly failureReason?: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* CF-05: Evidence-path traversal proof.
|
|
349
|
+
* Records the path from claim to non-claim anchor.
|
|
350
|
+
*/
|
|
351
|
+
export interface GroundingTraversalPath {
|
|
352
|
+
/** Number of hops to anchor */
|
|
353
|
+
readonly hops: number;
|
|
354
|
+
/** Maximum hops allowed */
|
|
355
|
+
readonly maxHops: number;
|
|
356
|
+
/** Ordered path: each step is (claimId, evidenceType, evidenceId) */
|
|
357
|
+
readonly steps: readonly GroundingStep[];
|
|
358
|
+
/** The terminal anchor (non-claim evidence) */
|
|
359
|
+
readonly anchor: {
|
|
360
|
+
readonly type: EvidenceType;
|
|
361
|
+
readonly id: string;
|
|
362
|
+
} | null;
|
|
363
|
+
}
|
|
364
|
+
/** CF-05: Single step in grounding traversal */
|
|
365
|
+
export interface GroundingStep {
|
|
366
|
+
/** Claim at this level */
|
|
367
|
+
readonly claimId: ClaimId;
|
|
368
|
+
/** Evidence type at this step */
|
|
369
|
+
readonly evidenceType: EvidenceType;
|
|
370
|
+
/** Evidence ID at this step */
|
|
371
|
+
readonly evidenceId: string;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* §6, CF-05: Runtime witness data — structured witness binding.
|
|
375
|
+
* Required when groundingMode='runtime_witness'.
|
|
376
|
+
* Witness data is immutable once asserted (CCP-I1).
|
|
377
|
+
* Must be replay-stably bound per CF-05 — deterministically serializable.
|
|
378
|
+
*/
|
|
379
|
+
export interface RuntimeWitnessInput {
|
|
380
|
+
/** CF-05: Discriminator for the witness source type */
|
|
381
|
+
readonly witnessType: string;
|
|
382
|
+
/** CF-05: Key-value pairs of observed runtime state values */
|
|
383
|
+
readonly witnessedValues: Record<string, unknown>;
|
|
384
|
+
/** CF-05: When the witness observation was recorded (ISO 8601) */
|
|
385
|
+
readonly witnessTimestamp: string;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Polymorphic FK validation interface for evidence sources.
|
|
389
|
+
* CCP needs to validate that evidence references point to existing entities.
|
|
390
|
+
*
|
|
391
|
+
* v3.2 STATUS:
|
|
392
|
+
* - 'artifact' → ArtifactStore exists (core_artifacts table)
|
|
393
|
+
* - 'claim' → ClaimStore self-referential (claim_assertions table)
|
|
394
|
+
* - 'memory' → NO STORE EXISTS IN v3.2 (forward obligation)
|
|
395
|
+
* - 'capability_result' → NO PERSISTENCE IN v3.2 (forward obligation)
|
|
396
|
+
*/
|
|
397
|
+
export interface EvidenceSourceValidator {
|
|
398
|
+
/**
|
|
399
|
+
* Validate that an evidence source exists and is accessible.
|
|
400
|
+
* Returns ok:true if source exists within the tenant scope.
|
|
401
|
+
* Returns error with EVIDENCE_NOT_FOUND if source doesn't exist.
|
|
402
|
+
* Returns error with EVIDENCE_CROSS_TENANT if source is in a different tenant.
|
|
403
|
+
*
|
|
404
|
+
* @param taskId - Optional task context for memory evidence scoping.
|
|
405
|
+
* Memory evidence requires task context to scope WM lookups.
|
|
406
|
+
* Absent for non-memory evidence types (ignored).
|
|
407
|
+
* Sprint 1 additive parameter — existing callers unaffected.
|
|
408
|
+
*/
|
|
409
|
+
exists(conn: DatabaseConnection, evidenceType: EvidenceType, evidenceId: string, tenantId: TenantId | null, taskId?: string | null): Result<boolean>;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* §14.1: Claim store — primary CRUD for claims.
|
|
413
|
+
* All methods accept DatabaseConnection as first parameter.
|
|
414
|
+
*/
|
|
415
|
+
export interface ClaimStore {
|
|
416
|
+
/** SC-11: Create a claim with validated fields and evidence */
|
|
417
|
+
create(conn: DatabaseConnection, ctx: OperationContext, input: ClaimCreateInput): Result<Claim>;
|
|
418
|
+
/** §14.1: Get a claim by ID within tenant scope */
|
|
419
|
+
get(conn: DatabaseConnection, claimId: ClaimId, tenantId: TenantId | null): Result<Claim>;
|
|
420
|
+
/** §14.4: Retract a claim (active → retracted, audited atomically per I-03) */
|
|
421
|
+
retract(conn: DatabaseConnection, ctx: OperationContext, claimId: ClaimId, reason: string): Result<void>;
|
|
422
|
+
/** §14.4: Archive a claim (archived = false → true, audited per I-03) */
|
|
423
|
+
archive(conn: DatabaseConnection, claimId: ClaimId, tenantId: TenantId | null): Result<void>;
|
|
424
|
+
/** §14.8: Tombstone a claim — NULL content fields, preserve identity */
|
|
425
|
+
tombstone(conn: DatabaseConnection, claimId: ClaimId, tenantId: TenantId | null, reason: string): Result<void>;
|
|
426
|
+
/** SC-13: Query claims with filters, pagination, computed properties */
|
|
427
|
+
query(conn: DatabaseConnection, tenantId: TenantId | null, filters: ClaimQueryInput): Result<ClaimQueryResult>;
|
|
428
|
+
/**
|
|
429
|
+
* DC-CCP-704, Binding 7: Get a claim that has been tombstoned — returns typed ClaimTombstone.
|
|
430
|
+
* Only identity + metadata fields survive tombstoning (CCP-I10). Content fields are NULLed.
|
|
431
|
+
* This method MUST return ClaimTombstone, never Claim, for tombstoned records.
|
|
432
|
+
* Prevents accidental content retrieval from purged claims.
|
|
433
|
+
*/
|
|
434
|
+
getAsTombstone(conn: DatabaseConnection, claimId: ClaimId, tenantId: TenantId | null): Result<ClaimTombstone | null>;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* §14.3, I-30: Evidence reference store.
|
|
438
|
+
* Append-only for reference identity fields.
|
|
439
|
+
* AMB-12: sourceState is lifecycle metadata, mutable.
|
|
440
|
+
*/
|
|
441
|
+
export interface ClaimEvidenceStore {
|
|
442
|
+
/** §14.3: Create evidence references for a claim (batch insert) */
|
|
443
|
+
createBatch(conn: DatabaseConnection, claimId: ClaimId, evidenceRefs: readonly EvidenceRef[]): Result<void>;
|
|
444
|
+
/** §14.3: Get all evidence for a claim */
|
|
445
|
+
getByClaimId(conn: DatabaseConnection, claimId: ClaimId): Result<readonly ClaimEvidence[]>;
|
|
446
|
+
/** §14.8: Mark evidence rows as tombstoned when source is purged */
|
|
447
|
+
markSourceTombstoned(conn: DatabaseConnection, evidenceType: EvidenceType, evidenceId: string): Result<number>;
|
|
448
|
+
/** §14.3: Get evidence rows referencing a specific source */
|
|
449
|
+
getBySourceId(conn: DatabaseConnection, evidenceType: EvidenceType, evidenceId: string): Result<readonly ClaimEvidence[]>;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* §14.5, I-31: Relationship store.
|
|
453
|
+
* Append-only — no modification, no deletion.
|
|
454
|
+
*/
|
|
455
|
+
export interface ClaimRelationshipStore {
|
|
456
|
+
/** SC-12: Create a relationship between claims */
|
|
457
|
+
create(conn: DatabaseConnection, ctx: OperationContext, input: RelationshipCreateInput): Result<ClaimRelationship>;
|
|
458
|
+
/** §14.5: Get relationships for a claim by direction */
|
|
459
|
+
getByClaimId(conn: DatabaseConnection, claimId: ClaimId, direction: 'from' | 'to'): Result<readonly ClaimRelationship[]>;
|
|
460
|
+
/** §14.5: Get relationships for a claim filtered by type and direction */
|
|
461
|
+
getByType(conn: DatabaseConnection, claimId: ClaimId, type: RelationshipType, direction: 'from' | 'to'): Result<readonly ClaimRelationship[]>;
|
|
462
|
+
/** I-31: Count outgoing relationships (for limit enforcement) */
|
|
463
|
+
countOutgoing(conn: DatabaseConnection, claimId: ClaimId): Result<number>;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* §14.6: Claim-artifact junction store.
|
|
467
|
+
* Both paths create junction rows (AMB-04).
|
|
468
|
+
*/
|
|
469
|
+
export interface ClaimArtifactRefStore {
|
|
470
|
+
/** §14.6: Create junction rows for artifact-claim associations (batch) */
|
|
471
|
+
createBatch(conn: DatabaseConnection, artifactId: ArtifactId, claimIds: readonly ClaimId[]): Result<void>;
|
|
472
|
+
/** §14.6: Get all claim IDs referencing an artifact */
|
|
473
|
+
getByArtifactId(conn: DatabaseConnection, artifactId: ArtifactId): Result<readonly ClaimId[]>;
|
|
474
|
+
/** §14.6: Get all artifact IDs referenced by a claim */
|
|
475
|
+
getByClaimId(conn: DatabaseConnection, claimId: ClaimId): Result<readonly ArtifactId[]>;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* SC-11: assert_claim handler.
|
|
479
|
+
* Orchestrates: validation → grounding → store → evidence → audit → event.
|
|
480
|
+
*/
|
|
481
|
+
export interface AssertClaimHandler {
|
|
482
|
+
execute(conn: DatabaseConnection, ctx: OperationContext, input: ClaimCreateInput): Result<AssertClaimOutput>;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* §14.4: retract_claim handler.
|
|
486
|
+
* Orchestrates: authorization → validation → retract → audit → events.
|
|
487
|
+
* "Only the source agent or a user with admin role can retract."
|
|
488
|
+
*/
|
|
489
|
+
export interface RetractClaimHandler {
|
|
490
|
+
execute(conn: DatabaseConnection, ctx: OperationContext, input: RetractClaimInput): Result<void>;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* SC-12: relate_claims handler.
|
|
494
|
+
* Orchestrates: validation → store → audit → event.
|
|
495
|
+
*/
|
|
496
|
+
export interface RelateClaimsHandler {
|
|
497
|
+
execute(conn: DatabaseConnection, ctx: OperationContext, input: RelationshipCreateInput): Result<RelateClaimsOutput>;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* SC-13: query_claims handler.
|
|
501
|
+
* Orchestrates: validation → query → computed properties → pagination.
|
|
502
|
+
*/
|
|
503
|
+
export interface QueryClaimsHandler {
|
|
504
|
+
execute(conn: DatabaseConnection, ctx: OperationContext, input: ClaimQueryInput): Result<ClaimQueryResult>;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* CF-05: Grounding validator.
|
|
508
|
+
* Evidence-path: validates depth within N hops via visited-set traversal.
|
|
509
|
+
* Runtime-witness: validates witness structure and binds to audit record.
|
|
510
|
+
*/
|
|
511
|
+
export interface GroundingValidator {
|
|
512
|
+
validate(conn: DatabaseConnection, claimId: ClaimId, evidenceRefs: readonly EvidenceRef[], mode: GroundingMode, maxHops: number, runtimeWitness?: RuntimeWitnessInput): Result<GroundingResult>;
|
|
513
|
+
/**
|
|
514
|
+
* DC-CCP-117 (v1.1 CRITICAL): Validate with intermediate claim status check.
|
|
515
|
+
* During evidence-path traversal, rejects if any intermediate claim in the
|
|
516
|
+
* grounding chain has been retracted. Prevents epistemic contamination —
|
|
517
|
+
* new claims must not be grounded through retracted evidence chains.
|
|
518
|
+
*
|
|
519
|
+
* @param conn - Database connection
|
|
520
|
+
* @param claimId - The claim being grounded
|
|
521
|
+
* @param evidenceRefs - Evidence references to traverse
|
|
522
|
+
* @param mode - Grounding mode
|
|
523
|
+
* @param maxHops - Maximum traversal depth
|
|
524
|
+
* @param runtimeWitness - Optional witness for runtime_witness mode
|
|
525
|
+
* @returns GroundingResult with failure if intermediate claim is retracted
|
|
526
|
+
*/
|
|
527
|
+
validateWithRetractedCheck(conn: DatabaseConnection, claimId: ClaimId, evidenceRefs: readonly EvidenceRef[], mode: GroundingMode, maxHops: number, runtimeWitness?: RuntimeWitnessInput): Result<GroundingResult>;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* §14, C-07: ClaimSystem facade composing all CCP subsystems.
|
|
531
|
+
* Object.freeze'd per C-07. Extends Limen's governance layer.
|
|
532
|
+
*/
|
|
533
|
+
export interface ClaimSystem {
|
|
534
|
+
/** §14.1: Claim store */
|
|
535
|
+
readonly store: ClaimStore;
|
|
536
|
+
/** §14.3: Evidence reference store */
|
|
537
|
+
readonly evidence: ClaimEvidenceStore;
|
|
538
|
+
/** §14.5: Relationship store */
|
|
539
|
+
readonly relationships: ClaimRelationshipStore;
|
|
540
|
+
/** §14.6: Artifact-claim junction store */
|
|
541
|
+
readonly artifactRefs: ClaimArtifactRefStore;
|
|
542
|
+
/** SC-11: Assert claim handler */
|
|
543
|
+
readonly assertClaim: AssertClaimHandler;
|
|
544
|
+
/** §14.4: Retract claim handler */
|
|
545
|
+
readonly retractClaim: RetractClaimHandler;
|
|
546
|
+
/** SC-12: Relate claims handler */
|
|
547
|
+
readonly relateClaims: RelateClaimsHandler;
|
|
548
|
+
/** SC-13: Query claims handler */
|
|
549
|
+
readonly queryClaims: QueryClaimsHandler;
|
|
550
|
+
/** CF-05: Grounding validator */
|
|
551
|
+
readonly grounding: GroundingValidator;
|
|
552
|
+
/** Binding 3, DC-CCP-205: Lifecycle state projection */
|
|
553
|
+
readonly lifecycleProjection: ClaimLifecycleProjection;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Dependencies required by the ClaimSystem factory.
|
|
557
|
+
* Includes existing v3.2 stores for polymorphic FK validation.
|
|
558
|
+
*/
|
|
559
|
+
export interface ClaimSystemDeps {
|
|
560
|
+
/** Evidence source validation — polymorphic FK lookup */
|
|
561
|
+
readonly evidenceValidator: EvidenceSourceValidator;
|
|
562
|
+
/** Audit trail for I-03 atomic auditing */
|
|
563
|
+
readonly audit: import('../../kernel/interfaces/audit.js').AuditTrail;
|
|
564
|
+
/** Event bus for event emission */
|
|
565
|
+
readonly eventBus: import('../../kernel/interfaces/events.js').EventBus;
|
|
566
|
+
/** Binding 14, DC-CCP-501/502/503/511/512/513/514: Constitutional trace emission for 4 CCP trace events */
|
|
567
|
+
readonly traceEmitter: TraceEmitter;
|
|
568
|
+
/** Rate limiter for per-agent call calls */
|
|
569
|
+
readonly rateLimiter?: import('../../kernel/interfaces/rate_limiter.js').RateLimiter;
|
|
570
|
+
/** WMP Trigger 4: pre-emission boundary capture. Absent when task has no WMP namespace. */
|
|
571
|
+
readonly wmpCapture?: WmpPreEmissionCapture;
|
|
572
|
+
/** DC-CCP-118: Scope validation for capability_result evidence. Optional — when absent, no scope check. */
|
|
573
|
+
readonly capabilityResultScopeValidator?: CapabilityResultScopeValidator;
|
|
574
|
+
/** Hard Stop #7: Injectable clock for deterministic temporal logic. */
|
|
575
|
+
readonly time: import('../../kernel/interfaces/time.js').TimeProvider;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* WMP Trigger 4 interface for pre-emission boundary capture.
|
|
579
|
+
* Called by SC-11 before claim row is committed.
|
|
580
|
+
* Per WMP §6.4: capture failure blocks the emission.
|
|
581
|
+
*/
|
|
582
|
+
export interface WmpPreEmissionCapture {
|
|
583
|
+
/** Create pre-emission snapshot. Returns capture ID and sourcing status. */
|
|
584
|
+
capture(conn: DatabaseConnection, taskId: TaskId): Result<WmpCaptureResult>;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* WMP Trigger 4 capture result.
|
|
588
|
+
* CCP-I9 audit sufficiency requires captureId in assertion audit record.
|
|
589
|
+
*/
|
|
590
|
+
export interface WmpCaptureResult {
|
|
591
|
+
/** Boundary event ID referencing the WMP snapshot */
|
|
592
|
+
readonly captureId: string;
|
|
593
|
+
/**
|
|
594
|
+
* WMP sourcing status per WMP §10.2:
|
|
595
|
+
* 'not_verified': v1 default for tasks with initialized WMP
|
|
596
|
+
* 'not_applicable': tasks where WMP was never initialized
|
|
597
|
+
* 'verified': reserved for future content tracing
|
|
598
|
+
*/
|
|
599
|
+
readonly sourcingStatus: 'verified' | 'not_verified' | 'not_applicable';
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Binding 3, DC-CCP-205: Claim lifecycle state — computed projection.
|
|
603
|
+
* Combines claim status with relationship-derived state for a complete view.
|
|
604
|
+
* Unlike ClaimStatus (storage: active|retracted), this includes relationship
|
|
605
|
+
* effects (disputed, superseded) and grounding state (grounded).
|
|
606
|
+
*
|
|
607
|
+
* Ordering by severity: retracted > superseded > disputed > grounded > asserted.
|
|
608
|
+
*/
|
|
609
|
+
export type ClaimLifecycleState = 'asserted' | 'grounded' | 'disputed' | 'superseded' | 'retracted';
|
|
610
|
+
/**
|
|
611
|
+
* Binding 3, DC-CCP-205: Lifecycle projection interface.
|
|
612
|
+
* Computes the full lifecycle state of a claim by combining its stored status
|
|
613
|
+
* with relationship-derived state. This is the executable projection function
|
|
614
|
+
* required by Binding 3.
|
|
615
|
+
*
|
|
616
|
+
* The projection is pure — it does not mutate state.
|
|
617
|
+
*/
|
|
618
|
+
export interface ClaimLifecycleProjection {
|
|
619
|
+
/**
|
|
620
|
+
* Project the full lifecycle state of a claim.
|
|
621
|
+
*
|
|
622
|
+
* @param status - The claim's stored status (active | retracted)
|
|
623
|
+
* @param grounded - Whether the claim has been successfully grounded (CF-05)
|
|
624
|
+
* @param hasContradicts - Whether any 'contradicts' relationship targets this claim
|
|
625
|
+
* @param hasSupersedes - Whether any 'supersedes' relationship targets this claim
|
|
626
|
+
* @returns The projected lifecycle state (highest severity wins)
|
|
627
|
+
*/
|
|
628
|
+
project(status: ClaimStatus, grounded: boolean, hasContradicts: boolean, hasSupersedes: boolean): ClaimLifecycleState;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* DC-CCP-501/502/512/513, Binding 14: Constitutional CCP trace event types.
|
|
632
|
+
* Maps CCP lifecycle transitions to the 4 constitutional trace events defined
|
|
633
|
+
* in trace.ts:64-67. Used for type-safe emission through ClaimSystemDeps.traceEmitter.
|
|
634
|
+
*
|
|
635
|
+
* These are the CCP projection of the 32 constitutional trace events.
|
|
636
|
+
* BC-020: TraceEmitter is SEPARATE from EventBus (CCP_EVENTS).
|
|
637
|
+
*/
|
|
638
|
+
export declare const CCP_TRACE_EVENTS: {
|
|
639
|
+
/** Binding 14: Emitted on SC-11 successful assertion. Transaction-coupled (BC-027). */
|
|
640
|
+
readonly CLAIM_ASSERTED: "claim.asserted";
|
|
641
|
+
/** DC-CCP-513: Emitted on SC-11 grounding success. Transaction-coupled (BC-027). */
|
|
642
|
+
readonly CLAIM_GROUNDED: "claim.grounded";
|
|
643
|
+
/** DC-CCP-512: Emitted on SC-12 'contradicts' relationship. Transaction-coupled (BC-027). */
|
|
644
|
+
readonly CLAIM_CHALLENGED: "claim.challenged";
|
|
645
|
+
/** Binding 14: Emitted on retraction (§10.4). Transaction-coupled (BC-027). */
|
|
646
|
+
readonly CLAIM_RETRACTED: "claim.retracted";
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* DC-CCP-118 (v1.1): Capability result scope validation.
|
|
650
|
+
* When evidenceType='capability_result', the referenced result must originate
|
|
651
|
+
* from within the claiming agent's mission ancestor chain. This prevents
|
|
652
|
+
* cross-scope evidence contamination.
|
|
653
|
+
*
|
|
654
|
+
* This interface extends EvidenceSourceValidator's exists() by adding
|
|
655
|
+
* mission-chain scope validation for the 'capability_result' evidence type.
|
|
656
|
+
*/
|
|
657
|
+
export interface CapabilityResultScopeValidator {
|
|
658
|
+
/**
|
|
659
|
+
* Validate that a capability_result evidence reference is within the
|
|
660
|
+
* mission ancestor chain of the asserting agent's current mission.
|
|
661
|
+
*
|
|
662
|
+
* @param conn - Database connection
|
|
663
|
+
* @param evidenceId - The capability_result ID
|
|
664
|
+
* @param missionId - The asserting claim's mission context
|
|
665
|
+
* @param tenantId - Tenant scope for isolation (F-S1-004: prevents cross-tenant scope walk)
|
|
666
|
+
* @returns ok:true if within scope, error if cross-scope
|
|
667
|
+
*/
|
|
668
|
+
validateScope(conn: DatabaseConnection, evidenceId: string, missionId: MissionId, tenantId: TenantId | null): Result<boolean>;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* DC-CCP-307: Idempotency key for SC-11 assert_claim.
|
|
672
|
+
* Optional — when provided, duplicate assertions with the same key
|
|
673
|
+
* return the cached result instead of creating a new claim.
|
|
674
|
+
* Uses the Phase 0A IdempotencyKey structure (governance_ids.ts).
|
|
675
|
+
*/
|
|
676
|
+
export interface ClaimIdempotencyInput {
|
|
677
|
+
/** Caller-provided idempotency key (unique per agent per mission) */
|
|
678
|
+
readonly key: string;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* §10.1, SC-11: assert_claim error codes (17 design source + 1 derived = 18).
|
|
682
|
+
* Each maps to a specific validation failure per CCP §6, §10.1, and CF-05.
|
|
683
|
+
*/
|
|
684
|
+
export declare const SC11_ERROR_CODES: {
|
|
685
|
+
/** §6: Subject URN format invalid */
|
|
686
|
+
readonly INVALID_SUBJECT: "INVALID_SUBJECT";
|
|
687
|
+
/** §6: Predicate namespace format invalid or reserved */
|
|
688
|
+
readonly INVALID_PREDICATE: "INVALID_PREDICATE";
|
|
689
|
+
/** §6: Object value does not match declared type */
|
|
690
|
+
readonly INVALID_OBJECT_TYPE: "INVALID_OBJECT_TYPE";
|
|
691
|
+
/** §10.1: Confidence not in [0.0, 1.0] */
|
|
692
|
+
readonly CONFIDENCE_OUT_OF_RANGE: "CONFIDENCE_OUT_OF_RANGE";
|
|
693
|
+
/** §6: validAt is not valid ISO 8601 */
|
|
694
|
+
readonly INVALID_VALID_AT: "INVALID_VALID_AT";
|
|
695
|
+
/** CCP-I5: No evidence references for evidence-path mode */
|
|
696
|
+
readonly NO_EVIDENCE: "NO_EVIDENCE";
|
|
697
|
+
/** §10.1: Evidence references exceed CLAIM_MAX_EVIDENCE_REFS */
|
|
698
|
+
readonly EVIDENCE_LIMIT_EXCEEDED: "EVIDENCE_LIMIT_EXCEEDED";
|
|
699
|
+
/** CCP-I5: Evidence FK referencing nonexistent source */
|
|
700
|
+
readonly EVIDENCE_NOT_FOUND: "EVIDENCE_NOT_FOUND";
|
|
701
|
+
/** §6: Evidence reference crosses tenant boundary */
|
|
702
|
+
readonly EVIDENCE_CROSS_TENANT: "EVIDENCE_CROSS_TENANT";
|
|
703
|
+
/** §10.1: Per-mission claim limit exceeded (500) */
|
|
704
|
+
readonly CLAIM_LIMIT_EXCEEDED: "CLAIM_LIMIT_EXCEEDED";
|
|
705
|
+
/** §10.1: Mission not in active state */
|
|
706
|
+
readonly MISSION_NOT_ACTIVE: "MISSION_NOT_ACTIVE";
|
|
707
|
+
/** §10.1: Agent not authorized */
|
|
708
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
709
|
+
/** §10.1: Per-agent rate limit exceeded (100 calls/min) */
|
|
710
|
+
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
711
|
+
/** CF-05: No evidence-path terminates at non-claim source within maxHops */
|
|
712
|
+
readonly GROUNDING_DEPTH_EXCEEDED: "GROUNDING_DEPTH_EXCEEDED";
|
|
713
|
+
/** CF-05: groundingMode='runtime_witness' but runtimeWitness field absent */
|
|
714
|
+
readonly RUNTIME_WITNESS_MISSING: "RUNTIME_WITNESS_MISSING";
|
|
715
|
+
/** CF-05: runtimeWitness present but structurally invalid */
|
|
716
|
+
readonly RUNTIME_WITNESS_INVALID: "RUNTIME_WITNESS_INVALID";
|
|
717
|
+
/** CF-05: groundingMode field not provided */
|
|
718
|
+
readonly GROUNDING_MODE_MISSING: "GROUNDING_MODE_MISSING";
|
|
719
|
+
/** DERIVED: Polymorphic FK type/id pair invalid (type discriminator mismatch) */
|
|
720
|
+
readonly EVIDENCE_TYPE_MISMATCH: "EVIDENCE_TYPE_MISMATCH";
|
|
721
|
+
/** DC-CCP-117 (v1.1): Evidence chain traverses a retracted intermediate claim — epistemic contamination */
|
|
722
|
+
readonly GROUNDING_RETRACTED_INTERMEDIATE: "GROUNDING_RETRACTED_INTERMEDIATE";
|
|
723
|
+
/** DC-CCP-118 (v1.1): capability_result evidence from outside mission ancestor chain */
|
|
724
|
+
readonly EVIDENCE_SCOPE_VIOLATION: "EVIDENCE_SCOPE_VIOLATION";
|
|
725
|
+
/** DC-CCP-307: Duplicate assertion detected via idempotency key */
|
|
726
|
+
readonly IDEMPOTENT_DUPLICATE: "IDEMPOTENT_DUPLICATE";
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* §10.4: Retraction error codes (4 codes per design source).
|
|
730
|
+
* Derived from retraction action boundary in CCP §10.4.
|
|
731
|
+
* CROSS_TENANT removed: tenant-scoped queries return CLAIM_NOT_FOUND.
|
|
732
|
+
*/
|
|
733
|
+
export declare const RETRACTION_ERROR_CODES: {
|
|
734
|
+
/** §10.4: Target claim not found (includes cross-tenant — tenant-scoped query) */
|
|
735
|
+
readonly CLAIM_NOT_FOUND: "CLAIM_NOT_FOUND";
|
|
736
|
+
/** §10.4: Not source agent or admin */
|
|
737
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
738
|
+
/** §10.4: Claim already in retracted state (terminal, CCP-I2) */
|
|
739
|
+
readonly CLAIM_ALREADY_RETRACTED: "CLAIM_ALREADY_RETRACTED";
|
|
740
|
+
/** §10.4: Reason is required and must be non-empty */
|
|
741
|
+
readonly INVALID_REASON: "INVALID_REASON";
|
|
742
|
+
};
|
|
743
|
+
/**
|
|
744
|
+
* SC-12: relate_claims error codes (9 codes).
|
|
745
|
+
*/
|
|
746
|
+
export declare const SC12_ERROR_CODES: {
|
|
747
|
+
/** I-31: One or both claims not found */
|
|
748
|
+
readonly CLAIM_NOT_FOUND: "CLAIM_NOT_FOUND";
|
|
749
|
+
/** CCP-LI-06: Claims in different tenants */
|
|
750
|
+
readonly CROSS_TENANT: "CROSS_TENANT";
|
|
751
|
+
/** I-31: Relationship type not in allowed set */
|
|
752
|
+
readonly INVALID_RELATIONSHIP_TYPE: "INVALID_RELATIONSHIP_TYPE";
|
|
753
|
+
/** I-31: fromClaimId === toClaimId */
|
|
754
|
+
readonly SELF_REFERENCE: "SELF_REFERENCE";
|
|
755
|
+
/** I-31: fromClaimId is not active */
|
|
756
|
+
readonly CLAIM_NOT_ACTIVE: "CLAIM_NOT_ACTIVE";
|
|
757
|
+
/** SC-12: Outgoing relationship limit exceeded */
|
|
758
|
+
readonly RELATIONSHIP_LIMIT_EXCEEDED: "RELATIONSHIP_LIMIT_EXCEEDED";
|
|
759
|
+
/** SC-12: Mission not in active state */
|
|
760
|
+
readonly MISSION_NOT_ACTIVE: "MISSION_NOT_ACTIVE";
|
|
761
|
+
/** SC-12: Agent not authorized */
|
|
762
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
763
|
+
/** SC-12: Per-agent rate limit exceeded */
|
|
764
|
+
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
765
|
+
};
|
|
766
|
+
/**
|
|
767
|
+
* SC-13: query_claims error codes (7 codes).
|
|
768
|
+
*/
|
|
769
|
+
export declare const SC13_ERROR_CODES: {
|
|
770
|
+
/** SC-13: No filters provided (all null) */
|
|
771
|
+
readonly NO_FILTERS: "NO_FILTERS";
|
|
772
|
+
/** SC-13, AMB-14: Subject filter structurally malformed */
|
|
773
|
+
readonly INVALID_SUBJECT_FILTER: "INVALID_SUBJECT_FILTER";
|
|
774
|
+
/** SC-13, AMB-14: Predicate filter structurally malformed */
|
|
775
|
+
readonly INVALID_PREDICATE_FILTER: "INVALID_PREDICATE_FILTER";
|
|
776
|
+
/** SC-13: Requested limit exceeds CLAIM_QUERY_MAX_LIMIT */
|
|
777
|
+
readonly LIMIT_EXCEEDED: "LIMIT_EXCEEDED";
|
|
778
|
+
/** SC-13: Mission not in active state */
|
|
779
|
+
readonly MISSION_NOT_ACTIVE: "MISSION_NOT_ACTIVE";
|
|
780
|
+
/** SC-13: Agent not authorized */
|
|
781
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
782
|
+
/** SC-13: Per-agent rate limit exceeded */
|
|
783
|
+
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
784
|
+
};
|
|
785
|
+
/**
|
|
786
|
+
* SC-4 Amendment: Error codes for claim-bearing artifacts (3 codes).
|
|
787
|
+
*/
|
|
788
|
+
export declare const SC4_AMENDMENT_ERROR_CODES: {
|
|
789
|
+
/** SC-4: Invalid assertionType value */
|
|
790
|
+
readonly INVALID_ASSERTION_TYPE: "INVALID_ASSERTION_TYPE";
|
|
791
|
+
/** SC-4: Per-artifact claim limit exceeded */
|
|
792
|
+
readonly ARTIFACT_CLAIM_LIMIT: "ARTIFACT_CLAIM_LIMIT";
|
|
793
|
+
/** SC-4: Policy requires claims for assertionType='factual' */
|
|
794
|
+
readonly POLICY_VIOLATION: "POLICY_VIOLATION";
|
|
795
|
+
};
|
|
796
|
+
/**
|
|
797
|
+
* §14: CCP event type constants with scope and propagation.
|
|
798
|
+
* 6 events per design source. Each documents scope, propagation, and trigger.
|
|
799
|
+
*/
|
|
800
|
+
export declare const CCP_EVENTS: {
|
|
801
|
+
/** §14, SC-11: Fired on successful claim assertion. Scope: mission, Propagation: local */
|
|
802
|
+
readonly CLAIM_ASSERTED: {
|
|
803
|
+
readonly type: "claim.asserted";
|
|
804
|
+
readonly scope: "mission";
|
|
805
|
+
readonly propagation: "local";
|
|
806
|
+
};
|
|
807
|
+
/** §14, §10.4: Fired on retraction. Scope: system, Propagation: up */
|
|
808
|
+
readonly CLAIM_RETRACTED: {
|
|
809
|
+
readonly type: "claim.retracted";
|
|
810
|
+
readonly scope: "system";
|
|
811
|
+
readonly propagation: "up";
|
|
812
|
+
};
|
|
813
|
+
/** §14, PSD-2: Fired per dependent claim when evidence source retracted. Scope: system, one-edge-deep */
|
|
814
|
+
readonly CLAIM_EVIDENCE_RETRACTED: {
|
|
815
|
+
readonly type: "claim.evidence.retracted";
|
|
816
|
+
readonly scope: "system";
|
|
817
|
+
readonly propagation: "up";
|
|
818
|
+
};
|
|
819
|
+
/** §14, SC-12: Fired on relationship declaration. Scope: mission, Propagation: local */
|
|
820
|
+
readonly CLAIM_RELATIONSHIP_DECLARED: {
|
|
821
|
+
readonly type: "claim.relationship.declared";
|
|
822
|
+
readonly scope: "mission";
|
|
823
|
+
readonly propagation: "local";
|
|
824
|
+
};
|
|
825
|
+
/** §14, §13: Fired on claim purge/tombstone. Scope: system, Propagation: local */
|
|
826
|
+
readonly CLAIM_TOMBSTONED: {
|
|
827
|
+
readonly type: "claim.tombstoned";
|
|
828
|
+
readonly scope: "system";
|
|
829
|
+
readonly propagation: "local";
|
|
830
|
+
};
|
|
831
|
+
/** §14, CCP-I5: Fired when non-claim evidence source purged. Scope: system, Propagation: local */
|
|
832
|
+
readonly CLAIM_EVIDENCE_ORPHANED: {
|
|
833
|
+
readonly type: "claim.evidence.orphaned";
|
|
834
|
+
readonly scope: "system";
|
|
835
|
+
readonly propagation: "local";
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
/** CF-05, PSD-5: Maximum hops for evidence-path grounding (default, configurable per tenant/mission) */
|
|
839
|
+
export declare const CLAIM_GROUNDING_MAX_HOPS = 3;
|
|
840
|
+
/** FM-CCP-01: Maximum claims per mission */
|
|
841
|
+
export declare const CLAIM_PER_MISSION_LIMIT = 500;
|
|
842
|
+
/** FM-CCP-01: Maximum claims per artifact (SC-4 amendment) */
|
|
843
|
+
export declare const CLAIM_PER_ARTIFACT_LIMIT = 50;
|
|
844
|
+
/** FM-CCP-01: Maximum evidence references per claim */
|
|
845
|
+
export declare const CLAIM_MAX_EVIDENCE_REFS = 20;
|
|
846
|
+
/** FM-CCP-01: Maximum outgoing relationships per claim */
|
|
847
|
+
export declare const CLAIM_MAX_OUTGOING_RELATIONSHIPS = 50;
|
|
848
|
+
/** §10.3: Maximum query result limit */
|
|
849
|
+
export declare const CLAIM_QUERY_MAX_LIMIT = 200;
|
|
850
|
+
/** §10.3: Default query result limit */
|
|
851
|
+
export declare const CLAIM_QUERY_DEFAULT_LIMIT = 50;
|
|
852
|
+
/** §6, AMB-CCP-07: Maximum JSON object value size in bytes (10KB = 10,240 bytes UTF-8) */
|
|
853
|
+
export declare const CLAIM_JSON_MAX_BYTES = 10240;
|
|
854
|
+
/** §10.1/§10.2/§10.3: Rate limit — calls per minute per agent */
|
|
855
|
+
export declare const CLAIM_RATE_LIMIT = 100;
|
|
856
|
+
/** SC-4 §11.1: Artifact assertion type classification. Nullable — null means no assertion type. */
|
|
857
|
+
export type AssertionType = 'factual' | 'speculative' | 'procedural';
|
|
858
|
+
//# sourceMappingURL=claim_types.d.ts.map
|