@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,1181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SqliteContextAssembler comprehensive test suite.
|
|
3
|
+
*
|
|
4
|
+
* Tests context assembly from diagnostician task records, UUID/hash generation,
|
|
5
|
+
* diagnosis target mapping, ambiguity notes for data quality, schema validation,
|
|
6
|
+
* and error handling for invalid inputs.
|
|
7
|
+
*
|
|
8
|
+
* Uses a mock TaskStore (returns DiagnosticianTaskRecord) and real SQLite
|
|
9
|
+
* RunStore + HistoryQuery for integration coverage.
|
|
10
|
+
*/
|
|
11
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
12
|
+
import * as fs from 'fs';
|
|
13
|
+
import * as path from 'path';
|
|
14
|
+
import * as os from 'os';
|
|
15
|
+
import { createHash } from 'node:crypto';
|
|
16
|
+
import { Value } from '@sinclair/typebox/value';
|
|
17
|
+
import { SqliteConnection } from '../sqlite-connection.js';
|
|
18
|
+
import { SqliteTaskStore } from '../task/sqlite-task-store.js';
|
|
19
|
+
import { SqliteRunStore } from '../run/sqlite-run-store.js';
|
|
20
|
+
import { SqliteHistoryQuery } from '../history/sqlite-history-query.js';
|
|
21
|
+
import { SqliteTrajectoryLocator } from '../trajectory/sqlite-trajectory-locator.js';
|
|
22
|
+
import { SqliteSourceTraceLocator } from '../trajectory/sqlite-source-trace-locator.js';
|
|
23
|
+
import { SqliteContextAssembler } from './sqlite-context-assembler.js';
|
|
24
|
+
import { DiagnosticianContextPayloadSchema } from '../../context-payload.js';
|
|
25
|
+
// ── Mock TaskStore that returns DiagnosticianTaskRecord ──
|
|
26
|
+
function createMockTaskStore(tasks) {
|
|
27
|
+
return {
|
|
28
|
+
createTask: vi.fn(),
|
|
29
|
+
getTask: vi.fn(async (taskId) => tasks.get(taskId) ?? null),
|
|
30
|
+
updateTask: vi.fn(),
|
|
31
|
+
listTasks: vi.fn(async () => []),
|
|
32
|
+
deleteTask: vi.fn(async () => true),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function makeDiagnosticianTask(overrides) {
|
|
36
|
+
const now = new Date().toISOString();
|
|
37
|
+
return {
|
|
38
|
+
taskId: overrides?.taskId ?? `task_${Date.now()}`,
|
|
39
|
+
taskKind: 'diagnostician',
|
|
40
|
+
status: overrides?.status ?? 'pending',
|
|
41
|
+
createdAt: overrides?.createdAt ?? now,
|
|
42
|
+
updatedAt: overrides?.updatedAt ?? now,
|
|
43
|
+
attemptCount: overrides?.attemptCount ?? 0,
|
|
44
|
+
maxAttempts: overrides?.maxAttempts ?? 3,
|
|
45
|
+
workspaceDir: overrides?.workspaceDir ?? '/tmp/test-workspace',
|
|
46
|
+
reasonSummary: overrides?.reasonSummary ?? 'Test diagnostician task',
|
|
47
|
+
sourcePainId: overrides?.sourcePainId,
|
|
48
|
+
severity: overrides?.severity,
|
|
49
|
+
source: overrides?.source,
|
|
50
|
+
sessionIdHint: overrides?.sessionIdHint,
|
|
51
|
+
agentIdHint: overrides?.agentIdHint,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function createFixture(tasks, options) {
|
|
55
|
+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pd-context-assembler-test-'));
|
|
56
|
+
const connection = new SqliteConnection(tmpDir);
|
|
57
|
+
const sqliteTaskStore = new SqliteTaskStore(connection);
|
|
58
|
+
const runStore = new SqliteRunStore(connection);
|
|
59
|
+
const historyQuery = new SqliteHistoryQuery(connection);
|
|
60
|
+
const taskMap = tasks ?? new Map();
|
|
61
|
+
const taskStore = createMockTaskStore(taskMap);
|
|
62
|
+
const sourceTraceLocator = options?.withLocator
|
|
63
|
+
? new SqliteSourceTraceLocator(taskStore, new SqliteTrajectoryLocator(connection))
|
|
64
|
+
: undefined;
|
|
65
|
+
const assembler = new SqliteContextAssembler(taskStore, historyQuery, runStore, { sourceTraceLocator });
|
|
66
|
+
return { tmpDir, connection, sqliteTaskStore, runStore, historyQuery, sourceTraceLocator, taskStore, taskMap, assembler };
|
|
67
|
+
}
|
|
68
|
+
function cleanupFixture(fixture) {
|
|
69
|
+
fixture.connection.close();
|
|
70
|
+
fs.rmSync(fixture.tmpDir, { recursive: true, force: true });
|
|
71
|
+
}
|
|
72
|
+
/** Create a base task row in SQLite for FK satisfaction, then create a run. */
|
|
73
|
+
async function createRunWithPayloads(fixture, taskId, options) {
|
|
74
|
+
// Ensure a base task row exists in SQLite for FK constraint
|
|
75
|
+
const existing = await fixture.sqliteTaskStore.getTask(taskId);
|
|
76
|
+
if (!existing) {
|
|
77
|
+
await fixture.sqliteTaskStore.createTask({
|
|
78
|
+
taskId,
|
|
79
|
+
taskKind: 'diagnostician',
|
|
80
|
+
status: 'pending',
|
|
81
|
+
attemptCount: 0,
|
|
82
|
+
maxAttempts: 3,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const now = new Date().toISOString();
|
|
86
|
+
return fixture.runStore.createRun({
|
|
87
|
+
runId: `run_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
88
|
+
taskId,
|
|
89
|
+
attemptNumber: 1,
|
|
90
|
+
executionStatus: 'succeeded',
|
|
91
|
+
startedAt: now,
|
|
92
|
+
runtimeKind: options?.runtimeKind ?? 'openclaw',
|
|
93
|
+
inputPayload: options?.inputPayload,
|
|
94
|
+
outputPayload: options?.outputPayload,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/** Create a source task in SQLite with sessionIdHint in diagnosticJson for TrajectoryLocator. */
|
|
98
|
+
async function ensureSourceTask(fixture, sourceTaskId, opts) {
|
|
99
|
+
const dj = { sessionIdHint: opts.sessionId };
|
|
100
|
+
if (opts.sourcePainId)
|
|
101
|
+
dj.sourcePainId = opts.sourcePainId;
|
|
102
|
+
const existing = await fixture.sqliteTaskStore.getTask(sourceTaskId);
|
|
103
|
+
if (!existing) {
|
|
104
|
+
await fixture.sqliteTaskStore.createTask({
|
|
105
|
+
taskId: sourceTaskId,
|
|
106
|
+
taskKind: 'user_session',
|
|
107
|
+
status: 'succeeded',
|
|
108
|
+
attemptCount: 1,
|
|
109
|
+
maxAttempts: 1,
|
|
110
|
+
diagnosticJson: JSON.stringify(dj),
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
fixture.taskMap.set(sourceTaskId, {
|
|
114
|
+
taskId: sourceTaskId,
|
|
115
|
+
taskKind: 'user_session',
|
|
116
|
+
status: 'succeeded',
|
|
117
|
+
createdAt: new Date().toISOString(),
|
|
118
|
+
updatedAt: new Date().toISOString(),
|
|
119
|
+
attemptCount: 1,
|
|
120
|
+
maxAttempts: 1,
|
|
121
|
+
diagnosticJson: JSON.stringify(dj),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/** Helper: check that ambiguityNotes includes a substring (safely). */
|
|
125
|
+
function notesInclude(notes, substring) {
|
|
126
|
+
return notes !== undefined && notes.some((n) => n.includes(substring));
|
|
127
|
+
}
|
|
128
|
+
describe('SqliteContextAssembler', () => {
|
|
129
|
+
it('assembles payload from diagnostician task with history', async () => {
|
|
130
|
+
const task = makeDiagnosticianTask({
|
|
131
|
+
taskId: 'task_diag_1',
|
|
132
|
+
sourcePainId: 'pain-001',
|
|
133
|
+
severity: 'high',
|
|
134
|
+
source: 'test',
|
|
135
|
+
sessionIdHint: 'sess-123',
|
|
136
|
+
reasonSummary: 'Test reason',
|
|
137
|
+
});
|
|
138
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
139
|
+
const f = createFixture(tasks);
|
|
140
|
+
try {
|
|
141
|
+
const run1 = await createRunWithPayloads(f, task.taskId, { inputPayload: 'input 1', outputPayload: 'output 1' });
|
|
142
|
+
const run2 = await createRunWithPayloads(f, task.taskId, { inputPayload: 'input 2', outputPayload: 'output 2' });
|
|
143
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
144
|
+
// contextId is UUID format
|
|
145
|
+
expect(payload.contextId).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
|
146
|
+
// contextHash is 64-char hex
|
|
147
|
+
expect(payload.contextHash).toMatch(/^[0-9a-f]{64}$/);
|
|
148
|
+
expect(payload.taskId).toBe('task_diag_1');
|
|
149
|
+
expect(payload.workspaceDir).toBe('/tmp/test-workspace');
|
|
150
|
+
// sourceRefs contains taskId + both runIds
|
|
151
|
+
expect(payload.sourceRefs).toContain('task_diag_1');
|
|
152
|
+
expect(payload.sourceRefs).toContain(run1.runId);
|
|
153
|
+
expect(payload.sourceRefs).toContain(run2.runId);
|
|
154
|
+
// diagnosisTarget has mapped fields
|
|
155
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Test reason');
|
|
156
|
+
expect(payload.diagnosisTarget.source).toBe('test');
|
|
157
|
+
expect(payload.diagnosisTarget.severity).toBe('high');
|
|
158
|
+
expect(payload.diagnosisTarget.painId).toBe('pain-001');
|
|
159
|
+
expect(payload.diagnosisTarget.sessionIdHint).toBe('sess-123');
|
|
160
|
+
// conversationWindow has entries (2 per run)
|
|
161
|
+
expect(payload.conversationWindow.length).toBeGreaterThanOrEqual(4);
|
|
162
|
+
}
|
|
163
|
+
finally {
|
|
164
|
+
cleanupFixture(f);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
it('throws storage_unavailable when task not found', async () => {
|
|
168
|
+
const f = createFixture();
|
|
169
|
+
try {
|
|
170
|
+
await expect(f.assembler.assemble('nonexistent-task-id')).rejects.toThrow('[storage_unavailable]');
|
|
171
|
+
}
|
|
172
|
+
finally {
|
|
173
|
+
cleanupFixture(f);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
it('throws input_invalid when task is not diagnostician', async () => {
|
|
177
|
+
const nonDiagTask = {
|
|
178
|
+
taskId: 'task_other',
|
|
179
|
+
taskKind: 'other_kind',
|
|
180
|
+
status: 'pending',
|
|
181
|
+
createdAt: new Date().toISOString(),
|
|
182
|
+
updatedAt: new Date().toISOString(),
|
|
183
|
+
attemptCount: 0,
|
|
184
|
+
maxAttempts: 3,
|
|
185
|
+
};
|
|
186
|
+
// Cast is safe: mock returns whatever we put in the map.
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
188
|
+
const tasks = new Map([[nonDiagTask.taskId, nonDiagTask]]);
|
|
189
|
+
const f = createFixture(tasks);
|
|
190
|
+
try {
|
|
191
|
+
await expect(f.assembler.assemble('task_other')).rejects.toThrow('[input_invalid]');
|
|
192
|
+
}
|
|
193
|
+
finally {
|
|
194
|
+
cleanupFixture(f);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
it('returns valid payload with empty conversationWindow', async () => {
|
|
198
|
+
const task = makeDiagnosticianTask({ taskId: 'task_empty_hist' });
|
|
199
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
200
|
+
const f = createFixture(tasks);
|
|
201
|
+
try {
|
|
202
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
203
|
+
expect(payload.conversationWindow).toEqual([]);
|
|
204
|
+
// contextHash is hash of '[]'
|
|
205
|
+
const expectedHash = createHash('sha256').update('[]').digest('hex');
|
|
206
|
+
expect(payload.contextHash).toBe(expectedHash);
|
|
207
|
+
// ambiguityNotes should mention no history
|
|
208
|
+
expect(notesInclude(payload.ambiguityNotes, 'No conversation history')).toBe(true);
|
|
209
|
+
}
|
|
210
|
+
finally {
|
|
211
|
+
cleanupFixture(f);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
it('includes ambiguity note for truncated history', async () => {
|
|
215
|
+
const task = makeDiagnosticianTask({ taskId: 'task_truncated' });
|
|
216
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
217
|
+
const f = createFixture(tasks);
|
|
218
|
+
try {
|
|
219
|
+
// Create enough runs to exceed default page size (50 entries = 25 runs)
|
|
220
|
+
for (let i = 0; i < 30; i++) {
|
|
221
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: `input ${i}`, outputPayload: `output ${i}` });
|
|
222
|
+
}
|
|
223
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
224
|
+
// ambiguityNotes should mention truncation
|
|
225
|
+
expect(notesInclude(payload.ambiguityNotes, 'truncated')).toBe(true);
|
|
226
|
+
}
|
|
227
|
+
finally {
|
|
228
|
+
cleanupFixture(f);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
it('includes ambiguity note for entries with empty text', async () => {
|
|
232
|
+
const task = makeDiagnosticianTask({ taskId: 'task_empty_text' });
|
|
233
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
234
|
+
const f = createFixture(tasks);
|
|
235
|
+
try {
|
|
236
|
+
// Create runs with no payloads (undefined text in entries)
|
|
237
|
+
await createRunWithPayloads(f, task.taskId);
|
|
238
|
+
await createRunWithPayloads(f, task.taskId);
|
|
239
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
240
|
+
expect(notesInclude(payload.ambiguityNotes, 'empty text content')).toBe(true);
|
|
241
|
+
}
|
|
242
|
+
finally {
|
|
243
|
+
cleanupFixture(f);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
it('ambiguityNotes is undefined when no quality issues', async () => {
|
|
247
|
+
const task = makeDiagnosticianTask({ taskId: 'task_clean' });
|
|
248
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
249
|
+
const f = createFixture(tasks);
|
|
250
|
+
try {
|
|
251
|
+
// Create clean runs with all payloads present (and few enough not to truncate)
|
|
252
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'good input', outputPayload: 'good output' });
|
|
253
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'good input 2', outputPayload: 'good output 2' });
|
|
254
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
255
|
+
expect(payload.ambiguityNotes).toBeUndefined();
|
|
256
|
+
}
|
|
257
|
+
finally {
|
|
258
|
+
cleanupFixture(f);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
it('contextHash is deterministic for same conversationWindow', async () => {
|
|
262
|
+
const task = makeDiagnosticianTask({ taskId: 'task_deterministic' });
|
|
263
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
264
|
+
const f = createFixture(tasks);
|
|
265
|
+
try {
|
|
266
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'input', outputPayload: 'output' });
|
|
267
|
+
const payload1 = await f.assembler.assemble(task.taskId);
|
|
268
|
+
const payload2 = await f.assembler.assemble(task.taskId);
|
|
269
|
+
// Same conversationWindow → same hash
|
|
270
|
+
expect(payload1.contextHash).toBe(payload2.contextHash);
|
|
271
|
+
// contextId differs (random UUID)
|
|
272
|
+
expect(payload1.contextId).not.toBe(payload2.contextId);
|
|
273
|
+
}
|
|
274
|
+
finally {
|
|
275
|
+
cleanupFixture(f);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
it('diagnosisTarget maps all DiagnosticianTaskRecord fields', async () => {
|
|
279
|
+
const task = makeDiagnosticianTask({
|
|
280
|
+
taskId: 'task_fields',
|
|
281
|
+
sourcePainId: 'pain-456',
|
|
282
|
+
severity: 'critical',
|
|
283
|
+
source: 'agent',
|
|
284
|
+
sessionIdHint: 'sess-789',
|
|
285
|
+
reasonSummary: 'Detailed reason',
|
|
286
|
+
});
|
|
287
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
288
|
+
const f = createFixture(tasks);
|
|
289
|
+
try {
|
|
290
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'input', outputPayload: 'output' });
|
|
291
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
292
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Detailed reason');
|
|
293
|
+
expect(payload.diagnosisTarget.source).toBe('agent');
|
|
294
|
+
expect(payload.diagnosisTarget.severity).toBe('critical');
|
|
295
|
+
expect(payload.diagnosisTarget.painId).toBe('pain-456');
|
|
296
|
+
expect(payload.diagnosisTarget.sessionIdHint).toBe('sess-789');
|
|
297
|
+
}
|
|
298
|
+
finally {
|
|
299
|
+
cleanupFixture(f);
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
it('diagnosisTarget omits undefined optional fields', async () => {
|
|
303
|
+
const task = makeDiagnosticianTask({
|
|
304
|
+
taskId: 'task_minimal',
|
|
305
|
+
sourcePainId: undefined,
|
|
306
|
+
severity: undefined,
|
|
307
|
+
source: undefined,
|
|
308
|
+
sessionIdHint: undefined,
|
|
309
|
+
reasonSummary: 'Minimal task',
|
|
310
|
+
});
|
|
311
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
312
|
+
const f = createFixture(tasks);
|
|
313
|
+
try {
|
|
314
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'input', outputPayload: 'output' });
|
|
315
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
316
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Minimal task');
|
|
317
|
+
expect(payload.diagnosisTarget.painId).toBeUndefined();
|
|
318
|
+
expect(payload.diagnosisTarget.source).toBeUndefined();
|
|
319
|
+
expect(payload.diagnosisTarget.severity).toBeUndefined();
|
|
320
|
+
expect(payload.diagnosisTarget.sessionIdHint).toBeUndefined();
|
|
321
|
+
}
|
|
322
|
+
finally {
|
|
323
|
+
cleanupFixture(f);
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
it('payload validates against DiagnosticianContextPayloadSchema', async () => {
|
|
327
|
+
const task = makeDiagnosticianTask({ taskId: 'task_schema' });
|
|
328
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
329
|
+
const f = createFixture(tasks);
|
|
330
|
+
try {
|
|
331
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'input', outputPayload: 'output' });
|
|
332
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
333
|
+
// assemble() validates internally, so reaching here means it passed.
|
|
334
|
+
// Double-check explicitly:
|
|
335
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, payload)).toBe(true);
|
|
336
|
+
}
|
|
337
|
+
finally {
|
|
338
|
+
cleanupFixture(f);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
it('assembles context with openclaw-history runtime_kind runs (compatibility import)', async () => {
|
|
342
|
+
// This covers the m3-08 fix: imported runs from trajectory.db use runtimeKind='openclaw-history'
|
|
343
|
+
const task = makeDiagnosticianTask({ taskId: 'task_openclaw_history' });
|
|
344
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
345
|
+
const f = createFixture(tasks);
|
|
346
|
+
try {
|
|
347
|
+
await createRunWithPayloads(f, task.taskId, {
|
|
348
|
+
runtimeKind: 'openclaw-history',
|
|
349
|
+
inputPayload: '{"type":"session_history","sessionId":"test-sess","userTurns":[],"toolCalls":[]}',
|
|
350
|
+
outputPayload: '{"type":"assistant_turns","sessionId":"test-sess","turns":[]}',
|
|
351
|
+
});
|
|
352
|
+
// Must not throw — openclaw-history must be accepted by RuntimeKindSchema
|
|
353
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
354
|
+
expect(payload.taskId).toBe('task_openclaw_history');
|
|
355
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, payload)).toBe(true);
|
|
356
|
+
}
|
|
357
|
+
finally {
|
|
358
|
+
cleanupFixture(f);
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
it('includes openclaw-history run entries in conversationWindow (time window fix)', async () => {
|
|
362
|
+
// m3-09: Without timeWindowStart=task.createdAt, historical runs outside the
|
|
363
|
+
// default 24-hour window would be filtered out and conversationWindow would be empty.
|
|
364
|
+
const thirtyDaysAgo = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString();
|
|
365
|
+
const task = makeDiagnosticianTask({
|
|
366
|
+
taskId: 'task_old_history',
|
|
367
|
+
createdAt: thirtyDaysAgo,
|
|
368
|
+
updatedAt: thirtyDaysAgo,
|
|
369
|
+
});
|
|
370
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
371
|
+
const f = createFixture(tasks);
|
|
372
|
+
try {
|
|
373
|
+
await createRunWithPayloads(f, task.taskId, {
|
|
374
|
+
runtimeKind: 'openclaw-history',
|
|
375
|
+
inputPayload: '{"type":"session_history","sessionId":"old-sess","userTurns":[{"turnIndex":1,"text":"hello"}]}',
|
|
376
|
+
outputPayload: '{"type":"assistant_turns","sessionId":"old-sess","turns":[{"provider":"openai","model":"gpt-4","text":"hi"}]}',
|
|
377
|
+
});
|
|
378
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
379
|
+
// conversationWindow must have entries from the historical run (not empty)
|
|
380
|
+
expect(payload.conversationWindow.length).toBeGreaterThan(0);
|
|
381
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, payload)).toBe(true);
|
|
382
|
+
}
|
|
383
|
+
finally {
|
|
384
|
+
cleanupFixture(f);
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
// ── Full Trace Tests (PRI-171) ──
|
|
388
|
+
it('builds fullTrace from source pain trajectory, not diagnostician task runs', async () => {
|
|
389
|
+
const sessionId = 'sess-src-happy';
|
|
390
|
+
const sourceTaskId = 'task_source_happy';
|
|
391
|
+
const diagTask = makeDiagnosticianTask({
|
|
392
|
+
taskId: 'task_diag_happy',
|
|
393
|
+
sourcePainId: 'pain-src-happy',
|
|
394
|
+
sessionIdHint: sessionId,
|
|
395
|
+
severity: 'high',
|
|
396
|
+
source: 'test',
|
|
397
|
+
reasonSummary: 'Source trace test',
|
|
398
|
+
});
|
|
399
|
+
const tasks = new Map([[diagTask.taskId, diagTask]]);
|
|
400
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
401
|
+
try {
|
|
402
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-src-happy' });
|
|
403
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
404
|
+
inputPayload: JSON.stringify({
|
|
405
|
+
type: 'session_history',
|
|
406
|
+
sessionId,
|
|
407
|
+
userTurns: [{ turnIndex: 1, text: 'user asked something' }],
|
|
408
|
+
toolCalls: [{ toolName: 'Read', status: 'succeeded', params: { file: '/src/main.ts' } }],
|
|
409
|
+
}),
|
|
410
|
+
outputPayload: JSON.stringify({
|
|
411
|
+
type: 'assistant_turns',
|
|
412
|
+
sessionId,
|
|
413
|
+
turns: [{ provider: 'openai', model: 'gpt-4', text: 'here is the file content' }],
|
|
414
|
+
}),
|
|
415
|
+
});
|
|
416
|
+
const payload = await f.assembler.assemble(diagTask.taskId);
|
|
417
|
+
const ft = payload.fullTrace;
|
|
418
|
+
expect(ft).not.toBeNull();
|
|
419
|
+
if (!ft)
|
|
420
|
+
return;
|
|
421
|
+
if ('sourcePainId' in ft) {
|
|
422
|
+
expect(ft.sourcePainId).toBe('pain-src-happy');
|
|
423
|
+
expect(ft.sourceTaskId).toBe(sourceTaskId);
|
|
424
|
+
expect(ft.timeline.length).toBeGreaterThan(0);
|
|
425
|
+
expect(ft.sourceRefs.length).toBeGreaterThan(0);
|
|
426
|
+
expect(ft.ambiguityNotes).toBeDefined();
|
|
427
|
+
expect(ft.sanitizationNotes).toBeDefined();
|
|
428
|
+
expect(ft.capturedAt).toBeDefined();
|
|
429
|
+
const toolCallEntries = ft.timeline.filter((e) => e.kind === 'tool_call');
|
|
430
|
+
expect(toolCallEntries.length).toBeGreaterThan(0);
|
|
431
|
+
expect(toolCallEntries.some((e) => e.summary.includes('Read'))).toBe(true);
|
|
432
|
+
}
|
|
433
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, payload)).toBe(true);
|
|
434
|
+
}
|
|
435
|
+
finally {
|
|
436
|
+
cleanupFixture(f);
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
it('sets fullTrace to null when no sourcePainId', async () => {
|
|
440
|
+
const task = makeDiagnosticianTask({
|
|
441
|
+
taskId: 'task_no_painid',
|
|
442
|
+
sourcePainId: undefined,
|
|
443
|
+
});
|
|
444
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
445
|
+
const f = createFixture(tasks);
|
|
446
|
+
try {
|
|
447
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'input', outputPayload: 'output' });
|
|
448
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
449
|
+
expect(payload.fullTrace).toBeNull();
|
|
450
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, payload)).toBe(true);
|
|
451
|
+
}
|
|
452
|
+
finally {
|
|
453
|
+
cleanupFixture(f);
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
it('returns null fullTrace with ambiguityNotes when source trace not found', async () => {
|
|
457
|
+
const task = makeDiagnosticianTask({
|
|
458
|
+
taskId: 'task_src_not_found',
|
|
459
|
+
sourcePainId: 'pain-not-found',
|
|
460
|
+
sessionIdHint: 'sess-no-match',
|
|
461
|
+
});
|
|
462
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
463
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
464
|
+
try {
|
|
465
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
466
|
+
expect(payload.fullTrace).toBeNull();
|
|
467
|
+
expect(notesInclude(payload.ambiguityNotes, 'Source trace not found')).toBe(true);
|
|
468
|
+
expect(notesInclude(payload.ambiguityNotes, 'pain-not-found')).toBe(true);
|
|
469
|
+
}
|
|
470
|
+
finally {
|
|
471
|
+
cleanupFixture(f);
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
it('does not include diagnostician task runs in fullTrace when source unresolvable', async () => {
|
|
475
|
+
const diagTask = makeDiagnosticianTask({
|
|
476
|
+
taskId: 'task_no_fallback',
|
|
477
|
+
sourcePainId: 'pain-unresolvable',
|
|
478
|
+
sessionIdHint: 'sess-no-source',
|
|
479
|
+
});
|
|
480
|
+
const tasks = new Map([[diagTask.taskId, diagTask]]);
|
|
481
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
482
|
+
try {
|
|
483
|
+
await createRunWithPayloads(f, diagTask.taskId, {
|
|
484
|
+
inputPayload: JSON.stringify({
|
|
485
|
+
toolCalls: [{ toolName: 'DiagOnlyTool', status: 'succeeded', params: {} }],
|
|
486
|
+
}),
|
|
487
|
+
outputPayload: '{}',
|
|
488
|
+
});
|
|
489
|
+
const payload = await f.assembler.assemble(diagTask.taskId);
|
|
490
|
+
expect(payload.fullTrace).toBeNull();
|
|
491
|
+
expect(notesInclude(payload.ambiguityNotes, 'Source trace not found')).toBe(true);
|
|
492
|
+
if (payload.fullTrace) {
|
|
493
|
+
expect(JSON.stringify(payload.fullTrace)).not.toContain('DiagOnlyTool');
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
finally {
|
|
497
|
+
cleanupFixture(f);
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
it('returns null fullTrace when multiple source candidates found', async () => {
|
|
501
|
+
const sessionId = 'sess-ambiguous';
|
|
502
|
+
const diagTask = makeDiagnosticianTask({
|
|
503
|
+
taskId: 'task_diag_amb',
|
|
504
|
+
sourcePainId: 'pain-ambiguous',
|
|
505
|
+
sessionIdHint: sessionId,
|
|
506
|
+
});
|
|
507
|
+
const tasks = new Map([[diagTask.taskId, diagTask]]);
|
|
508
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
509
|
+
try {
|
|
510
|
+
await ensureSourceTask(f, 'task_src_amb_1', { sessionId, sourcePainId: 'pain-ambiguous' });
|
|
511
|
+
await createRunWithPayloads(f, 'task_src_amb_1', { inputPayload: '{"toolName":"Tool1"}', outputPayload: '{}' });
|
|
512
|
+
await ensureSourceTask(f, 'task_src_amb_2', { sessionId, sourcePainId: 'pain-ambiguous' });
|
|
513
|
+
await createRunWithPayloads(f, 'task_src_amb_2', { inputPayload: '{"toolName":"Tool2"}', outputPayload: '{}' });
|
|
514
|
+
const payload = await f.assembler.assemble(diagTask.taskId);
|
|
515
|
+
expect(payload.fullTrace).toBeNull();
|
|
516
|
+
expect(notesInclude(payload.ambiguityNotes, 'Ambiguous source trace')).toBe(true);
|
|
517
|
+
expect(notesInclude(payload.ambiguityNotes, '2 matched candidates')).toBe(true);
|
|
518
|
+
}
|
|
519
|
+
finally {
|
|
520
|
+
cleanupFixture(f);
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
it('returns null fullTrace when TrajectoryLocator not provided', async () => {
|
|
524
|
+
const task = makeDiagnosticianTask({
|
|
525
|
+
taskId: 'task_no_locator',
|
|
526
|
+
sourcePainId: 'pain-no-locator',
|
|
527
|
+
sessionIdHint: 'sess-no-loc',
|
|
528
|
+
});
|
|
529
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
530
|
+
const f = createFixture(tasks);
|
|
531
|
+
try {
|
|
532
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
533
|
+
expect(payload.fullTrace).toBeNull();
|
|
534
|
+
expect(notesInclude(payload.ambiguityNotes, 'SourceTraceLocator not available')).toBe(true);
|
|
535
|
+
}
|
|
536
|
+
finally {
|
|
537
|
+
cleanupFixture(f);
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
it('returns null fullTrace when sourcePainId present but no sessionIdHint', async () => {
|
|
541
|
+
const task = makeDiagnosticianTask({
|
|
542
|
+
taskId: 'task_no_session',
|
|
543
|
+
sourcePainId: 'pain-no-session',
|
|
544
|
+
sessionIdHint: undefined,
|
|
545
|
+
});
|
|
546
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
547
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
548
|
+
try {
|
|
549
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
550
|
+
expect(payload.fullTrace).toBeNull();
|
|
551
|
+
expect(notesInclude(payload.ambiguityNotes, 'sessionIdHint')).toBe(true);
|
|
552
|
+
}
|
|
553
|
+
finally {
|
|
554
|
+
cleanupFixture(f);
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
it('returns fullTrace with empty arrays when source task has no runs', async () => {
|
|
558
|
+
const sessionId = 'sess-src-noruns';
|
|
559
|
+
const sourceTaskId = 'task_source_noruns';
|
|
560
|
+
const task = makeDiagnosticianTask({
|
|
561
|
+
taskId: 'task_diag_noruns',
|
|
562
|
+
sourcePainId: 'pain-no-src-runs',
|
|
563
|
+
sessionIdHint: sessionId,
|
|
564
|
+
});
|
|
565
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
566
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
567
|
+
try {
|
|
568
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-no-src-runs' });
|
|
569
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
570
|
+
const ft = payload.fullTrace;
|
|
571
|
+
expect(ft).not.toBeNull();
|
|
572
|
+
if (!ft)
|
|
573
|
+
return;
|
|
574
|
+
if ('sourcePainId' in ft) {
|
|
575
|
+
expect(ft.timeline).toEqual([]);
|
|
576
|
+
expect(ft.sourcePainId).toBe('pain-no-src-runs');
|
|
577
|
+
expect(ft.sourceRunIds).toEqual([]);
|
|
578
|
+
expect(ft.ambiguityNotes).toBeDefined();
|
|
579
|
+
expect(ft.sanitizationNotes).toBeDefined();
|
|
580
|
+
}
|
|
581
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, payload)).toBe(true);
|
|
582
|
+
}
|
|
583
|
+
finally {
|
|
584
|
+
cleanupFixture(f);
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
it('redacts secrets in source trace before exposing to prompts', async () => {
|
|
588
|
+
const sessionId = 'sess-pii';
|
|
589
|
+
const sourceTaskId = 'task_source_pii';
|
|
590
|
+
const task = makeDiagnosticianTask({
|
|
591
|
+
taskId: 'task_diag_pii',
|
|
592
|
+
sourcePainId: 'pain-pii',
|
|
593
|
+
sessionIdHint: sessionId,
|
|
594
|
+
});
|
|
595
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
596
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
597
|
+
try {
|
|
598
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-pii' });
|
|
599
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
600
|
+
inputPayload: JSON.stringify({
|
|
601
|
+
toolCalls: [{
|
|
602
|
+
toolName: 'WriteFile',
|
|
603
|
+
params: { apiKey: 'sk-proj-secret123', token: 'tok_abc', password: 'hunter2' },
|
|
604
|
+
}],
|
|
605
|
+
}),
|
|
606
|
+
outputPayload: JSON.stringify({
|
|
607
|
+
text: 'Used authorization: Bearer secret-token-here and secret=mysecret',
|
|
608
|
+
}),
|
|
609
|
+
});
|
|
610
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
611
|
+
expect(payload.fullTrace).not.toBeNull();
|
|
612
|
+
const allText = JSON.stringify(payload.fullTrace);
|
|
613
|
+
expect(allText).not.toContain('sk-proj-secret123');
|
|
614
|
+
expect(allText).not.toContain('tok_abc');
|
|
615
|
+
expect(allText).not.toContain('hunter2');
|
|
616
|
+
expect(allText).not.toContain('secret-token-here');
|
|
617
|
+
expect(allText).not.toContain('mysecret');
|
|
618
|
+
expect(allText).toContain('[REDACTED]');
|
|
619
|
+
}
|
|
620
|
+
finally {
|
|
621
|
+
cleanupFixture(f);
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
it('payload without fullTrace field still passes schema validation - backward compatible', async () => {
|
|
625
|
+
const task = makeDiagnosticianTask({ taskId: 'task_compat' });
|
|
626
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
627
|
+
const f = createFixture(tasks);
|
|
628
|
+
try {
|
|
629
|
+
await createRunWithPayloads(f, task.taskId, { inputPayload: 'input', outputPayload: 'output' });
|
|
630
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
631
|
+
const { fullTrace: _, ...legacyPayload } = payload;
|
|
632
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, legacyPayload)).toBe(true);
|
|
633
|
+
}
|
|
634
|
+
finally {
|
|
635
|
+
cleanupFixture(f);
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
it('handles non-JSON source run payloads in fullTrace without throwing', async () => {
|
|
639
|
+
const sessionId = 'sess-plain';
|
|
640
|
+
const sourceTaskId = 'task_source_plain';
|
|
641
|
+
const task = makeDiagnosticianTask({
|
|
642
|
+
taskId: 'task_diag_plain',
|
|
643
|
+
sourcePainId: 'pain-plain',
|
|
644
|
+
sessionIdHint: sessionId,
|
|
645
|
+
});
|
|
646
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
647
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
648
|
+
try {
|
|
649
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-plain' });
|
|
650
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
651
|
+
inputPayload: 'This is just plain text, not JSON at all',
|
|
652
|
+
outputPayload: 'Response text with password=supersecret',
|
|
653
|
+
});
|
|
654
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
655
|
+
const ft = payload.fullTrace;
|
|
656
|
+
expect(ft).not.toBeNull();
|
|
657
|
+
if (!ft)
|
|
658
|
+
return;
|
|
659
|
+
if ('timeline' in ft) {
|
|
660
|
+
expect(ft.timeline.length).toBeGreaterThan(0);
|
|
661
|
+
}
|
|
662
|
+
const allText = JSON.stringify(ft);
|
|
663
|
+
expect(allText).not.toContain('supersecret');
|
|
664
|
+
expect(allText).toContain('[REDACTED]');
|
|
665
|
+
}
|
|
666
|
+
finally {
|
|
667
|
+
cleanupFixture(f);
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
it('extracts toolCalls array from source openclaw-history format', async () => {
|
|
671
|
+
const sessionId = 'sess-oc';
|
|
672
|
+
const sourceTaskId = 'task_source_oc';
|
|
673
|
+
const task = makeDiagnosticianTask({
|
|
674
|
+
taskId: 'task_diag_oc',
|
|
675
|
+
sourcePainId: 'pain-oc',
|
|
676
|
+
sessionIdHint: sessionId,
|
|
677
|
+
});
|
|
678
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
679
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
680
|
+
try {
|
|
681
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-oc' });
|
|
682
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
683
|
+
runtimeKind: 'openclaw-history',
|
|
684
|
+
inputPayload: JSON.stringify({
|
|
685
|
+
type: 'session_history',
|
|
686
|
+
sessionId,
|
|
687
|
+
userTurns: [{ turnIndex: 1, text: 'fix the bug' }],
|
|
688
|
+
toolCalls: [
|
|
689
|
+
{ toolName: 'Read', status: 'succeeded', params: { file: 'src/index.ts' } },
|
|
690
|
+
{ toolName: 'Edit', status: 'succeeded', params: { file: 'src/index.ts', content: 'fixed' } },
|
|
691
|
+
],
|
|
692
|
+
}),
|
|
693
|
+
outputPayload: JSON.stringify({
|
|
694
|
+
type: 'assistant_turns',
|
|
695
|
+
sessionId,
|
|
696
|
+
turns: [{ text: 'I fixed the bug' }],
|
|
697
|
+
}),
|
|
698
|
+
});
|
|
699
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
700
|
+
const ft = payload.fullTrace;
|
|
701
|
+
expect(ft).not.toBeNull();
|
|
702
|
+
if (!ft)
|
|
703
|
+
return;
|
|
704
|
+
if ('timeline' in ft) {
|
|
705
|
+
const toolCallEntries = ft.timeline.filter((e) => e.kind === 'tool_call');
|
|
706
|
+
expect(toolCallEntries.length).toBe(2);
|
|
707
|
+
expect(toolCallEntries[0]?.summary).toContain('Read');
|
|
708
|
+
expect(toolCallEntries[1]?.summary).toContain('Edit');
|
|
709
|
+
const userEntries = ft.timeline.filter((e) => e.kind === 'user_message');
|
|
710
|
+
expect(userEntries.some((e) => e.summary.includes('fix the bug'))).toBe(true);
|
|
711
|
+
const assistantEntries = ft.timeline.filter((e) => e.kind === 'assistant_message');
|
|
712
|
+
expect(assistantEntries.some((e) => e.summary.includes('I fixed the bug'))).toBe(true);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
finally {
|
|
716
|
+
cleanupFixture(f);
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
it('sanitizes nested object params in source trace toolCallHistory', async () => {
|
|
720
|
+
const sessionId = 'sess-nested';
|
|
721
|
+
const sourceTaskId = 'task_source_nested';
|
|
722
|
+
const task = makeDiagnosticianTask({
|
|
723
|
+
taskId: 'task_diag_nested',
|
|
724
|
+
sourcePainId: 'pain-nested',
|
|
725
|
+
sessionIdHint: sessionId,
|
|
726
|
+
});
|
|
727
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
728
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
729
|
+
try {
|
|
730
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-nested' });
|
|
731
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
732
|
+
inputPayload: JSON.stringify({
|
|
733
|
+
toolCalls: [{
|
|
734
|
+
toolName: 'HttpRequest',
|
|
735
|
+
params: {
|
|
736
|
+
headers: { Authorization: 'Bearer tok_live_xxx' },
|
|
737
|
+
body: { api_key: 'pk_live_12345', user_password: 'p@ssw0rd' },
|
|
738
|
+
},
|
|
739
|
+
}],
|
|
740
|
+
}),
|
|
741
|
+
outputPayload: '{}',
|
|
742
|
+
});
|
|
743
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
744
|
+
const ft = payload.fullTrace;
|
|
745
|
+
expect(ft).not.toBeNull();
|
|
746
|
+
if (!ft)
|
|
747
|
+
return;
|
|
748
|
+
if ('timeline' in ft) {
|
|
749
|
+
const [entry] = ft.timeline.filter((e) => e.kind === 'tool_call');
|
|
750
|
+
expect(entry).toBeDefined();
|
|
751
|
+
const allTimelineText = JSON.stringify(ft.timeline);
|
|
752
|
+
expect(allTimelineText).not.toContain('tok_live_xxx');
|
|
753
|
+
expect(allTimelineText).not.toContain('pk_live_12345');
|
|
754
|
+
expect(allTimelineText).not.toContain('p@ssw0rd');
|
|
755
|
+
expect(allTimelineText).toContain('[REDACTED]');
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
finally {
|
|
759
|
+
cleanupFixture(f);
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
it('redacts bearer token value in scratchpad text when preceded by authorization key', async () => {
|
|
763
|
+
const sessionId = 'sess-bearer-order';
|
|
764
|
+
const sourceTaskId = 'task_source_bearer_order';
|
|
765
|
+
const task = makeDiagnosticianTask({
|
|
766
|
+
taskId: 'task_diag_bearer_order',
|
|
767
|
+
sourcePainId: 'pain-bearer-order',
|
|
768
|
+
sessionIdHint: sessionId,
|
|
769
|
+
});
|
|
770
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
771
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
772
|
+
try {
|
|
773
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-bearer-order' });
|
|
774
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
775
|
+
inputPayload: JSON.stringify({
|
|
776
|
+
thinking: 'Set authorization: Bearer sk-live-leaky-token-xyz and then called the API',
|
|
777
|
+
}),
|
|
778
|
+
outputPayload: JSON.stringify({
|
|
779
|
+
text: 'Header was Authorization=Bearer tok-secret-abc123, worked fine',
|
|
780
|
+
}),
|
|
781
|
+
});
|
|
782
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
783
|
+
const ft = payload.fullTrace;
|
|
784
|
+
expect(ft).not.toBeNull();
|
|
785
|
+
if (!ft)
|
|
786
|
+
return;
|
|
787
|
+
const allText = JSON.stringify(ft);
|
|
788
|
+
expect(allText).not.toContain('sk-live-leaky-token-xyz');
|
|
789
|
+
expect(allText).not.toContain('tok-secret-abc123');
|
|
790
|
+
expect(allText).toContain('[REDACTED]');
|
|
791
|
+
}
|
|
792
|
+
finally {
|
|
793
|
+
cleanupFixture(f);
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
it('returns null fullTrace when source task has mismatched sourcePainId', async () => {
|
|
797
|
+
const sessionId = 'sess-mismatch';
|
|
798
|
+
const sourceTaskId = 'task_source_mismatch';
|
|
799
|
+
const diagTask = makeDiagnosticianTask({
|
|
800
|
+
taskId: 'task_diag_mismatch',
|
|
801
|
+
sourcePainId: 'pain-A',
|
|
802
|
+
sessionIdHint: sessionId,
|
|
803
|
+
});
|
|
804
|
+
const tasks = new Map([[diagTask.taskId, diagTask]]);
|
|
805
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
806
|
+
try {
|
|
807
|
+
// Source task stores painId=pain-B, which does NOT match diagnostician's sourcePainId=pain-A
|
|
808
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-B' });
|
|
809
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
810
|
+
inputPayload: JSON.stringify({ toolCalls: [{ toolName: 'WrongSource', status: 'succeeded' }] }),
|
|
811
|
+
outputPayload: '{}',
|
|
812
|
+
});
|
|
813
|
+
const payload = await f.assembler.assemble(diagTask.taskId);
|
|
814
|
+
expect(payload.fullTrace).toBeNull();
|
|
815
|
+
expect(notesInclude(payload.ambiguityNotes, 'sourcePainId mismatch')).toBe(true);
|
|
816
|
+
expect(notesInclude(payload.ambiguityNotes, 'pain-A')).toBe(true);
|
|
817
|
+
expect(Value.Check(DiagnosticianContextPayloadSchema, payload)).toBe(true);
|
|
818
|
+
}
|
|
819
|
+
finally {
|
|
820
|
+
cleanupFixture(f);
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
it('throws storage_unavailable for run with unrecognized runtime_kind', async () => {
|
|
824
|
+
const task = makeDiagnosticianTask({ taskId: 'task_bad_runtime' });
|
|
825
|
+
const tasks = new Map([[task.taskId, task]]);
|
|
826
|
+
const f = createFixture(tasks);
|
|
827
|
+
try {
|
|
828
|
+
const existing = await f.sqliteTaskStore.getTask(task.taskId);
|
|
829
|
+
if (!existing) {
|
|
830
|
+
await f.sqliteTaskStore.createTask({
|
|
831
|
+
taskId: task.taskId,
|
|
832
|
+
taskKind: 'diagnostician',
|
|
833
|
+
status: 'pending',
|
|
834
|
+
attemptCount: 0,
|
|
835
|
+
maxAttempts: 3,
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
const db = f.connection.getDb();
|
|
839
|
+
const now = new Date().toISOString();
|
|
840
|
+
db.prepare('INSERT INTO runs (run_id, task_id, runtime_kind, execution_status, started_at, ended_at, ' +
|
|
841
|
+
'attempt_number, created_at, updated_at, input_payload, output_payload) ' +
|
|
842
|
+
'VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)').run('run_bad_kind', task.taskId, 'invalid-runtime', 'succeeded', now, now, 1, now, now, null, null);
|
|
843
|
+
await expect(f.assembler.assemble(task.taskId)).rejects.toThrow('[storage_unavailable]');
|
|
844
|
+
}
|
|
845
|
+
finally {
|
|
846
|
+
cleanupFixture(f);
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
// ── PRI-255: Provenance and evidence contract tests ──
|
|
850
|
+
it('populates diagnosisTarget.provenance and provenanceReason from diagnosticJson', async () => {
|
|
851
|
+
const dj = JSON.stringify({
|
|
852
|
+
sourcePainId: 'pain-prov-1',
|
|
853
|
+
reasonSummary: 'Owner reported pain from CLI',
|
|
854
|
+
source: 'manual',
|
|
855
|
+
severity: 'severe',
|
|
856
|
+
sessionIdHint: 'cli',
|
|
857
|
+
provenance: 'owner_reported_no_host_trace',
|
|
858
|
+
provenanceReason: 'No authenticated host session provenance available for CLI-submitted pain',
|
|
859
|
+
});
|
|
860
|
+
const task = makeDiagnosticianTask({
|
|
861
|
+
taskId: 'task_prov_1',
|
|
862
|
+
sourcePainId: 'pain-prov-1',
|
|
863
|
+
reasonSummary: 'Owner reported pain from CLI',
|
|
864
|
+
source: 'manual',
|
|
865
|
+
severity: 'severe',
|
|
866
|
+
sessionIdHint: 'cli',
|
|
867
|
+
});
|
|
868
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
869
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
870
|
+
const f = createFixture(tasks);
|
|
871
|
+
try {
|
|
872
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
873
|
+
expect(payload.diagnosisTarget.provenance).toBe('owner_reported_no_host_trace');
|
|
874
|
+
expect(payload.diagnosisTarget.provenanceReason).toContain('No authenticated host session');
|
|
875
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Owner reported pain from CLI');
|
|
876
|
+
expect(payload.diagnosisTarget.source).toBe('manual');
|
|
877
|
+
expect(payload.diagnosisTarget.severity).toBe('severe');
|
|
878
|
+
expect(payload.diagnosisTarget.painId).toBe('pain-prov-1');
|
|
879
|
+
}
|
|
880
|
+
finally {
|
|
881
|
+
cleanupFixture(f);
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
it('sets traceAvailability=unavailable_with_reason for owner_reported_no_host_trace and does NOT call trace locator', async () => {
|
|
885
|
+
const dj = JSON.stringify({
|
|
886
|
+
sourcePainId: 'pain-cli-1',
|
|
887
|
+
reasonSummary: 'CLI pain',
|
|
888
|
+
source: 'manual',
|
|
889
|
+
severity: 'severe',
|
|
890
|
+
sessionIdHint: 'cli',
|
|
891
|
+
provenance: 'owner_reported_no_host_trace',
|
|
892
|
+
provenanceReason: 'No authenticated host session provenance available',
|
|
893
|
+
});
|
|
894
|
+
const task = makeDiagnosticianTask({
|
|
895
|
+
taskId: 'task_cli_prov',
|
|
896
|
+
sourcePainId: 'pain-cli-1',
|
|
897
|
+
reasonSummary: 'CLI pain',
|
|
898
|
+
sessionIdHint: 'cli',
|
|
899
|
+
});
|
|
900
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
901
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
902
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
903
|
+
const locator = f.sourceTraceLocator;
|
|
904
|
+
expect(locator).toBeDefined();
|
|
905
|
+
if (!locator)
|
|
906
|
+
return;
|
|
907
|
+
const locateSpy = vi.spyOn(locator, 'locate');
|
|
908
|
+
try {
|
|
909
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
910
|
+
expect(payload.diagnosisTarget.traceAvailability).toBe('unavailable_with_reason');
|
|
911
|
+
expect(payload.diagnosisTarget.traceUnavailableDetail).toBeDefined();
|
|
912
|
+
const detail = payload.diagnosisTarget.traceUnavailableDetail;
|
|
913
|
+
expect(detail?.reason).toContain('CLI-submitted pain');
|
|
914
|
+
expect(detail?.nextAction).toContain('OpenClaw session');
|
|
915
|
+
expect(notesInclude(payload.ambiguityNotes, 'owner_reported_no_host_trace')).toBe(true);
|
|
916
|
+
expect(payload.fullTrace).toBeNull();
|
|
917
|
+
expect(locateSpy).not.toHaveBeenCalled();
|
|
918
|
+
}
|
|
919
|
+
finally {
|
|
920
|
+
cleanupFixture(f);
|
|
921
|
+
locateSpy.mockRestore();
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
|
+
it('sets traceAvailability=available when fullTrace is resolved', async () => {
|
|
925
|
+
const sessionId = 'sess-prov-ok';
|
|
926
|
+
const sourceTaskId = 'task_source_prov';
|
|
927
|
+
const dj = JSON.stringify({
|
|
928
|
+
sourcePainId: 'pain-prov-ok',
|
|
929
|
+
reasonSummary: 'Context-bound pain',
|
|
930
|
+
source: 'pain',
|
|
931
|
+
severity: 'severe',
|
|
932
|
+
sessionIdHint: sessionId,
|
|
933
|
+
provenance: 'openclaw_context_bound',
|
|
934
|
+
provenanceReason: 'Pain reported from an OpenClaw host session',
|
|
935
|
+
});
|
|
936
|
+
const task = makeDiagnosticianTask({
|
|
937
|
+
taskId: 'task_diag_prov_ok',
|
|
938
|
+
sourcePainId: 'pain-prov-ok',
|
|
939
|
+
sessionIdHint: sessionId,
|
|
940
|
+
reasonSummary: 'Context-bound pain',
|
|
941
|
+
});
|
|
942
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
943
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
944
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
945
|
+
try {
|
|
946
|
+
await ensureSourceTask(f, sourceTaskId, { sessionId, sourcePainId: 'pain-prov-ok' });
|
|
947
|
+
await createRunWithPayloads(f, sourceTaskId, {
|
|
948
|
+
inputPayload: JSON.stringify({ toolCalls: [{ toolName: 'Read', status: 'succeeded' }] }),
|
|
949
|
+
outputPayload: '{}',
|
|
950
|
+
});
|
|
951
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
952
|
+
expect(payload.diagnosisTarget.provenance).toBe('openclaw_context_bound');
|
|
953
|
+
expect(payload.diagnosisTarget.traceAvailability).toBe('available');
|
|
954
|
+
expect(payload.fullTrace).not.toBeNull();
|
|
955
|
+
}
|
|
956
|
+
finally {
|
|
957
|
+
cleanupFixture(f);
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
it('sets traceAvailability=unavailable_with_reason for context-bound pain when trace not found', async () => {
|
|
961
|
+
const dj = JSON.stringify({
|
|
962
|
+
sourcePainId: 'pain-prov-nf',
|
|
963
|
+
reasonSummary: 'Context-bound but trace missing',
|
|
964
|
+
source: 'pain',
|
|
965
|
+
severity: 'severe',
|
|
966
|
+
sessionIdHint: 'sess-missing',
|
|
967
|
+
provenance: 'openclaw_context_bound',
|
|
968
|
+
provenanceReason: 'Pain reported from an OpenClaw host session',
|
|
969
|
+
});
|
|
970
|
+
const task = makeDiagnosticianTask({
|
|
971
|
+
taskId: 'task_diag_prov_nf',
|
|
972
|
+
sourcePainId: 'pain-prov-nf',
|
|
973
|
+
sessionIdHint: 'sess-missing',
|
|
974
|
+
reasonSummary: 'Context-bound but trace missing',
|
|
975
|
+
});
|
|
976
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
977
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
978
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
979
|
+
try {
|
|
980
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
981
|
+
expect(payload.diagnosisTarget.provenance).toBe('openclaw_context_bound');
|
|
982
|
+
expect(payload.diagnosisTarget.traceAvailability).toBe('unavailable_with_reason');
|
|
983
|
+
expect(payload.diagnosisTarget.traceUnavailableDetail).toBeDefined();
|
|
984
|
+
expect(payload.diagnosisTarget.traceUnavailableDetail?.reason).toContain('source trace could not be resolved');
|
|
985
|
+
}
|
|
986
|
+
finally {
|
|
987
|
+
cleanupFixture(f);
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
it('sets traceAvailability=unavailable_with_reason for automatic_hook when trace not found', async () => {
|
|
991
|
+
const dj = JSON.stringify({
|
|
992
|
+
sourcePainId: 'pain-auto-nf',
|
|
993
|
+
reasonSummary: 'Automatic hook pain but trace missing',
|
|
994
|
+
source: 'write',
|
|
995
|
+
severity: 'moderate',
|
|
996
|
+
sessionIdHint: 'sess-auto-missing',
|
|
997
|
+
provenance: 'automatic_hook',
|
|
998
|
+
provenanceReason: 'Detected by automatic hook',
|
|
999
|
+
});
|
|
1000
|
+
const task = makeDiagnosticianTask({
|
|
1001
|
+
taskId: 'task_diag_auto_nf',
|
|
1002
|
+
sourcePainId: 'pain-auto-nf',
|
|
1003
|
+
sessionIdHint: 'sess-auto-missing',
|
|
1004
|
+
reasonSummary: 'Automatic hook pain but trace missing',
|
|
1005
|
+
});
|
|
1006
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
1007
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1008
|
+
const f = createFixture(tasks, { withLocator: true });
|
|
1009
|
+
try {
|
|
1010
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1011
|
+
expect(payload.diagnosisTarget.provenance).toBe('automatic_hook');
|
|
1012
|
+
expect(payload.diagnosisTarget.traceAvailability).toBe('unavailable_with_reason');
|
|
1013
|
+
expect(payload.diagnosisTarget.traceUnavailableDetail).toBeDefined();
|
|
1014
|
+
expect(payload.diagnosisTarget.traceUnavailableDetail?.reason).toContain('Automatic hook pain');
|
|
1015
|
+
}
|
|
1016
|
+
finally {
|
|
1017
|
+
cleanupFixture(f);
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
it('reconstructs provenance from diagnosticJson with runtime validation (no unsafe as)', async () => {
|
|
1021
|
+
const dj = JSON.stringify({
|
|
1022
|
+
sourcePainId: 'pain-validated',
|
|
1023
|
+
reasonSummary: 'Validated pain',
|
|
1024
|
+
source: 'manual',
|
|
1025
|
+
severity: 'moderate',
|
|
1026
|
+
provenance: 'owner_reported_no_host_trace',
|
|
1027
|
+
provenanceReason: 'CLI provenance',
|
|
1028
|
+
extraUnknownField: 'should be ignored',
|
|
1029
|
+
});
|
|
1030
|
+
const task = makeDiagnosticianTask({
|
|
1031
|
+
taskId: 'task_validated',
|
|
1032
|
+
sourcePainId: 'pain-validated',
|
|
1033
|
+
reasonSummary: 'Validated pain',
|
|
1034
|
+
});
|
|
1035
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
1036
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1037
|
+
const f = createFixture(tasks);
|
|
1038
|
+
try {
|
|
1039
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1040
|
+
expect(payload.diagnosisTarget.provenance).toBe('owner_reported_no_host_trace');
|
|
1041
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Validated pain');
|
|
1042
|
+
}
|
|
1043
|
+
finally {
|
|
1044
|
+
cleanupFixture(f);
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1047
|
+
it('handles malformed diagnosticJson gracefully without crashing', async () => {
|
|
1048
|
+
const task = makeDiagnosticianTask({
|
|
1049
|
+
taskId: 'task_malformed_dj',
|
|
1050
|
+
reasonSummary: 'Fallback reason',
|
|
1051
|
+
});
|
|
1052
|
+
const taskWithDj = { ...task, diagnosticJson: 'not-valid-json{{{}}' };
|
|
1053
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1054
|
+
const f = createFixture(tasks);
|
|
1055
|
+
try {
|
|
1056
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1057
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Fallback reason');
|
|
1058
|
+
expect(payload.diagnosisTarget.provenance).toBeUndefined();
|
|
1059
|
+
}
|
|
1060
|
+
finally {
|
|
1061
|
+
cleanupFixture(f);
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
it('handles diagnosticJson with invalid provenance value gracefully', async () => {
|
|
1065
|
+
const dj = JSON.stringify({
|
|
1066
|
+
sourcePainId: 'pain-bad-prov',
|
|
1067
|
+
reasonSummary: 'Bad provenance test',
|
|
1068
|
+
provenance: 'invalid_provenance_value',
|
|
1069
|
+
});
|
|
1070
|
+
const task = makeDiagnosticianTask({
|
|
1071
|
+
taskId: 'task_bad_prov',
|
|
1072
|
+
reasonSummary: 'Bad provenance test',
|
|
1073
|
+
});
|
|
1074
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
1075
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1076
|
+
const f = createFixture(tasks);
|
|
1077
|
+
try {
|
|
1078
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1079
|
+
expect(payload.diagnosisTarget.provenance).toBeUndefined();
|
|
1080
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Bad provenance test');
|
|
1081
|
+
}
|
|
1082
|
+
finally {
|
|
1083
|
+
cleanupFixture(f);
|
|
1084
|
+
}
|
|
1085
|
+
});
|
|
1086
|
+
it('produces ambiguity note when diagnosticJson is malformed JSON', async () => {
|
|
1087
|
+
const task = makeDiagnosticianTask({
|
|
1088
|
+
taskId: 'task_malformed_observable',
|
|
1089
|
+
reasonSummary: 'Fallback reason',
|
|
1090
|
+
});
|
|
1091
|
+
const taskWithDj = { ...task, diagnosticJson: 'not-valid-json{{{}}' };
|
|
1092
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1093
|
+
const f = createFixture(tasks);
|
|
1094
|
+
try {
|
|
1095
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1096
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Fallback reason');
|
|
1097
|
+
expect(payload.ambiguityNotes?.some((n) => n.includes('malformed JSON'))).toBe(true);
|
|
1098
|
+
}
|
|
1099
|
+
finally {
|
|
1100
|
+
cleanupFixture(f);
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
it('produces ambiguity note when diagnosticJson parses to non-object', async () => {
|
|
1104
|
+
const task = makeDiagnosticianTask({
|
|
1105
|
+
taskId: 'task_array_dj',
|
|
1106
|
+
reasonSummary: 'Fallback reason',
|
|
1107
|
+
});
|
|
1108
|
+
const taskWithDj = { ...task, diagnosticJson: JSON.stringify([1, 2, 3]) };
|
|
1109
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1110
|
+
const f = createFixture(tasks);
|
|
1111
|
+
try {
|
|
1112
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1113
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('Fallback reason');
|
|
1114
|
+
expect(payload.ambiguityNotes?.some((n) => n.includes('non-object'))).toBe(true);
|
|
1115
|
+
}
|
|
1116
|
+
finally {
|
|
1117
|
+
cleanupFixture(f);
|
|
1118
|
+
}
|
|
1119
|
+
});
|
|
1120
|
+
it('ignores inherited properties from prototype chain in diagnosticJson', async () => {
|
|
1121
|
+
const dj = '{"sourcePainId":"own-pain-id","reasonSummary":"own-reason","provenance":"openclaw_context_bound"}';
|
|
1122
|
+
const task = makeDiagnosticianTask({
|
|
1123
|
+
taskId: 'task_inherited_props',
|
|
1124
|
+
});
|
|
1125
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
1126
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1127
|
+
const f = createFixture(tasks);
|
|
1128
|
+
try {
|
|
1129
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1130
|
+
expect(payload.diagnosisTarget.painId).toBe('own-pain-id');
|
|
1131
|
+
expect(payload.diagnosisTarget.reasonSummary).toBe('own-reason');
|
|
1132
|
+
expect(payload.diagnosisTarget.provenance).toBe('openclaw_context_bound');
|
|
1133
|
+
}
|
|
1134
|
+
finally {
|
|
1135
|
+
cleanupFixture(f);
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
it('rejects provenance injected into Object.prototype (not own-property)', async () => {
|
|
1139
|
+
const original = Object.getOwnPropertyDescriptor(Object.prototype, 'provenance');
|
|
1140
|
+
try {
|
|
1141
|
+
Object.prototype.provenance = 'automatic_hook';
|
|
1142
|
+
const dj = '{"sourcePainId":"pain-no-own-prov","reasonSummary":"no own provenance"}';
|
|
1143
|
+
const task = makeDiagnosticianTask({
|
|
1144
|
+
taskId: 'task_proto_injected_provenance',
|
|
1145
|
+
});
|
|
1146
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
1147
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1148
|
+
const f = createFixture(tasks);
|
|
1149
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1150
|
+
expect(payload.diagnosisTarget.painId).toBe('pain-no-own-prov');
|
|
1151
|
+
expect(payload.diagnosisTarget.provenance).toBeUndefined();
|
|
1152
|
+
cleanupFixture(f);
|
|
1153
|
+
}
|
|
1154
|
+
finally {
|
|
1155
|
+
if (original === undefined) {
|
|
1156
|
+
delete Object.prototype.provenance;
|
|
1157
|
+
}
|
|
1158
|
+
else {
|
|
1159
|
+
Object.defineProperty(Object.prototype, 'provenance', original);
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1163
|
+
it('does not read constructor or toString as sourcePainId from Object.prototype', async () => {
|
|
1164
|
+
const dj = '{"reasonSummary":"proto-field test"}';
|
|
1165
|
+
const task = makeDiagnosticianTask({
|
|
1166
|
+
taskId: 'task_proto_fields',
|
|
1167
|
+
});
|
|
1168
|
+
const taskWithDj = { ...task, diagnosticJson: dj };
|
|
1169
|
+
const tasks = new Map([[taskWithDj.taskId, taskWithDj]]);
|
|
1170
|
+
const f = createFixture(tasks);
|
|
1171
|
+
try {
|
|
1172
|
+
const payload = await f.assembler.assemble(task.taskId);
|
|
1173
|
+
expect(payload.diagnosisTarget.painId).toBeUndefined();
|
|
1174
|
+
expect(payload.diagnosisTarget.provenance).toBeUndefined();
|
|
1175
|
+
}
|
|
1176
|
+
finally {
|
|
1177
|
+
cleanupFixture(f);
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
});
|
|
1181
|
+
//# sourceMappingURL=sqlite-context-assembler.test.js.map
|