create-principles-disciple 1.93.0 → 1.95.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 +40 -1
- package/console/dist/server/config/pd-config-store.js +170 -1
- package/console/dist/server/index.js +28 -10
- package/console/dist/server/models/ApprovalsConsoleModel.js +4 -12
- 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 +18 -0
- package/console/dist/server/models/IntentPageModel.js +90 -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/feedback-reports.js +1 -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 +3 -0
- package/console/dist/server/routes/intent.js +35 -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/ui/App.js +2 -7
- package/console/dist/ui/api.d.ts +44 -18
- package/console/dist/ui/api.js +44 -5
- package/console/dist/ui/components/layout/app-sidebar.js +2 -1
- 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 +167 -3
- package/console/dist/ui/i18n/zh-CN.json +167 -3
- package/console/dist/ui/pages/activation/ActivationPage.js +2 -1
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +28 -2
- 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/debt/DebtPage.js +219 -2
- package/console/dist/ui/pages/focus/FocusPage.js +2 -1
- package/console/dist/ui/pages/intent/IntentPage.d.ts +1 -0
- package/console/dist/ui/pages/intent/IntentPage.js +147 -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/validators.d.ts +163 -0
- package/console/dist/ui/utils/validators.js +433 -0
- package/console/dist/web/assets/app.css +138 -0
- package/console/dist/web/assets/app.js +3124 -1288
- package/console/package.json +3 -0
- package/core/dist/index.d.ts +2 -2
- package/core/dist/index.d.ts.map +1 -1
- package/core/dist/index.js +1 -1
- package/core/dist/index.js.map +1 -1
- 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__/model-config.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/model-config.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/model-config.test.js +158 -0
- package/core/dist/prompt-builder/__tests__/model-config.test.js.map +1 -0
- 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/__tests__/xml-escape.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/xml-escape.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/xml-escape.test.js +42 -0
- package/core/dist/prompt-builder/__tests__/xml-escape.test.js.map +1 -0
- 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/index.d.ts +3 -0
- package/core/dist/prompt-builder/index.d.ts.map +1 -1
- package/core/dist/prompt-builder/index.js +2 -0
- package/core/dist/prompt-builder/index.js.map +1 -1
- package/core/dist/prompt-builder/model-config.d.ts +42 -0
- package/core/dist/prompt-builder/model-config.d.ts.map +1 -0
- package/core/dist/prompt-builder/model-config.js +84 -0
- package/core/dist/prompt-builder/model-config.js.map +1 -0
- 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/prompt-builder/xml-escape.d.ts +12 -0
- package/core/dist/prompt-builder/xml-escape.d.ts.map +1 -0
- package/core/dist/prompt-builder/xml-escape.js +19 -0
- package/core/dist/prompt-builder/xml-escape.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +205 -48
- package/core/dist/runtime-v2/__tests__/architecture-regression.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__/pain-signal-bridge-result-shaping.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.js +500 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.js.map +1 -0
- 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/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 +65 -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.map +1 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js +33 -11
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -1
- package/core/dist/runtime-v2/bridge-result-shaper.d.ts +53 -0
- package/core/dist/runtime-v2/bridge-result-shaper.d.ts.map +1 -0
- package/core/dist/runtime-v2/bridge-result-shaper.js +117 -0
- package/core/dist/runtime-v2/bridge-result-shaper.js.map +1 -0
- package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.d.ts +13 -0
- package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.js +111 -0
- package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/detection/detection-funnel-policy.d.ts +103 -0
- package/core/dist/runtime-v2/detection/detection-funnel-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/detection/detection-funnel-policy.js +135 -0
- package/core/dist/runtime-v2/detection/detection-funnel-policy.js.map +1 -0
- package/core/dist/runtime-v2/detection/index.d.ts +10 -0
- package/core/dist/runtime-v2/detection/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/detection/index.js +9 -0
- package/core/dist/runtime-v2/detection/index.js.map +1 -0
- 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/__tests__/observation-resolver.test.d.ts +12 -0
- package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.js +181 -0
- package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.js.map +1 -0
- package/core/dist/runtime-v2/evidence-triage/__tests__/triage-policy.test.js +104 -1
- package/core/dist/runtime-v2/evidence-triage/__tests__/triage-policy.test.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/index.d.ts +3 -0
- package/core/dist/runtime-v2/evidence-triage/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/index.js +3 -0
- package/core/dist/runtime-v2/evidence-triage/index.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts +128 -0
- package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts.map +1 -0
- package/core/dist/runtime-v2/evidence-triage/observation-resolver.js +203 -0
- package/core/dist/runtime-v2/evidence-triage/observation-resolver.js.map +1 -0
- 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/evidence-triage/triage-policy.d.ts +4 -0
- package/core/dist/runtime-v2/evidence-triage/triage-policy.d.ts.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/triage-policy.js +66 -9
- package/core/dist/runtime-v2/evidence-triage/triage-policy.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/types.d.ts +14 -0
- package/core/dist/runtime-v2/evidence-triage/types.d.ts.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/types.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +56 -4
- 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/feature-flag-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +11 -2
- 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 +0 -9
- package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js.map +1 -1
- package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.d.ts +15 -0
- package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.js +450 -0
- package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.js.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.d.ts +13 -0
- package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.js +243 -0
- package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.js.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.d.ts +12 -0
- package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.js +172 -0
- package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.js.map +1 -0
- package/core/dist/runtime-v2/index.d.ts +15 -6
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +15 -4
- 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.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 +91 -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 +6 -0
- package/core/dist/runtime-v2/intent/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/index.js +6 -0
- package/core/dist/runtime-v2/intent/index.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.d.ts +19 -0
- package/core/dist/runtime-v2/intent/intent-doc.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc.js +70 -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-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__/c2-live-runner-chain.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js +306 -0
- package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js.map +1 -0
- 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/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/index.d.ts +0 -16
- package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/index.js +0 -8
- package/core/dist/runtime-v2/internalization/index.js.map +1 -1
- package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.d.ts +15 -0
- package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.js +179 -0
- package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/pain-gate/index.d.ts +10 -0
- package/core/dist/runtime-v2/pain-gate/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-gate/index.js +9 -0
- package/core/dist/runtime-v2/pain-gate/index.js.map +1 -0
- package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.d.ts +121 -0
- package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.js +157 -0
- package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.js.map +1 -0
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js +14 -88
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-observability.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-observability.js +272 -61
- 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/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/index.d.ts +6 -0
- package/core/dist/runtime-v2/store/intent/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/index.js +5 -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/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 +124 -12
- package/core/dist/runtime-v2/store/sqlite-connection.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 -61
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js +2 -36
- 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 +7 -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/runtime-v2/types/pain-signal.d.ts +2 -2
- package/core/dist/runtime-v2/types/pain-signal.js +2 -2
- package/core/dist/workflow-funnel-loader.d.ts +2 -2
- package/core/dist/workflow-funnel-loader.d.ts.map +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +16 -0
- package/dist/installer.js.map +1 -1
- package/dist/mvp-config.d.ts +0 -10
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +0 -65
- package/dist/mvp-config.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 +166 -0
- package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.js.map +1 -0
- package/pd-cli/dist/commands/intent.d.ts +59 -0
- package/pd-cli/dist/commands/intent.d.ts.map +1 -0
- package/pd-cli/dist/commands/intent.js +350 -0
- package/pd-cli/dist/commands/intent.js.map +1 -0
- package/pd-cli/dist/commands/mvp-smoke.js +1 -1
- package/pd-cli/dist/commands/mvp-smoke.js.map +1 -1
- package/pd-cli/dist/commands/rulecode.js +1 -1
- package/pd-cli/dist/commands/rulecode.js.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.js +10 -11
- package/pd-cli/dist/commands/runtime-canary.js.map +1 -1
- 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/commands/runtime-internalization-queue.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-queue.js +13 -16
- 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 +3 -0
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +61 -7
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
- package/pd-cli/dist/commands/runtime.js +1 -1
- package/pd-cli/dist/commands/runtime.js.map +1 -1
- package/pd-cli/dist/index.js +92 -34
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/__tests__/rulehost-readiness.test.d.ts +2 -0
- package/pd-cli/dist/services/__tests__/rulehost-readiness.test.d.ts.map +1 -0
- package/pd-cli/dist/services/__tests__/rulehost-readiness.test.js +314 -0
- package/pd-cli/dist/services/__tests__/rulehost-readiness.test.js.map +1 -0
- package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.js +20 -12
- package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.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/dist/services/rulehost-readiness.d.ts +62 -0
- package/pd-cli/dist/services/rulehost-readiness.d.ts.map +1 -0
- package/pd-cli/dist/services/rulehost-readiness.js +214 -0
- package/pd-cli/dist/services/rulehost-readiness.js.map +1 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +3 -3
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/pd-cli/package.json +1 -0
- package/plugin/dist/commands/evolution-status.js +0 -2
- package/plugin/dist/commands/pain.js +2 -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/detection-funnel.d.ts +25 -11
- package/plugin/dist/core/detection-funnel.js +32 -80
- package/plugin/dist/core/event-log.d.ts +1 -3
- package/plugin/dist/core/event-log.js +5 -21
- package/plugin/dist/core/evolution-reducer.d.ts +0 -8
- package/plugin/dist/core/evolution-reducer.js +9 -19
- package/plugin/dist/core/intent-doc-reader-adapter.d.ts +28 -0
- package/plugin/dist/core/intent-doc-reader-adapter.js +56 -0
- package/plugin/dist/core/intent-doc-reader.d.ts +80 -0
- package/plugin/dist/core/intent-doc-reader.js +189 -0
- package/plugin/dist/core/pain-diagnostic-gate.d.ts +37 -28
- package/plugin/dist/core/pain-diagnostic-gate.js +53 -89
- package/plugin/dist/core/pain.d.ts +0 -63
- package/plugin/dist/core/pain.js +0 -167
- package/plugin/dist/core/paths.d.ts +0 -1
- package/plugin/dist/core/paths.js +2 -1
- 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/schema/migrations/001-init-trajectory.js +3 -6
- package/plugin/dist/core/schema/schema-definitions.js +4 -9
- package/plugin/dist/core/trajectory.d.ts +16 -16
- package/plugin/dist/core/trajectory.js +338 -311
- package/plugin/dist/core/workspace-context.d.ts +2 -3
- package/plugin/dist/hooks/after-tool-call-helpers.d.ts +4 -1
- package/plugin/dist/hooks/after-tool-call-helpers.js +13 -17
- package/plugin/dist/hooks/gate-block-helper.js +57 -17
- package/plugin/dist/hooks/lifecycle.js +3 -6
- package/plugin/dist/hooks/llm.js +66 -26
- package/plugin/dist/hooks/pain.d.ts +3 -1
- package/plugin/dist/hooks/pain.js +124 -49
- package/plugin/dist/hooks/prompt-helpers.d.ts +105 -0
- package/plugin/dist/hooks/prompt-helpers.js +288 -0
- package/plugin/dist/hooks/prompt-types.d.ts +74 -0
- package/plugin/dist/hooks/prompt-types.js +12 -0
- package/plugin/dist/hooks/prompt.d.ts +7 -38
- package/plugin/dist/hooks/prompt.js +433 -338
- package/plugin/dist/hooks/raw-observation-adapter.d.ts +9 -50
- package/plugin/dist/hooks/raw-observation-adapter.js +9 -164
- package/plugin/dist/hooks/raw-observation-types.d.ts +6 -57
- package/plugin/dist/hooks/raw-observation-types.js +5 -9
- package/plugin/dist/hooks/triage-adapter.js +6 -26
- package/plugin/dist/hooks/trigger-cooldown-tracker.d.ts +12 -0
- package/plugin/dist/hooks/trigger-cooldown-tracker.js +25 -0
- package/plugin/dist/index.d.ts +3 -1
- package/plugin/dist/index.js +9 -5
- package/plugin/dist/service/evolution-worker.js +6 -64
- package/plugin/dist/service/runtime-summary-service.d.ts +0 -2
- package/plugin/dist/service/runtime-summary-service.js +1 -5
- 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/scripts/sync-plugin.mjs +33 -22
- package/plugin/templates/langs/en/skills/pd-cli-operator/SKILL.md +20 -11
- package/plugin/templates/langs/en/skills/pd-runtime-v2/SKILL.md +10 -0
- package/plugin/templates/langs/zh/skills/pd-cli-operator/SKILL.md +20 -11
- package/plugin/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +10 -0
- package/console/dist/server/config/feature-flags.d.ts +0 -25
- package/console/dist/server/config/feature-flags.js +0 -101
- package/pd-cli/dist/commands/central-sync.d.ts +0 -10
- package/pd-cli/dist/commands/central-sync.d.ts.map +0 -1
- package/pd-cli/dist/commands/central-sync.js +0 -32
- package/pd-cli/dist/commands/central-sync.js.map +0 -1
- package/pd-cli/dist/services/feature-flag-loader.d.ts +0 -6
- package/pd-cli/dist/services/feature-flag-loader.d.ts.map +0 -1
- package/pd-cli/dist/services/feature-flag-loader.js +0 -53
- package/pd-cli/dist/services/feature-flag-loader.js.map +0 -1
- package/plugin/dist/core/observability.d.ts +0 -40
- package/plugin/dist/core/observability.js +0 -164
- 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/hooks/subagent.d.ts +0 -9
- package/plugin/dist/hooks/subagent.js +0 -122
- 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/validate-live-path.ts +0 -480
package/console/dist/ui/App.js
CHANGED
|
@@ -22,6 +22,7 @@ import { ControlCenterPage } from "./pages/control-center/ControlCenterPage.js";
|
|
|
22
22
|
import { SettingsPage } from "./pages/settings/SettingsPage.js";
|
|
23
23
|
import { UpdatePage } from "./pages/settings/UpdatePage.js";
|
|
24
24
|
import { ReportProblemPage } from "./pages/report-problem/ReportProblemPage.js";
|
|
25
|
+
import { IntentPage } from "./pages/intent/IntentPage.js";
|
|
25
26
|
import { DesignSystemPage } from "./pages/design-system/DesignSystemPage.js";
|
|
26
27
|
// Vite replaces import.meta.env.DEV with a boolean literal at build time.
|
|
27
28
|
// The cast avoids TS2339 without needing a generated .d.ts file.
|
|
@@ -41,7 +42,6 @@ function AuthRoutes() {
|
|
|
41
42
|
if (authed !== true)
|
|
42
43
|
return;
|
|
43
44
|
const handleKeyDown = (e) => {
|
|
44
|
-
console.log('handleKeyDown event:', e.key, 'altKey:', e.altKey);
|
|
45
45
|
if (!e.altKey)
|
|
46
46
|
return;
|
|
47
47
|
const target = e.target;
|
|
@@ -50,7 +50,6 @@ function AuthRoutes() {
|
|
|
50
50
|
target.tagName === "TEXTAREA" ||
|
|
51
51
|
target.tagName === "SELECT" ||
|
|
52
52
|
target.isContentEditable)) {
|
|
53
|
-
console.log('handleKeyDown ignored: input focused');
|
|
54
53
|
return;
|
|
55
54
|
}
|
|
56
55
|
let targetPath = null;
|
|
@@ -80,19 +79,15 @@ function AuthRoutes() {
|
|
|
80
79
|
targetPath = "/settings";
|
|
81
80
|
break;
|
|
82
81
|
default:
|
|
83
|
-
console.log('handleKeyDown: key mismatch:', e.key);
|
|
84
82
|
return;
|
|
85
83
|
}
|
|
86
84
|
if (targetPath) {
|
|
87
|
-
console.log('handleKeyDown navigating to:', targetPath);
|
|
88
85
|
e.preventDefault();
|
|
89
86
|
navigate(targetPath);
|
|
90
87
|
}
|
|
91
88
|
};
|
|
92
|
-
console.log('Registering handleKeyDown listener');
|
|
93
89
|
window.addEventListener("keydown", handleKeyDown);
|
|
94
90
|
return () => {
|
|
95
|
-
console.log('Removing handleKeyDown listener');
|
|
96
91
|
window.removeEventListener("keydown", handleKeyDown);
|
|
97
92
|
};
|
|
98
93
|
}, [authed, navigate]);
|
|
@@ -125,7 +120,7 @@ function AuthRoutes() {
|
|
|
125
120
|
else {
|
|
126
121
|
navigate("/login", { replace: true });
|
|
127
122
|
}
|
|
128
|
-
} }) }), _jsx(Route, { path: "/login", element: _jsx(LoginForm, { onAuthSuccess: handleAuthSuccess }) }), _jsx(Route, { path: "/*", element: authed === null ? (_jsx("div", { className: "min-h-screen bg-paper flex items-center justify-center", children: _jsxs("div", { className: "flex flex-col items-center gap-4", children: [_jsx("div", { className: "w-8 h-8 border-2 border-gov border-t-transparent rounded-full animate-spin" }), _jsx("span", { className: "text-[12px] font-mono tracking-wider text-ink-3 uppercase", children: "Verifying Session..." })] }) })) : authed ? (_jsx(NotificationProvider, { children: _jsxs("div", { className: "min-h-screen bg-paper text-ink", children: [_jsx("a", { href: "#main-content", className: "sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-paper focus:text-ink", children: "Skip to main content" }), _jsx(AppSidebar, {}), _jsx("main", { id: "main-content", className: "ml-[256px] min-h-screen overflow-y-auto", children: _jsx(ErrorBoundary, { children: _jsxs(Routes, { children: [_jsx(Route, { path: "/", element: _jsx(Navigate, { to: "/focus", replace: true }) }), _jsx(Route, { path: "/focus", element: _jsx(FocusPage, {}) }), _jsx(Route, { path: "/pain", element: _jsx(PainPage, {}) }), _jsx(Route, { path: "/principles", element: _jsx(PrinciplesPage, {}) }), _jsx(Route, { path: "/principles/:id", element: _jsx(PrincipleDetailPage, {}) }), _jsx(Route, { path: "/activation", element: _jsx(ActivationPage, {}) }), _jsx(Route, { path: "/debt", element: _jsx(DebtPage, {}) }), _jsx(Route, { path: "/control-center", element: _jsx(ControlCenterPage, {}) }), _jsx(Route, { path: "/settings", element: _jsx(SettingsPage, {}) }), _jsx(Route, { path: "/update", element: _jsx(UpdatePage, {}) }), _jsx(Route, { path: "/report-problem", element: _jsx(ReportProblemPage, {}) }), IS_DEV && (_jsx(Route, { path: "/design-system", element: _jsx(DesignSystemPage, {}) })), !IS_DEV && (_jsx(Route, { path: "/design-system", element: _jsx(Navigate, { to: "/focus", replace: true }) }))] }) }) })] }) })) : (_jsx(Navigate, { to: "/login", replace: true })) })] }));
|
|
123
|
+
} }) }), _jsx(Route, { path: "/login", element: _jsx(LoginForm, { onAuthSuccess: handleAuthSuccess }) }), _jsx(Route, { path: "/*", element: authed === null ? (_jsx("div", { className: "min-h-screen bg-paper flex items-center justify-center", children: _jsxs("div", { className: "flex flex-col items-center gap-4", children: [_jsx("div", { className: "w-8 h-8 border-2 border-gov border-t-transparent rounded-full animate-spin" }), _jsx("span", { className: "text-[12px] font-mono tracking-wider text-ink-3 uppercase", children: "Verifying Session..." })] }) })) : authed ? (_jsx(NotificationProvider, { children: _jsxs("div", { className: "min-h-screen bg-paper text-ink", children: [_jsx("a", { href: "#main-content", className: "sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-paper focus:text-ink", children: "Skip to main content" }), _jsx(AppSidebar, {}), _jsx("main", { id: "main-content", className: "ml-[256px] min-h-screen overflow-y-auto", children: _jsx(ErrorBoundary, { children: _jsxs(Routes, { children: [_jsx(Route, { path: "/", element: _jsx(Navigate, { to: "/focus", replace: true }) }), _jsx(Route, { path: "/focus", element: _jsx(FocusPage, {}) }), _jsx(Route, { path: "/pain", element: _jsx(PainPage, {}) }), _jsx(Route, { path: "/principles", element: _jsx(PrinciplesPage, {}) }), _jsx(Route, { path: "/principles/:id", element: _jsx(PrincipleDetailPage, {}) }), _jsx(Route, { path: "/activation", element: _jsx(ActivationPage, {}) }), _jsx(Route, { path: "/debt", element: _jsx(DebtPage, {}) }), _jsx(Route, { path: "/control-center", element: _jsx(ControlCenterPage, {}) }), _jsx(Route, { path: "/settings", element: _jsx(SettingsPage, {}) }), _jsx(Route, { path: "/update", element: _jsx(UpdatePage, {}) }), _jsx(Route, { path: "/report-problem", element: _jsx(ReportProblemPage, {}) }), _jsx(Route, { path: "/intent", element: _jsx(IntentPage, {}) }), IS_DEV && (_jsx(Route, { path: "/design-system", element: _jsx(DesignSystemPage, {}) })), !IS_DEV && (_jsx(Route, { path: "/design-system", element: _jsx(Navigate, { to: "/focus", replace: true }) }))] }) }) })] }) })) : (_jsx(Navigate, { to: "/login", replace: true })) })] }));
|
|
129
124
|
}
|
|
130
125
|
export function App() {
|
|
131
126
|
return (_jsx(ThemeProvider, { children: _jsxs(I18nextProvider, { i18n: i18n, children: [_jsx(HashRouter, { children: _jsx(AuthRoutes, {}) }), _jsx(Toaster, {})] }) }));
|
package/console/dist/ui/api.d.ts
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import type { ApiResponse } from "../types.js";
|
|
2
|
-
import type { FeedbackReportData, FeedbackDraftSummaryData, FeedbackDraftEnvelopeData, DeleteEnvelopeData, WorkspaceEntryData, RemovedEnvelopeData, SyncResultData, ConfigSummaryData, ConfigCatalogData, AgentBindingUpdateData, DefaultRuntimeUpdateData, OutputLanguageData, GovernanceQueueData, ActivationsData, DisableActivationData, LifecycleMetricsData, UpdateStatusData, UpdateHistoryData, ApplyUpdateResultData, RollbackResultData, ApprovalRecordData, PrinciplesListData, ApprovalsGroupedData, EvidenceChainData, TrajectoryData } from "./utils/validators.js";
|
|
2
|
+
import type { FeedbackReportData, FeedbackDraftSummaryData, FeedbackDraftEnvelopeData, DeleteEnvelopeData, WorkspaceEntryData, RemovedEnvelopeData, SyncResultData, ConfigSummaryData, ConfigCatalogData, AgentBindingUpdateData, DefaultRuntimeUpdateData, FeatureFlagUpdateData, OutputLanguageData, GovernanceQueueData, ActivationsData, DisableActivationData, LifecycleMetricsData, UpdateStatusData, UpdateHistoryData, ApplyUpdateResultData, RollbackResultData, ApprovalRecordData, PrinciplesListData, ApprovalsGroupedData, EvidenceChainData, TrajectoryData, IntentSummaryData, IntentDecisionRecordData, IntentDecisionResultData, IntentDecisionSummaryData, FollowUpResponseData } from "./utils/validators.js";
|
|
3
3
|
declare function getToken(): string | null;
|
|
4
4
|
declare function setToken(token: string): void;
|
|
5
5
|
declare function clearToken(): void;
|
|
6
|
-
/**
|
|
7
|
-
* Send an authenticated request to the Console API.
|
|
8
|
-
*
|
|
9
|
-
* Two overloads:
|
|
10
|
-
* 1. request(path, options?) → ApiResponse<unknown>
|
|
11
|
-
* For endpoints without a runtime validator (health checks, etc.).
|
|
12
|
-
* The caller receives unvalidated data and must not assume a specific shape.
|
|
13
|
-
*
|
|
14
|
-
* 2. request<T>(path, options, validate) → ApiResponse<T>
|
|
15
|
-
* For endpoints with a runtime validator. The validator is applied to the
|
|
16
|
-
* raw response; if validation fails, returns an error envelope instead.
|
|
17
|
-
*/
|
|
18
|
-
declare function request(path: string, options?: RequestInit): Promise<ApiResponse<unknown>>;
|
|
19
|
-
declare function request<T>(path: string, options: RequestInit | undefined, validate: (value: unknown) => T | null): Promise<ApiResponse<T>>;
|
|
20
6
|
declare function checkAuth(): Promise<boolean>;
|
|
21
7
|
declare function fetchWorkspaces(): Promise<ApiResponse<WorkspaceEntryData[]>>;
|
|
22
8
|
declare function addWorkspace(name: string, path: string): Promise<ApiResponse<WorkspaceEntryData>>;
|
|
@@ -24,8 +10,9 @@ declare function removeWorkspace(name: string): Promise<ApiResponse<RemovedEnvel
|
|
|
24
10
|
declare function syncWorkspace(name: string): Promise<ApiResponse<SyncResultData>>;
|
|
25
11
|
declare function fetchPrinciples(filter?: 'all' | 'actionable'): Promise<ApiResponse<PrinciplesListData>>;
|
|
26
12
|
declare function fetchPrincipleDetail(principleId: string): Promise<ApiResponse<unknown>>;
|
|
13
|
+
declare function archivePrinciple(principleId: string): Promise<ApiResponse<unknown>>;
|
|
14
|
+
declare function unarchivePrinciple(principleId: string): Promise<ApiResponse<unknown>>;
|
|
27
15
|
declare function fetchPrincipleTrajectory(principleId: string): Promise<ApiResponse<TrajectoryData>>;
|
|
28
|
-
declare function fetchApprovalDetail(approvalId: string): Promise<ApiResponse<ApprovalRecordData>>;
|
|
29
16
|
declare function approveApproval(approvalId: string, note?: string): Promise<ApiResponse<ApprovalRecordData>>;
|
|
30
17
|
declare function rejectApproval(approvalId: string, reason: string): Promise<ApiResponse<ApprovalRecordData>>;
|
|
31
18
|
declare function editApproval(approvalId: string, newArtifactId: string, editReason: string): Promise<ApiResponse<ApprovalRecordData>>;
|
|
@@ -39,6 +26,7 @@ declare function fetchConfigSummary(): Promise<ApiResponse<ConfigSummaryData>>;
|
|
|
39
26
|
declare function fetchConfigCatalog(): Promise<ApiResponse<ConfigCatalogData>>;
|
|
40
27
|
declare function updateAgentBinding(agentName: string, runtimeProfile: string, enabled: boolean): Promise<ApiResponse<AgentBindingUpdateData>>;
|
|
41
28
|
declare function updateDefaultRuntime(defaultRuntime: string): Promise<ApiResponse<DefaultRuntimeUpdateData>>;
|
|
29
|
+
declare function patchFeatureFlag(featureName: string, enabled: boolean): Promise<ApiResponse<FeatureFlagUpdateData>>;
|
|
42
30
|
declare function fetchOutputLanguage(): Promise<ApiResponse<OutputLanguageData>>;
|
|
43
31
|
declare function updateOutputLanguage(outputLanguage: string): Promise<ApiResponse<OutputLanguageData>>;
|
|
44
32
|
declare function fetchGovernanceQueue(): Promise<ApiResponse<GovernanceQueueData>>;
|
|
@@ -51,8 +39,46 @@ declare function fetchUpdateHistory(): Promise<ApiResponse<UpdateHistoryData>>;
|
|
|
51
39
|
declare function applyUpdate(): Promise<ApiResponse<ApplyUpdateResultData>>;
|
|
52
40
|
declare function rollbackUpdate(backupDir: string): Promise<ApiResponse<RollbackResultData>>;
|
|
53
41
|
declare function fetchEvidenceChain(): Promise<ApiResponse<EvidenceChainData>>;
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
declare function fetchIntentSummary(): Promise<ApiResponse<IntentSummaryData>>;
|
|
43
|
+
/**
|
|
44
|
+
* Frontend-friendly payload for recording an Owner decision on an intent tension.
|
|
45
|
+
* Field names match the server's `IntentDecisionInput` contract (SPEC §21.7).
|
|
46
|
+
*/
|
|
47
|
+
export interface IntentDecisionInputPayload {
|
|
48
|
+
id: string;
|
|
49
|
+
taskId: string;
|
|
50
|
+
source: string;
|
|
51
|
+
evidenceStrength: string;
|
|
52
|
+
relatedIntentFields: string[];
|
|
53
|
+
evidenceRefs: string[];
|
|
54
|
+
ownerAction: string;
|
|
55
|
+
painId?: string;
|
|
56
|
+
intentDocHash?: string;
|
|
57
|
+
note?: string;
|
|
58
|
+
}
|
|
59
|
+
declare function recordIntentDecision(payload: IntentDecisionInputPayload): Promise<ApiResponse<IntentDecisionResultData>>;
|
|
60
|
+
declare function listIntentDecisionsByPainId(painId: string): Promise<ApiResponse<IntentDecisionRecordData[]>>;
|
|
61
|
+
declare function listIntentDecisionsByTaskId(taskId: string): Promise<ApiResponse<IntentDecisionRecordData[]>>;
|
|
62
|
+
declare function fetchIntentDecisionSummary(): Promise<ApiResponse<IntentDecisionSummaryData>>;
|
|
63
|
+
/**
|
|
64
|
+
* Payload for dispatching a governed follow-up action after an Owner decision
|
|
65
|
+
* has been persisted (SPEC §22.1.4).
|
|
66
|
+
*
|
|
67
|
+
* - `link_candidate`: link an existing principle candidate to this decision.
|
|
68
|
+
* `candidateId` is required.
|
|
69
|
+
* - `guide_rulehost`: get CLI guidance for promoting to RuleHost. No DB write.
|
|
70
|
+
* - `generate_patch_proposal`: generate a read-only Intent Patch Proposal.
|
|
71
|
+
*
|
|
72
|
+
* The server validates `type` and `candidateId` (when required); the frontend
|
|
73
|
+
* trusts the server to fail loud on invalid input (Rule 3).
|
|
74
|
+
*/
|
|
75
|
+
export interface FollowUpPayload {
|
|
76
|
+
type: 'link_candidate' | 'guide_rulehost' | 'generate_patch_proposal';
|
|
77
|
+
candidateId?: string;
|
|
78
|
+
}
|
|
79
|
+
declare function dispatchFollowUp(decisionId: string, payload: FollowUpPayload): Promise<ApiResponse<FollowUpResponseData>>;
|
|
80
|
+
export { getToken, setToken, clearToken, checkAuth, approveApproval, rejectApproval, editApproval, fetchPrinciples, fetchPrincipleDetail, fetchPrincipleTrajectory, archivePrinciple, unarchivePrinciple, createFeedbackReport, listFeedbackReports, getFeedbackReport, deleteFeedbackReport, fetchConfigSummary, fetchConfigCatalog, updateAgentBinding, updateDefaultRuntime, patchFeatureFlag, fetchOutputLanguage, updateOutputLanguage, fetchWorkspaces, addWorkspace, removeWorkspace, syncWorkspace, fetchGovernanceQueue, fetchApprovalsGrouped, fetchAllActivations, disableActivation, fetchLifecycleMetrics, fetchUpdateStatus, fetchUpdateHistory, applyUpdate, rollbackUpdate, fetchEvidenceChain, fetchIntentSummary, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
81
|
+
export type { FeedbackReportData, FeedbackDraftSummaryData, FeedbackDraftEnvelopeData, DeleteEnvelopeData, WorkspaceEntryData, RemovedEnvelopeData, SyncResultData, ConfigSummaryData, ConfigCatalogData, AgentBindingUpdateData, DefaultRuntimeUpdateData, FeatureFlagUpdateData, OutputLanguageData, GovernanceQueueData, ActivationsData, DisableActivationData, LifecycleMetricsData, UpdateStatusData, UpdateHistoryData, ApplyUpdateResultData, RollbackResultData, ApprovalRecordData, PrinciplesListData, ApprovalsGroupedData, EvidenceChainData, EvidenceChainRecordData, EvidenceChainStateData, TrajectoryData, TrajectoryStageData, IntentSummaryData, IntentSectionsData, IntentDocWarningData, IntentDecisionRecordData, IntentDecisionResultData, IntentDecisionSummaryData, FollowUpResponseData, LinkCandidateFollowUpData, GuideRulehostFollowUpData, GeneratePatchProposalFollowUpData, } from "./utils/validators.js";
|
|
56
82
|
export type { ActivationRecordData as ActivationRecord } from "./utils/validators.js";
|
|
57
83
|
export type { ApprovalRecordData as ApprovalRecord } from "./utils/validators.js";
|
|
58
84
|
export type { WorkspaceEntryData as WorkspaceEntry } from "./utils/validators.js";
|
package/console/dist/ui/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { validateErrorResponse, validateHeaders, validateFeedbackReport, validateFeedbackDraftsList, validateFeedbackDraftEnvelope, validateDeleteEnvelope, validateWorkspaceEntry, validateWorkspaceList, validateRemovedEnvelope, validateSyncResult, validateConfigSummary, validateConfigCatalog, validateAgentBindingUpdate, validateDefaultRuntimeUpdate, validateOutputLanguage, validateGovernanceQueue, validateActivations, validateDisableActivation, validateLifecycleMetrics, validateUpdateStatus, validateUpdateHistory, validateApplyUpdateResult, validateRollbackResult, validateApprovalRecordDirect, validatePrinciplesList, validateApprovalsGrouped, validateEvidenceChain, validateTrajectoryData, } from "./utils/validators.js";
|
|
1
|
+
import { validateErrorResponse, validateHeaders, validateFeedbackReport, validateFeedbackDraftsList, validateFeedbackDraftEnvelope, validateDeleteEnvelope, validateWorkspaceEntry, validateWorkspaceList, validateRemovedEnvelope, validateSyncResult, validateConfigSummary, validateConfigCatalog, validateAgentBindingUpdate, validateDefaultRuntimeUpdate, validateFeatureFlagUpdate, validateOutputLanguage, validateGovernanceQueue, validateActivations, validateDisableActivation, validateLifecycleMetrics, validateUpdateStatus, validateUpdateHistory, validateApplyUpdateResult, validateRollbackResult, validateApprovalRecordDirect, validatePrinciplesList, validateApprovalsGrouped, validateEvidenceChain, validateTrajectoryData, validateIntentSummary, validateIntentDecisionList, validateIntentDecisionResult, validateIntentDecisionSummary, validateFollowUpResponse, } from "./utils/validators.js";
|
|
2
2
|
// ── Auth ──────────────────────────────────────────────────────────────────────
|
|
3
3
|
function getToken() {
|
|
4
4
|
return sessionStorage.getItem("pd_token");
|
|
@@ -114,14 +114,21 @@ async function fetchPrinciples(filter) {
|
|
|
114
114
|
async function fetchPrincipleDetail(principleId) {
|
|
115
115
|
return request(`/api/principles/${encodeURIComponent(principleId)}`);
|
|
116
116
|
}
|
|
117
|
+
async function archivePrinciple(principleId) {
|
|
118
|
+
return request(`/api/principles/${encodeURIComponent(principleId)}/archive`, {
|
|
119
|
+
method: "POST",
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
async function unarchivePrinciple(principleId) {
|
|
123
|
+
return request(`/api/principles/${encodeURIComponent(principleId)}/unarchive`, {
|
|
124
|
+
method: "POST",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
117
127
|
// ── Principle Trajectory ──────────────────────────────────────────────────────
|
|
118
128
|
async function fetchPrincipleTrajectory(principleId) {
|
|
119
129
|
return request(`/api/principles/${encodeURIComponent(principleId)}/trajectory`, undefined, validateTrajectoryData);
|
|
120
130
|
}
|
|
121
131
|
// ── Approvals ─────────────────────────────────────────────────────────────────
|
|
122
|
-
async function fetchApprovalDetail(approvalId) {
|
|
123
|
-
return request('/api/v1/approvals/' + encodeURIComponent(approvalId), undefined, validateApprovalRecordDirect);
|
|
124
|
-
}
|
|
125
132
|
async function approveApproval(approvalId, note) {
|
|
126
133
|
return request('/api/v1/approvals/' + encodeURIComponent(approvalId) + '/approve', {
|
|
127
134
|
method: 'POST',
|
|
@@ -183,6 +190,13 @@ async function updateDefaultRuntime(defaultRuntime) {
|
|
|
183
190
|
body: JSON.stringify({ defaultRuntime }),
|
|
184
191
|
}, validateDefaultRuntimeUpdate);
|
|
185
192
|
}
|
|
193
|
+
// ── Feature Flag Toggle (spec 2026-06-27 §13.5) ─────────────────────────────
|
|
194
|
+
async function patchFeatureFlag(featureName, enabled) {
|
|
195
|
+
return request(`/api/v1/config/features/${encodeURIComponent(featureName)}`, {
|
|
196
|
+
method: 'PATCH',
|
|
197
|
+
body: JSON.stringify({ enabled }),
|
|
198
|
+
}, validateFeatureFlagUpdate);
|
|
199
|
+
}
|
|
186
200
|
// ── Principles Output Language (PRI-332 P1-1) ────────────────────────────────
|
|
187
201
|
async function fetchOutputLanguage() {
|
|
188
202
|
return request('/api/v1/config/principles/output-language', undefined, validateOutputLanguage);
|
|
@@ -235,5 +249,30 @@ async function rollbackUpdate(backupDir) {
|
|
|
235
249
|
async function fetchEvidenceChain() {
|
|
236
250
|
return request('/api/v1/evidence-chain', undefined, validateEvidenceChain);
|
|
237
251
|
}
|
|
252
|
+
// ── Intent Summary (PRI-466) ─────────────────────────────────────────────────
|
|
253
|
+
async function fetchIntentSummary() {
|
|
254
|
+
return request('/api/v1/intent', undefined, validateIntentSummary);
|
|
255
|
+
}
|
|
256
|
+
async function recordIntentDecision(payload) {
|
|
257
|
+
return request('/api/v1/intent-decisions', {
|
|
258
|
+
method: 'POST',
|
|
259
|
+
body: JSON.stringify(payload),
|
|
260
|
+
}, validateIntentDecisionResult);
|
|
261
|
+
}
|
|
262
|
+
async function listIntentDecisionsByPainId(painId) {
|
|
263
|
+
return request(`/api/v1/intent-decisions?painId=${encodeURIComponent(painId)}`, undefined, validateIntentDecisionList);
|
|
264
|
+
}
|
|
265
|
+
async function listIntentDecisionsByTaskId(taskId) {
|
|
266
|
+
return request(`/api/v1/intent-decisions?taskId=${encodeURIComponent(taskId)}`, undefined, validateIntentDecisionList);
|
|
267
|
+
}
|
|
268
|
+
async function fetchIntentDecisionSummary() {
|
|
269
|
+
return request('/api/v1/intent-decisions/summary', undefined, validateIntentDecisionSummary);
|
|
270
|
+
}
|
|
271
|
+
async function dispatchFollowUp(decisionId, payload) {
|
|
272
|
+
return request(`/api/v1/intent-decisions/${encodeURIComponent(decisionId)}/follow-up`, {
|
|
273
|
+
method: 'POST',
|
|
274
|
+
body: JSON.stringify(payload),
|
|
275
|
+
}, validateFollowUpResponse);
|
|
276
|
+
}
|
|
238
277
|
// ── Exports ───────────────────────────────────────────────────────────────────
|
|
239
|
-
export { getToken, setToken, clearToken, checkAuth,
|
|
278
|
+
export { getToken, setToken, clearToken, checkAuth, approveApproval, rejectApproval, editApproval, fetchPrinciples, fetchPrincipleDetail, fetchPrincipleTrajectory, archivePrinciple, unarchivePrinciple, createFeedbackReport, listFeedbackReports, getFeedbackReport, deleteFeedbackReport, fetchConfigSummary, fetchConfigCatalog, updateAgentBinding, updateDefaultRuntime, patchFeatureFlag, fetchOutputLanguage, updateOutputLanguage, fetchWorkspaces, addWorkspace, removeWorkspace, syncWorkspace, fetchGovernanceQueue, fetchApprovalsGrouped, fetchAllActivations, disableActivation, fetchLifecycleMetrics, fetchUpdateStatus, fetchUpdateHistory, applyUpdate, rollbackUpdate, fetchEvidenceChain, fetchIntentSummary, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Link, useLocation, useNavigate } from "react-router-dom";
|
|
3
|
-
import { Sun, Moon, Focus, AlertTriangle, BookOpen, Zap, Archive, Settings, MessageSquare, RefreshCw, LogOut, Languages, } from "lucide-react";
|
|
3
|
+
import { Sun, Moon, Focus, AlertTriangle, BookOpen, Zap, Archive, Compass, Settings, MessageSquare, RefreshCw, LogOut, Languages, } from "lucide-react";
|
|
4
4
|
import { useTheme } from "../theme-provider.js";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { useNotifications } from "../notifications/useNotifications.js";
|
|
@@ -15,6 +15,7 @@ const mainNavItems = [
|
|
|
15
15
|
{ id: "principles", labelKey: "components.sidebar.principles", href: "/principles", icon: BookOpen, shortcut: "Alt+5" },
|
|
16
16
|
{ id: "activation", labelKey: "components.sidebar.activation", href: "/activation", icon: Zap, shortcut: "Alt+6" },
|
|
17
17
|
{ id: "debt", labelKey: "components.sidebar.debt", href: "/debt", icon: Archive, shortcut: "Alt+7" },
|
|
18
|
+
{ id: "intent", labelKey: "components.sidebar.intent", href: "/intent", icon: Compass, shortcut: "" },
|
|
18
19
|
];
|
|
19
20
|
const toolNavItems = [
|
|
20
21
|
{ id: "control-center", labelKey: "components.sidebar.controlCenter", href: "/control-center", icon: Settings, shortcut: "Alt+8" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | "
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "green" | "amber" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "
|
|
4
|
+
variant?: "link" | "default" | "quiet" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ElementType, type ReactNode } from "react";
|
|
2
|
+
export interface ShinyTextProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Animation duration in seconds (default: 4) */
|
|
7
|
+
duration?: number;
|
|
8
|
+
/** Brightness of the shine effect (0.0-1.0, default: 0.6) */
|
|
9
|
+
brightness?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Underlying element to render. Defaults to "span". Use "h1" (etc.) when
|
|
12
|
+
* wrapping a page title so heading semantics are preserved for assistive
|
|
13
|
+
* tech — the shimmer is a visual effect, not a structural change.
|
|
14
|
+
*/
|
|
15
|
+
as?: ElementType;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* ShinyText - A subtle shimmer animation for page titles
|
|
19
|
+
*
|
|
20
|
+
* Uses CSS gradient mask to create a gentle light sweep effect across text.
|
|
21
|
+
* Respects prefers-reduced-motion accessibility preference.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <ShinyText as="h1" duration={4} brightness={0.6}>
|
|
25
|
+
* 现在,值得你判断的事
|
|
26
|
+
* </ShinyText>
|
|
27
|
+
*/
|
|
28
|
+
export declare function ShinyText({ children, className, disabled, duration, brightness, as: Component, }: ShinyTextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* ShinyText - A subtle shimmer animation for page titles
|
|
5
|
+
*
|
|
6
|
+
* Uses CSS gradient mask to create a gentle light sweep effect across text.
|
|
7
|
+
* Respects prefers-reduced-motion accessibility preference.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <ShinyText as="h1" duration={4} brightness={0.6}>
|
|
11
|
+
* 现在,值得你判断的事
|
|
12
|
+
* </ShinyText>
|
|
13
|
+
*/
|
|
14
|
+
export function ShinyText({ children, className = "", disabled = false, duration = 4, brightness = 0.6, as: Component = "span", }) {
|
|
15
|
+
const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
// Check for reduced motion preference
|
|
18
|
+
const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
19
|
+
setPrefersReducedMotion(mediaQuery.matches);
|
|
20
|
+
// Listen for changes
|
|
21
|
+
const handleChange = (e) => {
|
|
22
|
+
setPrefersReducedMotion(e.matches);
|
|
23
|
+
};
|
|
24
|
+
mediaQuery.addEventListener("change", handleChange);
|
|
25
|
+
return () => mediaQuery.removeEventListener("change", handleChange);
|
|
26
|
+
}, []);
|
|
27
|
+
// Disable animation if user prefers reduced motion or explicitly disabled
|
|
28
|
+
const isDisabled = disabled || prefersReducedMotion;
|
|
29
|
+
if (isDisabled) {
|
|
30
|
+
return _jsx(Component, { className: className, children: children });
|
|
31
|
+
}
|
|
32
|
+
const style = {
|
|
33
|
+
background: `linear-gradient(
|
|
34
|
+
110deg,
|
|
35
|
+
currentColor 45%,
|
|
36
|
+
rgba(255, 255, 255, ${brightness}) 50%,
|
|
37
|
+
currentColor 55%
|
|
38
|
+
)`,
|
|
39
|
+
backgroundSize: "200% 100%",
|
|
40
|
+
WebkitBackgroundClip: "text",
|
|
41
|
+
backgroundClip: "text",
|
|
42
|
+
WebkitTextFillColor: "transparent",
|
|
43
|
+
animation: `shimmer ${duration}s linear infinite`,
|
|
44
|
+
};
|
|
45
|
+
return (_jsx(Component, { className: className, style: style, children: children }));
|
|
46
|
+
}
|
|
@@ -226,7 +226,65 @@
|
|
|
226
226
|
"noHumanSummary": "PD has not yet generated a behavior summary for this evidence",
|
|
227
227
|
"inReviewQueueCount": "{{count}} item(s) entered the review queue",
|
|
228
228
|
"goToGovernance": "Go to Governance Focus",
|
|
229
|
-
"expandTechDetails": "Expand technical details"
|
|
229
|
+
"expandTechDetails": "Expand technical details",
|
|
230
|
+
"intentTensionTitle": "Intent Tension",
|
|
231
|
+
"intentTensionSourceLabel": "Source",
|
|
232
|
+
"intentTensionSourceNone": "No intent tension",
|
|
233
|
+
"intentTensionSourceActionDrift": "Action drift",
|
|
234
|
+
"intentTensionSourceIntentSuspect": "Intent suspect",
|
|
235
|
+
"intentTensionSourceHealthyTension": "Healthy tension",
|
|
236
|
+
"intentTensionEvidenceStrengthLabel": "Evidence strength",
|
|
237
|
+
"intentTensionEvidenceStrengthWeak": "Weak",
|
|
238
|
+
"intentTensionEvidenceStrengthModerate": "Moderate",
|
|
239
|
+
"intentTensionEvidenceStrengthStrong": "Strong",
|
|
240
|
+
"intentTensionRelatedIntentFieldsLabel": "Related INTENT fields",
|
|
241
|
+
"intentTensionEvidenceLabel": "Evidence",
|
|
242
|
+
"intentTensionExplanationLabel": "Explanation",
|
|
243
|
+
"intentTensionSuggestedActionLabel": "Suggested owner action",
|
|
244
|
+
"intentTensionSuggestedActionConfirmDrift": "Confirm drift",
|
|
245
|
+
"intentTensionSuggestedActionReviseIntent": "Revise intent",
|
|
246
|
+
"intentTensionSuggestedActionObserve": "Observe",
|
|
247
|
+
"intentTensionSuggestedActionDismiss": "Dismiss",
|
|
248
|
+
"intentTensionSuggestedActionPromoteToPrinciple": "Promote to principle",
|
|
249
|
+
"intentTensionSuggestedActionPromoteToRulehost": "Promote to RuleHost",
|
|
250
|
+
"intentTensionIntentDocHashLabel": "INTENT doc hash",
|
|
251
|
+
"intentTensionNoTension": "No intent tension detected",
|
|
252
|
+
"intentTensionArtifactDegraded": "Diagnostician artifact for this record could not be fully parsed; intent tension may be unavailable.",
|
|
253
|
+
"ownerDecisionPanelTitle": "Owner Decision",
|
|
254
|
+
"ownerDecisionPanelSubtitle": "Record your decision on this intent tension. Follow-up actions appear only after a decision is persisted.",
|
|
255
|
+
"ownerDecisionNoteLabel": "Note (optional)",
|
|
256
|
+
"ownerDecisionNotePlaceholder": "Add context for this decision",
|
|
257
|
+
"ownerDecisionSubmitConfirmDrift": "Confirm Drift",
|
|
258
|
+
"ownerDecisionSubmitReviseIntent": "Revise Intent",
|
|
259
|
+
"ownerDecisionSubmitObserve": "Observe",
|
|
260
|
+
"ownerDecisionSubmitDismiss": "Dismiss",
|
|
261
|
+
"ownerDecisionSubmitPromoteToPrinciple": "Promote to Principle",
|
|
262
|
+
"ownerDecisionSubmitPromoteToRulehost": "Promote to RuleHost",
|
|
263
|
+
"ownerDecisionSubmitting": "Recording decision…",
|
|
264
|
+
"ownerDecisionRecorded": "Decision recorded",
|
|
265
|
+
"ownerDecisionFailed": "Failed to record decision",
|
|
266
|
+
"ownerDecisionExisting": "A decision already exists for this tension",
|
|
267
|
+
"ownerDecisionFollowUpPlaceholder": "Follow-up actions will appear here after the decision is recorded.",
|
|
268
|
+
"ownerDecisionLoadingExisting": "Loading existing decisions…",
|
|
269
|
+
"ownerDecisionLoadFailed": "Failed to load existing decisions",
|
|
270
|
+
"followUpActionsTitle": "Follow-up actions",
|
|
271
|
+
"followUpDispatching": "Dispatching…",
|
|
272
|
+
"followUpDispatchFailed": "Failed to dispatch follow-up action",
|
|
273
|
+
"followUpLinkCandidateDescription": "Link an existing principle candidate to this decision. PD does not create a new candidate — link one from the evidence chain or paste a candidate id.",
|
|
274
|
+
"followUpLinkCandidateButton": "Link Candidate",
|
|
275
|
+
"followUpCandidateIdPlaceholder": "Paste candidate id",
|
|
276
|
+
"followUpCandidateIdAriaLabel": "Principle candidate id to link",
|
|
277
|
+
"followUpPrefilledFromEvidenceChain": "Prefilled from the evidence chain linked candidate.",
|
|
278
|
+
"followUpLinkedSuccess": "Linked candidate",
|
|
279
|
+
"followUpGuideRulehostDescription": "Get the CLI command to promote this decision to a RuleHost candidate. PD will create an approval that you can review in the Governance Queue.",
|
|
280
|
+
"followUpGuideRulehostButton": "View RuleHost Guidance",
|
|
281
|
+
"followUpCliCommandLabel": "CLI command",
|
|
282
|
+
"followUpPatchProposalDescription": "Generate a read-only Intent Patch Proposal. The proposal summarizes the tension and suggests where INTENT.md may need revision. PD never auto-applies the patch.",
|
|
283
|
+
"followUpViewPatchProposalButton": "View Intent Patch Proposal",
|
|
284
|
+
"followUpPatchProposalLabel": "Intent Patch Proposal",
|
|
285
|
+
"followUpPatchProposalReadOnlyBadge": "Display only",
|
|
286
|
+
"followUpPatchProposalWarning": "Display only — cannot be auto-applied. The Owner must manually edit .principles/INTENT.md if they accept this proposal.",
|
|
287
|
+
"followUpPromoteToPrincipleDescription": "Link an existing principle candidate to sediment this decision. PD does not create a new candidate — link one from the evidence chain or paste a candidate id."
|
|
230
288
|
},
|
|
231
289
|
"principles": {
|
|
232
290
|
"title": "Principles",
|
|
@@ -589,7 +647,12 @@
|
|
|
589
647
|
"agentEnabled": "Enabled",
|
|
590
648
|
"agentDisabled": "Disabled",
|
|
591
649
|
"profileLabel": "Profile",
|
|
592
|
-
"readinessLabel": "Readiness"
|
|
650
|
+
"readinessLabel": "Readiness",
|
|
651
|
+
"empathyCostHint": {
|
|
652
|
+
"body": "Empathy Observer is on — every unmatched message triggers an LLM call (current model: {{provider}}/{{model}}).",
|
|
653
|
+
"muted": "To reduce cost, switch pd-empathy-observer.policy.model in workflows.yaml to a cheaper model.",
|
|
654
|
+
"ack": "Got it"
|
|
655
|
+
}
|
|
593
656
|
},
|
|
594
657
|
"login": {
|
|
595
658
|
"title": "Login",
|
|
@@ -640,6 +703,106 @@
|
|
|
640
703
|
"filesUpdated": "Updated {{count}} files",
|
|
641
704
|
"networkErrorHint": "Please check your network connection and try again.",
|
|
642
705
|
"retry": "Retry"
|
|
706
|
+
},
|
|
707
|
+
"intent": {
|
|
708
|
+
"eyebrow": "Owner Intent",
|
|
709
|
+
"title": "Owner Intent Document",
|
|
710
|
+
"subtitle": "A single-page anchor for what the owner wants, what must not be violated, and where to escalate. Read by PD only when the intent_engineering flag is on.",
|
|
711
|
+
"flagStatus": {
|
|
712
|
+
"enabled": "Flag on",
|
|
713
|
+
"disabled": "Flag off",
|
|
714
|
+
"ariaLabel": "intent_engineering feature flag status",
|
|
715
|
+
"enable": "Enable Intent Engineering",
|
|
716
|
+
"enabling": "Enabling…",
|
|
717
|
+
"enableFailed": "Failed to enable. Try again later or manually edit .pd/config.yaml"
|
|
718
|
+
},
|
|
719
|
+
"editEntry": {
|
|
720
|
+
"heading": "Edit INTENT.md",
|
|
721
|
+
"title": "Owner-owned document",
|
|
722
|
+
"description": "PD never modifies this file. Edit it in your own editor to declare or revise your intent.",
|
|
723
|
+
"copy": "Copy path",
|
|
724
|
+
"copyAriaLabel": "Copy INTENT.md file path to clipboard"
|
|
725
|
+
},
|
|
726
|
+
"flagDisabled": {
|
|
727
|
+
"title": "Intent Engineering is off",
|
|
728
|
+
"description": "The intent_engineering feature flag is disabled. PD is not reading INTENT.md, not injecting intent context into prompts, and not surfacing intent tension in diagnosis. This is the default MVP-Quiet state."
|
|
729
|
+
},
|
|
730
|
+
"notFound": {
|
|
731
|
+
"title": "No INTENT.md found",
|
|
732
|
+
"description": "PD did not find an INTENT.md file in the .principles/ directory. Without this anchor, intent-grounded diagnosis cannot run.",
|
|
733
|
+
"nextAction": "Run: pd intent init --confirm --workspace <path>"
|
|
734
|
+
},
|
|
735
|
+
"oversized": {
|
|
736
|
+
"title": "INTENT.md exceeds 32KB",
|
|
737
|
+
"description": "The file is larger than the 32KB cap. PD refuses to read oversized files to keep intent parsing deterministic and bounded.",
|
|
738
|
+
"nextAction": "Trim INTENT.md to under 32KB. Move long-form strategy to a separate doc."
|
|
739
|
+
},
|
|
740
|
+
"sections": {
|
|
741
|
+
"why": "Why",
|
|
742
|
+
"desiredOutcome": "Desired Outcome",
|
|
743
|
+
"nonNegotiables": "Non-negotiables",
|
|
744
|
+
"stopEscalation": "Stop / Escalation",
|
|
745
|
+
"currentStrategicFocus": "Current Strategic Focus"
|
|
746
|
+
},
|
|
747
|
+
"warnings": {
|
|
748
|
+
"title": "Health Warnings",
|
|
749
|
+
"empty": "No warnings. INTENT.md is well-formed.",
|
|
750
|
+
"missing_section": "Missing section",
|
|
751
|
+
"empty_section": "Empty section",
|
|
752
|
+
"too_vague": "Section too vague (under 10 characters)",
|
|
753
|
+
"oversized": "Document exceeds 32KB cap",
|
|
754
|
+
"parse_failed": "Section failed to parse"
|
|
755
|
+
},
|
|
756
|
+
"meta": {
|
|
757
|
+
"title": "Document Metadata",
|
|
758
|
+
"lastEditedAt": "Last edited",
|
|
759
|
+
"contentHash": "Content hash",
|
|
760
|
+
"path": "Path",
|
|
761
|
+
"templateTitle": "INTENT.md Template",
|
|
762
|
+
"templateDescription": "Copy this into .principles/INTENT.md. Replace placeholders with your intent."
|
|
763
|
+
},
|
|
764
|
+
"loadError": "Failed to load intent document",
|
|
765
|
+
"validationError": "Data format validation failed, please refresh and retry",
|
|
766
|
+
"decisions": {
|
|
767
|
+
"sectionTitle": "Owner Decisions",
|
|
768
|
+
"sectionSubtitle": "Lightweight audit summary derived from IntentDecisionRecord. Not a dashboard.",
|
|
769
|
+
"countConfirmDrift": "Confirm drift",
|
|
770
|
+
"countReviseIntent": "Revise intent",
|
|
771
|
+
"countObserve": "Observe",
|
|
772
|
+
"countDismiss": "Dismiss",
|
|
773
|
+
"countPromoteToPrinciple": "Promote to principle",
|
|
774
|
+
"countPromoteToRulehost": "Promote to RuleHost",
|
|
775
|
+
"lastDecisionAtLabel": "Last decision",
|
|
776
|
+
"noDecisions": "No decisions recorded yet",
|
|
777
|
+
"loadError": "Failed to load decision summary"
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
"debt": {
|
|
781
|
+
"eyebrow": "Principle Debt",
|
|
782
|
+
"title": "Principle Debt Management",
|
|
783
|
+
"subtitle": "Review active principles that may be stagnant, never activated, or flagged as technical/behavioral debt.",
|
|
784
|
+
"emptyTitle": "No Principle Debts",
|
|
785
|
+
"emptyDescription": "Excellent! All your active principles are either recently active, verified in execution, or have no pending stagnation alerts.",
|
|
786
|
+
"reasonNeverActivated": "This principle has been approved but never deployed to any active channel (e.g. prompt, RuleHost).",
|
|
787
|
+
"reasonStagnant": "This principle approval request has been stagnant/pending for more than 7 days.",
|
|
788
|
+
"suggestedAction": "Suggested Action",
|
|
789
|
+
"actionArchive": "Archive",
|
|
790
|
+
"actionDeactivate": "Deactivate",
|
|
791
|
+
"actionKeep": "Keep and Observe",
|
|
792
|
+
"confirmArchive": "Archiving this principle will remove it from the active ruleset. Are you sure you want to archive?",
|
|
793
|
+
"confirmDeactivate": "Deactivating this channel will stop enforcing this rule at runtime. Are you sure you want to deactivate?",
|
|
794
|
+
"deactivateSuccess": "Channel deactivated successfully.",
|
|
795
|
+
"deactivateFailed": "Failed to deactivate channel.",
|
|
796
|
+
"archiveSuccess": "Principle archived successfully.",
|
|
797
|
+
"archiveFailed": "Failed to archive principle.",
|
|
798
|
+
"undoAction": "Undo",
|
|
799
|
+
"undoSuccess": "Operation undone successfully.",
|
|
800
|
+
"undoFailed": "Undo operation failed.",
|
|
801
|
+
"loadError": "Unable to load principle debt data. Please try refreshing the page.",
|
|
802
|
+
"daysSinceAgo": "{{count}} days ago",
|
|
803
|
+
"demoteTooltip": "Demote endpoint under development",
|
|
804
|
+
"principleAriaLabel": "Debt Principle {{id}}",
|
|
805
|
+
"listAriaLabel": "Debt principles list"
|
|
643
806
|
}
|
|
644
807
|
},
|
|
645
808
|
"components": {
|
|
@@ -699,7 +862,8 @@
|
|
|
699
862
|
"settings": "Settings",
|
|
700
863
|
"update": "Updates",
|
|
701
864
|
"pendingApprovalsAria": "{{count}} pending approvals",
|
|
702
|
-
"degradedSignalsAria": "{{count}} degraded signals"
|
|
865
|
+
"degradedSignalsAria": "{{count}} degraded signals",
|
|
866
|
+
"intent": "Owner Intent"
|
|
703
867
|
},
|
|
704
868
|
"approvalCard": {
|
|
705
869
|
"confidence": {
|