create-principles-disciple 1.94.0 → 1.96.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/config/WorkspaceConfigStore.js +2 -1
- package/console/dist/server/config/pd-config-store.d.ts +33 -0
- package/console/dist/server/config/pd-config-store.js +196 -0
- package/console/dist/server/index.js +19 -4
- package/console/dist/server/models/EvidenceChainConsoleModel.d.ts +0 -2
- package/console/dist/server/models/EvidenceChainConsoleModel.js +36 -2
- package/console/dist/server/models/HealthCheckModel.js +5 -3
- package/console/dist/server/models/IntentDecisionModel.d.ts +66 -0
- package/console/dist/server/models/IntentDecisionModel.js +207 -0
- package/console/dist/server/models/IntentPageModel.d.ts +52 -0
- package/console/dist/server/models/IntentPageModel.js +292 -0
- package/console/dist/server/models/PrinciplesConsoleModel.d.ts +2 -0
- package/console/dist/server/models/PrinciplesConsoleModel.js +37 -1
- package/console/dist/server/models/WorkspaceService.d.ts +0 -28
- package/console/dist/server/models/WorkspaceService.js +0 -115
- package/console/dist/server/routes/config.js +55 -1
- package/console/dist/server/routes/intent-decisions.d.ts +33 -0
- package/console/dist/server/routes/intent-decisions.js +499 -0
- package/console/dist/server/routes/intent.d.ts +7 -0
- package/console/dist/server/routes/intent.js +223 -0
- package/console/dist/server/routes/principles.js +67 -1
- package/console/dist/server/routes/update.d.ts +0 -1
- package/console/dist/server/routes/update.js +14 -11
- package/console/dist/types.d.ts +1 -0
- package/console/dist/ui/App.js +2 -60
- package/console/dist/ui/api.d.ts +58 -18
- package/console/dist/ui/api.js +78 -6
- package/console/dist/ui/components/layout/app-sidebar.js +13 -12
- package/console/dist/ui/components/ui/badge.d.ts +1 -1
- package/console/dist/ui/components/ui/button.d.ts +1 -1
- package/console/dist/ui/components/ui/shiny-text.d.ts +28 -0
- package/console/dist/ui/components/ui/shiny-text.js +46 -0
- package/console/dist/ui/i18n/en.json +306 -3
- package/console/dist/ui/i18n/zh-CN.json +306 -3
- package/console/dist/ui/pages/activation/ActivationPage.js +2 -1
- package/console/dist/ui/pages/control-center/AgentCard.d.ts +31 -0
- package/console/dist/ui/pages/control-center/AgentCard.js +156 -0
- package/console/dist/ui/pages/control-center/AgentGroup.d.ts +26 -0
- package/console/dist/ui/pages/control-center/AgentGroup.js +38 -0
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +103 -41
- package/console/dist/ui/pages/control-center/EmpathyObserverCostHint.d.ts +28 -0
- package/console/dist/ui/pages/control-center/EmpathyObserverCostHint.js +38 -0
- package/console/dist/ui/pages/control-center/WorkflowDiagram.d.ts +17 -0
- package/console/dist/ui/pages/control-center/WorkflowDiagram.js +55 -0
- package/console/dist/ui/pages/debt/DebtPage.js +219 -2
- package/console/dist/ui/pages/focus/FocusPage.js +2 -1
- package/console/dist/ui/pages/intent/IntentOnboarding.d.ts +67 -0
- package/console/dist/ui/pages/intent/IntentOnboarding.js +289 -0
- package/console/dist/ui/pages/intent/IntentPage.d.ts +1 -0
- package/console/dist/ui/pages/intent/IntentPage.js +258 -0
- package/console/dist/ui/pages/pain/PainPage.js +234 -4
- package/console/dist/ui/pages/pain/pain-card-helpers.d.ts +75 -0
- package/console/dist/ui/pages/pain/pain-card-helpers.js +78 -0
- package/console/dist/ui/pages/principles/PrinciplesPage.js +2 -1
- package/console/dist/ui/utils/agent-metadata.d.ts +58 -0
- package/console/dist/ui/utils/agent-metadata.js +275 -0
- package/console/dist/ui/utils/control-center-helpers.d.ts +19 -0
- package/console/dist/ui/utils/control-center-helpers.js +37 -0
- package/console/dist/ui/utils/validators.d.ts +200 -0
- package/console/dist/ui/utils/validators.js +563 -0
- package/console/dist/web/assets/app.css +498 -3
- package/console/dist/web/assets/app.js +5063 -1418
- package/console/package.json +3 -0
- package/core/dist/principle-tree-ledger.d.ts +55 -4
- package/core/dist/principle-tree-ledger.d.ts.map +1 -1
- package/core/dist/principle-tree-ledger.js +472 -13
- package/core/dist/principle-tree-ledger.js.map +1 -1
- package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.js +58 -0
- package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.js.map +1 -1
- package/core/dist/prompt-builder/empathy-keyword-matching.d.ts.map +1 -1
- package/core/dist/prompt-builder/empathy-keyword-matching.js +9 -6
- package/core/dist/prompt-builder/empathy-keyword-matching.js.map +1 -1
- package/core/dist/prompt-builder/size-guard.d.ts +1 -0
- package/core/dist/prompt-builder/size-guard.d.ts.map +1 -1
- package/core/dist/prompt-builder/size-guard.js +21 -0
- package/core/dist/prompt-builder/size-guard.js.map +1 -1
- package/core/dist/prompt-builder/types.d.ts +2 -0
- package/core/dist/prompt-builder/types.d.ts.map +1 -1
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +143 -65
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js +85 -7
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.js +284 -0
- package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js +70 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/golden-trace.test.js +136 -1
- package/core/dist/runtime-v2/__tests__/golden-trace.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.js +105 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js +7 -5
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.js +11 -0
- package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js +15 -2
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/schema-float-precision.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/schema-float-precision.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/schema-float-precision.test.js +290 -0
- package/core/dist/runtime-v2/__tests__/schema-float-precision.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.js +158 -0
- package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.js +211 -0
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js +15 -1
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.js +62 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js +12 -2
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.js +56 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js +8 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js +20 -0
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js.map +1 -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 +6 -0
- 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.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-approval-store.js +86 -32
- package/core/dist/runtime-v2/activation/sqlite-approval-store.js.map +1 -1
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js +158 -1
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts +11 -0
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js +55 -11
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.js +134 -15
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.d.ts +18 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.js +251 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js +73 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.d.ts +98 -0
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.js +131 -0
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts +8 -0
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js +66 -3
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.d.ts +23 -0
- package/core/dist/runtime-v2/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.js +16 -0
- package/core/dist/runtime-v2/diagnostician-output.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +32 -0
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/source-descriptors.d.ts +1 -1
- package/core/dist/runtime-v2/evidence-triage/source-descriptors.js +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +23 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.js +30 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.js +74 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.js +246 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.js.map +1 -0
- 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 +9 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/index.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/index.js +2 -0
- package/core/dist/runtime-v2/feature-flags/index.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 +0 -9
- package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js.map +1 -1
- package/{plugin/dist/core/surface-guard.d.ts → core/dist/runtime-v2/feature-flags/surface-guard-policy.d.ts} +15 -5
- package/core/dist/runtime-v2/feature-flags/surface-guard-policy.d.ts.map +1 -0
- package/{plugin/dist/core/surface-guard.js → core/dist/runtime-v2/feature-flags/surface-guard-policy.js} +14 -2
- package/core/dist/runtime-v2/feature-flags/surface-guard-policy.js.map +1 -0
- package/core/dist/runtime-v2/golden-trace-replay-validator.js +1 -1
- package/core/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -1
- package/core/dist/runtime-v2/golden-trace.d.ts +19 -3
- package/core/dist/runtime-v2/golden-trace.d.ts.map +1 -1
- package/core/dist/runtime-v2/golden-trace.js +2 -0
- package/core/dist/runtime-v2/golden-trace.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +21 -4
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +21 -3
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.d.ts +2 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.js +185 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.js.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.d.ts +2 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.js +88 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.js.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.d.ts +2 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.js +181 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.js.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.d.ts +2 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.js +168 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.js.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.d.ts +2 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.js +121 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.js.map +1 -0
- package/core/dist/runtime-v2/intent/index.d.ts +8 -0
- package/core/dist/runtime-v2/intent/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/index.js +8 -0
- package/core/dist/runtime-v2/intent/index.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-browser.d.ts +23 -0
- package/core/dist/runtime-v2/intent/intent-browser.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-browser.js +21 -0
- package/core/dist/runtime-v2/intent/intent-browser.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-decision-record.d.ts +125 -0
- package/core/dist/runtime-v2/intent/intent-decision-record.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-decision-record.js +21 -0
- package/core/dist/runtime-v2/intent/intent-decision-record.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc-reader-port.d.ts +95 -0
- package/core/dist/runtime-v2/intent/intent-doc-reader-port.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc-reader-port.js +43 -0
- package/core/dist/runtime-v2/intent/intent-doc-reader-port.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.d.ts +28 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.js +21 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc.d.ts +35 -0
- package/core/dist/runtime-v2/intent/intent-doc.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc.js +158 -0
- package/core/dist/runtime-v2/intent/intent-doc.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-friction-block.d.ts +63 -0
- package/core/dist/runtime-v2/intent/intent-friction-block.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-friction-block.js +129 -0
- package/core/dist/runtime-v2/intent/intent-friction-block.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-hash.d.ts +2 -0
- package/core/dist/runtime-v2/intent/intent-hash.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-hash.js +10 -0
- package/core/dist/runtime-v2/intent/intent-hash.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-patch-proposal.d.ts +42 -0
- package/core/dist/runtime-v2/intent/intent-patch-proposal.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-patch-proposal.js +81 -0
- package/core/dist/runtime-v2/intent/intent-patch-proposal.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.d.ts +54 -0
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.js +219 -0
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +41 -1
- 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.js +130 -2
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.js +228 -0
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js +41 -11
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js +360 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.js +333 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.js +113 -0
- package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js +135 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.js +449 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/adversarial-case.js +24 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts +10 -0
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-output.js +45 -0
- package/core/dist/runtime-v2/internalization/artificer-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +2 -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 +7 -2
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/behavior-example-pack.d.ts +66 -0
- package/core/dist/runtime-v2/internalization/behavior-example-pack.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/behavior-example-pack.js +183 -0
- package/core/dist/runtime-v2/internalization/behavior-example-pack.js.map +1 -0
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts +13 -0
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +42 -0
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js +27 -0
- package/core/dist/runtime-v2/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +8 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.js +10 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +17 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +118 -24
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.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 +1 -1
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-context-v2.d.ts +61 -0
- package/core/dist/runtime-v2/internalization/rule-context-v2.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-context-v2.js +301 -0
- package/core/dist/runtime-v2/internalization/rule-context-v2.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts +9 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.d.ts +55 -0
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.js +131 -0
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.js.map +1 -0
- package/core/dist/runtime-v2/pain-signal-observability.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-observability.js +280 -56
- package/core/dist/runtime-v2/pain-signal-observability.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +12 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts +6 -0
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.js +2 -0
- package/core/dist/runtime-v2/pain-to-principle-service.js.map +1 -1
- package/core/dist/runtime-v2/principle-tree/ledger-codec.js.map +1 -1
- package/core/dist/runtime-v2/proven-channel-baseline.js +1 -1
- package/core/dist/runtime-v2/proven-channel-baseline.js.map +1 -1
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.js +95 -0
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/risk/index.d.ts +7 -0
- package/core/dist/runtime-v2/risk/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/risk/index.js +6 -0
- package/core/dist/runtime-v2/risk/index.js.map +1 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.d.ts +18 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.js +47 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.js.map +1 -0
- package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.js +55 -0
- package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.js.map +1 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js +6 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js.map +1 -1
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.js +272 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.js.map +1 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.js +83 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.js.map +1 -0
- package/core/dist/runtime-v2/store/intent/index.d.ts +7 -0
- package/core/dist/runtime-v2/store/intent/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/index.js +6 -0
- package/core/dist/runtime-v2/store/intent/index.js.map +1 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.d.ts +51 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.js +306 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.js.map +1 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.d.ts +28 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.js +88 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js +14 -3
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.js +72 -0
- package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts +27 -0
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.js +138 -12
- package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.js +149 -0
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/thinking-models/index.d.ts +3 -0
- package/core/dist/runtime-v2/thinking-models/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/thinking-models/index.js +3 -0
- package/core/dist/runtime-v2/thinking-models/index.js.map +1 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.d.ts +73 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.js +227 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.js.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js +40 -1
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js +28 -1
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-output-typebox.d.ts +3 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.d.ts.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-output-typebox.js +3 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.js.map +1 -1
- package/core/dist/runtime-v2/types/event-payload.d.ts +1 -20
- package/core/dist/runtime-v2/types/event-payload.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-payload.js +0 -12
- package/core/dist/runtime-v2/types/event-payload.js.map +1 -1
- package/core/dist/runtime-v2/types/event-types.d.ts +5 -34
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js +0 -19
- package/core/dist/runtime-v2/types/event-types.js.map +1 -1
- package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts +63 -0
- package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/evidence-chain-contract.js +234 -9
- package/core/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
- package/core/dist/runtime-v2/types/index.d.ts +5 -5
- package/core/dist/runtime-v2/types/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/index.js +5 -3
- package/core/dist/runtime-v2/types/index.js.map +1 -1
- package/core/dist/runtime-v2/types/ledger-store.d.ts +30 -30
- package/core/dist/runtime-v2/types/ledger-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/ledger-store.js +10 -5
- package/core/dist/runtime-v2/types/ledger-store.js.map +1 -1
- package/core/dist/workflow-funnel-loader.d.ts +2 -2
- package/core/dist/workflow-funnel-loader.d.ts.map +1 -1
- package/core/package.json +4 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +16 -0
- package/dist/installer.js.map +1 -1
- package/package.json +1 -1
- package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.d.ts +9 -0
- package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.js +237 -0
- package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.js.map +1 -0
- package/pd-cli/dist/commands/intent.d.ts +76 -0
- package/pd-cli/dist/commands/intent.d.ts.map +1 -0
- package/pd-cli/dist/commands/intent.js +411 -0
- package/pd-cli/dist/commands/intent.js.map +1 -0
- package/pd-cli/dist/commands/runtime-init.d.ts +43 -0
- package/pd-cli/dist/commands/runtime-init.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-init.js +264 -0
- package/pd-cli/dist/commands/runtime-init.js.map +1 -0
- package/pd-cli/dist/index.js +25 -0
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.js +6 -0
- package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -1
- package/pd-cli/package.json +1 -0
- package/plugin/dist/commands/pain.js +2 -0
- package/plugin/dist/core/behavior-example-pack-assembler.d.ts +43 -0
- package/plugin/dist/core/behavior-example-pack-assembler.js +247 -0
- package/plugin/dist/core/control-ui-db.d.ts +11 -0
- package/plugin/dist/core/control-ui-db.js +40 -16
- package/plugin/dist/core/event-log.js +0 -5
- package/plugin/dist/core/intent-doc-reader-adapter.d.ts +36 -0
- package/plugin/dist/core/intent-doc-reader-adapter.js +76 -0
- package/plugin/dist/core/intent-doc-reader.d.ts +89 -0
- package/plugin/dist/core/intent-doc-reader.js +210 -0
- package/plugin/dist/core/principle-tree-ledger.d.ts +27 -79
- package/plugin/dist/core/principle-tree-ledger.js +39 -524
- package/plugin/dist/core/reflection/reflection-context.d.ts +2 -2
- package/plugin/dist/core/rule-context-assembler.d.ts +45 -0
- package/plugin/dist/core/rule-context-assembler.js +148 -0
- package/plugin/dist/core/thinking-models.d.ts +12 -57
- package/plugin/dist/core/thinking-models.js +18 -224
- package/plugin/dist/core/trajectory-types.d.ts +18 -0
- package/plugin/dist/core/trajectory.d.ts +50 -2
- package/plugin/dist/core/trajectory.js +435 -254
- package/plugin/dist/core/workspace-context.d.ts +2 -3
- package/plugin/dist/hooks/gate.js +59 -2
- package/plugin/dist/hooks/pain.js +5 -0
- package/plugin/dist/hooks/prompt-helpers.d.ts +19 -1
- package/plugin/dist/hooks/prompt-helpers.js +39 -2
- package/plugin/dist/hooks/prompt-types.d.ts +8 -0
- package/plugin/dist/hooks/prompt.js +81 -21
- package/plugin/dist/index.d.ts +3 -1
- package/plugin/dist/index.js +10 -6
- package/plugin/dist/service/runtime-summary-service.js +1 -1
- package/plugin/dist/service/subagent-workflow/workflow-store.d.ts +14 -0
- package/plugin/dist/service/subagent-workflow/workflow-store.js +91 -2
- package/plugin/dist/types/event-types.d.ts +1 -1
- package/plugin/package.json +6 -3
- package/plugin/scripts/acceptance-test.mjs +3 -3
- package/plugin/dist/core/evolution-migration.d.ts +0 -5
- package/plugin/dist/core/evolution-migration.js +0 -65
- package/plugin/dist/core/principle-tree-ledger-adapter.d.ts +0 -32
- package/plugin/dist/core/principle-tree-ledger-adapter.js +0 -125
- package/plugin/dist/core/risk-calculator.d.ts +0 -22
- package/plugin/dist/core/risk-calculator.js +0 -88
- package/plugin/dist/core/rule-host-helpers.d.ts +0 -8
- package/plugin/dist/core/rule-host-helpers.js +0 -7
- package/plugin/dist/core/rule-host-types.d.ts +0 -7
- package/plugin/dist/core/rule-host-types.js +0 -7
- package/plugin/dist/core/schema/db-types.d.ts +0 -11
- package/plugin/dist/core/schema/db-types.js +0 -5
- package/plugin/dist/core/schema/index.d.ts +0 -17
- package/plugin/dist/core/schema/index.js +0 -15
- package/plugin/dist/core/schema/migration-runner.d.ts +0 -53
- package/plugin/dist/core/schema/migration-runner.js +0 -170
- package/plugin/dist/core/schema/migrations/001-init-trajectory.d.ts +0 -6
- package/plugin/dist/core/schema/migrations/001-init-trajectory.js +0 -190
- package/plugin/dist/core/schema/migrations/002-init-central.d.ts +0 -5
- package/plugin/dist/core/schema/migrations/002-init-central.js +0 -108
- package/plugin/dist/core/schema/migrations/003-init-workflow.d.ts +0 -5
- package/plugin/dist/core/schema/migrations/003-init-workflow.js +0 -50
- package/plugin/dist/core/schema/migrations/004-add-thinking-and-gfi.d.ts +0 -8
- package/plugin/dist/core/schema/migrations/004-add-thinking-and-gfi.js +0 -66
- package/plugin/dist/core/schema/migrations/index.d.ts +0 -16
- package/plugin/dist/core/schema/migrations/index.js +0 -27
- package/plugin/dist/core/schema/schema-definitions.d.ts +0 -46
- package/plugin/dist/core/schema/schema-definitions.js +0 -599
- package/plugin/dist/service/central-database.d.ts +0 -138
- package/plugin/dist/service/central-database.js +0 -731
- package/plugin/dist/service/central-sync-service.d.ts +0 -8
- package/plugin/dist/service/central-sync-service.js +0 -71
- package/plugin/scripts/db-migrate.mjs +0 -170
- package/plugin/scripts/validate-live-path.ts +0 -462
|
@@ -28,9 +28,36 @@ export declare class SqliteConnection {
|
|
|
28
28
|
private db;
|
|
29
29
|
private readonly dbPath;
|
|
30
30
|
private readonly readonlyMode;
|
|
31
|
+
/**
|
|
32
|
+
* Schema initialization warnings collected during getDb(). Populated when initSchema()
|
|
33
|
+
* or migrateSchema() fails (rc-9: no silent fallback — callers can read these warnings
|
|
34
|
+
* to surface degraded state). Empty array means no warnings.
|
|
35
|
+
*/
|
|
36
|
+
private readonly schemaInitWarnings;
|
|
31
37
|
constructor(workspaceDirOrOpts: string | SqliteConnectionOptions);
|
|
38
|
+
/**
|
|
39
|
+
* Returns warnings collected during schema initialization (rc-9: no silent fallback).
|
|
40
|
+
* Empty if no warnings. Call after getDb() to inspect degraded schema state.
|
|
41
|
+
*/
|
|
42
|
+
getSchemaInitWarnings(): string[];
|
|
32
43
|
getDb(): Database.Database;
|
|
44
|
+
/**
|
|
45
|
+
* Derive workspaceDir from dbPath (used for readonly bootstrap).
|
|
46
|
+
* dbPath is <workspaceDir>/.pd/state.db, so workspaceDir is two levels up.
|
|
47
|
+
*/
|
|
48
|
+
private workspaceDirFromDbPath;
|
|
33
49
|
getPragmaReport(): SqlitePragmaReport;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the current schema version of state.db.
|
|
52
|
+
* Versions are stored as TEXT and compared lexicographically (e.g., '000' < '001').
|
|
53
|
+
* Returns '000' for fresh databases or if the table is somehow missing.
|
|
54
|
+
*/
|
|
55
|
+
getSchemaVersion(): string;
|
|
56
|
+
/**
|
|
57
|
+
* Records a new schema version after a migration is applied.
|
|
58
|
+
* Each call inserts a new row (append-only history for audit).
|
|
59
|
+
*/
|
|
60
|
+
setSchemaVersion(version: string): void;
|
|
34
61
|
private initSchema;
|
|
35
62
|
private migrateSchema;
|
|
36
63
|
/** Closes the underlying database connection. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-connection.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/store/sqlite-connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-connection.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/store/sqlite-connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAStC,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,EAAE,CAAkC;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAU;IACvC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAgB;gBAEvC,kBAAkB,EAAE,MAAM,GAAG,uBAAuB;IAYhE;;;OAGG;IACH,qBAAqB,IAAI,MAAM,EAAE;IAIjC,KAAK,IAAI,QAAQ,CAAC,QAAQ;IAsF1B;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAK9B,eAAe,IAAI,kBAAkB;IA6BrC;;;;OAIG;IACH,gBAAgB,IAAI,MAAM;IAO1B;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKvC,OAAO,CAAC,UAAU;IAgTlB,OAAO,CAAC,aAAa;IA+BrB,iDAAiD;IACjD,KAAK,IAAI,IAAI;CAWd"}
|
|
@@ -15,10 +15,19 @@ import Database from 'better-sqlite3';
|
|
|
15
15
|
import { join } from 'path';
|
|
16
16
|
import * as fs from 'fs';
|
|
17
17
|
import { PDRuntimeError } from '../error-categories.js';
|
|
18
|
+
function isRecord(value) {
|
|
19
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
20
|
+
}
|
|
18
21
|
export class SqliteConnection {
|
|
19
22
|
db = null;
|
|
20
23
|
dbPath;
|
|
21
24
|
readonlyMode;
|
|
25
|
+
/**
|
|
26
|
+
* Schema initialization warnings collected during getDb(). Populated when initSchema()
|
|
27
|
+
* or migrateSchema() fails (rc-9: no silent fallback — callers can read these warnings
|
|
28
|
+
* to surface degraded state). Empty array means no warnings.
|
|
29
|
+
*/
|
|
30
|
+
schemaInitWarnings = [];
|
|
22
31
|
constructor(workspaceDirOrOpts) {
|
|
23
32
|
const opts = typeof workspaceDirOrOpts === 'string'
|
|
24
33
|
? { workspaceDir: workspaceDirOrOpts }
|
|
@@ -30,9 +39,36 @@ export class SqliteConnection {
|
|
|
30
39
|
}
|
|
31
40
|
this.dbPath = join(pdDir, 'state.db');
|
|
32
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Returns warnings collected during schema initialization (rc-9: no silent fallback).
|
|
44
|
+
* Empty if no warnings. Call after getDb() to inspect degraded schema state.
|
|
45
|
+
*/
|
|
46
|
+
getSchemaInitWarnings() {
|
|
47
|
+
return [...this.schemaInitWarnings];
|
|
48
|
+
}
|
|
33
49
|
getDb() {
|
|
34
50
|
if (this.db)
|
|
35
51
|
return this.db;
|
|
52
|
+
// readonly mode: if the DB file does not exist, bootstrap it once in write mode
|
|
53
|
+
// (triggers initSchema), then close and reopen in readonly mode. This prevents
|
|
54
|
+
// pd-console GET routes and other readonly callers from throwing SqliteError on
|
|
55
|
+
// fresh workspaces where state.db has not been created yet.
|
|
56
|
+
if (this.readonlyMode && !fs.existsSync(this.dbPath)) {
|
|
57
|
+
const bootstrapper = new SqliteConnection({ workspaceDir: this.workspaceDirFromDbPath(), readonly: false });
|
|
58
|
+
try {
|
|
59
|
+
bootstrapper.getDb(); // triggers initSchema + migrateSchema
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
// rc-9: fail loud with reason and next action — do not silently swallow
|
|
63
|
+
throw new PDRuntimeError('storage_unavailable', `Failed to bootstrap state.db for readonly access: ${err instanceof Error ? err.message : String(err)}`, { nextAction: 'Run "pd runtime init --confirm --workspace <dir>" to initialize databases, then retry.' });
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
try {
|
|
67
|
+
bootstrapper.close();
|
|
68
|
+
}
|
|
69
|
+
catch { /* best-effort */ }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
36
72
|
this.db = this.readonlyMode
|
|
37
73
|
? new Database(this.dbPath, { readonly: true })
|
|
38
74
|
: new Database(this.dbPath);
|
|
@@ -67,14 +103,30 @@ export class SqliteConnection {
|
|
|
67
103
|
try {
|
|
68
104
|
this.initSchema();
|
|
69
105
|
}
|
|
70
|
-
catch {
|
|
106
|
+
catch (err) {
|
|
107
|
+
// rc-9: surface failure reason instead of silent catch (was `catch { }`).
|
|
108
|
+
// Schema init may fail in restricted environments; record the warning so
|
|
109
|
+
// callers can detect degraded state via getSchemaInitWarnings().
|
|
110
|
+
this.schemaInitWarnings.push(`initSchema failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
111
|
+
}
|
|
71
112
|
try {
|
|
72
113
|
this.migrateSchema();
|
|
73
114
|
}
|
|
74
|
-
catch {
|
|
115
|
+
catch (err) {
|
|
116
|
+
// rc-9: surface migration failure reason (was `catch { }`)
|
|
117
|
+
this.schemaInitWarnings.push(`migrateSchema failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
118
|
+
}
|
|
75
119
|
}
|
|
76
120
|
return this.db;
|
|
77
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Derive workspaceDir from dbPath (used for readonly bootstrap).
|
|
124
|
+
* dbPath is <workspaceDir>/.pd/state.db, so workspaceDir is two levels up.
|
|
125
|
+
*/
|
|
126
|
+
workspaceDirFromDbPath() {
|
|
127
|
+
// dbPath = <workspaceDir>/.pd/state.db → workspaceDir is dirname(dirname(dbPath))
|
|
128
|
+
return join(this.dbPath, '..', '..');
|
|
129
|
+
}
|
|
78
130
|
getPragmaReport() {
|
|
79
131
|
if (!this.db) {
|
|
80
132
|
return {
|
|
@@ -106,6 +158,26 @@ export class SqliteConnection {
|
|
|
106
158
|
return { journalMode: 'error', busyTimeout: 0, synchronous: 'error', foreignKeys: false, healthy: false, issues: ['pragma read failed - database may be corrupted'] };
|
|
107
159
|
}
|
|
108
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Returns the current schema version of state.db.
|
|
163
|
+
* Versions are stored as TEXT and compared lexicographically (e.g., '000' < '001').
|
|
164
|
+
* Returns '000' for fresh databases or if the table is somehow missing.
|
|
165
|
+
*/
|
|
166
|
+
getSchemaVersion() {
|
|
167
|
+
const db = this.getDb();
|
|
168
|
+
const row = db.prepare('SELECT version FROM schema_version ORDER BY version DESC LIMIT 1').get();
|
|
169
|
+
if (!isRecord(row) || typeof row.version !== 'string')
|
|
170
|
+
return '000';
|
|
171
|
+
return row.version;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Records a new schema version after a migration is applied.
|
|
175
|
+
* Each call inserts a new row (append-only history for audit).
|
|
176
|
+
*/
|
|
177
|
+
setSchemaVersion(version) {
|
|
178
|
+
const db = this.getDb();
|
|
179
|
+
db.prepare('INSERT INTO schema_version (version) VALUES (?)').run(version);
|
|
180
|
+
}
|
|
109
181
|
initSchema() {
|
|
110
182
|
const db = this.db;
|
|
111
183
|
db.exec(`
|
|
@@ -326,19 +398,73 @@ export class SqliteConnection {
|
|
|
326
398
|
db.exec('ALTER TABLE activations ADD COLUMN deactivated_at TEXT');
|
|
327
399
|
}
|
|
328
400
|
}
|
|
401
|
+
// PRI-286: confirm_first_state table is orphaned (SqliteConfirmFirstStateStore class deleted).
|
|
402
|
+
// Drop legacy table if exists; CREATE is no longer needed.
|
|
403
|
+
db.exec(`
|
|
404
|
+
DROP TABLE IF EXISTS confirm_first_state;
|
|
405
|
+
DROP INDEX IF EXISTS idx_confirm_first_state_last_seen;
|
|
406
|
+
`);
|
|
407
|
+
// PRI-470: IntentDecisionRecord durable store (SPEC §21.7).
|
|
408
|
+
// Stores immutable snapshots of source / evidenceStrength /
|
|
409
|
+
// relatedIntentFields / evidenceRefs so the audit trail stays accurate
|
|
410
|
+
// even if the underlying artifact is later modified.
|
|
411
|
+
db.exec(`
|
|
412
|
+
CREATE TABLE IF NOT EXISTS intent_decisions (
|
|
413
|
+
id TEXT PRIMARY KEY,
|
|
414
|
+
pain_id TEXT,
|
|
415
|
+
task_id TEXT NOT NULL,
|
|
416
|
+
run_id TEXT,
|
|
417
|
+
intent_doc_hash TEXT,
|
|
418
|
+
source TEXT NOT NULL,
|
|
419
|
+
evidence_strength TEXT NOT NULL,
|
|
420
|
+
related_intent_fields TEXT NOT NULL,
|
|
421
|
+
owner_action TEXT NOT NULL,
|
|
422
|
+
evidence_refs TEXT NOT NULL,
|
|
423
|
+
note TEXT,
|
|
424
|
+
source_snapshot TEXT NOT NULL,
|
|
425
|
+
evidence_strength_snapshot TEXT NOT NULL,
|
|
426
|
+
related_intent_fields_snapshot TEXT NOT NULL,
|
|
427
|
+
evidence_refs_snapshot TEXT NOT NULL,
|
|
428
|
+
resulting_candidate_id TEXT,
|
|
429
|
+
resulting_rule_candidate_id TEXT,
|
|
430
|
+
patch_proposal_id TEXT,
|
|
431
|
+
created_at TEXT NOT NULL
|
|
432
|
+
);
|
|
433
|
+
CREATE INDEX IF NOT EXISTS idx_intent_decisions_pain_id ON intent_decisions(pain_id);
|
|
434
|
+
CREATE INDEX IF NOT EXISTS idx_intent_decisions_task_id ON intent_decisions(task_id);
|
|
435
|
+
CREATE INDEX IF NOT EXISTS idx_intent_decisions_owner_action ON intent_decisions(owner_action);
|
|
436
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_intent_decisions_pain_hash_action
|
|
437
|
+
ON intent_decisions(pain_id, intent_doc_hash, owner_action)
|
|
438
|
+
WHERE pain_id IS NOT NULL;
|
|
439
|
+
`);
|
|
440
|
+
// INTENT.md doc version snapshots (SPEC bilingual+lifecycle).
|
|
441
|
+
// Mirrors the intent_decisions audit pattern: immutable snapshots, hash linkage.
|
|
329
442
|
db.exec(`
|
|
330
|
-
CREATE TABLE IF NOT EXISTS
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
last_seen_at TEXT NOT NULL
|
|
443
|
+
CREATE TABLE IF NOT EXISTS intent_doc_versions (
|
|
444
|
+
id TEXT PRIMARY KEY,
|
|
445
|
+
lang TEXT NOT NULL,
|
|
446
|
+
content_hash TEXT NOT NULL,
|
|
447
|
+
content_snapshot TEXT NOT NULL,
|
|
448
|
+
reason TEXT,
|
|
449
|
+
created_at TEXT NOT NULL
|
|
338
450
|
);
|
|
339
|
-
CREATE INDEX IF NOT EXISTS
|
|
340
|
-
ON
|
|
451
|
+
CREATE INDEX IF NOT EXISTS idx_intent_doc_versions_lang
|
|
452
|
+
ON intent_doc_versions(lang, created_at DESC);
|
|
341
453
|
`);
|
|
454
|
+
// P2-10: Minimal schema_version table for state.db migration tracking.
|
|
455
|
+
// core cannot import plugin's MigrationRunner (dependency direction),
|
|
456
|
+
// so this is a lightweight version that records schema version history.
|
|
457
|
+
db.exec(`
|
|
458
|
+
CREATE TABLE IF NOT EXISTS schema_version (
|
|
459
|
+
version TEXT NOT NULL DEFAULT '000',
|
|
460
|
+
applied_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
|
|
461
|
+
);
|
|
462
|
+
`);
|
|
463
|
+
// Seed initial version '000' if table is empty (fresh database).
|
|
464
|
+
const countRow = db.prepare('SELECT COUNT(*) as cnt FROM schema_version').get();
|
|
465
|
+
if (!isRecord(countRow) || typeof countRow.cnt !== 'number' || countRow.cnt === 0) {
|
|
466
|
+
db.prepare("INSERT INTO schema_version (version) VALUES ('000')").run();
|
|
467
|
+
}
|
|
342
468
|
}
|
|
343
469
|
migrateSchema() {
|
|
344
470
|
const db = this.db;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-connection.js","sourceRoot":"","sources":["../../../src/runtime-v2/store/sqlite-connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-connection.js","sourceRoot":"","sources":["../../../src/runtime-v2/store/sqlite-connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAgBD,MAAM,OAAO,gBAAgB;IACnB,EAAE,GAA6B,IAAI,CAAC;IAC3B,MAAM,CAAS;IACf,YAAY,CAAU;IACvC;;;;OAIG;IACc,kBAAkB,GAAa,EAAE,CAAC;IAEnD,YAAY,kBAAoD;QAC9D,MAAM,IAAI,GAAG,OAAO,kBAAkB,KAAK,QAAQ;YACjD,CAAC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE;YACtC,CAAC,CAAC,kBAAkB,CAAC;QACvB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QA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E,EAAE;SAC/G,CAAC;QAEF,KAAK,MAAM,SAAS,IAAI,mBAAmB,EAAE,CAAC;YAC5C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;QAED,IAAI,CAAC;YACH,EAAE,CAAC,IAAI,CAAC,4GAA4G,CAAC,CAAC;QACxH,CAAC;QAAC,MAAM,CAAC;YACP,0BAA0B;QAC5B,CAAC;IACH,CAAC;IAED,iDAAiD;IACjD,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,EAAE;YAAE,OAAO;QACrB,IAAI,CAAC;YACH,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;YAC3C,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;QAClB,CAAC;QAAC,MAAM,CAAC;YACP,uEAAuE;QACzE,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;QACjB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-models-policy.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { BUILTIN_PATTERNS, BUILTIN_PATTERN_MAP, getFallbackName, getFallbackDescription, getBuiltinBaselineScenarios, deriveThinkingScenarios, } from '../thinking-models-policy.js';
|
|
3
|
+
import { CORE_PRINCIPLES, CORE_PRINCIPLE_IDS } from '../../core-principles/index.js';
|
|
4
|
+
describe('thinking-models-policy', () => {
|
|
5
|
+
describe('BUILTIN_PATTERNS', () => {
|
|
6
|
+
it('has exactly 10 entries (T-01..T-10)', () => {
|
|
7
|
+
expect(BUILTIN_PATTERNS).toHaveLength(10);
|
|
8
|
+
const ids = BUILTIN_PATTERNS.map(p => p.id).sort();
|
|
9
|
+
expect(ids).toEqual([
|
|
10
|
+
'T-01', 'T-02', 'T-03', 'T-04', 'T-05',
|
|
11
|
+
'T-06', 'T-07', 'T-08', 'T-09', 'T-10',
|
|
12
|
+
]);
|
|
13
|
+
});
|
|
14
|
+
it('every entry has at least one pattern and at least one baselineScenario', () => {
|
|
15
|
+
for (const entry of BUILTIN_PATTERNS) {
|
|
16
|
+
expect(entry.patterns.length).toBeGreaterThan(0);
|
|
17
|
+
expect(entry.baselineScenarios.length).toBeGreaterThan(0);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
it('BUILTIN_PATTERN_MAP mirrors BUILTIN_PATTERNS', () => {
|
|
21
|
+
expect(BUILTIN_PATTERN_MAP.size).toBe(BUILTIN_PATTERNS.length);
|
|
22
|
+
for (const entry of BUILTIN_PATTERNS) {
|
|
23
|
+
expect(BUILTIN_PATTERN_MAP.get(entry.id)).toBe(entry);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
describe('getFallbackName / getFallbackDescription', () => {
|
|
28
|
+
it('returns name from CORE_PRINCIPLES for known id', () => {
|
|
29
|
+
for (const principle of CORE_PRINCIPLES) {
|
|
30
|
+
expect(getFallbackName(principle.id)).toBe(principle.name);
|
|
31
|
+
expect(getFallbackDescription(principle.id)).toBe(principle.statement);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
it('returns the id itself for unknown id (no crash)', () => {
|
|
35
|
+
expect(getFallbackName('T-UNKNOWN')).toBe('T-UNKNOWN');
|
|
36
|
+
expect(getFallbackDescription('T-UNKNOWN')).toBe('');
|
|
37
|
+
});
|
|
38
|
+
it('covers every CORE_PRINCIPLE_ID', () => {
|
|
39
|
+
for (const id of CORE_PRINCIPLE_IDS) {
|
|
40
|
+
const name = getFallbackName(id);
|
|
41
|
+
const desc = getFallbackDescription(id);
|
|
42
|
+
expect(name).toBeTruthy();
|
|
43
|
+
expect(desc).not.toBe('');
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe('getBuiltinBaselineScenarios', () => {
|
|
48
|
+
it('returns baselineScenarios for known id', () => {
|
|
49
|
+
expect(getBuiltinBaselineScenarios('T-01')).toEqual(['exploration', 'discovery']);
|
|
50
|
+
expect(getBuiltinBaselineScenarios('T-08')).toEqual(['reflection', 'pain-response']);
|
|
51
|
+
});
|
|
52
|
+
it('returns empty array for unknown id', () => {
|
|
53
|
+
expect(getBuiltinBaselineScenarios('T-UNKNOWN')).toEqual([]);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
describe('deriveThinkingScenarios', () => {
|
|
57
|
+
it('includes baselineScenarios for the model id', () => {
|
|
58
|
+
const result = deriveThinkingScenarios('T-01', {});
|
|
59
|
+
expect(result).toContain('exploration');
|
|
60
|
+
expect(result).toContain('discovery');
|
|
61
|
+
});
|
|
62
|
+
it('adds after-tool-failure when a tool call failed', () => {
|
|
63
|
+
const result = deriveThinkingScenarios('T-01', {
|
|
64
|
+
recentToolCalls: [
|
|
65
|
+
{ toolName: 'edit_file', outcome: 'failure', errorType: 'ENOENT' },
|
|
66
|
+
],
|
|
67
|
+
});
|
|
68
|
+
expect(result).toContain('after-tool-failure');
|
|
69
|
+
expect(result).toContain('incident-response');
|
|
70
|
+
});
|
|
71
|
+
it('adds after-recovery only when both failure and success present', () => {
|
|
72
|
+
const onlyFailure = deriveThinkingScenarios('T-01', {
|
|
73
|
+
recentToolCalls: [{ toolName: 'x', outcome: 'failure' }],
|
|
74
|
+
});
|
|
75
|
+
const onlySuccess = deriveThinkingScenarios('T-01', {
|
|
76
|
+
recentToolCalls: [{ toolName: 'x', outcome: 'success' }],
|
|
77
|
+
});
|
|
78
|
+
const both = deriveThinkingScenarios('T-01', {
|
|
79
|
+
recentToolCalls: [
|
|
80
|
+
{ toolName: 'x', outcome: 'failure' },
|
|
81
|
+
{ toolName: 'y', outcome: 'success' },
|
|
82
|
+
],
|
|
83
|
+
});
|
|
84
|
+
expect(onlyFailure).not.toContain('after-recovery');
|
|
85
|
+
expect(onlySuccess).not.toContain('after-recovery');
|
|
86
|
+
expect(both).toContain('after-recovery');
|
|
87
|
+
});
|
|
88
|
+
it('adds blocked-execution when a tool call was blocked', () => {
|
|
89
|
+
const result = deriveThinkingScenarios('T-01', {
|
|
90
|
+
recentToolCalls: [{ toolName: 'rm', outcome: 'blocked' }],
|
|
91
|
+
});
|
|
92
|
+
expect(result).toContain('blocked-execution');
|
|
93
|
+
});
|
|
94
|
+
it('adds user-friction when pain events present', () => {
|
|
95
|
+
const result = deriveThinkingScenarios('T-01', {
|
|
96
|
+
recentPainEvents: [{ source: 'gate', score: 5 }],
|
|
97
|
+
});
|
|
98
|
+
expect(result).toContain('user-friction');
|
|
99
|
+
});
|
|
100
|
+
it('adds gate-block when gate blocks present', () => {
|
|
101
|
+
const result = deriveThinkingScenarios('T-01', {
|
|
102
|
+
recentGateBlocks: [{ toolName: 'rm', reason: 'unsafe' }],
|
|
103
|
+
});
|
|
104
|
+
expect(result).toContain('gate-block');
|
|
105
|
+
});
|
|
106
|
+
it('adds user-correction when user corrections present', () => {
|
|
107
|
+
const result = deriveThinkingScenarios('T-01', {
|
|
108
|
+
recentUserCorrections: [{ correctionCue: 'no, do X instead' }],
|
|
109
|
+
});
|
|
110
|
+
expect(result).toContain('user-correction');
|
|
111
|
+
});
|
|
112
|
+
it('adds principle-feedback when principle events present', () => {
|
|
113
|
+
const result = deriveThinkingScenarios('T-01', {
|
|
114
|
+
recentPrincipleEvents: [{ eventType: 'admitted', principleId: 'P-001' }],
|
|
115
|
+
});
|
|
116
|
+
expect(result).toContain('principle-feedback');
|
|
117
|
+
});
|
|
118
|
+
it('adds model-specific scenarios for T-03, T-04, T-05, T-08, T-09', () => {
|
|
119
|
+
expect(deriveThinkingScenarios('T-03', {})).toContain('root-cause-analysis');
|
|
120
|
+
expect(deriveThinkingScenarios('T-04', {})).toContain('risk-review');
|
|
121
|
+
expect(deriveThinkingScenarios('T-05', {})).toContain('risk-review');
|
|
122
|
+
expect(deriveThinkingScenarios('T-08', {})).toContain('reflection-loop');
|
|
123
|
+
expect(deriveThinkingScenarios('T-09', {})).toContain('task-planning');
|
|
124
|
+
});
|
|
125
|
+
it('does not add model-specific scenarios for other models', () => {
|
|
126
|
+
const t01 = deriveThinkingScenarios('T-01', {});
|
|
127
|
+
expect(t01).not.toContain('root-cause-analysis');
|
|
128
|
+
expect(t01).not.toContain('risk-review');
|
|
129
|
+
expect(t01).not.toContain('reflection-loop');
|
|
130
|
+
expect(t01).not.toContain('task-planning');
|
|
131
|
+
});
|
|
132
|
+
it('returns empty array for unknown model id with empty context', () => {
|
|
133
|
+
const result = deriveThinkingScenarios('T-UNKNOWN', {});
|
|
134
|
+
expect(result).toEqual([]);
|
|
135
|
+
});
|
|
136
|
+
it('handles null/undefined context fields safely', () => {
|
|
137
|
+
const result = deriveThinkingScenarios('T-01', {
|
|
138
|
+
recentToolCalls: undefined,
|
|
139
|
+
recentPainEvents: undefined,
|
|
140
|
+
recentGateBlocks: undefined,
|
|
141
|
+
recentUserCorrections: undefined,
|
|
142
|
+
recentPrincipleEvents: undefined,
|
|
143
|
+
});
|
|
144
|
+
// Only baselineScenarios should be present
|
|
145
|
+
expect(result).toEqual(['exploration', 'discovery']);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
//# sourceMappingURL=thinking-models-policy.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-models-policy.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACt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M,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { BUILTIN_PATTERNS, BUILTIN_PATTERN_MAP, getFallbackName, getFallbackDescription, getBuiltinBaselineScenarios, deriveThinkingScenarios, } from './thinking-models-policy.js';
|
|
2
|
+
export type { ThinkingModelDefinition, ThinkingModelMatch, ThinkingScenarioContext, BuiltinPatternEntry, } from './thinking-models-policy.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/thinking-models/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AAErC,YAAY,EACV,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Thinking models — pure policy migrated from plugin (Stage 3)
|
|
2
|
+
export { BUILTIN_PATTERNS, BUILTIN_PATTERN_MAP, getFallbackName, getFallbackDescription, getBuiltinBaselineScenarios, deriveThinkingScenarios, } from './thinking-models-policy.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime-v2/thinking-models/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thinking Models — Pure Policy (Stage 3 sink from plugin)
|
|
3
|
+
*
|
|
4
|
+
* Holds the pure logic for thinking-model detection:
|
|
5
|
+
* - BUILTIN_PATTERNS: carefully tuned regexes that match AI output text
|
|
6
|
+
* - BUILTIN_PATTERN_MAP: id → entry lookup
|
|
7
|
+
* - getFallbackName / getFallbackDescription: delegate to Core Principle Registry
|
|
8
|
+
* - deriveThinkingScenarios: pure scenario derivation from context
|
|
9
|
+
*
|
|
10
|
+
* I/O (reading THINKING_OS.md from a workspace) stays in the plugin.
|
|
11
|
+
*
|
|
12
|
+
* Flow:
|
|
13
|
+
* Core Principle Registry (authority) → id, name, description
|
|
14
|
+
* BUILTIN_PATTERNS (engine) → detection regexes per model id
|
|
15
|
+
* Plugin listThinkingModels() (I/O) → full definitions with patterns from THINKING_OS.md
|
|
16
|
+
*/
|
|
17
|
+
export interface ThinkingModelDefinition {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
antiPattern?: string;
|
|
22
|
+
patterns: RegExp[];
|
|
23
|
+
baselineScenarios: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ThinkingModelMatch {
|
|
26
|
+
modelId: string;
|
|
27
|
+
matchedPattern: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ThinkingScenarioContext {
|
|
30
|
+
recentToolCalls?: {
|
|
31
|
+
toolName: string;
|
|
32
|
+
outcome: 'success' | 'failure' | 'blocked';
|
|
33
|
+
errorType?: string | null;
|
|
34
|
+
}[];
|
|
35
|
+
recentPainEvents?: {
|
|
36
|
+
source: string;
|
|
37
|
+
score: number;
|
|
38
|
+
}[];
|
|
39
|
+
recentGateBlocks?: {
|
|
40
|
+
toolName: string;
|
|
41
|
+
reason: string;
|
|
42
|
+
}[];
|
|
43
|
+
recentUserCorrections?: {
|
|
44
|
+
correctionCue?: string | null;
|
|
45
|
+
}[];
|
|
46
|
+
recentPrincipleEvents?: {
|
|
47
|
+
eventType: string;
|
|
48
|
+
principleId?: string | null;
|
|
49
|
+
}[];
|
|
50
|
+
}
|
|
51
|
+
export interface BuiltinPatternEntry {
|
|
52
|
+
id: string;
|
|
53
|
+
patterns: RegExp[];
|
|
54
|
+
baselineScenarios: string[];
|
|
55
|
+
}
|
|
56
|
+
export declare const BUILTIN_PATTERNS: readonly BuiltinPatternEntry[];
|
|
57
|
+
export declare const BUILTIN_PATTERN_MAP: ReadonlyMap<string, BuiltinPatternEntry>;
|
|
58
|
+
export declare function getFallbackName(id: string): string;
|
|
59
|
+
export declare function getFallbackDescription(id: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Look up baselineScenarios for a model id from the builtin pattern map.
|
|
62
|
+
* Returns an empty array if the id is unknown.
|
|
63
|
+
*/
|
|
64
|
+
export declare function getBuiltinBaselineScenarios(modelId: string): string[];
|
|
65
|
+
/**
|
|
66
|
+
* Derive thinking scenarios for a model id given a context.
|
|
67
|
+
*
|
|
68
|
+
* baselineScenarios come from BUILTIN_PATTERN_MAP (the source of truth —
|
|
69
|
+
* even when the plugin loads THINKING_OS.md, baselineScenarios are sourced
|
|
70
|
+
* from the builtin map, never from the parsed directives).
|
|
71
|
+
*/
|
|
72
|
+
export declare function deriveThinkingScenarios(modelId: string, context: ThinkingScenarioContext): string[];
|
|
73
|
+
//# sourceMappingURL=thinking-models-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-models-policy.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/thinking-models/thinking-models-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAQH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBA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