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
package/README.md
ADDED
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/banner.svg" alt="Limen — Cognitive Operating System" width="700">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/limen-ai"><img src="https://img.shields.io/npm/v/limen-ai" alt="npm version"></a>
|
|
7
|
+
<a href="https://github.com/solishq/limen/actions"><img src="https://img.shields.io/github/actions/workflow/status/solishq/limen/ci.yml?branch=main" alt="CI"></a>
|
|
8
|
+
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License"></a>
|
|
9
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D22-brightgreen" alt="Node.js"></a>
|
|
10
|
+
<img src="https://img.shields.io/badge/TypeScript-strict-blue" alt="TypeScript">
|
|
11
|
+
<img src="https://img.shields.io/badge/Dependencies-1-green" alt="Dependencies">
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Limen
|
|
17
|
+
|
|
18
|
+
Your AI agents don't have a reliability problem. They have an infrastructure problem.
|
|
19
|
+
|
|
20
|
+
Limen is a Cognitive Operating System. It does for AI agents what a kernel does for processes: isolation, resource control, lifecycle management, and deterministic behavior contracts. One production dependency. 16 system calls. 99 formally verified invariants. Every execution path typed and tested.
|
|
21
|
+
|
|
22
|
+
The name is Latin for *threshold* -- the architectural boundary where deterministic infrastructure meets stochastic cognition.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Why Limen Exists
|
|
27
|
+
|
|
28
|
+
Every serious AI application eventually builds the same infrastructure: conversation state management, token budget enforcement, provider failover, audit trails, structured output with retry, agent lifecycle control. Teams build these as ad-hoc layers on top of LLM SDKs, then spend months debugging the interactions between them.
|
|
29
|
+
|
|
30
|
+
Limen replaces that entire stack with a single engine. Provider communication happens through raw HTTP -- no SDKs, no transitive dependency trees, no version conflicts. State lives in a local SQLite database you control. Every mutation is audited atomically. Every agent operates within enforced budgets and capability boundaries.
|
|
31
|
+
|
|
32
|
+
The result: AI infrastructure with the reliability guarantees of a database engine and the operational simplicity of a single `npm install`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## How Limen Compares
|
|
37
|
+
|
|
38
|
+
| | Limen | Vercel AI SDK | LangChain.js |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| **Production deps** | 1 | ~50+ | ~50+ |
|
|
41
|
+
| **Provider SDKs required** | No (raw HTTP) | Yes (`@ai-sdk/*`) | Yes (`@langchain/*`) |
|
|
42
|
+
| **Built-in persistence** | SQLite (WAL, local) | No | Optional (external DB) |
|
|
43
|
+
| **Audit trail** | Hash-chained, append-only | No | LangSmith (paid SaaS) |
|
|
44
|
+
| **Budget enforcement** | Per-mission token budgets | No | No |
|
|
45
|
+
| **Agent governance** | 16 system calls, RBAC | No | No |
|
|
46
|
+
| **Multi-tenant isolation** | Row-level or database-level | No | No |
|
|
47
|
+
| **Encryption at rest** | AES-256-GCM | No | No |
|
|
48
|
+
| **Streaming** | Yes (stall detection, timeouts) | Yes | Yes |
|
|
49
|
+
| **Structured output** | JSON Schema + auto-retry | Zod schemas | Output parsers |
|
|
50
|
+
| **Deterministic replay** | Yes (from recorded LLM outputs) | No | No |
|
|
51
|
+
|
|
52
|
+
Limen is not a wrapper around LLM APIs. It is an operating system for AI agents. If you need a lightweight way to call an LLM, the Vercel AI SDK is excellent. If you need your agents to operate within enforced boundaries with full auditability, that is what Limen was built for.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm install limen-ai
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Requires Node.js >= 22. Single production dependency: `better-sqlite3`.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { createLimen } from 'limen-ai';
|
|
70
|
+
import crypto from 'node:crypto';
|
|
71
|
+
|
|
72
|
+
const limen = await createLimen({
|
|
73
|
+
dataDir: './my-app-data',
|
|
74
|
+
masterKey: crypto.randomBytes(32),
|
|
75
|
+
providers: [{
|
|
76
|
+
type: 'anthropic',
|
|
77
|
+
baseUrl: 'https://api.anthropic.com',
|
|
78
|
+
models: ['claude-sonnet-4-20250514'],
|
|
79
|
+
apiKeyEnvVar: 'ANTHROPIC_API_KEY',
|
|
80
|
+
}],
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// Chat -- returns synchronously, fields resolve async
|
|
84
|
+
const response = limen.chat('What are the key trends in renewable energy?');
|
|
85
|
+
const text = await response.text;
|
|
86
|
+
const metadata = await response.metadata;
|
|
87
|
+
console.log(text);
|
|
88
|
+
console.log(`${metadata.tokens.input} in / ${metadata.tokens.output} out`);
|
|
89
|
+
|
|
90
|
+
// Stream
|
|
91
|
+
const streamed = limen.chat('Explain quantum computing', { stream: true });
|
|
92
|
+
for await (const chunk of streamed.stream) {
|
|
93
|
+
if (chunk.type === 'content_delta') process.stdout.write(chunk.delta);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Structured output with schema validation and auto-retry
|
|
97
|
+
const analysis = await limen.infer({
|
|
98
|
+
input: 'List the top 3 programming languages by popularity',
|
|
99
|
+
outputSchema: {
|
|
100
|
+
type: 'object',
|
|
101
|
+
properties: {
|
|
102
|
+
languages: {
|
|
103
|
+
type: 'array',
|
|
104
|
+
items: {
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: {
|
|
107
|
+
name: { type: 'string' },
|
|
108
|
+
reason: { type: 'string' },
|
|
109
|
+
},
|
|
110
|
+
required: ['name', 'reason'],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ['languages'],
|
|
115
|
+
},
|
|
116
|
+
maxRetries: 2,
|
|
117
|
+
});
|
|
118
|
+
console.log(analysis.data); // Typed, validated, guaranteed to match schema
|
|
119
|
+
|
|
120
|
+
// Cleanup
|
|
121
|
+
await limen.shutdown();
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`createLimen()` returns a deeply frozen object. Every method is immutable. Two calls produce fully independent instances -- no shared state, no cross-contamination.
|
|
125
|
+
|
|
126
|
+
> **Important: Master Key Management**
|
|
127
|
+
>
|
|
128
|
+
> The `masterKey` is used for AES-256-GCM encryption at rest. If you lose the key, encrypted data in the SQLite database becomes permanently unreadable. Do **not** use `crypto.randomBytes(32)` in production — that generates a new key on every startup.
|
|
129
|
+
>
|
|
130
|
+
> ```bash
|
|
131
|
+
> # Generate once, store securely
|
|
132
|
+
> node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" > master.key
|
|
133
|
+
> chmod 600 master.key
|
|
134
|
+
> ```
|
|
135
|
+
>
|
|
136
|
+
> ```typescript
|
|
137
|
+
> // Load from file or environment
|
|
138
|
+
> const masterKey = Buffer.from(process.env.LIMEN_MASTER_KEY!, 'hex');
|
|
139
|
+
> // or
|
|
140
|
+
> const masterKey = fs.readFileSync('./master.key', 'utf8').trim();
|
|
141
|
+
> ```
|
|
142
|
+
>
|
|
143
|
+
> Keep the key out of version control. Rotate by re-encrypting: create a new engine instance with the new key and migrate data through the public API.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Architecture
|
|
148
|
+
|
|
149
|
+
Limen is built as four layers, each with a strict dependency direction: down only, never up.
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
┌─────────────────────────────────────────────┐
|
|
153
|
+
│ API Surface │ createLimen(), chat(), infer(),
|
|
154
|
+
│ Public interface. Composes everything. │ sessions, agents, missions, health
|
|
155
|
+
├─────────────────────────────────────────────┤
|
|
156
|
+
│ Orchestration │ Missions, task graphs, budgets,
|
|
157
|
+
│ Cognitive governance. 16 system calls. │ checkpoints, artifacts, events
|
|
158
|
+
├─────────────────────────────────────────────┤
|
|
159
|
+
│ Substrate │ LLM gateway, transport engine,
|
|
160
|
+
│ Execution infrastructure. │ worker pool, scheduling, adapters
|
|
161
|
+
├─────────────────────────────────────────────┤
|
|
162
|
+
│ Kernel │ SQLite (WAL), audit trail, RBAC,
|
|
163
|
+
│ Persistence and trust. │ crypto, events, rate limiting
|
|
164
|
+
└─────────────────────────────────────────────┘
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Kernel** owns persistence, identity, and trust. SQLite in WAL mode provides ACID transactions. An append-only, hash-chained audit trail records every state mutation. RBAC enforces authorization on every operation. AES-256-GCM encrypts sensitive data at rest. The kernel has zero knowledge of AI -- it is pure infrastructure.
|
|
168
|
+
|
|
169
|
+
**Substrate** provides execution services. The transport engine communicates with LLM providers over raw HTTP with circuit breakers, exponential backoff, streaming with stall detection, and TLS enforcement. A worker pool with resource limits manages concurrent execution. No provider SDK is imported -- ever.
|
|
170
|
+
|
|
171
|
+
**Orchestration** is where cognition meets governance. Agents propose missions, task graphs, artifact creation, budget requests, and checkpoint responses through 16 formally defined system calls. The orchestration layer validates every proposal before any state mutation occurs. This is the governance boundary: intelligence proposes, infrastructure decides.
|
|
172
|
+
|
|
173
|
+
**API Surface** composes these layers into the public `Limen` object. A single factory call -- `createLimen(config)` -- wires kernel, substrate, and orchestration into a frozen, immutable engine instance.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Three Export Paths
|
|
178
|
+
|
|
179
|
+
Limen ships three independent entry points. Use the full engine, the reference agent, or the transport layer alone.
|
|
180
|
+
|
|
181
|
+
### `limen-ai` -- The Engine
|
|
182
|
+
|
|
183
|
+
The complete Cognitive OS. Everything described in this document.
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
import { createLimen } from 'limen-ai';
|
|
187
|
+
import type { Limen, LimenConfig, ChatResult } from 'limen-ai';
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### `limen-ai/reference-agent` -- Mission Agent
|
|
191
|
+
|
|
192
|
+
A proof-of-architecture agent that demonstrates how to build on the 16 system calls. It decomposes objectives into task graphs, manages budgets, handles checkpoints, aggregates artifacts, and delegates sub-missions. It interacts with the engine exclusively through the public API -- it cannot reach kernel or substrate internals.
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
import { createReferenceAgent } from 'limen-ai/reference-agent';
|
|
196
|
+
|
|
197
|
+
const agent = createReferenceAgent(limen, {
|
|
198
|
+
name: 'analyst',
|
|
199
|
+
decompositionStrategy: 'heuristic',
|
|
200
|
+
capabilities: ['web', 'data'],
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
const result = await agent.runMission({
|
|
204
|
+
objective: 'Analyze competitive landscape for drone delivery in Southeast Asia',
|
|
205
|
+
constraints: {
|
|
206
|
+
tokenBudget: 50_000,
|
|
207
|
+
deadline: '2024-12-31T23:59:59Z',
|
|
208
|
+
capabilities: ['web', 'data'],
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### `limen-ai/transport` -- Standalone LLM Client
|
|
214
|
+
|
|
215
|
+
The transport layer works independently of the engine. Zero-dependency LLM communication with circuit breakers, retry with exponential backoff, streaming with stall detection, response size limits, TLS enforcement, and graceful shutdown. If you need a reliable way to talk to LLM providers without pulling in their SDKs, this is it.
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
import {
|
|
219
|
+
createTransportEngine,
|
|
220
|
+
createAnthropicAdapterFromEnv,
|
|
221
|
+
createOpenAIAdapterFromEnv,
|
|
222
|
+
} from 'limen-ai/transport';
|
|
223
|
+
|
|
224
|
+
const engine = createTransportEngine();
|
|
225
|
+
const anthropic = createAnthropicAdapterFromEnv();
|
|
226
|
+
|
|
227
|
+
// Non-streaming with automatic retry (3 attempts, 120s cap)
|
|
228
|
+
const result = await engine.execute(anthropic, {
|
|
229
|
+
request: {
|
|
230
|
+
model: 'claude-sonnet-4-20250514',
|
|
231
|
+
messages: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }],
|
|
232
|
+
maxTokens: 1024,
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
console.log(result.response.content);
|
|
236
|
+
|
|
237
|
+
// Streaming with stall detection (30s first-byte, 30s stall, 10min total)
|
|
238
|
+
const stream = await engine.executeStream(anthropic, {
|
|
239
|
+
request: {
|
|
240
|
+
model: 'claude-sonnet-4-20250514',
|
|
241
|
+
messages: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }],
|
|
242
|
+
maxTokens: 1024,
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
for await (const chunk of stream.stream) {
|
|
246
|
+
// Process LlmStreamChunk
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
engine.shutdown(); // Aborts in-flight, rejects new requests
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Providers
|
|
255
|
+
|
|
256
|
+
Six providers, zero SDKs. All communication is raw HTTP via `fetch`.
|
|
257
|
+
|
|
258
|
+
| Provider | Adapter Factory | Streaming | Auth |
|
|
259
|
+
|---|---|---|---|
|
|
260
|
+
| **Anthropic** | `createAnthropicAdapter(apiKey, baseUrl?)` | SSE | Bearer token |
|
|
261
|
+
| **OpenAI** | `createOpenAIAdapter(apiKey, baseUrl?)` | SSE | Bearer token |
|
|
262
|
+
| **Google Gemini** | `createGeminiAdapter(apiKey, baseUrl?)` | SSE | Query param |
|
|
263
|
+
| **Groq** | `createGroqAdapter(apiKey, baseUrl?)` | SSE | Bearer token |
|
|
264
|
+
| **Mistral** | `createMistralAdapter(apiKey, baseUrl?)` | SSE | Bearer token |
|
|
265
|
+
| **Ollama** | `createOllamaAdapter(baseUrl?)` | NDJSON | None (local) |
|
|
266
|
+
|
|
267
|
+
Each provider also has a `*FromEnv()` variant that reads the API key from the environment (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, `GROQ_API_KEY`, `MISTRAL_API_KEY`). Ollama runs locally and requires no authentication.
|
|
268
|
+
|
|
269
|
+
Configure providers at the engine level:
|
|
270
|
+
|
|
271
|
+
```typescript
|
|
272
|
+
const limen = await createLimen({
|
|
273
|
+
dataDir: './data',
|
|
274
|
+
masterKey: crypto.randomBytes(32),
|
|
275
|
+
providers: [
|
|
276
|
+
{
|
|
277
|
+
type: 'anthropic',
|
|
278
|
+
baseUrl: 'https://api.anthropic.com',
|
|
279
|
+
models: ['claude-sonnet-4-20250514'],
|
|
280
|
+
apiKeyEnvVar: 'ANTHROPIC_API_KEY',
|
|
281
|
+
maxConcurrent: 5,
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
type: 'openai',
|
|
285
|
+
baseUrl: 'https://api.openai.com',
|
|
286
|
+
models: ['gpt-4o'],
|
|
287
|
+
apiKeyEnvVar: 'OPENAI_API_KEY',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
type: 'ollama',
|
|
291
|
+
baseUrl: 'http://localhost:11434',
|
|
292
|
+
models: ['llama3.2'],
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
});
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Sessions and Conversations
|
|
301
|
+
|
|
302
|
+
Sessions bind a conversation to an agent and tenant context. Within a session, conversation history is maintained, turns are recorded, and the context window is managed automatically -- including summarization when the window fills.
|
|
303
|
+
|
|
304
|
+
```typescript
|
|
305
|
+
const session = await limen.session({
|
|
306
|
+
agentName: 'researcher',
|
|
307
|
+
tenantId: 'tenant-1' as TenantId,
|
|
308
|
+
user: { id: 'user-42', role: 'analyst' },
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// Chat within session context
|
|
312
|
+
const r1 = session.chat('What were last quarter earnings?');
|
|
313
|
+
const r2 = session.chat('Compare that to the previous year');
|
|
314
|
+
|
|
315
|
+
// Structured inference within the same conversation
|
|
316
|
+
const summary = await session.infer({
|
|
317
|
+
input: 'Summarize our conversation so far',
|
|
318
|
+
outputSchema: SummarySchema,
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
// Fork conversation at a specific turn
|
|
322
|
+
const branch = await session.fork(3);
|
|
323
|
+
|
|
324
|
+
// Review history
|
|
325
|
+
const turns = await session.history();
|
|
326
|
+
|
|
327
|
+
await session.close();
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Autonomous Missions
|
|
333
|
+
|
|
334
|
+
Missions are how agents do complex, multi-step work within enforced boundaries. An agent proposes an objective with a token budget and deadline. The system validates the proposal, and the agent then works through a cycle of planning (task graphs), execution, artifact creation, checkpoints, and result submission -- all through the 16 system calls.
|
|
335
|
+
|
|
336
|
+
```typescript
|
|
337
|
+
const mission = await limen.missions.create({
|
|
338
|
+
agent: 'researcher',
|
|
339
|
+
objective: 'Produce a competitive analysis report',
|
|
340
|
+
constraints: {
|
|
341
|
+
tokenBudget: 100_000,
|
|
342
|
+
deadline: '2024-12-31T23:59:59Z',
|
|
343
|
+
capabilities: ['web', 'data', 'code'],
|
|
344
|
+
maxTasks: 20,
|
|
345
|
+
},
|
|
346
|
+
deliverables: [
|
|
347
|
+
{ type: 'report', name: 'competitive-analysis' },
|
|
348
|
+
{ type: 'data', name: 'market-data' },
|
|
349
|
+
],
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
// Monitor
|
|
353
|
+
mission.on('checkpoint', (payload) => {
|
|
354
|
+
console.log('Checkpoint:', payload);
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
// Wait for completion
|
|
358
|
+
const result = await mission.wait();
|
|
359
|
+
console.log(result.summary);
|
|
360
|
+
console.log(`Confidence: ${result.confidence}`);
|
|
361
|
+
console.log(`Tokens used: ${result.resourcesConsumed.tokens}`);
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
The mission lifecycle transitions through: `CREATED` -> `PLANNING` -> `EXECUTING` -> `REVIEWING` -> `COMPLETED`. At any point, a mission can be paused, resumed, or cancelled. Budget enforcement is continuous -- if a mission exceeds its allocation, it is blocked until more budget is requested and approved.
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## The 16 System Calls
|
|
369
|
+
|
|
370
|
+
Every agent interaction with the engine passes through exactly 16 system calls. This is the governance boundary. Agents propose; the system validates and executes.
|
|
371
|
+
|
|
372
|
+
**Orchestration** — mission lifecycle and task governance:
|
|
373
|
+
|
|
374
|
+
| # | Call | What It Does |
|
|
375
|
+
|---|---|---|
|
|
376
|
+
| SC-1 | `propose_mission` | Create a mission with objective, budget, and deadline |
|
|
377
|
+
| SC-2 | `propose_task_graph` | Submit a DAG of tasks with dependency edges |
|
|
378
|
+
| SC-3 | `propose_task_execution` | Request execution of a validated task |
|
|
379
|
+
| SC-4 | `create_artifact` | Produce a versioned, immutable artifact |
|
|
380
|
+
| SC-5 | `read_artifact` | Retrieve an artifact by ID and version |
|
|
381
|
+
| SC-6 | `emit_event` | Signal a domain event (lifecycle events are system-only) |
|
|
382
|
+
| SC-7 | `request_capability` | Execute a capability (web, code, data, file, API) |
|
|
383
|
+
| SC-8 | `request_budget` | Request additional token budget with justification |
|
|
384
|
+
| SC-9 | `submit_result` | Deliver final results with confidence score |
|
|
385
|
+
| SC-10 | `respond_checkpoint` | Answer a system checkpoint with assessment |
|
|
386
|
+
|
|
387
|
+
**Claim Protocol** — structured knowledge with provenance:
|
|
388
|
+
|
|
389
|
+
| # | Call | What It Does |
|
|
390
|
+
|---|---|---|
|
|
391
|
+
| SC-11 | `assert_claim` | Assert a knowledge claim with evidence and confidence score |
|
|
392
|
+
| SC-12 | `relate_claims` | Create typed relationships between claims |
|
|
393
|
+
| SC-13 | `query_claims` | Query claims by subject, predicate, mission, or artifact |
|
|
394
|
+
|
|
395
|
+
**Working Memory** — task-scoped ephemeral state:
|
|
396
|
+
|
|
397
|
+
| # | Call | What It Does |
|
|
398
|
+
|---|---|---|
|
|
399
|
+
| SC-14 | `write_working_memory` | Write key-value entries to task-local scratch space |
|
|
400
|
+
| SC-15 | `read_working_memory` | Read entries or list all keys in task-local memory |
|
|
401
|
+
| SC-16 | `discard_working_memory` | Discard entries from task-local memory |
|
|
402
|
+
|
|
403
|
+
An agent cannot bypass these calls. It cannot write to the database, emit lifecycle events, modify its own capabilities, or mutate completed artifacts. The system call boundary is structural, not conventional -- enforced by the type system and the layer architecture.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## The Invariant System
|
|
408
|
+
|
|
409
|
+
Limen enforces 99 invariants continuously. These are not guidelines or best practices. They are machine-verified properties of the running system, each backed by dedicated tests. A violation of any invariant is a system defect.
|
|
410
|
+
|
|
411
|
+
| Invariant | Guarantee |
|
|
412
|
+
|---|---|
|
|
413
|
+
| **I-01** | Single production dependency (`better-sqlite3`) |
|
|
414
|
+
| **I-02** | User owns all data. Export and delete at any time. |
|
|
415
|
+
| **I-03** | Every state mutation includes its audit entry in the same transaction |
|
|
416
|
+
| **I-04** | Provider independence. Swap providers without code changes. |
|
|
417
|
+
| **I-05** | All multi-step mutations are transactional |
|
|
418
|
+
| **I-06** | Audit trail is append-only and hash-chained. Cannot be modified or deleted. |
|
|
419
|
+
| **I-07** | Multi-tenant isolation at row or database level |
|
|
420
|
+
| **I-11** | Encryption at rest (AES-256-GCM) |
|
|
421
|
+
| **I-13** | Authorization checked on every operation (RBAC completeness) |
|
|
422
|
+
| **I-17** | Governance boundary: agent output never directly mutates state |
|
|
423
|
+
| **I-19** | Artifacts are immutable after creation. Version, never modify. |
|
|
424
|
+
| **I-20** | Mission trees are bounded (depth 5, children 10, total 50) |
|
|
425
|
+
| **I-24** | Every task graph requires objective alignment proof |
|
|
426
|
+
| **I-25** | Deterministic replay: record LLM outputs, replay to identical state |
|
|
427
|
+
| **I-26** | Streaming and non-streaming produce identical results |
|
|
428
|
+
| **I-28** | Pipeline phases execute in fixed, deterministic order |
|
|
429
|
+
|
|
430
|
+
These invariants are what make AI infrastructure trustworthy. When your agent runs a mission overnight, I-03 guarantees you can audit every action it took. I-17 guarantees it never bypassed the governance layer. I-20 guarantees it didn't spawn an unbounded tree of sub-missions. I-19 guarantees no artifact was silently modified after creation.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## Observability
|
|
435
|
+
|
|
436
|
+
```typescript
|
|
437
|
+
// Health: three-state (healthy, degraded, unhealthy)
|
|
438
|
+
const health = await limen.health();
|
|
439
|
+
console.log(health.status); // 'healthy' | 'degraded' | 'unhealthy'
|
|
440
|
+
console.log(health.uptime_ms);
|
|
441
|
+
console.log(health.subsystems); // Per-subsystem status
|
|
442
|
+
console.log(health.throughput); // requests/s, active streams, error rate
|
|
443
|
+
|
|
444
|
+
// Metrics: structured snapshot
|
|
445
|
+
const metrics = limen.metrics.snapshot();
|
|
446
|
+
console.log(metrics.limen_requests_total);
|
|
447
|
+
console.log(metrics.limen_tokens_cost_usd);
|
|
448
|
+
console.log(metrics.limen_audit_chain_valid);
|
|
449
|
+
console.log(metrics.limen_db_size_bytes);
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
Health distinguishes between three states: **healthy** (all subsystems operational, LLM providers reachable), **degraded** (engine functional but LLM connectivity impaired), and **unhealthy** (critical subsystem failure). Subsystem health covers database, audit, providers, sessions, missions, learning, and memory.
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## Configuration Reference
|
|
457
|
+
|
|
458
|
+
```typescript
|
|
459
|
+
interface LimenConfig {
|
|
460
|
+
dataDir: string; // Where all engine state lives
|
|
461
|
+
masterKey: Buffer; // >= 32 bytes, for AES-256-GCM encryption
|
|
462
|
+
providers?: ProviderConfig[]; // LLM provider configurations
|
|
463
|
+
tenancy?: {
|
|
464
|
+
mode: 'single' | 'multi'; // Default: 'single'
|
|
465
|
+
isolation?: 'row-level' | 'database'; // Multi-tenant isolation strategy
|
|
466
|
+
};
|
|
467
|
+
substrate?: {
|
|
468
|
+
maxWorkers?: number; // Worker pool size (default: 4)
|
|
469
|
+
schedulerPolicy?: 'deadline' | 'fair-share' | 'budget-aware';
|
|
470
|
+
};
|
|
471
|
+
hitl?: HitlConfig; // Human-in-the-loop defaults
|
|
472
|
+
defaultTimeoutMs?: number; // Chat/infer timeout (default: 60000)
|
|
473
|
+
rateLimiting?: {
|
|
474
|
+
apiCallsPerMinute?: number; // Default: 100
|
|
475
|
+
maxConcurrentStreams?: number; // Default: 50
|
|
476
|
+
};
|
|
477
|
+
logger?: (event: LimenLogEvent) => void; // Structured logging callback
|
|
478
|
+
}
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## Error Handling
|
|
484
|
+
|
|
485
|
+
Every error thrown by Limen is a `LimenError` with a typed code, a human-readable message, a `retryable` flag, and an optional `cooldownMs` for rate-limited responses.
|
|
486
|
+
|
|
487
|
+
```typescript
|
|
488
|
+
import { LimenError } from 'limen-ai';
|
|
489
|
+
|
|
490
|
+
try {
|
|
491
|
+
const result = limen.chat('Hello');
|
|
492
|
+
await result.text;
|
|
493
|
+
} catch (err) {
|
|
494
|
+
if (err instanceof LimenError) {
|
|
495
|
+
console.log(err.code); // 'RATE_LIMITED' | 'TIMEOUT' | 'PROVIDER_UNAVAILABLE' | ...
|
|
496
|
+
console.log(err.retryable); // true for transient errors
|
|
497
|
+
console.log(err.cooldownMs); // Present for RATE_LIMITED
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
Error codes trace directly to specific system behaviors: `BUDGET_EXCEEDED` from budget enforcement, `CAPABILITY_VIOLATION` from the governance layer, `SCHEMA_VALIDATION_FAILED` from structured output, `PROVIDER_UNAVAILABLE` from the transport engine. Internal details -- stack traces, SQL errors, file paths -- are never exposed through the public API.
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## Development
|
|
507
|
+
|
|
508
|
+
```bash
|
|
509
|
+
git clone https://github.com/solishq/limen.git
|
|
510
|
+
cd limen
|
|
511
|
+
npm install
|
|
512
|
+
|
|
513
|
+
npm run typecheck # TypeScript strict mode, zero errors
|
|
514
|
+
npm run build # Compile to dist/
|
|
515
|
+
npm test # Full test suite
|
|
516
|
+
npm run ci # typecheck + build + test
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### CI Enforcement
|
|
520
|
+
|
|
521
|
+
The CI pipeline enforces structural properties on every push:
|
|
522
|
+
|
|
523
|
+
- **Single dependency** -- exactly one production dependency (`better-sqlite3`)
|
|
524
|
+
- **No `@ts-ignore`** -- every type must be resolved
|
|
525
|
+
- **No uncontrolled `any`** -- type safety is not optional
|
|
526
|
+
- **No decorative assertions** -- tests that pass regardless of implementation are rejected
|
|
527
|
+
- **Forward-only migrations** -- existing migration files cannot be modified
|
|
528
|
+
- **Node.js 22 and 24** -- tested on current and next LTS
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
## Contributing
|
|
533
|
+
|
|
534
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, architecture overview, and pull request requirements.
|
|
535
|
+
|
|
536
|
+
## Security
|
|
537
|
+
|
|
538
|
+
Report vulnerabilities privately. See [SECURITY.md](SECURITY.md) for details.
|
|
539
|
+
|
|
540
|
+
## License
|
|
541
|
+
|
|
542
|
+
[Apache License 2.0](LICENSE)
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
<p align="center">Built by <a href="https://solishq.ai">SolisHQ</a></p>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent management API wrapper for the API surface.
|
|
3
|
+
* S ref: S12 (agent definitions), DL-2 (agent lifecycle), UC-4 (agent pipeline),
|
|
4
|
+
* I-08 (agent identity persistence), I-09 (trust progression),
|
|
5
|
+
* I-13 (RBAC), I-17 (governance boundary)
|
|
6
|
+
*
|
|
7
|
+
* Phase: Sprint 2 (Trust & Learning — I-09 Trust Progression)
|
|
8
|
+
* Implements: SDD §7 build order item 9
|
|
9
|
+
*
|
|
10
|
+
* I-08: "Identity persists across engine restarts. Stored, not configured.
|
|
11
|
+
* Agent versions immutable once deployed."
|
|
12
|
+
*
|
|
13
|
+
* I-09: "No agent starts with admin trust. Progression: untrusted → probationary
|
|
14
|
+
* → trusted → admin (human grant only). Revocable on safety violation."
|
|
15
|
+
*
|
|
16
|
+
* All agent state persisted in core_agents table (migration v32).
|
|
17
|
+
* Trust transitions recorded in core_trust_transitions (migration v33).
|
|
18
|
+
* Safety violations recorded in core_safety_violations (migration v33).
|
|
19
|
+
* No in-memory cache — single source of truth is SQLite.
|
|
20
|
+
* Tenant isolation via COALESCE(tenant_id, '__NULL__') pattern on all queries.
|
|
21
|
+
*
|
|
22
|
+
* All mutations delegate to kernel database via getConnection().
|
|
23
|
+
*
|
|
24
|
+
* Invariants enforced: I-08, I-09, I-13 (RBAC), I-17 (governance boundary), FM-10 (tenant isolation)
|
|
25
|
+
*/
|
|
26
|
+
import type { OperationContext, DatabaseConnection, RateLimiter, RbacEngine } from '../../kernel/interfaces/index.js';
|
|
27
|
+
import type { AgentApi, AgentRegistration, AgentView, PipelineStage, AgentPipeline, TrustPromotionOptions, SafetyViolationInput } from '../interfaces/api.js';
|
|
28
|
+
export declare class AgentApiImpl implements AgentApi {
|
|
29
|
+
private readonly rbac;
|
|
30
|
+
private readonly rateLimiter;
|
|
31
|
+
private readonly getConnection;
|
|
32
|
+
private readonly getContext;
|
|
33
|
+
private readonly time?;
|
|
34
|
+
constructor(rbac: RbacEngine, rateLimiter: RateLimiter, getConnection: () => DatabaseConnection, getContext: () => OperationContext, time?: import("../../kernel/interfaces/time.js").TimeProvider | undefined);
|
|
35
|
+
/**
|
|
36
|
+
* CF-028: Agent name validation pattern.
|
|
37
|
+
* Alphanumeric, hyphens, underscores, dots. 1-128 chars.
|
|
38
|
+
* S ref: S12 (agent definitions), I-07 (isolation), FM-10 (tenant scoping)
|
|
39
|
+
*/
|
|
40
|
+
private static readonly AGENT_NAME_PATTERN;
|
|
41
|
+
/**
|
|
42
|
+
* S12, I-08: Register a new agent.
|
|
43
|
+
* Permission: 'create_agent'
|
|
44
|
+
* CF-028: Validates agent name before registration.
|
|
45
|
+
* CF-014: Enforces max agent count per tenant.
|
|
46
|
+
* FM-10: Tenant isolation via COALESCE pattern.
|
|
47
|
+
*
|
|
48
|
+
* Agent state persisted in core_agents table. No in-memory cache.
|
|
49
|
+
*/
|
|
50
|
+
register(config: AgentRegistration): Promise<AgentView>;
|
|
51
|
+
/**
|
|
52
|
+
* DL-2, I-08: Pause an agent.
|
|
53
|
+
* Permission: 'modify_agent'
|
|
54
|
+
* FM-10: Tenant-scoped query via COALESCE pattern.
|
|
55
|
+
* I-08: Retired agents rejected by trigger (AGENT_RETIRED_TERMINAL).
|
|
56
|
+
*/
|
|
57
|
+
pause(name: string): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* DL-2, I-08: Resume a paused agent.
|
|
60
|
+
* Permission: 'modify_agent'
|
|
61
|
+
* FM-10: Tenant-scoped query via COALESCE pattern.
|
|
62
|
+
* Only paused agents can be resumed. Returns to 'registered' status.
|
|
63
|
+
*/
|
|
64
|
+
resume(name: string): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* DL-2, I-08: Retire an agent permanently.
|
|
67
|
+
* Permission: 'delete_agent'
|
|
68
|
+
* FM-10: Tenant-scoped query via COALESCE pattern.
|
|
69
|
+
* I-08: Retirement is terminal — trigger prevents further mutation.
|
|
70
|
+
*/
|
|
71
|
+
retire(name: string): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* S12, I-08: Get agent by name.
|
|
74
|
+
* FM-10: Tenant-scoped lookup prevents cross-tenant data leakage.
|
|
75
|
+
* C-07: Returns frozen AgentView or null.
|
|
76
|
+
*/
|
|
77
|
+
get(name: string): Promise<AgentView | null>;
|
|
78
|
+
/**
|
|
79
|
+
* S12, I-08: List all agents for current tenant.
|
|
80
|
+
* FM-10: COALESCE pattern for tenant isolation.
|
|
81
|
+
* C-07: Returns frozen array of frozen AgentViews.
|
|
82
|
+
*/
|
|
83
|
+
list(): Promise<readonly AgentView[]>;
|
|
84
|
+
/**
|
|
85
|
+
* I-09: Promote agent trust level.
|
|
86
|
+
* Permission: 'modify_agent'
|
|
87
|
+
* FM-10: Tenant-scoped query via COALESCE pattern.
|
|
88
|
+
*
|
|
89
|
+
* Trust state machine (I-09):
|
|
90
|
+
* Forward: untrusted→probationary, probationary→trusted, trusted→admin
|
|
91
|
+
* Admin requires actorType='human' (application-level AND trigger enforcement)
|
|
92
|
+
* No skipping levels (untrusted→trusted is INVALID)
|
|
93
|
+
* Retired agents cannot be promoted (blocked by retired terminal trigger)
|
|
94
|
+
* Self-promotion is blocked (Security critical finding)
|
|
95
|
+
*
|
|
96
|
+
* In a transaction:
|
|
97
|
+
* 1. INSERT into core_trust_transitions (audit log)
|
|
98
|
+
* 2. UPDATE core_agents trust_level
|
|
99
|
+
* 3. Return updated AgentView
|
|
100
|
+
*/
|
|
101
|
+
promote(name: string, options?: TrustPromotionOptions): Promise<AgentView>;
|
|
102
|
+
/**
|
|
103
|
+
* I-09: Record a safety violation against an agent.
|
|
104
|
+
* Permission: 'modify_agent'
|
|
105
|
+
* FM-10: Tenant-scoped query via COALESCE pattern.
|
|
106
|
+
*
|
|
107
|
+
* Records the violation and determines automatic trust demotion:
|
|
108
|
+
* critical/high severity → demote to untrusted
|
|
109
|
+
* low/medium on admin → demote to trusted
|
|
110
|
+
* low/medium on trusted → demote to probationary
|
|
111
|
+
* low/medium on probationary → demote to untrusted
|
|
112
|
+
* any on untrusted → no demotion (already lowest)
|
|
113
|
+
*
|
|
114
|
+
* In a transaction:
|
|
115
|
+
* 1. INSERT into core_safety_violations
|
|
116
|
+
* 2. If demotion needed: INSERT into core_trust_transitions + UPDATE core_agents
|
|
117
|
+
* 3. Return updated AgentView
|
|
118
|
+
*/
|
|
119
|
+
recordViolation(name: string, violation: SafetyViolationInput): Promise<AgentView>;
|
|
120
|
+
/**
|
|
121
|
+
* UC-4, A-05: Create a typed agent pipeline for sequential processing.
|
|
122
|
+
* Internally creates a mission with a linear task graph (A-05).
|
|
123
|
+
*/
|
|
124
|
+
pipeline(_stages: readonly PipelineStage[]): AgentPipeline;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=agent_api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent_api.d.ts","sourceRoot":"","sources":["../../../src/api/agents/agent_api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,UAAU,EAE9D,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACV,QAAQ,EAAE,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EACrD,qBAAqB,EAAE,oBAAoB,EAC3D,MAAM,sBAAsB,CAAC;AAmF9B,qBAAa,YAAa,YAAW,QAAQ;IAEzC,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAJL,IAAI,EAAE,UAAU,EAChB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,kBAAkB,EACvC,UAAU,EAAE,MAAM,gBAAgB,EAClC,IAAI,CAAC,EAAE,OAAO,iCAAiC,EAAE,YAAY,YAAA;IAGhF;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;IAEvE;;;;;;;;OAQG;IACG,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC;IAgG7D;;;;;OAKG;IACG,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BxC;;;;;OAKG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BzC;;;;;OAKG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BzC;;;;OAIG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;IAalD;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC;IAY3C;;;;;;;;;;;;;;;;OAgBG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,SAAS,CAAC;IA4FhF;;;;;;;;;;;;;;;;OAgBG;IACG,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC;IA0GxF;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,aAAa;CAiB3D"}
|