create-principles-disciple 1.86.0 → 1.87.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/console/dist/server/index.js +6 -50
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +0 -4
- package/console/dist/server/models/ActivationsConsoleModel.js +64 -72
- package/console/dist/server/models/ApprovalsConsoleModel.d.ts +33 -7
- package/console/dist/server/models/ApprovalsConsoleModel.js +203 -57
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.d.ts +4 -2
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +179 -91
- package/console/dist/server/models/EvidenceChainConsoleModel.d.ts +4 -28
- package/console/dist/server/models/EvidenceChainConsoleModel.js +103 -298
- package/console/dist/server/models/GovernanceConsoleModel.d.ts +6 -4
- package/console/dist/server/models/GovernanceConsoleModel.js +269 -195
- package/console/dist/server/models/PrincipleClassifier.js +1 -1
- package/console/dist/server/models/PrincipleTrajectoryModel.d.ts +49 -0
- package/console/dist/server/models/PrincipleTrajectoryModel.js +485 -0
- package/console/dist/server/routes/approvals.js +65 -2
- package/console/dist/server/routes/principles.js +33 -0
- package/console/dist/server/routes/update.js +75 -26
- package/console/dist/ui/App.js +4 -2
- package/console/dist/ui/api.d.ts +6 -11
- package/console/dist/ui/api.js +19 -23
- package/console/dist/ui/components/focus/daily-thought-card.d.ts +1 -0
- package/console/dist/ui/components/focus/daily-thought-card.js +41 -0
- package/console/dist/ui/components/layout/app-sidebar.js +6 -4
- package/console/dist/ui/components/layout/page-loading.d.ts +13 -0
- package/console/dist/ui/components/layout/page-loading.js +14 -0
- package/console/dist/ui/components/layout/page-shell.d.ts +1 -0
- package/console/dist/ui/components/layout/page-shell.js +2 -1
- package/console/dist/ui/components/layout/section-title.js +1 -1
- package/console/dist/ui/components/notifications/NotificationProvider.d.ts +14 -0
- package/console/dist/ui/components/notifications/NotificationProvider.js +130 -0
- package/console/dist/ui/components/notifications/favicon-badge.d.ts +3 -0
- package/console/dist/ui/components/notifications/favicon-badge.js +68 -0
- package/console/dist/ui/components/notifications/notification-reducer.d.ts +9 -0
- package/console/dist/ui/components/notifications/notification-reducer.js +9 -0
- package/console/dist/ui/components/notifications/sound-storage.d.ts +3 -0
- package/console/dist/ui/components/notifications/sound-storage.js +37 -0
- package/console/dist/ui/components/notifications/useNotifications.d.ts +1 -0
- package/console/dist/ui/components/notifications/useNotifications.js +9 -0
- package/console/dist/ui/components/ui/badge.js +1 -1
- package/console/dist/ui/components/ui/button.d.ts +2 -2
- package/console/dist/ui/components/ui/button.js +1 -1
- package/console/dist/ui/components/ui/card.js +1 -1
- package/console/dist/ui/components/ui/input.js +1 -1
- package/console/dist/ui/components/ui/sheet.d.ts +1 -1
- package/console/dist/ui/data/daily-thoughts.d.ts +15 -0
- package/console/dist/ui/data/daily-thoughts.js +164 -0
- package/console/dist/ui/hooks/useNotificationSound.d.ts +12 -0
- package/console/dist/ui/hooks/useNotificationSound.js +74 -0
- package/console/dist/ui/i18n/en.json +94 -12
- package/console/dist/ui/i18n/zh-CN.json +94 -12
- package/console/dist/ui/pages/activation/ActivationPage.js +8 -15
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +11 -9
- package/console/dist/ui/pages/focus/FocusPage.d.ts +13 -0
- package/console/dist/ui/pages/focus/FocusPage.js +140 -19
- package/console/dist/ui/pages/pain/PainPage.js +71 -32
- package/console/dist/ui/pages/pain/pain-card-helpers.d.ts +100 -0
- package/console/dist/ui/pages/pain/pain-card-helpers.js +103 -0
- package/console/dist/ui/pages/principles/PrincipleDetailPage.js +99 -20
- package/console/dist/ui/pages/principles/PrinciplesPage.js +8 -8
- package/console/dist/ui/pages/report-problem/ReportProblemPage.js +20 -18
- package/console/dist/ui/pages/settings/SettingsPage.js +9 -5
- package/console/dist/ui/pages/settings/UpdatePage.d.ts +0 -4
- package/console/dist/ui/pages/settings/UpdatePage.js +78 -75
- package/console/dist/ui/utils/control-center-helpers.d.ts +2 -0
- package/console/dist/ui/utils/enum-labels.d.ts +50 -0
- package/console/dist/ui/utils/enum-labels.js +164 -0
- package/console/dist/ui/utils/validators.d.ts +62 -6
- package/console/dist/ui/utils/validators.js +222 -22
- package/console/dist/web/assets/app.css +269 -122
- package/console/dist/web/assets/app.js +8134 -3177
- package/console/package.json +6 -3
- package/core/dist/evolution-store.js +0 -2
- package/core/dist/evolution-store.js.map +1 -1
- package/core/dist/index.d.ts +1 -10
- package/core/dist/index.d.ts.map +1 -1
- package/core/dist/index.js +1 -7
- package/core/dist/index.js.map +1 -1
- package/core/dist/io.d.ts +0 -1
- package/core/dist/io.d.ts.map +1 -1
- package/core/dist/io.js +0 -4
- package/core/dist/io.js.map +1 -1
- package/core/dist/principle-injector.d.ts +1 -1
- package/core/dist/principle-injector.d.ts.map +1 -1
- package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.js.map +1 -1
- package/core/dist/quality-scorecard/__tests__/quality-scorecard.test.d.ts +2 -0
- package/core/dist/quality-scorecard/__tests__/quality-scorecard.test.d.ts.map +1 -0
- package/core/dist/quality-scorecard/__tests__/quality-scorecard.test.js +531 -0
- package/core/dist/quality-scorecard/__tests__/quality-scorecard.test.js.map +1 -0
- package/core/dist/quality-scorecard/index.d.ts +11 -0
- package/core/dist/quality-scorecard/index.d.ts.map +1 -0
- package/core/dist/quality-scorecard/index.js +4 -0
- package/core/dist/quality-scorecard/index.js.map +1 -0
- package/core/dist/quality-scorecard/report-generator.d.ts +11 -0
- package/core/dist/quality-scorecard/report-generator.d.ts.map +1 -0
- package/core/dist/quality-scorecard/report-generator.js +204 -0
- package/core/dist/quality-scorecard/report-generator.js.map +1 -0
- package/core/dist/quality-scorecard/types.d.ts +106 -0
- package/core/dist/quality-scorecard/types.d.ts.map +1 -0
- package/core/dist/quality-scorecard/types.js +51 -0
- package/core/dist/quality-scorecard/types.js.map +1 -0
- package/core/dist/quality-scorecard/validation.d.ts +73 -0
- package/core/dist/quality-scorecard/validation.d.ts.map +1 -0
- package/core/dist/quality-scorecard/validation.js +251 -0
- package/core/dist/quality-scorecard/validation.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/activation-types-helpers.test.d.ts +20 -0
- package/core/dist/runtime-v2/__tests__/activation-types-helpers.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/activation-types-helpers.test.js +223 -0
- package/core/dist/runtime-v2/__tests__/activation-types-helpers.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/admission-gate.test.js +56 -3
- package/core/dist/runtime-v2/__tests__/admission-gate.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/adversarial-loop.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/adversarial-loop.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/adversarial-loop.test.js +381 -0
- package/core/dist/runtime-v2/__tests__/adversarial-loop.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +175 -83
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js +40 -80
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js +126 -21
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/build-golden-trace-from-artificer.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/build-golden-trace-from-artificer.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/build-golden-trace-from-artificer.test.js +169 -0
- package/core/dist/runtime-v2/__tests__/build-golden-trace-from-artificer.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/build-l2-principle-reader.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/build-l2-principle-reader.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/build-l2-principle-reader.test.js +200 -0
- package/core/dist/runtime-v2/__tests__/build-l2-principle-reader.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js +20 -3
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/dreamer-output-validator.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.js +12 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/dreamer-runner.test.js +10 -5
- package/core/dist/runtime-v2/__tests__/dreamer-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js +831 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.js +22 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evidence-chain-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/evidence-chain-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/evidence-chain-contract.test.js +344 -0
- package/core/dist/runtime-v2/__tests__/evidence-chain-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/evidence-guards.test.d.ts +18 -0
- package/core/dist/runtime-v2/__tests__/evidence-guards.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/evidence-guards.test.js +155 -0
- package/core/dist/runtime-v2/__tests__/evidence-guards.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/evidence-sanitizer.test.js +4 -3
- package/core/dist/runtime-v2/__tests__/evidence-sanitizer.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/privacy-preview.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/render-github-url.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/render-markdown.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.d.ts.map +1 -1
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.js +3 -2
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.js +19 -29
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/full-chain-real-llm.test.js +2 -2
- package/core/dist/runtime-v2/__tests__/full-chain-real-llm.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/golden-path-diagnostician-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/golden-path-diagnostician-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-path-diagnostician-e2e.test.js +372 -0
- package/core/dist/runtime-v2/__tests__/golden-path-diagnostician-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js +219 -2
- package/core/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js +96 -0
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-consumer-product-path.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-consumer-product-path.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-consumer-product-path.test.js +226 -0
- package/core/dist/runtime-v2/__tests__/internalization-consumer-product-path.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-failure-persistence.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-failure-persistence.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-failure-persistence.test.js +153 -0
- package/core/dist/runtime-v2/__tests__/internalization-failure-persistence.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.js +525 -5
- package/core/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-orchestrator.test.js +1 -3
- package/core/dist/runtime-v2/__tests__/internalization-orchestrator.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.js +6 -0
- package/core/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-queue-read-model.test.js +0 -1
- package/core/dist/runtime-v2/__tests__/internalization-queue-read-model.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-state-machine.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/mainline-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/mainline-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/mainline-contract.test.js +194 -0
- package/core/dist/runtime-v2/__tests__/mainline-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/mainline-product-path.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/mainline-product-path.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/mainline-product-path.test.js +429 -0
- package/core/dist/runtime-v2/__tests__/mainline-product-path.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-chain-read-model.test.js +0 -1
- package/core/dist/runtime-v2/__tests__/pain-chain-read-model.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-evidence-contract.test.js +5 -2
- package/core/dist/runtime-v2/__tests__/pain-evidence-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.js +10 -6
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-short-circuit.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-short-circuit.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-short-circuit.test.js +211 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-short-circuit.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-workspace-dir.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-workspace-dir.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-workspace-dir.test.js +182 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-workspace-dir.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js +53 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.js +4 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.js +5 -1
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/principle-compiler-core.test.js +85 -7
- package/core/dist/runtime-v2/__tests__/principle-compiler-core.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js +14 -1
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pruning-read-model.test.js +11 -6
- package/core/dist/runtime-v2/__tests__/pruning-read-model.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js +8 -0
- package/core/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/scribe-runner-vslice.test.js +4 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/stalled-diagnostician-task.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/stalled-diagnostician-task.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/stalled-diagnostician-task.test.js +168 -0
- package/core/dist/runtime-v2/__tests__/stalled-diagnostician-task.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/task-three-strikes.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/trace-refiner-agent.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/trainer-output-validator.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/trainer-runner-vslice.test.js +8 -0
- package/core/dist/runtime-v2/__tests__/trainer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js +7 -1
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/approval-completion-service.test.d.ts +21 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-completion-service.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-completion-service.test.js +363 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-completion-service.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.d.ts +15 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.js +339 -164
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js +0 -1
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/edit-then-approve.test.d.ts +20 -0
- package/core/dist/runtime-v2/activation/__tests__/edit-then-approve.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/edit-then-approve.test.js +145 -0
- package/core/dist/runtime-v2/activation/__tests__/edit-then-approve.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/low-risk-writers.test.d.ts +21 -0
- package/core/dist/runtime-v2/activation/__tests__/low-risk-writers.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/low-risk-writers.test.js +468 -0
- package/core/dist/runtime-v2/activation/__tests__/low-risk-writers.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/production-gate-deps.test.d.ts +15 -0
- package/core/dist/runtime-v2/activation/__tests__/production-gate-deps.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/production-gate-deps.test.js +272 -0
- package/core/dist/runtime-v2/activation/__tests__/production-gate-deps.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/prompt-activation-reader-contract.test.js +11 -0
- package/core/dist/runtime-v2/activation/__tests__/prompt-activation-reader-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js +54 -1
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.d.ts +35 -0
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js +511 -0
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/activation-dispatcher.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/activation-dispatcher.js +87 -1
- package/core/dist/runtime-v2/activation/activation-dispatcher.js.map +1 -1
- package/core/dist/runtime-v2/activation/activation-types.d.ts +49 -2
- package/core/dist/runtime-v2/activation/activation-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/activation-types.js +6 -0
- package/core/dist/runtime-v2/activation/activation-types.js.map +1 -1
- package/core/dist/runtime-v2/activation/approval-completion-service.d.ts +50 -0
- package/core/dist/runtime-v2/activation/approval-completion-service.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/approval-completion-service.js +160 -0
- package/core/dist/runtime-v2/activation/approval-completion-service.js.map +1 -0
- package/core/dist/runtime-v2/activation/approval-queue.d.ts +7 -1
- package/core/dist/runtime-v2/activation/approval-queue.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/approval-queue.js +14 -0
- package/core/dist/runtime-v2/activation/approval-queue.js.map +1 -1
- package/core/dist/runtime-v2/activation/index.d.ts +5 -2
- package/core/dist/runtime-v2/activation/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/index.js +8 -1
- package/core/dist/runtime-v2/activation/index.js.map +1 -1
- package/core/dist/runtime-v2/activation/memory-activation-state-store.d.ts +2 -1
- package/core/dist/runtime-v2/activation/memory-activation-state-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/memory-activation-state-store.js +11 -2
- package/core/dist/runtime-v2/activation/memory-activation-state-store.js.map +1 -1
- package/core/dist/runtime-v2/activation/memory-approval-store.d.ts +2 -1
- package/core/dist/runtime-v2/activation/memory-approval-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/memory-approval-store.js +18 -0
- package/core/dist/runtime-v2/activation/memory-approval-store.js.map +1 -1
- package/core/dist/runtime-v2/activation/production-gate-deps.d.ts +32 -0
- package/core/dist/runtime-v2/activation/production-gate-deps.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/production-gate-deps.js +213 -0
- package/core/dist/runtime-v2/activation/production-gate-deps.js.map +1 -0
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts +2 -1
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.js +21 -7
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.js.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-approval-store.d.ts +2 -1
- package/core/dist/runtime-v2/activation/sqlite-approval-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-approval-store.js +24 -0
- package/core/dist/runtime-v2/activation/sqlite-approval-store.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js +340 -0
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.js +420 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +283 -1
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js +4 -4
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.js +221 -0
- package/core/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts +49 -0
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js +319 -0
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts +78 -0
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js +478 -0
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +6 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +33 -9
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/structured-output-repair.js +0 -1
- package/core/dist/runtime-v2/adapter/structured-output-repair.js.map +1 -1
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.d.ts +7 -0
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.js +40 -1
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/admission-gate.d.ts +5 -1
- package/core/dist/runtime-v2/admission-gate.d.ts.map +1 -1
- package/core/dist/runtime-v2/admission-gate.js +12 -1
- package/core/dist/runtime-v2/admission-gate.js.map +1 -1
- package/core/dist/runtime-v2/adversarial-loop.d.ts +65 -0
- package/core/dist/runtime-v2/adversarial-loop.d.ts.map +1 -0
- package/core/dist/runtime-v2/adversarial-loop.js +181 -0
- package/core/dist/runtime-v2/adversarial-loop.js.map +1 -0
- package/core/dist/runtime-v2/agent-spec.d.ts +1 -1
- package/core/dist/runtime-v2/build-l2-principle-reader.d.ts +49 -0
- package/core/dist/runtime-v2/build-l2-principle-reader.d.ts.map +1 -0
- package/core/dist/runtime-v2/build-l2-principle-reader.js +70 -0
- package/core/dist/runtime-v2/build-l2-principle-reader.js.map +1 -0
- package/core/dist/runtime-v2/candidate-intake-service.js +0 -1
- package/core/dist/runtime-v2/candidate-intake-service.js.map +1 -1
- package/core/dist/runtime-v2/cli/diagnose.d.ts +8 -2
- package/core/dist/runtime-v2/cli/diagnose.d.ts.map +1 -1
- package/core/dist/runtime-v2/cli/diagnose.js +10 -0
- package/core/dist/runtime-v2/cli/diagnose.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js +46 -4
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-redaction-deep.test.js +2 -2
- package/core/dist/runtime-v2/config/__tests__/pd-config-redaction-deep.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-agent-binding.d.ts +1 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js +3 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js +8 -18
- package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js +16 -3
- package/core/dist/runtime-v2/config/pd-config-effective.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.js +11 -2
- package/core/dist/runtime-v2/config/pd-config-feature-flags.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.js +9 -0
- package/core/dist/runtime-v2/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +11 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.js +5 -1
- package/core/dist/runtime-v2/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js +12 -0
- package/core/dist/runtime-v2/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime-v2/context-payload.d.ts +4 -6
- package/core/dist/runtime-v2/context-payload.d.ts.map +1 -1
- package/core/dist/runtime-v2/context-payload.js +0 -2
- package/core/dist/runtime-v2/context-payload.js.map +1 -1
- package/core/dist/runtime-v2/core-principles/__tests__/core-axiom-block.test.d.ts +5 -0
- package/core/dist/runtime-v2/core-principles/__tests__/core-axiom-block.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/core-principles/__tests__/core-axiom-block.test.js +91 -0
- package/core/dist/runtime-v2/core-principles/__tests__/core-axiom-block.test.js.map +1 -0
- package/core/dist/runtime-v2/core-principles/__tests__/core-principle-registry.test.d.ts +2 -0
- package/core/dist/runtime-v2/core-principles/__tests__/core-principle-registry.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/core-principles/__tests__/core-principle-registry.test.js +71 -0
- package/core/dist/runtime-v2/core-principles/__tests__/core-principle-registry.test.js.map +1 -0
- package/core/dist/runtime-v2/core-principles/__tests__/strip-fabricated-ids.test.d.ts +2 -0
- package/core/dist/runtime-v2/core-principles/__tests__/strip-fabricated-ids.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/core-principles/__tests__/strip-fabricated-ids.test.js +78 -0
- package/core/dist/runtime-v2/core-principles/__tests__/strip-fabricated-ids.test.js.map +1 -0
- package/core/dist/runtime-v2/core-principles/core-axiom-block.d.ts +67 -0
- package/core/dist/runtime-v2/core-principles/core-axiom-block.d.ts.map +1 -0
- package/core/dist/runtime-v2/core-principles/core-axiom-block.js +76 -0
- package/core/dist/runtime-v2/core-principles/core-axiom-block.js.map +1 -0
- package/core/dist/runtime-v2/core-principles/core-principle-registry.d.ts +41 -0
- package/core/dist/runtime-v2/core-principles/core-principle-registry.d.ts.map +1 -0
- package/core/dist/runtime-v2/core-principles/core-principle-registry.js +112 -0
- package/core/dist/runtime-v2/core-principles/core-principle-registry.js.map +1 -0
- package/core/dist/runtime-v2/core-principles/index.d.ts +6 -0
- package/core/dist/runtime-v2/core-principles/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/core-principles/index.js +4 -0
- package/core/dist/runtime-v2/core-principles/index.js.map +1 -0
- package/core/dist/runtime-v2/core-principles/strip-fabricated-ids.d.ts +15 -0
- package/core/dist/runtime-v2/core-principles/strip-fabricated-ids.d.ts.map +1 -0
- package/core/dist/runtime-v2/core-principles/strip-fabricated-ids.js +28 -0
- package/core/dist/runtime-v2/core-principles/strip-fabricated-ids.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-distiller-output.test.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-distiller-output.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-distiller-output.test.js +45 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-distiller-output.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.js +91 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/distiller-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/distiller-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/distiller-prompt-builder.test.js +39 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/distiller-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js +34 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/router-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/router-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/router-prompt-builder.test.js +57 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/router-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.d.ts +80 -0
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.js +103 -0
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.d.ts +117 -0
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.js +182 -0
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.d.ts +134 -0
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.js +149 -0
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts +96 -0
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js +212 -0
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.d.ts +127 -0
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.js +131 -0
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +10 -50
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js +0 -148
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/evidence-guards.d.ts +31 -0
- package/core/dist/runtime-v2/evidence-guards.d.ts.map +1 -0
- package/core/dist/runtime-v2/evidence-guards.js +29 -0
- package/core/dist/runtime-v2/evidence-guards.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +106 -7
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/plugin-surface-registry.test.js +3 -3
- package/core/dist/runtime-v2/feature-flags/__tests__/plugin-surface-registry.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +39 -4
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js +27 -22
- package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js.map +1 -1
- package/core/dist/runtime-v2/feedback/redact-sensitive.js.map +1 -1
- package/core/dist/runtime-v2/feedback/safe-stringify.js.map +1 -1
- package/core/dist/runtime-v2/full-trace-contract.d.ts +3 -3
- package/core/dist/runtime-v2/golden-trace-replay-validator.d.ts +8 -0
- package/core/dist/runtime-v2/golden-trace-replay-validator.d.ts.map +1 -1
- package/core/dist/runtime-v2/golden-trace-replay-validator.js +3 -3
- package/core/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -1
- package/core/dist/runtime-v2/golden-trace.d.ts +46 -1
- package/core/dist/runtime-v2/golden-trace.d.ts.map +1 -1
- package/core/dist/runtime-v2/golden-trace.js +70 -4
- package/core/dist/runtime-v2/golden-trace.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +62 -31
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +54 -18
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/split-pipeline-mock-outputs.d.ts +25 -0
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/split-pipeline-mock-outputs.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/split-pipeline-mock-outputs.js +123 -0
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/split-pipeline-mock-outputs.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-case.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-case.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-case.test.js +139 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-case.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-feedback.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-feedback.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-feedback.test.js +62 -0
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-feedback.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js +24 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +5 -4
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js +248 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js +803 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-distiller-runner.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-distiller-runner.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-distiller-runner.test.js +441 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-distiller-runner.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js +340 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-runner.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-runner.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-runner.test.js +441 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-runner.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-output-v2.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-output-v2.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-output-v2.test.js +209 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-output-v2.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder-v2.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder-v2.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder-v2.test.js +125 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder-v2.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-consumer-decision.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-consumer-decision.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-consumer-decision.test.js +223 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-consumer-decision.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-runner-trust-boundary.test.js +4 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-runner-trust-boundary.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.js +270 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.js +180 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/runnerkind-seam.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/runnerkind-seam.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/runnerkind-seam.test.js +224 -0
- package/core/dist/runtime-v2/internalization/__tests__/runnerkind-seam.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js +13 -8
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-language.test.js +4 -3
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-language.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/split-diagnostician-runner-retry.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/split-diagnostician-runner-retry.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/split-diagnostician-runner-retry.test.js +227 -0
- package/core/dist/runtime-v2/internalization/__tests__/split-diagnostician-runner-retry.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.d.ts +32 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.js +68 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.js.map +1 -0
- package/core/dist/runtime-v2/internalization/adversarial-feedback.d.ts +23 -0
- package/core/dist/runtime-v2/internalization/adversarial-feedback.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/adversarial-feedback.js +20 -0
- package/core/dist/runtime-v2/internalization/adversarial-feedback.js.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts +54 -30
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-output.js +144 -36
- package/core/dist/runtime-v2/internalization/artificer-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +10 -2
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +37 -20
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts +19 -9
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.js +21 -9
- package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/correction-proposal.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/correction-proposal.js +27 -16
- package/core/dist/runtime-v2/internalization/correction-proposal.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.d.ts +83 -0
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js +274 -0
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts +73 -0
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +229 -0
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/diag-router-runner.d.ts +85 -0
- package/core/dist/runtime-v2/internalization/diag-router-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/diag-router-runner.js +353 -0
- package/core/dist/runtime-v2/internalization/diag-router-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts +19 -1
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.js +48 -8
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.d.ts +7 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.js +13 -3
- package/core/dist/runtime-v2/internalization/dreamer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +63 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.js +158 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +8 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js +17 -4
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +114 -4
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +629 -7
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/golden-dogfood-fixtures.d.ts +17 -0
- package/core/dist/runtime-v2/internalization/golden-dogfood-fixtures.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/golden-dogfood-fixtures.js +451 -0
- package/core/dist/runtime-v2/internalization/golden-dogfood-fixtures.js.map +1 -0
- package/core/dist/runtime-v2/internalization/index.d.ts +21 -9
- package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/index.js +16 -6
- package/core/dist/runtime-v2/internalization/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts +25 -0
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.js +67 -12
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.d.ts +17 -0
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.js +28 -0
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.js.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-job-graph.d.ts +14 -1
- package/core/dist/runtime-v2/internalization/internalization-job-graph.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-job-graph.js +22 -0
- package/core/dist/runtime-v2/internalization/internalization-job-graph.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.d.ts +9 -9
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js +32 -9
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-state-machine.d.ts +2 -2
- package/core/dist/runtime-v2/internalization/internalization-state-machine.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-state-machine.js +35 -4
- package/core/dist/runtime-v2/internalization/internalization-state-machine.js.map +1 -1
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts +31 -4
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.js +42 -12
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.js.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts +20 -1
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.js +47 -6
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.d.ts +6 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.js +10 -3
- package/core/dist/runtime-v2/internalization/philosopher-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts +9 -2
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.js +22 -11
- package/core/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -1
- package/core/dist/runtime-v2/internalization/prompt-serializer.d.ts +3 -0
- package/core/dist/runtime-v2/internalization/prompt-serializer.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/prompt-serializer.js +22 -0
- package/core/dist/runtime-v2/internalization/prompt-serializer.js.map +1 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.d.ts +3 -3
- package/core/dist/runtime-v2/internalization/queue-actionability.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js +16 -1
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js +2 -2
- package/core/dist/runtime-v2/internalization/rule-code-validator.d.ts +29 -0
- package/core/dist/runtime-v2/internalization/rule-code-validator.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-code-validator.js +87 -1
- package/core/dist/runtime-v2/internalization/rule-code-validator.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.d.ts +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.js +15 -1
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-host-input-builder.d.ts +62 -0
- package/core/dist/runtime-v2/internalization/rule-host-input-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-input-builder.js +182 -0
- package/core/dist/runtime-v2/internalization/rule-host-input-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-validator.d.ts +37 -0
- package/core/dist/runtime-v2/internalization/rule-host-validator.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-validator.js +154 -0
- package/core/dist/runtime-v2/internalization/rule-host-validator.js.map +1 -0
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +20 -6
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js +31 -15
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.d.ts +6 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.js +10 -3
- package/core/dist/runtime-v2/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/split-diagnostician-runner.d.ts +103 -0
- package/core/dist/runtime-v2/internalization/split-diagnostician-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/split-diagnostician-runner.js +286 -0
- package/core/dist/runtime-v2/internalization/split-diagnostician-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/template-generator.d.ts +7 -2
- package/core/dist/runtime-v2/internalization/template-generator.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/template-generator.js +10 -5
- package/core/dist/runtime-v2/internalization/template-generator.js.map +1 -1
- package/core/dist/runtime-v2/internalization/trainer-prompt-builder.d.ts +1 -1
- package/core/dist/runtime-v2/internalization/trainer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/trainer-prompt-builder.js +2 -2
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts +5 -0
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.js +48 -2
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.js.map +1 -1
- package/core/dist/runtime-v2/internalization-integrity-remediation.d.ts +67 -0
- package/core/dist/runtime-v2/internalization-integrity-remediation.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-integrity-remediation.js +802 -0
- package/core/dist/runtime-v2/internalization-integrity-remediation.js.map +1 -1
- package/core/dist/runtime-v2/internalization-queue-read-model.d.ts +7 -7
- package/core/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-queue-read-model.js +4 -4
- package/core/dist/runtime-v2/internalization-queue-read-model.js.map +1 -1
- package/core/dist/runtime-v2/mainline-contract.d.ts +138 -0
- package/core/dist/runtime-v2/mainline-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/mainline-contract.js +224 -0
- package/core/dist/runtime-v2/mainline-contract.js.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.js +29 -22
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.js.map +1 -1
- package/core/dist/runtime-v2/observer/agent-scheduler.js.map +1 -1
- package/core/dist/runtime-v2/observer/empathy-observer.js +1 -1
- package/core/dist/runtime-v2/observer/empathy-observer.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts +36 -4
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js +81 -37
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-observability.d.ts +4 -0
- package/core/dist/runtime-v2/pain-signal-observability.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-observability.js +58 -8
- package/core/dist/runtime-v2/pain-signal-observability.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +20 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +80 -23
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts +5 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.js +39 -0
- package/core/dist/runtime-v2/pain-to-principle-service.js.map +1 -1
- package/core/dist/runtime-v2/proven-channel-baseline.d.ts.map +1 -1
- package/core/dist/runtime-v2/proven-channel-baseline.js +14 -0
- package/core/dist/runtime-v2/proven-channel-baseline.js.map +1 -1
- package/core/dist/runtime-v2/recovery-sweep-service.d.ts +18 -0
- package/core/dist/runtime-v2/recovery-sweep-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/recovery-sweep-service.js +46 -0
- package/core/dist/runtime-v2/recovery-sweep-service.js.map +1 -1
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-trust-boundary.test.js +11 -2
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-trust-boundary.test.js.map +1 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnose.test.js.map +1 -1
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.js +6 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.js.map +1 -1
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.js.map +1 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.d.ts +10 -3
- package/core/dist/runtime-v2/runner/base-peer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.js +58 -15
- package/core/dist/runtime-v2/runner/base-peer-runner.js.map +1 -1
- package/core/dist/runtime-v2/runner/peer-runner-types.d.ts +10 -3
- package/core/dist/runtime-v2/runner/peer-runner-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/runtime-protocol.d.ts +3 -3
- package/core/dist/runtime-v2/runtime-protocol.d.ts.map +1 -1
- package/core/dist/runtime-v2/runtime-protocol.js +1 -0
- package/core/dist/runtime-v2/runtime-protocol.js.map +1 -1
- package/core/dist/runtime-v2/runtime-selector.d.ts +3 -3
- package/core/dist/runtime-v2/stalled-diagnostician-task-read-model.d.ts +26 -0
- package/core/dist/runtime-v2/stalled-diagnostician-task-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/stalled-diagnostician-task-read-model.js +59 -0
- package/core/dist/runtime-v2/stalled-diagnostician-task-read-model.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +2 -2
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -1
- package/core/dist/runtime-v2/store/concurrent-lease.test.js +13 -13
- package/core/dist/runtime-v2/store/concurrent-lease.test.js.map +1 -1
- package/core/dist/runtime-v2/store/context/index.d.ts +1 -0
- package/core/dist/runtime-v2/store/context/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts +8 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js +54 -3
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.test.js +373 -2
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.test.js.map +1 -1
- package/core/dist/runtime-v2/store/context/trajectory-turn-reader.d.ts +32 -0
- package/core/dist/runtime-v2/store/context/trajectory-turn-reader.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/context/trajectory-turn-reader.js +12 -0
- package/core/dist/runtime-v2/store/context/trajectory-turn-reader.js.map +1 -0
- package/core/dist/runtime-v2/store/event-emitter.js +0 -1
- package/core/dist/runtime-v2/store/event-emitter.js.map +1 -1
- package/core/dist/runtime-v2/store/history/sqlite-history-query.test.js +1 -1
- package/core/dist/runtime-v2/store/history/sqlite-history-query.test.js.map +1 -1
- package/core/dist/runtime-v2/store/idempotent-transitions.test.js +0 -5
- package/core/dist/runtime-v2/store/idempotent-transitions.test.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.js +5 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.test.js +0 -2
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.test.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.test.js +0 -2
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.test.js.map +1 -1
- package/core/dist/runtime-v2/store/run/memory-run-store.d.ts +2 -1
- package/core/dist/runtime-v2/store/run/memory-run-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/run/memory-run-store.js +5 -0
- package/core/dist/runtime-v2/store/run/memory-run-store.js.map +1 -1
- package/core/dist/runtime-v2/store/run/run-store.d.ts +27 -0
- package/core/dist/runtime-v2/store/run/run-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/run/sqlite-run-store.d.ts +26 -2
- package/core/dist/runtime-v2/store/run/sqlite-run-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/run/sqlite-run-store.js +134 -20
- package/core/dist/runtime-v2/store/run/sqlite-run-store.js.map +1 -1
- package/core/dist/runtime-v2/store/runtime-state-manager-malformed-run-tolerance.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/runtime-state-manager-malformed-run-tolerance.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/runtime-state-manager-malformed-run-tolerance.test.js +160 -0
- package/core/dist/runtime-v2/store/runtime-state-manager-malformed-run-tolerance.test.js.map +1 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.d.ts +25 -3
- package/core/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/runtime-state-manager.js +55 -7
- package/core/dist/runtime-v2/store/runtime-state-manager.js.map +1 -1
- package/core/dist/runtime-v2/store/schema-conformance.test.js +0 -10
- package/core/dist/runtime-v2/store/schema-conformance.test.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js +2 -2
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.js +12 -0
- package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-run-store.test.js +172 -2
- package/core/dist/runtime-v2/store/sqlite-run-store.test.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-task-store.test.js +0 -2
- package/core/dist/runtime-v2/store/sqlite-task-store.test.js.map +1 -1
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.test.js +0 -1
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.test.js.map +1 -1
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.js +1 -1
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.js.map +1 -1
- package/core/dist/runtime-v2/store/workspace-isolation.test.js +0 -2
- package/core/dist/runtime-v2/store/workspace-isolation.test.js.map +1 -1
- package/core/dist/runtime-v2/tools/__tests__/agent-tool-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/tools/__tests__/agent-tool-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/agent-tool-contract.test.js +171 -0
- package/core/dist/runtime-v2/tools/__tests__/agent-tool-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js +322 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.d.ts +2 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.js +149 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.js.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/dreamer-output-typebox.test.d.ts +2 -0
- package/core/dist/runtime-v2/tools/__tests__/dreamer-output-typebox.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/dreamer-output-typebox.test.js +109 -0
- package/core/dist/runtime-v2/tools/__tests__/dreamer-output-typebox.test.js.map +1 -0
- package/core/dist/runtime-v2/tools/agent-tool-contract.d.ts +76 -0
- package/core/dist/runtime-v2/tools/agent-tool-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/agent-tool-contract.js +136 -0
- package/core/dist/runtime-v2/tools/agent-tool-contract.js.map +1 -0
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts +72 -0
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js +275 -0
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js.map +1 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.d.ts +78 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.js +70 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.js.map +1 -0
- package/core/dist/runtime-v2/tools/dreamer-output-typebox.d.ts +63 -0
- package/core/dist/runtime-v2/tools/dreamer-output-typebox.d.ts.map +1 -0
- package/core/dist/runtime-v2/tools/dreamer-output-typebox.js +55 -0
- package/core/dist/runtime-v2/tools/dreamer-output-typebox.js.map +1 -0
- package/core/dist/runtime-v2/types/event-types.d.ts +32 -3
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js +8 -0
- package/core/dist/runtime-v2/types/event-types.js.map +1 -1
- package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts +213 -0
- package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/evidence-chain-contract.js +1064 -0
- package/core/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -0
- package/core/dist/runtime-v2/types/index.d.ts +4 -2
- package/core/dist/runtime-v2/types/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/index.js +2 -1
- package/core/dist/runtime-v2/types/index.js.map +1 -1
- package/core/dist/runtime-v2/types/principle-enums.d.ts +2 -2
- package/core/dist/runtime-v2/types/principle-enums.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/principle-enums.js +1 -0
- package/core/dist/runtime-v2/types/principle-enums.js.map +1 -1
- package/core/dist/runtime-v2/types/principle-schema.d.ts +1 -1
- package/core/dist/runtime-v2/types/principle-tree-store.d.ts +1 -1
- package/core/dist/runtime-v2/utils/cli-process-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/utils/cli-process-runner.js +5 -2
- package/core/dist/runtime-v2/utils/cli-process-runner.js.map +1 -1
- package/core/dist/runtime-v2/utils/cli-process-runner.test.js +7 -5
- package/core/dist/runtime-v2/utils/cli-process-runner.test.js.map +1 -1
- package/core/dist/telemetry-event.d.ts +3 -3
- package/core/dist/telemetry-event.d.ts.map +1 -1
- package/core/dist/telemetry-event.js +34 -1
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/dist/trajectory-store.js +0 -2
- package/core/dist/trajectory-store.js.map +1 -1
- package/core/package.json +10 -1
- package/dist/installer.d.ts +11 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +47 -2
- package/dist/installer.js.map +1 -1
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +2 -0
- package/dist/mvp-config.js.map +1 -1
- package/package.json +3 -2
- package/pd-cli/dist/commands/__tests__/legacy-cleanup.test.d.ts +18 -0
- package/pd-cli/dist/commands/__tests__/legacy-cleanup.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/legacy-cleanup.test.js +459 -0
- package/pd-cli/dist/commands/__tests__/legacy-cleanup.test.js.map +1 -0
- package/pd-cli/dist/commands/__tests__/mvp-smoke.test.d.ts +15 -0
- package/pd-cli/dist/commands/__tests__/mvp-smoke.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/mvp-smoke.test.js +262 -0
- package/pd-cli/dist/commands/__tests__/mvp-smoke.test.js.map +1 -0
- package/pd-cli/dist/commands/__tests__/rulecode-flag-wiring.test.d.ts +21 -0
- package/pd-cli/dist/commands/__tests__/rulecode-flag-wiring.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/rulecode-flag-wiring.test.js +179 -0
- package/pd-cli/dist/commands/__tests__/rulecode-flag-wiring.test.js.map +1 -0
- package/pd-cli/dist/commands/__tests__/rulecode-handler.test.d.ts +16 -0
- package/pd-cli/dist/commands/__tests__/rulecode-handler.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/rulecode-handler.test.js +285 -0
- package/pd-cli/dist/commands/__tests__/rulecode-handler.test.js.map +1 -0
- package/pd-cli/dist/commands/__tests__/run-rulehost-flag-wiring.test.d.ts +24 -0
- package/pd-cli/dist/commands/__tests__/run-rulehost-flag-wiring.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/run-rulehost-flag-wiring.test.js +223 -0
- package/pd-cli/dist/commands/__tests__/run-rulehost-flag-wiring.test.js.map +1 -0
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.d.ts +20 -0
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js +388 -0
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js.map +1 -0
- package/pd-cli/dist/commands/build-trajectory-evidence.d.ts +21 -0
- package/pd-cli/dist/commands/build-trajectory-evidence.d.ts.map +1 -0
- package/pd-cli/dist/commands/build-trajectory-evidence.js +161 -0
- package/pd-cli/dist/commands/build-trajectory-evidence.js.map +1 -0
- package/pd-cli/dist/commands/candidate.d.ts +24 -0
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
- package/pd-cli/dist/commands/candidate.js +147 -75
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/command-helpers.d.ts +19 -0
- package/pd-cli/dist/commands/command-helpers.d.ts.map +1 -0
- package/pd-cli/dist/commands/command-helpers.js +22 -0
- package/pd-cli/dist/commands/command-helpers.js.map +1 -0
- package/pd-cli/dist/commands/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/commands/config-doctor.js +4 -0
- package/pd-cli/dist/commands/config-doctor.js.map +1 -1
- package/pd-cli/dist/commands/diagnose.d.ts +1 -0
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +252 -149
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/evolution-tasks-show.js +0 -1
- package/pd-cli/dist/commands/evolution-tasks-show.js.map +1 -1
- package/pd-cli/dist/commands/legacy-cleanup.d.ts +72 -6
- package/pd-cli/dist/commands/legacy-cleanup.d.ts.map +1 -1
- package/pd-cli/dist/commands/legacy-cleanup.js +243 -23
- package/pd-cli/dist/commands/legacy-cleanup.js.map +1 -1
- package/pd-cli/dist/commands/mvp-smoke.d.ts +30 -0
- package/pd-cli/dist/commands/mvp-smoke.d.ts.map +1 -0
- package/pd-cli/dist/commands/mvp-smoke.js +139 -0
- package/pd-cli/dist/commands/mvp-smoke.js.map +1 -0
- package/pd-cli/dist/commands/pain-record.d.ts +2 -0
- package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-record.js +45 -7
- package/pd-cli/dist/commands/pain-record.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +46 -43
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/quality-scorecard.d.ts +9 -0
- package/pd-cli/dist/commands/quality-scorecard.d.ts.map +1 -0
- package/pd-cli/dist/commands/quality-scorecard.js +241 -0
- package/pd-cli/dist/commands/quality-scorecard.js.map +1 -0
- package/pd-cli/dist/commands/rulecode.d.ts +85 -0
- package/pd-cli/dist/commands/rulecode.d.ts.map +1 -0
- package/pd-cli/dist/commands/rulecode.js +356 -0
- package/pd-cli/dist/commands/rulecode.js.map +1 -0
- package/pd-cli/dist/commands/runtime-activation.d.ts +37 -0
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.js +416 -2
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/dist/commands/runtime-features.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-features.js +2 -7
- package/pd-cli/dist/commands/runtime-features.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity-repair.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity-repair.js +25 -15
- package/pd-cli/dist/commands/runtime-internalization-integrity-repair.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity.js +42 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-queue.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-queue.js +35 -3
- package/pd-cli/dist/commands/runtime-internalization-queue.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +316 -320
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts +23 -0
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +361 -0
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -0
- package/pd-cli/dist/commands/runtime-recovery-failed-tasks.d.ts +10 -0
- package/pd-cli/dist/commands/runtime-recovery-failed-tasks.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-recovery-failed-tasks.js +164 -0
- package/pd-cli/dist/commands/runtime-recovery-failed-tasks.js.map +1 -0
- package/pd-cli/dist/commands/runtime-recovery.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-recovery.js +9 -8
- package/pd-cli/dist/commands/runtime-recovery.js.map +1 -1
- package/pd-cli/dist/commands/runtime.d.ts +7 -1
- package/pd-cli/dist/commands/runtime.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime.js +223 -30
- package/pd-cli/dist/commands/runtime.js.map +1 -1
- package/pd-cli/dist/commands/samples-list.js +0 -1
- package/pd-cli/dist/commands/samples-list.js.map +1 -1
- package/pd-cli/dist/commands/task.d.ts +11 -0
- package/pd-cli/dist/commands/task.d.ts.map +1 -1
- package/pd-cli/dist/commands/task.js +148 -6
- package/pd-cli/dist/commands/task.js.map +1 -1
- package/pd-cli/dist/index.d.ts +1 -1
- package/pd-cli/dist/index.js +155 -70
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/legacy/session-history-import.js +0 -19
- package/pd-cli/dist/legacy/session-history-import.js.map +1 -1
- package/pd-cli/dist/services/__tests__/cli-output.test.d.ts +18 -0
- package/pd-cli/dist/services/__tests__/cli-output.test.d.ts.map +1 -0
- package/pd-cli/dist/services/__tests__/cli-output.test.js +103 -0
- package/pd-cli/dist/services/__tests__/cli-output.test.js.map +1 -0
- package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.d.ts +18 -0
- package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.d.ts.map +1 -0
- package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.js +651 -0
- package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.js.map +1 -0
- package/pd-cli/dist/services/cli-output.d.ts +61 -0
- package/pd-cli/dist/services/cli-output.d.ts.map +1 -0
- package/pd-cli/dist/services/cli-output.js +72 -0
- package/pd-cli/dist/services/cli-output.js.map +1 -0
- package/pd-cli/dist/services/config-doctor.d.ts +2 -0
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +11 -8
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/console-launcher.js +1 -1
- package/pd-cli/dist/services/console-launcher.js.map +1 -1
- package/pd-cli/dist/services/demo-rule-compiler.d.ts +24 -0
- package/pd-cli/dist/services/demo-rule-compiler.d.ts.map +1 -0
- package/pd-cli/dist/services/demo-rule-compiler.js +58 -0
- package/pd-cli/dist/services/demo-rule-compiler.js.map +1 -0
- package/pd-cli/dist/services/feature-flag-loader.js +0 -1
- package/pd-cli/dist/services/feature-flag-loader.js.map +1 -1
- package/pd-cli/dist/services/mainline-snapshot-assembler.d.ts +35 -0
- package/pd-cli/dist/services/mainline-snapshot-assembler.d.ts.map +1 -0
- package/pd-cli/dist/services/mainline-snapshot-assembler.js +428 -0
- package/pd-cli/dist/services/mainline-snapshot-assembler.js.map +1 -0
- package/pd-cli/dist/services/pain-flood-simulation-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/pain-flood-simulation-runner.js +95 -10
- package/pd-cli/dist/services/pain-flood-simulation-runner.js.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.d.ts +4 -0
- package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.js +12 -0
- package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
- package/pd-cli/dist/services/quality-scorecard/data-extractor.d.ts +28 -0
- package/pd-cli/dist/services/quality-scorecard/data-extractor.d.ts.map +1 -0
- package/pd-cli/dist/services/quality-scorecard/data-extractor.js +118 -0
- package/pd-cli/dist/services/quality-scorecard/data-extractor.js.map +1 -0
- package/pd-cli/dist/services/quality-scorecard/local-evaluator.d.ts +18 -0
- package/pd-cli/dist/services/quality-scorecard/local-evaluator.d.ts.map +1 -0
- package/pd-cli/dist/services/quality-scorecard/local-evaluator.js +112 -0
- package/pd-cli/dist/services/quality-scorecard/local-evaluator.js.map +1 -0
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.d.ts +14 -0
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.d.ts.map +1 -0
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.js +128 -0
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.js.map +1 -0
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.d.ts +70 -0
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.d.ts.map +1 -0
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.js +138 -0
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.js.map +1 -0
- package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts +132 -0
- package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -0
- package/pd-cli/dist/services/rulehost-pipeline-runner.js +392 -0
- package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts +105 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.js +188 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -0
- package/pd-cli/dist/services/synthetic-baseline-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/synthetic-baseline-runner.js +97 -6
- package/pd-cli/dist/services/synthetic-baseline-runner.js.map +1 -1
- package/pd-cli/dist/utils/production-workspace-guard.d.ts +0 -7
- package/pd-cli/dist/utils/production-workspace-guard.d.ts.map +1 -1
- package/pd-cli/dist/utils/production-workspace-guard.js +0 -11
- package/pd-cli/dist/utils/production-workspace-guard.js.map +1 -1
- package/pd-cli/dist/utils/production-workspace-guard.test.js +9 -2
- package/pd-cli/dist/utils/production-workspace-guard.test.js.map +1 -1
- package/pd-cli/package.json +3 -2
- package/plugin/dist/config/defaults/runtime.d.ts +0 -6
- package/plugin/dist/config/defaults/runtime.js +0 -7
- package/plugin/dist/core/code-implementation-storage.d.ts +0 -9
- package/plugin/dist/core/code-implementation-storage.js +0 -34
- package/plugin/dist/core/config-health.d.ts +27 -0
- package/plugin/dist/core/config-health.js +60 -0
- package/plugin/dist/core/event-log.d.ts +10 -1
- package/plugin/dist/core/event-log.js +11 -0
- package/plugin/dist/core/init.d.ts +1 -1
- package/plugin/dist/core/init.js +10 -14
- package/plugin/dist/core/paths.d.ts +0 -6
- package/plugin/dist/core/paths.js +0 -6
- package/plugin/dist/core/principle-compiler/code-validator.js +4 -1
- package/plugin/dist/core/principle-tree-ledger.d.ts +0 -4
- package/plugin/dist/core/principle-tree-ledger.js +0 -7
- package/plugin/dist/core/rule-host.d.ts +45 -15
- package/plugin/dist/core/rule-host.js +240 -81
- package/plugin/dist/core/rule-implementation-runtime.d.ts +13 -0
- package/plugin/dist/core/rule-implementation-runtime.js +91 -3
- package/plugin/dist/core/runtime-v2-prompt-activation-reader.js +2 -2
- package/plugin/dist/core/thinking-models.d.ts +3 -2
- package/plugin/dist/core/thinking-models.js +9 -29
- package/plugin/dist/core/trajectory-types.d.ts +4 -0
- package/plugin/dist/core/trajectory.js +55 -5
- package/plugin/dist/core/workspace-dir-validation.d.ts +2 -2
- package/plugin/dist/core/workspace-dir-validation.js +2 -2
- package/plugin/dist/hooks/after-tool-call-helpers.d.ts +8 -9
- package/plugin/dist/hooks/after-tool-call-helpers.js +89 -100
- package/plugin/dist/hooks/after-tool-call-types.d.ts +2 -8
- package/plugin/dist/hooks/gate.js +1 -1
- package/plugin/dist/hooks/llm.js +11 -2
- package/plugin/dist/hooks/pain.d.ts +0 -1
- package/plugin/dist/hooks/pain.js +3 -2
- package/plugin/dist/hooks/raw-observation-adapter.d.ts +57 -0
- package/plugin/dist/hooks/raw-observation-adapter.js +170 -0
- package/plugin/dist/hooks/raw-observation-types.d.ts +62 -0
- package/plugin/dist/hooks/raw-observation-types.js +15 -0
- package/plugin/dist/hooks/trajectory-collector.d.ts +17 -28
- package/plugin/dist/hooks/trajectory-collector.js +71 -104
- package/plugin/dist/hooks/trajectory-evidence.js +23 -0
- package/plugin/dist/hooks/triage-adapter.d.ts +7 -31
- package/plugin/dist/hooks/triage-adapter.js +32 -61
- package/plugin/dist/hooks/trigger-cooldown-tracker.d.ts +30 -0
- package/plugin/dist/hooks/trigger-cooldown-tracker.js +55 -0
- package/plugin/dist/index.d.ts +11 -0
- package/plugin/dist/index.js +73 -27
- package/plugin/dist/openclaw-sdk.d.ts +1 -0
- package/plugin/dist/service/evolution-worker.d.ts +1 -1
- package/plugin/dist/service/internalization-auto-consumer-service.d.ts +8 -0
- package/plugin/dist/service/internalization-auto-consumer-service.js +322 -0
- package/plugin/dist/types/event-types.d.ts +1 -1
- package/plugin/dist/utils/io.js +24 -3
- package/plugin/package.json +4 -3
- package/plugin/scripts/sync-plugin.mjs +43 -0
- package/plugin/templates/langs/en/principles/THINKING_OS.md +12 -0
- package/plugin/templates/langs/en/skills/pd-runtime-v2/SKILL.md +1 -1
- package/plugin/templates/langs/zh/principles/THINKING_OS.md +12 -0
- package/plugin/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +1 -1
- package/templates/langs/en/principles/THINKING_OS.md +12 -0
- package/templates/langs/zh/principles/THINKING_OS.md +12 -0
- package/console/dist/server/routes/state.d.ts +0 -11
- package/console/dist/server/routes/state.js +0 -97
- package/console/dist/ui/components/UpdateBanner.d.ts +0 -1
- package/console/dist/ui/components/UpdateBanner.js +0 -41
- package/console/dist/ui/components/UpdateProgressDialog.d.ts +0 -12
- package/console/dist/ui/components/UpdateProgressDialog.js +0 -28
- package/console/dist/ui/components/approval-card.d.ts +0 -8
- package/console/dist/ui/components/approval-card.js +0 -39
- package/console/dist/ui/components/approval-detail-dialog.d.ts +0 -9
- package/console/dist/ui/components/approval-detail-dialog.js +0 -20
- package/console/dist/ui/components/rejection-reason-dialog.d.ts +0 -6
- package/console/dist/ui/components/rejection-reason-dialog.js +0 -23
- package/core/dist/evolution-hook.d.ts +0 -70
- package/core/dist/evolution-hook.d.ts.map +0 -1
- package/core/dist/evolution-hook.js +0 -10
- package/core/dist/evolution-hook.js.map +0 -1
- package/core/dist/pain-flag-resolver.d.ts +0 -18
- package/core/dist/pain-flag-resolver.d.ts.map +0 -1
- package/core/dist/pain-flag-resolver.js +0 -21
- package/core/dist/pain-flag-resolver.js.map +0 -1
- package/core/dist/pain-recorder.d.ts +0 -38
- package/core/dist/pain-recorder.d.ts.map +0 -1
- package/core/dist/pain-recorder.js +0 -62
- package/core/dist/pain-recorder.js.map +0 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.d.ts +0 -2
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.js +0 -170
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.js.map +0 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.d.ts +0 -2
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js +0 -396
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js.map +0 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-language.test.d.ts +0 -13
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-language.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-language.test.js +0 -97
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-language.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.js +0 -378
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.js +0 -682
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.js +0 -286
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.js +0 -320
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.js +0 -261
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.js +0 -405
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.js +0 -347
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.js +0 -186
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.js +0 -355
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.js +0 -488
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.js +0 -171
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.js +0 -182
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.js +0 -276
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.js +0 -272
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.d.ts +0 -2
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.js +0 -67
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.js.map +0 -1
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.d.ts +0 -47
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.js +0 -20
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.js.map +0 -1
- package/core/dist/runtime-v2/runner/diagnostician-runner.d.ts +0 -87
- package/core/dist/runtime-v2/runner/diagnostician-runner.d.ts.map +0 -1
- package/core/dist/runtime-v2/runner/diagnostician-runner.js +0 -441
- package/core/dist/runtime-v2/runner/diagnostician-runner.js.map +0 -1
- package/core/dist/storage-adapter.d.ts +0 -59
- package/core/dist/storage-adapter.d.ts.map +0 -1
- package/core/dist/storage-adapter.js +0 -2
- package/core/dist/storage-adapter.js.map +0 -1
- package/core/dist/types/workspace-resolver.d.ts +0 -25
- package/core/dist/types/workspace-resolver.d.ts.map +0 -1
- package/core/dist/types/workspace-resolver.js +0 -10
- package/core/dist/types/workspace-resolver.js.map +0 -1
- package/core/dist/types.d.ts +0 -56
- package/core/dist/types.d.ts.map +0 -1
- package/core/dist/types.js +0 -16
- package/core/dist/types.js.map +0 -1
- package/pd-cli/dist/principle-tree-ledger-adapter.d.ts +0 -12
- package/pd-cli/dist/principle-tree-ledger-adapter.d.ts.map +0 -1
- package/pd-cli/dist/principle-tree-ledger-adapter.js +0 -12
- package/pd-cli/dist/principle-tree-ledger-adapter.js.map +0 -1
- package/plugin/dist/core/evolution-hook.d.ts +0 -54
- package/plugin/dist/core/evolution-hook.js +0 -9
- package/plugin/dist/core/file-storage-adapter.d.ts +0 -43
- package/plugin/dist/core/file-storage-adapter.js +0 -158
- package/plugin/dist/core/merge-gate-audit.d.ts +0 -21
- package/plugin/dist/core/merge-gate-audit.js +0 -241
- package/plugin/dist/core/pain-context-extractor.d.ts +0 -31
- package/plugin/dist/core/pain-context-extractor.js +0 -278
- package/plugin/dist/core/pain-lifecycle.d.ts +0 -15
- package/plugin/dist/core/pain-lifecycle.js +0 -37
- package/plugin/dist/core/pain-signal-adapter.d.ts +0 -37
- package/plugin/dist/core/pain-signal-adapter.js +0 -1
- package/plugin/dist/core/pain-signal.d.ts +0 -6
- package/plugin/dist/core/pain-signal.js +0 -3
- package/plugin/dist/core/principle-injector.d.ts +0 -55
- package/plugin/dist/core/principle-injector.js +0 -17
- package/plugin/dist/core/principle-tree-migration.d.ts +0 -35
- package/plugin/dist/core/principle-tree-migration.js +0 -137
- package/plugin/dist/core/storage-adapter.d.ts +0 -58
- package/plugin/dist/core/storage-adapter.js +0 -1
- package/plugin/dist/core/telemetry-event.d.ts +0 -66
- package/plugin/dist/core/telemetry-event.js +0 -86
- package/plugin/dist/core/training-program.d.ts +0 -233
- package/plugin/dist/core/training-program.js +0 -435
- package/plugin/dist/core/workspace-dir-service.d.ts +0 -33
- package/plugin/dist/core/workspace-dir-service.js +0 -71
- package/plugin/dist/hooks/lifecycle-routing.d.ts +0 -24
- package/plugin/dist/hooks/lifecycle-routing.js +0 -110
- package/plugin/dist/service/event-log-auditor.d.ts +0 -46
- package/plugin/dist/service/event-log-auditor.js +0 -236
- package/plugin/dist/service/evolution-queue-lock.d.ts +0 -18
- package/plugin/dist/service/evolution-queue-lock.js +0 -36
- package/plugin/dist/service/failure-classifier.d.ts +0 -46
- package/plugin/dist/service/failure-classifier.js +0 -57
- package/plugin/dist/service/internalization-trigger-adapter.d.ts +0 -51
- package/plugin/dist/service/internalization-trigger-adapter.js +0 -184
- package/plugin/dist/service/monitoring-query-service.d.ts +0 -21
- package/plugin/dist/service/monitoring-query-service.js +0 -45
- package/plugin/dist/service/subagent-workflow/index.d.ts +0 -3
- package/plugin/dist/service/subagent-workflow/index.js +0 -2
- package/plugin/dist/tools/critique-prompt.d.ts +0 -1
- package/plugin/dist/tools/critique-prompt.js +0 -1
- package/plugin/dist/tools/deep-reflect.d.ts +0 -1
- package/plugin/dist/tools/deep-reflect.js +0 -1
- package/plugin/dist/tools/model-index.d.ts +0 -1
- package/plugin/dist/tools/model-index.js +0 -1
- package/plugin/dist/types/event-payload.d.ts +0 -2
- package/plugin/dist/types/event-payload.js +0 -1
- package/plugin/dist/utils/glob-match.d.ts +0 -28
- package/plugin/dist/utils/glob-match.js +0 -49
- package/plugin/dist/utils/nlp.d.ts +0 -4
- package/plugin/dist/utils/nlp.js +0 -21
- package/plugin/dist/utils/plugin-logger.d.ts +0 -39
- package/plugin/dist/utils/plugin-logger.js +0 -70
- package/plugin/dist/utils/subagent-probe.d.ts +0 -35
- package/plugin/dist/utils/subagent-probe.js +0 -67
|
@@ -1,26 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Approval Queue Tests — PRI-145
|
|
3
|
+
*
|
|
4
|
+
* Unit tests for ApprovalQueue class and decideAutoPromotion function.
|
|
5
|
+
*
|
|
6
|
+
* Tests verify:
|
|
7
|
+
* - decideAutoPromotion() correctly evaluates auto-promotion conditions
|
|
8
|
+
* - ApprovalQueue class methods work correctly with mock store
|
|
9
|
+
* - Boundary conditions for confidence threshold
|
|
10
|
+
*
|
|
11
|
+
* ERR checklist:
|
|
12
|
+
* - ERR-002: Every decision path carries reason + nextAction
|
|
13
|
+
* - ERR-009: Malformed state fails loud
|
|
14
|
+
* - ERR-025: Production-path tests, not just helpers
|
|
15
|
+
*/
|
|
16
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
17
|
+
import { decideAutoPromotion, ApprovalQueue, } from '../approval-queue';
|
|
18
|
+
import { AUTO_PROMOTION_CONFIDENCE_THRESHOLD, AUTO_PROMOTABLE_CHANNELS, } from '../activation-types';
|
|
19
|
+
// ── decideAutoPromotion Tests ─────────────────────────────────────────────────
|
|
4
20
|
describe('decideAutoPromotion', () => {
|
|
5
21
|
it('returns true for skill channel with confidence >= 0.95', () => {
|
|
6
22
|
expect(decideAutoPromotion('skill', 0.95)).toBe(true);
|
|
7
23
|
expect(decideAutoPromotion('skill', 0.96)).toBe(true);
|
|
24
|
+
expect(decideAutoPromotion('skill', 0.99)).toBe(true);
|
|
8
25
|
expect(decideAutoPromotion('skill', 1.0)).toBe(true);
|
|
9
26
|
});
|
|
10
27
|
it('returns false for skill channel with confidence < 0.95', () => {
|
|
11
28
|
expect(decideAutoPromotion('skill', 0.94)).toBe(false);
|
|
12
|
-
expect(decideAutoPromotion('skill', 0.
|
|
13
|
-
expect(decideAutoPromotion('skill', 0)).toBe(false);
|
|
29
|
+
expect(decideAutoPromotion('skill', 0.90)).toBe(false);
|
|
30
|
+
expect(decideAutoPromotion('skill', 0.80)).toBe(false);
|
|
31
|
+
expect(decideAutoPromotion('skill', 0.50)).toBe(false);
|
|
14
32
|
});
|
|
15
|
-
it('returns false for
|
|
33
|
+
it('returns false for non-AUTO_PROMOTABLE_CHANNELS regardless of confidence', () => {
|
|
34
|
+
// code_tool_hook is not auto-promotable
|
|
16
35
|
expect(decideAutoPromotion('code_tool_hook', 0.99)).toBe(false);
|
|
17
36
|
expect(decideAutoPromotion('code_tool_hook', 1.0)).toBe(false);
|
|
18
|
-
|
|
19
|
-
it('returns false for model_training regardless of confidence', () => {
|
|
37
|
+
// model_training is not auto-promotable
|
|
20
38
|
expect(decideAutoPromotion('model_training', 0.99)).toBe(false);
|
|
21
|
-
|
|
22
|
-
it('returns false for low-risk channels (already auto-activated)', () => {
|
|
39
|
+
// prompt is low-risk but not auto-promotable (goes through direct activation)
|
|
23
40
|
expect(decideAutoPromotion('prompt', 0.99)).toBe(false);
|
|
41
|
+
// defer_archive is low-risk but not auto-promotable
|
|
24
42
|
expect(decideAutoPromotion('defer_archive', 0.99)).toBe(false);
|
|
25
43
|
});
|
|
26
44
|
it('returns false for undefined confidence', () => {
|
|
@@ -29,205 +47,362 @@ describe('decideAutoPromotion', () => {
|
|
|
29
47
|
it('returns false for null confidence', () => {
|
|
30
48
|
expect(decideAutoPromotion('skill', null)).toBe(false);
|
|
31
49
|
});
|
|
32
|
-
it('returns false for negative confidence (
|
|
50
|
+
it('returns false for negative confidence (invalid)', () => {
|
|
33
51
|
expect(decideAutoPromotion('skill', -0.1)).toBe(false);
|
|
34
|
-
expect(decideAutoPromotion('skill', -1)).toBe(false);
|
|
35
|
-
expect(decideAutoPromotion('skill', -100)).toBe(false);
|
|
36
52
|
});
|
|
37
|
-
it('returns false for confidence > 1 (
|
|
38
|
-
expect(decideAutoPromotion('skill', 1.
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
it('returns false for confidence > 1.0 (invalid)', () => {
|
|
54
|
+
expect(decideAutoPromotion('skill', 1.5)).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
// Boundary tests
|
|
57
|
+
it('returns true at exact threshold 0.95', () => {
|
|
58
|
+
expect(decideAutoPromotion('skill', AUTO_PROMOTION_CONFIDENCE_THRESHOLD)).toBe(true);
|
|
59
|
+
});
|
|
60
|
+
it('returns false just below threshold 0.94', () => {
|
|
61
|
+
expect(decideAutoPromotion('skill', 0.94)).toBe(false);
|
|
62
|
+
});
|
|
63
|
+
it('AUTO_PROMOTABLE_CHANNELS contains only skill', () => {
|
|
64
|
+
expect(AUTO_PROMOTABLE_CHANNELS).toEqual(['skill']);
|
|
65
|
+
});
|
|
66
|
+
it('AUTO_PROMOTION_CONFIDENCE_THRESHOLD is 0.95', () => {
|
|
67
|
+
expect(AUTO_PROMOTION_CONFIDENCE_THRESHOLD).toBe(0.95);
|
|
68
|
+
});
|
|
69
|
+
it('only skill channel can be auto-promoted', () => {
|
|
70
|
+
const channels = [
|
|
71
|
+
'prompt', 'defer_archive', 'skill', 'code_tool_hook', 'model_training',
|
|
72
|
+
];
|
|
73
|
+
for (const channel of channels) {
|
|
74
|
+
const canAutoPromote = decideAutoPromotion(channel, 0.95);
|
|
75
|
+
expect(canAutoPromote).toBe(channel === 'skill');
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
// Invariant: auto-promotion requires both channel AND confidence conditions
|
|
79
|
+
it('auto-promotion requires both channel match AND confidence threshold', () => {
|
|
80
|
+
// skill + high confidence → true
|
|
81
|
+
expect(decideAutoPromotion('skill', 0.96)).toBe(true);
|
|
82
|
+
// skill + low confidence → false
|
|
83
|
+
expect(decideAutoPromotion('skill', 0.50)).toBe(false);
|
|
84
|
+
// non-skill + high confidence → false
|
|
85
|
+
expect(decideAutoPromotion('code_tool_hook', 0.96)).toBe(false);
|
|
86
|
+
// non-skill + low confidence → false
|
|
87
|
+
expect(decideAutoPromotion('code_tool_hook', 0.50)).toBe(false);
|
|
41
88
|
});
|
|
42
89
|
});
|
|
90
|
+
// ── ApprovalQueue Class Tests ─────────────────────────────────────────────────
|
|
91
|
+
function createMockStore() {
|
|
92
|
+
const records = new Map();
|
|
93
|
+
return {
|
|
94
|
+
enqueue: vi.fn(async (input, now) => {
|
|
95
|
+
const approvalId = `apr_${input.channel}_${input.artifactId}`;
|
|
96
|
+
const record = {
|
|
97
|
+
approvalId,
|
|
98
|
+
artifactId: input.artifactId,
|
|
99
|
+
channel: input.channel,
|
|
100
|
+
riskLevel: input.riskLevel,
|
|
101
|
+
status: 'pending',
|
|
102
|
+
confidence: input.confidence,
|
|
103
|
+
requestedAt: now,
|
|
104
|
+
summary: input.summary,
|
|
105
|
+
triggerReason: input.triggerReason,
|
|
106
|
+
confidenceExplanation: input.confidenceExplanation,
|
|
107
|
+
effectDescription: input.effectDescription,
|
|
108
|
+
rejectionEffect: input.rejectionEffect,
|
|
109
|
+
};
|
|
110
|
+
records.set(approvalId, record);
|
|
111
|
+
return record;
|
|
112
|
+
}),
|
|
113
|
+
getById: vi.fn(async (approvalId) => {
|
|
114
|
+
return records.get(approvalId) ?? null;
|
|
115
|
+
}),
|
|
116
|
+
listPending: vi.fn(async (filter) => {
|
|
117
|
+
const pending = Array.from(records.values()).filter(r => r.status === 'pending');
|
|
118
|
+
if (filter?.channel) {
|
|
119
|
+
return pending.filter(r => r.channel === filter.channel);
|
|
120
|
+
}
|
|
121
|
+
if (filter?.riskLevel) {
|
|
122
|
+
return pending.filter(r => r.riskLevel === filter.riskLevel);
|
|
123
|
+
}
|
|
124
|
+
return pending;
|
|
125
|
+
}),
|
|
126
|
+
listAll: vi.fn(async (filter) => {
|
|
127
|
+
let all = Array.from(records.values());
|
|
128
|
+
if (filter?.status) {
|
|
129
|
+
all = all.filter(r => r.status === filter.status);
|
|
130
|
+
}
|
|
131
|
+
if (filter?.channel) {
|
|
132
|
+
all = all.filter(r => r.channel === filter.channel);
|
|
133
|
+
}
|
|
134
|
+
return all;
|
|
135
|
+
}),
|
|
136
|
+
countByStatus: vi.fn(async () => {
|
|
137
|
+
const all = Array.from(records.values());
|
|
138
|
+
return {
|
|
139
|
+
pending: all.filter(r => r.status === 'pending').length,
|
|
140
|
+
approved: all.filter(r => r.status === 'approved').length,
|
|
141
|
+
rejected: all.filter(r => r.status === 'rejected').length,
|
|
142
|
+
cancelled: all.filter(r => r.status === 'cancelled').length,
|
|
143
|
+
};
|
|
144
|
+
}),
|
|
145
|
+
approve: vi.fn(async (approvalId, decidedBy, note) => {
|
|
146
|
+
const record = records.get(approvalId);
|
|
147
|
+
if (!record)
|
|
148
|
+
return { ok: false, error: 'not_found' };
|
|
149
|
+
if (record.status !== 'pending')
|
|
150
|
+
return { ok: false, error: 'already_decided', status: record.status };
|
|
151
|
+
record.status = 'approved';
|
|
152
|
+
record.decidedAt = new Date().toISOString();
|
|
153
|
+
record.decidedBy = decidedBy;
|
|
154
|
+
record.decisionNote = note;
|
|
155
|
+
return { ok: true, record };
|
|
156
|
+
}),
|
|
157
|
+
reject: vi.fn(async (approvalId, decidedBy, reason) => {
|
|
158
|
+
const record = records.get(approvalId);
|
|
159
|
+
if (!record)
|
|
160
|
+
return { ok: false, error: 'not_found' };
|
|
161
|
+
if (record.status !== 'pending')
|
|
162
|
+
return { ok: false, error: 'already_decided', status: record.status };
|
|
163
|
+
record.status = 'rejected';
|
|
164
|
+
record.decidedAt = new Date().toISOString();
|
|
165
|
+
record.decidedBy = decidedBy;
|
|
166
|
+
record.rejectionReason = reason;
|
|
167
|
+
return { ok: true, record };
|
|
168
|
+
}),
|
|
169
|
+
resetToPending: vi.fn(async (approvalId) => {
|
|
170
|
+
const record = records.get(approvalId);
|
|
171
|
+
if (!record)
|
|
172
|
+
return { ok: false, error: 'not_found' };
|
|
173
|
+
if (record.status !== 'approved')
|
|
174
|
+
return { ok: false, error: 'not_approved' };
|
|
175
|
+
record.status = 'pending';
|
|
176
|
+
record.decidedAt = undefined;
|
|
177
|
+
record.decidedBy = undefined;
|
|
178
|
+
return { ok: true };
|
|
179
|
+
}),
|
|
180
|
+
edit: vi.fn(async (input) => {
|
|
181
|
+
const record = records.get(input.approvalId);
|
|
182
|
+
if (!record)
|
|
183
|
+
return { ok: false, error: 'not_found' };
|
|
184
|
+
if (record.status !== 'pending')
|
|
185
|
+
return { ok: false, error: 'already_decided', status: record.status };
|
|
186
|
+
record.previousArtifactId = record.artifactId;
|
|
187
|
+
record.artifactId = input.newArtifactId;
|
|
188
|
+
record.editedAt = input.now;
|
|
189
|
+
record.editedBy = input.editedBy;
|
|
190
|
+
record.editReason = input.editReason;
|
|
191
|
+
return { ok: true, record };
|
|
192
|
+
}),
|
|
193
|
+
};
|
|
194
|
+
}
|
|
43
195
|
describe('ApprovalQueue', () => {
|
|
44
|
-
it('enqueue creates a pending record', async () => {
|
|
45
|
-
const store =
|
|
196
|
+
it('enqueue creates a pending approval record', async () => {
|
|
197
|
+
const store = createMockStore();
|
|
46
198
|
const queue = new ApprovalQueue(store);
|
|
47
199
|
const record = await queue.enqueue({
|
|
48
|
-
artifactId: 'art-
|
|
49
|
-
channel: '
|
|
50
|
-
riskLevel: '
|
|
51
|
-
confidence: 0.
|
|
52
|
-
|
|
200
|
+
artifactId: 'art-001',
|
|
201
|
+
channel: 'skill',
|
|
202
|
+
riskLevel: 'medium',
|
|
203
|
+
confidence: 0.85,
|
|
204
|
+
summary: 'Test approval',
|
|
205
|
+
}, '2026-05-17T00:00:00Z');
|
|
53
206
|
expect(record.status).toBe('pending');
|
|
54
|
-
expect(record.artifactId).toBe('art-
|
|
55
|
-
expect(record.channel).toBe('
|
|
56
|
-
expect(record.
|
|
57
|
-
expect(record.confidence).toBe(0.8);
|
|
207
|
+
expect(record.artifactId).toBe('art-001');
|
|
208
|
+
expect(record.channel).toBe('skill');
|
|
209
|
+
expect(record.confidence).toBe(0.85);
|
|
58
210
|
});
|
|
59
|
-
it('
|
|
60
|
-
const store =
|
|
211
|
+
it('getById returns the correct record', async () => {
|
|
212
|
+
const store = createMockStore();
|
|
61
213
|
const queue = new ApprovalQueue(store);
|
|
62
|
-
const
|
|
63
|
-
artifactId: 'art-
|
|
64
|
-
channel: '
|
|
65
|
-
riskLevel: '
|
|
66
|
-
}, '2026-05-
|
|
67
|
-
const
|
|
214
|
+
const created = await queue.enqueue({
|
|
215
|
+
artifactId: 'art-001',
|
|
216
|
+
channel: 'skill',
|
|
217
|
+
riskLevel: 'medium',
|
|
218
|
+
}, '2026-05-17T00:00:00Z');
|
|
219
|
+
const found = await queue.getById(created.approvalId);
|
|
220
|
+
expect(found).not.toBeNull();
|
|
221
|
+
expect(found?.approvalId).toBe(created.approvalId);
|
|
222
|
+
});
|
|
223
|
+
it('getById returns null for non-existent approval', async () => {
|
|
224
|
+
const store = createMockStore();
|
|
225
|
+
const queue = new ApprovalQueue(store);
|
|
226
|
+
const found = await queue.getById('non-existent');
|
|
227
|
+
expect(found).toBeNull();
|
|
228
|
+
});
|
|
229
|
+
it('approve changes status to approved', async () => {
|
|
230
|
+
const store = createMockStore();
|
|
231
|
+
const queue = new ApprovalQueue(store);
|
|
232
|
+
const created = await queue.enqueue({
|
|
233
|
+
artifactId: 'art-001',
|
|
234
|
+
channel: 'skill',
|
|
235
|
+
riskLevel: 'medium',
|
|
236
|
+
}, '2026-05-17T00:00:00Z');
|
|
237
|
+
const result = await queue.approve(created.approvalId, 'user-001', 'Looks good');
|
|
68
238
|
expect(result.ok).toBe(true);
|
|
69
239
|
if (result.ok) {
|
|
70
240
|
expect(result.record.status).toBe('approved');
|
|
71
|
-
expect(result.record.decidedBy).toBe('user-
|
|
72
|
-
expect(result.record.decisionNote).toBe('
|
|
241
|
+
expect(result.record.decidedBy).toBe('user-001');
|
|
242
|
+
expect(result.record.decisionNote).toBe('Looks good');
|
|
73
243
|
}
|
|
74
244
|
});
|
|
75
|
-
it('reject changes
|
|
76
|
-
const store =
|
|
245
|
+
it('reject changes status to rejected', async () => {
|
|
246
|
+
const store = createMockStore();
|
|
77
247
|
const queue = new ApprovalQueue(store);
|
|
78
|
-
const
|
|
79
|
-
artifactId: 'art-
|
|
80
|
-
channel: '
|
|
81
|
-
riskLevel: '
|
|
82
|
-
}, '2026-05-
|
|
83
|
-
const result = await queue.reject(
|
|
248
|
+
const created = await queue.enqueue({
|
|
249
|
+
artifactId: 'art-001',
|
|
250
|
+
channel: 'skill',
|
|
251
|
+
riskLevel: 'medium',
|
|
252
|
+
}, '2026-05-17T00:00:00Z');
|
|
253
|
+
const result = await queue.reject(created.approvalId, 'user-001', 'Not ready');
|
|
84
254
|
expect(result.ok).toBe(true);
|
|
85
255
|
if (result.ok) {
|
|
86
256
|
expect(result.record.status).toBe('rejected');
|
|
87
|
-
expect(result.record.
|
|
257
|
+
expect(result.record.decidedBy).toBe('user-001');
|
|
258
|
+
expect(result.record.rejectionReason).toBe('Not ready');
|
|
88
259
|
}
|
|
89
260
|
});
|
|
90
|
-
it('approve returns error for
|
|
91
|
-
const store =
|
|
261
|
+
it('approve returns error for non-existent approval', async () => {
|
|
262
|
+
const store = createMockStore();
|
|
92
263
|
const queue = new ApprovalQueue(store);
|
|
93
|
-
const
|
|
94
|
-
artifactId: 'art-1',
|
|
95
|
-
channel: 'code_tool_hook',
|
|
96
|
-
riskLevel: 'high',
|
|
97
|
-
}, '2026-05-18T00:00:00Z');
|
|
98
|
-
await queue.approve(record.approvalId, 'user-1');
|
|
99
|
-
const result = await queue.approve(record.approvalId, 'user-2');
|
|
264
|
+
const result = await queue.approve('non-existent', 'user-001');
|
|
100
265
|
expect(result.ok).toBe(false);
|
|
101
|
-
if (!result.ok
|
|
102
|
-
expect(result.
|
|
266
|
+
if (!result.ok) {
|
|
267
|
+
expect(result.error).toBe('not_found');
|
|
103
268
|
}
|
|
104
269
|
});
|
|
105
|
-
it('
|
|
106
|
-
const store =
|
|
270
|
+
it('approve returns error for already decided approval', async () => {
|
|
271
|
+
const store = createMockStore();
|
|
107
272
|
const queue = new ApprovalQueue(store);
|
|
108
|
-
const
|
|
109
|
-
artifactId: 'art-
|
|
110
|
-
channel: '
|
|
111
|
-
riskLevel: '
|
|
112
|
-
}, '2026-05-
|
|
113
|
-
|
|
114
|
-
|
|
273
|
+
const created = await queue.enqueue({
|
|
274
|
+
artifactId: 'art-001',
|
|
275
|
+
channel: 'skill',
|
|
276
|
+
riskLevel: 'medium',
|
|
277
|
+
}, '2026-05-17T00:00:00Z');
|
|
278
|
+
// First approve succeeds
|
|
279
|
+
await queue.approve(created.approvalId, 'user-001');
|
|
280
|
+
// Second approve fails
|
|
281
|
+
const result = await queue.approve(created.approvalId, 'user-002');
|
|
115
282
|
expect(result.ok).toBe(false);
|
|
116
|
-
if (!result.ok) {
|
|
117
|
-
expect(result.
|
|
283
|
+
if (!result.ok && result.error === 'already_decided') {
|
|
284
|
+
expect(result.status).toBe('approved');
|
|
118
285
|
}
|
|
119
286
|
});
|
|
120
|
-
it('
|
|
121
|
-
const store =
|
|
287
|
+
it('reject returns error for already decided approval', async () => {
|
|
288
|
+
const store = createMockStore();
|
|
122
289
|
const queue = new ApprovalQueue(store);
|
|
123
|
-
const
|
|
290
|
+
const created = await queue.enqueue({
|
|
291
|
+
artifactId: 'art-001',
|
|
292
|
+
channel: 'skill',
|
|
293
|
+
riskLevel: 'medium',
|
|
294
|
+
}, '2026-05-17T00:00:00Z');
|
|
295
|
+
// First approve succeeds
|
|
296
|
+
await queue.approve(created.approvalId, 'user-001');
|
|
297
|
+
// Reject fails because already approved
|
|
298
|
+
const result = await queue.reject(created.approvalId, 'user-002', 'Changed mind');
|
|
124
299
|
expect(result.ok).toBe(false);
|
|
125
300
|
if (!result.ok) {
|
|
126
|
-
expect(result.error).toBe('
|
|
301
|
+
expect(result.error).toBe('already_decided');
|
|
127
302
|
}
|
|
128
303
|
});
|
|
129
|
-
it('
|
|
130
|
-
const store =
|
|
304
|
+
it('listPending returns only pending approvals', async () => {
|
|
305
|
+
const store = createMockStore();
|
|
131
306
|
const queue = new ApprovalQueue(store);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
307
|
+
await queue.enqueue({
|
|
308
|
+
artifactId: 'art-001',
|
|
309
|
+
channel: 'skill',
|
|
310
|
+
riskLevel: 'medium',
|
|
311
|
+
}, '2026-05-17T00:00:00Z');
|
|
312
|
+
const created2 = await queue.enqueue({
|
|
313
|
+
artifactId: 'art-002',
|
|
314
|
+
channel: 'skill',
|
|
315
|
+
riskLevel: 'medium',
|
|
316
|
+
}, '2026-05-17T00:00:00Z');
|
|
317
|
+
// Approve one
|
|
318
|
+
await queue.approve(created2.approvalId, 'user-001');
|
|
137
319
|
const pending = await queue.listPending();
|
|
138
320
|
expect(pending).toHaveLength(1);
|
|
321
|
+
expect(pending[0]?.artifactId).toBe('art-001');
|
|
139
322
|
});
|
|
140
|
-
it('listPending returns
|
|
141
|
-
const store =
|
|
323
|
+
it('listPending with filter returns matching approvals', async () => {
|
|
324
|
+
const store = createMockStore();
|
|
142
325
|
const queue = new ApprovalQueue(store);
|
|
143
|
-
await queue.enqueue({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
326
|
+
await queue.enqueue({
|
|
327
|
+
artifactId: 'art-001',
|
|
328
|
+
channel: 'skill',
|
|
329
|
+
riskLevel: 'medium',
|
|
330
|
+
}, '2026-05-17T00:00:00Z');
|
|
331
|
+
await queue.enqueue({
|
|
332
|
+
artifactId: 'art-002',
|
|
333
|
+
channel: 'code_tool_hook',
|
|
334
|
+
riskLevel: 'high',
|
|
335
|
+
}, '2026-05-17T00:00:00Z');
|
|
336
|
+
const skillPending = await queue.listPending({ channel: 'skill' });
|
|
337
|
+
expect(skillPending).toHaveLength(1);
|
|
338
|
+
expect(skillPending[0]?.channel).toBe('skill');
|
|
339
|
+
const highRiskPending = await queue.listPending({ riskLevel: 'high' });
|
|
340
|
+
expect(highRiskPending).toHaveLength(1);
|
|
341
|
+
expect(highRiskPending[0]?.riskLevel).toBe('high');
|
|
150
342
|
});
|
|
151
|
-
it('
|
|
152
|
-
const store =
|
|
343
|
+
it('countByStatus returns correct counts', async () => {
|
|
344
|
+
const store = createMockStore();
|
|
153
345
|
const queue = new ApprovalQueue(store);
|
|
154
|
-
await queue.enqueue({
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
346
|
+
const created1 = await queue.enqueue({
|
|
347
|
+
artifactId: 'art-001',
|
|
348
|
+
channel: 'skill',
|
|
349
|
+
riskLevel: 'medium',
|
|
350
|
+
}, '2026-05-17T00:00:00Z');
|
|
351
|
+
const created2 = await queue.enqueue({
|
|
352
|
+
artifactId: 'art-002',
|
|
353
|
+
channel: 'skill',
|
|
354
|
+
riskLevel: 'medium',
|
|
355
|
+
}, '2026-05-17T00:00:00Z');
|
|
356
|
+
await queue.enqueue({
|
|
357
|
+
artifactId: 'art-003',
|
|
358
|
+
channel: 'skill',
|
|
359
|
+
riskLevel: 'medium',
|
|
360
|
+
}, '2026-05-17T00:00:00Z');
|
|
361
|
+
await queue.approve(created1.approvalId, 'user-001');
|
|
362
|
+
await queue.reject(created2.approvalId, 'user-001', 'Not good');
|
|
363
|
+
const stats = await queue.countByStatus();
|
|
364
|
+
expect(stats.pending).toBe(1);
|
|
365
|
+
expect(stats.approved).toBe(1);
|
|
366
|
+
expect(stats.rejected).toBe(1);
|
|
367
|
+
expect(stats.cancelled).toBe(0);
|
|
159
368
|
});
|
|
160
|
-
it('
|
|
161
|
-
const store =
|
|
369
|
+
it('resetToPending rolls back approved approval', async () => {
|
|
370
|
+
const store = createMockStore();
|
|
162
371
|
const queue = new ApprovalQueue(store);
|
|
163
|
-
await queue.enqueue({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
372
|
+
const created = await queue.enqueue({
|
|
373
|
+
artifactId: 'art-001',
|
|
374
|
+
channel: 'skill',
|
|
375
|
+
riskLevel: 'medium',
|
|
376
|
+
}, '2026-05-17T00:00:00Z');
|
|
377
|
+
await queue.approve(created.approvalId, 'user-001');
|
|
378
|
+
const result = await queue.resetToPending(created.approvalId);
|
|
379
|
+
expect(result.ok).toBe(true);
|
|
380
|
+
const found = await queue.getById(created.approvalId);
|
|
381
|
+
expect(found?.status).toBe('pending');
|
|
169
382
|
});
|
|
170
|
-
it('
|
|
171
|
-
const store =
|
|
383
|
+
it('resetToPending returns error for non-existent approval', async () => {
|
|
384
|
+
const store = createMockStore();
|
|
172
385
|
const queue = new ApprovalQueue(store);
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
const queue = new ApprovalQueue(store);
|
|
194
|
-
const result = await queue.resetToPending('nonexistent');
|
|
195
|
-
expect(result.ok).toBe(false);
|
|
196
|
-
if (!result.ok)
|
|
197
|
-
expect(result.error).toBe('not_found');
|
|
198
|
-
});
|
|
199
|
-
it('returns not_approved for pending record', async () => {
|
|
200
|
-
const store = new MemoryApprovalQueueStore();
|
|
201
|
-
const queue = new ApprovalQueue(store);
|
|
202
|
-
const record = await queue.enqueue({ artifactId: 'art-1', channel: 'prompt', riskLevel: 'low' }, '2026-05-18T00:00:00Z');
|
|
203
|
-
const result = await queue.resetToPending(record.approvalId);
|
|
204
|
-
expect(result.ok).toBe(false);
|
|
205
|
-
if (!result.ok)
|
|
206
|
-
expect(result.error).toBe('not_approved');
|
|
207
|
-
});
|
|
208
|
-
it('returns not_approved for rejected record', async () => {
|
|
209
|
-
const store = new MemoryApprovalQueueStore();
|
|
210
|
-
const queue = new ApprovalQueue(store);
|
|
211
|
-
const record = await queue.enqueue({ artifactId: 'art-1', channel: 'prompt', riskLevel: 'low' }, '2026-05-18T00:00:00Z');
|
|
212
|
-
await queue.reject(record.approvalId, 'user-1', 'bad');
|
|
213
|
-
const result = await queue.resetToPending(record.approvalId);
|
|
214
|
-
expect(result.ok).toBe(false);
|
|
215
|
-
if (!result.ok)
|
|
216
|
-
expect(result.error).toBe('not_approved');
|
|
217
|
-
});
|
|
218
|
-
it('allows re-approval after rollback', async () => {
|
|
219
|
-
const store = new MemoryApprovalQueueStore();
|
|
220
|
-
const queue = new ApprovalQueue(store);
|
|
221
|
-
const record = await queue.enqueue({ artifactId: 'art-1', channel: 'prompt', riskLevel: 'low' }, '2026-05-18T00:00:00Z');
|
|
222
|
-
await queue.approve(record.approvalId, 'user-1', 'first');
|
|
223
|
-
await queue.resetToPending(record.approvalId);
|
|
224
|
-
const reApprove = await queue.approve(record.approvalId, 'user-2', 'retry');
|
|
225
|
-
expect(reApprove.ok).toBe(true);
|
|
226
|
-
if (reApprove.ok) {
|
|
227
|
-
expect(reApprove.record.status).toBe('approved');
|
|
228
|
-
expect(reApprove.record.decidedBy).toBe('user-2');
|
|
229
|
-
}
|
|
230
|
-
});
|
|
386
|
+
const result = await queue.resetToPending('non-existent');
|
|
387
|
+
expect(result.ok).toBe(false);
|
|
388
|
+
if (!result.ok) {
|
|
389
|
+
expect(result.error).toBe('not_found');
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
it('resetToPending returns error for non-approved approval', async () => {
|
|
393
|
+
const store = createMockStore();
|
|
394
|
+
const queue = new ApprovalQueue(store);
|
|
395
|
+
const created = await queue.enqueue({
|
|
396
|
+
artifactId: 'art-001',
|
|
397
|
+
channel: 'skill',
|
|
398
|
+
riskLevel: 'medium',
|
|
399
|
+
}, '2026-05-17T00:00:00Z');
|
|
400
|
+
// Still pending, not approved
|
|
401
|
+
const result = await queue.resetToPending(created.approvalId);
|
|
402
|
+
expect(result.ok).toBe(false);
|
|
403
|
+
if (!result.ok) {
|
|
404
|
+
expect(result.error).toBe('not_approved');
|
|
405
|
+
}
|
|
231
406
|
});
|
|
232
407
|
});
|
|
233
408
|
//# sourceMappingURL=approval-queue.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval-queue.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/activation/__tests__/approval-queue.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EA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,CAAC,UAAU,CAAC,CAAC;gBACjD,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"approval-queue.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/activation/__tests__/approval-queue.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EACL,mBAAmB,EACnB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAU3B,OAAO,EACL,mCAAmC,EACnC,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAG7B,iFAAiF;AAEjF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvD,MAAM,C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