@productbrain/cli 0.1.0-beta.104 → 0.1.0-beta.1040
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/dist/__tests__/audit.test.js +5 -0
- package/dist/__tests__/audit.test.js.map +1 -1
- 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__/config.test.js +272 -2
- 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__/envelope-contract.test.js +29 -3
- package/dist/__tests__/envelope-contract.test.js.map +1 -1
- package/dist/__tests__/errors.test.js +1 -0
- package/dist/__tests__/errors.test.js.map +1 -1
- 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 +423 -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.js +566 -4
- package/dist/__tests__/handshake-preview.test.js.map +1 -1
- 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 +1252 -0
- package/dist/__tests__/handshake.e2e.test.js.map +1 -0
- package/dist/__tests__/handshake.test.js +255 -5
- package/dist/__tests__/handshake.test.js.map +1 -1
- package/dist/__tests__/manifest.test.js +118 -1
- package/dist/__tests__/manifest.test.js.map +1 -1
- 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 +132 -8
- 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 +1 -2
- package/dist/__tests__/personal-layer.test.d.ts.map +1 -1
- package/dist/__tests__/personal-layer.test.js +12 -48
- package/dist/__tests__/personal-layer.test.js.map +1 -1
- package/dist/__tests__/profiles.test.js +106 -2
- package/dist/__tests__/profiles.test.js.map +1 -1
- package/dist/__tests__/promote.test.js +2 -2
- package/dist/__tests__/promote.test.js.map +1 -1
- package/dist/__tests__/session-state-machine.test.js +45 -1
- package/dist/__tests__/session-state-machine.test.js.map +1 -1
- 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 +129 -0
- package/dist/__tests__/session-switch.test.js.map +1 -0
- package/dist/__tests__/setup-ingest.test.js +16 -0
- package/dist/__tests__/setup-ingest.test.js.map +1 -1
- 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 +187 -0
- package/dist/__tests__/skill-vocabulary.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__/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__/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 +534 -0
- package/dist/__tests__/vocabulary-leak.test.js.map +1 -0
- package/dist/__tests__/workspace.test.js +9 -9
- package/dist/__tests__/workspace.test.js.map +1 -1
- 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__/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/admin/seed.d.ts +32 -2
- package/dist/commands/admin/seed.d.ts.map +1 -1
- package/dist/commands/admin/seed.js +279 -33
- package/dist/commands/admin/seed.js.map +1 -1
- package/dist/commands/admin/seed.test.js +7 -0
- 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 +117 -0
- package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.test.d.ts +11 -0
- package/dist/commands/admin/seedRegistryEntries.test.d.ts.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.test.js +67 -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 +30 -3
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/authority-domains.d.ts +7 -1
- package/dist/commands/authority-domains.d.ts.map +1 -1
- package/dist/commands/authority-domains.js +19 -4
- package/dist/commands/authority-domains.js.map +1 -1
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +5 -3
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/codex-prep.d.ts +1 -0
- package/dist/commands/codex-prep.d.ts.map +1 -1
- package/dist/commands/codex-prep.js +10 -7
- package/dist/commands/codex-prep.js.map +1 -1
- 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 +64 -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 +110 -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 +13 -12
- package/dist/commands/connect-integration.test.js.map +1 -1
- package/dist/commands/connect-screens.d.ts +7 -8
- package/dist/commands/connect-screens.d.ts.map +1 -1
- package/dist/commands/connect-screens.js +30 -37
- package/dist/commands/connect-screens.js.map +1 -1
- package/dist/commands/connect.d.ts +19 -6
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +31 -56
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +68 -3
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +150 -0
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/handshake.d.ts +84 -4
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +1172 -100
- package/dist/commands/handshake.js.map +1 -1
- package/dist/commands/method.d.ts.map +1 -1
- package/dist/commands/method.js +5 -1
- package/dist/commands/method.js.map +1 -1
- package/dist/commands/orient.d.ts +61 -2
- package/dist/commands/orient.d.ts.map +1 -1
- package/dist/commands/orient.js +41 -6
- package/dist/commands/orient.js.map +1 -1
- package/dist/commands/profile.d.ts +1 -14
- package/dist/commands/profile.d.ts.map +1 -1
- package/dist/commands/profile.js +89 -72
- package/dist/commands/profile.js.map +1 -1
- package/dist/commands/reject.d.ts.map +1 -1
- package/dist/commands/reject.js +2 -1
- package/dist/commands/reject.js.map +1 -1
- package/dist/commands/relate.d.ts.map +1 -1
- package/dist/commands/relate.js +4 -2
- package/dist/commands/relate.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +50 -13
- 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.map +1 -1
- package/dist/commands/setup-ingest.js +4 -2
- package/dist/commands/setup-ingest.js.map +1 -1
- 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 +52 -131
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +2 -1
- 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/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +2 -1
- package/dist/commands/verify.js.map +1 -1
- 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 +2 -2
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +1 -1
- package/dist/commands/workspace.js.map +1 -1
- 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 +454 -0
- package/dist/formatters/__tests__/orient-provenance.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/entry.d.ts +21 -0
- package/dist/formatters/entry.d.ts.map +1 -1
- package/dist/formatters/entry.js +46 -5
- package/dist/formatters/entry.js.map +1 -1
- package/dist/formatters/handshake.d.ts +19 -3
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +48 -13
- package/dist/formatters/handshake.js.map +1 -1
- package/dist/formatters/orient.d.ts +79 -4
- package/dist/formatters/orient.d.ts.map +1 -1
- package/dist/formatters/orient.js +119 -18
- package/dist/formatters/orient.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 +76 -0
- package/dist/generators/manifest.d.ts.map +1 -1
- package/dist/generators/manifest.js +125 -14
- package/dist/generators/manifest.js.map +1 -1
- package/dist/generators/portable-knowledge.d.ts +6 -12
- package/dist/generators/portable-knowledge.d.ts.map +1 -1
- package/dist/generators/portable-knowledge.js +2 -19
- package/dist/generators/portable-knowledge.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.js +134 -26
- package/dist/index.js.map +1 -1
- package/dist/lib/activation.d.ts.map +1 -1
- package/dist/lib/activation.js +3 -3
- package/dist/lib/activation.js.map +1 -1
- package/dist/lib/activation.test.js +3 -3
- package/dist/lib/activation.test.js.map +1 -1
- package/dist/lib/canonicalRefs.d.ts +72 -0
- package/dist/lib/canonicalRefs.d.ts.map +1 -1
- package/dist/lib/canonicalRefs.js +67 -0
- package/dist/lib/canonicalRefs.js.map +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +13 -3
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/config.d.ts +70 -4
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +151 -11
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/constants.d.ts +2 -0
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +2 -0
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors.d.ts +1 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +1 -0
- package/dist/lib/errors.js.map +1 -1
- 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 +0 -1
- package/dist/lib/onboarding-path-b.js.map +1 -1
- package/dist/lib/onboarding-shared.d.ts +0 -1
- package/dist/lib/onboarding-shared.d.ts.map +1 -1
- package/dist/lib/onboarding-shared.js +1 -17
- package/dist/lib/onboarding-shared.js.map +1 -1
- package/dist/lib/profiles.d.ts +3 -1
- package/dist/lib/profiles.d.ts.map +1 -1
- package/dist/lib/profiles.js +9 -6
- package/dist/lib/profiles.js.map +1 -1
- package/dist/lib/session.d.ts +10 -0
- package/dist/lib/session.d.ts.map +1 -1
- package/dist/lib/session.js +14 -0
- package/dist/lib/session.js.map +1 -1
- package/dist/lib/update-check.d.ts +42 -7
- package/dist/lib/update-check.d.ts.map +1 -1
- package/dist/lib/update-check.js +213 -62
- package/dist/lib/update-check.js.map +1 -1
- 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/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/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 +58 -2
- package/dist/surfaces/registry.d.ts.map +1 -1
- package/dist/surfaces/registry.js +82 -7
- package/dist/surfaces/registry.js.map +1 -1
- 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 +3 -1
- 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/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,6 +3,10 @@
|
|
|
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
|
*/
|
|
7
11
|
import { Command } from 'commander';
|
|
8
12
|
export type SeedCommandMeta = {
|
|
@@ -18,9 +22,35 @@ export type SeedCommandMeta = {
|
|
|
18
22
|
* Order matches `ADMIN_COMMANDS` seed block in commandManifest.ts — dependency order for `seed all`.
|
|
19
23
|
*/
|
|
20
24
|
export declare const SEED_COMMAND_ENTRIES: readonly SeedCommandMeta[];
|
|
21
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Manifest order for `pb admin seed all`.
|
|
27
|
+
*
|
|
28
|
+
* Includes the static legacy seeds plus the registry-generated runnable entries so
|
|
29
|
+
* `seed all` exercises the full surface (D13 SSOT).
|
|
30
|
+
*/
|
|
22
31
|
export declare const SEED_MANIFEST_ORDER: readonly string[];
|
|
23
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Accept short-form or long-form seed op names; return the canonical backend command name.
|
|
34
|
+
*
|
|
35
|
+
* Static entries (legacy) are stored as `seed:<slug>` (e.g. `seed:knowledge`).
|
|
36
|
+
* Registry-generated entries (WP-433 S1b) are stored as bare slugs (e.g.
|
|
37
|
+
* `seed-system-glossary`) to avoid the double-prefix `seed:seed-*` trap that
|
|
38
|
+
* arose when slugs like `seed-system-glossary` were naively stored as
|
|
39
|
+
* `seed:seed-system-glossary`.
|
|
40
|
+
*
|
|
41
|
+
* Both forms always return the backend command name (`seed:<bare-slug>`):
|
|
42
|
+
* - `'system-glossary'` or `'seed-system-glossary'` → `'seed:seed-system-glossary'`
|
|
43
|
+
* would be wrong; instead the bare slug stored in the map IS `seed-system-glossary`
|
|
44
|
+
* and the backend command is `seed:seed-system-glossary`.
|
|
45
|
+
*
|
|
46
|
+
* Resolution order:
|
|
47
|
+
* 1. Try `seed:<t>` — covers legacy static entries (`seed:knowledge`) and any input
|
|
48
|
+
* that normalises to a key already stored with the `seed:` prefix.
|
|
49
|
+
* 2. Try bare `<t>` (stripping a leading `seed:` from the input if present) —
|
|
50
|
+
* covers registry entries stored without the prefix.
|
|
51
|
+
* When found via bare slug, return `seed:<bare>` so the caller always gets a
|
|
52
|
+
* backend-compatible command name.
|
|
53
|
+
*/
|
|
24
54
|
export declare function normalizeSeedCommandName(input: string): string;
|
|
25
55
|
/**
|
|
26
56
|
* Build args for seed:backfill-starter with CLI-side validation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../src/commands/admin/seed.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../src/commands/admin/seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiCpC,MAAM,MAAM,eAAe,GAAG;IAC5B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,eAAe,EAkHjD,CAAC;AAwBX;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAEhD,CAAC;AAkBF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA4B9D;AAID;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuB1B;AAkBD,wBAAgB,aAAa,CAC3B,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAClE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsCzB;AAuRD,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAikBtD"}
|
|
@@ -3,6 +3,10 @@
|
|
|
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
|
*/
|
|
7
11
|
import * as clack from '@clack/prompts';
|
|
8
12
|
import { adminCall } from '../../lib/client.js';
|
|
@@ -11,9 +15,10 @@ import { CLIError, ErrorCode } from '../../lib/errors.js';
|
|
|
11
15
|
import { ask, confirm, intro, isInteractive, log, multiselect, note, outro } from '../../lib/prompts.js';
|
|
12
16
|
import { readSession } from '../../lib/session.js';
|
|
13
17
|
import { isJsonMode } from '../../lib/runner.js';
|
|
18
|
+
import { REGISTRY_SEED_COMMAND_ENTRIES } from './seedRegistryEntries.generated.js';
|
|
14
19
|
import { confirmRiskNoteTitle, requiresAdminDestructiveConfirmation, seedAllConfirmMessage, seedMultiselectConfirmMessage, seedRunConfirmMessage, } from '../../lib/deployment.js';
|
|
15
20
|
import { withSpinner } from '../../lib/spinner.js';
|
|
16
|
-
import { adminBanner, bold, confirmProdAction, cyan, dim, green, heading, hint, icons, red, } from '../../lib/style.js';
|
|
21
|
+
import { adminBanner, bold, confirmProdAction, cyan, dim, green, heading, hint, icons, red, yellow, } from '../../lib/style.js';
|
|
17
22
|
/**
|
|
18
23
|
* Order matches `ADMIN_COMMANDS` seed block in commandManifest.ts — dependency order for `seed all`.
|
|
19
24
|
*/
|
|
@@ -128,14 +133,70 @@ export const SEED_COMMAND_ENTRIES = [
|
|
|
128
133
|
requiresWorkspaceId: true,
|
|
129
134
|
dryRunSupported: true,
|
|
130
135
|
},
|
|
136
|
+
// WP-433 S1b D13: `seed:migrate-setup-skill-entryid` migrated to the SSOT registry.
|
|
137
|
+
// It now appears via REGISTRY_SEED_COMMAND_ENTRIES below (alongside the 3 new repair ops
|
|
138
|
+
// and `backfill-default-team`).
|
|
139
|
+
];
|
|
140
|
+
// WP-433 S1b D13: registry-generated entries appended to the static list. These are the
|
|
141
|
+
// 11 ops registered in `convex/admin/seed/registry.ts`. Filter out the prestep
|
|
142
|
+
// (`align-workspace-collections`) — it cannot be invoked via `pb admin seed run`.
|
|
143
|
+
const REGISTRY_RUNNABLE_ENTRIES = REGISTRY_SEED_COMMAND_ENTRIES
|
|
144
|
+
.filter((e) => e.runnable)
|
|
145
|
+
.map((e) => ({
|
|
146
|
+
name: e.name,
|
|
147
|
+
description: e.description,
|
|
148
|
+
requiresWorkspaceId: e.requiresWorkspaceId,
|
|
149
|
+
dryRunSupported: e.dryRunSupported,
|
|
150
|
+
}));
|
|
151
|
+
/** Combined list: static manifest entries (legacy seeds) + registry-generated entries. */
|
|
152
|
+
const ALL_SEED_COMMAND_ENTRIES = [
|
|
153
|
+
...SEED_COMMAND_ENTRIES,
|
|
154
|
+
...REGISTRY_RUNNABLE_ENTRIES,
|
|
131
155
|
];
|
|
132
|
-
const SEED_BY_NAME = new Map(
|
|
133
|
-
/**
|
|
134
|
-
|
|
156
|
+
const SEED_BY_NAME = new Map(ALL_SEED_COMMAND_ENTRIES.map((e) => [e.name, e]));
|
|
157
|
+
/**
|
|
158
|
+
* Manifest order for `pb admin seed all`.
|
|
159
|
+
*
|
|
160
|
+
* Includes the static legacy seeds plus the registry-generated runnable entries so
|
|
161
|
+
* `seed all` exercises the full surface (D13 SSOT).
|
|
162
|
+
*/
|
|
163
|
+
export const SEED_MANIFEST_ORDER = ALL_SEED_COMMAND_ENTRIES.map((e) => e.name);
|
|
135
164
|
function shortLabel(manifestName) {
|
|
136
165
|
return manifestName.startsWith('seed:') ? manifestName.slice('seed:'.length) : manifestName;
|
|
137
166
|
}
|
|
138
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* Convert a manifest name (which may be a bare slug for registry-generated entries)
|
|
169
|
+
* to the backend command name expected by the admin dispatch layer.
|
|
170
|
+
*
|
|
171
|
+
* Legacy static entries are already stored as `seed:<slug>` — returned as-is.
|
|
172
|
+
* Registry-generated entries are stored as bare slugs (e.g. `seed-system-glossary`);
|
|
173
|
+
* the backend COMMAND_MAP expects `seed:<slug>`, so we add the prefix here.
|
|
174
|
+
*/
|
|
175
|
+
function toBackendCommand(manifestName) {
|
|
176
|
+
return manifestName.startsWith('seed:') ? manifestName : `seed:${manifestName}`;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Accept short-form or long-form seed op names; return the canonical backend command name.
|
|
180
|
+
*
|
|
181
|
+
* Static entries (legacy) are stored as `seed:<slug>` (e.g. `seed:knowledge`).
|
|
182
|
+
* Registry-generated entries (WP-433 S1b) are stored as bare slugs (e.g.
|
|
183
|
+
* `seed-system-glossary`) to avoid the double-prefix `seed:seed-*` trap that
|
|
184
|
+
* arose when slugs like `seed-system-glossary` were naively stored as
|
|
185
|
+
* `seed:seed-system-glossary`.
|
|
186
|
+
*
|
|
187
|
+
* Both forms always return the backend command name (`seed:<bare-slug>`):
|
|
188
|
+
* - `'system-glossary'` or `'seed-system-glossary'` → `'seed:seed-system-glossary'`
|
|
189
|
+
* would be wrong; instead the bare slug stored in the map IS `seed-system-glossary`
|
|
190
|
+
* and the backend command is `seed:seed-system-glossary`.
|
|
191
|
+
*
|
|
192
|
+
* Resolution order:
|
|
193
|
+
* 1. Try `seed:<t>` — covers legacy static entries (`seed:knowledge`) and any input
|
|
194
|
+
* that normalises to a key already stored with the `seed:` prefix.
|
|
195
|
+
* 2. Try bare `<t>` (stripping a leading `seed:` from the input if present) —
|
|
196
|
+
* covers registry entries stored without the prefix.
|
|
197
|
+
* When found via bare slug, return `seed:<bare>` so the caller always gets a
|
|
198
|
+
* backend-compatible command name.
|
|
199
|
+
*/
|
|
139
200
|
export function normalizeSeedCommandName(input) {
|
|
140
201
|
const t = input.trim();
|
|
141
202
|
if (!t) {
|
|
@@ -144,15 +205,24 @@ export function normalizeSeedCommandName(input) {
|
|
|
144
205
|
category: 'validation',
|
|
145
206
|
});
|
|
146
207
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
208
|
+
// 1. Try the `seed:`-prefixed form (covers all legacy static entries).
|
|
209
|
+
const withPrefix = t.startsWith('seed:') ? t : `seed:${t}`;
|
|
210
|
+
if (SEED_BY_NAME.has(withPrefix))
|
|
211
|
+
return withPrefix;
|
|
212
|
+
// 2. Try the bare-slug form (covers registry-generated entries stored without `seed:`).
|
|
213
|
+
// Strip one leading `seed:` if the input has it, so both
|
|
214
|
+
// `seed-system-glossary` and `seed:seed-system-glossary` resolve to `seed-system-glossary`.
|
|
215
|
+
const bare = t.startsWith('seed:') ? t.slice('seed:'.length) : t;
|
|
216
|
+
if (SEED_BY_NAME.has(bare)) {
|
|
217
|
+
// Return the backend-compatible `seed:` form so callers can pass this directly
|
|
218
|
+
// to adminCall and the backend COMMAND_MAP will find it.
|
|
219
|
+
return `seed:${bare}`;
|
|
154
220
|
}
|
|
155
|
-
|
|
221
|
+
const known = SEED_MANIFEST_ORDER.map((n) => shortLabel(n)).join(', ');
|
|
222
|
+
throw new CLIError(`Unknown seed operation "${input}". Known short names: ${known}`, {
|
|
223
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
224
|
+
category: 'validation',
|
|
225
|
+
});
|
|
156
226
|
}
|
|
157
227
|
// ─── WP-379 S5a: Starter-specific arg builders ───────────────────────────────
|
|
158
228
|
/**
|
|
@@ -193,7 +263,10 @@ function requireWorkspaceId(explicit) {
|
|
|
193
263
|
return id;
|
|
194
264
|
}
|
|
195
265
|
export function buildSeedArgs(manifestName, opts) {
|
|
196
|
-
|
|
266
|
+
// Try exact match first (legacy static entries stored as `seed:<slug>`).
|
|
267
|
+
// Fall back to bare-slug lookup (registry-generated entries stored without `seed:` prefix).
|
|
268
|
+
const bare = manifestName.startsWith('seed:') ? manifestName.slice('seed:'.length) : manifestName;
|
|
269
|
+
const def = SEED_BY_NAME.get(manifestName) ?? SEED_BY_NAME.get(bare);
|
|
197
270
|
if (!def) {
|
|
198
271
|
throw new CLIError(`Unknown seed command: ${manifestName}`, {
|
|
199
272
|
code: ErrorCode.VALIDATION_FAILED,
|
|
@@ -225,7 +298,7 @@ export function buildSeedArgs(manifestName, opts) {
|
|
|
225
298
|
return args;
|
|
226
299
|
}
|
|
227
300
|
function printSeedList() {
|
|
228
|
-
const rows =
|
|
301
|
+
const rows = ALL_SEED_COMMAND_ENTRIES.map((e) => ({
|
|
229
302
|
name: shortLabel(e.name),
|
|
230
303
|
description: e.description,
|
|
231
304
|
workspace: e.requiresWorkspaceId ? 'yes' : 'no',
|
|
@@ -249,7 +322,7 @@ function printSeedList() {
|
|
|
249
322
|
process.stdout.write(`${cyan(r.name.padEnd(wName))} ${r.workspace.padEnd(wWs)} ${dryRunStr} ${dim(r.description)}\n`);
|
|
250
323
|
}
|
|
251
324
|
process.stdout.write('\n');
|
|
252
|
-
hint(`${
|
|
325
|
+
hint(`${ALL_SEED_COMMAND_ENTRIES.length} operations — behavior enforced server-side (commandManifest.ts + WP-433 S1b registry)`);
|
|
253
326
|
hint('pb admin seed run <name> Run one operation');
|
|
254
327
|
hint('pb admin seed all Run all in manifest order');
|
|
255
328
|
}
|
|
@@ -288,13 +361,153 @@ async function runSeedOperation(manifestName, opts) {
|
|
|
288
361
|
const args = buildSeedArgs(manifestName, opts);
|
|
289
362
|
return adminCall(manifestName, args);
|
|
290
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* WP-433 S1b D16 — render the system/fleet seed status report.
|
|
366
|
+
*
|
|
367
|
+
* Frame: this is a system-admin (operator) command. Output never says "your workspace" —
|
|
368
|
+
* always "the system" / "X workspaces" / a specific named workspace.
|
|
369
|
+
*/
|
|
370
|
+
function renderSeedStatusReport(data) {
|
|
371
|
+
if (!data || typeof data !== 'object') {
|
|
372
|
+
process.stdout.write(`${dim('No data returned.')}\n`);
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const report = data;
|
|
376
|
+
const mode = report.mode;
|
|
377
|
+
if (mode === 'fleet') {
|
|
378
|
+
const summary = report.summary;
|
|
379
|
+
const failures = report.failures ?? [];
|
|
380
|
+
process.stdout.write(`${bold(`System: ${summary.total} workspace${summary.total === 1 ? '' : 's'} total`)}\n\n`);
|
|
381
|
+
process.stdout.write(` ${green(icons.pass)} ${summary.healthy} healthy (all assertions passed)\n`);
|
|
382
|
+
if (summary.failed > 0) {
|
|
383
|
+
process.stdout.write(` ${red(icons.fail)} ${summary.failed} with failed assertions\n`);
|
|
384
|
+
}
|
|
385
|
+
if (summary.neverRun > 0) {
|
|
386
|
+
process.stdout.write(` ${dim('!')} ${summary.neverRun} with never-run ops (likely created pre-registry)\n`);
|
|
387
|
+
}
|
|
388
|
+
if (failures.length === 0) {
|
|
389
|
+
process.stdout.write(`\n${dim('No failures or never-run ops to report.')}\n`);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
// Group failures by status for readable output.
|
|
393
|
+
const failedRows = failures.filter((f) => f.status === 'failed');
|
|
394
|
+
const neverRunRows = failures.filter((f) => f.status === 'never-run');
|
|
395
|
+
if (failedRows.length > 0) {
|
|
396
|
+
process.stdout.write(`\n${red('Failures:')}\n`);
|
|
397
|
+
for (const f of failedRows) {
|
|
398
|
+
process.stdout.write(` - ${cyan(`workspace-${f.workspaceId}`)} (${bold(f.workspaceName)}) — ${f.slug}: ${f.detail}\n`);
|
|
399
|
+
if (f.recommendedRepairOp) {
|
|
400
|
+
process.stdout.write(` repair: ${dim(`pb admin seed run ${f.recommendedRepairOp} --workspace-id ${f.workspaceId}`)}\n`);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
if (neverRunRows.length > 0) {
|
|
405
|
+
process.stdout.write(`\n${dim('Never-run ops:')}\n`);
|
|
406
|
+
for (const f of neverRunRows) {
|
|
407
|
+
process.stdout.write(` - ${cyan(`workspace-${f.workspaceId}`)} (${bold(f.workspaceName)}) — ${f.slug} never invoked\n`);
|
|
408
|
+
if (f.recommendedRepairOp) {
|
|
409
|
+
process.stdout.write(` repair: ${dim(`pb admin seed run ${f.recommendedRepairOp} --workspace-id ${f.workspaceId}`)}\n`);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
if (mode === 'drilldown') {
|
|
416
|
+
const workspaceName = report.workspaceName;
|
|
417
|
+
const workspaceId = report.workspaceId;
|
|
418
|
+
const rows = report.rows ?? [];
|
|
419
|
+
if (rows.length === 0) {
|
|
420
|
+
process.stdout.write(`${bold(`Workspace: ${workspaceName}`)} ${dim(`(${workspaceId})`)}\n\n`);
|
|
421
|
+
process.stdout.write(`${dim('No registered ops.')}\n`);
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
// TEN-2021: group by level so non-tech operators don't conflate
|
|
425
|
+
// platform-substrate ops with on-demand repair tools.
|
|
426
|
+
const levelBySlug = new Map(REGISTRY_SEED_COMMAND_ENTRIES.map((e) => [e.name, e.level]));
|
|
427
|
+
const platformRows = rows.filter((r) => levelBySlug.get(r.slug) === 'platform');
|
|
428
|
+
const workspaceRows = rows.filter((r) => levelBySlug.get(r.slug) === 'workspace');
|
|
429
|
+
const repairRows = rows.filter((r) => levelBySlug.get(r.slug) === 'repair');
|
|
430
|
+
// TEN-2019 known soft-failure: platform-source workspace has no curated
|
|
431
|
+
// methods/skills entries to project. Not a workspace bug — render as ⚠.
|
|
432
|
+
const PLATFORM_SOURCE_EMPTY_MARKER = 'neither methods nor skills collection found';
|
|
433
|
+
const isPlatformSourceEmptyRow = (r) => r.status === 'failed' && r.detail.includes(PLATFORM_SOURCE_EMPTY_MARKER);
|
|
434
|
+
// ── Header: workspace identity + at-a-glance health summary ────────────────
|
|
435
|
+
const isSeedRow = (r) => {
|
|
436
|
+
const lvl = levelBySlug.get(r.slug);
|
|
437
|
+
return lvl === 'platform' || lvl === 'workspace';
|
|
438
|
+
};
|
|
439
|
+
const seedRows = rows.filter(isSeedRow);
|
|
440
|
+
const passCount = seedRows.filter((r) => r.status === 'passed').length;
|
|
441
|
+
const warnCount = seedRows.filter(isPlatformSourceEmptyRow).length;
|
|
442
|
+
const failCount = seedRows.filter((r) => r.status === 'failed' && !isPlatformSourceEmptyRow(r)).length;
|
|
443
|
+
process.stdout.write(`${bold('Workspace:')} ${workspaceName}\n`);
|
|
444
|
+
process.stdout.write(`${bold('ID:')} ${dim(workspaceId)}\n`);
|
|
445
|
+
process.stdout.write(`${bold('Health:')} ${green(`${passCount} ${icons.pass}`)} ${yellow(`${warnCount} ⚠`)} ${red(`${failCount} ${icons.fail}`)}\n\n`);
|
|
446
|
+
// ── Row renderer: only show detail on ⚠ / ✗ via indented sub-line ──────────
|
|
447
|
+
const renderRow = (r) => {
|
|
448
|
+
const isWarn = isPlatformSourceEmptyRow(r);
|
|
449
|
+
const icon = isWarn ? yellow('⚠')
|
|
450
|
+
: r.status === 'passed' ? green(icons.pass)
|
|
451
|
+
: r.status === 'failed' ? red(icons.fail)
|
|
452
|
+
: dim('-');
|
|
453
|
+
process.stdout.write(` ${icon} ${cyan(r.slug)}\n`);
|
|
454
|
+
// Detail sub-line only for genuine signals (⚠ or ✗). ✓ and "-" are noise.
|
|
455
|
+
if (isWarn) {
|
|
456
|
+
process.stdout.write(` ${dim('└─ Platform-curated content not yet published (TEN-2019).')}\n`);
|
|
457
|
+
}
|
|
458
|
+
else if (r.status === 'failed') {
|
|
459
|
+
const cleaned = r.detail.replace(new RegExp(`^${r.slug} assertion failed:\\s*`), '');
|
|
460
|
+
process.stdout.write(` ${dim(`└─ ${cleaned}`)}\n`);
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
if (platformRows.length > 0) {
|
|
464
|
+
process.stdout.write(`${bold('Seeded on workspace creation')}\n`);
|
|
465
|
+
process.stdout.write(`${dim('Runs automatically when a new workspace is created.')}\n\n`);
|
|
466
|
+
for (const r of platformRows)
|
|
467
|
+
renderRow(r);
|
|
468
|
+
process.stdout.write('\n');
|
|
469
|
+
}
|
|
470
|
+
if (workspaceRows.length > 0) {
|
|
471
|
+
process.stdout.write(`${bold('Owner-level defaults')}\n`);
|
|
472
|
+
process.stdout.write(`${dim('Per-workspace state seeded for the owner.')}\n\n`);
|
|
473
|
+
for (const r of workspaceRows)
|
|
474
|
+
renderRow(r);
|
|
475
|
+
process.stdout.write('\n');
|
|
476
|
+
}
|
|
477
|
+
if (repairRows.length > 0) {
|
|
478
|
+
process.stdout.write(`${bold('Repair commands (manual)')}\n`);
|
|
479
|
+
process.stdout.write(`${dim('Used to fix older or drifted workspaces. Usually nothing to do.')}\n\n`);
|
|
480
|
+
for (const r of repairRows)
|
|
481
|
+
renderRow(r);
|
|
482
|
+
}
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
if (mode === 'op-filter') {
|
|
486
|
+
const slug = report.slug;
|
|
487
|
+
const rows = report.rows ?? [];
|
|
488
|
+
process.stdout.write(`${bold(`Op: ${slug}`)} ${dim(`(${rows.length} workspace${rows.length === 1 ? '' : 's'})`)}\n\n`);
|
|
489
|
+
if (rows.length === 0) {
|
|
490
|
+
process.stdout.write(`${dim('Op not found in registry, or no workspaces exist.')}\n`);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
for (const r of rows) {
|
|
494
|
+
const icon = r.status === 'passed' ? green(icons.pass)
|
|
495
|
+
: r.status === 'failed' ? red(icons.fail)
|
|
496
|
+
: dim('-');
|
|
497
|
+
const detail = r.detail ? ` ${dim(r.detail)}` : '';
|
|
498
|
+
process.stdout.write(` ${icon} ${cyan(`workspace-${r.workspaceId}`)} (${bold(r.workspaceName)})${detail}\n`);
|
|
499
|
+
}
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
process.stdout.write(`${dim('Unknown report mode.')}\n`);
|
|
503
|
+
}
|
|
291
504
|
/** Attach seed subcommands to the `seed` Commander node. */
|
|
292
505
|
export function attachSeedCommands(seed) {
|
|
293
506
|
// Default action when `pb admin seed` is invoked with no subcommand.
|
|
294
507
|
seed.action(async () => {
|
|
295
508
|
if (isJsonMode()) {
|
|
296
509
|
process.stdout.write(JSON.stringify({
|
|
297
|
-
operations:
|
|
510
|
+
operations: ALL_SEED_COMMAND_ENTRIES.map((e) => ({
|
|
298
511
|
name: shortLabel(e.name),
|
|
299
512
|
requiresWorkspaceId: e.requiresWorkspaceId,
|
|
300
513
|
dryRunSupported: e.dryRunSupported,
|
|
@@ -313,7 +526,7 @@ export function attachSeedCommands(seed) {
|
|
|
313
526
|
if (isInteractive()) {
|
|
314
527
|
intro('Seed Operations');
|
|
315
528
|
// methodology-preset needs --preset-id, not suitable for interactive menu
|
|
316
|
-
const menuEntries =
|
|
529
|
+
const menuEntries = ALL_SEED_COMMAND_ENTRIES.filter((e) => e.name !== 'seed:methodology-preset');
|
|
317
530
|
const selected = await multiselect({
|
|
318
531
|
message: 'Select operations to run (space to toggle, enter to confirm):',
|
|
319
532
|
options: menuEntries.map((e) => ({
|
|
@@ -363,7 +576,7 @@ export function attachSeedCommands(seed) {
|
|
|
363
576
|
try {
|
|
364
577
|
await withSpinner(`Running ${shortLabel(name)}`, async () => {
|
|
365
578
|
const args = buildSeedArgs(name, { workspaceId });
|
|
366
|
-
await adminCall(name, args);
|
|
579
|
+
await adminCall(toBackendCommand(name), args);
|
|
367
580
|
});
|
|
368
581
|
results.push({ name, ok: true });
|
|
369
582
|
}
|
|
@@ -389,23 +602,23 @@ export function attachSeedCommands(seed) {
|
|
|
389
602
|
return;
|
|
390
603
|
}
|
|
391
604
|
// Non-interactive (non-JSON) fallback — existing static preview
|
|
392
|
-
process.stdout.write(`${heading('Seed operations')} ${dim(`(${
|
|
605
|
+
process.stdout.write(`${heading('Seed operations')} ${dim(`(${ALL_SEED_COMMAND_ENTRIES.length})`)}\n\n`);
|
|
393
606
|
// Show first 6 entries as a preview
|
|
394
|
-
const preview =
|
|
607
|
+
const preview = ALL_SEED_COMMAND_ENTRIES.slice(0, 6);
|
|
395
608
|
const wName = Math.max(...preview.map((e) => shortLabel(e.name).length));
|
|
396
609
|
for (const e of preview) {
|
|
397
610
|
const label = shortLabel(e.name);
|
|
398
611
|
const flags = e.dryRunSupported ? dim(' dry-run ✓') : '';
|
|
399
612
|
process.stdout.write(` ${cyan(label.padEnd(wName))} ${dim(e.description)}${flags}\n`);
|
|
400
613
|
}
|
|
401
|
-
if (
|
|
402
|
-
process.stdout.write(` ${dim(`... ${
|
|
614
|
+
if (ALL_SEED_COMMAND_ENTRIES.length > 6) {
|
|
615
|
+
process.stdout.write(` ${dim(`... ${ALL_SEED_COMMAND_ENTRIES.length - 6} more — run pb admin seed list`)}\n`);
|
|
403
616
|
}
|
|
404
617
|
process.stdout.write('\n');
|
|
405
618
|
process.stdout.write(` ${cyan('pb admin seed list')} ${dim('Full list with workspace + dry-run flags')}\n`);
|
|
406
619
|
process.stdout.write(` ${cyan('pb admin seed run <name>')} ${dim('Run one operation')}\n`);
|
|
407
620
|
process.stdout.write(` ${cyan('pb admin seed all')} ${dim('Run all in manifest order')}\n`);
|
|
408
|
-
process.stdout.write(` ${cyan('pb admin seed status')} ${dim('
|
|
621
|
+
process.stdout.write(` ${cyan('pb admin seed status')} ${dim('Fleet-wide seed health (system admin)')}\n`);
|
|
409
622
|
process.stdout.write('\n');
|
|
410
623
|
});
|
|
411
624
|
seed
|
|
@@ -414,22 +627,56 @@ export function attachSeedCommands(seed) {
|
|
|
414
627
|
.action(() => {
|
|
415
628
|
printSeedList();
|
|
416
629
|
});
|
|
630
|
+
// WP-433 S1b D16 — fleet-wide seed status (system-admin command).
|
|
631
|
+
// Default behaviour: scan ALL workspaces in the deployment and report summary + failures.
|
|
632
|
+
// `--workspace-id <id>` drilldown flag triages a single workspace.
|
|
633
|
+
// `--op <slug>` fleet view filtered to one op.
|
|
634
|
+
// `--failed-only` fleet view skipping healthy workspaces.
|
|
635
|
+
// `--legacy-readiness` falls back to the pre-S1b workspace-readiness signals view.
|
|
417
636
|
seed
|
|
418
637
|
.command('status')
|
|
419
|
-
.description('
|
|
420
|
-
|
|
638
|
+
.description('WP-433 S1b D16: Fleet-wide seed health (system admin). Default scans ALL workspaces. ' +
|
|
639
|
+
'Use --workspace-id to drill down, --op to filter one op, --failed-only for failures only.')
|
|
640
|
+
.option('--workspace-id <id>', 'Drill down to one workspace (operator triage)')
|
|
641
|
+
.option('--op <slug>', 'Filter fleet view to one op slug')
|
|
642
|
+
.option('--failed-only', 'Skip healthy workspaces; show failures only', false)
|
|
643
|
+
.option('--legacy-readiness', 'Use pre-S1b workspace readiness signals view', false)
|
|
421
644
|
.action(async (options) => {
|
|
645
|
+
if (options.legacyReadiness) {
|
|
646
|
+
if (!isJsonMode()) {
|
|
647
|
+
try {
|
|
648
|
+
adminBanner(resolveAdminConfig().siteUrl);
|
|
649
|
+
}
|
|
650
|
+
catch { /* not configured */ }
|
|
651
|
+
intro('Seed: status (legacy readiness)');
|
|
652
|
+
}
|
|
653
|
+
await printSeedStatus(options.workspaceId);
|
|
654
|
+
if (!isJsonMode()) {
|
|
655
|
+
outro('Read-only status check complete');
|
|
656
|
+
}
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
422
659
|
if (!isJsonMode()) {
|
|
423
660
|
try {
|
|
424
661
|
adminBanner(resolveAdminConfig().siteUrl);
|
|
425
662
|
}
|
|
426
663
|
catch { /* not configured */ }
|
|
427
|
-
intro('Seed
|
|
664
|
+
intro('Seed status — system / fleet view');
|
|
428
665
|
}
|
|
429
|
-
|
|
430
|
-
if (
|
|
431
|
-
|
|
666
|
+
const callArgs = {};
|
|
667
|
+
if (options.workspaceId)
|
|
668
|
+
callArgs.workspaceId = options.workspaceId;
|
|
669
|
+
if (options.op)
|
|
670
|
+
callArgs.opSlug = options.op;
|
|
671
|
+
if (options.failedOnly)
|
|
672
|
+
callArgs.failedOnly = true;
|
|
673
|
+
const data = await withSpinner('Scanning the system', () => adminCall('admin:seed-status', callArgs));
|
|
674
|
+
if (isJsonMode()) {
|
|
675
|
+
process.stdout.write(JSON.stringify(data, null, 2) + '\n');
|
|
676
|
+
return;
|
|
432
677
|
}
|
|
678
|
+
renderSeedStatusReport(data);
|
|
679
|
+
outro('Done');
|
|
433
680
|
});
|
|
434
681
|
seed
|
|
435
682
|
.command('run')
|
|
@@ -442,7 +689,6 @@ export function attachSeedCommands(seed) {
|
|
|
442
689
|
.action(async (name, options) => {
|
|
443
690
|
const { siteUrl } = resolveAdminConfig();
|
|
444
691
|
const manifestName = normalizeSeedCommandName(name);
|
|
445
|
-
const meta = SEED_BY_NAME.get(manifestName);
|
|
446
692
|
const needsConfirm = requiresAdminDestructiveConfirmation(siteUrl);
|
|
447
693
|
// Remote / prod deployments require confirmation — not local or known dev-cloud.
|
|
448
694
|
if (needsConfirm) {
|
|
@@ -663,7 +909,7 @@ export function attachSeedCommands(seed) {
|
|
|
663
909
|
}
|
|
664
910
|
try {
|
|
665
911
|
const args = buildSeedArgs(cmd, { workspaceId: options.workspaceId, dryRun: options.dryRun, presetId: options.presetId });
|
|
666
|
-
await adminCall(cmd, args);
|
|
912
|
+
await adminCall(toBackendCommand(cmd), args);
|
|
667
913
|
results.push({ command: cmd, ok: true });
|
|
668
914
|
}
|
|
669
915
|
catch (e) {
|
|
@@ -695,7 +941,7 @@ export function attachSeedCommands(seed) {
|
|
|
695
941
|
s.start(`${current}/${total} ${label}`);
|
|
696
942
|
try {
|
|
697
943
|
const args = buildSeedArgs(cmd, { workspaceId: options.workspaceId, dryRun: options.dryRun, presetId: options.presetId });
|
|
698
|
-
await adminCall(cmd, args);
|
|
944
|
+
await adminCall(toBackendCommand(cmd), args);
|
|
699
945
|
s.stop(`${green(icons.pass)} ${label}`);
|
|
700
946
|
results.push({ command: cmd, ok: true });
|
|
701
947
|
}
|