@productbrain/cli 0.1.0-beta.41 → 0.1.0-beta.4105
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 +1 -0
- package/dist/__tests__/adapters.test.js +54 -1
- package/dist/__tests__/adapters.test.js.map +1 -1
- package/dist/__tests__/audit.test.js +65 -44
- package/dist/__tests__/audit.test.js.map +1 -1
- package/dist/__tests__/authority-domains-queue.test.d.ts +2 -0
- package/dist/__tests__/authority-domains-queue.test.d.ts.map +1 -0
- package/dist/__tests__/authority-domains-queue.test.js +169 -0
- package/dist/__tests__/authority-domains-queue.test.js.map +1 -0
- package/dist/__tests__/authority-domains.test.d.ts +2 -0
- package/dist/__tests__/authority-domains.test.d.ts.map +1 -0
- package/dist/__tests__/authority-domains.test.js +48 -0
- package/dist/__tests__/authority-domains.test.js.map +1 -0
- package/dist/__tests__/canonicalRefs.vocab.test.d.ts +2 -0
- package/dist/__tests__/canonicalRefs.vocab.test.d.ts.map +1 -0
- package/dist/__tests__/canonicalRefs.vocab.test.js +251 -0
- package/dist/__tests__/canonicalRefs.vocab.test.js.map +1 -0
- package/dist/__tests__/capture-receipt-coaching.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-coaching.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-coaching.test.js +89 -0
- package/dist/__tests__/capture-receipt-coaching.test.js.map +1 -0
- package/dist/__tests__/capture-receipt-domain.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-domain.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-domain.test.js +29 -0
- package/dist/__tests__/capture-receipt-domain.test.js.map +1 -0
- package/dist/__tests__/capture.test.js +625 -33
- package/dist/__tests__/capture.test.js.map +1 -1
- package/dist/__tests__/coaching-mirror-drift.test.d.ts +2 -0
- package/dist/__tests__/coaching-mirror-drift.test.d.ts.map +1 -0
- package/dist/__tests__/coaching-mirror-drift.test.js +47 -0
- package/dist/__tests__/coaching-mirror-drift.test.js.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts +2 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.js +107 -0
- package/dist/__tests__/codex-prep-parity.test.js.map +1 -0
- package/dist/__tests__/collection-registry-seed-drift.test.d.ts +2 -0
- package/dist/__tests__/collection-registry-seed-drift.test.d.ts.map +1 -0
- package/dist/__tests__/collection-registry-seed-drift.test.js +58 -0
- package/dist/__tests__/collection-registry-seed-drift.test.js.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts +2 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.js +82 -0
- package/dist/__tests__/config-prod-fallthrough.test.js.map +1 -0
- package/dist/__tests__/config.test.d.ts +1 -1
- package/dist/__tests__/config.test.js +410 -10
- package/dist/__tests__/config.test.js.map +1 -1
- package/dist/__tests__/constants.test.js +6 -1
- package/dist/__tests__/constants.test.js.map +1 -1
- package/dist/__tests__/constellation.test.js +14 -14
- package/dist/__tests__/constellation.test.js.map +1 -1
- package/dist/__tests__/context-strategy.test.js +8 -8
- package/dist/__tests__/context-strategy.test.js.map +1 -1
- package/dist/__tests__/conversation.test.d.ts +2 -0
- package/dist/__tests__/conversation.test.d.ts.map +1 -0
- package/dist/__tests__/conversation.test.js +113 -0
- package/dist/__tests__/conversation.test.js.map +1 -0
- package/dist/__tests__/entry-formatter.test.d.ts +2 -0
- package/dist/__tests__/entry-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/entry-formatter.test.js +82 -0
- package/dist/__tests__/entry-formatter.test.js.map +1 -0
- package/dist/__tests__/envelope-contract.test.d.ts +15 -0
- package/dist/__tests__/envelope-contract.test.d.ts.map +1 -0
- package/dist/__tests__/envelope-contract.test.js +152 -0
- package/dist/__tests__/envelope-contract.test.js.map +1 -0
- package/dist/__tests__/errors.test.js +26 -0
- package/dist/__tests__/errors.test.js.map +1 -1
- package/dist/__tests__/fields.test.js +20 -20
- package/dist/__tests__/fields.test.js.map +1 -1
- package/dist/__tests__/gateway-dry-run-timeout.test.d.ts +2 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.js +70 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.js.map +1 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.d.ts +2 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.js +121 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.js.map +1 -0
- package/dist/__tests__/handshake-augment.test.d.ts +2 -0
- package/dist/__tests__/handshake-augment.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-augment.test.js +424 -0
- package/dist/__tests__/handshake-augment.test.js.map +1 -0
- package/dist/__tests__/handshake-dormancy.test.d.ts +2 -0
- package/dist/__tests__/handshake-dormancy.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-dormancy.test.js +207 -0
- package/dist/__tests__/handshake-dormancy.test.js.map +1 -0
- package/dist/__tests__/handshake-formatter.test.d.ts +2 -0
- package/dist/__tests__/handshake-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-formatter.test.js +67 -0
- package/dist/__tests__/handshake-formatter.test.js.map +1 -0
- package/dist/__tests__/handshake-preview.test.d.ts +2 -0
- package/dist/__tests__/handshake-preview.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-preview.test.js +950 -0
- package/dist/__tests__/handshake-preview.test.js.map +1 -0
- package/dist/__tests__/handshake.e2e.test.d.ts +2 -0
- package/dist/__tests__/handshake.e2e.test.d.ts.map +1 -0
- package/dist/__tests__/handshake.e2e.test.js +1255 -0
- package/dist/__tests__/handshake.e2e.test.js.map +1 -0
- package/dist/__tests__/handshake.test.js +787 -2
- package/dist/__tests__/handshake.test.js.map +1 -1
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts +2 -0
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts.map +1 -0
- package/dist/__tests__/health-gap-kinds-drift.test.js +41 -0
- package/dist/__tests__/health-gap-kinds-drift.test.js.map +1 -0
- package/dist/__tests__/hook-intents.test.d.ts +2 -0
- package/dist/__tests__/hook-intents.test.d.ts.map +1 -0
- package/dist/__tests__/hook-intents.test.js +184 -0
- package/dist/__tests__/hook-intents.test.js.map +1 -0
- package/dist/__tests__/ingest.test.js +37 -28
- package/dist/__tests__/ingest.test.js.map +1 -1
- package/dist/__tests__/kernel-value-sets-drift.test.d.ts +2 -0
- package/dist/__tests__/kernel-value-sets-drift.test.d.ts.map +1 -0
- package/dist/__tests__/kernel-value-sets-drift.test.js +46 -0
- package/dist/__tests__/kernel-value-sets-drift.test.js.map +1 -0
- package/dist/__tests__/kernel-value-sets-generator.test.d.ts +2 -0
- package/dist/__tests__/kernel-value-sets-generator.test.d.ts.map +1 -0
- package/dist/__tests__/kernel-value-sets-generator.test.js +108 -0
- package/dist/__tests__/kernel-value-sets-generator.test.js.map +1 -0
- package/dist/__tests__/manifest.test.d.ts +6 -0
- package/dist/__tests__/manifest.test.d.ts.map +1 -0
- package/dist/__tests__/manifest.test.js +255 -0
- package/dist/__tests__/manifest.test.js.map +1 -0
- package/dist/__tests__/method-publish-coherency.test.d.ts +9 -0
- package/dist/__tests__/method-publish-coherency.test.d.ts.map +1 -0
- package/dist/__tests__/method-publish-coherency.test.js +71 -0
- package/dist/__tests__/method-publish-coherency.test.js.map +1 -0
- package/dist/__tests__/method-registry.integration.test.d.ts +6 -0
- package/dist/__tests__/method-registry.integration.test.d.ts.map +1 -0
- package/dist/__tests__/method-registry.integration.test.js +17 -0
- package/dist/__tests__/method-registry.integration.test.js.map +1 -0
- package/dist/__tests__/method-registry.test.d.ts +12 -0
- package/dist/__tests__/method-registry.test.d.ts.map +1 -0
- package/dist/__tests__/method-registry.test.js +86 -0
- package/dist/__tests__/method-registry.test.js.map +1 -0
- package/dist/__tests__/notice-marker.test.d.ts +2 -0
- package/dist/__tests__/notice-marker.test.d.ts.map +1 -0
- package/dist/__tests__/notice-marker.test.js +41 -0
- package/dist/__tests__/notice-marker.test.js.map +1 -0
- package/dist/__tests__/onboarding-path-b.test.js +4 -4
- package/dist/__tests__/onboarding-path-b.test.js.map +1 -1
- package/dist/__tests__/orient.test.js +502 -12
- package/dist/__tests__/orient.test.js.map +1 -1
- package/dist/__tests__/perimeter.test.d.ts +2 -0
- package/dist/__tests__/perimeter.test.d.ts.map +1 -0
- package/dist/__tests__/perimeter.test.js +165 -0
- package/dist/__tests__/perimeter.test.js.map +1 -0
- package/dist/__tests__/personal-layer.test.d.ts +11 -0
- package/dist/__tests__/personal-layer.test.d.ts.map +1 -0
- package/dist/__tests__/personal-layer.test.js +268 -0
- package/dist/__tests__/personal-layer.test.js.map +1 -0
- package/dist/__tests__/preview-key-refresh.test.d.ts +2 -0
- package/dist/__tests__/preview-key-refresh.test.d.ts.map +1 -0
- package/dist/__tests__/preview-key-refresh.test.js +126 -0
- package/dist/__tests__/preview-key-refresh.test.js.map +1 -0
- package/dist/__tests__/profiles.test.js +250 -10
- package/dist/__tests__/profiles.test.js.map +1 -1
- package/dist/__tests__/promote-batch.test.d.ts +2 -0
- package/dist/__tests__/promote-batch.test.d.ts.map +1 -0
- package/dist/__tests__/promote-batch.test.js +185 -0
- package/dist/__tests__/promote-batch.test.js.map +1 -0
- package/dist/__tests__/promote.test.js +292 -23
- package/dist/__tests__/promote.test.js.map +1 -1
- package/dist/__tests__/proof-run.test.d.ts +2 -0
- package/dist/__tests__/proof-run.test.d.ts.map +1 -0
- package/dist/__tests__/proof-run.test.js +255 -0
- package/dist/__tests__/proof-run.test.js.map +1 -0
- package/dist/__tests__/proposals.test.js +18 -18
- package/dist/__tests__/proposals.test.js.map +1 -1
- package/dist/__tests__/rate-limit-resilience.test.d.ts +7 -0
- package/dist/__tests__/rate-limit-resilience.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-resilience.test.js +207 -0
- package/dist/__tests__/rate-limit-resilience.test.js.map +1 -0
- package/dist/__tests__/relate.test.js +42 -14
- package/dist/__tests__/relate.test.js.map +1 -1
- package/dist/__tests__/restore.test.d.ts +2 -0
- package/dist/__tests__/restore.test.d.ts.map +1 -0
- package/dist/__tests__/restore.test.js +85 -0
- package/dist/__tests__/restore.test.js.map +1 -0
- package/dist/__tests__/route-latency-budget.test.d.ts +2 -0
- package/dist/__tests__/route-latency-budget.test.d.ts.map +1 -0
- package/dist/__tests__/route-latency-budget.test.js +103 -0
- package/dist/__tests__/route-latency-budget.test.js.map +1 -0
- package/dist/__tests__/session-close-loop.test.d.ts +2 -0
- package/dist/__tests__/session-close-loop.test.d.ts.map +1 -0
- package/dist/__tests__/session-close-loop.test.js +231 -0
- package/dist/__tests__/session-close-loop.test.js.map +1 -0
- package/dist/__tests__/session-label.test.d.ts +2 -0
- package/dist/__tests__/session-label.test.d.ts.map +1 -0
- package/dist/__tests__/session-label.test.js +46 -0
- package/dist/__tests__/session-label.test.js.map +1 -0
- package/dist/__tests__/session-list-show.test.d.ts +2 -0
- package/dist/__tests__/session-list-show.test.d.ts.map +1 -0
- package/dist/__tests__/session-list-show.test.js +174 -0
- package/dist/__tests__/session-list-show.test.js.map +1 -0
- package/dist/__tests__/session-reset.test.d.ts +2 -0
- package/dist/__tests__/session-reset.test.d.ts.map +1 -0
- package/dist/__tests__/session-reset.test.js +138 -0
- package/dist/__tests__/session-reset.test.js.map +1 -0
- package/dist/__tests__/session-resume-backstop.test.d.ts +2 -0
- package/dist/__tests__/session-resume-backstop.test.d.ts.map +1 -0
- package/dist/__tests__/session-resume-backstop.test.js +99 -0
- package/dist/__tests__/session-resume-backstop.test.js.map +1 -0
- package/dist/__tests__/session-start-key-refresh.test.d.ts +2 -0
- package/dist/__tests__/session-start-key-refresh.test.d.ts.map +1 -0
- package/dist/__tests__/session-start-key-refresh.test.js +183 -0
- package/dist/__tests__/session-start-key-refresh.test.js.map +1 -0
- package/dist/__tests__/session-state-machine.test.d.ts +2 -0
- package/dist/__tests__/session-state-machine.test.d.ts.map +1 -0
- package/dist/__tests__/session-state-machine.test.js +379 -0
- package/dist/__tests__/session-state-machine.test.js.map +1 -0
- package/dist/__tests__/session-switch.test.d.ts +2 -0
- package/dist/__tests__/session-switch.test.d.ts.map +1 -0
- package/dist/__tests__/session-switch.test.js +132 -0
- package/dist/__tests__/session-switch.test.js.map +1 -0
- package/dist/__tests__/session-touch.test.js +16 -11
- package/dist/__tests__/session-touch.test.js.map +1 -1
- package/dist/__tests__/session.test.js +2 -2
- package/dist/__tests__/session.test.js.map +1 -1
- package/dist/__tests__/setup-ingest.test.d.ts +2 -0
- package/dist/__tests__/setup-ingest.test.d.ts.map +1 -0
- package/dist/__tests__/setup-ingest.test.js +71 -0
- package/dist/__tests__/setup-ingest.test.js.map +1 -0
- package/dist/__tests__/setup-resolver.test.d.ts +14 -0
- package/dist/__tests__/setup-resolver.test.d.ts.map +1 -0
- package/dist/__tests__/setup-resolver.test.js +228 -0
- package/dist/__tests__/setup-resolver.test.js.map +1 -0
- package/dist/__tests__/skill-vocabulary.test.d.ts +21 -0
- package/dist/__tests__/skill-vocabulary.test.d.ts.map +1 -0
- package/dist/__tests__/skill-vocabulary.test.js +192 -0
- package/dist/__tests__/skill-vocabulary.test.js.map +1 -0
- package/dist/__tests__/state.test.d.ts +6 -0
- package/dist/__tests__/state.test.d.ts.map +1 -0
- package/dist/__tests__/state.test.js +97 -0
- package/dist/__tests__/state.test.js.map +1 -0
- package/dist/__tests__/surfaces.test.d.ts +2 -0
- package/dist/__tests__/surfaces.test.d.ts.map +1 -0
- package/dist/__tests__/surfaces.test.js +46 -0
- package/dist/__tests__/surfaces.test.js.map +1 -0
- package/dist/__tests__/update-check.test.d.ts +2 -0
- package/dist/__tests__/update-check.test.d.ts.map +1 -0
- package/dist/__tests__/update-check.test.js +215 -0
- package/dist/__tests__/update-check.test.js.map +1 -0
- package/dist/__tests__/update.test.js +97 -22
- package/dist/__tests__/update.test.js.map +1 -1
- package/dist/__tests__/upgrade-runner.test.d.ts +2 -0
- package/dist/__tests__/upgrade-runner.test.d.ts.map +1 -0
- package/dist/__tests__/upgrade-runner.test.js +54 -0
- package/dist/__tests__/upgrade-runner.test.js.map +1 -0
- package/dist/__tests__/upgrade.test.d.ts +2 -0
- package/dist/__tests__/upgrade.test.d.ts.map +1 -0
- package/dist/__tests__/upgrade.test.js +56 -0
- package/dist/__tests__/upgrade.test.js.map +1 -0
- package/dist/__tests__/verify-formatter.test.d.ts +2 -0
- package/dist/__tests__/verify-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/verify-formatter.test.js +85 -0
- package/dist/__tests__/verify-formatter.test.js.map +1 -0
- package/dist/__tests__/vocabulary-leak.test.d.ts +39 -0
- package/dist/__tests__/vocabulary-leak.test.d.ts.map +1 -0
- package/dist/__tests__/vocabulary-leak.test.js +539 -0
- package/dist/__tests__/vocabulary-leak.test.js.map +1 -0
- package/dist/__tests__/workspace.test.js +52 -32
- package/dist/__tests__/workspace.test.js.map +1 -1
- package/dist/__tests__/workspaceNotice.test.d.ts +2 -0
- package/dist/__tests__/workspaceNotice.test.d.ts.map +1 -0
- package/dist/__tests__/workspaceNotice.test.js +338 -0
- package/dist/__tests__/workspaceNotice.test.js.map +1 -0
- package/dist/commands/__tests__/connect-handoff.test.d.ts +11 -0
- package/dist/commands/__tests__/connect-handoff.test.d.ts.map +1 -0
- package/dist/commands/__tests__/connect-handoff.test.js +111 -0
- package/dist/commands/__tests__/connect-handoff.test.js.map +1 -0
- package/dist/commands/__tests__/quality.test.d.ts +2 -0
- package/dist/commands/__tests__/quality.test.d.ts.map +1 -0
- package/dist/commands/__tests__/quality.test.js +156 -0
- package/dist/commands/__tests__/quality.test.js.map +1 -0
- package/dist/commands/__tests__/rework.test.d.ts +2 -0
- package/dist/commands/__tests__/rework.test.d.ts.map +1 -0
- package/dist/commands/__tests__/rework.test.js +149 -0
- package/dist/commands/__tests__/rework.test.js.map +1 -0
- package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts +15 -0
- package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts.map +1 -0
- package/dist/commands/__tests__/setup-detect-surfaces.test.js +149 -0
- package/dist/commands/__tests__/setup-detect-surfaces.test.js.map +1 -0
- package/dist/commands/__tests__/setup-state.test.d.ts +2 -0
- package/dist/commands/__tests__/setup-state.test.d.ts.map +1 -0
- package/dist/commands/__tests__/setup-state.test.js +194 -0
- package/dist/commands/__tests__/setup-state.test.js.map +1 -0
- package/dist/commands/accept.d.ts.map +1 -1
- package/dist/commands/accept.js +4 -4
- package/dist/commands/accept.js.map +1 -1
- package/dist/commands/admin/cockpit.d.ts +91 -0
- package/dist/commands/admin/cockpit.d.ts.map +1 -0
- package/dist/commands/admin/cockpit.js +617 -0
- package/dist/commands/admin/cockpit.js.map +1 -0
- package/dist/commands/admin/index.d.ts +54 -1
- package/dist/commands/admin/index.d.ts.map +1 -1
- package/dist/commands/admin/index.js +337 -3
- package/dist/commands/admin/index.js.map +1 -1
- package/dist/commands/admin/index.test.d.ts +2 -0
- package/dist/commands/admin/index.test.d.ts.map +1 -0
- package/dist/commands/admin/index.test.js +68 -0
- package/dist/commands/admin/index.test.js.map +1 -0
- package/dist/commands/admin/inspect.d.ts +21 -3
- package/dist/commands/admin/inspect.d.ts.map +1 -1
- package/dist/commands/admin/inspect.js +397 -59
- package/dist/commands/admin/inspect.js.map +1 -1
- package/dist/commands/admin/inspect.test.d.ts +2 -0
- package/dist/commands/admin/inspect.test.d.ts.map +1 -1
- package/dist/commands/admin/inspect.test.js +63 -13
- package/dist/commands/admin/inspect.test.js.map +1 -1
- package/dist/commands/admin/manage.d.ts +8 -0
- package/dist/commands/admin/manage.d.ts.map +1 -0
- package/dist/commands/admin/manage.js +260 -0
- package/dist/commands/admin/manage.js.map +1 -0
- package/dist/commands/admin/manage.test.d.ts +16 -0
- package/dist/commands/admin/manage.test.d.ts.map +1 -0
- package/dist/commands/admin/manage.test.js +159 -0
- package/dist/commands/admin/manage.test.js.map +1 -0
- package/dist/commands/admin/probe.d.ts +48 -0
- package/dist/commands/admin/probe.d.ts.map +1 -0
- package/dist/commands/admin/probe.js +191 -0
- package/dist/commands/admin/probe.js.map +1 -0
- package/dist/commands/admin/probe.test.d.ts +2 -0
- package/dist/commands/admin/probe.test.d.ts.map +1 -0
- package/dist/commands/admin/probe.test.js +146 -0
- package/dist/commands/admin/probe.test.js.map +1 -0
- package/dist/commands/admin/run.d.ts +43 -0
- package/dist/commands/admin/run.d.ts.map +1 -0
- package/dist/commands/admin/run.js +68 -0
- package/dist/commands/admin/run.js.map +1 -0
- package/dist/commands/admin/run.test.d.ts +18 -0
- package/dist/commands/admin/run.test.d.ts.map +1 -0
- package/dist/commands/admin/run.test.js +146 -0
- package/dist/commands/admin/run.test.js.map +1 -0
- package/dist/commands/admin/seed.d.ts +46 -3
- package/dist/commands/admin/seed.d.ts.map +1 -1
- package/dist/commands/admin/seed.js +684 -103
- package/dist/commands/admin/seed.js.map +1 -1
- package/dist/commands/admin/seed.test.d.ts +5 -0
- package/dist/commands/admin/seed.test.d.ts.map +1 -1
- package/dist/commands/admin/seed.test.js +67 -5
- package/dist/commands/admin/seed.test.js.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.d.ts +14 -0
- package/dist/commands/admin/seedRegistryEntries.generated.d.ts.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.generated.js +153 -0
- package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.test.d.ts +13 -0
- package/dist/commands/admin/seedRegistryEntries.test.d.ts.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.test.js +91 -0
- package/dist/commands/admin/seedRegistryEntries.test.js.map +1 -0
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +42 -7
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/authority-domains.d.ts +157 -0
- package/dist/commands/authority-domains.d.ts.map +1 -0
- package/dist/commands/authority-domains.js +387 -0
- package/dist/commands/authority-domains.js.map +1 -0
- package/dist/commands/brief.d.ts.map +1 -1
- package/dist/commands/brief.js +9 -5
- package/dist/commands/brief.js.map +1 -1
- package/dist/commands/capture.d.ts +12 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +266 -69
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chain-walk.d.ts.map +1 -1
- package/dist/commands/chain-walk.js +2 -2
- package/dist/commands/chain-walk.js.map +1 -1
- package/dist/commands/changes.d.ts.map +1 -1
- package/dist/commands/changes.js +2 -2
- package/dist/commands/changes.js.map +1 -1
- package/dist/commands/codex-prep.d.ts +12 -1
- package/dist/commands/codex-prep.d.ts.map +1 -1
- package/dist/commands/codex-prep.js +19 -85
- package/dist/commands/codex-prep.js.map +1 -1
- package/dist/commands/collections.d.ts.map +1 -1
- package/dist/commands/collections.js +5 -5
- package/dist/commands/collections.js.map +1 -1
- package/dist/commands/conflicts.d.ts +40 -0
- package/dist/commands/conflicts.d.ts.map +1 -0
- package/dist/commands/conflicts.js +267 -0
- package/dist/commands/conflicts.js.map +1 -0
- package/dist/commands/conflicts.test.d.ts +2 -0
- package/dist/commands/conflicts.test.d.ts.map +1 -0
- package/dist/commands/conflicts.test.js +219 -0
- package/dist/commands/conflicts.test.js.map +1 -0
- package/dist/commands/connect-config.test.d.ts +2 -0
- package/dist/commands/connect-config.test.d.ts.map +1 -0
- package/dist/commands/connect-config.test.js +44 -0
- package/dist/commands/connect-config.test.js.map +1 -0
- package/dist/commands/connect-context.d.ts +45 -0
- package/dist/commands/connect-context.d.ts.map +1 -0
- package/dist/commands/connect-context.js +83 -0
- package/dist/commands/connect-context.js.map +1 -0
- package/dist/commands/connect-context.test.d.ts +2 -0
- package/dist/commands/connect-context.test.d.ts.map +1 -0
- package/dist/commands/connect-context.test.js +158 -0
- package/dist/commands/connect-context.test.js.map +1 -0
- package/dist/commands/connect-handoff.d.ts +51 -0
- package/dist/commands/connect-handoff.d.ts.map +1 -0
- package/dist/commands/connect-handoff.js +70 -0
- package/dist/commands/connect-handoff.js.map +1 -0
- package/dist/commands/connect-integration.test.js +58 -35
- package/dist/commands/connect-integration.test.js.map +1 -1
- package/dist/commands/connect-legacy-migration.test.d.ts +2 -0
- package/dist/commands/connect-legacy-migration.test.d.ts.map +1 -0
- package/dist/commands/connect-legacy-migration.test.js +109 -0
- package/dist/commands/connect-legacy-migration.test.js.map +1 -0
- package/dist/commands/connect-screens.d.ts +33 -0
- package/dist/commands/connect-screens.d.ts.map +1 -0
- package/dist/commands/connect-screens.js +124 -0
- package/dist/commands/connect-screens.js.map +1 -0
- package/dist/commands/connect.d.ts +27 -6
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +256 -119
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connect.test.js +348 -7
- package/dist/commands/connect.test.js.map +1 -1
- package/dist/commands/constellation.d.ts.map +1 -1
- package/dist/commands/constellation.js +2 -2
- package/dist/commands/constellation.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +2 -2
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/cross-cut.d.ts.map +1 -1
- package/dist/commands/cross-cut.js +2 -2
- package/dist/commands/cross-cut.js.map +1 -1
- package/dist/commands/direction.d.ts +10 -0
- package/dist/commands/direction.d.ts.map +1 -0
- package/dist/commands/direction.js +79 -0
- package/dist/commands/direction.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +92 -17
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +162 -2
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/feedback.d.ts +36 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +193 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/feedback.test.d.ts +2 -0
- package/dist/commands/feedback.test.d.ts.map +1 -0
- package/dist/commands/feedback.test.js +125 -0
- package/dist/commands/feedback.test.js.map +1 -0
- package/dist/commands/fields.d.ts.map +1 -1
- package/dist/commands/fields.js +2 -2
- package/dist/commands/fields.js.map +1 -1
- package/dist/commands/files.d.ts +26 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +160 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/files.test.d.ts +2 -0
- package/dist/commands/files.test.d.ts.map +1 -0
- package/dist/commands/files.test.js +243 -0
- package/dist/commands/files.test.js.map +1 -0
- package/dist/commands/get.js +3 -3
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/handshake.d.ts +223 -2
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +2106 -62
- package/dist/commands/handshake.js.map +1 -1
- package/dist/commands/ingest.d.ts.map +1 -1
- package/dist/commands/ingest.js +15 -6
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -9
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +44 -19
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/method.d.ts +99 -0
- package/dist/commands/method.d.ts.map +1 -0
- package/dist/commands/method.js +804 -0
- package/dist/commands/method.js.map +1 -0
- package/dist/commands/migrate-setup.d.ts +18 -0
- package/dist/commands/migrate-setup.d.ts.map +1 -0
- package/dist/commands/migrate-setup.js +148 -0
- package/dist/commands/migrate-setup.js.map +1 -0
- package/dist/commands/organisation.d.ts +41 -0
- package/dist/commands/organisation.d.ts.map +1 -0
- package/dist/commands/organisation.js +353 -0
- package/dist/commands/organisation.js.map +1 -0
- package/dist/commands/organisation.test.d.ts +2 -0
- package/dist/commands/organisation.test.d.ts.map +1 -0
- package/dist/commands/organisation.test.js +233 -0
- package/dist/commands/organisation.test.js.map +1 -0
- package/dist/commands/organisationHierarchy.d.ts +8 -0
- package/dist/commands/organisationHierarchy.d.ts.map +1 -0
- package/dist/commands/organisationHierarchy.js +67 -0
- package/dist/commands/organisationHierarchy.js.map +1 -0
- package/dist/commands/organisationHierarchy.test.d.ts +2 -0
- package/dist/commands/organisationHierarchy.test.d.ts.map +1 -0
- package/dist/commands/organisationHierarchy.test.js +55 -0
- package/dist/commands/organisationHierarchy.test.js.map +1 -0
- package/dist/commands/organisationWrite.d.ts +18 -0
- package/dist/commands/organisationWrite.d.ts.map +1 -0
- package/dist/commands/organisationWrite.js +50 -0
- package/dist/commands/organisationWrite.js.map +1 -0
- package/dist/commands/orient.d.ts +131 -2
- package/dist/commands/orient.d.ts.map +1 -1
- package/dist/commands/orient.js +223 -7
- package/dist/commands/orient.js.map +1 -1
- package/dist/commands/profile.d.ts +11 -1
- package/dist/commands/profile.d.ts.map +1 -1
- package/dist/commands/profile.js +114 -26
- package/dist/commands/profile.js.map +1 -1
- package/dist/commands/promote.d.ts +12 -1
- package/dist/commands/promote.d.ts.map +1 -1
- package/dist/commands/promote.js +239 -57
- package/dist/commands/promote.js.map +1 -1
- package/dist/commands/proof-run.d.ts +51 -0
- package/dist/commands/proof-run.d.ts.map +1 -0
- package/dist/commands/proof-run.js +209 -0
- package/dist/commands/proof-run.js.map +1 -0
- package/dist/commands/proposals.d.ts.map +1 -1
- package/dist/commands/proposals.js +2 -2
- package/dist/commands/proposals.js.map +1 -1
- package/dist/commands/quality.d.ts +16 -0
- package/dist/commands/quality.d.ts.map +1 -0
- package/dist/commands/quality.js +29 -0
- package/dist/commands/quality.js.map +1 -0
- package/dist/commands/reject.d.ts.map +1 -1
- package/dist/commands/reject.js +4 -3
- package/dist/commands/reject.js.map +1 -1
- package/dist/commands/relate.d.ts.map +1 -1
- package/dist/commands/relate.js +29 -6
- package/dist/commands/relate.js.map +1 -1
- package/dist/commands/restore.d.ts +2 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +83 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/rework.d.ts +24 -0
- package/dist/commands/rework.d.ts.map +1 -0
- package/dist/commands/rework.js +97 -0
- package/dist/commands/rework.js.map +1 -0
- package/dist/commands/scoreboard.d.ts +28 -0
- package/dist/commands/scoreboard.d.ts.map +1 -0
- package/dist/commands/scoreboard.js +40 -0
- package/dist/commands/scoreboard.js.map +1 -0
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +2 -2
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts +59 -7
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +482 -46
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/setup-audit.d.ts +59 -0
- package/dist/commands/setup-audit.d.ts.map +1 -0
- package/dist/commands/setup-audit.js +250 -0
- package/dist/commands/setup-audit.js.map +1 -0
- package/dist/commands/setup-detect-surfaces.d.ts +38 -0
- package/dist/commands/setup-detect-surfaces.d.ts.map +1 -0
- package/dist/commands/setup-detect-surfaces.js +76 -0
- package/dist/commands/setup-detect-surfaces.js.map +1 -0
- package/dist/commands/setup-ingest.d.ts +17 -0
- package/dist/commands/setup-ingest.d.ts.map +1 -0
- package/dist/commands/setup-ingest.js +174 -0
- package/dist/commands/setup-ingest.js.map +1 -0
- package/dist/commands/setup-resolver.d.ts +58 -0
- package/dist/commands/setup-resolver.d.ts.map +1 -0
- package/dist/commands/setup-resolver.js +150 -0
- package/dist/commands/setup-resolver.js.map +1 -0
- package/dist/commands/setup-state.d.ts +42 -0
- package/dist/commands/setup-state.d.ts.map +1 -0
- package/dist/commands/setup-state.js +93 -0
- package/dist/commands/setup-state.js.map +1 -0
- package/dist/commands/setup.d.ts +17 -9
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +53 -152
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/shape.d.ts +16 -0
- package/dist/commands/shape.d.ts.map +1 -0
- package/dist/commands/shape.js +149 -0
- package/dist/commands/shape.js.map +1 -0
- package/dist/commands/shape.test.d.ts +2 -0
- package/dist/commands/shape.test.d.ts.map +1 -0
- package/dist/commands/shape.test.js +148 -0
- package/dist/commands/shape.test.js.map +1 -0
- package/dist/commands/update.d.ts +8 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +55 -32
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upgrade.d.ts +5 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +110 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/usage.d.ts +40 -0
- package/dist/commands/usage.d.ts.map +1 -0
- package/dist/commands/usage.js +214 -0
- package/dist/commands/usage.js.map +1 -0
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +9 -3
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/welcome.d.ts +21 -0
- package/dist/commands/welcome.d.ts.map +1 -0
- package/dist/commands/welcome.js +50 -0
- package/dist/commands/welcome.js.map +1 -0
- package/dist/commands/whoami.d.ts +12 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +70 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/commands/whoami.test.d.ts +2 -0
- package/dist/commands/whoami.test.d.ts.map +1 -0
- package/dist/commands/whoami.test.js +50 -0
- package/dist/commands/whoami.test.js.map +1 -0
- package/dist/commands/workspace.d.ts +76 -2
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +30 -6
- package/dist/commands/workspace.js.map +1 -1
- package/dist/formatters/__tests__/orient-possibleConflict.test.d.ts +2 -0
- package/dist/formatters/__tests__/orient-possibleConflict.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/orient-possibleConflict.test.js +68 -0
- package/dist/formatters/__tests__/orient-possibleConflict.test.js.map +1 -0
- package/dist/formatters/__tests__/orient-provenance.test.d.ts +7 -0
- package/dist/formatters/__tests__/orient-provenance.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/orient-provenance.test.js +548 -0
- package/dist/formatters/__tests__/orient-provenance.test.js.map +1 -0
- package/dist/formatters/__tests__/session-list-show.test.d.ts +2 -0
- package/dist/formatters/__tests__/session-list-show.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/session-list-show.test.js +159 -0
- package/dist/formatters/__tests__/session-list-show.test.js.map +1 -0
- package/dist/formatters/__tests__/session.test.d.ts +2 -0
- package/dist/formatters/__tests__/session.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/session.test.js +136 -0
- package/dist/formatters/__tests__/session.test.js.map +1 -0
- package/dist/formatters/audit.d.ts +6 -0
- package/dist/formatters/audit.d.ts.map +1 -1
- package/dist/formatters/audit.js.map +1 -1
- package/dist/formatters/capture.d.ts +8 -0
- package/dist/formatters/capture.d.ts.map +1 -1
- package/dist/formatters/capture.js +9 -0
- package/dist/formatters/capture.js.map +1 -1
- package/dist/formatters/coaching.d.ts +51 -0
- package/dist/formatters/coaching.d.ts.map +1 -0
- package/dist/formatters/coaching.js +46 -0
- package/dist/formatters/coaching.js.map +1 -0
- package/dist/formatters/conflicts.d.ts +69 -0
- package/dist/formatters/conflicts.d.ts.map +1 -0
- package/dist/formatters/conflicts.js +87 -0
- package/dist/formatters/conflicts.js.map +1 -0
- package/dist/formatters/conflicts.test.d.ts +2 -0
- package/dist/formatters/conflicts.test.d.ts.map +1 -0
- package/dist/formatters/conflicts.test.js +136 -0
- package/dist/formatters/conflicts.test.js.map +1 -0
- package/dist/formatters/context.d.ts +1 -1
- package/dist/formatters/context.d.ts.map +1 -1
- package/dist/formatters/context.js.map +1 -1
- package/dist/formatters/direction.d.ts +48 -0
- package/dist/formatters/direction.d.ts.map +1 -0
- package/dist/formatters/direction.js +75 -0
- package/dist/formatters/direction.js.map +1 -0
- package/dist/formatters/direction.test.d.ts +2 -0
- package/dist/formatters/direction.test.d.ts.map +1 -0
- package/dist/formatters/direction.test.js +70 -0
- package/dist/formatters/direction.test.js.map +1 -0
- package/dist/formatters/entry.d.ts +44 -0
- package/dist/formatters/entry.d.ts.map +1 -1
- package/dist/formatters/entry.js +70 -7
- package/dist/formatters/entry.js.map +1 -1
- package/dist/formatters/feedback.d.ts +56 -0
- package/dist/formatters/feedback.d.ts.map +1 -0
- package/dist/formatters/feedback.js +89 -0
- package/dist/formatters/feedback.js.map +1 -0
- package/dist/formatters/feedback.test.d.ts +2 -0
- package/dist/formatters/feedback.test.d.ts.map +1 -0
- package/dist/formatters/feedback.test.js +112 -0
- package/dist/formatters/feedback.test.js.map +1 -0
- package/dist/formatters/handshake.d.ts +39 -0
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +133 -3
- package/dist/formatters/handshake.js.map +1 -1
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts +2 -0
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts.map +1 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js +22 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js.map +1 -0
- package/dist/formatters/orient.d.ts +248 -8
- package/dist/formatters/orient.d.ts.map +1 -1
- package/dist/formatters/orient.js +277 -35
- package/dist/formatters/orient.js.map +1 -1
- package/dist/formatters/orient.rcrtMiss.test.d.ts +2 -0
- package/dist/formatters/orient.rcrtMiss.test.d.ts.map +1 -0
- package/dist/formatters/orient.rcrtMiss.test.js +146 -0
- package/dist/formatters/orient.rcrtMiss.test.js.map +1 -0
- package/dist/formatters/orient.rituals.test.d.ts +2 -0
- package/dist/formatters/orient.rituals.test.d.ts.map +1 -0
- package/dist/formatters/orient.rituals.test.js +70 -0
- package/dist/formatters/orient.rituals.test.js.map +1 -0
- package/dist/formatters/orient.shapeAdvisorySummary.test.d.ts +2 -0
- package/dist/formatters/orient.shapeAdvisorySummary.test.d.ts.map +1 -0
- package/dist/formatters/orient.shapeAdvisorySummary.test.js +62 -0
- package/dist/formatters/orient.shapeAdvisorySummary.test.js.map +1 -0
- package/dist/formatters/orientDegradation.d.ts +21 -0
- package/dist/formatters/orientDegradation.d.ts.map +1 -0
- package/dist/formatters/orientDegradation.js +33 -0
- package/dist/formatters/orientDegradation.js.map +1 -0
- package/dist/formatters/orientDirection.d.ts +73 -0
- package/dist/formatters/orientDirection.d.ts.map +1 -0
- package/dist/formatters/orientDirection.js +90 -0
- package/dist/formatters/orientDirection.js.map +1 -0
- package/dist/formatters/orientDirection.test.d.ts +2 -0
- package/dist/formatters/orientDirection.test.d.ts.map +1 -0
- package/dist/formatters/orientDirection.test.js +193 -0
- package/dist/formatters/orientDirection.test.js.map +1 -0
- package/dist/formatters/orientRetrievalMiss.d.ts +30 -0
- package/dist/formatters/orientRetrievalMiss.d.ts.map +1 -0
- package/dist/formatters/orientRetrievalMiss.js +24 -0
- package/dist/formatters/orientRetrievalMiss.js.map +1 -0
- package/dist/formatters/promote.d.ts +49 -0
- package/dist/formatters/promote.d.ts.map +1 -1
- package/dist/formatters/promote.js +40 -0
- package/dist/formatters/promote.js.map +1 -1
- package/dist/formatters/relate.d.ts +9 -0
- package/dist/formatters/relate.d.ts.map +1 -1
- package/dist/formatters/relate.js +5 -3
- package/dist/formatters/relate.js.map +1 -1
- package/dist/formatters/relate.test.d.ts +2 -0
- package/dist/formatters/relate.test.d.ts.map +1 -0
- package/dist/formatters/relate.test.js +62 -0
- package/dist/formatters/relate.test.js.map +1 -0
- package/dist/formatters/scoreboard.d.ts +11 -0
- package/dist/formatters/scoreboard.d.ts.map +1 -0
- package/dist/formatters/scoreboard.js +164 -0
- package/dist/formatters/scoreboard.js.map +1 -0
- package/dist/formatters/scoreboard.test.d.ts +2 -0
- package/dist/formatters/scoreboard.test.d.ts.map +1 -0
- package/dist/formatters/scoreboard.test.js +303 -0
- package/dist/formatters/scoreboard.test.js.map +1 -0
- package/dist/formatters/session-feedback.test.d.ts +2 -0
- package/dist/formatters/session-feedback.test.d.ts.map +1 -0
- package/dist/formatters/session-feedback.test.js +61 -0
- package/dist/formatters/session-feedback.test.js.map +1 -0
- package/dist/formatters/session.d.ts +115 -5
- package/dist/formatters/session.d.ts.map +1 -1
- package/dist/formatters/session.js +293 -12
- package/dist/formatters/session.js.map +1 -1
- package/dist/formatters/shape.d.ts +54 -0
- package/dist/formatters/shape.d.ts.map +1 -0
- package/dist/formatters/shape.js +97 -0
- package/dist/formatters/shape.js.map +1 -0
- package/dist/formatters/shape.test.d.ts +2 -0
- package/dist/formatters/shape.test.d.ts.map +1 -0
- package/dist/formatters/shape.test.js +80 -0
- package/dist/formatters/shape.test.js.map +1 -0
- package/dist/formatters/spineCheck.d.ts +64 -0
- package/dist/formatters/spineCheck.d.ts.map +1 -0
- package/dist/formatters/spineCheck.js +92 -0
- package/dist/formatters/spineCheck.js.map +1 -0
- package/dist/formatters/update.d.ts +3 -0
- package/dist/formatters/update.d.ts.map +1 -1
- package/dist/formatters/update.js +4 -0
- package/dist/formatters/update.js.map +1 -1
- package/dist/formatters/verify.d.ts +12 -4
- package/dist/formatters/verify.d.ts.map +1 -1
- package/dist/formatters/verify.js +20 -2
- package/dist/formatters/verify.js.map +1 -1
- package/dist/generated/healthGapKinds.generated.d.ts +12 -0
- package/dist/generated/healthGapKinds.generated.d.ts.map +1 -0
- package/dist/generated/healthGapKinds.generated.js +24 -0
- package/dist/generated/healthGapKinds.generated.js.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts +55 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.js +348 -0
- package/dist/generated/routeLatencyBudget.generated.js.map +1 -0
- package/dist/generated/sourceSurfaces.generated.d.ts +12 -0
- package/dist/generated/sourceSurfaces.generated.d.ts.map +1 -0
- package/dist/generated/sourceSurfaces.generated.js +11 -0
- package/dist/generated/sourceSurfaces.generated.js.map +1 -0
- package/dist/generators/adapters.d.ts +33 -0
- package/dist/generators/adapters.d.ts.map +1 -1
- package/dist/generators/adapters.js +64 -4
- package/dist/generators/adapters.js.map +1 -1
- package/dist/generators/archetypes.d.ts.map +1 -1
- package/dist/generators/archetypes.js +46 -9
- package/dist/generators/archetypes.js.map +1 -1
- package/dist/generators/archetypes.test.js +35 -0
- package/dist/generators/archetypes.test.js.map +1 -1
- package/dist/generators/boundary-manifest.d.ts +29 -0
- package/dist/generators/boundary-manifest.d.ts.map +1 -0
- package/dist/generators/boundary-manifest.js +183 -0
- package/dist/generators/boundary-manifest.js.map +1 -0
- package/dist/generators/boundary-manifest.real-file.test.d.ts +2 -0
- package/dist/generators/boundary-manifest.real-file.test.d.ts.map +1 -0
- package/dist/generators/boundary-manifest.real-file.test.js +70 -0
- package/dist/generators/boundary-manifest.real-file.test.js.map +1 -0
- package/dist/generators/boundary-manifest.test.d.ts +2 -0
- package/dist/generators/boundary-manifest.test.d.ts.map +1 -0
- package/dist/generators/boundary-manifest.test.js +91 -0
- package/dist/generators/boundary-manifest.test.js.map +1 -0
- package/dist/generators/chain-classifier-kernel-client-drift.test.d.ts +2 -0
- package/dist/generators/chain-classifier-kernel-client-drift.test.d.ts.map +1 -0
- package/dist/generators/chain-classifier-kernel-client-drift.test.js +41 -0
- package/dist/generators/chain-classifier-kernel-client-drift.test.js.map +1 -0
- package/dist/generators/chain-classifier.d.ts +67 -14
- package/dist/generators/chain-classifier.d.ts.map +1 -1
- package/dist/generators/chain-classifier.js +46 -174
- package/dist/generators/chain-classifier.js.map +1 -1
- package/dist/generators/chain-rules.d.ts +3 -3
- package/dist/generators/chain-rules.d.ts.map +1 -1
- package/dist/generators/chain-rules.js +118 -6
- package/dist/generators/chain-rules.js.map +1 -1
- package/dist/generators/chain-rules.test.js +273 -4
- package/dist/generators/chain-rules.test.js.map +1 -1
- package/dist/generators/context-md.js +6 -6
- package/dist/generators/context-md.js.map +1 -1
- package/dist/generators/manifest.d.ts +115 -0
- package/dist/generators/manifest.d.ts.map +1 -0
- package/dist/generators/manifest.js +277 -0
- package/dist/generators/manifest.js.map +1 -0
- package/dist/generators/portable-knowledge.d.ts +24 -2
- package/dist/generators/portable-knowledge.d.ts.map +1 -1
- package/dist/generators/portable-knowledge.js +97 -2
- package/dist/generators/portable-knowledge.js.map +1 -1
- package/dist/generators/portable-knowledge.test.js +43 -0
- package/dist/generators/portable-knowledge.test.js.map +1 -1
- package/dist/generators/region-projections.d.ts +18 -0
- package/dist/generators/region-projections.d.ts.map +1 -0
- package/dist/generators/region-projections.js +49 -0
- package/dist/generators/region-projections.js.map +1 -0
- package/dist/generators/region-projections.test.d.ts +2 -0
- package/dist/generators/region-projections.test.d.ts.map +1 -0
- package/dist/generators/region-projections.test.js +63 -0
- package/dist/generators/region-projections.test.js.map +1 -0
- package/dist/generators/region.d.ts +24 -0
- package/dist/generators/region.d.ts.map +1 -0
- package/dist/generators/region.js +87 -0
- package/dist/generators/region.js.map +1 -0
- package/dist/generators/region.test.d.ts +2 -0
- package/dist/generators/region.test.d.ts.map +1 -0
- package/dist/generators/region.test.js +126 -0
- package/dist/generators/region.test.js.map +1 -0
- package/dist/generators/surface-profiles.d.ts +1 -2
- package/dist/generators/surface-profiles.d.ts.map +1 -1
- package/dist/generators/surface-profiles.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +499 -104
- package/dist/index.js.map +1 -1
- package/dist/lib/__tests__/parseFields.test.d.ts +2 -0
- package/dist/lib/__tests__/parseFields.test.d.ts.map +1 -0
- package/dist/lib/__tests__/parseFields.test.js +40 -0
- package/dist/lib/__tests__/parseFields.test.js.map +1 -0
- package/dist/lib/activation.d.ts.map +1 -1
- package/dist/lib/activation.js +8 -4
- package/dist/lib/activation.js.map +1 -1
- package/dist/lib/activation.test.js +6 -6
- package/dist/lib/activation.test.js.map +1 -1
- package/dist/lib/canonicalRefs.d.ts +141 -0
- package/dist/lib/canonicalRefs.d.ts.map +1 -0
- package/dist/lib/canonicalRefs.js +150 -0
- package/dist/lib/canonicalRefs.js.map +1 -0
- package/dist/lib/client.d.ts +39 -15
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +195 -49
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/collectionRegistry.d.ts +52 -0
- package/dist/lib/collectionRegistry.d.ts.map +1 -0
- package/dist/lib/collectionRegistry.js +118 -0
- package/dist/lib/collectionRegistry.js.map +1 -0
- package/dist/lib/commanderOptions.d.ts +8 -0
- package/dist/lib/commanderOptions.d.ts.map +1 -0
- package/dist/lib/commanderOptions.js +10 -0
- package/dist/lib/commanderOptions.js.map +1 -0
- package/dist/lib/compose-wrapup-view.d.ts +48 -0
- package/dist/lib/compose-wrapup-view.d.ts.map +1 -0
- package/dist/lib/compose-wrapup-view.js +37 -0
- package/dist/lib/compose-wrapup-view.js.map +1 -0
- package/dist/lib/config.d.ts +149 -9
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +385 -53
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/connectKeyLabel.d.ts +9 -0
- package/dist/lib/connectKeyLabel.d.ts.map +1 -0
- package/dist/lib/connectKeyLabel.js +12 -0
- package/dist/lib/connectKeyLabel.js.map +1 -0
- package/dist/lib/constants.d.ts +5 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +9 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/conversation.d.ts +36 -0
- package/dist/lib/conversation.d.ts.map +1 -0
- package/dist/lib/conversation.js +66 -0
- package/dist/lib/conversation.js.map +1 -0
- package/dist/lib/createEntryResult.d.ts +34 -0
- package/dist/lib/createEntryResult.d.ts.map +1 -0
- package/dist/lib/createEntryResult.js +12 -0
- package/dist/lib/createEntryResult.js.map +1 -0
- package/dist/lib/deployment.d.ts +23 -0
- package/dist/lib/deployment.d.ts.map +1 -0
- package/dist/lib/deployment.js +78 -0
- package/dist/lib/deployment.js.map +1 -0
- package/dist/lib/deployment.test.d.ts +5 -0
- package/dist/lib/deployment.test.d.ts.map +1 -0
- package/dist/lib/deployment.test.js +54 -0
- package/dist/lib/deployment.test.js.map +1 -0
- package/dist/lib/errors.d.ts +67 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +67 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +55 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +92 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/frontmatter.test.d.ts +15 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +98 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/gatewayTimeout.d.ts +88 -0
- package/dist/lib/gatewayTimeout.d.ts.map +1 -0
- package/dist/lib/gatewayTimeout.js +118 -0
- package/dist/lib/gatewayTimeout.js.map +1 -0
- package/dist/lib/hook-intents.d.ts +51 -0
- package/dist/lib/hook-intents.d.ts.map +1 -0
- package/dist/lib/hook-intents.js +85 -0
- package/dist/lib/hook-intents.js.map +1 -0
- package/dist/lib/inferSourceDate.d.ts +12 -0
- package/dist/lib/inferSourceDate.d.ts.map +1 -0
- package/dist/lib/inferSourceDate.js +44 -0
- package/dist/lib/inferSourceDate.js.map +1 -0
- package/dist/lib/kernelEnvelope.d.ts +31 -0
- package/dist/lib/kernelEnvelope.d.ts.map +1 -0
- package/dist/lib/kernelEnvelope.js +52 -0
- package/dist/lib/kernelEnvelope.js.map +1 -0
- package/dist/lib/method-registry.d.ts +37 -0
- package/dist/lib/method-registry.d.ts.map +1 -0
- package/dist/lib/method-registry.js +41 -0
- package/dist/lib/method-registry.js.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.d.ts +28 -0
- package/dist/lib/normalizeMaterializedFilename.d.ts.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.js +56 -0
- package/dist/lib/normalizeMaterializedFilename.js.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.test.d.ts +16 -0
- package/dist/lib/normalizeMaterializedFilename.test.d.ts.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.test.js +90 -0
- package/dist/lib/normalizeMaterializedFilename.test.js.map +1 -0
- package/dist/lib/notice-marker.d.ts +3 -0
- package/dist/lib/notice-marker.d.ts.map +1 -0
- package/dist/lib/notice-marker.js +53 -0
- package/dist/lib/notice-marker.js.map +1 -0
- package/dist/lib/onboarding-path-b.d.ts.map +1 -1
- package/dist/lib/onboarding-path-b.js +42 -13
- package/dist/lib/onboarding-path-b.js.map +1 -1
- package/dist/lib/onboarding-shared.d.ts +4 -4
- package/dist/lib/onboarding-shared.d.ts.map +1 -1
- package/dist/lib/onboarding-shared.js +7 -22
- package/dist/lib/onboarding-shared.js.map +1 -1
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +12 -4
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/parseFields.d.ts +19 -0
- package/dist/lib/parseFields.d.ts.map +1 -0
- package/dist/lib/parseFields.js +49 -0
- package/dist/lib/parseFields.js.map +1 -0
- package/dist/lib/previewBanner.d.ts +9 -0
- package/dist/lib/previewBanner.d.ts.map +1 -0
- package/dist/lib/previewBanner.js +37 -0
- package/dist/lib/previewBanner.js.map +1 -0
- package/dist/lib/productbrain-files.d.ts +94 -0
- package/dist/lib/productbrain-files.d.ts.map +1 -0
- package/dist/lib/productbrain-files.js +214 -0
- package/dist/lib/productbrain-files.js.map +1 -0
- package/dist/lib/productbrain-files.test.d.ts +2 -0
- package/dist/lib/productbrain-files.test.d.ts.map +1 -0
- package/dist/lib/productbrain-files.test.js +258 -0
- package/dist/lib/productbrain-files.test.js.map +1 -0
- package/dist/lib/profiles.d.ts +40 -4
- package/dist/lib/profiles.d.ts.map +1 -1
- package/dist/lib/profiles.js +77 -18
- package/dist/lib/profiles.js.map +1 -1
- package/dist/lib/prompts.d.ts +27 -0
- package/dist/lib/prompts.d.ts.map +1 -1
- package/dist/lib/prompts.js +42 -0
- package/dist/lib/prompts.js.map +1 -1
- package/dist/lib/rate-limit.d.ts +37 -0
- package/dist/lib/rate-limit.d.ts.map +1 -0
- package/dist/lib/rate-limit.js +83 -0
- package/dist/lib/rate-limit.js.map +1 -0
- package/dist/lib/runner.d.ts +8 -0
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +23 -0
- package/dist/lib/runner.js.map +1 -1
- package/dist/lib/session.d.ts +85 -4
- package/dist/lib/session.d.ts.map +1 -1
- package/dist/lib/session.js +276 -13
- package/dist/lib/session.js.map +1 -1
- package/dist/lib/sessionNotices.d.ts +26 -0
- package/dist/lib/sessionNotices.d.ts.map +1 -0
- package/dist/lib/sessionNotices.js +31 -0
- package/dist/lib/sessionNotices.js.map +1 -0
- package/dist/lib/sessionNotices.test.d.ts +2 -0
- package/dist/lib/sessionNotices.test.d.ts.map +1 -0
- package/dist/lib/sessionNotices.test.js +48 -0
- package/dist/lib/sessionNotices.test.js.map +1 -0
- package/dist/lib/spinner.js +2 -2
- package/dist/lib/spinner.js.map +1 -1
- package/dist/lib/startup-resolution-signals.d.ts +34 -0
- package/dist/lib/startup-resolution-signals.d.ts.map +1 -0
- package/dist/lib/startup-resolution-signals.js +116 -0
- package/dist/lib/startup-resolution-signals.js.map +1 -0
- package/dist/lib/startup-resolution-signals.test.d.ts +2 -0
- package/dist/lib/startup-resolution-signals.test.d.ts.map +1 -0
- package/dist/lib/startup-resolution-signals.test.js +113 -0
- package/dist/lib/startup-resolution-signals.test.js.map +1 -0
- package/dist/lib/startup-signals.d.ts +12 -0
- package/dist/lib/startup-signals.d.ts.map +1 -0
- package/dist/lib/startup-signals.js +172 -0
- package/dist/lib/startup-signals.js.map +1 -0
- package/dist/lib/startup-signals.test.d.ts +2 -0
- package/dist/lib/startup-signals.test.d.ts.map +1 -0
- package/dist/lib/startup-signals.test.js +165 -0
- package/dist/lib/startup-signals.test.js.map +1 -0
- package/dist/lib/state.d.ts +51 -0
- package/dist/lib/state.d.ts.map +1 -0
- package/dist/lib/state.js +90 -0
- package/dist/lib/state.js.map +1 -0
- package/dist/lib/strip.d.ts.map +1 -1
- package/dist/lib/strip.js +7 -1
- package/dist/lib/strip.js.map +1 -1
- package/dist/lib/style.d.ts +14 -5
- package/dist/lib/style.d.ts.map +1 -1
- package/dist/lib/style.js +34 -25
- package/dist/lib/style.js.map +1 -1
- package/dist/lib/style.test.js +15 -3
- package/dist/lib/style.test.js.map +1 -1
- package/dist/lib/tokenConstants.d.ts +19 -0
- package/dist/lib/tokenConstants.d.ts.map +1 -0
- package/dist/lib/tokenConstants.js +19 -0
- package/dist/lib/tokenConstants.js.map +1 -0
- package/dist/lib/update-check.d.ts +56 -0
- package/dist/lib/update-check.d.ts.map +1 -0
- package/dist/lib/update-check.js +296 -0
- package/dist/lib/update-check.js.map +1 -0
- package/dist/lib/upgrade-runner.d.ts +22 -0
- package/dist/lib/upgrade-runner.d.ts.map +1 -0
- package/dist/lib/upgrade-runner.js +110 -0
- package/dist/lib/upgrade-runner.js.map +1 -0
- package/dist/lib/workspace-probe.d.ts +3 -0
- package/dist/lib/workspace-probe.d.ts.map +1 -1
- package/dist/lib/workspace-probe.js +8 -14
- package/dist/lib/workspace-probe.js.map +1 -1
- package/dist/lib/workspaceNotice.d.ts +59 -0
- package/dist/lib/workspaceNotice.d.ts.map +1 -0
- package/dist/lib/workspaceNotice.js +77 -0
- package/dist/lib/workspaceNotice.js.map +1 -0
- package/dist/lib/workspaceVocabCache.d.ts +60 -0
- package/dist/lib/workspaceVocabCache.d.ts.map +1 -0
- package/dist/lib/workspaceVocabCache.js +98 -0
- package/dist/lib/workspaceVocabCache.js.map +1 -0
- package/dist/scoreboard/diagnose.d.ts +226 -0
- package/dist/scoreboard/diagnose.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.js +344 -0
- package/dist/scoreboard/diagnose.js.map +1 -0
- package/dist/scoreboard/diagnose.test.d.ts +15 -0
- package/dist/scoreboard/diagnose.test.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.test.js +355 -0
- package/dist/scoreboard/diagnose.test.js.map +1 -0
- package/dist/scoreboard/floors.d.ts +47 -0
- package/dist/scoreboard/floors.d.ts.map +1 -0
- package/dist/scoreboard/floors.js +33 -0
- package/dist/scoreboard/floors.js.map +1 -0
- package/dist/scoreboard/localDrift.d.ts +23 -0
- package/dist/scoreboard/localDrift.d.ts.map +1 -0
- package/dist/scoreboard/localDrift.js +111 -0
- package/dist/scoreboard/localDrift.js.map +1 -0
- package/dist/scoreboard/localDrift.test.d.ts +9 -0
- package/dist/scoreboard/localDrift.test.d.ts.map +1 -0
- package/dist/scoreboard/localDrift.test.js +82 -0
- package/dist/scoreboard/localDrift.test.js.map +1 -0
- package/dist/setup/__tests__/coach-traces.test.d.ts +2 -0
- package/dist/setup/__tests__/coach-traces.test.d.ts.map +1 -0
- package/dist/setup/__tests__/coach-traces.test.js +189 -0
- package/dist/setup/__tests__/coach-traces.test.js.map +1 -0
- package/dist/setup/__tests__/setup-commands.test.d.ts +2 -0
- package/dist/setup/__tests__/setup-commands.test.d.ts.map +1 -0
- package/dist/setup/__tests__/setup-commands.test.js +177 -0
- package/dist/setup/__tests__/setup-commands.test.js.map +1 -0
- package/dist/setup/__tests__/state-machine.test.d.ts +2 -0
- package/dist/setup/__tests__/state-machine.test.d.ts.map +1 -0
- package/dist/setup/__tests__/state-machine.test.js +341 -0
- package/dist/setup/__tests__/state-machine.test.js.map +1 -0
- package/dist/setup/detect-surfaces.d.ts +21 -0
- package/dist/setup/detect-surfaces.d.ts.map +1 -0
- package/dist/setup/detect-surfaces.js +39 -0
- package/dist/setup/detect-surfaces.js.map +1 -0
- package/dist/setup/manifest-writer.d.ts +17 -0
- package/dist/setup/manifest-writer.d.ts.map +1 -0
- package/dist/setup/manifest-writer.js +153 -0
- package/dist/setup/manifest-writer.js.map +1 -0
- package/dist/setup/perimeter.d.ts +72 -0
- package/dist/setup/perimeter.d.ts.map +1 -0
- package/dist/setup/perimeter.js +128 -0
- package/dist/setup/perimeter.js.map +1 -0
- package/dist/setup/state-machine.d.ts +67 -0
- package/dist/setup/state-machine.d.ts.map +1 -0
- package/dist/setup/state-machine.js +124 -0
- package/dist/setup/state-machine.js.map +1 -0
- package/dist/surfaces/__tests__/adapter.test.d.ts +2 -0
- package/dist/surfaces/__tests__/adapter.test.d.ts.map +1 -0
- package/dist/surfaces/__tests__/adapter.test.js +90 -0
- package/dist/surfaces/__tests__/adapter.test.js.map +1 -0
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts +2 -0
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts.map +1 -0
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.js +132 -0
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.js.map +1 -0
- package/dist/surfaces/__tests__/telemetry.test.d.ts +2 -0
- package/dist/surfaces/__tests__/telemetry.test.d.ts.map +1 -0
- package/dist/surfaces/__tests__/telemetry.test.js +55 -0
- package/dist/surfaces/__tests__/telemetry.test.js.map +1 -0
- package/dist/surfaces/adapter.d.ts +70 -0
- package/dist/surfaces/adapter.d.ts.map +1 -0
- package/dist/surfaces/adapter.js +2 -0
- package/dist/surfaces/adapter.js.map +1 -0
- package/dist/surfaces/adapters/claude.d.ts +3 -0
- package/dist/surfaces/adapters/claude.d.ts.map +1 -0
- package/dist/surfaces/adapters/claude.js +67 -0
- package/dist/surfaces/adapters/claude.js.map +1 -0
- package/dist/surfaces/adapters/codex.d.ts +3 -0
- package/dist/surfaces/adapters/codex.d.ts.map +1 -0
- package/dist/surfaces/adapters/codex.js +61 -0
- package/dist/surfaces/adapters/codex.js.map +1 -0
- package/dist/surfaces/adapters/copilot.d.ts +3 -0
- package/dist/surfaces/adapters/copilot.d.ts.map +1 -0
- package/dist/surfaces/adapters/copilot.js +59 -0
- package/dist/surfaces/adapters/copilot.js.map +1 -0
- package/dist/surfaces/adapters/cursor.d.ts +3 -0
- package/dist/surfaces/adapters/cursor.d.ts.map +1 -0
- package/dist/surfaces/adapters/cursor.js +78 -0
- package/dist/surfaces/adapters/cursor.js.map +1 -0
- package/dist/surfaces/registry.d.ts +76 -0
- package/dist/surfaces/registry.d.ts.map +1 -0
- package/dist/surfaces/registry.js +117 -0
- package/dist/surfaces/registry.js.map +1 -0
- package/dist/surfaces/telemetry.d.ts +17 -0
- package/dist/surfaces/telemetry.d.ts.map +1 -0
- package/dist/surfaces/telemetry.js +31 -0
- package/dist/surfaces/telemetry.js.map +1 -0
- package/package.json +11 -3
- package/templates/method-registry.json +16 -0
- package/dist/__tests__/setup.test.d.ts +0 -2
- package/dist/__tests__/setup.test.d.ts.map +0 -1
- package/dist/__tests__/setup.test.js +0 -141
- package/dist/__tests__/setup.test.js.map +0 -1
- package/dist/generators/__tests__/surface-profiles.test.d.ts +0 -2
- package/dist/generators/__tests__/surface-profiles.test.d.ts.map +0 -1
- package/dist/generators/__tests__/surface-profiles.test.js +0 -89
- package/dist/generators/__tests__/surface-profiles.test.js.map +0 -1
- package/dist/generators/chain-classifier.test.d.ts +0 -2
- package/dist/generators/chain-classifier.test.d.ts.map +0 -1
- package/dist/generators/chain-classifier.test.js +0 -257
- package/dist/generators/chain-classifier.test.js.map +0 -1
- package/dist/lib/onboarding-phases.d.ts +0 -9
- package/dist/lib/onboarding-phases.d.ts.map +0 -1
- package/dist/lib/onboarding-phases.js +0 -120
- package/dist/lib/onboarding-phases.js.map +0 -1
|
@@ -3,14 +3,22 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Seed metadata is duplicated from `convex/admin/commandManifest.ts` for CLI help
|
|
5
5
|
* and ordering only — behavior is enforced server-side (STD-101).
|
|
6
|
+
*
|
|
7
|
+
* WP-433 S1b D13: the 4 substrate-repair migrations + backfill-default-team are
|
|
8
|
+
* generated from `convex/admin/seed/registry.ts` (single SSOT) into
|
|
9
|
+
* `seedRegistryEntries.generated.ts`. Run `npm run codegen` to refresh after registry edits.
|
|
6
10
|
*/
|
|
11
|
+
import * as clack from '@clack/prompts';
|
|
7
12
|
import { adminCall } from '../../lib/client.js';
|
|
8
|
-
import {
|
|
13
|
+
import { resolveAdminConfig } from '../../lib/config.js';
|
|
9
14
|
import { CLIError, ErrorCode } from '../../lib/errors.js';
|
|
15
|
+
import { ask, confirm, intro, isInteractive, log, multiselect, note, outro } from '../../lib/prompts.js';
|
|
10
16
|
import { readSession } from '../../lib/session.js';
|
|
11
17
|
import { isJsonMode } from '../../lib/runner.js';
|
|
18
|
+
import { REGISTRY_SEED_COMMAND_ENTRIES } from './seedRegistryEntries.generated.js';
|
|
19
|
+
import { confirmRiskNoteTitle, requiresAdminDestructiveConfirmation, seedAllConfirmMessage, seedMultiselectConfirmMessage, seedRunConfirmMessage, } from '../../lib/deployment.js';
|
|
12
20
|
import { withSpinner } from '../../lib/spinner.js';
|
|
13
|
-
import { adminBanner, bold, confirmProdAction, dim, green, hint, icons, red, } from '../../lib/style.js';
|
|
21
|
+
import { adminBanner, bold, confirmProdAction, cyan, dim, green, heading, hint, icons, red, yellow, } from '../../lib/style.js';
|
|
14
22
|
/**
|
|
15
23
|
* Order matches `ADMIN_COMMANDS` seed block in commandManifest.ts — dependency order for `seed all`.
|
|
16
24
|
*/
|
|
@@ -63,12 +71,6 @@ export const SEED_COMMAND_ENTRIES = [
|
|
|
63
71
|
requiresWorkspaceId: true,
|
|
64
72
|
dryRunSupported: false,
|
|
65
73
|
},
|
|
66
|
-
{
|
|
67
|
-
name: 'seed:methodology-preset',
|
|
68
|
-
description: 'Install a methodology preset (e.g. cagan-tt) into a workspace — requires --preset-id',
|
|
69
|
-
requiresWorkspaceId: true,
|
|
70
|
-
dryRunSupported: false,
|
|
71
|
-
},
|
|
72
74
|
{
|
|
73
75
|
name: 'seed:process-templates',
|
|
74
76
|
description: 'Seed process templates collection for a workspace',
|
|
@@ -93,29 +95,102 @@ export const SEED_COMMAND_ENTRIES = [
|
|
|
93
95
|
requiresWorkspaceId: false,
|
|
94
96
|
dryRunSupported: false,
|
|
95
97
|
},
|
|
98
|
+
{
|
|
99
|
+
name: 'seed:migrate-scope-required-fields',
|
|
100
|
+
description: 'Fix scope semantic type: update requiredFields from description to purpose across all workspaces (TEN-346)',
|
|
101
|
+
requiresWorkspaceId: false,
|
|
102
|
+
dryRunSupported: true,
|
|
103
|
+
},
|
|
96
104
|
{
|
|
97
105
|
name: 'seed:writing-guidance',
|
|
98
106
|
description: 'Seed writing guidance entries for a workspace',
|
|
99
107
|
requiresWorkspaceId: true,
|
|
100
108
|
dryRunSupported: true,
|
|
101
109
|
},
|
|
110
|
+
// ─── WP-379 S5a: Starter Setup seed operations ─────────────────────────────
|
|
111
|
+
{
|
|
112
|
+
name: 'seed:show-starter',
|
|
113
|
+
description: 'List 18 Starter Setup assets for a workspace with body previews, lockLevel, and gate summary',
|
|
114
|
+
requiresWorkspaceId: true,
|
|
115
|
+
dryRunSupported: false,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'seed:backfill-starter',
|
|
119
|
+
description: 'Idempotent bulk seed of Starter Setup bundle across workspaces. Defaults to dry-run.',
|
|
120
|
+
requiresWorkspaceId: false,
|
|
121
|
+
dryRunSupported: true,
|
|
122
|
+
dangerous: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'seed:migrate-starter-fields',
|
|
126
|
+
description: 'STUB (WP-379 S5b): backfill explicit lockLevel + gate columns on existing setup-assets entries.',
|
|
127
|
+
requiresWorkspaceId: true,
|
|
128
|
+
dryRunSupported: true,
|
|
129
|
+
},
|
|
130
|
+
// WP-433 S1b D13: `seed:migrate-setup-skill-entryid` migrated to the SSOT registry.
|
|
131
|
+
// It now appears via REGISTRY_SEED_COMMAND_ENTRIES below (alongside the 3 new repair ops
|
|
132
|
+
// and `backfill-default-team`).
|
|
102
133
|
];
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
134
|
+
// WP-433 S1b D13: registry-generated entries appended to the static list. These are the
|
|
135
|
+
// 11 ops registered in `convex/admin/seed/registry.ts`. Filter out the prestep
|
|
136
|
+
// (`align-workspace-collections`) — it cannot be invoked via `pb admin seed run`.
|
|
137
|
+
const REGISTRY_RUNNABLE_ENTRIES = REGISTRY_SEED_COMMAND_ENTRIES
|
|
138
|
+
.filter((e) => e.runnable)
|
|
139
|
+
.map((e) => ({
|
|
140
|
+
name: e.name,
|
|
141
|
+
description: e.description,
|
|
142
|
+
requiresWorkspaceId: e.requiresWorkspaceId,
|
|
143
|
+
dryRunSupported: e.dryRunSupported,
|
|
144
|
+
}));
|
|
145
|
+
/** Combined list: static manifest entries (legacy seeds) + registry-generated entries. */
|
|
146
|
+
const ALL_SEED_COMMAND_ENTRIES = [
|
|
147
|
+
...SEED_COMMAND_ENTRIES,
|
|
148
|
+
...REGISTRY_RUNNABLE_ENTRIES,
|
|
149
|
+
];
|
|
150
|
+
const SEED_BY_NAME = new Map(ALL_SEED_COMMAND_ENTRIES.map((e) => [e.name, e]));
|
|
151
|
+
/**
|
|
152
|
+
* Manifest order for `pb admin seed all`.
|
|
153
|
+
*
|
|
154
|
+
* Includes the static legacy seeds plus the registry-generated runnable entries so
|
|
155
|
+
* `seed all` exercises the full surface (D13 SSOT).
|
|
156
|
+
*/
|
|
157
|
+
export const SEED_MANIFEST_ORDER = ALL_SEED_COMMAND_ENTRIES.map((e) => e.name);
|
|
115
158
|
function shortLabel(manifestName) {
|
|
116
159
|
return manifestName.startsWith('seed:') ? manifestName.slice('seed:'.length) : manifestName;
|
|
117
160
|
}
|
|
118
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Convert a manifest name (which may be a bare slug for registry-generated entries)
|
|
163
|
+
* to the backend command name expected by the admin dispatch layer.
|
|
164
|
+
*
|
|
165
|
+
* Legacy static entries are already stored as `seed:<slug>` — returned as-is.
|
|
166
|
+
* Registry-generated entries are stored as bare slugs (e.g. `seed-system-glossary`);
|
|
167
|
+
* the backend COMMAND_MAP expects `seed:<slug>`, so we add the prefix here.
|
|
168
|
+
*/
|
|
169
|
+
function toBackendCommand(manifestName) {
|
|
170
|
+
return manifestName.startsWith('seed:') ? manifestName : `seed:${manifestName}`;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Accept short-form or long-form seed op names; return the canonical backend command name.
|
|
174
|
+
*
|
|
175
|
+
* Static entries (legacy) are stored as `seed:<slug>` (e.g. `seed:knowledge`).
|
|
176
|
+
* Registry-generated entries (WP-433 S1b) are stored as bare slugs (e.g.
|
|
177
|
+
* `seed-system-glossary`) to avoid the double-prefix `seed:seed-*` trap that
|
|
178
|
+
* arose when slugs like `seed-system-glossary` were naively stored as
|
|
179
|
+
* `seed:seed-system-glossary`.
|
|
180
|
+
*
|
|
181
|
+
* Both forms always return the backend command name (`seed:<bare-slug>`):
|
|
182
|
+
* - `'system-glossary'` or `'seed-system-glossary'` → `'seed:seed-system-glossary'`
|
|
183
|
+
* would be wrong; instead the bare slug stored in the map IS `seed-system-glossary`
|
|
184
|
+
* and the backend command is `seed:seed-system-glossary`.
|
|
185
|
+
*
|
|
186
|
+
* Resolution order:
|
|
187
|
+
* 1. Try `seed:<t>` — covers legacy static entries (`seed:knowledge`) and any input
|
|
188
|
+
* that normalises to a key already stored with the `seed:` prefix.
|
|
189
|
+
* 2. Try bare `<t>` (stripping a leading `seed:` from the input if present) —
|
|
190
|
+
* covers registry entries stored without the prefix.
|
|
191
|
+
* When found via bare slug, return `seed:<bare>` so the caller always gets a
|
|
192
|
+
* backend-compatible command name.
|
|
193
|
+
*/
|
|
119
194
|
export function normalizeSeedCommandName(input) {
|
|
120
195
|
const t = input.trim();
|
|
121
196
|
if (!t) {
|
|
@@ -124,15 +199,50 @@ export function normalizeSeedCommandName(input) {
|
|
|
124
199
|
category: 'validation',
|
|
125
200
|
});
|
|
126
201
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
202
|
+
// 1. Try the `seed:`-prefixed form (covers all legacy static entries).
|
|
203
|
+
const withPrefix = t.startsWith('seed:') ? t : `seed:${t}`;
|
|
204
|
+
if (SEED_BY_NAME.has(withPrefix))
|
|
205
|
+
return withPrefix;
|
|
206
|
+
// 2. Try the bare-slug form (covers registry-generated entries stored without `seed:`).
|
|
207
|
+
// Strip one leading `seed:` if the input has it, so both
|
|
208
|
+
// `seed-system-glossary` and `seed:seed-system-glossary` resolve to `seed-system-glossary`.
|
|
209
|
+
const bare = t.startsWith('seed:') ? t.slice('seed:'.length) : t;
|
|
210
|
+
if (SEED_BY_NAME.has(bare)) {
|
|
211
|
+
// Return the backend-compatible `seed:` form so callers can pass this directly
|
|
212
|
+
// to adminCall and the backend COMMAND_MAP will find it.
|
|
213
|
+
return `seed:${bare}`;
|
|
134
214
|
}
|
|
135
|
-
|
|
215
|
+
const known = SEED_MANIFEST_ORDER.map((n) => shortLabel(n)).join(', ');
|
|
216
|
+
throw new CLIError(`Unknown seed operation "${input}". Known short names: ${known}`, {
|
|
217
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
218
|
+
category: 'validation',
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
// ─── WP-379 S5a: Starter-specific arg builders ───────────────────────────────
|
|
222
|
+
/**
|
|
223
|
+
* Build args for seed:backfill-starter with CLI-side validation.
|
|
224
|
+
*
|
|
225
|
+
* Rules:
|
|
226
|
+
* - confirm:true requires workspaceScope to be explicitly provided
|
|
227
|
+
* - dryRun defaults to true when confirm is false
|
|
228
|
+
*
|
|
229
|
+
* Exported for testing.
|
|
230
|
+
*/
|
|
231
|
+
export function buildBackfillStarterArgs(opts) {
|
|
232
|
+
const confirm = opts.confirm ?? false;
|
|
233
|
+
const dryRun = opts.dryRun ?? !confirm;
|
|
234
|
+
if (confirm && !opts.workspaceScope) {
|
|
235
|
+
throw new CLIError('backfill-starter: --workspace-scope (dev|prod|all) is required when --confirm is passed. ' +
|
|
236
|
+
'Specify which deployment scope to seed to prevent accidental cross-scope writes.', { code: ErrorCode.VALIDATION_FAILED, category: 'validation' });
|
|
237
|
+
}
|
|
238
|
+
const validScopes = ['dev', 'prod', 'all'];
|
|
239
|
+
if (opts.workspaceScope && !validScopes.includes(opts.workspaceScope)) {
|
|
240
|
+
throw new CLIError(`backfill-starter: --workspace-scope must be one of: ${validScopes.join(', ')}. Got: "${opts.workspaceScope}"`, { code: ErrorCode.VALIDATION_FAILED, category: 'validation' });
|
|
241
|
+
}
|
|
242
|
+
const args = { dryRun, confirm };
|
|
243
|
+
if (opts.workspaceScope)
|
|
244
|
+
args.workspaceScope = opts.workspaceScope;
|
|
245
|
+
return args;
|
|
136
246
|
}
|
|
137
247
|
function resolveWorkspaceId(explicit) {
|
|
138
248
|
if (explicit)
|
|
@@ -147,7 +257,10 @@ function requireWorkspaceId(explicit) {
|
|
|
147
257
|
return id;
|
|
148
258
|
}
|
|
149
259
|
export function buildSeedArgs(manifestName, opts) {
|
|
150
|
-
|
|
260
|
+
// Try exact match first (legacy static entries stored as `seed:<slug>`).
|
|
261
|
+
// Fall back to bare-slug lookup (registry-generated entries stored without `seed:` prefix).
|
|
262
|
+
const bare = manifestName.startsWith('seed:') ? manifestName.slice('seed:'.length) : manifestName;
|
|
263
|
+
const def = SEED_BY_NAME.get(manifestName) ?? SEED_BY_NAME.get(bare);
|
|
151
264
|
if (!def) {
|
|
152
265
|
throw new CLIError(`Unknown seed command: ${manifestName}`, {
|
|
153
266
|
code: ErrorCode.VALIDATION_FAILED,
|
|
@@ -155,18 +268,6 @@ export function buildSeedArgs(manifestName, opts) {
|
|
|
155
268
|
});
|
|
156
269
|
}
|
|
157
270
|
const args = {};
|
|
158
|
-
if (manifestName === 'seed:methodology-preset') {
|
|
159
|
-
const ws = requireWorkspaceId(opts.workspaceId);
|
|
160
|
-
if (!opts.presetId) {
|
|
161
|
-
throw new CLIError('seed:methodology-preset requires --preset-id <id>.', {
|
|
162
|
-
code: ErrorCode.VALIDATION_FAILED,
|
|
163
|
-
category: 'validation',
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
args.workspaceId = ws;
|
|
167
|
-
args.presetId = opts.presetId;
|
|
168
|
-
return args;
|
|
169
|
-
}
|
|
170
271
|
if (def.requiresWorkspaceId) {
|
|
171
272
|
args.workspaceId = requireWorkspaceId(opts.workspaceId);
|
|
172
273
|
}
|
|
@@ -179,7 +280,7 @@ export function buildSeedArgs(manifestName, opts) {
|
|
|
179
280
|
return args;
|
|
180
281
|
}
|
|
181
282
|
function printSeedList() {
|
|
182
|
-
const rows =
|
|
283
|
+
const rows = ALL_SEED_COMMAND_ENTRIES.map((e) => ({
|
|
183
284
|
name: shortLabel(e.name),
|
|
184
285
|
description: e.description,
|
|
185
286
|
workspace: e.requiresWorkspaceId ? 'yes' : 'no',
|
|
@@ -189,14 +290,23 @@ function printSeedList() {
|
|
|
189
290
|
process.stdout.write(JSON.stringify({ commands: rows }, null, 2) + '\n');
|
|
190
291
|
return;
|
|
191
292
|
}
|
|
293
|
+
try {
|
|
294
|
+
adminBanner(resolveAdminConfig().siteUrl);
|
|
295
|
+
}
|
|
296
|
+
catch { /* not configured */ }
|
|
192
297
|
const wName = Math.max(8, ...rows.map((r) => r.name.length));
|
|
193
298
|
const wWs = 9;
|
|
194
|
-
const wDr =
|
|
299
|
+
const wDr = 7;
|
|
195
300
|
process.stdout.write(`${bold('Name'.padEnd(wName))} ${bold('Workspace'.padEnd(wWs))} ${bold('Dry-run'.padEnd(wDr))} ${bold('Description')}\n`);
|
|
301
|
+
process.stdout.write(dim('─'.repeat(wName + wWs + wDr + 40)) + '\n');
|
|
196
302
|
for (const r of rows) {
|
|
197
|
-
|
|
303
|
+
const dryRunStr = r.dryRun === 'yes' ? green(r.dryRun.padEnd(wDr)) : dim(r.dryRun.padEnd(wDr));
|
|
304
|
+
process.stdout.write(`${cyan(r.name.padEnd(wName))} ${r.workspace.padEnd(wWs)} ${dryRunStr} ${dim(r.description)}\n`);
|
|
198
305
|
}
|
|
199
|
-
|
|
306
|
+
process.stdout.write('\n');
|
|
307
|
+
hint(`${ALL_SEED_COMMAND_ENTRIES.length} operations — behavior enforced server-side (commandManifest.ts + WP-433 S1b registry)`);
|
|
308
|
+
hint('pb admin seed run <name> Run one operation');
|
|
309
|
+
hint('pb admin seed all Run all in manifest order');
|
|
200
310
|
}
|
|
201
311
|
async function printSeedStatus(workspaceIdOpt) {
|
|
202
312
|
const readiness = await adminCall('inspect:readiness-config', {});
|
|
@@ -205,10 +315,10 @@ async function printSeedStatus(workspaceIdOpt) {
|
|
|
205
315
|
if (wsId) {
|
|
206
316
|
collection = await adminCall('inspect:collection', { workspaceId: wsId });
|
|
207
317
|
}
|
|
208
|
-
const
|
|
318
|
+
const statusNote = 'Per-seed run history is not tracked server-side yet — use workspace totals and readiness diagnose as signals.';
|
|
209
319
|
if (isJsonMode()) {
|
|
210
320
|
process.stdout.write(JSON.stringify({
|
|
211
|
-
note,
|
|
321
|
+
note: statusNote,
|
|
212
322
|
readinessConfig: readiness,
|
|
213
323
|
workspaceCollections: collection,
|
|
214
324
|
workspaceId: wsId ?? null,
|
|
@@ -216,7 +326,7 @@ async function printSeedStatus(workspaceIdOpt) {
|
|
|
216
326
|
return;
|
|
217
327
|
}
|
|
218
328
|
process.stdout.write(`${bold('Seed status')}\n\n`);
|
|
219
|
-
process.stdout.write(` ${dim(
|
|
329
|
+
process.stdout.write(` ${dim(statusNote)}\n\n`);
|
|
220
330
|
process.stdout.write(`${bold('Readiness config migration (inspect:readiness-config)')}\n`);
|
|
221
331
|
process.stdout.write(` ${dim(JSON.stringify(readiness, null, 2).split('\n').join('\n '))}\n\n`);
|
|
222
332
|
if (collection && typeof collection === 'object' && collection !== null && 'workspace' in collection) {
|
|
@@ -233,20 +343,321 @@ async function runSeedOperation(manifestName, opts) {
|
|
|
233
343
|
const args = buildSeedArgs(manifestName, opts);
|
|
234
344
|
return adminCall(manifestName, args);
|
|
235
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* WP-433 S1b D16 — render the system/fleet seed status report.
|
|
348
|
+
*
|
|
349
|
+
* Frame: this is a system-admin (operator) command. Output never says "your workspace" —
|
|
350
|
+
* always "the system" / "X workspaces" / a specific named workspace.
|
|
351
|
+
*/
|
|
352
|
+
function renderSeedStatusReport(data) {
|
|
353
|
+
if (!data || typeof data !== 'object') {
|
|
354
|
+
process.stdout.write(`${dim('No data returned.')}\n`);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
const report = data;
|
|
358
|
+
const mode = report.mode;
|
|
359
|
+
if (mode === 'fleet') {
|
|
360
|
+
const summary = report.summary;
|
|
361
|
+
const failures = report.failures ?? [];
|
|
362
|
+
process.stdout.write(`${bold(`System: ${summary.total} workspace${summary.total === 1 ? '' : 's'} total`)}\n\n`);
|
|
363
|
+
process.stdout.write(` ${green(icons.pass)} ${summary.healthy} healthy (all assertions passed)\n`);
|
|
364
|
+
if (summary.failed > 0) {
|
|
365
|
+
process.stdout.write(` ${red(icons.fail)} ${summary.failed} with failed assertions\n`);
|
|
366
|
+
}
|
|
367
|
+
if (summary.neverRun > 0) {
|
|
368
|
+
process.stdout.write(` ${dim('!')} ${summary.neverRun} with never-run ops (likely created pre-registry)\n`);
|
|
369
|
+
}
|
|
370
|
+
if (failures.length === 0) {
|
|
371
|
+
process.stdout.write(`\n${dim('No failures or never-run ops to report.')}\n`);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
// Group failures by status for readable output.
|
|
375
|
+
const failedRows = failures.filter((f) => f.status === 'failed');
|
|
376
|
+
const neverRunRows = failures.filter((f) => f.status === 'never-run');
|
|
377
|
+
if (failedRows.length > 0) {
|
|
378
|
+
process.stdout.write(`\n${red('Failures:')}\n`);
|
|
379
|
+
for (const f of failedRows) {
|
|
380
|
+
process.stdout.write(` - ${cyan(`workspace-${f.workspaceId}`)} (${bold(f.workspaceName)}) — ${f.slug}: ${f.detail}\n`);
|
|
381
|
+
if (f.recommendedRepairOp) {
|
|
382
|
+
process.stdout.write(` repair: ${dim(`pb admin seed run ${f.recommendedRepairOp} --workspace-id ${f.workspaceId}`)}\n`);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
if (neverRunRows.length > 0) {
|
|
387
|
+
process.stdout.write(`\n${dim('Never-run ops:')}\n`);
|
|
388
|
+
for (const f of neverRunRows) {
|
|
389
|
+
process.stdout.write(` - ${cyan(`workspace-${f.workspaceId}`)} (${bold(f.workspaceName)}) — ${f.slug} never invoked\n`);
|
|
390
|
+
if (f.recommendedRepairOp) {
|
|
391
|
+
process.stdout.write(` repair: ${dim(`pb admin seed run ${f.recommendedRepairOp} --workspace-id ${f.workspaceId}`)}\n`);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (mode === 'drilldown') {
|
|
398
|
+
const workspaceName = report.workspaceName;
|
|
399
|
+
const workspaceId = report.workspaceId;
|
|
400
|
+
const rows = report.rows ?? [];
|
|
401
|
+
if (rows.length === 0) {
|
|
402
|
+
process.stdout.write(`${bold(`Workspace: ${workspaceName}`)} ${dim(`(${workspaceId})`)}\n\n`);
|
|
403
|
+
process.stdout.write(`${dim('No registered ops.')}\n`);
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
// TEN-2021: group by level so non-tech operators don't conflate
|
|
407
|
+
// platform-substrate ops with on-demand repair tools.
|
|
408
|
+
const levelBySlug = new Map(REGISTRY_SEED_COMMAND_ENTRIES.map((e) => [e.name, e.level]));
|
|
409
|
+
const platformRows = rows.filter((r) => levelBySlug.get(r.slug) === 'platform');
|
|
410
|
+
const workspaceRows = rows.filter((r) => levelBySlug.get(r.slug) === 'workspace');
|
|
411
|
+
const repairRows = rows.filter((r) => levelBySlug.get(r.slug) === 'repair');
|
|
412
|
+
// TEN-2019 known soft-failure: platform-source workspace has no curated
|
|
413
|
+
// methods/skills entries to project. Not a workspace bug — render as ⚠.
|
|
414
|
+
const PLATFORM_SOURCE_EMPTY_MARKER = 'neither methods nor skills collection found';
|
|
415
|
+
const isPlatformSourceEmptyRow = (r) => r.status === 'failed' && r.detail.includes(PLATFORM_SOURCE_EMPTY_MARKER);
|
|
416
|
+
// ── Header: workspace identity + at-a-glance health summary ────────────────
|
|
417
|
+
const isSeedRow = (r) => {
|
|
418
|
+
const lvl = levelBySlug.get(r.slug);
|
|
419
|
+
return lvl === 'platform' || lvl === 'workspace';
|
|
420
|
+
};
|
|
421
|
+
const seedRows = rows.filter(isSeedRow);
|
|
422
|
+
const passCount = seedRows.filter((r) => r.status === 'passed').length;
|
|
423
|
+
const warnCount = seedRows.filter(isPlatformSourceEmptyRow).length;
|
|
424
|
+
const failCount = seedRows.filter((r) => r.status === 'failed' && !isPlatformSourceEmptyRow(r)).length;
|
|
425
|
+
process.stdout.write(`${bold('Workspace:')} ${workspaceName}\n`);
|
|
426
|
+
process.stdout.write(`${bold('ID:')} ${dim(workspaceId)}\n`);
|
|
427
|
+
process.stdout.write(`${bold('Health:')} ${green(`${passCount} ${icons.pass}`)} ${yellow(`${warnCount} ⚠`)} ${red(`${failCount} ${icons.fail}`)}\n\n`);
|
|
428
|
+
// ── Row renderer: only show detail on ⚠ / ✗ via indented sub-line ──────────
|
|
429
|
+
const renderRow = (r) => {
|
|
430
|
+
const isWarn = isPlatformSourceEmptyRow(r);
|
|
431
|
+
const icon = isWarn ? yellow('⚠')
|
|
432
|
+
: r.status === 'passed' ? green(icons.pass)
|
|
433
|
+
: r.status === 'failed' ? red(icons.fail)
|
|
434
|
+
: dim('-');
|
|
435
|
+
process.stdout.write(` ${icon} ${cyan(r.slug)}\n`);
|
|
436
|
+
// Detail sub-line only for genuine signals (⚠ or ✗). ✓ and "-" are noise.
|
|
437
|
+
if (isWarn) {
|
|
438
|
+
process.stdout.write(` ${dim('└─ Platform-curated content not yet published (TEN-2019).')}\n`);
|
|
439
|
+
}
|
|
440
|
+
else if (r.status === 'failed') {
|
|
441
|
+
const cleaned = r.detail.replace(new RegExp(`^${r.slug} assertion failed:\\s*`), '');
|
|
442
|
+
process.stdout.write(` ${dim(`└─ ${cleaned}`)}\n`);
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
if (platformRows.length > 0) {
|
|
446
|
+
process.stdout.write(`${bold('Seeded on workspace creation')}\n`);
|
|
447
|
+
process.stdout.write(`${dim('Runs automatically when a new workspace is created.')}\n\n`);
|
|
448
|
+
for (const r of platformRows)
|
|
449
|
+
renderRow(r);
|
|
450
|
+
process.stdout.write('\n');
|
|
451
|
+
}
|
|
452
|
+
if (workspaceRows.length > 0) {
|
|
453
|
+
process.stdout.write(`${bold('Owner-level defaults')}\n`);
|
|
454
|
+
process.stdout.write(`${dim('Per-workspace state seeded for the owner.')}\n\n`);
|
|
455
|
+
for (const r of workspaceRows)
|
|
456
|
+
renderRow(r);
|
|
457
|
+
process.stdout.write('\n');
|
|
458
|
+
}
|
|
459
|
+
if (repairRows.length > 0) {
|
|
460
|
+
process.stdout.write(`${bold('Repair commands (manual)')}\n`);
|
|
461
|
+
process.stdout.write(`${dim('Used to fix older or drifted workspaces. Usually nothing to do.')}\n\n`);
|
|
462
|
+
for (const r of repairRows)
|
|
463
|
+
renderRow(r);
|
|
464
|
+
}
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
if (mode === 'op-filter') {
|
|
468
|
+
const slug = report.slug;
|
|
469
|
+
const rows = report.rows ?? [];
|
|
470
|
+
process.stdout.write(`${bold(`Op: ${slug}`)} ${dim(`(${rows.length} workspace${rows.length === 1 ? '' : 's'})`)}\n\n`);
|
|
471
|
+
if (rows.length === 0) {
|
|
472
|
+
process.stdout.write(`${dim('Op not found in registry, or no workspaces exist.')}\n`);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
for (const r of rows) {
|
|
476
|
+
const icon = r.status === 'passed' ? green(icons.pass)
|
|
477
|
+
: r.status === 'failed' ? red(icons.fail)
|
|
478
|
+
: dim('-');
|
|
479
|
+
const detail = r.detail ? ` ${dim(r.detail)}` : '';
|
|
480
|
+
process.stdout.write(` ${icon} ${cyan(`workspace-${r.workspaceId}`)} (${bold(r.workspaceName)})${detail}\n`);
|
|
481
|
+
}
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
process.stdout.write(`${dim('Unknown report mode.')}\n`);
|
|
485
|
+
}
|
|
236
486
|
/** Attach seed subcommands to the `seed` Commander node. */
|
|
237
487
|
export function attachSeedCommands(seed) {
|
|
488
|
+
// Default action when `pb admin seed` is invoked with no subcommand.
|
|
489
|
+
seed.action(async () => {
|
|
490
|
+
if (isJsonMode()) {
|
|
491
|
+
process.stdout.write(JSON.stringify({
|
|
492
|
+
operations: ALL_SEED_COMMAND_ENTRIES.map((e) => ({
|
|
493
|
+
name: shortLabel(e.name),
|
|
494
|
+
requiresWorkspaceId: e.requiresWorkspaceId,
|
|
495
|
+
dryRunSupported: e.dryRunSupported,
|
|
496
|
+
description: e.description,
|
|
497
|
+
})),
|
|
498
|
+
}, null, 2) + '\n');
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
let siteUrl = '';
|
|
502
|
+
try {
|
|
503
|
+
siteUrl = resolveAdminConfig().siteUrl;
|
|
504
|
+
}
|
|
505
|
+
catch { /* not configured */ }
|
|
506
|
+
if (siteUrl)
|
|
507
|
+
adminBanner(siteUrl);
|
|
508
|
+
if (isInteractive()) {
|
|
509
|
+
intro('Seed Operations');
|
|
510
|
+
const menuEntries = ALL_SEED_COMMAND_ENTRIES;
|
|
511
|
+
const selected = await multiselect({
|
|
512
|
+
message: 'Select operations to run (space to toggle, enter to confirm):',
|
|
513
|
+
options: menuEntries.map((e) => ({
|
|
514
|
+
value: e.name,
|
|
515
|
+
label: shortLabel(e.name),
|
|
516
|
+
hint: [
|
|
517
|
+
e.requiresWorkspaceId ? 'needs workspace' : 'platform-wide',
|
|
518
|
+
e.dryRunSupported ? 'dry-run ✓' : '',
|
|
519
|
+
].filter(Boolean).join(' · '),
|
|
520
|
+
})),
|
|
521
|
+
required: false,
|
|
522
|
+
});
|
|
523
|
+
if (!Array.isArray(selected) || selected.length === 0) {
|
|
524
|
+
outro('Nothing selected — use pb admin seed run <name> for individual operations');
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
// Resolve workspace-id upfront for any selected ops that need it
|
|
528
|
+
const needsWs = selected.some((name) => SEED_BY_NAME.get(name)?.requiresWorkspaceId);
|
|
529
|
+
let workspaceId;
|
|
530
|
+
if (needsWs) {
|
|
531
|
+
const sessionWsId = readSession()?.workspaceId;
|
|
532
|
+
if (sessionWsId) {
|
|
533
|
+
workspaceId = sessionWsId;
|
|
534
|
+
log.info(`Using session workspace: ${dim(sessionWsId)}`);
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
workspaceId = await ask({
|
|
538
|
+
message: 'Workspace ID (required for selected operations):',
|
|
539
|
+
validate: (v) => v.trim() ? undefined : 'Workspace ID is required',
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
const needsConfirm = requiresAdminDestructiveConfirmation(siteUrl);
|
|
544
|
+
if (needsConfirm) {
|
|
545
|
+
const ok = await confirm({
|
|
546
|
+
message: seedMultiselectConfirmMessage(siteUrl, selected.length),
|
|
547
|
+
initialValue: false,
|
|
548
|
+
});
|
|
549
|
+
if (!ok) {
|
|
550
|
+
outro('Cancelled');
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
// Run selected operations in order, stop on first failure (same policy as seed all)
|
|
555
|
+
const results = [];
|
|
556
|
+
for (const name of selected) {
|
|
557
|
+
try {
|
|
558
|
+
await withSpinner(`Running ${shortLabel(name)}`, async () => {
|
|
559
|
+
const args = buildSeedArgs(name, { workspaceId });
|
|
560
|
+
await adminCall(toBackendCommand(name), args);
|
|
561
|
+
});
|
|
562
|
+
results.push({ name, ok: true });
|
|
563
|
+
}
|
|
564
|
+
catch (e) {
|
|
565
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
566
|
+
results.push({ name, ok: false, error: msg });
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
const passed = results.filter((r) => r.ok).length;
|
|
571
|
+
const failed = results.filter((r) => !r.ok).length;
|
|
572
|
+
const summaryLines = results
|
|
573
|
+
.map((r) => r.ok ? `✓ ${shortLabel(r.name)}` : `✗ ${shortLabel(r.name)} — ${r.error}`)
|
|
574
|
+
.join('\n');
|
|
575
|
+
note(summaryLines, `${passed}/${selected.length} complete`);
|
|
576
|
+
if (failed > 0) {
|
|
577
|
+
process.exitCode = 1;
|
|
578
|
+
outro('Some operations failed — see above');
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
outro(`${passed} operation(s) complete`);
|
|
582
|
+
}
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
// Non-interactive (non-JSON) fallback — existing static preview
|
|
586
|
+
process.stdout.write(`${heading('Seed operations')} ${dim(`(${ALL_SEED_COMMAND_ENTRIES.length})`)}\n\n`);
|
|
587
|
+
// Show first 6 entries as a preview
|
|
588
|
+
const preview = ALL_SEED_COMMAND_ENTRIES.slice(0, 6);
|
|
589
|
+
const wName = Math.max(...preview.map((e) => shortLabel(e.name).length));
|
|
590
|
+
for (const e of preview) {
|
|
591
|
+
const label = shortLabel(e.name);
|
|
592
|
+
const flags = e.dryRunSupported ? dim(' dry-run ✓') : '';
|
|
593
|
+
process.stdout.write(` ${cyan(label.padEnd(wName))} ${dim(e.description)}${flags}\n`);
|
|
594
|
+
}
|
|
595
|
+
if (ALL_SEED_COMMAND_ENTRIES.length > 6) {
|
|
596
|
+
process.stdout.write(` ${dim(`... ${ALL_SEED_COMMAND_ENTRIES.length - 6} more — run pb admin seed list`)}\n`);
|
|
597
|
+
}
|
|
598
|
+
process.stdout.write('\n');
|
|
599
|
+
process.stdout.write(` ${cyan('pb admin seed list')} ${dim('Full list with workspace + dry-run flags')}\n`);
|
|
600
|
+
process.stdout.write(` ${cyan('pb admin seed run <name>')} ${dim('Run one operation')}\n`);
|
|
601
|
+
process.stdout.write(` ${cyan('pb admin seed all')} ${dim('Run all in manifest order')}\n`);
|
|
602
|
+
process.stdout.write(` ${cyan('pb admin seed status')} ${dim('Fleet-wide seed health (system admin)')}\n`);
|
|
603
|
+
process.stdout.write('\n');
|
|
604
|
+
});
|
|
238
605
|
seed
|
|
239
606
|
.command('list')
|
|
240
607
|
.description('List registered seed operations (names match server manifest)')
|
|
241
608
|
.action(() => {
|
|
242
609
|
printSeedList();
|
|
243
610
|
});
|
|
611
|
+
// WP-433 S1b D16 — fleet-wide seed status (system-admin command).
|
|
612
|
+
// Default behaviour: scan ALL workspaces in the deployment and report summary + failures.
|
|
613
|
+
// `--workspace-id <id>` drilldown flag triages a single workspace.
|
|
614
|
+
// `--op <slug>` fleet view filtered to one op.
|
|
615
|
+
// `--failed-only` fleet view skipping healthy workspaces.
|
|
616
|
+
// `--legacy-readiness` falls back to the pre-S1b workspace-readiness signals view.
|
|
244
617
|
seed
|
|
245
618
|
.command('status')
|
|
246
|
-
.description('
|
|
247
|
-
|
|
619
|
+
.description('WP-433 S1b D16: Fleet-wide seed health (system admin). Default scans ALL workspaces. ' +
|
|
620
|
+
'Use --workspace-id to drill down, --op to filter one op, --failed-only for failures only.')
|
|
621
|
+
.option('--workspace-id <id>', 'Drill down to one workspace (operator triage)')
|
|
622
|
+
.option('--op <slug>', 'Filter fleet view to one op slug')
|
|
623
|
+
.option('--failed-only', 'Skip healthy workspaces; show failures only', false)
|
|
624
|
+
.option('--legacy-readiness', 'Use pre-S1b workspace readiness signals view', false)
|
|
248
625
|
.action(async (options) => {
|
|
249
|
-
|
|
626
|
+
if (options.legacyReadiness) {
|
|
627
|
+
if (!isJsonMode()) {
|
|
628
|
+
try {
|
|
629
|
+
adminBanner(resolveAdminConfig().siteUrl);
|
|
630
|
+
}
|
|
631
|
+
catch { /* not configured */ }
|
|
632
|
+
intro('Seed: status (legacy readiness)');
|
|
633
|
+
}
|
|
634
|
+
await printSeedStatus(options.workspaceId);
|
|
635
|
+
if (!isJsonMode()) {
|
|
636
|
+
outro('Read-only status check complete');
|
|
637
|
+
}
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
if (!isJsonMode()) {
|
|
641
|
+
try {
|
|
642
|
+
adminBanner(resolveAdminConfig().siteUrl);
|
|
643
|
+
}
|
|
644
|
+
catch { /* not configured */ }
|
|
645
|
+
intro('Seed status — system / fleet view');
|
|
646
|
+
}
|
|
647
|
+
const callArgs = {};
|
|
648
|
+
if (options.workspaceId)
|
|
649
|
+
callArgs.workspaceId = options.workspaceId;
|
|
650
|
+
if (options.op)
|
|
651
|
+
callArgs.opSlug = options.op;
|
|
652
|
+
if (options.failedOnly)
|
|
653
|
+
callArgs.failedOnly = true;
|
|
654
|
+
const data = await withSpinner('Scanning the system', () => adminCall('admin:seed-status', callArgs));
|
|
655
|
+
if (isJsonMode()) {
|
|
656
|
+
process.stdout.write(JSON.stringify(data, null, 2) + '\n');
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
renderSeedStatusReport(data);
|
|
660
|
+
outro('Done');
|
|
250
661
|
});
|
|
251
662
|
seed
|
|
252
663
|
.command('run')
|
|
@@ -254,19 +665,18 @@ export function attachSeedCommands(seed) {
|
|
|
254
665
|
.argument('<name>', 'e.g. knowledge or seed:knowledge')
|
|
255
666
|
.option('--dry-run', 'Pass dryRun when supported', false)
|
|
256
667
|
.option('--workspace-id <id>', 'Workspace id for workspace-scoped seeds')
|
|
257
|
-
.option('--preset-id <id>', 'Required for methodology-preset')
|
|
258
668
|
.option('--confirm', 'Non-interactive prod acknowledgment for dangerous ops', false)
|
|
259
669
|
.action(async (name, options) => {
|
|
260
|
-
const { siteUrl } =
|
|
670
|
+
const { siteUrl } = resolveAdminConfig();
|
|
261
671
|
const manifestName = normalizeSeedCommandName(name);
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (isProd) {
|
|
672
|
+
const needsConfirm = requiresAdminDestructiveConfirmation(siteUrl);
|
|
673
|
+
// Remote / prod deployments require confirmation — not local or known dev-cloud.
|
|
674
|
+
if (needsConfirm) {
|
|
266
675
|
const ok = await confirmProdAction({
|
|
267
676
|
confirm: options.confirm,
|
|
268
677
|
isProduction: true,
|
|
269
|
-
message:
|
|
678
|
+
message: seedRunConfirmMessage(siteUrl, manifestName),
|
|
679
|
+
noteTitle: confirmRiskNoteTitle(siteUrl),
|
|
270
680
|
});
|
|
271
681
|
if (!ok) {
|
|
272
682
|
process.stderr.write('Cancelled.\n');
|
|
@@ -274,36 +684,192 @@ export function attachSeedCommands(seed) {
|
|
|
274
684
|
return;
|
|
275
685
|
}
|
|
276
686
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
687
|
+
if (!isJsonMode()) {
|
|
688
|
+
adminBanner(siteUrl);
|
|
689
|
+
intro(`seed:${shortLabel(manifestName)}`);
|
|
690
|
+
}
|
|
691
|
+
const data = await withSpinner(`Running ${manifestName}`, () => runSeedOperation(manifestName, {
|
|
280
692
|
workspaceId: options.workspaceId,
|
|
281
693
|
dryRun: options.dryRun,
|
|
282
|
-
presetId: options.presetId,
|
|
283
694
|
}));
|
|
284
695
|
if (isJsonMode()) {
|
|
285
696
|
process.stdout.write(JSON.stringify({ command: manifestName, data }, null, 2) + '\n');
|
|
697
|
+
return;
|
|
286
698
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
699
|
+
const summaryLines = data && typeof data === 'object'
|
|
700
|
+
? Object.entries(data)
|
|
701
|
+
.map(([k, v]) => `${k}: ${typeof v === 'object' ? JSON.stringify(v) : String(v)}`)
|
|
702
|
+
.slice(0, 8)
|
|
703
|
+
.join('\n')
|
|
704
|
+
: String(data ?? 'No response data');
|
|
705
|
+
note(summaryLines || 'No response data', manifestName);
|
|
706
|
+
outro('Complete');
|
|
707
|
+
});
|
|
708
|
+
// ─── WP-379 S5a: Starter Setup subcommands ─────────────────────────────────
|
|
709
|
+
seed
|
|
710
|
+
.command('show-starter')
|
|
711
|
+
.description('List 18 Starter Setup assets for a workspace with body previews, lockLevel, and gate summary')
|
|
712
|
+
.option('--workspace-id <id>', 'Workspace id (required; defaults to session workspace when set)')
|
|
713
|
+
.action(async (options) => {
|
|
714
|
+
const wsId = requireWorkspaceId(options.workspaceId);
|
|
715
|
+
const { siteUrl } = resolveAdminConfig();
|
|
716
|
+
if (!isJsonMode()) {
|
|
717
|
+
adminBanner(siteUrl);
|
|
718
|
+
intro('seed:show-starter');
|
|
719
|
+
}
|
|
720
|
+
const data = await withSpinner('Fetching starter assets', () => adminCall('seed:show-starter', { workspaceId: wsId }));
|
|
721
|
+
if (isJsonMode()) {
|
|
722
|
+
process.stdout.write(JSON.stringify(data, null, 2) + '\n');
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
const assets = Array.isArray(data?.assets) ? data.assets : [];
|
|
726
|
+
if (assets.length === 0) {
|
|
727
|
+
note('No platform-seeded assets found. Run: pb admin seed run backfill-starter', 'show-starter');
|
|
728
|
+
outro('Done');
|
|
729
|
+
return;
|
|
290
730
|
}
|
|
731
|
+
const wIdx = assets.length.toString().length + 2;
|
|
732
|
+
const wId = Math.max(10, ...assets.map((a) => a.entryId.length));
|
|
733
|
+
const wLock = 10;
|
|
734
|
+
const wGate = 24;
|
|
735
|
+
process.stdout.write(`${bold(`${'#'.padEnd(wIdx)}${' '}${'Entry ID'.padEnd(wId)} ${'Lock'.padEnd(wLock)} ${'Gate'.padEnd(wGate)} Name / Preview`)}\n`);
|
|
736
|
+
process.stdout.write(dim('─'.repeat(wIdx + wId + wLock + wGate + 40)) + '\n');
|
|
737
|
+
assets.forEach((asset, i) => {
|
|
738
|
+
const idx = `${i + 1}.`.padEnd(wIdx);
|
|
739
|
+
const entryId = cyan(asset.entryId.padEnd(wId));
|
|
740
|
+
const lock = dim((asset.lockLevel ?? '—').padEnd(wLock));
|
|
741
|
+
const gateStr = asset.gate
|
|
742
|
+
? asset.gate.kind === 'always'
|
|
743
|
+
? 'always'
|
|
744
|
+
: `readiness[${asset.gate.min ?? '0'}–${asset.gate.max ?? '100'}]`
|
|
745
|
+
: '—';
|
|
746
|
+
const gate = dim(gateStr.padEnd(wGate));
|
|
747
|
+
const preview = dim(asset.bodyPreview.slice(0, 60));
|
|
748
|
+
process.stdout.write(`${idx} ${entryId} ${lock} ${gate} ${bold(asset.name)} ${preview}\n`);
|
|
749
|
+
});
|
|
750
|
+
process.stdout.write('\n');
|
|
751
|
+
note(`${assets.length} / 18 starter assets seeded`, 'show-starter');
|
|
752
|
+
outro('Done');
|
|
291
753
|
});
|
|
754
|
+
seed
|
|
755
|
+
.command('backfill-starter')
|
|
756
|
+
.description('Idempotent bulk seed of Starter Setup bundle across workspaces (dry-run by default)')
|
|
757
|
+
.option('--all', 'Required: acknowledge you intend to act on all workspaces in scope', false)
|
|
758
|
+
.option('--dry-run', 'Preview what would be seeded without writing anything (default behavior)', false)
|
|
759
|
+
.option('--workspace-scope <scope>', 'Required when --confirm is passed: dev | prod | all')
|
|
760
|
+
.option('--confirm', 'Execute seeds (requires --all and --workspace-scope)', false)
|
|
761
|
+
.action(async (options) => {
|
|
762
|
+
const { siteUrl } = resolveAdminConfig();
|
|
763
|
+
// CLI-side guard: --confirm requires --all
|
|
764
|
+
if (options.confirm && !options.all) {
|
|
765
|
+
process.stderr.write(red('Error: --confirm requires --all. Pass --all to acknowledge you intend to act on all workspaces in scope.\n'));
|
|
766
|
+
process.exitCode = 1;
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
// Validate args and enforce scope gate via shared helper (also used by tests)
|
|
770
|
+
let callArgs;
|
|
771
|
+
try {
|
|
772
|
+
callArgs = buildBackfillStarterArgs({
|
|
773
|
+
confirm: options.confirm,
|
|
774
|
+
dryRun: options.dryRun,
|
|
775
|
+
workspaceScope: options.workspaceScope,
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
catch (e) {
|
|
779
|
+
process.stderr.write(red(`Error: ${e instanceof Error ? e.message : String(e)}\n`));
|
|
780
|
+
process.exitCode = 1;
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
const isConfirm = options.confirm;
|
|
784
|
+
const isDryRun = callArgs.dryRun;
|
|
785
|
+
// Production acknowledgment for destructive confirm path
|
|
786
|
+
const needsConfirm = requiresAdminDestructiveConfirmation(siteUrl);
|
|
787
|
+
if (isConfirm && needsConfirm) {
|
|
788
|
+
const ok = await confirmProdAction({
|
|
789
|
+
confirm: options.confirm,
|
|
790
|
+
isProduction: true,
|
|
791
|
+
message: `Seed Starter Setup across ALL workspaces (scope: ${options.workspaceScope ?? 'all'}) on ${siteUrl}`,
|
|
792
|
+
noteTitle: confirmRiskNoteTitle(siteUrl),
|
|
793
|
+
});
|
|
794
|
+
if (!ok) {
|
|
795
|
+
process.stderr.write('Cancelled.\n');
|
|
796
|
+
process.exitCode = 1;
|
|
797
|
+
return;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
if (!isJsonMode()) {
|
|
801
|
+
adminBanner(siteUrl);
|
|
802
|
+
intro(`seed:backfill-starter (${isDryRun ? 'DRY RUN' : 'EXECUTE'})`);
|
|
803
|
+
}
|
|
804
|
+
const result = await withSpinner(isDryRun ? 'Running dry-run scan' : 'Seeding workspaces', () => adminCall('seed:backfill-starter', callArgs));
|
|
805
|
+
if (isJsonMode()) {
|
|
806
|
+
process.stdout.write(JSON.stringify(result, null, 2) + '\n');
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
// Per-workspace progress
|
|
810
|
+
const rows = Array.isArray(result?.rows) ? result.rows : [];
|
|
811
|
+
for (const row of rows) {
|
|
812
|
+
const statusIcon = row.status === 'seeded' ? green(icons.pass) :
|
|
813
|
+
row.status === 'already-seeded' ? dim(icons.dot) :
|
|
814
|
+
row.status === 'errored' ? red(icons.fail) :
|
|
815
|
+
dim(icons.dot);
|
|
816
|
+
const detail = row.detail ? dim(` ${row.detail}`) : '';
|
|
817
|
+
process.stdout.write(` ${statusIcon} ${bold(row.workspaceName)}${detail}\n`);
|
|
818
|
+
}
|
|
819
|
+
// Summary
|
|
820
|
+
const summaryLines = [
|
|
821
|
+
`Total workspaces: ${result.totalWorkspaces}`,
|
|
822
|
+
result.seededCount > 0 ? `${green(icons.pass)} Seeded: ${result.seededCount}` : null,
|
|
823
|
+
result.alreadySeededCount > 0 ? `${dim(icons.dot)} Already seeded: ${result.alreadySeededCount}` : null,
|
|
824
|
+
result.skippedCount > 0 ? `${dim(icons.dot)} Skipped (dry-run): ${result.skippedCount}` : null,
|
|
825
|
+
`Scope: ${result.workspaceScope}`,
|
|
826
|
+
result.dryRun ? dim('(dry-run — no writes performed)') : green('(writes executed)'),
|
|
827
|
+
].filter(Boolean).join('\n');
|
|
828
|
+
note(summaryLines, 'backfill-starter');
|
|
829
|
+
outro('Done');
|
|
830
|
+
});
|
|
831
|
+
seed
|
|
832
|
+
.command('migrate-starter-fields')
|
|
833
|
+
.description('STUB (WP-379 S5b): backfill explicit lockLevel + gate columns on existing setup-assets entries')
|
|
834
|
+
.option('--workspace-id <id>', 'Workspace id (required; defaults to session workspace when set)')
|
|
835
|
+
.option('--dry-run', 'Preview changes without writing (default in stub)', false)
|
|
836
|
+
.action(async (options) => {
|
|
837
|
+
const wsId = requireWorkspaceId(options.workspaceId);
|
|
838
|
+
const { siteUrl } = resolveAdminConfig();
|
|
839
|
+
if (!isJsonMode()) {
|
|
840
|
+
adminBanner(siteUrl);
|
|
841
|
+
intro('seed:migrate-starter-fields');
|
|
842
|
+
}
|
|
843
|
+
const result = await withSpinner('Calling migrate-starter-fields', () => adminCall('seed:migrate-starter-fields', { workspaceId: wsId, dryRun: options.dryRun }));
|
|
844
|
+
if (isJsonMode()) {
|
|
845
|
+
process.stdout.write(JSON.stringify({ command: 'seed:migrate-starter-fields', data: result }, null, 2) + '\n');
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
const summaryLines = [
|
|
849
|
+
`Migrated: ${result.migrated}`,
|
|
850
|
+
`Skipped: ${result.skipped}`,
|
|
851
|
+
`Dry-run: ${result.dryRun}`,
|
|
852
|
+
result.note ? dim(result.note) : null,
|
|
853
|
+
].filter(Boolean).join('\n');
|
|
854
|
+
note(summaryLines, 'migrate-starter-fields');
|
|
855
|
+
outro('Done');
|
|
856
|
+
});
|
|
857
|
+
// ─── End WP-379 S5a Starter Setup subcommands ───────────────────────────────
|
|
292
858
|
seed
|
|
293
859
|
.command('all')
|
|
294
|
-
.description('Run all seed operations in manifest order
|
|
860
|
+
.description('Run all seed operations in manifest order')
|
|
295
861
|
.option('--workspace-id <id>', 'Workspace id for workspace-scoped seeds')
|
|
296
|
-
.option('--preset-id <id>', 'If set, runs seed:methodology-preset with this preset')
|
|
297
862
|
.option('--dry-run', 'Pass dryRun to operations that support it', false)
|
|
298
863
|
.option('--confirm', 'Required in production (non-interactive)', false)
|
|
299
864
|
.action(async (options) => {
|
|
300
|
-
const { siteUrl } =
|
|
301
|
-
const
|
|
302
|
-
if (
|
|
865
|
+
const { siteUrl } = resolveAdminConfig();
|
|
866
|
+
const needsConfirm = requiresAdminDestructiveConfirmation(siteUrl);
|
|
867
|
+
if (needsConfirm) {
|
|
303
868
|
const ok = await confirmProdAction({
|
|
304
869
|
confirm: options.confirm,
|
|
305
870
|
isProduction: true,
|
|
306
|
-
message:
|
|
871
|
+
message: seedAllConfirmMessage(siteUrl),
|
|
872
|
+
noteTitle: confirmRiskNoteTitle(siteUrl),
|
|
307
873
|
});
|
|
308
874
|
if (!ok) {
|
|
309
875
|
process.stderr.write('Cancelled.\n');
|
|
@@ -311,52 +877,67 @@ export function attachSeedCommands(seed) {
|
|
|
311
877
|
return;
|
|
312
878
|
}
|
|
313
879
|
}
|
|
314
|
-
adminBanner(siteUrl);
|
|
315
880
|
const results = [];
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
881
|
+
// ── JSON mode: silent execution, structured output ────────────────────
|
|
882
|
+
if (isJsonMode()) {
|
|
883
|
+
for (const cmd of SEED_MANIFEST_ORDER) {
|
|
884
|
+
try {
|
|
885
|
+
const args = buildSeedArgs(cmd, { workspaceId: options.workspaceId, dryRun: options.dryRun });
|
|
886
|
+
await adminCall(toBackendCommand(cmd), args);
|
|
887
|
+
results.push({ command: cmd, ok: true });
|
|
888
|
+
}
|
|
889
|
+
catch (e) {
|
|
890
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
891
|
+
results.push({ command: cmd, ok: false, error: msg });
|
|
892
|
+
break;
|
|
326
893
|
}
|
|
327
|
-
continue;
|
|
328
894
|
}
|
|
895
|
+
if (results.some((r) => !r.ok))
|
|
896
|
+
process.exitCode = 1;
|
|
897
|
+
process.stdout.write(JSON.stringify({ results }, null, 2) + '\n');
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
// ── Human mode: spinner per operation + finale summary panel ─────────
|
|
901
|
+
adminBanner(siteUrl);
|
|
902
|
+
intro('Seed All Operations');
|
|
903
|
+
const total = SEED_MANIFEST_ORDER.length;
|
|
904
|
+
let current = 0;
|
|
905
|
+
const startMs = Date.now();
|
|
906
|
+
const s = clack.spinner();
|
|
907
|
+
for (const cmd of SEED_MANIFEST_ORDER) {
|
|
908
|
+
current++;
|
|
909
|
+
const label = shortLabel(cmd);
|
|
910
|
+
s.start(`${current}/${total} ${label}`);
|
|
329
911
|
try {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
dryRun: options.dryRun,
|
|
334
|
-
presetId: options.presetId,
|
|
335
|
-
});
|
|
336
|
-
await adminCall(cmd, args);
|
|
337
|
-
});
|
|
912
|
+
const args = buildSeedArgs(cmd, { workspaceId: options.workspaceId, dryRun: options.dryRun });
|
|
913
|
+
await adminCall(toBackendCommand(cmd), args);
|
|
914
|
+
s.stop(`${green(icons.pass)} ${label}`);
|
|
338
915
|
results.push({ command: cmd, ok: true });
|
|
339
|
-
if (!isJsonMode()) {
|
|
340
|
-
process.stdout.write(`${green(icons.pass)} ${cmd}\n`);
|
|
341
|
-
}
|
|
342
916
|
}
|
|
343
917
|
catch (e) {
|
|
344
918
|
const msg = e instanceof Error ? e.message : String(e);
|
|
919
|
+
s.stop(`${red(icons.fail)} ${label} — ${msg}`);
|
|
345
920
|
results.push({ command: cmd, ok: false, error: msg });
|
|
346
|
-
if (!isJsonMode()) {
|
|
347
|
-
process.stdout.write(`${red(icons.fail)} ${cmd} — ${msg}\n`);
|
|
348
|
-
}
|
|
349
921
|
break;
|
|
350
922
|
}
|
|
351
923
|
}
|
|
352
|
-
|
|
924
|
+
const elapsed = ((Date.now() - startMs) / 1000).toFixed(1);
|
|
925
|
+
const passed = results.filter((r) => r.ok && !r.skipped).length;
|
|
926
|
+
const skippedCount = results.filter((r) => r.skipped).length;
|
|
927
|
+
const failed = results.filter((r) => !r.ok).length;
|
|
928
|
+
const summaryLines = [
|
|
929
|
+
`${green(icons.pass)} ${passed} succeeded`,
|
|
930
|
+
skippedCount > 0 ? `${dim(icons.dot)} ${skippedCount} skipped` : null,
|
|
931
|
+
failed > 0 ? `${red(icons.fail)} ${failed} failed` : null,
|
|
932
|
+
`${dim(`elapsed: ${elapsed}s`)}`,
|
|
933
|
+
].filter(Boolean).join('\n');
|
|
934
|
+
note(summaryLines, `${passed + skippedCount}/${total} complete`);
|
|
935
|
+
if (failed > 0) {
|
|
353
936
|
process.exitCode = 1;
|
|
354
|
-
|
|
355
|
-
if (isJsonMode()) {
|
|
356
|
-
process.stdout.write(JSON.stringify({ results }, null, 2) + '\n');
|
|
937
|
+
outro('Some operations failed — fix errors and re-run affected seeds individually');
|
|
357
938
|
}
|
|
358
939
|
else {
|
|
359
|
-
|
|
940
|
+
outro(`All ${passed} operations complete in ${elapsed}s`);
|
|
360
941
|
}
|
|
361
942
|
});
|
|
362
943
|
}
|