create-principles-disciple 1.100.0 → 1.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/console/dist/server/index.js +9 -0
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +37 -1
- package/console/dist/server/models/ActivationsConsoleModel.js +114 -13
- package/console/dist/server/routes/onboarding.d.ts +34 -0
- package/console/dist/server/routes/onboarding.js +324 -0
- package/console/dist/ui/App.js +74 -15
- package/console/dist/ui/api.d.ts +17 -1
- package/console/dist/ui/api.js +6 -1
- package/console/dist/ui/components/onboarding/CircuitDiagram.d.ts +8 -0
- package/console/dist/ui/components/onboarding/CircuitDiagram.js +18 -0
- package/console/dist/ui/components/onboarding/DemoResultView.d.ts +22 -0
- package/console/dist/ui/components/onboarding/DemoResultView.js +15 -0
- package/console/dist/ui/i18n/en.json +127 -0
- package/console/dist/ui/i18n/zh-CN.json +127 -0
- package/console/dist/ui/pages/activation/ActivationValidators.js +1 -1
- package/console/dist/ui/pages/control-center/AgentCard.js +10 -3
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +1 -1
- package/console/dist/ui/pages/settings/SettingsPage.js +64 -5
- package/console/dist/ui/pages/signal-keywords/KeywordEditDialog.d.ts +12 -0
- package/console/dist/ui/pages/signal-keywords/KeywordEditDialog.js +41 -0
- package/console/dist/ui/pages/signal-keywords/KeywordListSection.d.ts +10 -0
- package/console/dist/ui/pages/signal-keywords/KeywordListSection.js +39 -0
- package/console/dist/ui/pages/signal-keywords/PendingTermsSection.d.ts +14 -0
- package/console/dist/ui/pages/signal-keywords/PendingTermsSection.js +35 -0
- package/console/dist/ui/pages/signal-keywords/SignalKeywordsPage.d.ts +1 -0
- package/console/dist/ui/pages/signal-keywords/SignalKeywordsPage.js +49 -0
- package/console/dist/ui/pages/welcome/WelcomePage.d.ts +5 -0
- package/console/dist/ui/pages/welcome/WelcomePage.js +185 -0
- package/console/dist/ui/utils/__tests__/onboarding-state.test.d.ts +1 -0
- package/console/dist/ui/utils/__tests__/onboarding-state.test.js +72 -0
- package/console/dist/ui/utils/agent-metadata.d.ts +13 -0
- package/console/dist/ui/utils/agent-metadata.js +26 -0
- package/console/dist/ui/utils/onboarding-state.d.ts +25 -0
- package/console/dist/ui/utils/onboarding-state.js +77 -0
- package/console/dist/ui/utils/signal-keywords-api.d.ts +68 -0
- package/console/dist/ui/utils/signal-keywords-api.js +121 -0
- package/console/dist/ui/utils/signal-keywords-types.d.ts +57 -0
- package/console/dist/ui/utils/signal-keywords-types.js +10 -0
- package/console/dist/ui/utils/signal-keywords-validators.d.ts +20 -0
- package/console/dist/ui/utils/signal-keywords-validators.js +114 -0
- package/console/dist/web/assets/app.css +401 -0
- package/console/dist/web/assets/app.js +6904 -1835
- package/core/dist/index.d.ts +2 -0
- package/core/dist/index.d.ts.map +1 -1
- package/core/dist/index.js +1 -0
- package/core/dist/index.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/admission-gate.test.js +63 -1
- package/core/dist/runtime-v2/__tests__/admission-gate.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +21 -5
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/chain-integrity-attack.test.js +17 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-attack.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js +12 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js +28 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js +168 -1
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.js +8 -0
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js +53 -0
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/helpers.d.ts +21 -0
- package/core/dist/runtime-v2/activation/__tests__/helpers.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/helpers.js +132 -0
- package/core/dist/runtime-v2/activation/__tests__/helpers.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js +2 -117
- package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/activation-dispatcher.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/activation-dispatcher.js +18 -2
- package/core/dist/runtime-v2/activation/activation-dispatcher.js.map +1 -1
- package/core/dist/runtime-v2/activation/index.d.ts +1 -1
- package/core/dist/runtime-v2/activation/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/index.js +1 -1
- package/core/dist/runtime-v2/activation/index.js.map +1 -1
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js +253 -6
- 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 +12 -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 +96 -2
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -1
- package/core/dist/runtime-v2/admission-gate.d.ts +27 -0
- package/core/dist/runtime-v2/admission-gate.d.ts.map +1 -1
- package/core/dist/runtime-v2/admission-gate.js +55 -0
- package/core/dist/runtime-v2/admission-gate.js.map +1 -1
- package/core/dist/runtime-v2/cli/diagnose.d.ts +4 -0
- package/core/dist/runtime-v2/cli/diagnose.d.ts.map +1 -1
- package/core/dist/runtime-v2/cli/diagnose.js +25 -0
- package/core/dist/runtime-v2/cli/diagnose.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/internal-agent-names.test.d.ts +2 -0
- package/core/dist/runtime-v2/config/__tests__/internal-agent-names.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/internal-agent-names.test.js +15 -0
- package/core/dist/runtime-v2/config/__tests__/internal-agent-names.test.js.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-agent-binding.test.js +7 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-agent-binding.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js +28 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-redaction-deep.test.js +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-redaction-deep.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js.map +1 -1
- package/core/dist/runtime-v2/config/index.d.ts +5 -3
- package/core/dist/runtime-v2/config/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/index.js +8 -2
- package/core/dist/runtime-v2/config/index.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts +2 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js +12 -0
- package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js +25 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.js +6 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.js +9 -0
- package/core/dist/runtime-v2/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +110 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.js +7 -0
- package/core/dist/runtime-v2/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js +114 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-profile-constants.d.ts +27 -0
- package/core/dist/runtime-v2/config/pd-profile-constants.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/pd-profile-constants.js +145 -0
- package/core/dist/runtime-v2/config/pd-profile-constants.js.map +1 -0
- package/core/dist/runtime-v2/config/pd-validate-profile.d.ts +28 -0
- package/core/dist/runtime-v2/config/pd-validate-profile.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/pd-validate-profile.js +482 -0
- package/core/dist/runtime-v2/config/pd-validate-profile.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +26 -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__/plugin-surface-registry.test.js +12 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/plugin-surface-registry.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +8 -0
- 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 +8 -2
- package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +6 -4
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +5 -3
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js +25 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js +139 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js +20 -1
- 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.js +7 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js +21 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.js +23 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts +7 -0
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-output.js +22 -1
- package/core/dist/runtime-v2/internalization/artificer-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +2 -0
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.js +13 -0
- package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js +4 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +7 -1
- 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 +4 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +7 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/index.d.ts +1 -1
- package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/index.js +1 -1
- package/core/dist/runtime-v2/internalization/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-task-guards.d.ts +7 -0
- package/core/dist/runtime-v2/internalization/internalization-task-guards.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-task-guards.js +8 -0
- package/core/dist/runtime-v2/internalization/internalization-task-guards.js.map +1 -1
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.js +57 -1
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.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/runner/__tests__/diagnose.test.js +91 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnose.test.js.map +1 -1
- package/core/dist/runtime-v2/signal-collector/__tests__/keyword-stage.test.d.ts +2 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/keyword-stage.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/keyword-stage.test.js +39 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/keyword-stage.test.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/llm-stage.test.d.ts +2 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/llm-stage.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/llm-stage.test.js +34 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/llm-stage.test.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/signal-collector.test.d.ts +2 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/signal-collector.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/signal-collector.test.js +222 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/signal-collector.test.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/types.test.d.ts +2 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/types.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/types.test.js +35 -0
- package/core/dist/runtime-v2/signal-collector/__tests__/types.test.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/index.d.ts +5 -0
- package/core/dist/runtime-v2/signal-collector/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/index.js +5 -0
- package/core/dist/runtime-v2/signal-collector/index.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts +20 -0
- package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/keyword-stage.js +61 -0
- package/core/dist/runtime-v2/signal-collector/keyword-stage.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts +16 -0
- package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/llm-stage.js +34 -0
- package/core/dist/runtime-v2/signal-collector/llm-stage.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/signal-collector.d.ts +16 -0
- package/core/dist/runtime-v2/signal-collector/signal-collector.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/signal-collector.js +71 -0
- package/core/dist/runtime-v2/signal-collector/signal-collector.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/types.d.ts +61 -0
- package/core/dist/runtime-v2/signal-collector/types.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/types.js +45 -0
- package/core/dist/runtime-v2/signal-collector/types.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +19 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -1
- package/core/dist/runtime-v2/store/schema-conformance.test.js +73 -0
- package/core/dist/runtime-v2/store/schema-conformance.test.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.js +41 -7
- package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.js +22 -1
- package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime-v2/types/event-types.d.ts +40 -3
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js +9 -0
- package/core/dist/runtime-v2/types/event-types.js.map +1 -1
- package/core/dist/runtime-v2/types/index.d.ts +2 -2
- package/core/dist/runtime-v2/types/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/index.js +1 -1
- package/core/dist/runtime-v2/types/index.js.map +1 -1
- package/core/dist/workflow-funnel-loader.js +1 -1
- package/core/dist/workflow-funnel-loader.js.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +6 -0
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +3 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +167 -1
- package/dist/installer.js.map +1 -1
- package/dist/mvp-config.d.ts +8 -0
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +12 -2
- package/dist/mvp-config.js.map +1 -1
- package/package.json +1 -1
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
- package/pd-cli/dist/commands/candidate.js +89 -7
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts +3 -0
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +39 -14
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.d.ts +4 -0
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.js +244 -10
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/dist/index.js +7 -84
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.js +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/commands/context.js +17 -11
- package/plugin/dist/commands/samples.js +25 -0
- package/plugin/dist/core/event-log.d.ts +11 -1
- package/plugin/dist/core/event-log.js +13 -0
- package/plugin/dist/core/init.js +3 -4
- package/plugin/dist/core/rule-host.d.ts +68 -0
- package/plugin/dist/core/rule-host.js +167 -28
- package/plugin/dist/core/signal-collector-host.d.ts +105 -0
- package/plugin/dist/core/signal-collector-host.js +337 -0
- package/plugin/dist/hooks/prompt.d.ts +3 -2
- package/plugin/dist/hooks/prompt.js +47 -571
- package/plugin/dist/types/event-types.d.ts +1 -1
- package/plugin/dist/types.d.ts +5 -25
- package/plugin/dist/types.js +4 -9
- package/plugin/dist/utils/hashing.js +1 -1
package/console/dist/ui/App.js
CHANGED
|
@@ -8,7 +8,7 @@ import { AppSidebar } from "./components/layout/app-sidebar.js";
|
|
|
8
8
|
import { SplashScreen } from "./components/auth/splash-screen.js";
|
|
9
9
|
import { LoginForm } from "./components/auth/login-form.js";
|
|
10
10
|
import { ErrorBoundary } from "./components/error-boundary.js";
|
|
11
|
-
import { checkAuth } from "./api.js";
|
|
11
|
+
import { checkAuth, fetchConfigSummary, fetchWorkspaces } from "./api.js";
|
|
12
12
|
import { NotificationProvider } from "./components/notifications/NotificationProvider.js";
|
|
13
13
|
import { Toaster } from "./components/ui/sonner.js";
|
|
14
14
|
// New page imports (CR2 directory structure)
|
|
@@ -19,17 +19,27 @@ import { PrincipleDetailPage } from "./pages/principles/PrincipleDetailPage.js";
|
|
|
19
19
|
import { ActivationPage } from "./pages/activation/ActivationPage.js";
|
|
20
20
|
import { DebtPage } from "./pages/debt/DebtPage.js";
|
|
21
21
|
import { ControlCenterPage } from "./pages/control-center/ControlCenterPage.js";
|
|
22
|
+
import { SignalKeywordsPage } from "./pages/signal-keywords/SignalKeywordsPage.js";
|
|
22
23
|
import { SettingsPage } from "./pages/settings/SettingsPage.js";
|
|
23
24
|
import { UpdatePage } from "./pages/settings/UpdatePage.js";
|
|
24
25
|
import { ReportProblemPage } from "./pages/report-problem/ReportProblemPage.js";
|
|
25
26
|
import { IntentPage } from "./pages/intent/IntentPage.js";
|
|
26
27
|
import { DesignSystemPage } from "./pages/design-system/DesignSystemPage.js";
|
|
28
|
+
import { WelcomePage } from "./pages/welcome/WelcomePage.js";
|
|
29
|
+
import { getOnboardingState } from "./utils/onboarding-state.js";
|
|
27
30
|
// Vite replaces import.meta.env.DEV with a boolean literal at build time.
|
|
28
31
|
// The cast avoids TS2339 without needing a generated .d.ts file.
|
|
29
32
|
const IS_DEV = import.meta.env.DEV;
|
|
30
33
|
function AuthRoutes() {
|
|
31
34
|
const [authed, setAuthed] = useState(null);
|
|
32
35
|
const [showSplash, setShowSplash] = useState(true);
|
|
36
|
+
// Onboarding redirect needs workspaceId (for onboarding-state lookup) and
|
|
37
|
+
// feature flags (to gate the redirect). Both are fetched after auth.
|
|
38
|
+
const [currentWorkspaceId, setCurrentWorkspaceId] = useState("default");
|
|
39
|
+
const [featureFlags, setFeatureFlags] = useState(null);
|
|
40
|
+
// P2-C: tracks whether workspace fetch succeeded. If it failed, we skip
|
|
41
|
+
// the onboarding redirect so state isn't saved under a fake "default" key.
|
|
42
|
+
const [workspaceReady, setWorkspaceReady] = useState(false);
|
|
33
43
|
const navigate = useNavigate();
|
|
34
44
|
const verifyAuth = useCallback(async () => {
|
|
35
45
|
const valid = await checkAuth();
|
|
@@ -47,27 +57,76 @@ function AuthRoutes() {
|
|
|
47
57
|
// SplashScreen has its own 2200ms timer; we wait for it to call onComplete
|
|
48
58
|
// This effect only handles the case where auth resolves after splash is done
|
|
49
59
|
}, [authed, showSplash, navigate]);
|
|
60
|
+
// Fetch workspace list + feature flags after auth for onboarding redirect.
|
|
61
|
+
// P2-5: use Promise.all so both states update together — prevents the
|
|
62
|
+
// redirect effect from firing with the wrong workspaceId (race condition).
|
|
63
|
+
// rc-9: on fetch failure, set featureFlags to {} so the redirect effect
|
|
64
|
+
// fires (defaults to /focus — safe, no onboarding forced).
|
|
50
65
|
useEffect(() => {
|
|
51
|
-
if (authed
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
66
|
+
if (authed !== true)
|
|
67
|
+
return;
|
|
68
|
+
Promise.all([
|
|
69
|
+
fetchWorkspaces().catch(() => null),
|
|
70
|
+
fetchConfigSummary().catch(() => null),
|
|
71
|
+
]).then(([wsResult, cfgResult]) => {
|
|
72
|
+
// Update workspaceId first (if we have a real workspace)
|
|
73
|
+
if (wsResult &&
|
|
74
|
+
wsResult.success &&
|
|
75
|
+
Array.isArray(wsResult.data) &&
|
|
76
|
+
wsResult.data.length > 0) {
|
|
77
|
+
const firstWorkspace = wsResult.data[0];
|
|
78
|
+
if (firstWorkspace) {
|
|
79
|
+
setCurrentWorkspaceId(firstWorkspace.name);
|
|
80
|
+
// P2-C: only mark workspaceReady when we have a real workspace name.
|
|
81
|
+
setWorkspaceReady(true);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Then update featureFlags — the redirect effect waits for this.
|
|
85
|
+
// rc-9: on any failure, default to {} so redirect fires to /focus.
|
|
86
|
+
const flags = {};
|
|
87
|
+
if (cfgResult &&
|
|
88
|
+
cfgResult.success &&
|
|
89
|
+
cfgResult.data) {
|
|
90
|
+
const summary = cfgResult.data;
|
|
91
|
+
for (const f of summary.features) {
|
|
92
|
+
flags[f.id] = { enabled: f.enabled };
|
|
93
|
+
}
|
|
55
94
|
}
|
|
95
|
+
setFeatureFlags(flags);
|
|
96
|
+
});
|
|
97
|
+
}, [authed]);
|
|
98
|
+
// P1-4: After splash finishes, if user is not authenticated, go to login.
|
|
99
|
+
// (The authed === true case is handled by the redirect effect below.)
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (showSplash || authed !== false)
|
|
102
|
+
return;
|
|
103
|
+
navigate('/login', { replace: true });
|
|
104
|
+
}, [showSplash, authed, navigate]);
|
|
105
|
+
// First-visit redirect: check new_user_onboarding flag + onboarding state.
|
|
106
|
+
// P1-4: Only redirect AFTER splash is done AND featureFlags are loaded.
|
|
107
|
+
// This prevents the race where splash navigates to /focus before flags
|
|
108
|
+
// load, which would bypass the onboarding redirect entirely.
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (authed !== true || featureFlags === null || showSplash)
|
|
111
|
+
return;
|
|
112
|
+
const flagEnabled = featureFlags?.new_user_onboarding?.enabled === true;
|
|
113
|
+
// P2-C: if workspace fetch failed, don't force onboarding under "default" key.
|
|
114
|
+
if (flagEnabled && workspaceReady) {
|
|
115
|
+
const onboardingState = getOnboardingState(currentWorkspaceId);
|
|
116
|
+
navigate(onboardingState.completed ? '/focus' : '/welcome', { replace: true });
|
|
56
117
|
}
|
|
57
|
-
|
|
118
|
+
else {
|
|
119
|
+
navigate('/focus', { replace: true });
|
|
120
|
+
}
|
|
121
|
+
}, [authed, featureFlags, showSplash, currentWorkspaceId, workspaceReady, navigate]);
|
|
58
122
|
const handleAuthSuccess = useCallback(() => {
|
|
59
123
|
setAuthed(true);
|
|
60
|
-
|
|
61
|
-
|
|
124
|
+
// Post-auth redirect is handled by the authed + featureFlags effect above,
|
|
125
|
+
// which fires once feature flags have loaded.
|
|
126
|
+
}, []);
|
|
62
127
|
return (_jsxs(Routes, { children: [_jsx(Route, { path: "/splash", element: _jsx(SplashScreen, { onComplete: () => {
|
|
63
128
|
setShowSplash(false);
|
|
64
|
-
|
|
65
|
-
navigate("/focus", { replace: true });
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
navigate("/login", { replace: true });
|
|
69
|
-
}
|
|
70
|
-
} }) }), _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
|
+
} }) }), _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: "/welcome", element: _jsx(WelcomePage, { workspaceId: currentWorkspaceId }) }), _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: "/control-center/signal-keywords", element: _jsx(SignalKeywordsPage, {}) }), _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 })) })] }));
|
|
71
130
|
}
|
|
72
131
|
export function App() {
|
|
73
132
|
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,8 +1,23 @@
|
|
|
1
1
|
import type { ApiResponse } from "../types.js";
|
|
2
|
+
import { listActiveSignalKeywords, listPendingSignalTerms, fetchKeywordStore, fetchPendingTerms, updateKeywordStore, admitPendingTerm, rejectPendingTerm } from "./utils/signal-keywords-api.js";
|
|
2
3
|
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, IntentInitResultData, IntentSaveResultData, IntentRawContentData, IntentVersionData } from "./utils/validators.js";
|
|
3
4
|
declare function getToken(): string | null;
|
|
4
5
|
declare function setToken(token: string): void;
|
|
5
6
|
declare function clearToken(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Send an authenticated request to the Console API.
|
|
9
|
+
*
|
|
10
|
+
* Two overloads:
|
|
11
|
+
* 1. request(path, options?) → ApiResponse<unknown>
|
|
12
|
+
* For endpoints without a runtime validator (health checks, etc.).
|
|
13
|
+
* The caller receives unvalidated data and must not assume a specific shape.
|
|
14
|
+
*
|
|
15
|
+
* 2. request<T>(path, options, validate) → ApiResponse<T>
|
|
16
|
+
* For endpoints with a runtime validator. The validator is applied to the
|
|
17
|
+
* raw response; if validation fails, returns an error envelope instead.
|
|
18
|
+
*/
|
|
19
|
+
declare function request(path: string, options?: RequestInit): Promise<ApiResponse<unknown>>;
|
|
20
|
+
declare function request<T>(path: string, options: RequestInit | undefined, validate: (value: unknown) => T | null): Promise<ApiResponse<T>>;
|
|
6
21
|
declare function checkAuth(): Promise<boolean>;
|
|
7
22
|
declare function fetchWorkspaces(): Promise<ApiResponse<WorkspaceEntryData[]>>;
|
|
8
23
|
declare function addWorkspace(name: string, path: string): Promise<ApiResponse<WorkspaceEntryData>>;
|
|
@@ -91,8 +106,9 @@ export interface FollowUpPayload {
|
|
|
91
106
|
candidateId?: string;
|
|
92
107
|
}
|
|
93
108
|
declare function dispatchFollowUp(decisionId: string, payload: FollowUpPayload): Promise<ApiResponse<FollowUpResponseData>>;
|
|
94
|
-
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, fetchIntentContent, createIntentTemplate, saveIntentContent, fetchIntentVersions, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
109
|
+
export { request, listActiveSignalKeywords, listPendingSignalTerms, fetchKeywordStore, fetchPendingTerms, updateKeywordStore, admitPendingTerm, rejectPendingTerm, 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, fetchIntentContent, createIntentTemplate, saveIntentContent, fetchIntentVersions, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
95
110
|
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, IntentVersionEntry, IntentVersionData, } from "./utils/validators.js";
|
|
111
|
+
export type { SignalKeyword, PendingSignalTerm } from "./utils/signal-keywords-types.js";
|
|
96
112
|
export type { ActivationRecordData as ActivationRecord } from "./utils/validators.js";
|
|
97
113
|
export type { ApprovalRecordData as ApprovalRecord } from "./utils/validators.js";
|
|
98
114
|
export type { WorkspaceEntryData as WorkspaceEntry } from "./utils/validators.js";
|
package/console/dist/ui/api.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { listActiveSignalKeywords, listPendingSignalTerms, fetchKeywordStore, fetchPendingTerms, updateKeywordStore, admitPendingTerm, rejectPendingTerm, } from "./utils/signal-keywords-api.js";
|
|
1
2
|
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, validateIntentInitResult, validateIntentSaveResult, validateIntentRawContent, validateIntentVersions, } from "./utils/validators.js";
|
|
2
3
|
// ── Auth ──────────────────────────────────────────────────────────────────────
|
|
3
4
|
function getToken() {
|
|
@@ -308,4 +309,8 @@ async function dispatchFollowUp(decisionId, payload) {
|
|
|
308
309
|
}, validateFollowUpResponse);
|
|
309
310
|
}
|
|
310
311
|
// ── Exports ───────────────────────────────────────────────────────────────────
|
|
311
|
-
export {
|
|
312
|
+
export { request,
|
|
313
|
+
// signal-keywords (UI stubs, see signal-keywords-api.ts)
|
|
314
|
+
listActiveSignalKeywords, listPendingSignalTerms, fetchKeywordStore, fetchPendingTerms, updateKeywordStore, admitPendingTerm, rejectPendingTerm,
|
|
315
|
+
// auth
|
|
316
|
+
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, fetchIntentContent, createIntentTemplate, saveIntentContent, fetchIntentVersions, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface CircuitDiagramProps {
|
|
2
|
+
/** Highlight a specific node (evidence/principle/ownerGate/behavior) */
|
|
3
|
+
highlightNode?: 'evidence' | 'principle' | 'ownerGate' | 'behavior' | null;
|
|
4
|
+
/** Compact mode for smaller spaces */
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function CircuitDiagram({ highlightNode, compact }: CircuitDiagramProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
const NODES = [
|
|
4
|
+
{ id: 'evidence', labelKey: 'pages.welcome.step1.circuitNodes.evidence', cx: 80, cy: 80 },
|
|
5
|
+
{ id: 'principle', labelKey: 'pages.welcome.step1.circuitNodes.principle', cx: 240, cy: 80 },
|
|
6
|
+
{ id: 'ownerGate', labelKey: 'pages.welcome.step1.circuitNodes.ownerGate', cx: 240, cy: 180 },
|
|
7
|
+
{ id: 'behavior', labelKey: 'pages.welcome.step1.circuitNodes.behavior', cx: 80, cy: 180 },
|
|
8
|
+
];
|
|
9
|
+
export function CircuitDiagram({ highlightNode = null, compact = false }) {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const size = compact ? 240 : 320;
|
|
12
|
+
const nodeRadius = compact ? 28 : 36;
|
|
13
|
+
return (_jsx("div", { className: "circuit-diagram", role: "img", "aria-label": t('pages.welcome.step1.circuitLabel'), children: _jsxs("svg", { width: size, height: size * 0.75, viewBox: "0 0 320 240", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("line", { x1: NODES[0].cx, y1: NODES[0].cy, x2: NODES[1].cx, y2: NODES[1].cy, stroke: "var(--color-gov)", strokeWidth: "1.5" }), _jsx("line", { x1: NODES[1].cx, y1: NODES[1].cy, x2: NODES[2].cx, y2: NODES[2].cy, stroke: "var(--color-gov)", strokeWidth: "1.5" }), _jsx("line", { x1: NODES[2].cx, y1: NODES[2].cy, x2: NODES[3].cx, y2: NODES[3].cy, stroke: "var(--color-gov)", strokeWidth: "1.5" }), _jsx("line", { x1: NODES[3].cx, y1: NODES[3].cy, x2: NODES[0].cx, y2: NODES[0].cy, stroke: "var(--color-gov)", strokeWidth: "1.5" }), _jsx("polygon", { points: `${NODES[1].cx - 8},${NODES[1].cy - 4} ${NODES[1].cx - 8},${NODES[1].cy + 4} ${NODES[1].cx},${NODES[1].cy}`, fill: "var(--color-gov)" }), _jsx("polygon", { points: `${NODES[2].cx + 4},${NODES[2].cy - 8} ${NODES[2].cx - 4},${NODES[2].cy - 8} ${NODES[2].cx},${NODES[2].cy}`, fill: "var(--color-gov)" }), _jsx("polygon", { points: `${NODES[3].cx + 8},${NODES[3].cy - 4} ${NODES[3].cx + 8},${NODES[3].cy + 4} ${NODES[3].cx},${NODES[3].cy}`, fill: "var(--color-gov)" }), _jsx("polygon", { points: `${NODES[0].cx - 4},${NODES[0].cy + 8} ${NODES[0].cx + 4},${NODES[0].cy + 8} ${NODES[0].cx},${NODES[0].cy}`, fill: "var(--color-gov)" }), NODES.map((node) => {
|
|
14
|
+
const isHighlighted = highlightNode === node.id;
|
|
15
|
+
const isOwnerGate = node.id === 'ownerGate';
|
|
16
|
+
return (_jsxs("g", { children: [_jsx("circle", { cx: node.cx, cy: node.cy, r: nodeRadius, fill: isHighlighted ? 'var(--color-gov)' : 'var(--color-surface)', stroke: isOwnerGate ? 'var(--color-gov)' : 'var(--color-border)', strokeWidth: isOwnerGate ? 2.5 : 1.5 }), _jsx("text", { x: node.cx, y: node.cy, textAnchor: "middle", dominantBaseline: "middle", fontSize: compact ? 9 : 11, fill: isHighlighted ? 'white' : 'var(--color-ink)', fontFamily: "var(--font-sans)", children: t(node.labelKey) })] }, node.id));
|
|
17
|
+
})] }) }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface DemoStage {
|
|
2
|
+
name: string;
|
|
3
|
+
status: 'passed' | 'failed' | 'degraded' | 'skipped';
|
|
4
|
+
reason?: string;
|
|
5
|
+
nextAction?: string;
|
|
6
|
+
evidenceRef?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DemoResultData {
|
|
9
|
+
status: string;
|
|
10
|
+
generatedAt?: string;
|
|
11
|
+
narrative?: string;
|
|
12
|
+
storyDescription?: string;
|
|
13
|
+
stages?: DemoStage[];
|
|
14
|
+
simulated?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface DemoResultViewProps {
|
|
17
|
+
result: DemoResultData | null;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
error: string | null;
|
|
20
|
+
}
|
|
21
|
+
export declare function DemoResultView({ result, loading, error }: DemoResultViewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
export function DemoResultView({ result, loading, error }) {
|
|
4
|
+
const { t } = useTranslation();
|
|
5
|
+
if (loading) {
|
|
6
|
+
return (_jsx("div", { className: "demo-result-view demo-loading", role: "status", "aria-live": "polite", children: _jsx("span", { className: "demo-status-text", children: t('pages.welcome.step2.demoRunning') }) }));
|
|
7
|
+
}
|
|
8
|
+
if (error) {
|
|
9
|
+
return (_jsxs("div", { className: "demo-result-view demo-error", role: "alert", children: [_jsx("span", { className: "demo-status-text", children: t('pages.welcome.step2.demoFailed') }), _jsx("p", { className: "demo-error-detail", children: error })] }));
|
|
10
|
+
}
|
|
11
|
+
if (!result) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (_jsxs("div", { className: "demo-result-view", role: "region", "aria-label": t('pages.welcome.step2.demoComplete'), children: [result.simulated && (_jsx("div", { className: "demo-simulated-banner", role: "note", children: t('pages.welcome.step2.demoSimulatedNote') })), result.stages && result.stages.length > 0 && (_jsx("ol", { className: "demo-stages", children: result.stages.map((stage, idx) => (_jsxs("li", { className: `demo-stage demo-stage-${stage.status}`, children: [_jsx("span", { className: "demo-stage-name", children: stage.name }), stage.reason && _jsx("span", { className: "demo-stage-detail", children: stage.reason })] }, idx))) })), _jsxs("div", { className: "demo-labels", children: [_jsx("div", { className: "demo-label-item", children: _jsx("span", { className: "demo-label-title", children: t('pages.welcome.step2.evidenceLabel') }) }), _jsx("div", { className: "demo-label-item", children: _jsx("span", { className: "demo-label-title", children: t('pages.welcome.step2.candidateLabel') }) }), _jsx("div", { className: "demo-label-item", children: _jsx("span", { className: "demo-label-title", children: t('pages.welcome.step2.ownerGateLabel') }) }), _jsx("div", { className: "demo-label-item", children: _jsx("span", { className: "demo-label-title", children: t('pages.welcome.step2.activationLabel') }) }), _jsx("div", { className: "demo-label-item", children: _jsx("span", { className: "demo-label-title", children: t('pages.welcome.step2.rollbackLabel') }) })] })] }));
|
|
15
|
+
}
|
|
@@ -700,6 +700,61 @@
|
|
|
700
700
|
"unknownAgentsWarning": "Detected {{count}} unrecognized agent(s): {{names}}. They are not shown in groups.",
|
|
701
701
|
"footerNote": "9 agents are distributed across the internalization pipeline and sidechain services. The Core Trio must be enabled together — otherwise PD cannot turn errors into principles."
|
|
702
702
|
},
|
|
703
|
+
"signalKeywords": {
|
|
704
|
+
"title": "Signal Keywords",
|
|
705
|
+
"subtitle": "Manage signal keywords for agents — when the signal collector detects these keywords, it triggers deep analysis.",
|
|
706
|
+
"empty": "No signal keywords yet",
|
|
707
|
+
"loadError": "Failed to load signal keywords",
|
|
708
|
+
"saveError": "Failed to save",
|
|
709
|
+
"saving": "Saving…",
|
|
710
|
+
"searchPlaceholder": "Search keywords…",
|
|
711
|
+
"filterAll": "All",
|
|
712
|
+
"filterActive": "Active",
|
|
713
|
+
"filterArchived": "Archived",
|
|
714
|
+
"active": "Active",
|
|
715
|
+
"archived": "Archived",
|
|
716
|
+
"confirmDeleteTitle": "Confirm delete keyword",
|
|
717
|
+
"confirmDeleteMessage": "Are you sure you want to delete \"{{term}}\"? This action cannot be undone.",
|
|
718
|
+
"confirmDeleteAck": "Confirm delete",
|
|
719
|
+
"confirmDeleteCancel": "Cancel",
|
|
720
|
+
"deleteSuccess": "Deleted",
|
|
721
|
+
"archiveSuccess": "Archived",
|
|
722
|
+
"unarchiveSuccess": "Restored",
|
|
723
|
+
"phase2Tooltip": "This feature will be enabled in a future version",
|
|
724
|
+
"colTerm": "Term",
|
|
725
|
+
"colCategory": "Category",
|
|
726
|
+
"colPrecision": "Precision",
|
|
727
|
+
"colWeight": "Weight",
|
|
728
|
+
"colReason": "Reason",
|
|
729
|
+
"colActions": "Actions",
|
|
730
|
+
"categoryCorrection": "Correction",
|
|
731
|
+
"categoryEmpathy": "Empathy",
|
|
732
|
+
"precisionHigh": "High",
|
|
733
|
+
"precisionAmbiguous": "Ambiguous",
|
|
734
|
+
"nTerms": "{{count}} terms",
|
|
735
|
+
"selectedNOfTotal": "Selected {{selected}} of {{total}}",
|
|
736
|
+
"nTermsPendingReview": "{{count}} terms pending review",
|
|
737
|
+
"weightLabel": "Weight: {{percent}}%",
|
|
738
|
+
"addKeyword": "Add Keyword",
|
|
739
|
+
"addKeywordDialogTitle": "Add Signal Keyword",
|
|
740
|
+
"submitAdd": "Add",
|
|
741
|
+
"noSearchResults": "No matching keywords",
|
|
742
|
+
"pendingTerms": {
|
|
743
|
+
"title": "Pending Signal Terms",
|
|
744
|
+
"subtitle": "The signal collector suggests the following terms as potential keywords from unmatched messages. Review and confirm or ignore.",
|
|
745
|
+
"empty": "No pending signal terms",
|
|
746
|
+
"emptyDescription": "When the empathy observer detects recurring unmatched patterns, it will suggest new signal terms here.",
|
|
747
|
+
"confirm": "Confirm add",
|
|
748
|
+
"ignore": "Ignore",
|
|
749
|
+
"confirmBatch": "Confirm all",
|
|
750
|
+
"ignoreBatch": "Ignore all",
|
|
751
|
+
"sourceCount": "From {{count}} messages",
|
|
752
|
+
"confirmSuccess": "Confirmed",
|
|
753
|
+
"ignoreSuccess": "Ignored",
|
|
754
|
+
"batchConfirmSuccess": "Confirmed {{count}} terms",
|
|
755
|
+
"batchIgnoreSuccess": "Ignored {{count}} terms"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
703
758
|
"login": {
|
|
704
759
|
"title": "Login",
|
|
705
760
|
"description": "Login to PD Governance Workspace",
|
|
@@ -942,6 +997,61 @@
|
|
|
942
997
|
"demoteTooltip": "Demote endpoint under development",
|
|
943
998
|
"principleAriaLabel": "Debt Principle {{id}}",
|
|
944
999
|
"listAriaLabel": "Debt principles list"
|
|
1000
|
+
},
|
|
1001
|
+
"welcome": {
|
|
1002
|
+
"title": "Welcome to Principles Disciple",
|
|
1003
|
+
"subtitle": "Turn your repeated corrections into reviewed, reversible principles.",
|
|
1004
|
+
"stateSaveError": "Couldn't save onboarding progress. Check browser storage permissions and retry.",
|
|
1005
|
+
"stepIndicator": "Step {{current}} of {{total}}",
|
|
1006
|
+
"step1": {
|
|
1007
|
+
"title": "What is PD?",
|
|
1008
|
+
"description": "An owner-governed behavior internalization system. PD turns behavioral evidence into reviewed, reversible principles that shape future agent behavior.",
|
|
1009
|
+
"circuitLabel": "Core governance loop",
|
|
1010
|
+
"circuitNodes": {
|
|
1011
|
+
"evidence": "Evidence",
|
|
1012
|
+
"principle": "Principle",
|
|
1013
|
+
"ownerGate": "Owner Gate",
|
|
1014
|
+
"behavior": "Behavior Change"
|
|
1015
|
+
},
|
|
1016
|
+
"startButton": "Start",
|
|
1017
|
+
"skipButton": "Skip onboarding"
|
|
1018
|
+
},
|
|
1019
|
+
"step2": {
|
|
1020
|
+
"title": "See the full governance loop in action",
|
|
1021
|
+
"description": "This is a controlled demo using simulated evidence. In real use, your agent produces evidence through the pd-pain-signal skill.",
|
|
1022
|
+
"runDemoButton": "Run demo",
|
|
1023
|
+
"demoRunning": "Running demo...",
|
|
1024
|
+
"demoComplete": "Demo complete",
|
|
1025
|
+
"demoFailed": "Demo failed",
|
|
1026
|
+
"demoSimulatedNote": "This evidence is simulated for demo purposes.",
|
|
1027
|
+
"nextButton": "Next",
|
|
1028
|
+
"evidenceLabel": "Evidence (simulated)",
|
|
1029
|
+
"candidateLabel": "Candidate Principle",
|
|
1030
|
+
"ownerGateLabel": "Owner Gate: Review and approve",
|
|
1031
|
+
"activationLabel": "Activation Result",
|
|
1032
|
+
"rollbackLabel": "Rollback path available"
|
|
1033
|
+
},
|
|
1034
|
+
"step3": {
|
|
1035
|
+
"title": "Ready to record real evidence",
|
|
1036
|
+
"description": "When your agent makes a mistake or you repeatedly correct it, tell the agent: 'Use pd-pain-signal to record this.'",
|
|
1037
|
+
"examplePrompt": "Example prompt to agent:",
|
|
1038
|
+
"examplePromptText": "I just corrected you on X. Use pd-pain-signal to record this as a pain signal.",
|
|
1039
|
+
"tryNowButton": "Try it now (2-hour window)",
|
|
1040
|
+
"goToFocusButton": "Got it, go to Focus",
|
|
1041
|
+
"skipButton": "Skip for now",
|
|
1042
|
+
"windowHint": "We'll check back in 2 hours. No pressure — you can always record evidence later.",
|
|
1043
|
+
"pollingActive": "Listening for evidence... We'll check every 30 seconds for 2 hours.",
|
|
1044
|
+
"stopPollingButton": "Stop and continue",
|
|
1045
|
+
"evidenceFound": "Evidence detected! You can now review it in the Focus page.",
|
|
1046
|
+
"timeoutHint": "No evidence detected in 2 hours. That's okay — you can record evidence anytime with pd-pain-signal.",
|
|
1047
|
+
"pollingError": "Couldn't check for evidence. The evidence service may be unavailable.",
|
|
1048
|
+
"retryButton": "Retry"
|
|
1049
|
+
},
|
|
1050
|
+
"progress": {
|
|
1051
|
+
"step1": "Welcome",
|
|
1052
|
+
"step2": "Demo",
|
|
1053
|
+
"step3": "Invite"
|
|
1054
|
+
}
|
|
945
1055
|
}
|
|
946
1056
|
},
|
|
947
1057
|
"components": {
|
|
@@ -1050,6 +1160,23 @@
|
|
|
1050
1160
|
"tooShort": "Reason must be at least 10 characters",
|
|
1051
1161
|
"cancel": "Cancel",
|
|
1052
1162
|
"submit": "Confirm Rejection"
|
|
1163
|
+
},
|
|
1164
|
+
"onboardingReset": {
|
|
1165
|
+
"title": "Onboarding",
|
|
1166
|
+
"resetButton": "Reset onboarding state",
|
|
1167
|
+
"resetConfirm": "This will restart the onboarding wizard on next login. Continue?",
|
|
1168
|
+
"resetSuccess": "Onboarding state reset. You'll see the welcome page on next visit.",
|
|
1169
|
+
"resetFailed": "Couldn't reset onboarding. Check browser storage permissions and retry."
|
|
1170
|
+
},
|
|
1171
|
+
"onboardingFlag": {
|
|
1172
|
+
"title": "Onboarding Feature",
|
|
1173
|
+
"label": "New user onboarding wizard",
|
|
1174
|
+
"description": "Show the welcome wizard on first visit. Disable for experienced users.",
|
|
1175
|
+
"toggleAriaLabel": "Toggle new user onboarding feature",
|
|
1176
|
+
"enabled": "Onboarding wizard enabled",
|
|
1177
|
+
"disabled": "Onboarding wizard disabled",
|
|
1178
|
+
"toggleFailed": "Failed to toggle onboarding feature",
|
|
1179
|
+
"loadFailed": "Failed to load onboarding flag state"
|
|
1053
1180
|
}
|
|
1054
1181
|
}
|
|
1055
1182
|
}
|
|
@@ -700,6 +700,61 @@
|
|
|
700
700
|
"unknownAgentsWarning": "检测到 {{count}} 个未识别的代理:{{names}}。它们未被分组显示。",
|
|
701
701
|
"footerNote": "9 个代理分布在内化管道与侧链服务两条路径上。核心三件套必须一起开,否则 PD 无法把错误转化为原则。"
|
|
702
702
|
},
|
|
703
|
+
"signalKeywords": {
|
|
704
|
+
"title": "信号词库",
|
|
705
|
+
"subtitle": "管理智能体的信号关键词——当信号采集器检测到这些关键词时,会进行深度分析。",
|
|
706
|
+
"empty": "暂无信号关键词",
|
|
707
|
+
"loadError": "无法加载信号关键词",
|
|
708
|
+
"saveError": "保存失败",
|
|
709
|
+
"saving": "保存中…",
|
|
710
|
+
"searchPlaceholder": "搜索关键词…",
|
|
711
|
+
"filterAll": "全部",
|
|
712
|
+
"filterActive": "活跃",
|
|
713
|
+
"filterArchived": "归档",
|
|
714
|
+
"active": "活跃",
|
|
715
|
+
"archived": "归档",
|
|
716
|
+
"confirmDeleteTitle": "确认删除关键词",
|
|
717
|
+
"confirmDeleteMessage": "确定要删除「{{term}}」吗?此操作不可撤销。",
|
|
718
|
+
"confirmDeleteAck": "确认删除",
|
|
719
|
+
"confirmDeleteCancel": "取消",
|
|
720
|
+
"deleteSuccess": "已删除",
|
|
721
|
+
"archiveSuccess": "已归档",
|
|
722
|
+
"unarchiveSuccess": "已恢复",
|
|
723
|
+
"phase2Tooltip": "此操作将在后续版本中启用",
|
|
724
|
+
"colTerm": "术语",
|
|
725
|
+
"colCategory": "分类",
|
|
726
|
+
"colPrecision": "精度",
|
|
727
|
+
"colWeight": "权重",
|
|
728
|
+
"colReason": "原因",
|
|
729
|
+
"colActions": "操作",
|
|
730
|
+
"categoryCorrection": "纠正",
|
|
731
|
+
"categoryEmpathy": "共情",
|
|
732
|
+
"precisionHigh": "高",
|
|
733
|
+
"precisionAmbiguous": "歧义",
|
|
734
|
+
"nTerms": "{{count}} 条",
|
|
735
|
+
"selectedNOfTotal": "已选 {{selected}} / {{total}}",
|
|
736
|
+
"nTermsPendingReview": "{{count}} 条待审",
|
|
737
|
+
"weightLabel": "权重:{{percent}}%",
|
|
738
|
+
"addKeyword": "添加关键词",
|
|
739
|
+
"addKeywordDialogTitle": "添加信号关键词",
|
|
740
|
+
"submitAdd": "添加",
|
|
741
|
+
"noSearchResults": "无匹配关键词",
|
|
742
|
+
"pendingTerms": {
|
|
743
|
+
"title": "待确认信号词",
|
|
744
|
+
"subtitle": "信号采集器建议以下术语从未匹配消息中提取为潜在关键词。审查后确认或忽略。",
|
|
745
|
+
"empty": "暂无待确认信号词",
|
|
746
|
+
"emptyDescription": "当共情观察器检测到重复出现的未命中模式时,会建议新的信号词。",
|
|
747
|
+
"confirm": "确认添加",
|
|
748
|
+
"ignore": "忽略",
|
|
749
|
+
"confirmBatch": "全部确认",
|
|
750
|
+
"ignoreBatch": "全部忽略",
|
|
751
|
+
"sourceCount": "来自 {{count}} 条消息",
|
|
752
|
+
"confirmSuccess": "已确认添加",
|
|
753
|
+
"ignoreSuccess": "已忽略",
|
|
754
|
+
"batchConfirmSuccess": "已确认 {{count}} 个信号词",
|
|
755
|
+
"batchIgnoreSuccess": "已忽略 {{count}} 个信号词"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
703
758
|
"login": {
|
|
704
759
|
"title": "登录",
|
|
705
760
|
"description": "登录 PD 治理工作台",
|
|
@@ -942,6 +997,61 @@
|
|
|
942
997
|
"demoteTooltip": "降权端点开发中",
|
|
943
998
|
"principleAriaLabel": "原则债务 {{id}}",
|
|
944
999
|
"listAriaLabel": "原则债务列表"
|
|
1000
|
+
},
|
|
1001
|
+
"welcome": {
|
|
1002
|
+
"title": "欢迎使用 Principles Disciple",
|
|
1003
|
+
"subtitle": "把你对智能体的反复纠正,沉淀为可审查、可撤回的行为原则。",
|
|
1004
|
+
"stateSaveError": "无法保存引导进度,请检查浏览器存储权限后重试。",
|
|
1005
|
+
"stepIndicator": "第 {{current}} 步 / 共 {{total}} 步",
|
|
1006
|
+
"step1": {
|
|
1007
|
+
"title": "PD 是什么?",
|
|
1008
|
+
"description": "拥有者治理下的智能体行为内化系统。PD 把行为证据沉淀为可审查、可回滚的原则,让原则进入智能体的后续行为。",
|
|
1009
|
+
"circuitLabel": "核心治理回路",
|
|
1010
|
+
"circuitNodes": {
|
|
1011
|
+
"evidence": "行为证据",
|
|
1012
|
+
"principle": "原则",
|
|
1013
|
+
"ownerGate": "拥有者审查",
|
|
1014
|
+
"behavior": "行为变更"
|
|
1015
|
+
},
|
|
1016
|
+
"startButton": "开始",
|
|
1017
|
+
"skipButton": "跳过引导"
|
|
1018
|
+
},
|
|
1019
|
+
"step2": {
|
|
1020
|
+
"title": "看一次完整治理回路演示",
|
|
1021
|
+
"description": "这是用模拟证据做的受控演示。真实使用时,由你的智能体通过 pd-pain-signal 技能产生证据。",
|
|
1022
|
+
"runDemoButton": "运行演示",
|
|
1023
|
+
"demoRunning": "演示运行中...",
|
|
1024
|
+
"demoComplete": "演示完成",
|
|
1025
|
+
"demoFailed": "演示失败",
|
|
1026
|
+
"demoSimulatedNote": "此证据为演示模拟数据。",
|
|
1027
|
+
"nextButton": "下一步",
|
|
1028
|
+
"evidenceLabel": "证据(模拟)",
|
|
1029
|
+
"candidateLabel": "候选原则",
|
|
1030
|
+
"ownerGateLabel": "拥有者审查:批准 / 修改 / 拒绝",
|
|
1031
|
+
"activationLabel": "激活结果",
|
|
1032
|
+
"rollbackLabel": "可回滚路径已就绪"
|
|
1033
|
+
},
|
|
1034
|
+
"step3": {
|
|
1035
|
+
"title": "准备好记录真实证据",
|
|
1036
|
+
"description": "当你下次使用智能体时,如果智能体犯错或你重复纠正了它,告诉智能体:'用 pd-pain-signal 记录一下'。",
|
|
1037
|
+
"examplePrompt": "给智能体的示例提示:",
|
|
1038
|
+
"examplePromptText": "我刚纠正了你关于 X 的问题。用 pd-pain-signal 把这个记录为 pain signal。",
|
|
1039
|
+
"tryNowButton": "我现在就试试(2 小时窗口)",
|
|
1040
|
+
"goToFocusButton": "知道了,先看 Focus",
|
|
1041
|
+
"skipButton": "暂时跳过",
|
|
1042
|
+
"windowHint": "我们会在 2 小时后查看。不强制——你随时可以稍后记录证据。",
|
|
1043
|
+
"pollingActive": "正在监听证据... 我们会每 30 秒检查一次,持续 2 小时。",
|
|
1044
|
+
"stopPollingButton": "停止并继续",
|
|
1045
|
+
"evidenceFound": "检测到证据!你现在可以在 Focus 页面查看。",
|
|
1046
|
+
"timeoutHint": "2 小时内未检测到证据。没关系——你随时可以用 pd-pain-signal 记录证据。",
|
|
1047
|
+
"pollingError": "无法检查证据。证据服务可能不可用。",
|
|
1048
|
+
"retryButton": "重试"
|
|
1049
|
+
},
|
|
1050
|
+
"progress": {
|
|
1051
|
+
"step1": "欢迎",
|
|
1052
|
+
"step2": "演示",
|
|
1053
|
+
"step3": "邀请"
|
|
1054
|
+
}
|
|
945
1055
|
}
|
|
946
1056
|
},
|
|
947
1057
|
"components": {
|
|
@@ -1050,6 +1160,23 @@
|
|
|
1050
1160
|
"tooShort": "拒绝原因至少需要10个字符",
|
|
1051
1161
|
"cancel": "取消",
|
|
1052
1162
|
"submit": "确认拒绝"
|
|
1163
|
+
},
|
|
1164
|
+
"onboardingReset": {
|
|
1165
|
+
"title": "引导流程",
|
|
1166
|
+
"resetButton": "重置引导状态",
|
|
1167
|
+
"resetConfirm": "这将在下次登录时重新启动引导向导。继续吗?",
|
|
1168
|
+
"resetSuccess": "引导状态已重置。下次访问时会看到欢迎页。",
|
|
1169
|
+
"resetFailed": "无法重置引导,请检查浏览器存储权限后重试。"
|
|
1170
|
+
},
|
|
1171
|
+
"onboardingFlag": {
|
|
1172
|
+
"title": "引导功能",
|
|
1173
|
+
"label": "新用户引导向导",
|
|
1174
|
+
"description": "首次访问时显示欢迎向导。熟练用户可关闭。",
|
|
1175
|
+
"toggleAriaLabel": "切换新用户引导功能",
|
|
1176
|
+
"enabled": "引导向导已启用",
|
|
1177
|
+
"disabled": "引导向导已关闭",
|
|
1178
|
+
"toggleFailed": "切换引导功能失败",
|
|
1179
|
+
"loadFailed": "加载引导开关状态失败"
|
|
1053
1180
|
}
|
|
1054
1181
|
}
|
|
1055
1182
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
export function isRecord(value) {
|
|
15
15
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16
16
|
}
|
|
17
|
-
const VALID_ACTIVATION_STATUSES = new Set(["active", "inactive"]);
|
|
17
|
+
const VALID_ACTIVATION_STATUSES = new Set(["active", "inactive", "deactivated", "suspended_by_flag"]);
|
|
18
18
|
// ── Activation validators ────────────────────────────────────────────────────
|
|
19
19
|
export function validateActivationRecord(raw) {
|
|
20
20
|
if (!isRecord(raw))
|