create-principles-disciple 1.121.7 → 1.121.9
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/README.md +13 -1
- package/console/dist/server/config/pd-config-store.d.ts +1 -3
- package/console/dist/server/config/pd-config-store.js +4 -4
- package/console/dist/server/feedback/channels.d.ts +2 -8
- package/console/dist/server/feedback/channels.js +0 -11
- package/console/dist/server/index.js +34 -5
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +28 -1
- package/console/dist/server/models/ActivationsConsoleModel.js +72 -30
- package/console/dist/server/models/GovernanceExperienceCollector.d.ts +28 -0
- package/console/dist/server/models/GovernanceExperienceCollector.js +305 -0
- package/console/dist/server/models/GovernanceProjectionCollector.d.ts +60 -2
- package/console/dist/server/models/GovernanceProjectionCollector.js +323 -285
- package/console/dist/server/models/PrincipleClassifier.d.ts +1 -1
- package/console/dist/server/models/PrincipleClassifier.js +7 -4
- package/console/dist/server/models/PrinciplesConsoleModel.d.ts +2 -1
- package/console/dist/server/models/ReceiptsConsoleModel.d.ts +5 -0
- package/console/dist/server/models/ReceiptsConsoleModel.js +140 -13
- package/console/dist/server/routes/activations.js +1 -1
- package/console/dist/server/routes/failed-tasks.js +28 -11
- package/console/dist/server/routes/governance.d.ts +26 -0
- package/console/dist/server/routes/governance.js +51 -0
- package/console/dist/server/routes/owner-identity.d.ts +31 -0
- package/console/dist/server/routes/owner-identity.js +76 -0
- package/console/dist/server/routes/update-history.d.ts +5 -0
- package/console/dist/server/routes/update-history.js +50 -4
- package/console/dist/server/routes/update.js +186 -32
- package/console/dist/shared/feedback-channel-ids.d.ts +13 -0
- package/console/dist/shared/feedback-channel-ids.js +12 -0
- package/console/dist/shared/feedback-contract.d.ts +46 -0
- package/console/dist/shared/feedback-contract.js +45 -0
- package/console/dist/ui/App.js +1 -1
- package/console/dist/ui/api.d.ts +22 -3
- package/console/dist/ui/api.js +63 -3
- package/console/dist/ui/components/receipts/ReceiptCoverageDisclosure.d.ts +6 -0
- package/console/dist/ui/components/receipts/ReceiptCoverageDisclosure.js +66 -0
- package/console/dist/ui/i18n/en.json +198 -2
- package/console/dist/ui/i18n/zh-CN.json +196 -0
- package/console/dist/ui/pages/activation/ActivationPage.js +14 -2
- package/console/dist/ui/pages/failed-tasks/FailedTasksPage.js +25 -5
- package/console/dist/ui/pages/focus/FocusPage.d.ts +28 -1
- package/console/dist/ui/pages/focus/FocusPage.js +128 -15
- package/console/dist/ui/pages/principles/PrincipleDetailPage.d.ts +30 -0
- package/console/dist/ui/pages/principles/PrincipleDetailPage.js +49 -6
- package/console/dist/ui/pages/settings/SettingsPage.js +67 -2
- package/console/dist/ui/pages/settings/UpdatePage.js +7 -7
- package/console/dist/ui/utils/enum-labels.js +0 -1
- package/console/dist/ui/utils/validators.d.ts +53 -21
- package/console/dist/ui/utils/validators.js +248 -21
- package/console/dist/web/assets/app.css +6 -0
- package/console/dist/web/assets/app.js +2721 -1664
- package/console/package.json +4 -2
- package/core/dist/host/host-adapter.d.ts +1 -1
- package/core/dist/host/host-adapter.d.ts.map +1 -1
- package/core/dist/host/host-adapter.js +1 -0
- package/core/dist/host/host-adapter.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +12 -2
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js +1 -1
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/governance-experience.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/governance-experience.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/governance-experience.test.js +300 -0
- package/core/dist/runtime-v2/__tests__/governance-experience.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/owner-identity.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/owner-identity.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/owner-identity.test.js +147 -0
- package/core/dist/runtime-v2/__tests__/owner-identity.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/product-telemetry-contract.test.d.ts +18 -0
- package/core/dist/runtime-v2/__tests__/product-telemetry-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/product-telemetry-contract.test.js +303 -0
- package/core/dist/runtime-v2/__tests__/product-telemetry-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/recovery-actions-log.test.js +40 -0
- package/core/dist/runtime-v2/__tests__/recovery-actions-log.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/status-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/status-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/status-contract.test.js +107 -0
- package/core/dist/runtime-v2/__tests__/status-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/promotion-evidence-snapshot.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/promotion-evidence-snapshot.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/promotion-evidence-snapshot.test.js +104 -0
- package/core/dist/runtime-v2/activation/__tests__/promotion-evidence-snapshot.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/promotion-readiness-evaluator.test.js +19 -0
- package/core/dist/runtime-v2/activation/__tests__/promotion-readiness-evaluator.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/rulecode-owner-decision-service.test.js +20 -0
- package/core/dist/runtime-v2/activation/__tests__/rulecode-owner-decision-service.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-safety-store.test.js +40 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-safety-store.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/index.d.ts +2 -0
- package/core/dist/runtime-v2/activation/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/index.js +1 -0
- package/core/dist/runtime-v2/activation/index.js.map +1 -1
- package/core/dist/runtime-v2/activation/promotion-evidence-snapshot.d.ts +30 -0
- package/core/dist/runtime-v2/activation/promotion-evidence-snapshot.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/promotion-evidence-snapshot.js +87 -0
- package/core/dist/runtime-v2/activation/promotion-evidence-snapshot.js.map +1 -0
- package/core/dist/runtime-v2/activation/promotion-readiness-evaluator.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/promotion-readiness-evaluator.js +3 -0
- package/core/dist/runtime-v2/activation/promotion-readiness-evaluator.js.map +1 -1
- package/core/dist/runtime-v2/activation/promotion-readiness-reader.d.ts +1 -1
- package/core/dist/runtime-v2/activation/promotion-readiness-reader.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/promotion-readiness-reader.js +2 -2
- package/core/dist/runtime-v2/activation/promotion-readiness-reader.js.map +1 -1
- package/core/dist/runtime-v2/activation/rulecode-owner-decision-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/rulecode-owner-decision-service.js +18 -9
- package/core/dist/runtime-v2/activation/rulecode-owner-decision-service.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.js +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/json-extractor.test.js +91 -1
- package/core/dist/runtime-v2/adapter/__tests__/json-extractor.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +59 -12
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js +10 -9
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.js +42 -1
- package/core/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/json-extractor.d.ts +25 -0
- package/core/dist/runtime-v2/adapter/json-extractor.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/json-extractor.js +126 -0
- package/core/dist/runtime-v2/adapter/json-extractor.js.map +1 -1
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts +9 -4
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js +9 -4
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/output-repair-contract.d.ts +5 -1
- package/core/dist/runtime-v2/adapter/output-repair-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/output-repair-contract.js +4 -1
- package/core/dist/runtime-v2/adapter/output-repair-contract.js.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-catalog.d.ts +7 -0
- package/core/dist/runtime-v2/adapter/pi-ai-catalog.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-catalog.js +19 -0
- package/core/dist/runtime-v2/adapter/pi-ai-catalog.js.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +13 -15
- 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 +104 -37
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/structured-output-repair.d.ts +16 -1
- package/core/dist/runtime-v2/adapter/structured-output-repair.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/structured-output-repair.js +38 -6
- package/core/dist/runtime-v2/adapter/structured-output-repair.js.map +1 -1
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts +1 -1
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-agent-binding.test.js +8 -9
- 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 +27 -3
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-principles.test.d.ts +11 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-principles.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-principles.test.js +93 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-principles.test.js.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-workspace.test.js +41 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-workspace.test.js.map +1 -1
- package/core/dist/runtime-v2/config/index.d.ts +2 -2
- package/core/dist/runtime-v2/config/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/index.js +2 -0
- package/core/dist/runtime-v2/config/index.js.map +1 -1
- 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 +4 -13
- package/core/dist/runtime-v2/config/pd-config-agent-binding.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 +14 -7
- 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 +5 -12
- package/core/dist/runtime-v2/config/pd-config-feature-flags.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +8 -0
- package/core/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.js +2 -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 +48 -3
- package/core/dist/runtime-v2/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime-v2/core-principles/__tests__/core-axiom-block.test.js +36 -8
- package/core/dist/runtime-v2/core-principles/__tests__/core-axiom-block.test.js.map +1 -1
- package/core/dist/runtime-v2/core-principles/__tests__/core-principle-registry.test.js +36 -12
- package/core/dist/runtime-v2/core-principles/__tests__/core-principle-registry.test.js.map +1 -1
- package/core/dist/runtime-v2/core-principles/core-axiom-block.d.ts +22 -8
- package/core/dist/runtime-v2/core-principles/core-axiom-block.d.ts.map +1 -1
- package/core/dist/runtime-v2/core-principles/core-axiom-block.js +28 -13
- package/core/dist/runtime-v2/core-principles/core-axiom-block.js.map +1 -1
- package/core/dist/runtime-v2/core-principles/core-principle-registry.d.ts +29 -4
- package/core/dist/runtime-v2/core-principles/core-principle-registry.d.ts.map +1 -1
- package/core/dist/runtime-v2/core-principles/core-principle-registry.js +68 -33
- package/core/dist/runtime-v2/core-principles/core-principle-registry.js.map +1 -1
- package/core/dist/runtime-v2/core-principles/index.d.ts +3 -3
- package/core/dist/runtime-v2/core-principles/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/core-principles/index.js +1 -1
- package/core/dist/runtime-v2/core-principles/index.js.map +1 -1
- package/core/dist/runtime-v2/evolution/evolution-types.d.ts +2 -1
- package/core/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/evolution/evolution-types.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/anonymous-product-telemetry-flag.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/anonymous-product-telemetry-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/anonymous-product-telemetry-flag.test.js +48 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/anonymous-product-telemetry-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/codex-conversation-ingestion-flag.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/codex-conversation-ingestion-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/codex-conversation-ingestion-flag.test.js +46 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/codex-conversation-ingestion-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +86 -31
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-lifecycle.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-lifecycle.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-lifecycle.test.js +83 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-lifecycle.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts +19 -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 +128 -10
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts +37 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +304 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/index.d.ts +4 -2
- package/core/dist/runtime-v2/feature-flags/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/index.js +3 -1
- package/core/dist/runtime-v2/feature-flags/index.js.map +1 -1
- package/core/dist/runtime-v2/governance-experience-contract.d.ts +468 -0
- package/core/dist/runtime-v2/governance-experience-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/governance-experience-contract.js +208 -0
- package/core/dist/runtime-v2/governance-experience-contract.js.map +1 -0
- package/core/dist/runtime-v2/governance-experience.d.ts +11 -0
- package/core/dist/runtime-v2/governance-experience.d.ts.map +1 -0
- package/core/dist/runtime-v2/governance-experience.js +276 -0
- package/core/dist/runtime-v2/governance-experience.js.map +1 -0
- package/core/dist/runtime-v2/index.d.ts +20 -8
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +20 -6
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-output-retry-flag.test.js +29 -10
- package/core/dist/runtime-v2/internalization/__tests__/artificer-output-retry-flag.test.js.map +1 -1
- package/core/dist/runtime-v2/owner-identity.d.ts +69 -0
- package/core/dist/runtime-v2/owner-identity.d.ts.map +1 -0
- package/core/dist/runtime-v2/owner-identity.js +179 -0
- package/core/dist/runtime-v2/owner-identity.js.map +1 -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 -3
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/product-telemetry/daily-identity.d.ts +70 -0
- package/core/dist/runtime-v2/product-telemetry/daily-identity.d.ts.map +1 -0
- package/core/dist/runtime-v2/product-telemetry/daily-identity.js +89 -0
- package/core/dist/runtime-v2/product-telemetry/daily-identity.js.map +1 -0
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts +110 -0
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js +250 -0
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js.map +1 -0
- package/core/dist/runtime-v2/pruning-read-model.d.ts +2 -1
- package/core/dist/runtime-v2/pruning-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/pruning-read-model.js.map +1 -1
- package/core/dist/runtime-v2/receipt-coverage.d.ts +63 -0
- package/core/dist/runtime-v2/receipt-coverage.d.ts.map +1 -0
- package/core/dist/runtime-v2/receipt-coverage.js +19 -0
- package/core/dist/runtime-v2/receipt-coverage.js.map +1 -0
- package/core/dist/runtime-v2/recovery-actions-log.d.ts +7 -0
- package/core/dist/runtime-v2/recovery-actions-log.d.ts.map +1 -1
- package/core/dist/runtime-v2/recovery-actions-log.js +6 -0
- package/core/dist/runtime-v2/recovery-actions-log.js.map +1 -1
- package/core/dist/runtime-v2/runtime-protocol.js +1 -1
- package/core/dist/runtime-v2/runtime-protocol.js.map +1 -1
- package/core/dist/runtime-v2/store/task/__tests__/sqlite-task-store.failed-tasks.test.js +17 -1
- package/core/dist/runtime-v2/store/task/__tests__/sqlite-task-store.failed-tasks.test.js.map +1 -1
- package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/task/sqlite-task-store.js +10 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -1
- package/core/dist/runtime-v2/store/task/task-types.d.ts +2 -0
- package/core/dist/runtime-v2/store/task/task-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/task-status.d.ts +9 -5
- package/core/dist/runtime-v2/task-status.d.ts.map +1 -1
- package/core/dist/runtime-v2/task-status.js +15 -7
- package/core/dist/runtime-v2/task-status.js.map +1 -1
- package/core/dist/runtime-v2/types/event-types.d.ts +4 -0
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js.map +1 -1
- package/core/dist/runtime-v2/types/index.d.ts +1 -1
- 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/runtime-v2/types/principle-enums.d.ts +3 -2
- package/core/dist/runtime-v2/types/principle-enums.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/principle-enums.js +11 -5
- package/core/dist/runtime-v2/types/principle-enums.js.map +1 -1
- package/core/dist/runtime-v2/types/principle-schema.d.ts +1 -1
- package/core/dist/runtime-v2/types/principle-tree-store.d.ts +1 -1
- package/core/dist/runtime-v2/utils/cli-process-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/utils/cli-process-runner.js +3 -2
- package/core/dist/runtime-v2/utils/cli-process-runner.js.map +1 -1
- package/core/package.json +4 -5
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +4 -2
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -11
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +31 -5
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +472 -161
- package/dist/installer.js.map +1 -1
- package/dist/installers/codex-host-installer.d.ts.map +1 -1
- package/dist/installers/codex-host-installer.js +4 -0
- package/dist/installers/codex-host-installer.js.map +1 -1
- package/dist/mvp-config.d.ts +10 -0
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +30 -3
- package/dist/mvp-config.js.map +1 -1
- package/dist/uninstaller.d.ts +9 -1
- package/dist/uninstaller.d.ts.map +1 -1
- package/dist/uninstaller.js +103 -23
- package/dist/uninstaller.js.map +1 -1
- package/dist/update/atomic-file.d.ts +35 -0
- package/dist/update/atomic-file.d.ts.map +1 -0
- package/dist/update/atomic-file.js +120 -0
- package/dist/update/atomic-file.js.map +1 -0
- package/dist/update/bootstrap-protocol.d.ts +55 -0
- package/dist/update/bootstrap-protocol.d.ts.map +1 -0
- package/dist/update/bootstrap-protocol.js +132 -0
- package/dist/update/bootstrap-protocol.js.map +1 -0
- package/dist/update/channel-metadata.d.ts +28 -0
- package/dist/update/channel-metadata.d.ts.map +1 -0
- package/dist/update/channel-metadata.js +90 -0
- package/dist/update/channel-metadata.js.map +1 -0
- package/dist/update/channel-promotion.d.ts +39 -0
- package/dist/update/channel-promotion.d.ts.map +1 -0
- package/dist/update/channel-promotion.js +55 -0
- package/dist/update/channel-promotion.js.map +1 -0
- package/dist/update/data-compatibility.d.ts +35 -0
- package/dist/update/data-compatibility.d.ts.map +1 -0
- package/dist/update/data-compatibility.js +45 -0
- package/dist/update/data-compatibility.js.map +1 -0
- package/dist/update/install-layout.d.ts +59 -0
- package/dist/update/install-layout.d.ts.map +1 -0
- package/dist/update/install-layout.js +127 -0
- package/dist/update/install-layout.js.map +1 -0
- package/dist/update/legacy-migration.d.ts +56 -0
- package/dist/update/legacy-migration.d.ts.map +1 -0
- package/dist/update/legacy-migration.js +254 -0
- package/dist/update/legacy-migration.js.map +1 -0
- package/dist/update/product-identity.d.ts +50 -0
- package/dist/update/product-identity.d.ts.map +1 -0
- package/dist/update/product-identity.js +63 -0
- package/dist/update/product-identity.js.map +1 -0
- package/dist/update/release-asset-manifest.d.ts +31 -0
- package/dist/update/release-asset-manifest.d.ts.map +1 -0
- package/dist/update/release-asset-manifest.js +161 -0
- package/dist/update/release-asset-manifest.js.map +1 -0
- package/dist/update/release-identity.d.ts +33 -0
- package/dist/update/release-identity.d.ts.map +1 -0
- package/dist/update/release-identity.js +108 -0
- package/dist/update/release-identity.js.map +1 -0
- package/dist/update/release-manager.d.ts +96 -0
- package/dist/update/release-manager.d.ts.map +1 -0
- package/dist/update/release-manager.js +253 -0
- package/dist/update/release-manager.js.map +1 -0
- package/dist/update/release-metadata.d.ts +57 -0
- package/dist/update/release-metadata.d.ts.map +1 -0
- package/dist/update/release-metadata.js +200 -0
- package/dist/update/release-metadata.js.map +1 -0
- package/dist/update/release-policy.d.ts +51 -0
- package/dist/update/release-policy.d.ts.map +1 -0
- package/dist/update/release-policy.js +103 -0
- package/dist/update/release-policy.js.map +1 -0
- package/dist/update/rollback-policy.d.ts +56 -0
- package/dist/update/rollback-policy.d.ts.map +1 -0
- package/dist/update/rollback-policy.js +61 -0
- package/dist/update/rollback-policy.js.map +1 -0
- package/dist/update/transaction-journal.d.ts +121 -0
- package/dist/update/transaction-journal.d.ts.map +1 -0
- package/dist/update/transaction-journal.js +333 -0
- package/dist/update/transaction-journal.js.map +1 -0
- package/dist/update/trust-metadata.d.ts +55 -0
- package/dist/update/trust-metadata.d.ts.map +1 -0
- package/dist/update/trust-metadata.js +170 -0
- package/dist/update/trust-metadata.js.map +1 -0
- package/dist/update/update-history.d.ts +46 -0
- package/dist/update/update-history.d.ts.map +1 -0
- package/dist/update/update-history.js +123 -0
- package/dist/update/update-history.js.map +1 -0
- package/dist/utils/env.d.ts +7 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +134 -44
- package/dist/utils/env.js.map +1 -1
- package/host-runtime/dist/governance-observation-store.d.ts +172 -0
- package/host-runtime/dist/governance-observation-store.js +649 -0
- package/host-runtime/dist/index.d.ts +6 -0
- package/host-runtime/dist/index.js +8 -0
- package/host-runtime/dist/product-telemetry/consent-store.d.ts +107 -0
- package/host-runtime/dist/product-telemetry/consent-store.js +329 -0
- package/host-runtime/dist/product-telemetry/eligibility.d.ts +53 -0
- package/host-runtime/dist/product-telemetry/eligibility.js +69 -0
- package/host-runtime/dist/product-telemetry/exporter.d.ts +46 -0
- package/host-runtime/dist/product-telemetry/exporter.js +71 -0
- package/host-runtime/dist/product-telemetry/milestone-readers.d.ts +61 -0
- package/host-runtime/dist/product-telemetry/milestone-readers.js +234 -0
- package/host-runtime/dist/product-telemetry/service.d.ts +142 -0
- package/host-runtime/dist/product-telemetry/service.js +532 -0
- package/host-runtime/dist/product-telemetry/workspace-scope.d.ts +38 -0
- package/host-runtime/dist/product-telemetry/workspace-scope.js +64 -0
- package/host-runtime/package.json +7 -2
- package/install-layout/dist/index.d.ts +48 -0
- package/install-layout/dist/index.js +81 -0
- package/install-layout/dist/index.test.d.ts +1 -0
- package/install-layout/dist/index.test.js +34 -0
- package/install-layout/package.json +33 -0
- package/package.json +16 -6
- package/pd-cli/dist/commands/__tests__/telemetry-flag-wiring.test.d.ts +9 -0
- package/pd-cli/dist/commands/__tests__/telemetry-flag-wiring.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/telemetry-flag-wiring.test.js +76 -0
- package/pd-cli/dist/commands/__tests__/telemetry-flag-wiring.test.js.map +1 -0
- package/pd-cli/dist/commands/__tests__/version.test.d.ts +2 -0
- package/pd-cli/dist/commands/__tests__/version.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/version.test.js +134 -0
- package/pd-cli/dist/commands/__tests__/version.test.js.map +1 -0
- package/pd-cli/dist/commands/console.d.ts.map +1 -1
- package/pd-cli/dist/commands/console.js +29 -10
- package/pd-cli/dist/commands/console.js.map +1 -1
- package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-record.js +6 -15
- package/pd-cli/dist/commands/pain-record.js.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.d.ts +29 -0
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.js +70 -31
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js +2 -2
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js.map +1 -1
- package/pd-cli/dist/commands/telemetry.d.ts +82 -0
- package/pd-cli/dist/commands/telemetry.d.ts.map +1 -0
- package/pd-cli/dist/commands/telemetry.js +268 -0
- package/pd-cli/dist/commands/telemetry.js.map +1 -0
- package/pd-cli/dist/commands/version.d.ts +11 -0
- package/pd-cli/dist/commands/version.d.ts.map +1 -0
- package/pd-cli/dist/commands/version.js +48 -0
- package/pd-cli/dist/commands/version.js.map +1 -0
- package/pd-cli/dist/index.js +35 -2
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/version-report.d.ts +44 -0
- package/pd-cli/dist/services/version-report.d.ts.map +1 -0
- package/pd-cli/dist/services/version-report.js +152 -0
- package/pd-cli/dist/services/version-report.js.map +1 -0
- package/pd-cli/package.json +3 -2
- package/plugin/dist/bundle.js +870 -932
- package/plugin/dist/core/init.d.ts +2 -1
- package/plugin/dist/core/principle-application-ledger.d.ts +10 -0
- package/plugin/dist/core/product-telemetry-trigger.d.ts +14 -0
- package/plugin/dist/core/thinking-os-parser.d.ts +5 -2
- package/plugin/dist/governance-audit.js +386 -0
- package/plugin/dist/hooks/gate-block-helper.d.ts +25 -1
- package/plugin/dist/hooks/gate.d.ts +22 -0
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/rulehost-evidence.js +832 -0
- package/plugin/dist/templates/langs/en/principles/THINKING_OS.md +53 -45
- package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +1 -1
- package/plugin/dist/templates/langs/zh/principles/THINKING_OS.md +62 -46
- package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +1 -1
- package/plugin/dist/templates/workspace/.principles/THINKING_OS.md +66 -38
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/templates/langs/en/principles/THINKING_OS.md +53 -45
- package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +1 -1
- package/plugin/templates/langs/zh/principles/THINKING_OS.md +62 -46
- package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +1 -1
- package/plugin/templates/workspace/.principles/THINKING_OS.md +66 -38
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bootstrap process protocol (SPEC §6.1) — strict single-JSON-object in,
|
|
3
|
+
* strict single-JSON-object out.
|
|
4
|
+
*
|
|
5
|
+
* Companion, Console, and the installer speak to the bootstrap through this
|
|
6
|
+
* one protocol. The transport layer (stdin/stdout around this pure handler)
|
|
7
|
+
* stays thin so the contract itself is testable: exactly one parseable JSON
|
|
8
|
+
* object per direction, stable reason codes, and a next action on every
|
|
9
|
+
* failure (rc-9, cli-1 semantics applied to the protocol boundary).
|
|
10
|
+
*/
|
|
11
|
+
import { isReleaseChannelName } from './product-identity.js';
|
|
12
|
+
import { ReleaseManagerError } from './release-manager.js';
|
|
13
|
+
export class BootstrapProtocolError extends Error {
|
|
14
|
+
reason;
|
|
15
|
+
constructor(reason, message) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.name = 'BootstrapProtocolError';
|
|
18
|
+
this.reason = reason;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Parses exactly ONE JSON object from the raw request text. Trailing data,
|
|
23
|
+
* non-objects, arrays, and unknown/missing fields are hard errors — a
|
|
24
|
+
* protocol peer that emits garbage gets a structured refusal, never a
|
|
25
|
+
* best-effort guess.
|
|
26
|
+
*/
|
|
27
|
+
export function parseBootstrapRequest(raw) {
|
|
28
|
+
const text = raw.trim();
|
|
29
|
+
if (text.length === 0) {
|
|
30
|
+
throw new BootstrapProtocolError('protocol_empty_request', 'The bootstrap request body is empty.');
|
|
31
|
+
}
|
|
32
|
+
if (!text.startsWith('{') || !text.endsWith('}')) {
|
|
33
|
+
throw new BootstrapProtocolError('protocol_not_single_object', 'The bootstrap request must be exactly one JSON object.');
|
|
34
|
+
}
|
|
35
|
+
let parsed;
|
|
36
|
+
try {
|
|
37
|
+
parsed = JSON.parse(text);
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
throw new BootstrapProtocolError('protocol_invalid_json', `The bootstrap request is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
41
|
+
}
|
|
42
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
43
|
+
throw new BootstrapProtocolError('protocol_not_single_object', 'The bootstrap request must be exactly one JSON object.');
|
|
44
|
+
}
|
|
45
|
+
const record = parsed;
|
|
46
|
+
if (!Object.hasOwn(record, 'op')) {
|
|
47
|
+
throw new BootstrapProtocolError('protocol_missing_op', 'The bootstrap request is missing the required "op" field.');
|
|
48
|
+
}
|
|
49
|
+
const { op } = record;
|
|
50
|
+
const knownOps = ['inspect', 'check', 'apply', 'rollback'];
|
|
51
|
+
if (typeof op !== 'string' || !knownOps.includes(op)) {
|
|
52
|
+
throw new BootstrapProtocolError('protocol_unknown_op', `Unknown bootstrap op: ${JSON.stringify(op)}. Supported: ${knownOps.join(', ')}.`);
|
|
53
|
+
}
|
|
54
|
+
const allowedFields = op === 'check'
|
|
55
|
+
? new Set(['op', 'channel'])
|
|
56
|
+
: op === 'apply'
|
|
57
|
+
? new Set(['op', 'releaseId'])
|
|
58
|
+
: new Set(['op']);
|
|
59
|
+
const extraFields = Object.keys(record).filter((key) => !allowedFields.has(key));
|
|
60
|
+
if (extraFields.length > 0) {
|
|
61
|
+
throw new BootstrapProtocolError('protocol_unknown_field', `Unknown bootstrap request fields: ${extraFields.join(', ')}`);
|
|
62
|
+
}
|
|
63
|
+
if (op === 'check') {
|
|
64
|
+
if (!Object.hasOwn(record, 'channel')) {
|
|
65
|
+
throw new BootstrapProtocolError('protocol_missing_channel', 'A check request requires the "channel" field.');
|
|
66
|
+
}
|
|
67
|
+
if (!isReleaseChannelName(record.channel)) {
|
|
68
|
+
throw new BootstrapProtocolError('protocol_invalid_channel', `channel must be "stable" or "candidate", got: ${JSON.stringify(record.channel)}`);
|
|
69
|
+
}
|
|
70
|
+
return { op, channel: record.channel };
|
|
71
|
+
}
|
|
72
|
+
if (op === 'apply') {
|
|
73
|
+
if (!Object.hasOwn(record, 'releaseId')) {
|
|
74
|
+
throw new BootstrapProtocolError('protocol_missing_release_id', 'An apply request requires the "releaseId" field.');
|
|
75
|
+
}
|
|
76
|
+
if (typeof record.releaseId !== 'string' || record.releaseId.length === 0) {
|
|
77
|
+
throw new BootstrapProtocolError('protocol_invalid_release_id', `releaseId must be a non-empty string, got: ${JSON.stringify(record.releaseId)}`);
|
|
78
|
+
}
|
|
79
|
+
return { op, releaseId: record.releaseId };
|
|
80
|
+
}
|
|
81
|
+
return op === 'rollback' ? { op: 'rollback' } : { op: 'inspect' };
|
|
82
|
+
}
|
|
83
|
+
/** Serializes exactly one JSON object for stdout (no banners, no extra text). */
|
|
84
|
+
export function serializeBootstrapResponse(response) {
|
|
85
|
+
return `${JSON.stringify(response)}\n`;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Dispatches a parsed request against a ReleaseManager and produces the
|
|
89
|
+
* protocol response. Manager failures become structured refusals — the
|
|
90
|
+
* protocol never leaks stack traces into the response object.
|
|
91
|
+
*/
|
|
92
|
+
export async function handleBootstrapRequest(request, manager) {
|
|
93
|
+
try {
|
|
94
|
+
switch (request.op) {
|
|
95
|
+
case 'inspect':
|
|
96
|
+
return { ok: true, result: await Promise.resolve(manager.inspect()) };
|
|
97
|
+
case 'check':
|
|
98
|
+
return { ok: true, result: await manager.check(request.channel) };
|
|
99
|
+
case 'apply':
|
|
100
|
+
await manager.apply();
|
|
101
|
+
return { ok: true, result: { applied: true } };
|
|
102
|
+
case 'rollback':
|
|
103
|
+
await manager.rollback();
|
|
104
|
+
return { ok: true, result: { rolledBack: true } };
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
if (error instanceof ReleaseManagerError) {
|
|
109
|
+
return {
|
|
110
|
+
ok: false,
|
|
111
|
+
reason: error.reason,
|
|
112
|
+
message: error.message,
|
|
113
|
+
nextAction: error.nextAction,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
117
|
+
return {
|
|
118
|
+
ok: false,
|
|
119
|
+
reason: 'internal_error',
|
|
120
|
+
message,
|
|
121
|
+
nextAction: 'Retry the operation; if it fails again, collect the bootstrap log from ~/.pd/logs and report it.',
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
// Exhaustive switch guard — reaching here is a programming error.
|
|
125
|
+
return {
|
|
126
|
+
ok: false,
|
|
127
|
+
reason: 'internal_error',
|
|
128
|
+
message: 'unhandled bootstrap request',
|
|
129
|
+
nextAction: 'Report this protocol violation.',
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=bootstrap-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-protocol.js","source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CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,gBAAgB;YACxB,OAAO;YACP,UAAU,EAAE,kGAAkG;SAC/G,CAAC;IACJ,CAAC;IACD,kEAAkE;IAClE,OAAO;QACL,EAAE,EAAE,KAAK;QACT,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,6BAA6B;QACtC,UAAU,EAAE,iCAAiC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strict Channel Metadata contract (SPEC §4.2).
|
|
3
|
+
*
|
|
4
|
+
* Channel Metadata maps `stable` / `candidate` to a release metadata digest.
|
|
5
|
+
* Promotion changes ONLY this signed pointer; it never rebuilds or mutates a
|
|
6
|
+
* release. The pointer must reference the exact release metadata digest —
|
|
7
|
+
* never an asset digest, never a package version.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReleaseChannelName } from './product-identity.js';
|
|
10
|
+
export declare const CHANNEL_METADATA_SCHEMA_VERSION = 1;
|
|
11
|
+
export interface ChannelMetadata {
|
|
12
|
+
readonly schemaVersion: number;
|
|
13
|
+
readonly channel: ReleaseChannelName;
|
|
14
|
+
/** Monotonic metadata version — must strictly increase per channel. */
|
|
15
|
+
readonly version: number;
|
|
16
|
+
readonly expiresAt: string;
|
|
17
|
+
readonly releaseMetadataDigest: string;
|
|
18
|
+
readonly releaseId: string;
|
|
19
|
+
readonly productVersion: string;
|
|
20
|
+
readonly publicationSequence: number;
|
|
21
|
+
}
|
|
22
|
+
export declare class ChannelMetadataError extends Error {
|
|
23
|
+
readonly field: string;
|
|
24
|
+
constructor(field: string, message: string);
|
|
25
|
+
}
|
|
26
|
+
export declare function parseChannelMetadata(value: unknown): ChannelMetadata;
|
|
27
|
+
export declare function isChannelMetadataExpired(metadata: ChannelMetadata, now?: Date): boolean;
|
|
28
|
+
//# sourceMappingURL=channel-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-metadata.d.ts","sourceRoot":"","sources":["../../src/update/channel-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,YAAY,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAIzC;CACF;AAaD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAyDpE;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,GAAE,IAAiB,GAAG,OAAO,CAEnG"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strict Channel Metadata contract (SPEC §4.2).
|
|
3
|
+
*
|
|
4
|
+
* Channel Metadata maps `stable` / `candidate` to a release metadata digest.
|
|
5
|
+
* Promotion changes ONLY this signed pointer; it never rebuilds or mutates a
|
|
6
|
+
* release. The pointer must reference the exact release metadata digest —
|
|
7
|
+
* never an asset digest, never a package version.
|
|
8
|
+
*/
|
|
9
|
+
import { assertSha256Hex, isReleaseChannelName, parseProductVersion, ProductIdentityError, } from './product-identity.js';
|
|
10
|
+
export const CHANNEL_METADATA_SCHEMA_VERSION = 1;
|
|
11
|
+
export class ChannelMetadataError extends Error {
|
|
12
|
+
field;
|
|
13
|
+
constructor(field, message) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = 'ChannelMetadataError';
|
|
16
|
+
this.field = field;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function isPlainObject(value) {
|
|
20
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
21
|
+
}
|
|
22
|
+
function requireOwn(record, field) {
|
|
23
|
+
if (!Object.hasOwn(record, field)) {
|
|
24
|
+
throw new ChannelMetadataError(field, `Channel metadata is missing required field "${field}"`);
|
|
25
|
+
}
|
|
26
|
+
return record[field];
|
|
27
|
+
}
|
|
28
|
+
export function parseChannelMetadata(value) {
|
|
29
|
+
if (!isPlainObject(value)) {
|
|
30
|
+
throw new ChannelMetadataError('root', 'Channel metadata must be a JSON object');
|
|
31
|
+
}
|
|
32
|
+
const { schemaVersion } = { schemaVersion: requireOwn(value, 'schemaVersion') };
|
|
33
|
+
if (schemaVersion !== CHANNEL_METADATA_SCHEMA_VERSION) {
|
|
34
|
+
throw new ChannelMetadataError('schemaVersion', `Unsupported channel metadata schemaVersion: ${JSON.stringify(schemaVersion)}`);
|
|
35
|
+
}
|
|
36
|
+
const channelValue = requireOwn(value, 'channel');
|
|
37
|
+
if (!isReleaseChannelName(channelValue)) {
|
|
38
|
+
throw new ChannelMetadataError('channel', `channel must be "stable" or "candidate", got: ${JSON.stringify(channelValue)}`);
|
|
39
|
+
}
|
|
40
|
+
const version = requireOwn(value, 'version');
|
|
41
|
+
if (typeof version !== 'number' || !Number.isSafeInteger(version) || version <= 0) {
|
|
42
|
+
throw new ChannelMetadataError('version', `version must be a positive safe integer, got: ${JSON.stringify(version)}`);
|
|
43
|
+
}
|
|
44
|
+
const expiresAt = requireOwn(value, 'expiresAt');
|
|
45
|
+
if (typeof expiresAt !== 'string' || !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/.test(expiresAt) || Number.isNaN(Date.parse(expiresAt))) {
|
|
46
|
+
throw new ChannelMetadataError('expiresAt', `expiresAt must be an RFC3339 UTC timestamp ending in Z, got: ${JSON.stringify(expiresAt)}`);
|
|
47
|
+
}
|
|
48
|
+
// Identity helpers throw ProductIdentityError; rethrow as channel errors.
|
|
49
|
+
const guarded = (read) => {
|
|
50
|
+
try {
|
|
51
|
+
return read();
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (error instanceof ProductIdentityError) {
|
|
55
|
+
throw new ChannelMetadataError(error.field, error.message);
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const releaseMetadataDigest = guarded(() => assertSha256Hex(requireOwn(value, 'releaseMetadataDigest'), 'releaseMetadataDigest'));
|
|
61
|
+
const releaseId = guarded(() => assertSha256Hex(requireOwn(value, 'releaseId'), 'releaseId'));
|
|
62
|
+
const { productVersion } = guarded(() => parseProductVersion(requireOwn(value, 'productVersion')));
|
|
63
|
+
const publicationSequence = requireOwn(value, 'publicationSequence');
|
|
64
|
+
if (typeof publicationSequence !== 'number' || !Number.isSafeInteger(publicationSequence) || publicationSequence <= 0) {
|
|
65
|
+
throw new ChannelMetadataError('publicationSequence', `publicationSequence must be a positive safe integer, got: ${JSON.stringify(publicationSequence)}`);
|
|
66
|
+
}
|
|
67
|
+
const knownKeys = new Set([
|
|
68
|
+
'schemaVersion', 'channel', 'version', 'expiresAt', 'releaseMetadataDigest',
|
|
69
|
+
'releaseId', 'productVersion', 'publicationSequence',
|
|
70
|
+
]);
|
|
71
|
+
for (const key of Object.keys(value)) {
|
|
72
|
+
if (!knownKeys.has(key)) {
|
|
73
|
+
throw new ChannelMetadataError(key, `Channel metadata contains unknown field "${key}"`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
schemaVersion,
|
|
78
|
+
channel: channelValue,
|
|
79
|
+
version,
|
|
80
|
+
expiresAt,
|
|
81
|
+
releaseMetadataDigest,
|
|
82
|
+
releaseId,
|
|
83
|
+
productVersion,
|
|
84
|
+
publicationSequence,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export function isChannelMetadataExpired(metadata, now = new Date()) {
|
|
88
|
+
return Date.parse(metadata.expiresAt) <= now.getTime();
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=channel-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-metadata.js","sourceRoot":"","sources":["../../src/update/channel-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAcjD,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACpC,KAAK,CAAS;IAEvB,YAAY,KAAa,EAAE,OAAe;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,UAAU,CAAC,MAA+B,EAAE,KAAa;IAChE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,oBAAoB,CAAC,KAAK,EAAE,+CAA+C,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C,mBAAmB,CAAC,EAAE,CAAC,CAAC;IAC5J,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;QACxB,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,uBAAuB;QAC3E,WAAW,EAAE,gBAAgB,EAAE,qBAAqB;KACrD,CAAC,CAAC;IACH,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,oBAAoB,CAAC,GAAG,EAAE,4CAA4C,GAAG,GAAG,CAAC,CAAC;QAC1F,CAAC;IACH,CAAC;IACD,OAAO;QACL,aAAa;QACb,OAAO,EAAE,YAAY;QACrB,OAAO;QACP,SAAS;QACT,qBAAqB;QACrB,SAAS;QACT,cAAc;QACd,mBAAmB;KACpB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAyB,EAAE,GAAG,GAAS,IAAI,IAAI,EAAE;IACxF,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel promotion (SPEC §4.2, §13, §18-8).
|
|
3
|
+
*
|
|
4
|
+
* Promotion changes ONLY the signed channel pointer: the next channel
|
|
5
|
+
* document references an already-published release's exact metadata digest.
|
|
6
|
+
* It never rebuilds, rewrites, or even reads release ASSETS — that is the
|
|
7
|
+
* structural separation-of-duties guarantee this module embodies. Release
|
|
8
|
+
* publication and channel promotion are separate permissions; a promotion
|
|
9
|
+
* credential must not be able to alter a published asset.
|
|
10
|
+
*/
|
|
11
|
+
import type { ChannelMetadata } from './channel-metadata.js';
|
|
12
|
+
import type { ReleaseMetadata } from './release-metadata.js';
|
|
13
|
+
import type { ReleaseChannelName } from './product-identity.js';
|
|
14
|
+
export type PromotionRefusalReason = 'channel_mismatch' | 'sequence_not_advancing' | 'channel_version_regression';
|
|
15
|
+
export interface PromotionRefusal {
|
|
16
|
+
readonly promoted: false;
|
|
17
|
+
readonly reason: PromotionRefusalReason;
|
|
18
|
+
readonly message: string;
|
|
19
|
+
}
|
|
20
|
+
export interface PromotionResult {
|
|
21
|
+
readonly promoted: true;
|
|
22
|
+
readonly channel: ReleaseChannelName;
|
|
23
|
+
readonly previousVersion: number | null;
|
|
24
|
+
readonly next: ChannelMetadata;
|
|
25
|
+
}
|
|
26
|
+
export interface PromotionPlanInput {
|
|
27
|
+
readonly channel: ReleaseChannelName;
|
|
28
|
+
readonly release: ReleaseMetadata;
|
|
29
|
+
readonly current: ChannelMetadata | null;
|
|
30
|
+
/** Bumped by exactly one per promotion (monotonic metadata version). */
|
|
31
|
+
readonly expiresAt: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Plans the next signed channel document. Pure: no I/O, no asset access.
|
|
35
|
+
* The output is what a promotion signer signs — the signature step lives in
|
|
36
|
+
* the release pipeline, never here.
|
|
37
|
+
*/
|
|
38
|
+
export declare function planChannelPromotion(input: PromotionPlanInput): PromotionResult | PromotionRefusal;
|
|
39
|
+
//# sourceMappingURL=channel-promotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-promotion.d.ts","sourceRoot":"","sources":["../../src/update/channel-promotion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,sBAAsB,GAC9B,kBAAkB,GAClB,wBAAwB,GACxB,4BAA4B,CAAC;AAEjC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,wEAAwE;IACxE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CA2ClG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel promotion (SPEC §4.2, §13, §18-8).
|
|
3
|
+
*
|
|
4
|
+
* Promotion changes ONLY the signed channel pointer: the next channel
|
|
5
|
+
* document references an already-published release's exact metadata digest.
|
|
6
|
+
* It never rebuilds, rewrites, or even reads release ASSETS — that is the
|
|
7
|
+
* structural separation-of-duties guarantee this module embodies. Release
|
|
8
|
+
* publication and channel promotion are separate permissions; a promotion
|
|
9
|
+
* credential must not be able to alter a published asset.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Plans the next signed channel document. Pure: no I/O, no asset access.
|
|
13
|
+
* The output is what a promotion signer signs — the signature step lives in
|
|
14
|
+
* the release pipeline, never here.
|
|
15
|
+
*/
|
|
16
|
+
export function planChannelPromotion(input) {
|
|
17
|
+
const { channel, release, current } = input;
|
|
18
|
+
if (current !== null && current.channel !== channel) {
|
|
19
|
+
return {
|
|
20
|
+
promoted: false,
|
|
21
|
+
reason: 'channel_mismatch',
|
|
22
|
+
message: `The current channel document is for "${current.channel}", not "${channel}".`,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (current !== null && release.publicationSequence < current.publicationSequence) {
|
|
26
|
+
return {
|
|
27
|
+
promoted: false,
|
|
28
|
+
reason: 'sequence_not_advancing',
|
|
29
|
+
message: `Promoting release ${release.productVersion} (sequence ${release.publicationSequence}) would move the ${channel} channel backwards from sequence ${current.publicationSequence}.`,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const previousVersion = current !== null ? current.version : null;
|
|
33
|
+
const nextVersion = (previousVersion ?? 0) + 1;
|
|
34
|
+
const next = {
|
|
35
|
+
schemaVersion: 1,
|
|
36
|
+
channel,
|
|
37
|
+
version: nextVersion,
|
|
38
|
+
expiresAt: input.expiresAt,
|
|
39
|
+
// The pointer triple — the ONLY release facts a promotion may state, and
|
|
40
|
+
// all three come verbatim from the published release metadata.
|
|
41
|
+
releaseMetadataDigest: release.metadataDigest,
|
|
42
|
+
releaseId: release.releaseId,
|
|
43
|
+
productVersion: release.productVersion,
|
|
44
|
+
publicationSequence: release.publicationSequence,
|
|
45
|
+
};
|
|
46
|
+
if (nextVersion <= (previousVersion ?? 0)) {
|
|
47
|
+
return {
|
|
48
|
+
promoted: false,
|
|
49
|
+
reason: 'channel_version_regression',
|
|
50
|
+
message: `Channel version must strictly increase (${previousVersion ?? 0} -> ${nextVersion}).`,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return { promoted: true, channel, previousVersion, next };
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=channel-promotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-promotion.js","sourceRoot":"","sources":["../../src/update/channel-promotion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;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AAO;YACL,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,4BAA4B;YACpC,OAAO,EAAE,2CAA2C,eAAe,IAAI,CAAC,OAAO,WAAW,IAAI;SAC/F,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data and configuration compatibility policy (SPEC §10).
|
|
3
|
+
*
|
|
4
|
+
* Code rollback and data compatibility are separate release properties. An
|
|
5
|
+
* ordinary update is automatically eligible only when its schema changes
|
|
6
|
+
* stay backward-readable by the retained previous release
|
|
7
|
+
* (expand-migrate-contract). Destructive or contract migrations require a
|
|
8
|
+
* separate explicit maintenance workflow and are REFUSED by the ordinary
|
|
9
|
+
* update path — they cannot pass through automatic update.
|
|
10
|
+
*/
|
|
11
|
+
import { ProductIdentityError } from './product-identity.js';
|
|
12
|
+
import type { ReleaseMetadata } from './release-metadata.js';
|
|
13
|
+
export type DataCompatibilityDecision = {
|
|
14
|
+
readonly eligible: true;
|
|
15
|
+
readonly mode: 'expand_migrate_contract';
|
|
16
|
+
readonly oldestReadableRelease: string;
|
|
17
|
+
} | {
|
|
18
|
+
readonly eligible: false;
|
|
19
|
+
readonly reason: 'destructive_migration_requires_maintenance';
|
|
20
|
+
readonly message: string;
|
|
21
|
+
readonly nextAction: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Decides whether updating from `previous` to `candidate` keeps ordinary
|
|
25
|
+
* update semantics. The candidate declares the oldest release whose data it
|
|
26
|
+
* remains forward-compatible with (`dataSchemaForwardReadableFrom`); the
|
|
27
|
+
* RETAINED previous release must be within that window for automatic
|
|
28
|
+
* eligibility.
|
|
29
|
+
*/
|
|
30
|
+
export declare function evaluateDataCompatibility(input: {
|
|
31
|
+
candidate: ReleaseMetadata;
|
|
32
|
+
previous: ReleaseMetadata | null;
|
|
33
|
+
}): DataCompatibilityDecision;
|
|
34
|
+
export { ProductIdentityError };
|
|
35
|
+
//# sourceMappingURL=data-compatibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-compatibility.d.ts","sourceRoot":"","sources":["../../src/update/data-compatibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAA+C,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC1G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,yBAAyB,GACjC;IACE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACxC,GACD;IACE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,4CAA4C,CAAC;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEN;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,SAAS,EAAE,eAAe,CAAC;IAC3B,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;CAClC,GAAG,yBAAyB,CA8B5B;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data and configuration compatibility policy (SPEC §10).
|
|
3
|
+
*
|
|
4
|
+
* Code rollback and data compatibility are separate release properties. An
|
|
5
|
+
* ordinary update is automatically eligible only when its schema changes
|
|
6
|
+
* stay backward-readable by the retained previous release
|
|
7
|
+
* (expand-migrate-contract). Destructive or contract migrations require a
|
|
8
|
+
* separate explicit maintenance workflow and are REFUSED by the ordinary
|
|
9
|
+
* update path — they cannot pass through automatic update.
|
|
10
|
+
*/
|
|
11
|
+
import { compareProductVersions, parseProductVersion, ProductIdentityError } from './product-identity.js';
|
|
12
|
+
/**
|
|
13
|
+
* Decides whether updating from `previous` to `candidate` keeps ordinary
|
|
14
|
+
* update semantics. The candidate declares the oldest release whose data it
|
|
15
|
+
* remains forward-compatible with (`dataSchemaForwardReadableFrom`); the
|
|
16
|
+
* RETAINED previous release must be within that window for automatic
|
|
17
|
+
* eligibility.
|
|
18
|
+
*/
|
|
19
|
+
export function evaluateDataCompatibility(input) {
|
|
20
|
+
const { candidate, previous } = input;
|
|
21
|
+
const oldestReadable = parseProductVersion(candidate.compatibility.dataSchemaForwardReadableFrom, 'compatibility.dataSchemaForwardReadableFrom');
|
|
22
|
+
if (previous === null) {
|
|
23
|
+
return {
|
|
24
|
+
eligible: true,
|
|
25
|
+
mode: 'expand_migrate_contract',
|
|
26
|
+
oldestReadableRelease: oldestReadable.productVersion,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const previousVersion = parseProductVersion(previous.productVersion, 'previous.productVersion');
|
|
30
|
+
if (compareProductVersions(previousVersion, oldestReadable) >= 0) {
|
|
31
|
+
return {
|
|
32
|
+
eligible: true,
|
|
33
|
+
mode: 'expand_migrate_contract',
|
|
34
|
+
oldestReadableRelease: oldestReadable.productVersion,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
eligible: false,
|
|
39
|
+
reason: 'destructive_migration_requires_maintenance',
|
|
40
|
+
message: `Release ${candidate.productVersion} only guarantees data readable back to ${oldestReadable.productVersion}, but the retained previous release is ${previous.productVersion}. An ordinary update could strand code rollback.`,
|
|
41
|
+
nextAction: 'Run the separate maintenance migration workflow (export, confirmation, recovery instructions) instead of the ordinary update path; code rollback is unavailable after its declared point.',
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export { ProductIdentityError };
|
|
45
|
+
//# sourceMappingURL=data-compatibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-compatibility.js","sourceRoot":"","sources":["../../src/update/data-compatibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAgB1G;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAGzC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,cAAc,GAAG,mBAAmB,CACxC,SAAS,CAAC,aAAa,CAAC,6BAA6B,EACrD,6CAA6C,CAC9C,CAAC;IAEF,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,yBAAyB;YAC/B,qBAAqB,EAAE,cAAc,CAAC,cAAc;SACrD,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,mBAAmB,CAAC,QAAQ,CAAC,cAAc,EAAE,yBAAyB,CAAC,CAAC;IAChG,IAAI,sBAAsB,CAAC,eAAe,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QACjE,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,yBAAyB;YAC/B,qBAAqB,EAAE,cAAc,CAAC,cAAc;SACrD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,4CAA4C;QACpD,OAAO,EAAE,WAAW,SAAS,CAAC,cAAc,0CAA0C,cAAc,CAAC,cAAc,0CAA0C,QAAQ,CAAC,cAAc,kDAAkD;QACtO,UAAU,EAAE,2LAA2L;KACxM,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installation layout contract (SPEC §5).
|
|
3
|
+
*
|
|
4
|
+
* Production installation state lives under `~/.pd`:
|
|
5
|
+
*
|
|
6
|
+
* bootstrap/ installer-owned; a product release can never overwrite it
|
|
7
|
+
* install.json channel selection + automatic check settings
|
|
8
|
+
* trust/ TUF trusted root metadata cache
|
|
9
|
+
* channels/ cached signed channel metadata
|
|
10
|
+
* releases/<release-id>/
|
|
11
|
+
* staging/<transaction-id>/
|
|
12
|
+
* transactions/<transaction-id>.json
|
|
13
|
+
* active.json / previous.json
|
|
14
|
+
* logs/
|
|
15
|
+
*
|
|
16
|
+
* This module owns ONLY path derivation and strict readers. Every read of
|
|
17
|
+
* untrusted on-disk JSON returns `unknown` until validated (rc-1) and fails
|
|
18
|
+
* loud on malformed required fields (rc-3).
|
|
19
|
+
*/
|
|
20
|
+
import { type ReleaseChannelName } from './product-identity.js';
|
|
21
|
+
export interface PdHomePaths {
|
|
22
|
+
readonly home: string;
|
|
23
|
+
readonly bootstrapDir: string;
|
|
24
|
+
readonly bootstrapManifestPath: string;
|
|
25
|
+
readonly installConfigPath: string;
|
|
26
|
+
readonly trustDir: string;
|
|
27
|
+
readonly channelsDir: string;
|
|
28
|
+
readonly releasesDir: string;
|
|
29
|
+
readonly stagingDir: string;
|
|
30
|
+
readonly transactionsDir: string;
|
|
31
|
+
readonly activeRecordPath: string;
|
|
32
|
+
readonly previousRecordPath: string;
|
|
33
|
+
readonly logsDir: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function resolvePdHomePaths(pdHome: string): PdHomePaths;
|
|
36
|
+
/** Creates the installation skeleton once; never touches an existing file. */
|
|
37
|
+
export declare function ensurePdHomeLayout(paths: PdHomePaths): void;
|
|
38
|
+
export declare class InstallLayoutError extends Error {
|
|
39
|
+
readonly field: string;
|
|
40
|
+
constructor(field: string, message: string);
|
|
41
|
+
}
|
|
42
|
+
export interface BootstrapManifest {
|
|
43
|
+
readonly bootstrapVersion: string;
|
|
44
|
+
readonly installedAt: string;
|
|
45
|
+
}
|
|
46
|
+
/** Strict reader for the installer-owned bootstrap manifest. */
|
|
47
|
+
export declare function readBootstrapManifest(paths: PdHomePaths): BootstrapManifest | null;
|
|
48
|
+
export interface InstallConfig {
|
|
49
|
+
readonly channel: ReleaseChannelName;
|
|
50
|
+
readonly autoCheck: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Installation-level settings (SPEC §2.3). Missing file yields the safe
|
|
54
|
+
* default (stable channel, automatic checks off); a malformed file fails
|
|
55
|
+
* loud instead of degrading to guesses.
|
|
56
|
+
*/
|
|
57
|
+
export declare function readInstallConfig(paths: PdHomePaths): InstallConfig;
|
|
58
|
+
export declare function writeInstallConfig(paths: PdHomePaths, config: InstallConfig): void;
|
|
59
|
+
//# sourceMappingURL=install-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-layout.d.ts","sourceRoot":"","sources":["../../src/update/install-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAmE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEjI,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,MAA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