@principles/core 1.73.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/dist/adapters/code-review/code-review-pain-adapter.d.ts +13 -0
- package/dist/adapters/code-review/code-review-pain-adapter.d.ts.map +1 -0
- package/dist/adapters/code-review/code-review-pain-adapter.js +139 -0
- package/dist/adapters/code-review/code-review-pain-adapter.js.map +1 -0
- package/dist/adapters/code-review/index.d.ts +6 -0
- package/dist/adapters/code-review/index.d.ts.map +1 -0
- package/dist/adapters/code-review/index.js +2 -0
- package/dist/adapters/code-review/index.js.map +1 -0
- package/dist/adapters/code-review/review-event-types.d.ts +54 -0
- package/dist/adapters/code-review/review-event-types.d.ts.map +1 -0
- package/dist/adapters/code-review/review-event-types.js +8 -0
- package/dist/adapters/code-review/review-event-types.js.map +1 -0
- package/dist/adapters/coding/index.d.ts +6 -0
- package/dist/adapters/coding/index.d.ts.map +1 -0
- package/dist/adapters/coding/index.js +5 -0
- package/dist/adapters/coding/index.js.map +1 -0
- package/dist/adapters/coding/openclaw-event-types.d.ts +26 -0
- package/dist/adapters/coding/openclaw-event-types.d.ts.map +1 -0
- package/dist/adapters/coding/openclaw-event-types.js +9 -0
- package/dist/adapters/coding/openclaw-event-types.js.map +1 -0
- package/dist/adapters/coding/openclaw-pain-adapter.d.ts +27 -0
- package/dist/adapters/coding/openclaw-pain-adapter.d.ts.map +1 -0
- package/dist/adapters/coding/openclaw-pain-adapter.js +102 -0
- package/dist/adapters/coding/openclaw-pain-adapter.js.map +1 -0
- package/dist/adapters/writing/index.d.ts +6 -0
- package/dist/adapters/writing/index.d.ts.map +1 -0
- package/dist/adapters/writing/index.js +5 -0
- package/dist/adapters/writing/index.js.map +1 -0
- package/dist/adapters/writing/writing-pain-adapter.d.ts +22 -0
- package/dist/adapters/writing/writing-pain-adapter.d.ts.map +1 -0
- package/dist/adapters/writing/writing-pain-adapter.js +62 -0
- package/dist/adapters/writing/writing-pain-adapter.js.map +1 -0
- package/dist/adapters/writing/writing-types.d.ts +34 -0
- package/dist/adapters/writing/writing-types.d.ts.map +1 -0
- package/dist/adapters/writing/writing-types.js +9 -0
- package/dist/adapters/writing/writing-types.js.map +1 -0
- package/dist/evolution-hook.d.ts +70 -0
- package/dist/evolution-hook.d.ts.map +1 -0
- package/dist/evolution-hook.js +10 -0
- package/dist/evolution-hook.js.map +1 -0
- package/dist/evolution-store.d.ts +56 -0
- package/dist/evolution-store.d.ts.map +1 -0
- package/dist/evolution-store.js +150 -0
- package/dist/evolution-store.js.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/io.d.ts +36 -0
- package/dist/io.d.ts.map +1 -0
- package/dist/io.js +99 -0
- package/dist/io.js.map +1 -0
- package/dist/pain-flag-resolver.d.ts +18 -0
- package/dist/pain-flag-resolver.d.ts.map +1 -0
- package/dist/pain-flag-resolver.js +21 -0
- package/dist/pain-flag-resolver.js.map +1 -0
- package/dist/pain-recorder.d.ts +38 -0
- package/dist/pain-recorder.d.ts.map +1 -0
- package/dist/pain-recorder.js +62 -0
- package/dist/pain-recorder.js.map +1 -0
- package/dist/pain-signal-adapter.d.ts +37 -0
- package/dist/pain-signal-adapter.d.ts.map +1 -0
- package/dist/pain-signal-adapter.js +2 -0
- package/dist/pain-signal-adapter.js.map +1 -0
- package/dist/pain-signal.d.ts +76 -0
- package/dist/pain-signal.d.ts.map +1 -0
- package/dist/pain-signal.js +125 -0
- package/dist/pain-signal.js.map +1 -0
- package/dist/principle-injector.d.ts +67 -0
- package/dist/principle-injector.d.ts.map +1 -0
- package/dist/principle-injector.js +89 -0
- package/dist/principle-injector.js.map +1 -0
- package/dist/principle-tree-ledger.d.ts +106 -0
- package/dist/principle-tree-ledger.d.ts.map +1 -0
- package/dist/principle-tree-ledger.js +254 -0
- package/dist/principle-tree-ledger.js.map +1 -0
- package/dist/prompt-builder/__tests__/empathy-keyword-matching.test.d.ts +2 -0
- package/dist/prompt-builder/__tests__/empathy-keyword-matching.test.d.ts.map +1 -0
- package/dist/prompt-builder/__tests__/empathy-keyword-matching.test.js +380 -0
- package/dist/prompt-builder/__tests__/empathy-keyword-matching.test.js.map +1 -0
- package/dist/prompt-builder/__tests__/focus-compression.test.d.ts +2 -0
- package/dist/prompt-builder/__tests__/focus-compression.test.d.ts.map +1 -0
- package/dist/prompt-builder/__tests__/focus-compression.test.js +265 -0
- package/dist/prompt-builder/__tests__/focus-compression.test.js.map +1 -0
- package/dist/prompt-builder/__tests__/principle-selection.test.d.ts +7 -0
- package/dist/prompt-builder/__tests__/principle-selection.test.d.ts.map +1 -0
- package/dist/prompt-builder/__tests__/principle-selection.test.js +214 -0
- package/dist/prompt-builder/__tests__/principle-selection.test.js.map +1 -0
- package/dist/prompt-builder/__tests__/prompt-builder-core.test.d.ts +7 -0
- package/dist/prompt-builder/__tests__/prompt-builder-core.test.d.ts.map +1 -0
- package/dist/prompt-builder/__tests__/prompt-builder-core.test.js +283 -0
- package/dist/prompt-builder/__tests__/prompt-builder-core.test.js.map +1 -0
- package/dist/prompt-builder/__tests__/routing-guidance.test.d.ts +11 -0
- package/dist/prompt-builder/__tests__/routing-guidance.test.d.ts.map +1 -0
- package/dist/prompt-builder/__tests__/routing-guidance.test.js +305 -0
- package/dist/prompt-builder/__tests__/routing-guidance.test.js.map +1 -0
- package/dist/prompt-builder/attitude-directive.d.ts +7 -0
- package/dist/prompt-builder/attitude-directive.d.ts.map +1 -0
- package/dist/prompt-builder/attitude-directive.js +39 -0
- package/dist/prompt-builder/attitude-directive.js.map +1 -0
- package/dist/prompt-builder/correction-cue.d.ts +15 -0
- package/dist/prompt-builder/correction-cue.d.ts.map +1 -0
- package/dist/prompt-builder/correction-cue.js +39 -0
- package/dist/prompt-builder/correction-cue.js.map +1 -0
- package/dist/prompt-builder/empathy-keyword-matching.d.ts +30 -0
- package/dist/prompt-builder/empathy-keyword-matching.d.ts.map +1 -0
- package/dist/prompt-builder/empathy-keyword-matching.js +142 -0
- package/dist/prompt-builder/empathy-keyword-matching.js.map +1 -0
- package/dist/prompt-builder/empathy-types.d.ts +62 -0
- package/dist/prompt-builder/empathy-types.d.ts.map +1 -0
- package/dist/prompt-builder/empathy-types.js +88 -0
- package/dist/prompt-builder/empathy-types.js.map +1 -0
- package/dist/prompt-builder/focus-compression.d.ts +63 -0
- package/dist/prompt-builder/focus-compression.d.ts.map +1 -0
- package/dist/prompt-builder/focus-compression.js +448 -0
- package/dist/prompt-builder/focus-compression.js.map +1 -0
- package/dist/prompt-builder/index.d.ts +29 -0
- package/dist/prompt-builder/index.d.ts.map +1 -0
- package/dist/prompt-builder/index.js +27 -0
- package/dist/prompt-builder/index.js.map +1 -0
- package/dist/prompt-builder/message-extraction.d.ts +7 -0
- package/dist/prompt-builder/message-extraction.d.ts.map +1 -0
- package/dist/prompt-builder/message-extraction.js +23 -0
- package/dist/prompt-builder/message-extraction.js.map +1 -0
- package/dist/prompt-builder/minimal-trigger.d.ts +7 -0
- package/dist/prompt-builder/minimal-trigger.d.ts.map +1 -0
- package/dist/prompt-builder/minimal-trigger.js +11 -0
- package/dist/prompt-builder/minimal-trigger.js.map +1 -0
- package/dist/prompt-builder/principle-selection.d.ts +68 -0
- package/dist/prompt-builder/principle-selection.d.ts.map +1 -0
- package/dist/prompt-builder/principle-selection.js +140 -0
- package/dist/prompt-builder/principle-selection.js.map +1 -0
- package/dist/prompt-builder/routing-guidance.d.ts +64 -0
- package/dist/prompt-builder/routing-guidance.d.ts.map +1 -0
- package/dist/prompt-builder/routing-guidance.js +227 -0
- package/dist/prompt-builder/routing-guidance.js.map +1 -0
- package/dist/prompt-builder/size-guard.d.ts +35 -0
- package/dist/prompt-builder/size-guard.d.ts.map +1 -0
- package/dist/prompt-builder/size-guard.js +144 -0
- package/dist/prompt-builder/size-guard.js.map +1 -0
- package/dist/prompt-builder/types.d.ts +28 -0
- package/dist/prompt-builder/types.d.ts.map +1 -0
- package/dist/prompt-builder/types.js +7 -0
- package/dist/prompt-builder/types.js.map +1 -0
- package/dist/runtime-v2/__tests__/admission-gate.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/admission-gate.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/admission-gate.test.js +126 -0
- package/dist/runtime-v2/__tests__/admission-gate.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/architecture-regression.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/architecture-regression.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/architecture-regression.test.js +2990 -0
- package/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/artificer-runner-vslice.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/artificer-runner-vslice.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js +608 -0
- package/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.d.ts +20 -0
- package/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js +473 -0
- package/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/candidate-audit.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/candidate-audit.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/candidate-audit.test.js +100 -0
- package/dist/runtime-v2/__tests__/candidate-audit.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/chain-integrity-attack.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/chain-integrity-attack.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/chain-integrity-attack.test.js +276 -0
- package/dist/runtime-v2/__tests__/chain-integrity-attack.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/chain-integrity-real-path.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/chain-integrity-real-path.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js +561 -0
- package/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/control-plane-triage.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/control-plane-triage.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/control-plane-triage.test.js +107 -0
- package/dist/runtime-v2/__tests__/control-plane-triage.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/correction-proposal.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/correction-proposal.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/correction-proposal.test.js +486 -0
- package/dist/runtime-v2/__tests__/correction-proposal.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-output-validator.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/dreamer-output-validator.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-output-validator.test.js +171 -0
- package/dist/runtime-v2/__tests__/dreamer-output-validator.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.js +155 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.js +515 -0
- package/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-runner.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/dreamer-runner.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/dreamer-runner.test.js +348 -0
- package/dist/runtime-v2/__tests__/dreamer-runner.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/error-categories.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/error-categories.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/error-categories.test.js +149 -0
- package/dist/runtime-v2/__tests__/error-categories.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.js +1047 -0
- package/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/index.d.ts +4 -0
- package/dist/runtime-v2/__tests__/fixtures/index.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/index.js +3 -0
- package/dist/runtime-v2/__tests__/fixtures/index.js.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.d.ts +20 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.js +39 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.js.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.js +111 -0
- package/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/test-helpers.d.ts +20 -0
- package/dist/runtime-v2/__tests__/fixtures/test-helpers.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/fixtures/test-helpers.js +37 -0
- package/dist/runtime-v2/__tests__/fixtures/test-helpers.js.map +1 -0
- package/dist/runtime-v2/__tests__/full-chain-real-llm.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/full-chain-real-llm.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/full-chain-real-llm.test.js +152 -0
- package/dist/runtime-v2/__tests__/full-chain-real-llm.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/full-trace-contract.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/full-trace-contract.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/full-trace-contract.test.js +552 -0
- package/dist/runtime-v2/__tests__/full-trace-contract.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/gfi-workspace-health.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/gfi-workspace-health.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/gfi-workspace-health.test.js +128 -0
- package/dist/runtime-v2/__tests__/gfi-workspace-health.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.js +759 -0
- package/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js +231 -0
- package/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/golden-trace.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/golden-trace.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/golden-trace.test.js +335 -0
- package/dist/runtime-v2/__tests__/golden-trace.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js +307 -0
- package/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js +268 -0
- package/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-contracts.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-contracts.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-contracts.test.js +78 -0
- package/dist/runtime-v2/__tests__/internalization-contracts.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.js +218 -0
- package/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-orchestrator.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-orchestrator.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-orchestrator.test.js +569 -0
- package/dist/runtime-v2/__tests__/internalization-orchestrator.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.js +448 -0
- package/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-queue-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-queue-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-queue-read-model.test.js +415 -0
- package/dist/runtime-v2/__tests__/internalization-queue-read-model.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-route.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-route.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-route.test.js +136 -0
- package/dist/runtime-v2/__tests__/internalization-route.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-state-machine.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/internalization-state-machine.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/internalization-state-machine.test.js +679 -0
- package/dist/runtime-v2/__tests__/internalization-state-machine.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/l1-hard-cap.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/l1-hard-cap.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/l1-hard-cap.test.js +157 -0
- package/dist/runtime-v2/__tests__/l1-hard-cap.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js +215 -0
- package/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.js +102 -0
- package/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.js +148 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi.test.js +113 -0
- package/dist/runtime-v2/__tests__/operator-health-gfi.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/operator-health-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/operator-health-read-model.test.js +136 -0
- package/dist/runtime-v2/__tests__/operator-health-read-model.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pain-chain-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pain-chain-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pain-chain-read-model.test.js +248 -0
- package/dist/runtime-v2/__tests__/pain-chain-read-model.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pain-evidence-contract.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pain-evidence-contract.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pain-evidence-contract.test.js +328 -0
- package/dist/runtime-v2/__tests__/pain-evidence-contract.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pain-flood-simulation.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pain-flood-simulation.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pain-flood-simulation.test.js +267 -0
- package/dist/runtime-v2/__tests__/pain-flood-simulation.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.js +147 -0
- package/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pain-signal-observability.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pain-signal-observability.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pain-signal-observability.test.js +151 -0
- package/dist/runtime-v2/__tests__/pain-signal-observability.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pain-to-principle-service.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pain-to-principle-service.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pain-to-principle-service.test.js +209 -0
- package/dist/runtime-v2/__tests__/pain-to-principle-service.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.js +167 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.js +338 -0
- package/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pi-artifact-store.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pi-artifact-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pi-artifact-store.test.js +247 -0
- package/dist/runtime-v2/__tests__/pi-artifact-store.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pitask-metadata.test.d.ts +8 -0
- package/dist/runtime-v2/__tests__/pitask-metadata.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pitask-metadata.test.js +333 -0
- package/dist/runtime-v2/__tests__/pitask-metadata.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/principle-compiler-core.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/principle-compiler-core.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/principle-compiler-core.test.js +141 -0
- package/dist/runtime-v2/__tests__/principle-compiler-core.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.js +524 -0
- package/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/proven-channel-baseline.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/proven-channel-baseline.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/proven-channel-baseline.test.js +428 -0
- package/dist/runtime-v2/__tests__/proven-channel-baseline.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pruning-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pruning-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pruning-read-model.test.js +783 -0
- package/dist/runtime-v2/__tests__/pruning-read-model.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/pruning-review-log.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/pruning-review-log.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/pruning-review-log.test.js +159 -0
- package/dist/runtime-v2/__tests__/pruning-review-log.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/recovery-sweep-service.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/recovery-sweep-service.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/recovery-sweep-service.test.js +83 -0
- package/dist/runtime-v2/__tests__/recovery-sweep-service.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/remediation-contract.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/remediation-contract.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/remediation-contract.test.js +39 -0
- package/dist/runtime-v2/__tests__/remediation-contract.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js +658 -0
- package/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/rule-host-evaluator.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/rule-host-evaluator.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/rule-host-evaluator.test.js +509 -0
- package/dist/runtime-v2/__tests__/rule-host-evaluator.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.js +535 -0
- package/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/runtime-config-boundary.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/runtime-config-boundary.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/runtime-config-boundary.test.js +256 -0
- package/dist/runtime-v2/__tests__/runtime-config-boundary.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/runtime-state-handle.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/runtime-state-handle.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/runtime-state-handle.test.js +76 -0
- package/dist/runtime-v2/__tests__/runtime-state-handle.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/schema-conformance-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/schema-conformance-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/schema-conformance-read-model.test.js +208 -0
- package/dist/runtime-v2/__tests__/schema-conformance-read-model.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.js +156 -0
- package/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/scribe-runner-vslice.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/scribe-runner-vslice.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/scribe-runner-vslice.test.js +430 -0
- package/dist/runtime-v2/__tests__/scribe-runner-vslice.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.js +148 -0
- package/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.js +95 -0
- package/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/story-a-demo.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/story-a-demo.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/story-a-demo.test.js +257 -0
- package/dist/runtime-v2/__tests__/story-a-demo.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/synthetic-baseline.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/synthetic-baseline.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/synthetic-baseline.test.js +155 -0
- package/dist/runtime-v2/__tests__/synthetic-baseline.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/task-state-semantics.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/task-state-semantics.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/task-state-semantics.test.js +145 -0
- package/dist/runtime-v2/__tests__/task-state-semantics.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/task-three-strikes.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/task-three-strikes.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/task-three-strikes.test.js +268 -0
- package/dist/runtime-v2/__tests__/task-three-strikes.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/trace-refiner-agent.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/trace-refiner-agent.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/trace-refiner-agent.test.js +726 -0
- package/dist/runtime-v2/__tests__/trace-refiner-agent.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/trace-refiner.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/trace-refiner.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/trace-refiner.test.js +527 -0
- package/dist/runtime-v2/__tests__/trace-refiner.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/trainer-output-validator.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/trainer-output-validator.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/trainer-output-validator.test.js +257 -0
- package/dist/runtime-v2/__tests__/trainer-output-validator.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/trainer-runner-vslice.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/trainer-runner-vslice.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/trainer-runner-vslice.test.js +506 -0
- package/dist/runtime-v2/__tests__/trainer-runner-vslice.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/trajectory-store.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/trajectory-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/trajectory-store.test.js +127 -0
- package/dist/runtime-v2/__tests__/trajectory-store.test.js.map +1 -0
- package/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.d.ts +2 -0
- package/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js +510 -0
- package/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js.map +1 -0
- package/dist/runtime-v2/activation/__tests__/approval-context-types.test.d.ts +2 -0
- package/dist/runtime-v2/activation/__tests__/approval-context-types.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/__tests__/approval-context-types.test.js +117 -0
- package/dist/runtime-v2/activation/__tests__/approval-context-types.test.js.map +1 -0
- package/dist/runtime-v2/activation/__tests__/approval-queue.test.d.ts +2 -0
- package/dist/runtime-v2/activation/__tests__/approval-queue.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/__tests__/approval-queue.test.js +179 -0
- package/dist/runtime-v2/activation/__tests__/approval-queue.test.js.map +1 -0
- package/dist/runtime-v2/activation/__tests__/approval-store-extended.test.d.ts +2 -0
- package/dist/runtime-v2/activation/__tests__/approval-store-extended.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js +174 -0
- package/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js.map +1 -0
- package/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.d.ts +2 -0
- package/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.js +244 -0
- package/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.js.map +1 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.d.ts +2 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js +109 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js.map +1 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.d.ts +2 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js +124 -0
- package/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js.map +1 -0
- package/dist/runtime-v2/activation/activation-dispatcher.d.ts +18 -0
- package/dist/runtime-v2/activation/activation-dispatcher.d.ts.map +1 -0
- package/dist/runtime-v2/activation/activation-dispatcher.js +231 -0
- package/dist/runtime-v2/activation/activation-dispatcher.js.map +1 -0
- package/dist/runtime-v2/activation/activation-types.d.ts +195 -0
- package/dist/runtime-v2/activation/activation-types.d.ts.map +1 -0
- package/dist/runtime-v2/activation/activation-types.js +29 -0
- package/dist/runtime-v2/activation/activation-types.js.map +1 -0
- package/dist/runtime-v2/activation/approval-queue.d.ts +15 -0
- package/dist/runtime-v2/activation/approval-queue.d.ts.map +1 -0
- package/dist/runtime-v2/activation/approval-queue.js +50 -0
- package/dist/runtime-v2/activation/approval-queue.js.map +1 -0
- package/dist/runtime-v2/activation/index.d.ts +15 -0
- package/dist/runtime-v2/activation/index.d.ts.map +1 -0
- package/dist/runtime-v2/activation/index.js +11 -0
- package/dist/runtime-v2/activation/index.js.map +1 -0
- package/dist/runtime-v2/activation/low-risk-writers.d.ts +14 -0
- package/dist/runtime-v2/activation/low-risk-writers.d.ts.map +1 -0
- package/dist/runtime-v2/activation/low-risk-writers.js +83 -0
- package/dist/runtime-v2/activation/low-risk-writers.js.map +1 -0
- package/dist/runtime-v2/activation/memory-activation-state-store.d.ts +13 -0
- package/dist/runtime-v2/activation/memory-activation-state-store.d.ts.map +1 -0
- package/dist/runtime-v2/activation/memory-activation-state-store.js +28 -0
- package/dist/runtime-v2/activation/memory-activation-state-store.js.map +1 -0
- package/dist/runtime-v2/activation/memory-approval-store.d.ts +12 -0
- package/dist/runtime-v2/activation/memory-approval-store.d.ts.map +1 -0
- package/dist/runtime-v2/activation/memory-approval-store.js +102 -0
- package/dist/runtime-v2/activation/memory-approval-store.js.map +1 -0
- package/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts +10 -0
- package/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts.map +1 -0
- package/dist/runtime-v2/activation/sqlite-activation-state-store.js +87 -0
- package/dist/runtime-v2/activation/sqlite-activation-state-store.js.map +1 -0
- package/dist/runtime-v2/activation/sqlite-approval-store.d.ts +14 -0
- package/dist/runtime-v2/activation/sqlite-approval-store.d.ts.map +1 -0
- package/dist/runtime-v2/activation/sqlite-approval-store.js +138 -0
- package/dist/runtime-v2/activation/sqlite-approval-store.js.map +1 -0
- package/dist/runtime-v2/activation/sqlite-confirm-first-state-store.d.ts +22 -0
- package/dist/runtime-v2/activation/sqlite-confirm-first-state-store.d.ts.map +1 -0
- package/dist/runtime-v2/activation/sqlite-confirm-first-state-store.js +136 -0
- package/dist/runtime-v2/activation/sqlite-confirm-first-state-store.js.map +1 -0
- package/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.d.ts +2 -0
- package/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.d.ts.map +1 -0
- package/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js +615 -0
- package/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js.map +1 -0
- package/dist/runtime-v2/activation/writers/index.d.ts +3 -0
- package/dist/runtime-v2/activation/writers/index.d.ts.map +1 -0
- package/dist/runtime-v2/activation/writers/index.js +2 -0
- package/dist/runtime-v2/activation/writers/index.js.map +1 -0
- package/dist/runtime-v2/activation/writers/rule-host-writer.d.ts +14 -0
- package/dist/runtime-v2/activation/writers/rule-host-writer.d.ts.map +1 -0
- package/dist/runtime-v2/activation/writers/rule-host-writer.js +135 -0
- package/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.js +553 -0
- package/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/json-extractor.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/json-extractor.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/json-extractor.test.js +148 -0
- package/dist/runtime-v2/adapter/__tests__/json-extractor.test.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.js +565 -0
- package/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.js +305 -0
- package/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +1362 -0
- package/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js +245 -0
- package/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.js +494 -0
- package/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.js.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.d.ts +2 -0
- package/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.js +123 -0
- package/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.js.map +1 -0
- package/dist/runtime-v2/adapter/index.d.ts +10 -0
- package/dist/runtime-v2/adapter/index.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/index.js +6 -0
- package/dist/runtime-v2/adapter/index.js.map +1 -0
- package/dist/runtime-v2/adapter/json-extractor.d.ts +14 -0
- package/dist/runtime-v2/adapter/json-extractor.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/json-extractor.js +97 -0
- package/dist/runtime-v2/adapter/json-extractor.js.map +1 -0
- package/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.d.ts +66 -0
- package/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js +705 -0
- package/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js.map +1 -0
- package/dist/runtime-v2/adapter/output-repair-contract.d.ts +50 -0
- package/dist/runtime-v2/adapter/output-repair-contract.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/output-repair-contract.js +96 -0
- package/dist/runtime-v2/adapter/output-repair-contract.js.map +1 -0
- package/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +114 -0
- package/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +1109 -0
- package/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -0
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.d.ts +22 -0
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.js +84 -0
- package/dist/runtime-v2/adapter/principle-tree-ledger-adapter.js.map +1 -0
- package/dist/runtime-v2/adapter/structured-output-repair.d.ts +95 -0
- package/dist/runtime-v2/adapter/structured-output-repair.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/structured-output-repair.js +259 -0
- package/dist/runtime-v2/adapter/structured-output-repair.js.map +1 -0
- package/dist/runtime-v2/adapter/test-double-runtime-adapter.d.ts +35 -0
- package/dist/runtime-v2/adapter/test-double-runtime-adapter.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/test-double-runtime-adapter.js +94 -0
- package/dist/runtime-v2/adapter/test-double-runtime-adapter.js.map +1 -0
- package/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts +21 -0
- package/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts.map +1 -0
- package/dist/runtime-v2/adapter/tools/diagnostician-tool.js +20 -0
- package/dist/runtime-v2/adapter/tools/diagnostician-tool.js.map +1 -0
- package/dist/runtime-v2/admission-gate.d.ts +27 -0
- package/dist/runtime-v2/admission-gate.d.ts.map +1 -0
- package/dist/runtime-v2/admission-gate.js +57 -0
- package/dist/runtime-v2/admission-gate.js.map +1 -0
- package/dist/runtime-v2/agent-spec.d.ts +86 -0
- package/dist/runtime-v2/agent-spec.d.ts.map +1 -0
- package/dist/runtime-v2/agent-spec.js +74 -0
- package/dist/runtime-v2/agent-spec.js.map +1 -0
- package/dist/runtime-v2/candidate-audit.d.ts +8 -0
- package/dist/runtime-v2/candidate-audit.d.ts.map +1 -0
- package/dist/runtime-v2/candidate-audit.js +47 -0
- package/dist/runtime-v2/candidate-audit.js.map +1 -0
- package/dist/runtime-v2/candidate-intake-service.d.ts +43 -0
- package/dist/runtime-v2/candidate-intake-service.d.ts.map +1 -0
- package/dist/runtime-v2/candidate-intake-service.js +117 -0
- package/dist/runtime-v2/candidate-intake-service.js.map +1 -0
- package/dist/runtime-v2/candidate-intake.d.ts +219 -0
- package/dist/runtime-v2/candidate-intake.d.ts.map +1 -0
- package/dist/runtime-v2/candidate-intake.js +178 -0
- package/dist/runtime-v2/candidate-intake.js.map +1 -0
- package/dist/runtime-v2/cli/diagnose.d.ts +127 -0
- package/dist/runtime-v2/cli/diagnose.d.ts.map +1 -0
- package/dist/runtime-v2/cli/diagnose.js +113 -0
- package/dist/runtime-v2/cli/diagnose.js.map +1 -0
- package/dist/runtime-v2/cli/index.d.ts +5 -0
- package/dist/runtime-v2/cli/index.d.ts.map +1 -0
- package/dist/runtime-v2/cli/index.js +3 -0
- package/dist/runtime-v2/cli/index.js.map +1 -0
- package/dist/runtime-v2/cli/probe.d.ts +31 -0
- package/dist/runtime-v2/cli/probe.d.ts.map +1 -0
- package/dist/runtime-v2/cli/probe.js +58 -0
- package/dist/runtime-v2/cli/probe.js.map +1 -0
- package/dist/runtime-v2/context-payload.d.ts +298 -0
- package/dist/runtime-v2/context-payload.d.ts.map +1 -0
- package/dist/runtime-v2/context-payload.js +140 -0
- package/dist/runtime-v2/context-payload.js.map +1 -0
- package/dist/runtime-v2/control-plane-triage.d.ts +32 -0
- package/dist/runtime-v2/control-plane-triage.d.ts.map +1 -0
- package/dist/runtime-v2/control-plane-triage.js +220 -0
- package/dist/runtime-v2/control-plane-triage.js.map +1 -0
- package/dist/runtime-v2/correction/correction-types.d.ts +87 -0
- package/dist/runtime-v2/correction/correction-types.d.ts.map +1 -0
- package/dist/runtime-v2/correction/correction-types.js +66 -0
- package/dist/runtime-v2/correction/correction-types.js.map +1 -0
- package/dist/runtime-v2/correction/index.d.ts +2 -0
- package/dist/runtime-v2/correction/index.d.ts.map +1 -0
- package/dist/runtime-v2/correction/index.js +2 -0
- package/dist/runtime-v2/correction/index.js.map +1 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.d.ts +2 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.d.ts.map +1 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.js +170 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.js.map +1 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js +314 -0
- package/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/diagnostician-output.d.ts +94 -0
- package/dist/runtime-v2/diagnostician-output.d.ts.map +1 -0
- package/dist/runtime-v2/diagnostician-output.js +65 -0
- package/dist/runtime-v2/diagnostician-output.js.map +1 -0
- package/dist/runtime-v2/diagnostician-prompt-builder.d.ts +125 -0
- package/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/diagnostician-prompt-builder.js +154 -0
- package/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/error-categories.d.ts +42 -0
- package/dist/runtime-v2/error-categories.d.ts.map +1 -0
- package/dist/runtime-v2/error-categories.js +119 -0
- package/dist/runtime-v2/error-categories.js.map +1 -0
- package/dist/runtime-v2/evolution/evolution-types.d.ts +709 -0
- package/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -0
- package/dist/runtime-v2/evolution/evolution-types.js +410 -0
- package/dist/runtime-v2/evolution/evolution-types.js.map +1 -0
- package/dist/runtime-v2/evolution/index.d.ts +2 -0
- package/dist/runtime-v2/evolution/index.d.ts.map +1 -0
- package/dist/runtime-v2/evolution/index.js +2 -0
- package/dist/runtime-v2/evolution/index.js.map +1 -0
- package/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.d.ts +2 -0
- package/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.d.ts.map +1 -0
- package/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +298 -0
- package/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -0
- package/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts +35 -0
- package/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -0
- package/dist/runtime-v2/feature-flags/feature-flag-contract.js +124 -0
- package/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -0
- package/dist/runtime-v2/feature-flags/index.d.ts +3 -0
- package/dist/runtime-v2/feature-flags/index.d.ts.map +1 -0
- package/dist/runtime-v2/feature-flags/index.js +2 -0
- package/dist/runtime-v2/feature-flags/index.js.map +1 -0
- package/dist/runtime-v2/full-trace-contract.d.ts +79 -0
- package/dist/runtime-v2/full-trace-contract.d.ts.map +1 -0
- package/dist/runtime-v2/full-trace-contract.js +464 -0
- package/dist/runtime-v2/full-trace-contract.js.map +1 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.d.ts +2 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.d.ts.map +1 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.js +626 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.js.map +1 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.js +212 -0
- package/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.js.map +1 -0
- package/dist/runtime-v2/gfi/gfi-kernel.d.ts +12 -0
- package/dist/runtime-v2/gfi/gfi-kernel.d.ts.map +1 -0
- package/dist/runtime-v2/gfi/gfi-kernel.js +148 -0
- package/dist/runtime-v2/gfi/gfi-kernel.js.map +1 -0
- package/dist/runtime-v2/gfi/gfi-policy.d.ts +3 -0
- package/dist/runtime-v2/gfi/gfi-policy.d.ts.map +1 -0
- package/dist/runtime-v2/gfi/gfi-policy.js +23 -0
- package/dist/runtime-v2/gfi/gfi-policy.js.map +1 -0
- package/dist/runtime-v2/gfi/gfi-read-model.d.ts +78 -0
- package/dist/runtime-v2/gfi/gfi-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/gfi/gfi-read-model.js +129 -0
- package/dist/runtime-v2/gfi/gfi-read-model.js.map +1 -0
- package/dist/runtime-v2/gfi/gfi-types.d.ts +70 -0
- package/dist/runtime-v2/gfi/gfi-types.d.ts.map +1 -0
- package/dist/runtime-v2/gfi/gfi-types.js +2 -0
- package/dist/runtime-v2/gfi/gfi-types.js.map +1 -0
- package/dist/runtime-v2/gfi/index.d.ts +6 -0
- package/dist/runtime-v2/gfi/index.d.ts.map +1 -0
- package/dist/runtime-v2/gfi/index.js +4 -0
- package/dist/runtime-v2/gfi/index.js.map +1 -0
- package/dist/runtime-v2/golden-trace-candidate-builder.d.ts +23 -0
- package/dist/runtime-v2/golden-trace-candidate-builder.d.ts.map +1 -0
- package/dist/runtime-v2/golden-trace-candidate-builder.js +193 -0
- package/dist/runtime-v2/golden-trace-candidate-builder.js.map +1 -0
- package/dist/runtime-v2/golden-trace-replay-adapter.d.ts +18 -0
- package/dist/runtime-v2/golden-trace-replay-adapter.d.ts.map +1 -0
- package/dist/runtime-v2/golden-trace-replay-adapter.js +18 -0
- package/dist/runtime-v2/golden-trace-replay-adapter.js.map +1 -0
- package/dist/runtime-v2/golden-trace-replay-validator.d.ts +42 -0
- package/dist/runtime-v2/golden-trace-replay-validator.d.ts.map +1 -0
- package/dist/runtime-v2/golden-trace-replay-validator.js +220 -0
- package/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -0
- package/dist/runtime-v2/golden-trace.d.ts +80 -0
- package/dist/runtime-v2/golden-trace.d.ts.map +1 -0
- package/dist/runtime-v2/golden-trace.js +158 -0
- package/dist/runtime-v2/golden-trace.js.map +1 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts +2 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts.map +1 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js +92 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js.map +1 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts +2 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts.map +1 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js +134 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js.map +1 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts +2 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts.map +1 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js +226 -0
- package/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js.map +1 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts +3 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts.map +1 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-decision.js +5 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-decision.js.map +1 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts +4 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts.map +1 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-policy.js +81 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-policy.js.map +1 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts +29 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts.map +1 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-types.js +15 -0
- package/dist/runtime-v2/idle-trigger/idle-trigger-types.js.map +1 -0
- package/dist/runtime-v2/idle-trigger/index.d.ts +5 -0
- package/dist/runtime-v2/idle-trigger/index.d.ts.map +1 -0
- package/dist/runtime-v2/idle-trigger/index.js +4 -0
- package/dist/runtime-v2/idle-trigger/index.js.map +1 -0
- package/dist/runtime-v2/index.d.ts +281 -0
- package/dist/runtime-v2/index.d.ts.map +1 -0
- package/dist/runtime-v2/index.js +224 -0
- package/dist/runtime-v2/index.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +57 -0
- package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.js +182 -0
- package/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.js +112 -0
- package/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.js +176 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.js +297 -0
- package/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.js +149 -0
- package/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/queue-actionability.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/queue-actionability.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/queue-actionability.test.js +92 -0
- package/dist/runtime-v2/internalization/__tests__/queue-actionability.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.js +431 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js +763 -0
- package/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.js +75 -0
- package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js +56 -0
- package/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.js +141 -0
- package/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/artificer-output.d.ts +67 -0
- package/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/artificer-output.js +103 -0
- package/dist/runtime-v2/internalization/artificer-output.js.map +1 -0
- package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +24 -0
- package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/artificer-prompt-builder.js +62 -0
- package/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/artificer-runner.d.ts +77 -0
- package/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/artificer-runner.js +521 -0
- package/dist/runtime-v2/internalization/artificer-runner.js.map +1 -0
- package/dist/runtime-v2/internalization/compile-result.d.ts +20 -0
- package/dist/runtime-v2/internalization/compile-result.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/compile-result.js +8 -0
- package/dist/runtime-v2/internalization/compile-result.js.map +1 -0
- package/dist/runtime-v2/internalization/correction-proposal.d.ts +38 -0
- package/dist/runtime-v2/internalization/correction-proposal.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/correction-proposal.js +322 -0
- package/dist/runtime-v2/internalization/correction-proposal.js.map +1 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.d.ts +20 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.js +75 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.js.map +1 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.test.js +127 -0
- package/dist/runtime-v2/internalization/deprecated-readiness.test.js.map +1 -0
- package/dist/runtime-v2/internalization/dreamer-output.d.ts +120 -0
- package/dist/runtime-v2/internalization/dreamer-output.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/dreamer-output.js +92 -0
- package/dist/runtime-v2/internalization/dreamer-output.js.map +1 -0
- package/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts +41 -0
- package/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/dreamer-prompt-builder.js +43 -0
- package/dist/runtime-v2/internalization/dreamer-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/dreamer-runner.d.ts +134 -0
- package/dist/runtime-v2/internalization/dreamer-runner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/dreamer-runner.js +636 -0
- package/dist/runtime-v2/internalization/dreamer-runner.js.map +1 -0
- package/dist/runtime-v2/internalization/evaluator-output.d.ts +71 -0
- package/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/evaluator-output.js +113 -0
- package/dist/runtime-v2/internalization/evaluator-output.js.map +1 -0
- package/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +24 -0
- package/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/evaluator-prompt-builder.js +49 -0
- package/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/evaluator-runner.d.ts +80 -0
- package/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/evaluator-runner.js +661 -0
- package/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -0
- package/dist/runtime-v2/internalization/index.d.ts +81 -0
- package/dist/runtime-v2/internalization/index.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/index.js +47 -0
- package/dist/runtime-v2/internalization/index.js.map +1 -0
- package/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts +57 -0
- package/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/intake-to-internalization-bridge.js +99 -0
- package/dist/runtime-v2/internalization/intake-to-internalization-bridge.js.map +1 -0
- package/dist/runtime-v2/internalization/internalization-job-graph.d.ts +78 -0
- package/dist/runtime-v2/internalization/internalization-job-graph.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/internalization-job-graph.js +153 -0
- package/dist/runtime-v2/internalization/internalization-job-graph.js.map +1 -0
- package/dist/runtime-v2/internalization/internalization-orchestrator.d.ts +182 -0
- package/dist/runtime-v2/internalization/internalization-orchestrator.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/internalization-orchestrator.js +355 -0
- package/dist/runtime-v2/internalization/internalization-orchestrator.js.map +1 -0
- package/dist/runtime-v2/internalization/internalization-route.d.ts +28 -0
- package/dist/runtime-v2/internalization/internalization-route.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/internalization-route.js +112 -0
- package/dist/runtime-v2/internalization/internalization-route.js.map +1 -0
- package/dist/runtime-v2/internalization/internalization-state-machine.d.ts +157 -0
- package/dist/runtime-v2/internalization/internalization-state-machine.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/internalization-state-machine.js +274 -0
- package/dist/runtime-v2/internalization/internalization-state-machine.js.map +1 -0
- package/dist/runtime-v2/internalization/internalization-task-guards.d.ts +92 -0
- package/dist/runtime-v2/internalization/internalization-task-guards.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/internalization-task-guards.js +152 -0
- package/dist/runtime-v2/internalization/internalization-task-guards.js.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-datasource.d.ts +18 -0
- package/dist/runtime-v2/internalization/lifecycle-datasource.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-datasource.js +2 -0
- package/dist/runtime-v2/internalization/lifecycle-datasource.js.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.d.ts +24 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.js +124 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.js.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.test.js +201 -0
- package/dist/runtime-v2/internalization/lifecycle-metrics.test.js.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.d.ts +11 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.js +155 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.js.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.test.js +408 -0
- package/dist/runtime-v2/internalization/lifecycle-read-model.test.js.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-types.d.ts +75 -0
- package/dist/runtime-v2/internalization/lifecycle-types.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/lifecycle-types.js +2 -0
- package/dist/runtime-v2/internalization/lifecycle-types.js.map +1 -0
- package/dist/runtime-v2/internalization/peer-runner-contracts.d.ts +140 -0
- package/dist/runtime-v2/internalization/peer-runner-contracts.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/peer-runner-contracts.js +124 -0
- package/dist/runtime-v2/internalization/peer-runner-contracts.js.map +1 -0
- package/dist/runtime-v2/internalization/philosopher-output.d.ts +56 -0
- package/dist/runtime-v2/internalization/philosopher-output.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/philosopher-output.js +69 -0
- package/dist/runtime-v2/internalization/philosopher-output.js.map +1 -0
- package/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts +41 -0
- package/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/philosopher-prompt-builder.js +50 -0
- package/dist/runtime-v2/internalization/philosopher-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/philosopher-runner.d.ts +103 -0
- package/dist/runtime-v2/internalization/philosopher-runner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/philosopher-runner.js +519 -0
- package/dist/runtime-v2/internalization/philosopher-runner.js.map +1 -0
- package/dist/runtime-v2/internalization/pi-artifact-store.d.ts +13 -0
- package/dist/runtime-v2/internalization/pi-artifact-store.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/pi-artifact-store.js +65 -0
- package/dist/runtime-v2/internalization/pi-artifact-store.js.map +1 -0
- package/dist/runtime-v2/internalization/pi-artifact.d.ts +23 -0
- package/dist/runtime-v2/internalization/pi-artifact.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/pi-artifact.js +2 -0
- package/dist/runtime-v2/internalization/pi-artifact.js.map +1 -0
- package/dist/runtime-v2/internalization/pitask-metadata.d.ts +80 -0
- package/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/pitask-metadata.js +194 -0
- package/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -0
- package/dist/runtime-v2/internalization/queue-actionability.d.ts +37 -0
- package/dist/runtime-v2/internalization/queue-actionability.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/queue-actionability.js +50 -0
- package/dist/runtime-v2/internalization/queue-actionability.js.map +1 -0
- package/dist/runtime-v2/internalization/refiner-rulehost-gate.d.ts +20 -0
- package/dist/runtime-v2/internalization/refiner-rulehost-gate.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/refiner-rulehost-gate.js +151 -0
- package/dist/runtime-v2/internalization/refiner-rulehost-gate.js.map +1 -0
- package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts +36 -0
- package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js +227 -0
- package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts +74 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-output.js +117 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-output.js.map +1 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts +24 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js +52 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts +76 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-runner.js +538 -0
- package/dist/runtime-v2/internalization/rollout-reviewer-runner.js.map +1 -0
- package/dist/runtime-v2/internalization/routing-policy.d.ts +24 -0
- package/dist/runtime-v2/internalization/routing-policy.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/routing-policy.js +169 -0
- package/dist/runtime-v2/internalization/routing-policy.js.map +1 -0
- package/dist/runtime-v2/internalization/routing-policy.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/routing-policy.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/routing-policy.test.js +286 -0
- package/dist/runtime-v2/internalization/routing-policy.test.js.map +1 -0
- package/dist/runtime-v2/internalization/rule-code-validator.d.ts +21 -0
- package/dist/runtime-v2/internalization/rule-code-validator.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rule-code-validator.js +42 -0
- package/dist/runtime-v2/internalization/rule-code-validator.js.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-adapter.d.ts +16 -0
- package/dist/runtime-v2/internalization/rule-host-adapter.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-adapter.js +13 -0
- package/dist/runtime-v2/internalization/rule-host-adapter.js.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-contracts.d.ts +61 -0
- package/dist/runtime-v2/internalization/rule-host-contracts.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-contracts.js +14 -0
- package/dist/runtime-v2/internalization/rule-host-contracts.js.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-evaluator.d.ts +36 -0
- package/dist/runtime-v2/internalization/rule-host-evaluator.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-evaluator.js +103 -0
- package/dist/runtime-v2/internalization/rule-host-evaluator.js.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-helpers.d.ts +27 -0
- package/dist/runtime-v2/internalization/rule-host-helpers.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-helpers.js +27 -0
- package/dist/runtime-v2/internalization/rule-host-helpers.js.map +1 -0
- package/dist/runtime-v2/internalization/scribe-output.d.ts +74 -0
- package/dist/runtime-v2/internalization/scribe-output.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/scribe-output.js +98 -0
- package/dist/runtime-v2/internalization/scribe-output.js.map +1 -0
- package/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +24 -0
- package/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/scribe-prompt-builder.js +60 -0
- package/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/scribe-runner.d.ts +77 -0
- package/dist/runtime-v2/internalization/scribe-runner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/scribe-runner.js +518 -0
- package/dist/runtime-v2/internalization/scribe-runner.js.map +1 -0
- package/dist/runtime-v2/internalization/template-generator.d.ts +21 -0
- package/dist/runtime-v2/internalization/template-generator.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/template-generator.js +61 -0
- package/dist/runtime-v2/internalization/template-generator.js.map +1 -0
- package/dist/runtime-v2/internalization/trainer-output.d.ts +122 -0
- package/dist/runtime-v2/internalization/trainer-output.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/trainer-output.js +223 -0
- package/dist/runtime-v2/internalization/trainer-output.js.map +1 -0
- package/dist/runtime-v2/internalization/trainer-prompt-builder.d.ts +24 -0
- package/dist/runtime-v2/internalization/trainer-prompt-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/trainer-prompt-builder.js +57 -0
- package/dist/runtime-v2/internalization/trainer-prompt-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/trainer-runner.d.ts +76 -0
- package/dist/runtime-v2/internalization/trainer-runner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/trainer-runner.js +538 -0
- package/dist/runtime-v2/internalization/trainer-runner.js.map +1 -0
- package/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts +42 -0
- package/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/internalization-chain-integrity-read-model.js +413 -0
- package/dist/runtime-v2/internalization-chain-integrity-read-model.js.map +1 -0
- package/dist/runtime-v2/internalization-integrity-remediation.d.ts +17 -0
- package/dist/runtime-v2/internalization-integrity-remediation.d.ts.map +1 -0
- package/dist/runtime-v2/internalization-integrity-remediation.js +269 -0
- package/dist/runtime-v2/internalization-integrity-remediation.js.map +1 -0
- package/dist/runtime-v2/internalization-queue-read-model.d.ts +93 -0
- package/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/internalization-queue-read-model.js +217 -0
- package/dist/runtime-v2/internalization-queue-read-model.js.map +1 -0
- package/dist/runtime-v2/l1-hard-cap.d.ts +21 -0
- package/dist/runtime-v2/l1-hard-cap.d.ts.map +1 -0
- package/dist/runtime-v2/l1-hard-cap.js +51 -0
- package/dist/runtime-v2/l1-hard-cap.js.map +1 -0
- package/dist/runtime-v2/nocturnal/candidate-scoring.d.ts +486 -0
- package/dist/runtime-v2/nocturnal/candidate-scoring.d.ts.map +1 -0
- package/dist/runtime-v2/nocturnal/candidate-scoring.js +493 -0
- package/dist/runtime-v2/nocturnal/candidate-scoring.js.map +1 -0
- package/dist/runtime-v2/nocturnal/index.d.ts +9 -0
- package/dist/runtime-v2/nocturnal/index.d.ts.map +1 -0
- package/dist/runtime-v2/nocturnal/index.js +5 -0
- package/dist/runtime-v2/nocturnal/index.js.map +1 -0
- package/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts +185 -0
- package/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts.map +1 -0
- package/dist/runtime-v2/nocturnal/nocturnal-compliance.js +912 -0
- package/dist/runtime-v2/nocturnal/nocturnal-compliance.js.map +1 -0
- package/dist/runtime-v2/nocturnal/snapshot-contract.d.ts +192 -0
- package/dist/runtime-v2/nocturnal/snapshot-contract.d.ts.map +1 -0
- package/dist/runtime-v2/nocturnal/snapshot-contract.js +185 -0
- package/dist/runtime-v2/nocturnal/snapshot-contract.js.map +1 -0
- package/dist/runtime-v2/nocturnal/trinity-types.d.ts +421 -0
- package/dist/runtime-v2/nocturnal/trinity-types.d.ts.map +1 -0
- package/dist/runtime-v2/nocturnal/trinity-types.js +182 -0
- package/dist/runtime-v2/nocturnal/trinity-types.js.map +1 -0
- package/dist/runtime-v2/observer/__tests__/agent-scheduler.test.d.ts +2 -0
- package/dist/runtime-v2/observer/__tests__/agent-scheduler.test.d.ts.map +1 -0
- package/dist/runtime-v2/observer/__tests__/agent-scheduler.test.js +49 -0
- package/dist/runtime-v2/observer/__tests__/agent-scheduler.test.js.map +1 -0
- package/dist/runtime-v2/observer/__tests__/correction-observer.test.d.ts +2 -0
- package/dist/runtime-v2/observer/__tests__/correction-observer.test.d.ts.map +1 -0
- package/dist/runtime-v2/observer/__tests__/correction-observer.test.js +144 -0
- package/dist/runtime-v2/observer/__tests__/correction-observer.test.js.map +1 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.d.ts +2 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.d.ts.map +1 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.js +67 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.js.map +1 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.test.d.ts +2 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.test.d.ts.map +1 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.test.js +84 -0
- package/dist/runtime-v2/observer/__tests__/empathy-observer.test.js.map +1 -0
- package/dist/runtime-v2/observer/agent-scheduler.d.ts +40 -0
- package/dist/runtime-v2/observer/agent-scheduler.d.ts.map +1 -0
- package/dist/runtime-v2/observer/agent-scheduler.js +30 -0
- package/dist/runtime-v2/observer/agent-scheduler.js.map +1 -0
- package/dist/runtime-v2/observer/correction-observer.d.ts +59 -0
- package/dist/runtime-v2/observer/correction-observer.d.ts.map +1 -0
- package/dist/runtime-v2/observer/correction-observer.js +178 -0
- package/dist/runtime-v2/observer/correction-observer.js.map +1 -0
- package/dist/runtime-v2/observer/empathy-observer.d.ts +35 -0
- package/dist/runtime-v2/observer/empathy-observer.d.ts.map +1 -0
- package/dist/runtime-v2/observer/empathy-observer.js +98 -0
- package/dist/runtime-v2/observer/empathy-observer.js.map +1 -0
- package/dist/runtime-v2/operator-health-read-model.d.ts +45 -0
- package/dist/runtime-v2/operator-health-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/operator-health-read-model.js +189 -0
- package/dist/runtime-v2/operator-health-read-model.js.map +1 -0
- package/dist/runtime-v2/pain-chain-read-model.d.ts +40 -0
- package/dist/runtime-v2/pain-chain-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/pain-chain-read-model.js +293 -0
- package/dist/runtime-v2/pain-chain-read-model.js.map +1 -0
- package/dist/runtime-v2/pain-flood-simulation.d.ts +62 -0
- package/dist/runtime-v2/pain-flood-simulation.d.ts.map +1 -0
- package/dist/runtime-v2/pain-flood-simulation.js +152 -0
- package/dist/runtime-v2/pain-flood-simulation.js.map +1 -0
- package/dist/runtime-v2/pain-signal-bridge.d.ts +72 -0
- package/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -0
- package/dist/runtime-v2/pain-signal-bridge.js +340 -0
- package/dist/runtime-v2/pain-signal-bridge.js.map +1 -0
- package/dist/runtime-v2/pain-signal-observability.d.ts +19 -0
- package/dist/runtime-v2/pain-signal-observability.d.ts.map +1 -0
- package/dist/runtime-v2/pain-signal-observability.js +161 -0
- package/dist/runtime-v2/pain-signal-observability.js.map +1 -0
- package/dist/runtime-v2/pain-signal-runtime-factory.d.ts +82 -0
- package/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -0
- package/dist/runtime-v2/pain-signal-runtime-factory.js +279 -0
- package/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -0
- package/dist/runtime-v2/pain-to-principle-service.d.ts +53 -0
- package/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -0
- package/dist/runtime-v2/pain-to-principle-service.js +114 -0
- package/dist/runtime-v2/pain-to-principle-service.js.map +1 -0
- package/dist/runtime-v2/proven-channel-baseline.d.ts +56 -0
- package/dist/runtime-v2/proven-channel-baseline.d.ts.map +1 -0
- package/dist/runtime-v2/proven-channel-baseline.js +480 -0
- package/dist/runtime-v2/proven-channel-baseline.js.map +1 -0
- package/dist/runtime-v2/pruning-mask.d.ts +27 -0
- package/dist/runtime-v2/pruning-mask.d.ts.map +1 -0
- package/dist/runtime-v2/pruning-mask.js +59 -0
- package/dist/runtime-v2/pruning-mask.js.map +1 -0
- package/dist/runtime-v2/pruning-read-model.d.ts +76 -0
- package/dist/runtime-v2/pruning-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/pruning-read-model.js +266 -0
- package/dist/runtime-v2/pruning-read-model.js.map +1 -0
- package/dist/runtime-v2/pruning-review-log.d.ts +41 -0
- package/dist/runtime-v2/pruning-review-log.d.ts.map +1 -0
- package/dist/runtime-v2/pruning-review-log.js +106 -0
- package/dist/runtime-v2/pruning-review-log.js.map +1 -0
- package/dist/runtime-v2/recovery-sweep-service.d.ts +14 -0
- package/dist/runtime-v2/recovery-sweep-service.d.ts.map +1 -0
- package/dist/runtime-v2/recovery-sweep-service.js +26 -0
- package/dist/runtime-v2/recovery-sweep-service.js.map +1 -0
- package/dist/runtime-v2/remediation-contract.d.ts +46 -0
- package/dist/runtime-v2/remediation-contract.d.ts.map +1 -0
- package/dist/runtime-v2/remediation-contract.js +29 -0
- package/dist/runtime-v2/remediation-contract.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/default-validator.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/default-validator.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/default-validator.test.js +526 -0
- package/dist/runtime-v2/runner/__tests__/default-validator.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnose.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/diagnose.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnose.test.js +81 -0
- package/dist/runtime-v2/runner/__tests__/diagnose.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.js +378 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.js +642 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.js +286 -0
- package/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.js +320 -0
- package/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.js +261 -0
- package/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.js +405 -0
- package/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.js +347 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.js +186 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.js +355 -0
- package/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.js +488 -0
- package/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.js +171 -0
- package/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m9-e2e.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/m9-e2e.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/m9-e2e.test.js +182 -0
- package/dist/runtime-v2/runner/__tests__/m9-e2e.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.js +276 -0
- package/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.js +462 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.js +160 -0
- package/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.js +272 -0
- package/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.js.map +1 -0
- package/dist/runtime-v2/runner/__tests__/start-run-input.test.d.ts +2 -0
- package/dist/runtime-v2/runner/__tests__/start-run-input.test.d.ts.map +1 -0
- package/dist/runtime-v2/runner/__tests__/start-run-input.test.js +67 -0
- package/dist/runtime-v2/runner/__tests__/start-run-input.test.js.map +1 -0
- package/dist/runtime-v2/runner/default-validator.d.ts +10 -0
- package/dist/runtime-v2/runner/default-validator.d.ts.map +1 -0
- package/dist/runtime-v2/runner/default-validator.js +168 -0
- package/dist/runtime-v2/runner/default-validator.js.map +1 -0
- package/dist/runtime-v2/runner/diagnostician-runner-options.d.ts +37 -0
- package/dist/runtime-v2/runner/diagnostician-runner-options.d.ts.map +1 -0
- package/dist/runtime-v2/runner/diagnostician-runner-options.js +19 -0
- package/dist/runtime-v2/runner/diagnostician-runner-options.js.map +1 -0
- package/dist/runtime-v2/runner/diagnostician-runner.d.ts +87 -0
- package/dist/runtime-v2/runner/diagnostician-runner.d.ts.map +1 -0
- package/dist/runtime-v2/runner/diagnostician-runner.js +417 -0
- package/dist/runtime-v2/runner/diagnostician-runner.js.map +1 -0
- package/dist/runtime-v2/runner/diagnostician-validator.d.ts +56 -0
- package/dist/runtime-v2/runner/diagnostician-validator.d.ts.map +1 -0
- package/dist/runtime-v2/runner/diagnostician-validator.js +11 -0
- package/dist/runtime-v2/runner/diagnostician-validator.js.map +1 -0
- package/dist/runtime-v2/runner/runner-phase.d.ts +21 -0
- package/dist/runtime-v2/runner/runner-phase.d.ts.map +1 -0
- package/dist/runtime-v2/runner/runner-phase.js +22 -0
- package/dist/runtime-v2/runner/runner-phase.js.map +1 -0
- package/dist/runtime-v2/runner/runner-result.d.ts +20 -0
- package/dist/runtime-v2/runner/runner-result.d.ts.map +1 -0
- package/dist/runtime-v2/runner/runner-result.js +2 -0
- package/dist/runtime-v2/runner/runner-result.js.map +1 -0
- package/dist/runtime-v2/runtime-protocol.d.ts +165 -0
- package/dist/runtime-v2/runtime-protocol.d.ts.map +1 -0
- package/dist/runtime-v2/runtime-protocol.js +130 -0
- package/dist/runtime-v2/runtime-protocol.js.map +1 -0
- package/dist/runtime-v2/runtime-selector.d.ts +77 -0
- package/dist/runtime-v2/runtime-selector.d.ts.map +1 -0
- package/dist/runtime-v2/runtime-selector.js +23 -0
- package/dist/runtime-v2/runtime-selector.js.map +1 -0
- package/dist/runtime-v2/runtime-state-handle.d.ts +10 -0
- package/dist/runtime-v2/runtime-state-handle.d.ts.map +1 -0
- package/dist/runtime-v2/runtime-state-handle.js +30 -0
- package/dist/runtime-v2/runtime-state-handle.js.map +1 -0
- package/dist/runtime-v2/schema-conformance-read-model.d.ts +24 -0
- package/dist/runtime-v2/schema-conformance-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/schema-conformance-read-model.js +178 -0
- package/dist/runtime-v2/schema-conformance-read-model.js.map +1 -0
- package/dist/runtime-v2/schema-version.d.ts +20 -0
- package/dist/runtime-v2/schema-version.d.ts.map +1 -0
- package/dist/runtime-v2/schema-version.js +20 -0
- package/dist/runtime-v2/schema-version.js.map +1 -0
- package/dist/runtime-v2/store/artifact/artifact-store.d.ts +28 -0
- package/dist/runtime-v2/store/artifact/artifact-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/artifact/artifact-store.js +2 -0
- package/dist/runtime-v2/store/artifact/artifact-store.js.map +1 -0
- package/dist/runtime-v2/store/artifact/index.d.ts +4 -0
- package/dist/runtime-v2/store/artifact/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/artifact/index.js +3 -0
- package/dist/runtime-v2/store/artifact/index.js.map +1 -0
- package/dist/runtime-v2/store/artifact/memory-artifact-store.d.ts +14 -0
- package/dist/runtime-v2/store/artifact/memory-artifact-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/artifact/memory-artifact-store.js +25 -0
- package/dist/runtime-v2/store/artifact/memory-artifact-store.js.map +1 -0
- package/dist/runtime-v2/store/artifact/sqlite-artifact-store.d.ts +12 -0
- package/dist/runtime-v2/store/artifact/sqlite-artifact-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/artifact/sqlite-artifact-store.js +51 -0
- package/dist/runtime-v2/store/artifact/sqlite-artifact-store.js.map +1 -0
- package/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.d.ts +13 -0
- package/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js +98 -0
- package/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js.map +1 -0
- package/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.d.ts +2 -0
- package/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.js +34 -0
- package/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.js.map +1 -0
- package/dist/runtime-v2/store/candidate/candidate-store.d.ts +42 -0
- package/dist/runtime-v2/store/candidate/candidate-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/candidate/candidate-store.js +2 -0
- package/dist/runtime-v2/store/candidate/candidate-store.js.map +1 -0
- package/dist/runtime-v2/store/candidate/index.d.ts +4 -0
- package/dist/runtime-v2/store/candidate/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/candidate/index.js +3 -0
- package/dist/runtime-v2/store/candidate/index.js.map +1 -0
- package/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts +22 -0
- package/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/candidate/memory-candidate-store.js +36 -0
- package/dist/runtime-v2/store/candidate/memory-candidate-store.js.map +1 -0
- package/dist/runtime-v2/store/candidate/recommendation-kind-resolver.d.ts +4 -0
- package/dist/runtime-v2/store/candidate/recommendation-kind-resolver.d.ts.map +1 -0
- package/dist/runtime-v2/store/candidate/recommendation-kind-resolver.js +14 -0
- package/dist/runtime-v2/store/candidate/recommendation-kind-resolver.js.map +1 -0
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts +13 -0
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +61 -0
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -0
- package/dist/runtime-v2/store/commit/commit-store.d.ts +19 -0
- package/dist/runtime-v2/store/commit/commit-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/commit/commit-store.js +2 -0
- package/dist/runtime-v2/store/commit/commit-store.js.map +1 -0
- package/dist/runtime-v2/store/commit/diagnostician-committer.d.ts +47 -0
- package/dist/runtime-v2/store/commit/diagnostician-committer.d.ts.map +1 -0
- package/dist/runtime-v2/store/commit/diagnostician-committer.js +140 -0
- package/dist/runtime-v2/store/commit/diagnostician-committer.js.map +1 -0
- package/dist/runtime-v2/store/commit/index.d.ts +7 -0
- package/dist/runtime-v2/store/commit/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/commit/index.js +4 -0
- package/dist/runtime-v2/store/commit/index.js.map +1 -0
- package/dist/runtime-v2/store/commit/memory-commit-store.d.ts +16 -0
- package/dist/runtime-v2/store/commit/memory-commit-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/commit/memory-commit-store.js +18 -0
- package/dist/runtime-v2/store/commit/memory-commit-store.js.map +1 -0
- package/dist/runtime-v2/store/commit/sqlite-commit-store.d.ts +11 -0
- package/dist/runtime-v2/store/commit/sqlite-commit-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/commit/sqlite-commit-store.js +25 -0
- package/dist/runtime-v2/store/commit/sqlite-commit-store.js.map +1 -0
- package/dist/runtime-v2/store/concurrent-lease.test.d.ts +2 -0
- package/dist/runtime-v2/store/concurrent-lease.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/concurrent-lease.test.js +129 -0
- package/dist/runtime-v2/store/concurrent-lease.test.js.map +1 -0
- package/dist/runtime-v2/store/context/context-assembler.d.ts +19 -0
- package/dist/runtime-v2/store/context/context-assembler.d.ts.map +1 -0
- package/dist/runtime-v2/store/context/context-assembler.js +2 -0
- package/dist/runtime-v2/store/context/context-assembler.js.map +1 -0
- package/dist/runtime-v2/store/context/index.d.ts +4 -0
- package/dist/runtime-v2/store/context/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/context/index.js +3 -0
- package/dist/runtime-v2/store/context/index.js.map +1 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.d.ts +13 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.d.ts.map +1 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.js +72 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.js.map +1 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.test.d.ts +2 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.test.js +113 -0
- package/dist/runtime-v2/store/context/resilient-context-assembler.test.js.map +1 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts +28 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts.map +1 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.js +277 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.test.d.ts +2 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.test.js +1181 -0
- package/dist/runtime-v2/store/context/sqlite-context-assembler.test.js.map +1 -0
- package/dist/runtime-v2/store/diagnostician-committer.test.d.ts +2 -0
- package/dist/runtime-v2/store/diagnostician-committer.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/diagnostician-committer.test.js +326 -0
- package/dist/runtime-v2/store/diagnostician-committer.test.js.map +1 -0
- package/dist/runtime-v2/store/event-emitter.d.ts +18 -0
- package/dist/runtime-v2/store/event-emitter.d.ts.map +1 -0
- package/dist/runtime-v2/store/event-emitter.js +78 -0
- package/dist/runtime-v2/store/event-emitter.js.map +1 -0
- package/dist/runtime-v2/store/history/history-query.d.ts +57 -0
- package/dist/runtime-v2/store/history/history-query.d.ts.map +1 -0
- package/dist/runtime-v2/store/history/history-query.js +7 -0
- package/dist/runtime-v2/store/history/history-query.js.map +1 -0
- package/dist/runtime-v2/store/history/index.d.ts +5 -0
- package/dist/runtime-v2/store/history/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/history/index.js +4 -0
- package/dist/runtime-v2/store/history/index.js.map +1 -0
- package/dist/runtime-v2/store/history/resilient-history-query.d.ts +20 -0
- package/dist/runtime-v2/store/history/resilient-history-query.d.ts.map +1 -0
- package/dist/runtime-v2/store/history/resilient-history-query.js +40 -0
- package/dist/runtime-v2/store/history/resilient-history-query.js.map +1 -0
- package/dist/runtime-v2/store/history/resilient-history-query.test.d.ts +2 -0
- package/dist/runtime-v2/store/history/resilient-history-query.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/history/resilient-history-query.test.js +128 -0
- package/dist/runtime-v2/store/history/resilient-history-query.test.js.map +1 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.d.ts +24 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.d.ts.map +1 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.js +166 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.js.map +1 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.test.d.ts +2 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.test.js +536 -0
- package/dist/runtime-v2/store/history/sqlite-history-query.test.js.map +1 -0
- package/dist/runtime-v2/store/idempotent-transitions.test.d.ts +2 -0
- package/dist/runtime-v2/store/idempotent-transitions.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/idempotent-transitions.test.js +168 -0
- package/dist/runtime-v2/store/idempotent-transitions.test.js.map +1 -0
- package/dist/runtime-v2/store/lifecycle/index.d.ts +7 -0
- package/dist/runtime-v2/store/lifecycle/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/lifecycle/index.js +4 -0
- package/dist/runtime-v2/store/lifecycle/index.js.map +1 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.d.ts +91 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.d.ts.map +1 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.js +154 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.js.map +1 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.test.d.ts +2 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.test.js +243 -0
- package/dist/runtime-v2/store/lifecycle/lease-manager.test.js.map +1 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.d.ts +82 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.d.ts.map +1 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.js +145 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.js.map +1 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.test.d.ts +2 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.test.js +318 -0
- package/dist/runtime-v2/store/lifecycle/recovery-sweep.test.js.map +1 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.d.ts +105 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.d.ts.map +1 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.js +48 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.js.map +1 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.test.d.ts +2 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.test.js +86 -0
- package/dist/runtime-v2/store/lifecycle/retry-policy.test.js.map +1 -0
- package/dist/runtime-v2/store/run/index.d.ts +4 -0
- package/dist/runtime-v2/store/run/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/run/index.js +3 -0
- package/dist/runtime-v2/store/run/index.js.map +1 -0
- package/dist/runtime-v2/store/run/memory-run-store.d.ts +15 -0
- package/dist/runtime-v2/store/run/memory-run-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/run/memory-run-store.js +33 -0
- package/dist/runtime-v2/store/run/memory-run-store.js.map +1 -0
- package/dist/runtime-v2/store/run/run-store.d.ts +43 -0
- package/dist/runtime-v2/store/run/run-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/run/run-store.js +2 -0
- package/dist/runtime-v2/store/run/run-store.js.map +1 -0
- package/dist/runtime-v2/store/run/sqlite-run-store.d.ts +14 -0
- package/dist/runtime-v2/store/run/sqlite-run-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/run/sqlite-run-store.js +108 -0
- package/dist/runtime-v2/store/run/sqlite-run-store.js.map +1 -0
- package/dist/runtime-v2/store/runtime-state-manager.d.ts +116 -0
- package/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -0
- package/dist/runtime-v2/store/runtime-state-manager.integration.test.d.ts +2 -0
- package/dist/runtime-v2/store/runtime-state-manager.integration.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/runtime-state-manager.integration.test.js +187 -0
- package/dist/runtime-v2/store/runtime-state-manager.integration.test.js.map +1 -0
- package/dist/runtime-v2/store/runtime-state-manager.js +321 -0
- package/dist/runtime-v2/store/runtime-state-manager.js.map +1 -0
- package/dist/runtime-v2/store/schema-conformance.test.d.ts +2 -0
- package/dist/runtime-v2/store/schema-conformance.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/schema-conformance.test.js +607 -0
- package/dist/runtime-v2/store/schema-conformance.test.js.map +1 -0
- package/dist/runtime-v2/store/sqlite-connection-close.test.d.ts +2 -0
- package/dist/runtime-v2/store/sqlite-connection-close.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/sqlite-connection-close.test.js +57 -0
- package/dist/runtime-v2/store/sqlite-connection-close.test.js.map +1 -0
- package/dist/runtime-v2/store/sqlite-connection-pragma.test.d.ts +2 -0
- package/dist/runtime-v2/store/sqlite-connection-pragma.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/sqlite-connection-pragma.test.js +261 -0
- package/dist/runtime-v2/store/sqlite-connection-pragma.test.js.map +1 -0
- package/dist/runtime-v2/store/sqlite-connection.d.ts +39 -0
- package/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -0
- package/dist/runtime-v2/store/sqlite-connection.js +364 -0
- package/dist/runtime-v2/store/sqlite-connection.js.map +1 -0
- package/dist/runtime-v2/store/sqlite-run-store.test.d.ts +2 -0
- package/dist/runtime-v2/store/sqlite-run-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/sqlite-run-store.test.js +152 -0
- package/dist/runtime-v2/store/sqlite-run-store.test.js.map +1 -0
- package/dist/runtime-v2/store/sqlite-task-store.test.d.ts +2 -0
- package/dist/runtime-v2/store/sqlite-task-store.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/sqlite-task-store.test.js +166 -0
- package/dist/runtime-v2/store/sqlite-task-store.test.js.map +1 -0
- package/dist/runtime-v2/store/task/index.d.ts +4 -0
- package/dist/runtime-v2/store/task/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/task/index.js +3 -0
- package/dist/runtime-v2/store/task/index.js.map +1 -0
- package/dist/runtime-v2/store/task/memory-task-store.d.ts +15 -0
- package/dist/runtime-v2/store/task/memory-task-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/task/memory-task-store.js +43 -0
- package/dist/runtime-v2/store/task/memory-task-store.js.map +1 -0
- package/dist/runtime-v2/store/task/sqlite-task-store.d.ts +14 -0
- package/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/task/sqlite-task-store.js +144 -0
- package/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -0
- package/dist/runtime-v2/store/task/task-store.d.ts +48 -0
- package/dist/runtime-v2/store/task/task-store.d.ts.map +1 -0
- package/dist/runtime-v2/store/task/task-store.js +2 -0
- package/dist/runtime-v2/store/task/task-store.js.map +1 -0
- package/dist/runtime-v2/store/task-migration.d.ts +89 -0
- package/dist/runtime-v2/store/task-migration.d.ts.map +1 -0
- package/dist/runtime-v2/store/task-migration.js +79 -0
- package/dist/runtime-v2/store/task-migration.js.map +1 -0
- package/dist/runtime-v2/store/trajectory/index.d.ts +5 -0
- package/dist/runtime-v2/store/trajectory/index.d.ts.map +1 -0
- package/dist/runtime-v2/store/trajectory/index.js +3 -0
- package/dist/runtime-v2/store/trajectory/index.js.map +1 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.d.ts +40 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.d.ts.map +1 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.js +18 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.js.map +1 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.test.d.ts +2 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.test.js +320 -0
- package/dist/runtime-v2/store/trajectory/source-trace-locator.test.js.map +1 -0
- package/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.d.ts +23 -0
- package/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.d.ts.map +1 -0
- package/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.js +140 -0
- package/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.js.map +1 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.d.ts +27 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.d.ts.map +1 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.js +183 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.js.map +1 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.d.ts +2 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.js +328 -0
- package/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.js.map +1 -0
- package/dist/runtime-v2/store/trajectory/trajectory-locator.d.ts +30 -0
- package/dist/runtime-v2/store/trajectory/trajectory-locator.d.ts.map +1 -0
- package/dist/runtime-v2/store/trajectory/trajectory-locator.js +2 -0
- package/dist/runtime-v2/store/trajectory/trajectory-locator.js.map +1 -0
- package/dist/runtime-v2/store/workspace-isolation.test.d.ts +2 -0
- package/dist/runtime-v2/store/workspace-isolation.test.d.ts.map +1 -0
- package/dist/runtime-v2/store/workspace-isolation.test.js +139 -0
- package/dist/runtime-v2/store/workspace-isolation.test.js.map +1 -0
- package/dist/runtime-v2/story-a-demo.d.ts +67 -0
- package/dist/runtime-v2/story-a-demo.d.ts.map +1 -0
- package/dist/runtime-v2/story-a-demo.js +188 -0
- package/dist/runtime-v2/story-a-demo.js.map +1 -0
- package/dist/runtime-v2/synthetic-baseline.d.ts +28 -0
- package/dist/runtime-v2/synthetic-baseline.d.ts.map +1 -0
- package/dist/runtime-v2/synthetic-baseline.js +116 -0
- package/dist/runtime-v2/synthetic-baseline.js.map +1 -0
- package/dist/runtime-v2/task-status.d.ts +99 -0
- package/dist/runtime-v2/task-status.d.ts.map +1 -0
- package/dist/runtime-v2/task-status.js +88 -0
- package/dist/runtime-v2/task-status.js.map +1 -0
- package/dist/runtime-v2/trace-refiner-agent.d.ts +71 -0
- package/dist/runtime-v2/trace-refiner-agent.d.ts.map +1 -0
- package/dist/runtime-v2/trace-refiner-agent.js +239 -0
- package/dist/runtime-v2/trace-refiner-agent.js.map +1 -0
- package/dist/runtime-v2/trace-refiner.d.ts +47 -0
- package/dist/runtime-v2/trace-refiner.d.ts.map +1 -0
- package/dist/runtime-v2/trace-refiner.js +261 -0
- package/dist/runtime-v2/trace-refiner.js.map +1 -0
- package/dist/runtime-v2/types/artifact-lineage.d.ts +19 -0
- package/dist/runtime-v2/types/artifact-lineage.d.ts.map +1 -0
- package/dist/runtime-v2/types/artifact-lineage.js +6 -0
- package/dist/runtime-v2/types/artifact-lineage.js.map +1 -0
- package/dist/runtime-v2/types/event-payload.d.ts +232 -0
- package/dist/runtime-v2/types/event-payload.d.ts.map +1 -0
- package/dist/runtime-v2/types/event-payload.js +149 -0
- package/dist/runtime-v2/types/event-payload.js.map +1 -0
- package/dist/runtime-v2/types/event-types.d.ts +843 -0
- package/dist/runtime-v2/types/event-types.d.ts.map +1 -0
- package/dist/runtime-v2/types/event-types.js +486 -0
- package/dist/runtime-v2/types/event-types.js.map +1 -0
- package/dist/runtime-v2/types/hygiene-types.d.ts +40 -0
- package/dist/runtime-v2/types/hygiene-types.d.ts.map +1 -0
- package/dist/runtime-v2/types/hygiene-types.js +30 -0
- package/dist/runtime-v2/types/hygiene-types.js.map +1 -0
- package/dist/runtime-v2/types/index.d.ts +32 -0
- package/dist/runtime-v2/types/index.d.ts.map +1 -0
- package/dist/runtime-v2/types/index.js +17 -0
- package/dist/runtime-v2/types/index.js.map +1 -0
- package/dist/runtime-v2/types/pain-signal.d.ts +63 -0
- package/dist/runtime-v2/types/pain-signal.d.ts.map +1 -0
- package/dist/runtime-v2/types/pain-signal.js +118 -0
- package/dist/runtime-v2/types/pain-signal.js.map +1 -0
- package/dist/runtime-v2/types/pd-task-types.d.ts +139 -0
- package/dist/runtime-v2/types/pd-task-types.d.ts.map +1 -0
- package/dist/runtime-v2/types/pd-task-types.js +99 -0
- package/dist/runtime-v2/types/pd-task-types.js.map +1 -0
- package/dist/runtime-v2/types/principle-dependency.d.ts +15 -0
- package/dist/runtime-v2/types/principle-dependency.d.ts.map +1 -0
- package/dist/runtime-v2/types/principle-dependency.js +8 -0
- package/dist/runtime-v2/types/principle-dependency.js.map +1 -0
- package/dist/runtime-v2/types/principle-enums.d.ts +19 -0
- package/dist/runtime-v2/types/principle-enums.d.ts.map +1 -0
- package/dist/runtime-v2/types/principle-enums.js +59 -0
- package/dist/runtime-v2/types/principle-enums.js.map +1 -0
- package/dist/runtime-v2/types/principle-lifecycle-event.d.ts +28 -0
- package/dist/runtime-v2/types/principle-lifecycle-event.d.ts.map +1 -0
- package/dist/runtime-v2/types/principle-lifecycle-event.js +24 -0
- package/dist/runtime-v2/types/principle-lifecycle-event.js.map +1 -0
- package/dist/runtime-v2/types/principle-schema.d.ts +136 -0
- package/dist/runtime-v2/types/principle-schema.d.ts.map +1 -0
- package/dist/runtime-v2/types/principle-schema.js +71 -0
- package/dist/runtime-v2/types/principle-schema.js.map +1 -0
- package/dist/runtime-v2/types/principle-tree-store.d.ts +89 -0
- package/dist/runtime-v2/types/principle-tree-store.d.ts.map +1 -0
- package/dist/runtime-v2/types/principle-tree-store.js +11 -0
- package/dist/runtime-v2/types/principle-tree-store.js.map +1 -0
- package/dist/runtime-v2/types/principle-value-metrics.d.ts +27 -0
- package/dist/runtime-v2/types/principle-value-metrics.d.ts.map +1 -0
- package/dist/runtime-v2/types/principle-value-metrics.js +14 -0
- package/dist/runtime-v2/types/principle-value-metrics.js.map +1 -0
- package/dist/runtime-v2/types/queue-types.d.ts +51 -0
- package/dist/runtime-v2/types/queue-types.d.ts.map +1 -0
- package/dist/runtime-v2/types/queue-types.js +44 -0
- package/dist/runtime-v2/types/queue-types.js.map +1 -0
- package/dist/runtime-v2/types/replay-types.d.ts +40 -0
- package/dist/runtime-v2/types/replay-types.d.ts.map +1 -0
- package/dist/runtime-v2/types/replay-types.js +2 -0
- package/dist/runtime-v2/types/replay-types.js.map +1 -0
- package/dist/runtime-v2/types/runtime-summary-types.d.ts +93 -0
- package/dist/runtime-v2/types/runtime-summary-types.d.ts.map +1 -0
- package/dist/runtime-v2/types/runtime-summary-types.js +35 -0
- package/dist/runtime-v2/types/runtime-summary-types.js.map +1 -0
- package/dist/runtime-v2/utils/cli-process-runner.d.ts +35 -0
- package/dist/runtime-v2/utils/cli-process-runner.d.ts.map +1 -0
- package/dist/runtime-v2/utils/cli-process-runner.js +259 -0
- package/dist/runtime-v2/utils/cli-process-runner.js.map +1 -0
- package/dist/runtime-v2/utils/cli-process-runner.test.d.ts +2 -0
- package/dist/runtime-v2/utils/cli-process-runner.test.d.ts.map +1 -0
- package/dist/runtime-v2/utils/cli-process-runner.test.js +111 -0
- package/dist/runtime-v2/utils/cli-process-runner.test.js.map +1 -0
- package/dist/storage-adapter.d.ts +59 -0
- package/dist/storage-adapter.d.ts.map +1 -0
- package/dist/storage-adapter.js +2 -0
- package/dist/storage-adapter.js.map +1 -0
- package/dist/telemetry-event.d.ts +102 -0
- package/dist/telemetry-event.d.ts.map +1 -0
- package/dist/telemetry-event.js +186 -0
- package/dist/telemetry-event.js.map +1 -0
- package/dist/trajectory-store.d.ts +45 -0
- package/dist/trajectory-store.d.ts.map +1 -0
- package/dist/trajectory-store.js +139 -0
- package/dist/trajectory-store.js.map +1 -0
- package/dist/types/workspace-resolver.d.ts +25 -0
- package/dist/types/workspace-resolver.d.ts.map +1 -0
- package/dist/types/workspace-resolver.js +10 -0
- package/dist/types/workspace-resolver.js.map +1 -0
- package/dist/types.d.ts +56 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/workflow-funnel-loader.d.ts +143 -0
- package/dist/workflow-funnel-loader.d.ts.map +1 -0
- package/dist/workflow-funnel-loader.js +174 -0
- package/dist/workflow-funnel-loader.js.map +1 -0
- package/package.json +100 -0
|
@@ -0,0 +1,912 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
2
|
+
/**
|
|
3
|
+
* Nocturnal Compliance Engine — Opportunity-Based Principle Evaluation
|
|
4
|
+
* =====================================================================
|
|
5
|
+
*
|
|
6
|
+
* Replaces session-average compliance with opportunity-based compliance.
|
|
7
|
+
*
|
|
8
|
+
* CORE CONCEPTS:
|
|
9
|
+
*
|
|
10
|
+
* Opportunity — a session context where a principle COULD have been applied.
|
|
11
|
+
* An opportunity exists when the agent's action (or planned action)
|
|
12
|
+
* falls within the principle's applicability scope.
|
|
13
|
+
*
|
|
14
|
+
* Compliance — the principle was followed in an opportunity.
|
|
15
|
+
* Determined by absence of violation signals, not presence of
|
|
16
|
+
* positive confirmation (avoids LLM scoring).
|
|
17
|
+
*
|
|
18
|
+
* Violation — strong evidence the principle was NOT followed.
|
|
19
|
+
* Detected through deterministic event signals (pain, tool failures,
|
|
20
|
+
* gate blocks) — no LLM involved.
|
|
21
|
+
*
|
|
22
|
+
* Dilution prevention — compliance is computed ONLY over sessions where the
|
|
23
|
+
* principle had an opportunity. Unrelated sessions
|
|
24
|
+
* (where T-05's risky operations never occurred) do NOT
|
|
25
|
+
* dilute the compliance rate.
|
|
26
|
+
*
|
|
27
|
+
* DESIGN CONSTRAINTS (Phase 1):
|
|
28
|
+
* - T-xx principles only (deterministic / weak-heuristic evaluability)
|
|
29
|
+
* - No P_xxx automation (requires detector metadata — Task 1.3 scope)
|
|
30
|
+
* - No LLM-based scoring
|
|
31
|
+
* - No training logic
|
|
32
|
+
*
|
|
33
|
+
* FILE: No file persistence — stateless computation over event stream.
|
|
34
|
+
* Caller is responsible for writing results to principle-training-state.ts.
|
|
35
|
+
*/
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Risky Operation Registry
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
/**
|
|
40
|
+
* Tools and operations that constitute risky actions.
|
|
41
|
+
* Gate blocks on these map to T-05 (Safety Rails) violations.
|
|
42
|
+
*/
|
|
43
|
+
const RISKY_TOOLS = new Set([
|
|
44
|
+
'delete_file',
|
|
45
|
+
'move_file',
|
|
46
|
+
'rename_file',
|
|
47
|
+
'delete_directory',
|
|
48
|
+
'bash',
|
|
49
|
+
'MultiExec',
|
|
50
|
+
]);
|
|
51
|
+
/**
|
|
52
|
+
* Bash command patterns that constitute dangerous operations.
|
|
53
|
+
* Matched against bash command text in tool_call events.
|
|
54
|
+
*/
|
|
55
|
+
const DANGEROUS_BASH_PATTERNS = [
|
|
56
|
+
/rm\s+(-[a-z]*r[a-z]*f?|-rf)/i, // rm -rf / rm -r
|
|
57
|
+
/del\s+\/[s/q]/i, // Windows del /s
|
|
58
|
+
/rmdir\s+\/s/i, // rmdir /s
|
|
59
|
+
/git\s+push\s+.*--force/i, // git push --force
|
|
60
|
+
/git\s+reset\s+--hard/i, // git reset --hard
|
|
61
|
+
/git\s+clean\s+-f[dx]/i, // git clean -fd
|
|
62
|
+
/npm\s+publish/i, // npm publish
|
|
63
|
+
/pip\s+upload/i, // pip upload
|
|
64
|
+
/docker\s+push/i, // docker push
|
|
65
|
+
/curl.+\|\s*(ba)?sh/i, // curl | bash
|
|
66
|
+
/wget.+\|\s*(ba)?sh/i, // wget | bash
|
|
67
|
+
/^make\s+[^-|]+$/i, // bare make (destructive)
|
|
68
|
+
];
|
|
69
|
+
/**
|
|
70
|
+
* Keywords in gate block reason that indicate a dangerous/risky operation.
|
|
71
|
+
* Used as a fallback when the tool itself is risky but the reason is free text.
|
|
72
|
+
*/
|
|
73
|
+
const RISKY_KEYWORDS_IN_REASON = [
|
|
74
|
+
/delete|remove|destroy|drop/i,
|
|
75
|
+
/force|unsafe|dangerous/i,
|
|
76
|
+
/format|truncate|overwrite/i,
|
|
77
|
+
/exec|eval|shell|command/i,
|
|
78
|
+
/credential|secret|password|token/i,
|
|
79
|
+
];
|
|
80
|
+
/**
|
|
81
|
+
* Edit/write tool names.
|
|
82
|
+
*/
|
|
83
|
+
const EDIT_TOOLS = new Set([
|
|
84
|
+
'edit_file',
|
|
85
|
+
'edit_file_batch',
|
|
86
|
+
'write_to_file',
|
|
87
|
+
'create_file',
|
|
88
|
+
'apply_patch',
|
|
89
|
+
]);
|
|
90
|
+
/**
|
|
91
|
+
* Read tool names.
|
|
92
|
+
*/
|
|
93
|
+
const READ_TOOLS = new Set([
|
|
94
|
+
'read_file',
|
|
95
|
+
'read_multiple_files',
|
|
96
|
+
'grep',
|
|
97
|
+
'search_files',
|
|
98
|
+
'list_directory',
|
|
99
|
+
'glob',
|
|
100
|
+
]);
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
// Path Normalization (cross-platform)
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
/**
|
|
105
|
+
* Normalizes a file path to POSIX forward-slash format for consistent matching.
|
|
106
|
+
* Handles Windows backslash paths on any platform.
|
|
107
|
+
*/
|
|
108
|
+
function normalizePathPosix(filePath) {
|
|
109
|
+
return filePath.replace(/\\/g, '/');
|
|
110
|
+
}
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
// Opportunity Detection
|
|
113
|
+
// ---------------------------------------------------------------------------
|
|
114
|
+
/**
|
|
115
|
+
* Detects whether a given session presents an APPLICABLE OPPORTUNITY
|
|
116
|
+
* for a specific principle.
|
|
117
|
+
*
|
|
118
|
+
* An opportunity exists when the session context falls within the
|
|
119
|
+
* principle's applicability scope — regardless of whether the agent
|
|
120
|
+
* followed the principle.
|
|
121
|
+
*
|
|
122
|
+
* IMPORTANT: This does NOT assess compliance. It only answers:
|
|
123
|
+
* "Could the principle have applied here?"
|
|
124
|
+
*
|
|
125
|
+
* #216: For P_* principles (not T-xx), uses generic detection based on
|
|
126
|
+
* pain events and tool calls — any session with a pain signal is considered
|
|
127
|
+
* an opportunity for a pain-derived principle.
|
|
128
|
+
*/
|
|
129
|
+
export function detectOpportunity(principleId, session) {
|
|
130
|
+
// #216: P_* principles (pain-derived) — generic opportunity detection
|
|
131
|
+
if (principleId.startsWith('P_')) {
|
|
132
|
+
// Any session with pain signals, tool failures, or gate blocks is an opportunity
|
|
133
|
+
// for a pain-derived principle. This is conservative: better to over-count
|
|
134
|
+
// opportunities than to miss real violations.
|
|
135
|
+
const hasPainSignal = session.painSignals.length > 0;
|
|
136
|
+
const hasToolFailure = session.toolCalls.some((tc) => tc.outcome === 'failure');
|
|
137
|
+
const hasGateBlock = session.gateBlocks.length > 0;
|
|
138
|
+
if (hasPainSignal || hasToolFailure || hasGateBlock) {
|
|
139
|
+
return { applicable: true, reason: `P_* principle — session has ${hasPainSignal ? 'pain signal' : hasToolFailure ? 'tool failure' : 'gate block'}` };
|
|
140
|
+
}
|
|
141
|
+
return { applicable: false, reason: `P_* principle — no pain/tool-failure/gate-block in session` };
|
|
142
|
+
}
|
|
143
|
+
// T-xx principles — specific deterministic detection
|
|
144
|
+
switch (principleId) {
|
|
145
|
+
case 'T-01':
|
|
146
|
+
return detectT01Opportunity(session);
|
|
147
|
+
case 'T-02':
|
|
148
|
+
return detectT02Opportunity(session);
|
|
149
|
+
case 'T-03':
|
|
150
|
+
return detectT03Opportunity(session);
|
|
151
|
+
case 'T-04':
|
|
152
|
+
return detectT04Opportunity(session);
|
|
153
|
+
case 'T-05':
|
|
154
|
+
return detectT05Opportunity(session);
|
|
155
|
+
case 'T-06':
|
|
156
|
+
return detectT06Opportunity(session);
|
|
157
|
+
case 'T-07':
|
|
158
|
+
return detectT07Opportunity(session);
|
|
159
|
+
case 'T-08':
|
|
160
|
+
return detectT08Opportunity(session);
|
|
161
|
+
case 'T-09':
|
|
162
|
+
return detectT09Opportunity(session);
|
|
163
|
+
default:
|
|
164
|
+
return { applicable: false, reason: `Unknown principle: ${principleId}` };
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* T-01 "Survey Before Acting" — Understand the structure first before making changes.
|
|
169
|
+
*
|
|
170
|
+
* APPLICABLE when: Agent performs edit/write operations.
|
|
171
|
+
* Rationale: Any edit to code is an opportunity to survey first.
|
|
172
|
+
* Excluded: Read-only sessions (no applicable opportunity).
|
|
173
|
+
*/
|
|
174
|
+
function detectT01Opportunity(session) {
|
|
175
|
+
const hasEdit = session.toolCalls.some((call) => EDIT_TOOLS.has(call.toolName));
|
|
176
|
+
if (hasEdit) {
|
|
177
|
+
return { applicable: true, reason: 'Edit operations present — opportunity to survey before acting' };
|
|
178
|
+
}
|
|
179
|
+
return { applicable: false, reason: 'No edit operations in session — T-01 not applicable' };
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* T-02 "Respect Constraints" — Explicitly reason about contracts, tests, schemas.
|
|
183
|
+
*
|
|
184
|
+
* APPLICABLE when: Agent interacts with type/test/schema/contract files.
|
|
185
|
+
*/
|
|
186
|
+
function detectT02Opportunity(session) {
|
|
187
|
+
const hasConstraintInteraction = session.toolCalls.some((call) => {
|
|
188
|
+
if (!call.filePath)
|
|
189
|
+
return false;
|
|
190
|
+
const normalized = normalizePathPosix(call.filePath);
|
|
191
|
+
return (/\.(ts|tsx|js|jsx)$/.test(normalized) || // type-aware files
|
|
192
|
+
/\b(test|spec|contract|schema|interface|type)\b/i.test(normalized));
|
|
193
|
+
});
|
|
194
|
+
if (hasConstraintInteraction) {
|
|
195
|
+
return { applicable: true, reason: 'Type/test/contract interaction — opportunity to respect constraints' };
|
|
196
|
+
}
|
|
197
|
+
return { applicable: false, reason: 'No type/test/contract interaction — T-02 not applicable' };
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* T-03 "Evidence Over Assumption" — Use logs, code, and outputs before inferring.
|
|
201
|
+
*
|
|
202
|
+
* APPLICABLE when: Pain signals or tool failures follow an edit/write operation.
|
|
203
|
+
* Rationale: When a change causes something to go wrong, there's an opportunity
|
|
204
|
+
* to gather evidence instead of assuming. Read-only failures are less relevant.
|
|
205
|
+
* Narrowed: requires an edit/write in the session before the failure/pain signal.
|
|
206
|
+
*/
|
|
207
|
+
function detectT03Opportunity(session) {
|
|
208
|
+
const hasWriteBeforeFailure = session.toolCalls.some((call, i) => {
|
|
209
|
+
if (call.outcome !== 'failure')
|
|
210
|
+
return false;
|
|
211
|
+
// Check that at least one prior call was an edit/write
|
|
212
|
+
const priorCalls = session.toolCalls.slice(0, i);
|
|
213
|
+
return priorCalls.some((c) => EDIT_TOOLS.has(c.toolName));
|
|
214
|
+
});
|
|
215
|
+
if (hasWriteBeforeFailure) {
|
|
216
|
+
return { applicable: true, reason: 'Write operation followed by failure — opportunity to gather evidence before retry' };
|
|
217
|
+
}
|
|
218
|
+
// Also applicable: pain signal with severity moderate+ (indicating something went wrong after a change)
|
|
219
|
+
const hasSignificantPain = session.painSignals.some((p) => p.severity === 'moderate' || p.severity === 'severe');
|
|
220
|
+
if (hasSignificantPain) {
|
|
221
|
+
return { applicable: true, reason: 'Significant pain signal — opportunity to use evidence over assumption' };
|
|
222
|
+
}
|
|
223
|
+
return { applicable: false, reason: 'No pain or failure on write operations — T-03 not applicable' };
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* T-04 "Reversible First" — Prefer changes that are safe to roll back.
|
|
227
|
+
*
|
|
228
|
+
* APPLICABLE when: Risky or destructive operations are attempted.
|
|
229
|
+
*/
|
|
230
|
+
function detectT04Opportunity(session) {
|
|
231
|
+
const hasRisky = session.toolCalls.some((call) => RISKY_TOOLS.has(call.toolName) || call.toolName === 'bash');
|
|
232
|
+
if (hasRisky) {
|
|
233
|
+
return { applicable: true, reason: 'Risky/destructive operations — opportunity to prefer reversible changes' };
|
|
234
|
+
}
|
|
235
|
+
return { applicable: false, reason: 'No risky operations — T-04 not applicable' };
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* T-05 "Safety Rails" — Call out guardrails, prohibitions, failure-prevention constraints.
|
|
239
|
+
*
|
|
240
|
+
* APPLICABLE when: A gate block fires on a risky operation.
|
|
241
|
+
* Rationale: The gate block IS the safety rail being tested. An opportunity
|
|
242
|
+
* exists when the system judged an operation risky enough to block.
|
|
243
|
+
* This makes T-05 applicable ONLY when gate blocks fire — preventing dilution
|
|
244
|
+
* by unrelated sessions.
|
|
245
|
+
*
|
|
246
|
+
* IMPORTANT: T-05's compliance is tied to gate blocks specifically.
|
|
247
|
+
* A risky operation without a gate block may still be a T-05 opportunity
|
|
248
|
+
* if the reason mentions safety-relevant terms.
|
|
249
|
+
*/
|
|
250
|
+
function detectT05Opportunity(session) {
|
|
251
|
+
const hasGateBlock = session.gateBlocks.length > 0;
|
|
252
|
+
if (hasGateBlock) {
|
|
253
|
+
return {
|
|
254
|
+
applicable: true,
|
|
255
|
+
reason: 'Gate block present — opportunity to call out safety rails',
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
// Also applicable when a risky operation is attempted
|
|
259
|
+
// (even if not yet blocked — the agent should self-censor)
|
|
260
|
+
const hasRisky = session.toolCalls.some((call) => {
|
|
261
|
+
if (RISKY_TOOLS.has(call.toolName))
|
|
262
|
+
return true;
|
|
263
|
+
// Check bash for dangerous patterns
|
|
264
|
+
if (call.toolName === 'bash' && call.errorMessage) {
|
|
265
|
+
const msg = call.errorMessage;
|
|
266
|
+
return DANGEROUS_BASH_PATTERNS.some((p) => p.test(msg));
|
|
267
|
+
}
|
|
268
|
+
return false;
|
|
269
|
+
});
|
|
270
|
+
if (hasRisky) {
|
|
271
|
+
return {
|
|
272
|
+
applicable: true,
|
|
273
|
+
reason: 'Risky operation attempted — opportunity to apply safety rails',
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
applicable: false,
|
|
278
|
+
reason: 'No gate blocks or risky operations — T-05 not applicable in this session',
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* T-06 "Simplicity First" — Prefer the smallest understandable solution.
|
|
283
|
+
*
|
|
284
|
+
* APPLICABLE when: The task involves non-trivial code creation or refactoring.
|
|
285
|
+
*/
|
|
286
|
+
function detectT06Opportunity(session) {
|
|
287
|
+
const hasNonTrivialWrite = session.toolCalls.some((call) => call.toolName === 'create_file' ||
|
|
288
|
+
call.toolName === 'write_to_file' ||
|
|
289
|
+
(call.toolName === 'bash' && /\b(refactor|rewrite|overhaul)\b/i.test(call.errorMessage ?? '')));
|
|
290
|
+
if (hasNonTrivialWrite) {
|
|
291
|
+
return {
|
|
292
|
+
applicable: true,
|
|
293
|
+
reason: 'Non-trivial code creation — opportunity to prefer simplicity',
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
return { applicable: false, reason: 'No non-trivial writes — T-06 not applicable' };
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* T-07 "Minimal Change Surface" — Limit the blast radius.
|
|
300
|
+
*
|
|
301
|
+
* APPLICABLE when: Multiple files are touched in a single session.
|
|
302
|
+
*/
|
|
303
|
+
function detectT07Opportunity(session) {
|
|
304
|
+
const filePaths = session.toolCalls
|
|
305
|
+
.map((call) => call.filePath)
|
|
306
|
+
.filter((p) => p !== undefined)
|
|
307
|
+
.map((p) => normalizePathPosix(p));
|
|
308
|
+
const uniqueFiles = new Set(filePaths);
|
|
309
|
+
if (uniqueFiles.size >= 3) {
|
|
310
|
+
return {
|
|
311
|
+
applicable: true,
|
|
312
|
+
reason: `Multiple files touched (${uniqueFiles.size}) — opportunity to minimize change surface`,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
return { applicable: false, reason: 'Few files touched — T-07 not applicable' };
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* T-08 "Pain As Signal" — Treat failures and friction as clues.
|
|
319
|
+
*
|
|
320
|
+
* APPLICABLE when: Pain signals are present after a failure.
|
|
321
|
+
*/
|
|
322
|
+
function detectT08Opportunity(session) {
|
|
323
|
+
const hasPain = session.painSignals.length > 0;
|
|
324
|
+
const hasFailure = session.toolCalls.some((call) => call.outcome === 'failure');
|
|
325
|
+
if (hasPain && hasFailure) {
|
|
326
|
+
return {
|
|
327
|
+
applicable: true,
|
|
328
|
+
reason: 'Pain signals following failures — opportunity to treat pain as signal',
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
return { applicable: false, reason: 'No pain-after-failure — T-08 not applicable' };
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* T-09 "Divide And Conquer" — Split the task into smaller phases before execution.
|
|
335
|
+
*
|
|
336
|
+
* APPLICABLE when: Complex operations are attempted (multi-file edits, refactors,
|
|
337
|
+
* architecture changes) OR when pain events occur on complex tasks.
|
|
338
|
+
*
|
|
339
|
+
* COMPLEXITY INDICATORS:
|
|
340
|
+
* - 5+ tool calls in a session (indicates multi-step task)
|
|
341
|
+
* - Multiple file paths touched
|
|
342
|
+
* - Pain events on multi-step tasks
|
|
343
|
+
* - Explicit "complex" or "refactor" or "architecture" in operations
|
|
344
|
+
*/
|
|
345
|
+
function detectT09Opportunity(session) {
|
|
346
|
+
const toolCallCount = session.toolCalls.length;
|
|
347
|
+
const uniqueFiles = new Set(session.toolCalls
|
|
348
|
+
.map((call) => call.filePath)
|
|
349
|
+
.filter((p) => p !== undefined)
|
|
350
|
+
.map((p) => normalizePathPosix(p)));
|
|
351
|
+
const hasComplexity = toolCallCount >= 5 || uniqueFiles.size >= 3;
|
|
352
|
+
const hasPain = session.painSignals.length > 0;
|
|
353
|
+
const hasFailure = session.toolCalls.some((call) => call.outcome === 'failure');
|
|
354
|
+
if (hasComplexity) {
|
|
355
|
+
return {
|
|
356
|
+
applicable: true,
|
|
357
|
+
reason: `Complex task detected (${toolCallCount} calls, ${uniqueFiles.size} files) — opportunity to decompose`,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
if (hasPain || hasFailure) {
|
|
361
|
+
// Pain/failure may indicate the task was too complex without decomposition
|
|
362
|
+
return {
|
|
363
|
+
applicable: true,
|
|
364
|
+
reason: 'Pain or failure present — opportunity to decompose before retry',
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
applicable: false,
|
|
369
|
+
reason: 'No complexity indicators — T-09 not applicable in this session',
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
// ---------------------------------------------------------------------------
|
|
373
|
+
// Violation Detection
|
|
374
|
+
// ---------------------------------------------------------------------------
|
|
375
|
+
/**
|
|
376
|
+
* Detects whether a principle was VIOLATED in a session where an
|
|
377
|
+
* opportunity was applicable.
|
|
378
|
+
*
|
|
379
|
+
* Returns a ViolationMatch with violated=true if violation signals are present.
|
|
380
|
+
*
|
|
381
|
+
* #216: For P_* principles (pain-derived), violation is detected when the session
|
|
382
|
+
* has pain signals, tool failures, or gate blocks that match the principle's
|
|
383
|
+
* trigger pattern. Since P_* principles don't have T-xx specific detectors,
|
|
384
|
+
* we use the presence of negative signals as violation evidence.
|
|
385
|
+
*/
|
|
386
|
+
export function detectViolation(principleId, session) {
|
|
387
|
+
// #216: P_* principles (pain-derived) — generic violation detection
|
|
388
|
+
if (principleId.startsWith('P_')) {
|
|
389
|
+
// For pain-derived principles, a violation is indicated when the session
|
|
390
|
+
// contains pain signals, tool failures, or gate blocks — these are the
|
|
391
|
+
// same signals that triggered principle creation in the first place.
|
|
392
|
+
// A principle was violated if the bad outcome recurred after it was created.
|
|
393
|
+
const painSignals = session.painSignals.filter((p) => p.score >= 50);
|
|
394
|
+
const toolFailures = session.toolCalls.filter((tc) => tc.outcome === 'failure');
|
|
395
|
+
const { gateBlocks } = session;
|
|
396
|
+
if (painSignals.length > 0) {
|
|
397
|
+
return { violated: true, reason: `P_* principle — ${painSignals.length} pain signal(s) detected (max score: ${Math.max(...painSignals.map(p => p.score))})` };
|
|
398
|
+
}
|
|
399
|
+
if (toolFailures.length > 0) {
|
|
400
|
+
return { violated: true, reason: `P_* principle — ${toolFailures.length} tool failure(s) detected` };
|
|
401
|
+
}
|
|
402
|
+
if (gateBlocks.length > 0) {
|
|
403
|
+
return { violated: true, reason: `P_* principle — ${gateBlocks.length} gate block(s) detected` };
|
|
404
|
+
}
|
|
405
|
+
return { violated: false, reason: `P_* principle — no violation signals in session` };
|
|
406
|
+
}
|
|
407
|
+
// T-xx principles — specific deterministic detection
|
|
408
|
+
switch (principleId) {
|
|
409
|
+
case 'T-01':
|
|
410
|
+
return detectT01Violation(session);
|
|
411
|
+
case 'T-02':
|
|
412
|
+
return detectT02Violation(session);
|
|
413
|
+
case 'T-03':
|
|
414
|
+
return detectT03Violation(session);
|
|
415
|
+
case 'T-04':
|
|
416
|
+
return detectT04Violation(session);
|
|
417
|
+
case 'T-05':
|
|
418
|
+
return detectT05Violation(session);
|
|
419
|
+
case 'T-06':
|
|
420
|
+
return detectT06Violation(session);
|
|
421
|
+
case 'T-07':
|
|
422
|
+
return detectT07Violation(session);
|
|
423
|
+
case 'T-08':
|
|
424
|
+
return detectT08Violation(session);
|
|
425
|
+
case 'T-09':
|
|
426
|
+
return detectT09Violation(session);
|
|
427
|
+
default:
|
|
428
|
+
console.warn(`[PD:Compliance] Unknown principle ID: ${principleId} — treating as no violation. Check for typos (P-001 vs P_001).`);
|
|
429
|
+
return { violated: false, reason: `Unknown principle: ${principleId}` };
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* T-01 violation:
|
|
434
|
+
* - Pain signal or tool failure on an edit where the file was NOT read first
|
|
435
|
+
* - Pain signal with source indicating structural misunderstanding
|
|
436
|
+
*/
|
|
437
|
+
function detectT01Violation(session) {
|
|
438
|
+
// Build set of files that were read (normalized for cross-platform consistency)
|
|
439
|
+
const readFiles = new Set(session.toolCalls
|
|
440
|
+
.filter((call) => READ_TOOLS.has(call.toolName))
|
|
441
|
+
.map((call) => call.filePath)
|
|
442
|
+
.filter((p) => p !== undefined)
|
|
443
|
+
.map((p) => normalizePathPosix(p)));
|
|
444
|
+
// Find edits to files that were NOT read first
|
|
445
|
+
const unreadEdits = session.toolCalls.filter((call) => EDIT_TOOLS.has(call.toolName) &&
|
|
446
|
+
call.filePath !== undefined &&
|
|
447
|
+
!readFiles.has(normalizePathPosix(call.filePath)));
|
|
448
|
+
// If there were edits to unread files AND pain/failure followed → T-01 likely violated
|
|
449
|
+
if (unreadEdits.length > 0) {
|
|
450
|
+
const painOnUnreadEdit = session.painSignals.some((p) => unreadEdits.some((e) => e.filePath !== undefined && p.source.includes(e.filePath)) ||
|
|
451
|
+
/structure|architecture|dependency|context|before.*edit|survey/i.test(p.reason ?? ''));
|
|
452
|
+
if (painOnUnreadEdit) {
|
|
453
|
+
return {
|
|
454
|
+
violated: true,
|
|
455
|
+
reason: `Edits to unread files (${unreadEdits.length}) followed by pain — T-01 violated: agent acted without surveying first`,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
// If edits to unread files AND tool failures → likely violated
|
|
459
|
+
const failuresOnUnread = unreadEdits.some((e) => e.outcome === 'failure');
|
|
460
|
+
if (failuresOnUnread) {
|
|
461
|
+
return {
|
|
462
|
+
violated: true,
|
|
463
|
+
reason: `Edits to unread files (${unreadEdits.length}) followed by failures — T-01 violated: agent acted without understanding`,
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
// Also check for pain signals specifically mentioning T-01-relevant themes
|
|
468
|
+
// without any prior read
|
|
469
|
+
const hasPainTheme = /structure|architecture|context|before.*acting|didn't.*survey|didn't.*read.*first/i.test(session.painSignals.map((p) => p.reason ?? '').join(' '));
|
|
470
|
+
if (hasPainTheme && unreadEdits.length > 0) {
|
|
471
|
+
return {
|
|
472
|
+
violated: true,
|
|
473
|
+
reason: 'Pain signals mentioning structure/context themes after edits to unread files — T-01 violated',
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
return {
|
|
477
|
+
violated: false,
|
|
478
|
+
reason: 'No violation signals detected for T-01',
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* T-02 violation:
|
|
483
|
+
* - Tool failures on type/test/contract interactions without prior verification
|
|
484
|
+
*/
|
|
485
|
+
function detectT02Violation(session) {
|
|
486
|
+
const constraintFailures = session.toolCalls.filter((call) => call.outcome === 'failure' &&
|
|
487
|
+
call.filePath !== undefined &&
|
|
488
|
+
(/\b(test|spec|contract|schema|interface|type)\b/i.test(call.filePath) ||
|
|
489
|
+
/\b(type|test|contract)\b/i.test(call.errorMessage ?? '')));
|
|
490
|
+
if (constraintFailures.length > 0) {
|
|
491
|
+
return {
|
|
492
|
+
violated: true,
|
|
493
|
+
reason: `Tool failures on type/test/contract interactions (${constraintFailures.length}) — T-02 violated: constraints not verified`,
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
return { violated: false, reason: 'No violation signals for T-02' };
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* T-03 violation:
|
|
500
|
+
* - Tool failures without prior evidence gathering (no read calls before failure)
|
|
501
|
+
*/
|
|
502
|
+
function detectT03Violation(session) {
|
|
503
|
+
const failureIndices = session.toolCalls
|
|
504
|
+
.map((call, i) => (call.outcome === 'failure' ? i : -1))
|
|
505
|
+
.filter((i) => i >= 0);
|
|
506
|
+
for (const failIdx of failureIndices) {
|
|
507
|
+
const priorCalls = session.toolCalls.slice(0, failIdx);
|
|
508
|
+
const hasPriorRead = priorCalls.some((call) => READ_TOOLS.has(call.toolName) && call.filePath !== undefined);
|
|
509
|
+
if (!hasPriorRead) {
|
|
510
|
+
return {
|
|
511
|
+
violated: true,
|
|
512
|
+
reason: `Tool failure at index ${failIdx} without prior read operations — T-03 violated: assumption made without evidence`,
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return { violated: false, reason: 'No violation signals for T-03' };
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* T-04 violation:
|
|
520
|
+
* - Pain signals following risky operations (the operation succeeded but caused issues)
|
|
521
|
+
*/
|
|
522
|
+
function detectT04Violation(session) {
|
|
523
|
+
const riskyIndices = session.toolCalls
|
|
524
|
+
.map((call, i) => (RISKY_TOOLS.has(call.toolName) || call.toolName === 'bash' ? i : -1))
|
|
525
|
+
.filter((i) => i >= 0);
|
|
526
|
+
if (riskyIndices.length === 0)
|
|
527
|
+
return { violated: false, reason: 'No risky operations — T-04 not violated' };
|
|
528
|
+
// If risky operations AND pain signals are present in the same session,
|
|
529
|
+
// that indicates the risky operation caused negative consequences.
|
|
530
|
+
const hasPain = session.painSignals.length > 0;
|
|
531
|
+
if (hasPain) {
|
|
532
|
+
return {
|
|
533
|
+
violated: true,
|
|
534
|
+
reason: 'Pain signals present alongside risky operations — T-04 violated: irreversible consequences',
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
return { violated: false, reason: 'No violation signals for T-04' };
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* T-05 violation:
|
|
541
|
+
* - Gate block fires → the agent tried a risky operation without first applying
|
|
542
|
+
* safety reasoning. The gate block IS the violation signal.
|
|
543
|
+
* - Gate block on a dangerous bash command is an explicit violation.
|
|
544
|
+
*/
|
|
545
|
+
function detectT05Violation(session) {
|
|
546
|
+
if (session.gateBlocks.length > 0) {
|
|
547
|
+
// Check if any gate block was on a dangerous operation.
|
|
548
|
+
// A block is dangerous if:
|
|
549
|
+
// 1. The tool is in RISKY_TOOLS (delete_file, bash, MultiExec, etc.)
|
|
550
|
+
// 2. The tool is 'bash' AND the reason mentions a dangerous pattern
|
|
551
|
+
// 3. The reason contains risky keywords (delete, force, credential, exec, etc.)
|
|
552
|
+
const dangerousBlocks = session.gateBlocks.filter((block) => {
|
|
553
|
+
if (RISKY_TOOLS.has(block.toolName))
|
|
554
|
+
return true;
|
|
555
|
+
if (block.toolName === 'bash' && DANGEROUS_BASH_PATTERNS.some((p) => p.test(block.reason)))
|
|
556
|
+
return true;
|
|
557
|
+
// Fallback: scan reason for risky keywords
|
|
558
|
+
if (RISKY_KEYWORDS_IN_REASON.some((p) => p.test(block.reason)))
|
|
559
|
+
return true;
|
|
560
|
+
return false;
|
|
561
|
+
});
|
|
562
|
+
if (dangerousBlocks.length > 0) {
|
|
563
|
+
return {
|
|
564
|
+
violated: true,
|
|
565
|
+
reason: `Gate blocks on dangerous operations (${dangerousBlocks.length}) — T-05 violated: safety rail not called out`,
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
return {
|
|
569
|
+
violated: true,
|
|
570
|
+
reason: `Gate blocks present (${session.gateBlocks.length}) — T-05 violated: safety rail not respected`,
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
return { violated: false, reason: 'No gate blocks — T-05 not violated' };
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* T-06 violation:
|
|
577
|
+
* - Over-engineering signals: pain from overly complex solutions
|
|
578
|
+
*/
|
|
579
|
+
function detectT06Violation(session) {
|
|
580
|
+
const hasOverEngineerPain = session.painSignals.some((p) => /over.*engineer|over.*complicat|too.*complex|unnecessarily.*complex/i.test(p.reason ?? '') &&
|
|
581
|
+
p.severity === 'severe');
|
|
582
|
+
if (hasOverEngineerPain) {
|
|
583
|
+
return {
|
|
584
|
+
violated: true,
|
|
585
|
+
reason: 'Severe pain from over-engineering — T-06 violated: simplicity not preferred',
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
return { violated: false, reason: 'No over-engineering signals — T-06 not violated' };
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* T-07 violation:
|
|
592
|
+
* - Pain from wide blast radius: many files modified, cascading failures
|
|
593
|
+
*/
|
|
594
|
+
function detectT07Violation(session) {
|
|
595
|
+
const modifiedFiles = new Set(session.toolCalls
|
|
596
|
+
.filter((call) => EDIT_TOOLS.has(call.toolName))
|
|
597
|
+
.map((call) => call.filePath)
|
|
598
|
+
.filter((p) => p !== undefined)
|
|
599
|
+
.map((p) => normalizePathPosix(p)));
|
|
600
|
+
const failures = session.toolCalls.filter((call) => call.outcome === 'failure');
|
|
601
|
+
if (modifiedFiles.size >= 5 && failures.length >= 2) {
|
|
602
|
+
return {
|
|
603
|
+
violated: true,
|
|
604
|
+
reason: `Wide blast radius (${modifiedFiles.size} files, ${failures.length} failures) — T-07 violated: change surface not minimized`,
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
return { violated: false, reason: 'No blast radius violations — T-07 not violated' };
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* T-08 violation:
|
|
611
|
+
* - Pain signal present but no reflection/self-correction behavior
|
|
612
|
+
* (This is harder to detect without explicit reflection events.
|
|
613
|
+
* We use pain-without-correction as a proxy.)
|
|
614
|
+
*/
|
|
615
|
+
function detectT08Violation(session) {
|
|
616
|
+
const hasPain = session.painSignals.length > 0;
|
|
617
|
+
const hasFailure = session.toolCalls.some((call) => call.outcome === 'failure');
|
|
618
|
+
// If pain and failure, but the agent immediately retries without pause/reflect
|
|
619
|
+
if (hasPain && hasFailure) {
|
|
620
|
+
// Find the first failure index and check if the agent continued without reflecting
|
|
621
|
+
const failureIdx = session.toolCalls.findIndex((c) => c.outcome === 'failure');
|
|
622
|
+
if (failureIdx >= 0) {
|
|
623
|
+
const postFailure = session.toolCalls.slice(failureIdx + 1, failureIdx + 4);
|
|
624
|
+
// If the agent immediately continues without a read/reflect call, T-08 may be violated
|
|
625
|
+
const continuesImmediately = postFailure.length > 0 && !postFailure.some((c) => READ_TOOLS.has(c.toolName));
|
|
626
|
+
if (continuesImmediately) {
|
|
627
|
+
return {
|
|
628
|
+
violated: true,
|
|
629
|
+
reason: 'Failure followed immediately by continued operations without pause/reflect — T-08 violated: pain not treated as signal',
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
return { violated: false, reason: 'No T-08 violation signals detected' };
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* T-09 violation:
|
|
638
|
+
* - Pain or failures on complex tasks that should have been decomposed.
|
|
639
|
+
* Signal: pain/failure on multi-step task without prior planning calls.
|
|
640
|
+
*/
|
|
641
|
+
function detectT09Violation(session) {
|
|
642
|
+
const toolCallCount = session.toolCalls.length;
|
|
643
|
+
const uniqueFiles = new Set(session.toolCalls
|
|
644
|
+
.map((call) => call.filePath)
|
|
645
|
+
.filter((p) => p !== undefined)
|
|
646
|
+
.map((p) => normalizePathPosix(p)));
|
|
647
|
+
// Only applies if the session was complex
|
|
648
|
+
if (toolCallCount < 5 && uniqueFiles.size < 3) {
|
|
649
|
+
return { violated: false, reason: 'Session not complex enough for T-09 applicability' };
|
|
650
|
+
}
|
|
651
|
+
// Check: failures on complex task without prior planning
|
|
652
|
+
const hasFailures = session.toolCalls.some((call) => call.outcome === 'failure');
|
|
653
|
+
const hasPain = session.painSignals.length > 0;
|
|
654
|
+
if (hasFailures || hasPain) {
|
|
655
|
+
// Check if the agent showed decomposition/planning behavior
|
|
656
|
+
const hasPlanApproval = session.planApprovals.length > 0;
|
|
657
|
+
const hasReadFirst = session.toolCalls.some((call) => READ_TOOLS.has(call.toolName));
|
|
658
|
+
if (!hasPlanApproval && !hasReadFirst) {
|
|
659
|
+
return {
|
|
660
|
+
violated: true,
|
|
661
|
+
reason: `Complex task with failures/pain but no planning or decomposition signals — T-09 violated: task not divided`,
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
return { violated: false, reason: 'No T-09 violation signals' };
|
|
666
|
+
}
|
|
667
|
+
// ---------------------------------------------------------------------------
|
|
668
|
+
// Compliance Computation
|
|
669
|
+
// ---------------------------------------------------------------------------
|
|
670
|
+
/**
|
|
671
|
+
* Computes compliance metrics for a single T-xx principle across a batch of sessions.
|
|
672
|
+
*
|
|
673
|
+
* DILUTION PREVENTION:
|
|
674
|
+
* - Sessions where the principle had NO opportunity are EXCLUDED from
|
|
675
|
+
* applicableOpportunityCount and do not affect complianceRate.
|
|
676
|
+
* - Example: T-05 sessions with no risky operations do not dilute
|
|
677
|
+
* the compliance rate computed from T-05 sessions with gate blocks.
|
|
678
|
+
*
|
|
679
|
+
* TREND COMPUTATION:
|
|
680
|
+
* - Sessions are ordered chronologically (most recent first).
|
|
681
|
+
* - Current window: last 3 applicable sessions.
|
|
682
|
+
* - Previous window: sessions 4-6 (if available).
|
|
683
|
+
* - If either window has < 1 applicable session, trend = 0 (insufficient data).
|
|
684
|
+
* - Otherwise: trend = prevViolationRate - currentViolationRate
|
|
685
|
+
* (+1 = improving, 0 = stable, -1 = worsening).
|
|
686
|
+
*/
|
|
687
|
+
/**
|
|
688
|
+
* Computes violation trend across the applicable session list.
|
|
689
|
+
*
|
|
690
|
+
* Trend is positive (+1) when violations are DECREASING (improving).
|
|
691
|
+
* Trend is negative (-1) when violations are INCREASING (worsening).
|
|
692
|
+
*
|
|
693
|
+
* Sessions are ordered most-recent-first.
|
|
694
|
+
* currentWindow = first windowSize sessions (most recent)
|
|
695
|
+
* previousWindow = next windowSize sessions
|
|
696
|
+
*/
|
|
697
|
+
function computeViolationTrend(applicableSessions, windowSize) {
|
|
698
|
+
if (applicableSessions.length < 2) {
|
|
699
|
+
// Not enough data for trend
|
|
700
|
+
return 0;
|
|
701
|
+
}
|
|
702
|
+
// Sessions are ordered most-recent-first in the input array.
|
|
703
|
+
// currentWindow = most recent N sessions
|
|
704
|
+
// previousWindow = N sessions before that (older)
|
|
705
|
+
const currentWindow = applicableSessions.slice(0, windowSize);
|
|
706
|
+
const previousWindow = applicableSessions.slice(windowSize, windowSize * 2);
|
|
707
|
+
if (currentWindow.length === 0)
|
|
708
|
+
return 0;
|
|
709
|
+
const currentViolationRate = currentWindow.filter((s) => s.violated).length / currentWindow.length;
|
|
710
|
+
if (previousWindow.length === 0) {
|
|
711
|
+
// No previous window — compare to overall rate
|
|
712
|
+
const overallRate = applicableSessions.filter((s) => s.violated).length / applicableSessions.length;
|
|
713
|
+
if (currentViolationRate < overallRate - 0.1)
|
|
714
|
+
return 1; // improving
|
|
715
|
+
if (currentViolationRate > overallRate + 0.1)
|
|
716
|
+
return -1; // worsening
|
|
717
|
+
return 0;
|
|
718
|
+
}
|
|
719
|
+
const previousViolationRate = previousWindow.filter((s) => s.violated).length / previousWindow.length;
|
|
720
|
+
const delta = previousViolationRate - currentViolationRate;
|
|
721
|
+
if (delta > 0.1)
|
|
722
|
+
return 1; // violations decreasing → improving
|
|
723
|
+
if (delta < -0.1)
|
|
724
|
+
return -1; // violations increasing → worsening
|
|
725
|
+
return 0; // stable
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Builds a human-readable explanation for the compliance result.
|
|
729
|
+
*/
|
|
730
|
+
function buildExplanation(params) {
|
|
731
|
+
const { principleId, applicableOpportunityCount, observedViolationCount, complianceRate, violationTrend, applicableSessions, } = params;
|
|
732
|
+
const trendStr = violationTrend === 1
|
|
733
|
+
? '↑ improving'
|
|
734
|
+
: violationTrend === -1
|
|
735
|
+
? '↓ worsening'
|
|
736
|
+
: '→ stable';
|
|
737
|
+
if (applicableOpportunityCount === 0) {
|
|
738
|
+
return `${principleId}: No applicable opportunities in provided sessions — compliance cannot be assessed.`;
|
|
739
|
+
}
|
|
740
|
+
const violationExamples = applicableSessions
|
|
741
|
+
.filter((s) => s.violated)
|
|
742
|
+
.slice(0, 2)
|
|
743
|
+
.map((s) => ` • ${s.reason}`)
|
|
744
|
+
.join('\n');
|
|
745
|
+
return [
|
|
746
|
+
`${principleId}: ${applicableOpportunityCount} applicable opportunities, ${observedViolationCount} violations.`,
|
|
747
|
+
`Compliance rate: ${(complianceRate * 100).toFixed(1)}%. Trend: ${trendStr}.`,
|
|
748
|
+
violationExamples ? `Sample violation signals:\n${violationExamples}` : 'No violations detected in recent sessions.',
|
|
749
|
+
].join('\n');
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Computes compliance metrics for a single T-xx principle across a batch of sessions.
|
|
753
|
+
*
|
|
754
|
+
* DILUTION PREVENTION:
|
|
755
|
+
* - Sessions where the principle had NO opportunity are EXCLUDED from
|
|
756
|
+
* applicableOpportunityCount and do not affect complianceRate.
|
|
757
|
+
* - Example: T-05 sessions with no risky operations do not dilute
|
|
758
|
+
* the compliance rate computed from T-05 sessions with gate blocks.
|
|
759
|
+
*
|
|
760
|
+
* TREND COMPUTATION:
|
|
761
|
+
* - Sessions are ordered chronologically (most recent first).
|
|
762
|
+
* - Current window: last 3 applicable sessions.
|
|
763
|
+
* - Previous window: sessions 4-6 (if available).
|
|
764
|
+
* - If either window has < 1 applicable session, trend = 0 (insufficient data).
|
|
765
|
+
* - Otherwise: trend = prevViolationRate - currentViolationRate
|
|
766
|
+
* (+1 = improving, 0 = stable, -1 = worsening).
|
|
767
|
+
*/
|
|
768
|
+
export function computeCompliance(principleId, sessions, options = {}) {
|
|
769
|
+
const windowSize = options.trendWindowSize ?? 3;
|
|
770
|
+
let applicableOpportunityCount = 0;
|
|
771
|
+
let observedViolationCount = 0;
|
|
772
|
+
const applicableSessions = [];
|
|
773
|
+
for (const session of sessions) {
|
|
774
|
+
const opp = detectOpportunity(principleId, session);
|
|
775
|
+
if (!opp.applicable) {
|
|
776
|
+
// Principle had no opportunity in this session — skip entirely.
|
|
777
|
+
// This is the key dilution-prevention mechanism.
|
|
778
|
+
continue;
|
|
779
|
+
}
|
|
780
|
+
applicableOpportunityCount++;
|
|
781
|
+
const violation = detectViolation(principleId, session);
|
|
782
|
+
if (violation.violated) {
|
|
783
|
+
observedViolationCount++;
|
|
784
|
+
}
|
|
785
|
+
applicableSessions.push({
|
|
786
|
+
session,
|
|
787
|
+
violated: violation.violated,
|
|
788
|
+
reason: violation.reason,
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
// Compute complianceRate
|
|
792
|
+
const complianceRate = applicableOpportunityCount > 0
|
|
793
|
+
? (applicableOpportunityCount - observedViolationCount) / applicableOpportunityCount
|
|
794
|
+
: 0;
|
|
795
|
+
// Compute violationTrend using windows
|
|
796
|
+
const violationTrend = computeViolationTrend(applicableSessions, windowSize);
|
|
797
|
+
// Build explanation
|
|
798
|
+
const explanation = buildExplanation({
|
|
799
|
+
principleId,
|
|
800
|
+
applicableOpportunityCount,
|
|
801
|
+
observedViolationCount,
|
|
802
|
+
complianceRate,
|
|
803
|
+
violationTrend,
|
|
804
|
+
applicableSessions,
|
|
805
|
+
});
|
|
806
|
+
return {
|
|
807
|
+
principleId,
|
|
808
|
+
applicableOpportunityCount,
|
|
809
|
+
observedViolationCount,
|
|
810
|
+
complianceRate,
|
|
811
|
+
violationTrend,
|
|
812
|
+
explanation,
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
// ---------------------------------------------------------------------------
|
|
816
|
+
// Batch Update Helpers
|
|
817
|
+
// ---------------------------------------------------------------------------
|
|
818
|
+
/**
|
|
819
|
+
* Computes compliance results for all T-01 through T-09 principles
|
|
820
|
+
* across the provided sessions.
|
|
821
|
+
*
|
|
822
|
+
* Sessions are assumed to be ordered most-recent-first.
|
|
823
|
+
*/
|
|
824
|
+
export function computeAllCompliance(sessions, options = {}) {
|
|
825
|
+
const results = [];
|
|
826
|
+
for (const id of ['T-01', 'T-02', 'T-03', 'T-04', 'T-05', 'T-06', 'T-07', 'T-08', 'T-09']) {
|
|
827
|
+
results.push(computeCompliance(id, sessions, options));
|
|
828
|
+
}
|
|
829
|
+
return results;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Converts raw EventLogEntry[] from event-types.ts into SessionEvents.
|
|
833
|
+
*
|
|
834
|
+
* Groups events by sessionId and maps to the SessionEvents interface.
|
|
835
|
+
* Events with no sessionId are grouped under sessionId = 'unknown'.
|
|
836
|
+
*/
|
|
837
|
+
export function groupEventsIntoSessions(events) {
|
|
838
|
+
const sessionMap = new Map();
|
|
839
|
+
for (const event of events) {
|
|
840
|
+
const sessionId = event.sessionId ?? 'unknown';
|
|
841
|
+
if (!sessionMap.has(sessionId)) {
|
|
842
|
+
sessionMap.set(sessionId, {
|
|
843
|
+
sessionId,
|
|
844
|
+
toolCalls: [],
|
|
845
|
+
painSignals: [],
|
|
846
|
+
gateBlocks: [],
|
|
847
|
+
userCorrections: [],
|
|
848
|
+
planApprovals: [],
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
const session = sessionMap.get(sessionId);
|
|
852
|
+
if (!session)
|
|
853
|
+
continue;
|
|
854
|
+
switch (event.type) {
|
|
855
|
+
case 'tool_call': {
|
|
856
|
+
const { toolName } = event.data;
|
|
857
|
+
if (typeof toolName !== 'string' || toolName.length === 0)
|
|
858
|
+
break;
|
|
859
|
+
session.toolCalls.push({
|
|
860
|
+
toolName,
|
|
861
|
+
filePath: typeof event.data.filePath === 'string' ? event.data.filePath : undefined,
|
|
862
|
+
outcome: event.data.error ? 'failure' : 'success',
|
|
863
|
+
errorType: typeof event.data.errorType === 'string' ? event.data.errorType : undefined,
|
|
864
|
+
errorMessage: typeof event.data.error === 'string' ? event.data.error : undefined,
|
|
865
|
+
});
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
case 'pain_signal': {
|
|
869
|
+
const { score } = event.data;
|
|
870
|
+
if (typeof score !== 'number' || !Number.isFinite(score))
|
|
871
|
+
break;
|
|
872
|
+
session.painSignals.push({
|
|
873
|
+
source: typeof event.data.source === 'string' ? event.data.source : 'unknown',
|
|
874
|
+
score,
|
|
875
|
+
severity: event.data.severity === 'mild' || event.data.severity === 'moderate' || event.data.severity === 'severe' ? event.data.severity : undefined,
|
|
876
|
+
reason: typeof event.data.reason === 'string' ? event.data.reason : undefined,
|
|
877
|
+
});
|
|
878
|
+
break;
|
|
879
|
+
}
|
|
880
|
+
case 'gate_block': {
|
|
881
|
+
const { toolName, reason } = event.data;
|
|
882
|
+
if (typeof toolName !== 'string' || toolName.length === 0)
|
|
883
|
+
break;
|
|
884
|
+
if (typeof reason !== 'string' || reason.length === 0)
|
|
885
|
+
break;
|
|
886
|
+
session.gateBlocks.push({
|
|
887
|
+
toolName,
|
|
888
|
+
filePath: typeof event.data.filePath === 'string' ? event.data.filePath : undefined,
|
|
889
|
+
reason,
|
|
890
|
+
});
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
case 'empathy_rollback':
|
|
894
|
+
session.userCorrections.push({
|
|
895
|
+
correctionCue: typeof event.data.reason === 'string' ? event.data.reason : undefined,
|
|
896
|
+
});
|
|
897
|
+
break;
|
|
898
|
+
case 'plan_approval': {
|
|
899
|
+
const { toolName } = event.data;
|
|
900
|
+
if (typeof toolName !== 'string' || toolName.length === 0)
|
|
901
|
+
break;
|
|
902
|
+
session.planApprovals.push({
|
|
903
|
+
toolName,
|
|
904
|
+
filePath: typeof event.data.filePath === 'string' ? event.data.filePath : undefined,
|
|
905
|
+
});
|
|
906
|
+
break;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
return sessionMap;
|
|
911
|
+
}
|
|
912
|
+
//# sourceMappingURL=nocturnal-compliance.js.map
|