create-principles-disciple 1.101.0 → 1.103.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/pd-config-store.d.ts +50 -1
- package/console/dist/server/config/pd-config-store.js +364 -1
- package/console/dist/server/index.js +9 -0
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +44 -5
- package/console/dist/server/models/ActivationsConsoleModel.js +118 -16
- package/console/dist/server/routes/config.js +92 -2
- 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 +60 -3
- package/console/dist/ui/api.js +63 -2
- 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 +33 -0
- package/console/dist/ui/i18n/en.json +189 -1
- package/console/dist/ui/i18n/zh-CN.json +189 -1
- package/console/dist/ui/pages/activation/ActivationPage.js +11 -11
- package/console/dist/ui/pages/activation/ActivationValidators.js +15 -14
- package/console/dist/ui/pages/control-center/AgentCard.js +66 -10
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +3 -2
- package/console/dist/ui/pages/control-center/RuntimeProfileManager.d.ts +31 -0
- package/console/dist/ui/pages/control-center/RuntimeProfileManager.js +234 -0
- package/console/dist/ui/pages/debt/DebtPage.js +2 -2
- 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/ui/utils/validators.d.ts +26 -3
- package/console/dist/ui/utils/validators.js +23 -6
- package/console/dist/web/assets/app.css +442 -0
- package/console/dist/web/assets/app.js +7793 -1966
- 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__/architecture-regression.test.js +14 -2
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js +28 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.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/__tests__/resolve-runtime-config-from-pd-config.test.js +8 -10
- package/core/dist/runtime-v2/__tests__/resolve-runtime-config-from-pd-config.test.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 +240 -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 +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 +81 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.js +81 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +19 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +8 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +4 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/candidate-intake-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake-service.js +92 -6
- package/core/dist/runtime-v2/candidate-intake-service.js.map +1 -1
- package/core/dist/runtime-v2/candidate-intake.d.ts +38 -0
- package/core/dist/runtime-v2/candidate-intake.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake.js +48 -0
- package/core/dist/runtime-v2/candidate-intake.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 +33 -1
- 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 +10 -5
- 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 +54 -33
- 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-agent-binding.d.ts +2 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js +3 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts +8 -3
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js +39 -3
- 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-redaction.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.js +14 -2
- package/core/dist/runtime-v2/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +116 -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 +125 -7
- 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/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/index.d.ts +7 -4
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +5 -2
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js +32 -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 +7 -6
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.js +1 -53
- package/core/dist/runtime-v2/internalization/__tests__/internalization-task-guards.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.js +4 -4
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +5 -5
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js +4 -4
- 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 +0 -19
- package/core/dist/runtime-v2/internalization/internalization-task-guards.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-task-guards.js +1 -29
- package/core/dist/runtime-v2/internalization/internalization-task-guards.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +2 -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 +2 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.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/schema-conformance.test.js +43 -0
- package/core/dist/runtime-v2/store/schema-conformance.test.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 +150 -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 +34 -12
- package/dist/mvp-config.js.map +1 -1
- package/package.json +1 -1
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js +2 -2
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js.map +1 -1
- package/pd-cli/dist/commands/demo-story-a.d.ts.map +1 -1
- package/pd-cli/dist/commands/demo-story-a.js +4 -2
- package/pd-cli/dist/commands/demo-story-a.js.map +1 -1
- package/pd-cli/dist/commands/proven-channel-baseline.d.ts.map +1 -1
- package/pd-cli/dist/commands/proven-channel-baseline.js +4 -2
- package/pd-cli/dist/commands/proven-channel-baseline.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 +187 -10
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.js +4 -2
- package/pd-cli/dist/commands/runtime-canary.js.map +1 -1
- package/pd-cli/dist/commands/runtime-health-snapshot.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-health-snapshot.js +4 -2
- package/pd-cli/dist/commands/runtime-health-snapshot.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity.js +4 -2
- package/pd-cli/dist/commands/runtime-internalization-integrity.js.map +1 -1
- package/pd-cli/dist/index.js +5 -63
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +9 -2
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +1 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +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 +50 -0
- package/plugin/dist/core/rule-host.js +116 -19
- 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/gate.js +1 -1
- package/plugin/dist/hooks/prompt.d.ts +3 -2
- package/plugin/dist/hooks/prompt.js +48 -586
- package/plugin/dist/service/evolution-dedup.d.ts +1 -1
- package/plugin/dist/service/evolution-worker.d.ts +7 -31
- package/plugin/dist/service/evolution-worker.js +17 -36
- package/plugin/dist/service/queue-io.js +14 -2
- package/plugin/dist/service/queue-migration.d.ts +27 -26
- package/plugin/dist/service/queue-migration.js +57 -0
- 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/plugin/templates/langs/en/core/AGENTS.md +2 -2
- package/plugin/templates/langs/en/core/TOOLS.md +1 -1
- package/plugin/templates/langs/zh/core/AGENTS.md +2 -2
- package/plugin/templates/langs/zh/core/TOOLS.md +1 -1
- package/templates/langs/en/core/AGENTS.md +2 -2
- package/templates/langs/en/core/TOOLS.md +1 -1
- package/templates/langs/zh/core/AGENTS.md +2 -2
- package/templates/langs/zh/core/TOOLS.md +1 -1
- package/plugin/dist/constants/diagnostician.d.ts +0 -12
- package/plugin/dist/constants/diagnostician.js +0 -65
- package/plugin/dist/service/evolution-queue-migration.d.ts +0 -128
- package/plugin/dist/service/evolution-queue-migration.js +0 -53
- package/plugin/templates/langs/en/skills/pd-diagnostician/SKILL.md +0 -466
- package/plugin/templates/langs/zh/skills/pd-diagnostician/SKILL.md +0 -391
- package/templates/langs/zh/skills/pd-diagnostician/SKILL.md +0 -287
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signal-keywords-api — 信号关键词 API 层
|
|
3
|
+
*
|
|
4
|
+
* 调用 OpenClaw 插件的信号关键词管理端点。
|
|
5
|
+
* 功能分阶段交付:
|
|
6
|
+
* - Phase 1:只读(fetch keywords + pending)
|
|
7
|
+
* - Phase 2:读写(update / admit / reject)
|
|
8
|
+
*
|
|
9
|
+
* 当前 Phase 1 实现;写方法为 stub,返回"未实现"错误。
|
|
10
|
+
*
|
|
11
|
+
* ERR entries:
|
|
12
|
+
* - rc-1: 所有响应经 validator 校验
|
|
13
|
+
* - rc-2: 无 `as` bypass
|
|
14
|
+
* - rc-9: 降级/失败路径含 reason
|
|
15
|
+
*/
|
|
16
|
+
// ── 端点路径(当 plugin I/O 模块实现后启用) ──────────────────────────────────
|
|
17
|
+
// const KEYWORDS_BASE = '/api/plugins/principles/signal-keywords';
|
|
18
|
+
// ── SignalKeywordsPage 直接调用的列表函数 ──────────────────────────────────────
|
|
19
|
+
/**
|
|
20
|
+
* 获取所有活跃关键词列表(SignalKeywordsPage 使用)
|
|
21
|
+
*
|
|
22
|
+
* 当前 Phase 1: 端点未实现,返回 stub 错误。
|
|
23
|
+
* Phase 2 需对接 /api/plugins/principles/signal-keywords 端点。
|
|
24
|
+
*/
|
|
25
|
+
export async function listActiveSignalKeywords(_signal) {
|
|
26
|
+
void _signal;
|
|
27
|
+
return {
|
|
28
|
+
success: false,
|
|
29
|
+
error: '信号关键词管理端点在当前版本中尚未实现(server-side plugin I/O 模块未部署)',
|
|
30
|
+
reason: 'endpoint_not_implemented',
|
|
31
|
+
nextAction: '请等待后续版本更新后再使用此功能',
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 获取待确认信号词列表(SignalKeywordsPage 使用)
|
|
36
|
+
*
|
|
37
|
+
* 当前 Phase 1: 端点未实现,返回 stub 错误。
|
|
38
|
+
* Phase 2 需对接 /api/plugins/principles/signal-keywords/pending 端点。
|
|
39
|
+
*/
|
|
40
|
+
export async function listPendingSignalTerms(_signal) {
|
|
41
|
+
void _signal;
|
|
42
|
+
return {
|
|
43
|
+
success: false,
|
|
44
|
+
error: '信号关键词管理端点在当前版本中尚未实现(server-side plugin I/O 模块未部署)',
|
|
45
|
+
reason: 'endpoint_not_implemented',
|
|
46
|
+
nextAction: '请等待后续版本更新后再使用此功能',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// ── Phase 1 读取词库(category 分类读取) ──────────────────────────────────────
|
|
50
|
+
/**
|
|
51
|
+
* 获取指定分类的信号词库
|
|
52
|
+
*
|
|
53
|
+
* @param category - 分类(correction | empathy)
|
|
54
|
+
* @param signal - 允许外部中止
|
|
55
|
+
*/
|
|
56
|
+
export async function fetchKeywordStore(category, signal) {
|
|
57
|
+
// Phase 1: 端点未实现,返回可识别的降级错误(rc-9)
|
|
58
|
+
// 见 Task 4 实施说明:server-side 端点不在本 PR 范围内
|
|
59
|
+
void category;
|
|
60
|
+
void signal;
|
|
61
|
+
return {
|
|
62
|
+
success: false,
|
|
63
|
+
error: '信号关键词管理端点在当前版本中尚未实现(server-side plugin I/O 模块未部署)',
|
|
64
|
+
reason: 'endpoint_not_implemented',
|
|
65
|
+
nextAction: '请等待后续版本更新后再使用此功能',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 获取 PendingTerm 候选池
|
|
70
|
+
*
|
|
71
|
+
* @param signal - 允许外部中止
|
|
72
|
+
*/
|
|
73
|
+
export async function fetchPendingTerms(signal) {
|
|
74
|
+
void signal;
|
|
75
|
+
return {
|
|
76
|
+
success: false,
|
|
77
|
+
error: '信号关键词管理端点在当前版本中尚未实现(server-side plugin I/O 模块未部署)',
|
|
78
|
+
reason: 'endpoint_not_implemented',
|
|
79
|
+
nextAction: '请等待后续版本更新后再使用此功能',
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// ── 写操作(Phase 2 stubs) ───────────────────────────────────────────────────
|
|
83
|
+
/**
|
|
84
|
+
* 更新信号词库
|
|
85
|
+
*
|
|
86
|
+
* Phase 2 实现,当前返回"未实现"。
|
|
87
|
+
*/
|
|
88
|
+
export async function updateKeywordStore(_req, _signal) {
|
|
89
|
+
return {
|
|
90
|
+
success: false,
|
|
91
|
+
error: '写操作在当前版本中尚未实现',
|
|
92
|
+
reason: 'endpoint_not_implemented',
|
|
93
|
+
nextAction: '请等待后续版本更新后再使用此功能',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 审批一个 PendingTerm(移入词库)
|
|
98
|
+
*
|
|
99
|
+
* Phase 2 实现,当前返回"未实现"。
|
|
100
|
+
*/
|
|
101
|
+
export async function admitPendingTerm(_req, _signal) {
|
|
102
|
+
return {
|
|
103
|
+
success: false,
|
|
104
|
+
error: '写操作在当前版本中尚未实现',
|
|
105
|
+
reason: 'endpoint_not_implemented',
|
|
106
|
+
nextAction: '请等待后续版本更新后再使用此功能',
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 拒绝一个 PendingTerm(从候选池移除)
|
|
111
|
+
*
|
|
112
|
+
* Phase 2 实现,当前返回"未实现"。
|
|
113
|
+
*/
|
|
114
|
+
export async function rejectPendingTerm(_term, _signal) {
|
|
115
|
+
return {
|
|
116
|
+
success: false,
|
|
117
|
+
error: '写操作在当前版本中尚未实现',
|
|
118
|
+
reason: 'endpoint_not_implemented',
|
|
119
|
+
nextAction: '请等待后续版本更新后再使用此功能',
|
|
120
|
+
};
|
|
121
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signal-keywords-types — 信号关键词前端类型定义
|
|
3
|
+
*
|
|
4
|
+
* 镜像后端 UnifiedKeyword / PendingTerm 等类型,供控制台 UI 消费。
|
|
5
|
+
*
|
|
6
|
+
* ERR entries:
|
|
7
|
+
* - rc-1: 纯静态类型定义,无 untrusted 输入
|
|
8
|
+
* - rc-2: 无 `as` bypass
|
|
9
|
+
*/
|
|
10
|
+
export type KeywordCategory = 'correction' | 'empathy';
|
|
11
|
+
/** 词库来源 — 词库中已有的审定点 */
|
|
12
|
+
export type TermSource = 'seed' | 'migrated' | 'owner_promoted';
|
|
13
|
+
export interface UnifiedKeyword {
|
|
14
|
+
term: string;
|
|
15
|
+
category: KeywordCategory;
|
|
16
|
+
/** 权重 0-1 */
|
|
17
|
+
weight: number;
|
|
18
|
+
/** 高精度 vs 歧义词 */
|
|
19
|
+
precision: 'high' | 'ambiguous';
|
|
20
|
+
source: TermSource;
|
|
21
|
+
}
|
|
22
|
+
export interface UnifiedKeywordStore {
|
|
23
|
+
version: number;
|
|
24
|
+
/** key = term */
|
|
25
|
+
terms: Record<string, UnifiedKeyword>;
|
|
26
|
+
}
|
|
27
|
+
/** 候选来源 — LLM 新发现的词(待 owner 审批) */
|
|
28
|
+
export type PendingTermSource = 'llm_candidate';
|
|
29
|
+
export interface PendingTerm {
|
|
30
|
+
term: string;
|
|
31
|
+
suggestedCategory: KeywordCategory;
|
|
32
|
+
suggestedPrecision: 'high' | 'ambiguous';
|
|
33
|
+
/** LLM 给出的发现理由 */
|
|
34
|
+
reason: string;
|
|
35
|
+
/** ISO 时间戳 */
|
|
36
|
+
discoveredAt: string;
|
|
37
|
+
source: PendingTermSource;
|
|
38
|
+
}
|
|
39
|
+
export interface PendingTermStore {
|
|
40
|
+
version: number;
|
|
41
|
+
terms: PendingTerm[];
|
|
42
|
+
}
|
|
43
|
+
/** 更新词库的请求体 */
|
|
44
|
+
export interface UpdateKeywordStoreRequest {
|
|
45
|
+
version: number;
|
|
46
|
+
terms: Record<string, Omit<UnifiedKeyword, 'term'>>;
|
|
47
|
+
}
|
|
48
|
+
/** 审批一个 PendingTerm 的请求体 */
|
|
49
|
+
export interface AdmitPendingTermRequest {
|
|
50
|
+
term: string;
|
|
51
|
+
category: KeywordCategory;
|
|
52
|
+
precision: 'high' | 'ambiguous';
|
|
53
|
+
}
|
|
54
|
+
/** SignalKeywordsPage 使用的关键词类型(UnifiedKeyword 的别名) */
|
|
55
|
+
export type SignalKeyword = UnifiedKeyword;
|
|
56
|
+
/** SignalKeywordsPage 使用的待确认信号词类型(PendingTerm 的别名) */
|
|
57
|
+
export type PendingSignalTerm = PendingTerm;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signal-keywords-validators — 信号关键词 API 响应运行时校验
|
|
3
|
+
*
|
|
4
|
+
* 遵循 rc-1 ~ rc-5 运行时契约规则:
|
|
5
|
+
* - rc-1: 将 parsed JSON 作 unknown 处理
|
|
6
|
+
* - rc-2: 不用 as bypass,用 typeof / Array.isArray / type guard
|
|
7
|
+
* - rc-3: 必填字段缺失时 loud fail(返回 null)
|
|
8
|
+
* - rc-4: 校验数组元素类型
|
|
9
|
+
* - rc-5: 用 Object.hasOwn 而非 in
|
|
10
|
+
*
|
|
11
|
+
* ERR entries:
|
|
12
|
+
* - ERR-001: unknown 输入 -> runtime validation
|
|
13
|
+
* - ERR-005: 数组元素逐项校验
|
|
14
|
+
* - ERR-007: 拒绝非数组 payload
|
|
15
|
+
* - ERR-009: 必填字段 loud fail
|
|
16
|
+
* - ERR-013: 用 Object.hasOwn 替代 in
|
|
17
|
+
*/
|
|
18
|
+
import type { UnifiedKeywordStore, PendingTermStore } from './signal-keywords-types.js';
|
|
19
|
+
export declare function validateUnifiedKeywordStore(raw: unknown): UnifiedKeywordStore | null;
|
|
20
|
+
export declare function validatePendingTermStore(raw: unknown): PendingTermStore | null;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signal-keywords-validators — 信号关键词 API 响应运行时校验
|
|
3
|
+
*
|
|
4
|
+
* 遵循 rc-1 ~ rc-5 运行时契约规则:
|
|
5
|
+
* - rc-1: 将 parsed JSON 作 unknown 处理
|
|
6
|
+
* - rc-2: 不用 as bypass,用 typeof / Array.isArray / type guard
|
|
7
|
+
* - rc-3: 必填字段缺失时 loud fail(返回 null)
|
|
8
|
+
* - rc-4: 校验数组元素类型
|
|
9
|
+
* - rc-5: 用 Object.hasOwn 而非 in
|
|
10
|
+
*
|
|
11
|
+
* ERR entries:
|
|
12
|
+
* - ERR-001: unknown 输入 -> runtime validation
|
|
13
|
+
* - ERR-005: 数组元素逐项校验
|
|
14
|
+
* - ERR-007: 拒绝非数组 payload
|
|
15
|
+
* - ERR-009: 必填字段 loud fail
|
|
16
|
+
* - ERR-013: 用 Object.hasOwn 替代 in
|
|
17
|
+
*/
|
|
18
|
+
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
19
|
+
function isRecord(value) {
|
|
20
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
21
|
+
}
|
|
22
|
+
// ── UnifiedKeywordStore ───────────────────────────────────────────────────────
|
|
23
|
+
export function validateUnifiedKeywordStore(raw) {
|
|
24
|
+
if (!isRecord(raw))
|
|
25
|
+
return null;
|
|
26
|
+
if (!Object.hasOwn(raw, 'version') || !Object.hasOwn(raw, 'terms')) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const { version } = raw;
|
|
30
|
+
const { terms } = raw;
|
|
31
|
+
if (typeof version !== 'number')
|
|
32
|
+
return null;
|
|
33
|
+
if (!isRecord(terms))
|
|
34
|
+
return null;
|
|
35
|
+
// rc-4: 校验每个 term 条目
|
|
36
|
+
const validatedTerms = {};
|
|
37
|
+
for (const [termKey, termRaw] of Object.entries(terms)) {
|
|
38
|
+
if (!isRecord(termRaw))
|
|
39
|
+
return null;
|
|
40
|
+
if (!Object.hasOwn(termRaw, 'term') ||
|
|
41
|
+
!Object.hasOwn(termRaw, 'category') ||
|
|
42
|
+
!Object.hasOwn(termRaw, 'weight') ||
|
|
43
|
+
!Object.hasOwn(termRaw, 'precision') ||
|
|
44
|
+
!Object.hasOwn(termRaw, 'source')) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const t = termRaw;
|
|
48
|
+
if (typeof t.term !== 'string' ||
|
|
49
|
+
t.term.length === 0 ||
|
|
50
|
+
(t.category !== 'correction' && t.category !== 'empathy') ||
|
|
51
|
+
typeof t.weight !== 'number' ||
|
|
52
|
+
Number.isNaN(t.weight) ||
|
|
53
|
+
t.weight < 0 ||
|
|
54
|
+
t.weight > 1 ||
|
|
55
|
+
(t.precision !== 'high' && t.precision !== 'ambiguous') ||
|
|
56
|
+
(t.source !== 'seed' && t.source !== 'migrated' && t.source !== 'owner_promoted')) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
validatedTerms[termKey] = {
|
|
60
|
+
term: t.term,
|
|
61
|
+
category: t.category,
|
|
62
|
+
weight: t.weight,
|
|
63
|
+
precision: t.precision,
|
|
64
|
+
source: t.source,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return { version, terms: validatedTerms };
|
|
68
|
+
}
|
|
69
|
+
// ── PendingTermStore ──────────────────────────────────────────────────────────
|
|
70
|
+
export function validatePendingTermStore(raw) {
|
|
71
|
+
if (!isRecord(raw))
|
|
72
|
+
return null;
|
|
73
|
+
if (!Object.hasOwn(raw, 'version') || !Object.hasOwn(raw, 'terms')) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
const { version } = raw;
|
|
77
|
+
const { terms } = raw;
|
|
78
|
+
if (typeof version !== 'number')
|
|
79
|
+
return null;
|
|
80
|
+
if (!Array.isArray(terms))
|
|
81
|
+
return null;
|
|
82
|
+
// rc-4: 校验每个 pending term
|
|
83
|
+
const validatedTerms = [];
|
|
84
|
+
for (const itemRaw of terms) {
|
|
85
|
+
if (!isRecord(itemRaw))
|
|
86
|
+
return null;
|
|
87
|
+
if (!Object.hasOwn(itemRaw, 'term') ||
|
|
88
|
+
!Object.hasOwn(itemRaw, 'suggestedCategory') ||
|
|
89
|
+
!Object.hasOwn(itemRaw, 'suggestedPrecision') ||
|
|
90
|
+
!Object.hasOwn(itemRaw, 'reason') ||
|
|
91
|
+
!Object.hasOwn(itemRaw, 'discoveredAt')) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
const t = itemRaw;
|
|
95
|
+
if (typeof t.term !== 'string' ||
|
|
96
|
+
t.term.length === 0 ||
|
|
97
|
+
(t.suggestedCategory !== 'correction' && t.suggestedCategory !== 'empathy') ||
|
|
98
|
+
(t.suggestedPrecision !== 'high' && t.suggestedPrecision !== 'ambiguous') ||
|
|
99
|
+
typeof t.reason !== 'string' ||
|
|
100
|
+
typeof t.discoveredAt !== 'string') {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
validatedTerms.push({
|
|
104
|
+
term: t.term,
|
|
105
|
+
suggestedCategory: t.suggestedCategory,
|
|
106
|
+
suggestedPrecision: t.suggestedPrecision,
|
|
107
|
+
reason: t.reason,
|
|
108
|
+
discoveredAt: t.discoveredAt,
|
|
109
|
+
// source 总是 'llm_candidate'
|
|
110
|
+
source: 'llm_candidate',
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return { version, terms: validatedTerms };
|
|
114
|
+
}
|
|
@@ -146,6 +146,28 @@ export interface DefaultRuntimeUpdateData {
|
|
|
146
146
|
defaultRuntime: string;
|
|
147
147
|
}
|
|
148
148
|
export declare function validateDefaultRuntimeUpdate(v: unknown): DefaultRuntimeUpdateData | null;
|
|
149
|
+
/**
|
|
150
|
+
* Response shape for create/update/delete runtime profile endpoints.
|
|
151
|
+
*
|
|
152
|
+
* Server returns `{ profileId: string, profile: { type, provider?, model?, ... } }`.
|
|
153
|
+
* We validate the contract fields (profileId + profile.type) loudly and accept
|
|
154
|
+
* the rest of the profile object as a string-indexed record, since the patch
|
|
155
|
+
* surface is open (timeoutMs, maxRetries, baseUrl, source, etc.). The page only
|
|
156
|
+
* needs profileId to confirm the target; it re-fetches the catalog for display.
|
|
157
|
+
*
|
|
158
|
+
* rc-1: input treated as unknown.
|
|
159
|
+
* rc-2: no `as` bypass — uses Object.hasOwn + typeof guards.
|
|
160
|
+
* rc-3: profileId + profile.type are required and fail loud.
|
|
161
|
+
* rc-5: Object.hasOwn for untrusted keys.
|
|
162
|
+
*/
|
|
163
|
+
export interface RuntimeProfileMutationData {
|
|
164
|
+
profileId: string;
|
|
165
|
+
profile: {
|
|
166
|
+
type: string;
|
|
167
|
+
[key: string]: unknown;
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export declare function validateRuntimeProfileMutation(v: unknown): RuntimeProfileMutationData | null;
|
|
149
171
|
interface HealthCheckItemData {
|
|
150
172
|
id: string;
|
|
151
173
|
name: string;
|
|
@@ -188,7 +210,7 @@ export interface GovernanceQueueData {
|
|
|
188
210
|
}
|
|
189
211
|
export declare function validateGovernanceQueue(v: unknown): GovernanceQueueData | null;
|
|
190
212
|
export interface ActivationRecordData {
|
|
191
|
-
|
|
213
|
+
activationId: string;
|
|
192
214
|
artifactId: string;
|
|
193
215
|
principleId: string;
|
|
194
216
|
channel: string;
|
|
@@ -199,8 +221,9 @@ export interface ActivationRecordData {
|
|
|
199
221
|
}
|
|
200
222
|
export interface ActivationsData {
|
|
201
223
|
activations: ActivationRecordData[];
|
|
202
|
-
|
|
203
|
-
|
|
224
|
+
status: string;
|
|
225
|
+
reason?: string;
|
|
226
|
+
nextAction?: string;
|
|
204
227
|
}
|
|
205
228
|
export declare function validateActivations(v: unknown): ActivationsData | null;
|
|
206
229
|
export interface DisableActivationData {
|
|
@@ -402,6 +402,21 @@ export function validateDefaultRuntimeUpdate(v) {
|
|
|
402
402
|
return null;
|
|
403
403
|
return { defaultRuntime: v.defaultRuntime };
|
|
404
404
|
}
|
|
405
|
+
export function validateRuntimeProfileMutation(v) {
|
|
406
|
+
if (!isObject(v))
|
|
407
|
+
return null;
|
|
408
|
+
if (!Object.hasOwn(v, 'profileId') || !isString(v.profileId))
|
|
409
|
+
return null;
|
|
410
|
+
if (!Object.hasOwn(v, 'profile') || !isObject(v.profile))
|
|
411
|
+
return null;
|
|
412
|
+
const { profile } = v;
|
|
413
|
+
if (!Object.hasOwn(profile, 'type') || !isString(profile.type))
|
|
414
|
+
return null;
|
|
415
|
+
// Bind narrowed string to a local so the return literal keeps `type: string`
|
|
416
|
+
// (spreading a Record<string, unknown> alone would widen `type` back to unknown).
|
|
417
|
+
const profileType = profile.type;
|
|
418
|
+
return { profileId: v.profileId, profile: { ...profile, type: profileType } };
|
|
419
|
+
}
|
|
405
420
|
function validateHealthCheckItem(v) {
|
|
406
421
|
if (!isObject(v))
|
|
407
422
|
return null;
|
|
@@ -557,7 +572,7 @@ export function validateGovernanceQueue(v) {
|
|
|
557
572
|
function validateActivationRecord(v) {
|
|
558
573
|
if (!isObject(v))
|
|
559
574
|
return null;
|
|
560
|
-
if (!Object.hasOwn(v, '
|
|
575
|
+
if (!Object.hasOwn(v, 'activationId') || !isString(v.activationId))
|
|
561
576
|
return null;
|
|
562
577
|
if (!Object.hasOwn(v, 'artifactId') || !isString(v.artifactId))
|
|
563
578
|
return null;
|
|
@@ -575,7 +590,7 @@ function validateActivationRecord(v) {
|
|
|
575
590
|
if (!Object.hasOwn(v, 'status') || !isString(v.status))
|
|
576
591
|
return null;
|
|
577
592
|
return {
|
|
578
|
-
|
|
593
|
+
activationId: v.activationId, artifactId: v.artifactId, principleId: v.principleId,
|
|
579
594
|
channel: v.channel, action: v.action, targetRef: v.targetRef,
|
|
580
595
|
activatedAt: activatedAt.value,
|
|
581
596
|
status: v.status,
|
|
@@ -586,14 +601,16 @@ export function validateActivations(v) {
|
|
|
586
601
|
return null;
|
|
587
602
|
if (!Object.hasOwn(v, 'activations') || !Array.isArray(v.activations))
|
|
588
603
|
return null;
|
|
589
|
-
if (!Object.hasOwn(v, '
|
|
604
|
+
if (!Object.hasOwn(v, 'status') || !isString(v.status))
|
|
590
605
|
return null;
|
|
591
606
|
const activations = validateArray(v.activations, validateActivationRecord);
|
|
592
607
|
if (activations === null)
|
|
593
608
|
return null;
|
|
594
|
-
const result = { activations,
|
|
595
|
-
if (Object.hasOwn(v, '
|
|
596
|
-
result.
|
|
609
|
+
const result = { activations, status: v.status };
|
|
610
|
+
if (Object.hasOwn(v, 'reason') && isString(v.reason))
|
|
611
|
+
result.reason = v.reason;
|
|
612
|
+
if (Object.hasOwn(v, 'nextAction') && isString(v.nextAction))
|
|
613
|
+
result.nextAction = v.nextAction;
|
|
597
614
|
return result;
|
|
598
615
|
}
|
|
599
616
|
export function validateDisableActivation(v) {
|