create-principles-disciple 1.85.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/__tests__/pd-config-workspace.test.d.ts +2 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-workspace.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-workspace.test.js +154 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-workspace.test.js.map +1 -0
- package/core/dist/runtime-v2/config/index.d.ts +1 -1
- package/core/dist/runtime-v2/config/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/index.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 +17 -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 +10 -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 +23 -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 +69 -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 +21 -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/resolve-workspace.d.ts +15 -3
- package/pd-cli/dist/resolve-workspace.d.ts.map +1 -1
- package/pd-cli/dist/resolve-workspace.js +54 -8
- package/pd-cli/dist/resolve-workspace.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 +20 -0
- package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.js +113 -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
|
@@ -156,7 +156,7 @@ export declare const FullTracePayloadV2Schema: import("@sinclair/typebox").TObje
|
|
|
156
156
|
}>>;
|
|
157
157
|
timeline: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
158
158
|
at: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
159
|
-
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"
|
|
159
|
+
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"tool_call" | "tool_result" | "assistant_message" | "user_message" | "system_event" | "unknown">[]>;
|
|
160
160
|
summary: import("@sinclair/typebox").TString;
|
|
161
161
|
rawPreview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
162
162
|
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
@@ -170,12 +170,12 @@ export declare const TraceSourceRefSchema: import("@sinclair/typebox").TObject<{
|
|
|
170
170
|
}>;
|
|
171
171
|
export declare const TraceTimelineEntrySchema: import("@sinclair/typebox").TObject<{
|
|
172
172
|
at: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
173
|
-
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"
|
|
173
|
+
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"tool_call" | "tool_result" | "assistant_message" | "user_message" | "system_event" | "unknown">[]>;
|
|
174
174
|
summary: import("@sinclair/typebox").TString;
|
|
175
175
|
rawPreview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
176
176
|
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
177
177
|
}>;
|
|
178
|
-
export declare const TraceEventKindSchema: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"
|
|
178
|
+
export declare const TraceEventKindSchema: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"tool_call" | "tool_result" | "assistant_message" | "user_message" | "system_event" | "unknown">[]>;
|
|
179
179
|
export declare const SourceRefKindSchema: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"run" | "task" | "artifact" | "event">[]>;
|
|
180
180
|
export type FullTracePayloadV2 = FullTracePayloadV2Type;
|
|
181
181
|
export type TraceSourceRef = TraceSourceRefType;
|
|
@@ -216,7 +216,6 @@ export declare const ContextPayloadSchema: import("@sinclair/typebox").TObject<{
|
|
|
216
216
|
toolResultSummary: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
217
217
|
eventType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
218
218
|
}>>;
|
|
219
|
-
eventSummaries: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>>;
|
|
220
219
|
artifactRefs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
221
220
|
ambiguityNotes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
222
221
|
summary: import("@sinclair/typebox").TString;
|
|
@@ -254,7 +253,6 @@ export declare const DiagnosticianContextPayloadSchema: import("@sinclair/typebo
|
|
|
254
253
|
toolResultSummary: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
255
254
|
eventType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
256
255
|
}>>;
|
|
257
|
-
eventSummaries: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>>;
|
|
258
256
|
ambiguityNotes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
259
257
|
fullTrace: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
260
258
|
painContext: import("@sinclair/typebox").TObject<{
|
|
@@ -285,7 +283,7 @@ export declare const DiagnosticianContextPayloadSchema: import("@sinclair/typebo
|
|
|
285
283
|
}>>;
|
|
286
284
|
timeline: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
287
285
|
at: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
288
|
-
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"
|
|
286
|
+
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"tool_call" | "tool_result" | "assistant_message" | "user_message" | "system_event" | "unknown">[]>;
|
|
289
287
|
summary: import("@sinclair/typebox").TString;
|
|
290
288
|
rawPreview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
291
289
|
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-payload.d.ts","sourceRoot":"","sources":["../../src/runtime-v2/context-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAML,wBAAwB,EACxB,wBAAwB,EACxB,sBAAs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AAM,MAAM,yBAAyB,GAAG,6BAA6B,CAAC;AACtE,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAClE,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE9C,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,iBAAiB,EACjB,gBAAgB,GACjB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIjE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
|
|
@@ -119,7 +119,6 @@ export const ContextPayloadSchema = Type.Object({
|
|
|
119
119
|
targetAgent: Type.Optional(Type.String({ minLength: 1 })),
|
|
120
120
|
diagnosisTarget: Type.Optional(DiagnosisTargetSchema),
|
|
121
121
|
conversationWindow: Type.Array(HistoryQueryEntrySchema),
|
|
122
|
-
eventSummaries: Type.Optional(Type.Array(Type.Record(Type.String(), Type.Unknown()))),
|
|
123
122
|
artifactRefs: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
124
123
|
ambiguityNotes: Type.Optional(Type.Array(Type.String())),
|
|
125
124
|
summary: Type.String({ minLength: 1 }),
|
|
@@ -133,7 +132,6 @@ export const DiagnosticianContextPayloadSchema = Type.Object({
|
|
|
133
132
|
sourceRefs: Type.Array(Type.String({ minLength: 1 })),
|
|
134
133
|
diagnosisTarget: DiagnosisTargetSchema,
|
|
135
134
|
conversationWindow: Type.Array(HistoryQueryEntrySchema),
|
|
136
|
-
eventSummaries: Type.Optional(Type.Array(Type.Record(Type.String(), Type.Unknown()))),
|
|
137
135
|
ambiguityNotes: Type.Optional(Type.Array(Type.String())),
|
|
138
136
|
fullTrace: Type.Optional(Type.Union([FullTracePayloadSchema, FullTracePayloadV2SchemaImport, Type.Null()])),
|
|
139
137
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-payload.js","sourceRoot":"","sources":["../../src/runtime-v2/context-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,wBAAwB,IAAI,8BAA8B,EAC1D,oBAAoB,IAAI,0BAA0B,EAClD,wBAAwB,IAAI,8BAA8B,EAC1D,oBAAoB,IAAI,0BAA0B,EAClD,mBAAmB,IAAI,yBAAyB,EAChD,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAYlC,oDAAoD;AAEpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACjC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;QACf,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;KACvB,CAAC;IACF,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACtC,iBAAiB,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAC/C,SA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E,CAAC;IACrC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAC3C,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IACrD,eAAe,EAAE,qBAAqB;IACtC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC;IACvD,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACxD,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,sBAAsB,EAAE,8BAA8B,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;CAC5G,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-axiom-block.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/core-principles/__tests__/core-axiom-block.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for core-axiom-block.ts — shared CORE_PRINCIPLES injection utility.
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect } from 'vitest';
|
|
5
|
+
import { formatCorePrinciplesList, buildCoreAxiomBlock, } from '../core-axiom-block.js';
|
|
6
|
+
import { CORE_PRINCIPLES } from '../core-principle-registry.js';
|
|
7
|
+
describe('formatCorePrinciplesList', () => {
|
|
8
|
+
it('formats all 10 principles as "T-XX: statement" lines', () => {
|
|
9
|
+
const result = formatCorePrinciplesList();
|
|
10
|
+
const lines = result.split('\n');
|
|
11
|
+
expect(lines).toHaveLength(10);
|
|
12
|
+
expect(lines[0]).toMatch(/^T-01: /);
|
|
13
|
+
expect(lines[9]).toMatch(/^T-10: /);
|
|
14
|
+
});
|
|
15
|
+
it('uses English statements by default', () => {
|
|
16
|
+
const result = formatCorePrinciplesList();
|
|
17
|
+
expect(result).toContain('Understand the structure first');
|
|
18
|
+
});
|
|
19
|
+
it('uses Chinese statements when outputLanguage is zh-CN', () => {
|
|
20
|
+
const result = formatCorePrinciplesList('zh-CN');
|
|
21
|
+
expect(result).toContain('在做出变更前,先理解其结构');
|
|
22
|
+
});
|
|
23
|
+
it('uses English statements when outputLanguage is en', () => {
|
|
24
|
+
const result = formatCorePrinciplesList('en');
|
|
25
|
+
expect(result).toContain('Understand the structure first');
|
|
26
|
+
expect(result).not.toContain('在做出变更前');
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
describe('buildCoreAxiomBlock', () => {
|
|
30
|
+
it('returns empty string when coreGrounding is false', () => {
|
|
31
|
+
const result = buildCoreAxiomBlock({ coreGrounding: false });
|
|
32
|
+
expect(result).toBe('');
|
|
33
|
+
});
|
|
34
|
+
it('returns empty string when coreGrounding is undefined', () => {
|
|
35
|
+
const result = buildCoreAxiomBlock({});
|
|
36
|
+
expect(result).toBe('');
|
|
37
|
+
});
|
|
38
|
+
it('returns fallback when coreGrounding is false and fallback is provided', () => {
|
|
39
|
+
const result = buildCoreAxiomBlock({ coreGrounding: false, fallback: '\n' });
|
|
40
|
+
expect(result).toBe('\n');
|
|
41
|
+
});
|
|
42
|
+
it('returns block with default title when coreGrounding is true', () => {
|
|
43
|
+
const result = buildCoreAxiomBlock({ coreGrounding: true });
|
|
44
|
+
expect(result).toContain('CORE AXIOMS:');
|
|
45
|
+
});
|
|
46
|
+
it('includes default instruction about fabricated IDs', () => {
|
|
47
|
+
const result = buildCoreAxiomBlock({ coreGrounding: true });
|
|
48
|
+
expect(result).toContain('Fabricating IDs not in this');
|
|
49
|
+
expect(result).toContain('validation failure');
|
|
50
|
+
});
|
|
51
|
+
it('includes all 10 core principles', () => {
|
|
52
|
+
const result = buildCoreAxiomBlock({ coreGrounding: true });
|
|
53
|
+
for (const p of CORE_PRINCIPLES) {
|
|
54
|
+
expect(result).toContain(p.id + ':');
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
it('uses custom section title', () => {
|
|
58
|
+
const result = buildCoreAxiomBlock({
|
|
59
|
+
coreGrounding: true,
|
|
60
|
+
sectionTitle: 'PHASE 3.5 — Core Axiom Grounding:',
|
|
61
|
+
});
|
|
62
|
+
expect(result).toContain('PHASE 3.5 — Core Axiom Grounding:');
|
|
63
|
+
expect(result).not.toContain('CORE AXIOMS:');
|
|
64
|
+
});
|
|
65
|
+
it('uses custom instruction', () => {
|
|
66
|
+
const result = buildCoreAxiomBlock({
|
|
67
|
+
coreGrounding: true,
|
|
68
|
+
instruction: 'Custom instruction text here.',
|
|
69
|
+
});
|
|
70
|
+
expect(result).toContain('Custom instruction text here.');
|
|
71
|
+
expect(result).not.toContain('Fabricating IDs');
|
|
72
|
+
});
|
|
73
|
+
it('omits instruction when set to empty string', () => {
|
|
74
|
+
const result = buildCoreAxiomBlock({
|
|
75
|
+
coreGrounding: true,
|
|
76
|
+
instruction: '',
|
|
77
|
+
});
|
|
78
|
+
expect(result).not.toContain('Fabricating IDs');
|
|
79
|
+
// Should still have the principles list
|
|
80
|
+
expect(result).toContain('T-01:');
|
|
81
|
+
});
|
|
82
|
+
it('uses Chinese statements when outputLanguage is zh-CN', () => {
|
|
83
|
+
const result = buildCoreAxiomBlock({ coreGrounding: true, outputLanguage: 'zh-CN' });
|
|
84
|
+
expect(result).toContain('在做出变更前,先理解其结构');
|
|
85
|
+
});
|
|
86
|
+
it('block starts with newline for easy insertion into prompts', () => {
|
|
87
|
+
const result = buildCoreAxiomBlock({ coreGrounding: true });
|
|
88
|
+
expect(result.startsWith('\n')).toBe(true);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=core-axiom-block.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-axiom-block.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/core-principles/__tests__/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,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAChD,wCAAwC;QACxC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC;QACrF,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-principle-registry.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/core-principles/__tests__/core-principle-registry.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { Value } from '@sinclair/typebox/value';
|
|
3
|
+
import { CORE_PRINCIPLES, CORE_PRINCIPLE_IDS, isCorePrincipleId, getCorePrinciple, CorePrincipleSchema, } from '../core-principle-registry.js';
|
|
4
|
+
describe('Core Principle Registry', () => {
|
|
5
|
+
it('exports exactly 10 core principles', () => {
|
|
6
|
+
expect(CORE_PRINCIPLES).toHaveLength(10);
|
|
7
|
+
});
|
|
8
|
+
it('contains T-01 through T-10', () => {
|
|
9
|
+
const ids = CORE_PRINCIPLES.map(p => p.id);
|
|
10
|
+
expect(ids).toEqual(['T-01', 'T-02', 'T-03', 'T-04', 'T-05', 'T-06', 'T-07', 'T-08', 'T-09', 'T-10']);
|
|
11
|
+
});
|
|
12
|
+
it('CORE_PRINCIPLE_IDS matches principle ids', () => {
|
|
13
|
+
expect(CORE_PRINCIPLE_IDS).toEqual(CORE_PRINCIPLES.map(p => p.id));
|
|
14
|
+
});
|
|
15
|
+
it('isCorePrincipleId returns true for valid ids', () => {
|
|
16
|
+
expect(isCorePrincipleId('T-01')).toBe(true);
|
|
17
|
+
expect(isCorePrincipleId('T-10')).toBe(true);
|
|
18
|
+
});
|
|
19
|
+
it('isCorePrincipleId returns false for invalid ids', () => {
|
|
20
|
+
expect(isCorePrincipleId('T-99')).toBe(false);
|
|
21
|
+
expect(isCorePrincipleId('')).toBe(false);
|
|
22
|
+
expect(isCorePrincipleId('t-01')).toBe(false); // case-sensitive
|
|
23
|
+
});
|
|
24
|
+
it('getCorePrinciple returns principle for valid id', () => {
|
|
25
|
+
const p = getCorePrinciple('T-01');
|
|
26
|
+
expect(p).toBeDefined();
|
|
27
|
+
expect(p?.id).toBe('T-01');
|
|
28
|
+
expect(p?.name).toBe('Survey Before Acting');
|
|
29
|
+
});
|
|
30
|
+
it('getCorePrinciple returns undefined for invalid id', () => {
|
|
31
|
+
expect(getCorePrinciple('T-99')).toBeUndefined();
|
|
32
|
+
});
|
|
33
|
+
it('registry is frozen (immutable)', () => {
|
|
34
|
+
expect(Object.isFrozen(CORE_PRINCIPLES)).toBe(true);
|
|
35
|
+
// Attempting mutation should not change the value
|
|
36
|
+
expect(() => {
|
|
37
|
+
CORE_PRINCIPLES.push(Object.freeze({ id: 'T-99', name: 'Fake', nameZh: '假', statement: 'Fake', statementZh: '假' }));
|
|
38
|
+
}).toThrow();
|
|
39
|
+
});
|
|
40
|
+
it('each principle has required fields', () => {
|
|
41
|
+
for (const p of CORE_PRINCIPLES) {
|
|
42
|
+
expect(p.id).toMatch(/^T-\d{2}$/);
|
|
43
|
+
expect(typeof p.name).toBe('string');
|
|
44
|
+
expect(p.name.length).toBeGreaterThan(0);
|
|
45
|
+
expect(typeof p.nameZh).toBe('string');
|
|
46
|
+
expect(p.nameZh.length).toBeGreaterThan(0);
|
|
47
|
+
expect(typeof p.statement).toBe('string');
|
|
48
|
+
expect(p.statement.length).toBeGreaterThan(0);
|
|
49
|
+
expect(typeof p.statementZh).toBe('string');
|
|
50
|
+
expect(p.statementZh.length).toBeGreaterThan(0);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
it('each principle has bilingual (EN+ZH) fields', () => {
|
|
54
|
+
for (const p of CORE_PRINCIPLES) {
|
|
55
|
+
// ZH fields must be non-empty
|
|
56
|
+
expect(p.nameZh.length).toBeGreaterThan(0);
|
|
57
|
+
expect(p.statementZh.length).toBeGreaterThan(0);
|
|
58
|
+
// ZH should differ from EN (not just a copy)
|
|
59
|
+
expect(p.nameZh).not.toEqual(p.name);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
it('CorePrincipleSchema validates a known principle', () => {
|
|
63
|
+
const t01 = getCorePrinciple('T-01');
|
|
64
|
+
expect(t01).toBeDefined();
|
|
65
|
+
expect(Value.Check(CorePrincipleSchema, t01)).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
it('CorePrincipleSchema rejects invalid data', () => {
|
|
68
|
+
expect(Value.Check(CorePrincipleSchema, { id: 123, name: null })).toBe(false);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=core-principle-registry.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-principle-registry.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/core-principles/__tests__/core-principle-registry.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EACL,eA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H,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,GAAG,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC1B,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-fabricated-ids.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/core-principles/__tests__/strip-fabricated-ids.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { stripFabricatedCorePrincipleIds } from '../strip-fabricated-ids.js';
|
|
3
|
+
describe('stripFabricatedCorePrincipleIds', () => {
|
|
4
|
+
it('strips fabricated sourcePrincipleId (pri-unknown)', () => {
|
|
5
|
+
const output = { sourcePrincipleId: 'pri-unknown', other: 'value' };
|
|
6
|
+
stripFabricatedCorePrincipleIds(output);
|
|
7
|
+
expect(Object.hasOwn(output, 'sourcePrincipleId')).toBe(false);
|
|
8
|
+
expect(output.other).toBe('value');
|
|
9
|
+
});
|
|
10
|
+
it('strips fabricated sourcePrincipleId (pri-000)', () => {
|
|
11
|
+
const output = { sourcePrincipleId: 'pri-000' };
|
|
12
|
+
stripFabricatedCorePrincipleIds(output);
|
|
13
|
+
expect(Object.hasOwn(output, 'sourcePrincipleId')).toBe(false);
|
|
14
|
+
});
|
|
15
|
+
it('strips fabricated sourcePrincipleId (pri-999)', () => {
|
|
16
|
+
const output = { sourcePrincipleId: 'pri-999' };
|
|
17
|
+
stripFabricatedCorePrincipleIds(output);
|
|
18
|
+
expect(Object.hasOwn(output, 'sourcePrincipleId')).toBe(false);
|
|
19
|
+
});
|
|
20
|
+
it('strips fabricated sourcePrincipleId (T-99 — format-valid but not in registry)', () => {
|
|
21
|
+
const output = { sourcePrincipleId: 'T-99' };
|
|
22
|
+
stripFabricatedCorePrincipleIds(output);
|
|
23
|
+
expect(Object.hasOwn(output, 'sourcePrincipleId')).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
it('preserves valid sourcePrincipleId (T-01)', () => {
|
|
26
|
+
const output = { sourcePrincipleId: 'T-01', other: 'value' };
|
|
27
|
+
stripFabricatedCorePrincipleIds(output);
|
|
28
|
+
expect(output.sourcePrincipleId).toBe('T-01');
|
|
29
|
+
});
|
|
30
|
+
it('preserves valid sourcePrincipleId (T-10)', () => {
|
|
31
|
+
const output = { sourcePrincipleId: 'T-10' };
|
|
32
|
+
stripFabricatedCorePrincipleIds(output);
|
|
33
|
+
expect(output.sourcePrincipleId).toBe('T-10');
|
|
34
|
+
});
|
|
35
|
+
it('does nothing when sourcePrincipleId is absent', () => {
|
|
36
|
+
const output = { other: 'value' };
|
|
37
|
+
stripFabricatedCorePrincipleIds(output);
|
|
38
|
+
expect(Object.hasOwn(output, 'sourcePrincipleId')).toBe(false);
|
|
39
|
+
expect(output.other).toBe('value');
|
|
40
|
+
});
|
|
41
|
+
it('does not strip non-string sourcePrincipleId (lets validation handle it)', () => {
|
|
42
|
+
const output = { sourcePrincipleId: 123 };
|
|
43
|
+
stripFabricatedCorePrincipleIds(output);
|
|
44
|
+
// Non-string values are left for validation to reject (Runtime Contract Rule 3)
|
|
45
|
+
expect(output.sourcePrincipleId).toBe(123);
|
|
46
|
+
});
|
|
47
|
+
it('strips empty string sourcePrincipleId (not in registry)', () => {
|
|
48
|
+
const output = { sourcePrincipleId: '' };
|
|
49
|
+
stripFabricatedCorePrincipleIds(output);
|
|
50
|
+
// Empty string is not a valid core principle ID — stripped so validation
|
|
51
|
+
// can detect the missing field and fail loud (Runtime Contract Rule 3)
|
|
52
|
+
expect(Object.hasOwn(output, 'sourcePrincipleId')).toBe(false);
|
|
53
|
+
});
|
|
54
|
+
it('is a no-op for null', () => {
|
|
55
|
+
expect(() => stripFabricatedCorePrincipleIds(null)).not.toThrow();
|
|
56
|
+
});
|
|
57
|
+
it('is a no-op for undefined', () => {
|
|
58
|
+
expect(() => stripFabricatedCorePrincipleIds(undefined)).not.toThrow();
|
|
59
|
+
});
|
|
60
|
+
it('is a no-op for primitives', () => {
|
|
61
|
+
expect(() => stripFabricatedCorePrincipleIds('string')).not.toThrow();
|
|
62
|
+
expect(() => stripFabricatedCorePrincipleIds(42)).not.toThrow();
|
|
63
|
+
expect(() => stripFabricatedCorePrincipleIds(true)).not.toThrow();
|
|
64
|
+
});
|
|
65
|
+
it('is a no-op for arrays', () => {
|
|
66
|
+
const arr = [{ sourcePrincipleId: 'pri-unknown' }];
|
|
67
|
+
stripFabricatedCorePrincipleIds(arr);
|
|
68
|
+
// Arrays are not LLM output objects — skip
|
|
69
|
+
expect(arr[0]?.sourcePrincipleId).toBe('pri-unknown');
|
|
70
|
+
});
|
|
71
|
+
it('handles object with no own properties (prototype)', () => {
|
|
72
|
+
const obj = Object.create({ sourcePrincipleId: 'pri-unknown' });
|
|
73
|
+
stripFabricatedCorePrincipleIds(obj);
|
|
74
|
+
// Object.hasOwn returns false for inherited properties — no stripping
|
|
75
|
+
expect(Object.hasOwn(obj, 'sourcePrincipleId')).toBe(false);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=strip-fabricated-ids.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-fabricated-ids.test.js","sourceRoot":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,GAAG,EAAE;QAC/B,MAAM,GAAG,GAAG,CAAC,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC,CAAC;QACnD,+BAA+B,CAAC,GAAG,CAAC,CAAC;QACrC,2CAA2C;QAC3C,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC,CAAC;QAChE,+BAA+B,CAAC,GAAG,CAAC,CAAC;QACrC,sEAAsE;QACtE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Axiom Block Builder — shared prompt section for CORE_PRINCIPLES injection.
|
|
3
|
+
*
|
|
4
|
+
* Provides a single, consistent way to inject the T-01..T-10 core axiom list
|
|
5
|
+
* into any prompt builder. Used by both the diagnostician pipeline (rootcause,
|
|
6
|
+
* distiller) and the internalization pipeline (dreamer, philosopher, scribe, etc.).
|
|
7
|
+
*
|
|
8
|
+
* ## Design
|
|
9
|
+
*
|
|
10
|
+
* - `formatCorePrinciplesList()` — low-level: just the formatted list lines
|
|
11
|
+
* - `buildCoreAxiomBlock()` — high-level: conditional block with header + instruction
|
|
12
|
+
*
|
|
13
|
+
* Both support bilingual output via `outputLanguage`.
|
|
14
|
+
*/
|
|
15
|
+
import type { OutputLanguage } from '../language-directive.js';
|
|
16
|
+
export interface CoreAxiomBlockOptions {
|
|
17
|
+
/** Whether to include the core axioms section (default: false). */
|
|
18
|
+
coreGrounding?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Section title. Defaults to 'CORE AXIOMS:'.
|
|
21
|
+
* Override for context-specific headers (e.g. 'PHASE 3.5 — Core Axiom Grounding:').
|
|
22
|
+
*/
|
|
23
|
+
sectionTitle?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Instruction text after the title, before the list.
|
|
26
|
+
* Defaults to a generic instruction about referencing axiom IDs.
|
|
27
|
+
* Set to '' to omit.
|
|
28
|
+
*/
|
|
29
|
+
instruction?: string;
|
|
30
|
+
/** Output language for bilingual principle statements. */
|
|
31
|
+
outputLanguage?: OutputLanguage;
|
|
32
|
+
/** Fallback string when coreGrounding is false (default: ''). */
|
|
33
|
+
fallback?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Format the CORE_PRINCIPLES list as a newline-separated string.
|
|
37
|
+
*
|
|
38
|
+
* Each line: `T-XX: <statement>`
|
|
39
|
+
* When `outputLanguage` is 'zh-CN', uses `statementZh` instead of `statement`.
|
|
40
|
+
*
|
|
41
|
+
* @param outputLanguage - Optional language override for bilingual output.
|
|
42
|
+
* @returns Formatted list string (e.g. "T-01: Understand the structure first...\nT-02: ...")
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatCorePrinciplesList(outputLanguage?: OutputLanguage): string;
|
|
45
|
+
/**
|
|
46
|
+
* Build a conditional core axiom block for prompt injection.
|
|
47
|
+
*
|
|
48
|
+
* When `coreGrounding` is true, returns a formatted block containing:
|
|
49
|
+
* - Section title
|
|
50
|
+
* - Instruction text
|
|
51
|
+
* - Formatted principle list
|
|
52
|
+
*
|
|
53
|
+
* When `coreGrounding` is false/undefined, returns `fallback` (default: empty string).
|
|
54
|
+
*
|
|
55
|
+
* ## Usage
|
|
56
|
+
*
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // In a prompt builder:
|
|
59
|
+
* const axiomBlock = buildCoreAxiomBlock({ coreGrounding: true, outputLanguage: 'zh-CN' });
|
|
60
|
+
* return `...existing prompt...\n${axiomBlock}\n...rest...`;
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param opts - Block options (see CoreAxiomBlockOptions).
|
|
64
|
+
* @returns Formatted block string, or fallback when coreGrounding is off.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildCoreAxiomBlock(opts?: CoreAxiomBlockOptions): string;
|
|
67
|
+
//# sourceMappingURL=core-axiom-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-axiom-block.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/core-principles/core-axiom-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,WAAW,qBAAqB;IACpC,mEAAmE;IACnE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAMhF;AAUD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,qBAA0B,GAAG,MAAM,CA4B5E"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Axiom Block Builder — shared prompt section for CORE_PRINCIPLES injection.
|
|
3
|
+
*
|
|
4
|
+
* Provides a single, consistent way to inject the T-01..T-10 core axiom list
|
|
5
|
+
* into any prompt builder. Used by both the diagnostician pipeline (rootcause,
|
|
6
|
+
* distiller) and the internalization pipeline (dreamer, philosopher, scribe, etc.).
|
|
7
|
+
*
|
|
8
|
+
* ## Design
|
|
9
|
+
*
|
|
10
|
+
* - `formatCorePrinciplesList()` — low-level: just the formatted list lines
|
|
11
|
+
* - `buildCoreAxiomBlock()` — high-level: conditional block with header + instruction
|
|
12
|
+
*
|
|
13
|
+
* Both support bilingual output via `outputLanguage`.
|
|
14
|
+
*/
|
|
15
|
+
import { CORE_PRINCIPLES } from './core-principle-registry.js';
|
|
16
|
+
// ── Low-level: formatted list ────────────────────────────────────────────────
|
|
17
|
+
/**
|
|
18
|
+
* Format the CORE_PRINCIPLES list as a newline-separated string.
|
|
19
|
+
*
|
|
20
|
+
* Each line: `T-XX: <statement>`
|
|
21
|
+
* When `outputLanguage` is 'zh-CN', uses `statementZh` instead of `statement`.
|
|
22
|
+
*
|
|
23
|
+
* @param outputLanguage - Optional language override for bilingual output.
|
|
24
|
+
* @returns Formatted list string (e.g. "T-01: Understand the structure first...\nT-02: ...")
|
|
25
|
+
*/
|
|
26
|
+
export function formatCorePrinciplesList(outputLanguage) {
|
|
27
|
+
const useZh = outputLanguage === 'zh-CN';
|
|
28
|
+
return CORE_PRINCIPLES.map(p => {
|
|
29
|
+
const statement = useZh && p.statementZh ? p.statementZh : p.statement;
|
|
30
|
+
return `${p.id}: ${statement}`;
|
|
31
|
+
}).join('\n');
|
|
32
|
+
}
|
|
33
|
+
// ── High-level: conditional block ────────────────────────────────────────────
|
|
34
|
+
/** Default instruction when none is provided. */
|
|
35
|
+
const DEFAULT_INSTRUCTION = 'The following core axioms are the system\'s foundational behavioral principles.\n' +
|
|
36
|
+
'You MUST only reference axiom IDs from this list. Fabricating IDs not in this\n' +
|
|
37
|
+
'list will cause validation failure.';
|
|
38
|
+
/**
|
|
39
|
+
* Build a conditional core axiom block for prompt injection.
|
|
40
|
+
*
|
|
41
|
+
* When `coreGrounding` is true, returns a formatted block containing:
|
|
42
|
+
* - Section title
|
|
43
|
+
* - Instruction text
|
|
44
|
+
* - Formatted principle list
|
|
45
|
+
*
|
|
46
|
+
* When `coreGrounding` is false/undefined, returns `fallback` (default: empty string).
|
|
47
|
+
*
|
|
48
|
+
* ## Usage
|
|
49
|
+
*
|
|
50
|
+
* ```typescript
|
|
51
|
+
* // In a prompt builder:
|
|
52
|
+
* const axiomBlock = buildCoreAxiomBlock({ coreGrounding: true, outputLanguage: 'zh-CN' });
|
|
53
|
+
* return `...existing prompt...\n${axiomBlock}\n...rest...`;
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @param opts - Block options (see CoreAxiomBlockOptions).
|
|
57
|
+
* @returns Formatted block string, or fallback when coreGrounding is off.
|
|
58
|
+
*/
|
|
59
|
+
export function buildCoreAxiomBlock(opts = {}) {
|
|
60
|
+
const { coreGrounding, sectionTitle = 'CORE AXIOMS:', instruction = DEFAULT_INSTRUCTION, outputLanguage, fallback = '', } = opts;
|
|
61
|
+
if (!coreGrounding) {
|
|
62
|
+
return fallback;
|
|
63
|
+
}
|
|
64
|
+
const principlesList = formatCorePrinciplesList(outputLanguage);
|
|
65
|
+
const parts = [
|
|
66
|
+
`\n${sectionTitle}`,
|
|
67
|
+
];
|
|
68
|
+
if (instruction) {
|
|
69
|
+
parts.push(instruction);
|
|
70
|
+
}
|
|
71
|
+
parts.push('');
|
|
72
|
+
parts.push(principlesList);
|
|
73
|
+
parts.push('');
|
|
74
|
+
return parts.join('\n');
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=core-axiom-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-axiom-block.js","sourceRoot":"","sources":["../../../src/runtime-v2/core-principles/core-axiom-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAyB/D,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CAAC,cAA+B;IACtE,MAAM,KAAK,GAAG,cAAc,KAAK,OAAO,CAAC;IACzC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QAC7B,MAAM,SAAS,GAAG,KAAK,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvE,OAAO,GAAG,CAAC,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,gFAAgF;AAEhF,iDAAiD;AACjD,MAAM,mBAAmB,GACvB,mFAAmF;IACnF,iFAAiF;IACjF,qCAAqC,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAA8B,EAAE;IAClE,MAAM,EACJ,aAAa,EACb,YAAY,GAAG,cAAc,EAC7B,WAAW,GAAG,mBAAmB,EACjC,cAAc,EACd,QAAQ,GAAG,EAAE,GACd,GAAG,IAAI,CAAC;IAET,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,cAAc,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAEhE,MAAM,KAAK,GAAa;QACtB,KAAK,YAAY,EAAE;KACpB,CAAC;IAEF,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Principle Registry — T-01..T-10
|
|
3
|
+
*
|
|
4
|
+
* Canonical source of truth for the 10 built-in core principles.
|
|
5
|
+
* Anchored to `thinking-models.ts` ids + fallback names.
|
|
6
|
+
* Drift test in openclaw-plugin validates registry matches runtime.
|
|
7
|
+
*
|
|
8
|
+
* Bilingual: each principle has EN (name/statement) and
|
|
9
|
+
* ZH (nameZh/statementZh) fields.
|
|
10
|
+
*
|
|
11
|
+
* See 02-review-response-and-amendments.md §2.1 for the three-way
|
|
12
|
+
* naming collision resolution.
|
|
13
|
+
*/
|
|
14
|
+
export interface CorePrinciple {
|
|
15
|
+
/** Canonical id — matches thinking-models.ts BUILTIN_PATTERNS id (e.g. 'T-01') */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Human-readable name (EN) — matches thinking-models.ts getFallbackName() */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Human-readable name (ZH) — bilingual counterpart */
|
|
20
|
+
nameZh: string;
|
|
21
|
+
/** One-line axiom statement for prompt injection and routing (EN) */
|
|
22
|
+
statement: string;
|
|
23
|
+
/** One-line axiom statement (ZH) */
|
|
24
|
+
statementZh: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const CorePrincipleSchema: import("@sinclair/typebox").TObject<{
|
|
27
|
+
id: import("@sinclair/typebox").TString;
|
|
28
|
+
name: import("@sinclair/typebox").TString;
|
|
29
|
+
nameZh: import("@sinclair/typebox").TString;
|
|
30
|
+
statement: import("@sinclair/typebox").TString;
|
|
31
|
+
statementZh: import("@sinclair/typebox").TString;
|
|
32
|
+
}>;
|
|
33
|
+
/** Frozen array of all 10 core principles */
|
|
34
|
+
export declare const CORE_PRINCIPLES: readonly CorePrinciple[];
|
|
35
|
+
/** Frozen array of all core principle ids */
|
|
36
|
+
export declare const CORE_PRINCIPLE_IDS: readonly string[];
|
|
37
|
+
/** Type guard: returns true if the value is a known core principle id */
|
|
38
|
+
export declare function isCorePrincipleId(value: string): value is typeof CORE_PRINCIPLE_IDS[number];
|
|
39
|
+
/** Lookup a core principle by id; returns undefined if not found */
|
|
40
|
+
export declare function getCorePrinciple(id: string): CorePrinciple | undefined;
|
|
41
|
+
//# sourceMappingURL=core-principle-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-principle-registry.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/core-principles/core-principle-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,MAAM,WAAW,aAAa;IAC5B,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,mBAAmB;;;;;;EAM9B,CAAC;AA+EH,6CAA6C;AAC7C,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAEnD,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAE/C,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAG3F;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAGtE"}
|