@productbrain/cli 0.1.0-beta.27 → 0.1.0-beta.2707
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 +72 -172
- 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 +645 -40
- 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 +8 -0
- package/dist/__tests__/config.test.d.ts.map +1 -0
- package/dist/__tests__/config.test.js +566 -0
- package/dist/__tests__/config.test.js.map +1 -0
- package/dist/__tests__/constants.test.d.ts +2 -0
- package/dist/__tests__/constants.test.d.ts.map +1 -0
- package/dist/__tests__/constants.test.js +146 -0
- package/dist/__tests__/constants.test.js.map +1 -0
- package/dist/__tests__/constellation.test.js +16 -22
- 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.d.ts +2 -0
- package/dist/__tests__/errors.test.d.ts.map +1 -0
- package/dist/__tests__/errors.test.js +125 -0
- package/dist/__tests__/errors.test.js.map +1 -0
- package/dist/__tests__/experiment.test.d.ts +6 -0
- package/dist/__tests__/experiment.test.d.ts.map +1 -0
- package/dist/__tests__/experiment.test.js +69 -0
- package/dist/__tests__/experiment.test.js.map +1 -0
- package/dist/__tests__/fields.test.js +36 -36
- package/dist/__tests__/fields.test.js.map +1 -1
- package/dist/__tests__/glossary.test.d.ts +2 -0
- package/dist/__tests__/glossary.test.d.ts.map +1 -0
- package/dist/__tests__/glossary.test.js +32 -0
- package/dist/__tests__/glossary.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 +796 -19
- 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__/init.test.d.ts +7 -0
- package/dist/__tests__/init.test.d.ts.map +1 -0
- package/dist/__tests__/init.test.js +146 -0
- package/dist/__tests__/init.test.js.map +1 -0
- package/dist/__tests__/login.test.d.ts +2 -0
- package/dist/__tests__/login.test.d.ts.map +1 -0
- package/dist/__tests__/login.test.js +167 -0
- package/dist/__tests__/login.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.d.ts +2 -0
- package/dist/__tests__/onboarding-path-b.test.d.ts.map +1 -0
- package/dist/__tests__/onboarding-path-b.test.js +46 -0
- package/dist/__tests__/onboarding-path-b.test.js.map +1 -0
- package/dist/__tests__/onboarding.test.d.ts +6 -0
- package/dist/__tests__/onboarding.test.d.ts.map +1 -0
- package/dist/__tests__/onboarding.test.js +347 -0
- package/dist/__tests__/onboarding.test.js.map +1 -0
- package/dist/__tests__/orient.test.js +485 -11
- 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.d.ts +2 -0
- package/dist/__tests__/profiles.test.d.ts.map +1 -0
- package/dist/__tests__/profiles.test.js +320 -0
- package/dist/__tests__/profiles.test.js.map +1 -0
- 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 +297 -40
- package/dist/__tests__/promote.test.js.map +1 -1
- package/dist/__tests__/prompts.test.d.ts +6 -0
- package/dist/__tests__/prompts.test.d.ts.map +1 -0
- package/dist/__tests__/prompts.test.js +146 -0
- package/dist/__tests__/prompts.test.js.map +1 -0
- 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 +24 -47
- package/dist/__tests__/proposals.test.js.map +1 -1
- package/dist/__tests__/relate.test.js +34 -36
- package/dist/__tests__/relate.test.js.map +1 -1
- package/dist/__tests__/runner.test.js +19 -15
- package/dist/__tests__/runner.test.js.map +1 -1
- 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 +11 -11
- package/dist/__tests__/session-touch.test.js.map +1 -1
- package/dist/__tests__/session.test.js +4 -10
- 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__/spinner-labels.test.d.ts +2 -0
- package/dist/__tests__/spinner-labels.test.d.ts.map +1 -0
- package/dist/__tests__/spinner-labels.test.js +23 -0
- package/dist/__tests__/spinner-labels.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 +88 -81
- 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.d.ts +2 -0
- package/dist/__tests__/workspace.test.d.ts.map +1 -0
- package/dist/__tests__/workspace.test.js +328 -0
- package/dist/__tests__/workspace.test.js.map +1 -0
- 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__/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 +10 -6
- package/dist/commands/accept.js.map +1 -1
- package/dist/commands/admin/cockpit.d.ts +90 -0
- package/dist/commands/admin/cockpit.d.ts.map +1 -0
- package/dist/commands/admin/cockpit.js +618 -0
- package/dist/commands/admin/cockpit.js.map +1 -0
- package/dist/commands/admin/index.d.ts +21 -0
- package/dist/commands/admin/index.d.ts.map +1 -0
- package/dist/commands/admin/index.js +256 -0
- package/dist/commands/admin/index.js.map +1 -0
- package/dist/commands/admin/inspect.d.ts +30 -0
- package/dist/commands/admin/inspect.d.ts.map +1 -0
- package/dist/commands/admin/inspect.js +555 -0
- package/dist/commands/admin/inspect.js.map +1 -0
- package/dist/commands/admin/inspect.test.d.ts +7 -0
- package/dist/commands/admin/inspect.test.d.ts.map +1 -0
- package/dist/commands/admin/inspect.test.js +90 -0
- package/dist/commands/admin/inspect.test.js.map +1 -0
- 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/seed.d.ts +75 -0
- package/dist/commands/admin/seed.d.ts.map +1 -0
- package/dist/commands/admin/seed.js +944 -0
- package/dist/commands/admin/seed.js.map +1 -0
- package/dist/commands/admin/seed.test.d.ts +11 -0
- package/dist/commands/admin/seed.test.d.ts.map +1 -0
- package/dist/commands/admin/seed.test.js +127 -0
- package/dist/commands/admin/seed.test.js.map +1 -0
- 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 +14 -5
- package/dist/commands/brief.js.map +1 -1
- package/dist/commands/capture.d.ts +9 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +295 -76
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chain-walk.d.ts.map +1 -1
- package/dist/commands/chain-walk.js +8 -3
- package/dist/commands/chain-walk.js.map +1 -1
- package/dist/commands/changes.d.ts.map +1 -1
- package/dist/commands/changes.js +8 -3
- 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 +25 -87
- package/dist/commands/codex-prep.js.map +1 -1
- package/dist/commands/collections.d.ts +22 -0
- package/dist/commands/collections.d.ts.map +1 -0
- package/dist/commands/collections.js +77 -0
- package/dist/commands/collections.js.map +1 -0
- package/dist/commands/conflicts.d.ts +10 -0
- package/dist/commands/conflicts.d.ts.map +1 -0
- package/dist/commands/conflicts.js +103 -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 +97 -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.d.ts +7 -0
- package/dist/commands/connect-integration.test.d.ts.map +1 -0
- package/dist/commands/connect-integration.test.js +219 -0
- package/dist/commands/connect-integration.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 +42 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +339 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/connect.test.d.ts +6 -0
- package/dist/commands/connect.test.d.ts.map +1 -0
- package/dist/commands/connect.test.js +380 -0
- package/dist/commands/connect.test.js.map +1 -0
- package/dist/commands/constellation.d.ts.map +1 -1
- package/dist/commands/constellation.js +8 -3
- package/dist/commands/constellation.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +8 -3
- 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/doctor.d.ts +18 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +297 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/doctor.test.d.ts +8 -0
- package/dist/commands/doctor.test.d.ts.map +1 -0
- package/dist/commands/doctor.test.js +461 -0
- package/dist/commands/doctor.test.js.map +1 -0
- package/dist/commands/feedback.d.ts +20 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +146 -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 +98 -0
- package/dist/commands/feedback.test.js.map +1 -0
- package/dist/commands/fields.d.ts.map +1 -1
- package/dist/commands/fields.js +8 -4
- 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.d.ts.map +1 -1
- package/dist/commands/get.js +14 -6
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/handshake.d.ts +227 -2
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +2175 -80
- package/dist/commands/handshake.js.map +1 -1
- package/dist/commands/ingest.d.ts.map +1 -1
- package/dist/commands/ingest.js +26 -9
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +109 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +101 -38
- 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/orient.d.ts +121 -2
- package/dist/commands/orient.d.ts.map +1 -1
- package/dist/commands/orient.js +222 -7
- package/dist/commands/orient.js.map +1 -1
- package/dist/commands/profile.d.ts +34 -0
- package/dist/commands/profile.d.ts.map +1 -0
- package/dist/commands/profile.js +170 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/commands/promote.d.ts +12 -1
- package/dist/commands/promote.d.ts.map +1 -1
- package/dist/commands/promote.js +246 -55
- 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/reject.d.ts.map +1 -1
- package/dist/commands/reject.js +14 -7
- package/dist/commands/reject.js.map +1 -1
- package/dist/commands/relate.d.ts.map +1 -1
- package/dist/commands/relate.js +55 -17
- package/dist/commands/relate.js.map +1 -1
- 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 +55 -2
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +485 -45
- 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 +23 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +69 -0
- package/dist/commands/setup.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 +76 -49
- 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 +19 -7
- 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 +115 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +263 -0
- package/dist/commands/workspace.js.map +1 -0
- 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 +113 -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/collections.d.ts +40 -0
- package/dist/formatters/collections.d.ts.map +1 -0
- package/dist/formatters/collections.js +93 -0
- package/dist/formatters/collections.js.map +1 -0
- package/dist/formatters/conflicts.d.ts +44 -0
- package/dist/formatters/conflicts.d.ts.map +1 -0
- package/dist/formatters/conflicts.js +44 -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 +83 -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/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 +35 -0
- package/dist/formatters/feedback.d.ts.map +1 -0
- package/dist/formatters/feedback.js +53 -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 +52 -0
- package/dist/formatters/feedback.test.js.map +1 -0
- package/dist/formatters/handshake.d.ts +44 -0
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +142 -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 +245 -4
- package/dist/formatters/orient.d.ts.map +1 -1
- package/dist/formatters/orient.js +302 -25
- 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/promote.d.ts +43 -0
- package/dist/formatters/promote.d.ts.map +1 -1
- package/dist/formatters/promote.js +32 -0
- package/dist/formatters/promote.js.map +1 -1
- package/dist/formatters/relate.d.ts +2 -0
- package/dist/formatters/relate.d.ts.map +1 -1
- package/dist/formatters/relate.js +3 -0
- package/dist/formatters/relate.js.map +1 -1
- package/dist/formatters/scoreboard.d.ts +11 -0
- package/dist/formatters/scoreboard.d.ts.map +1 -0
- package/dist/formatters/scoreboard.js +107 -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 +144 -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 +49 -0
- package/dist/formatters/session-feedback.test.js.map +1 -0
- package/dist/formatters/session.d.ts +101 -1
- package/dist/formatters/session.d.ts.map +1 -1
- package/dist/formatters/session.js +272 -9
- package/dist/formatters/session.js.map +1 -1
- 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/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 +52 -0
- package/dist/generators/archetypes.d.ts.map +1 -0
- package/dist/generators/archetypes.js +190 -0
- package/dist/generators/archetypes.js.map +1 -0
- package/dist/generators/archetypes.test.d.ts +2 -0
- package/dist/generators/archetypes.test.d.ts.map +1 -0
- package/dist/generators/archetypes.test.js +272 -0
- package/dist/generators/archetypes.test.js.map +1 -0
- 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 +102 -0
- package/dist/generators/chain-classifier.d.ts.map +1 -0
- package/dist/generators/chain-classifier.js +52 -0
- package/dist/generators/chain-classifier.js.map +1 -0
- package/dist/generators/chain-rules.d.ts +42 -0
- package/dist/generators/chain-rules.d.ts.map +1 -0
- package/dist/generators/chain-rules.js +256 -0
- package/dist/generators/chain-rules.js.map +1 -0
- package/dist/generators/chain-rules.test.d.ts +2 -0
- package/dist/generators/chain-rules.test.d.ts.map +1 -0
- package/dist/generators/chain-rules.test.js +448 -0
- package/dist/generators/chain-rules.test.js.map +1 -0
- package/dist/generators/context-md.d.ts +1 -1
- package/dist/generators/context-md.d.ts.map +1 -1
- package/dist/generators/context-md.js +18 -7
- package/dist/generators/context-md.js.map +1 -1
- package/dist/generators/handshake-diff.d.ts +67 -0
- package/dist/generators/handshake-diff.d.ts.map +1 -0
- package/dist/generators/handshake-diff.js +183 -0
- package/dist/generators/handshake-diff.js.map +1 -0
- package/dist/generators/handshake-diff.test.d.ts +2 -0
- package/dist/generators/handshake-diff.test.d.ts.map +1 -0
- package/dist/generators/handshake-diff.test.js +264 -0
- package/dist/generators/handshake-diff.test.js.map +1 -0
- 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.js +837 -261
- 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 +19 -0
- package/dist/lib/__tests__/parseFields.test.js.map +1 -0
- package/dist/lib/activation.d.ts +28 -0
- package/dist/lib/activation.d.ts.map +1 -0
- package/dist/lib/activation.js +61 -0
- package/dist/lib/activation.js.map +1 -0
- package/dist/lib/activation.test.d.ts +6 -0
- package/dist/lib/activation.test.d.ts.map +1 -0
- package/dist/lib/activation.test.js +121 -0
- package/dist/lib/activation.test.js.map +1 -0
- 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 +36 -6
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +234 -45
- 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/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 +204 -4
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +594 -42
- 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 +46 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +83 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/conversation-engine.d.ts +45 -0
- package/dist/lib/conversation-engine.d.ts.map +1 -0
- package/dist/lib/conversation-engine.js +112 -0
- package/dist/lib/conversation-engine.js.map +1 -0
- package/dist/lib/conversation-phases.d.ts +59 -0
- package/dist/lib/conversation-phases.d.ts.map +1 -0
- package/dist/lib/conversation-phases.js +11 -0
- package/dist/lib/conversation-phases.js.map +1 -0
- package/dist/lib/conversation-signals.d.ts +30 -0
- package/dist/lib/conversation-signals.d.ts.map +1 -0
- package/dist/lib/conversation-signals.js +64 -0
- package/dist/lib/conversation-signals.js.map +1 -0
- 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/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 +104 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +113 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/experiment.d.ts +18 -0
- package/dist/lib/experiment.d.ts.map +1 -0
- package/dist/lib/experiment.js +28 -0
- package/dist/lib/experiment.js.map +1 -0
- package/dist/lib/format.d.ts +10 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +27 -0
- package/dist/lib/format.js.map +1 -0
- 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/glossary.d.ts +19 -0
- package/dist/lib/glossary.d.ts.map +1 -0
- package/dist/lib/glossary.js +53 -0
- package/dist/lib/glossary.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/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 +10 -0
- package/dist/lib/onboarding-path-b.d.ts.map +1 -0
- package/dist/lib/onboarding-path-b.js +243 -0
- package/dist/lib/onboarding-path-b.js.map +1 -0
- package/dist/lib/onboarding-shared.d.ts +81 -0
- package/dist/lib/onboarding-shared.d.ts.map +1 -0
- package/dist/lib/onboarding-shared.js +175 -0
- package/dist/lib/onboarding-shared.js.map +1 -0
- package/dist/lib/onboarding-topics.d.ts +27 -0
- package/dist/lib/onboarding-topics.d.ts.map +1 -0
- package/dist/lib/onboarding-topics.js +57 -0
- package/dist/lib/onboarding-topics.js.map +1 -0
- package/dist/lib/onboarding.d.ts +17 -0
- package/dist/lib/onboarding.d.ts.map +1 -0
- package/dist/lib/onboarding.js +350 -0
- package/dist/lib/onboarding.js.map +1 -0
- package/dist/lib/parseFields.d.ts +6 -0
- package/dist/lib/parseFields.d.ts.map +1 -0
- package/dist/lib/parseFields.js +30 -0
- package/dist/lib/parseFields.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 +41 -0
- package/dist/lib/profiles.d.ts.map +1 -0
- package/dist/lib/profiles.js +188 -0
- package/dist/lib/profiles.js.map +1 -0
- package/dist/lib/prompts.d.ts +65 -0
- package/dist/lib/prompts.d.ts.map +1 -0
- package/dist/lib/prompts.js +132 -0
- package/dist/lib/prompts.js.map +1 -0
- package/dist/lib/runner.d.ts +10 -0
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +44 -7
- 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/spinner.d.ts +27 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +76 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/spinner.test.d.ts +2 -0
- package/dist/lib/spinner.test.d.ts.map +1 -0
- package/dist/lib/spinner.test.js +39 -0
- package/dist/lib/spinner.test.js.map +1 -0
- 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 +118 -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 +96 -0
- package/dist/lib/style.d.ts.map +1 -0
- package/dist/lib/style.js +169 -0
- package/dist/lib/style.js.map +1 -0
- package/dist/lib/style.test.d.ts +7 -0
- package/dist/lib/style.test.d.ts.map +1 -0
- package/dist/lib/style.test.js +263 -0
- package/dist/lib/style.test.js.map +1 -0
- package/dist/lib/telemetry.d.ts +15 -0
- package/dist/lib/telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry.js +47 -0
- package/dist/lib/telemetry.js.map +1 -0
- 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/wizard-surfaces.d.ts +47 -0
- package/dist/lib/wizard-surfaces.d.ts.map +1 -0
- package/dist/lib/wizard-surfaces.js +176 -0
- package/dist/lib/wizard-surfaces.js.map +1 -0
- package/dist/lib/wizard-surfaces.test.d.ts +2 -0
- package/dist/lib/wizard-surfaces.test.d.ts.map +1 -0
- package/dist/lib/wizard-surfaces.test.js +127 -0
- package/dist/lib/wizard-surfaces.test.js.map +1 -0
- package/dist/lib/wizard-trust.d.ts +31 -0
- package/dist/lib/wizard-trust.d.ts.map +1 -0
- package/dist/lib/wizard-trust.js +66 -0
- package/dist/lib/wizard-trust.js.map +1 -0
- package/dist/lib/wizard-trust.test.d.ts +2 -0
- package/dist/lib/wizard-trust.test.d.ts.map +1 -0
- package/dist/lib/wizard-trust.test.js +32 -0
- package/dist/lib/wizard-trust.test.js.map +1 -0
- package/dist/lib/workspace-probe.d.ts +19 -0
- package/dist/lib/workspace-probe.d.ts.map +1 -0
- package/dist/lib/workspace-probe.js +27 -0
- package/dist/lib/workspace-probe.js.map +1 -0
- 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 +266 -0
- package/dist/scoreboard/diagnose.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.js +274 -0
- package/dist/scoreboard/diagnose.js.map +1 -0
- package/dist/scoreboard/diagnose.test.d.ts +14 -0
- package/dist/scoreboard/diagnose.test.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.test.js +266 -0
- package/dist/scoreboard/diagnose.test.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 +12 -4
- package/templates/archetypes/boundary.md +23 -0
- package/templates/archetypes/constraint.md +23 -0
- package/templates/archetypes/convention.md +23 -0
- package/templates/archetypes/policy.md +23 -0
- package/templates/archetypes/quality-gate.md +23 -0
- package/templates/archetypes/workflow.md +23 -0
- package/templates/method-registry.json +16 -0
- 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/index.js
CHANGED
|
@@ -7,17 +7,25 @@
|
|
|
7
7
|
import { readFileSync } from 'node:fs';
|
|
8
8
|
import { dirname, join } from 'node:path';
|
|
9
9
|
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import { Command } from 'commander';
|
|
10
|
+
import { Command, CommanderError } from 'commander';
|
|
11
11
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
12
|
const cliPackageVersion = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
|
|
13
|
-
import { setOutputMode } from './lib/runner.js';
|
|
13
|
+
import { setOutputMode, setQuietMode, isJsonMode } from './lib/runner.js';
|
|
14
|
+
import { CLIError, ErrorCode } from './lib/errors.js';
|
|
14
15
|
import { runContext } from './commands/context.js';
|
|
15
16
|
import { runGet, runGetMany } from './commands/get.js';
|
|
17
|
+
import { runScoreboard } from './commands/scoreboard.js';
|
|
18
|
+
import { runReworkReport } from './commands/rework.js';
|
|
19
|
+
import { runConnect } from './commands/connect.js';
|
|
16
20
|
import { runLogin } from './commands/login.js';
|
|
21
|
+
import { runSetup } from './commands/setup.js';
|
|
22
|
+
import { runSetupDetectSurfaces, formatDetectSurfacesSummary } from './commands/setup-detect-surfaces.js';
|
|
23
|
+
import { runSetupState } from './commands/setup-state.js';
|
|
24
|
+
import { runSetupAudit } from './commands/setup-audit.js';
|
|
17
25
|
import { runOrient } from './commands/orient.js';
|
|
18
26
|
import { runSearch } from './commands/search.js';
|
|
19
27
|
import { runHandshake, runHandshakeInit } from './commands/handshake.js';
|
|
20
|
-
import { runSessionStart, runSessionClose, runSessionId } from './commands/session.js';
|
|
28
|
+
import { runSessionStart, runSessionClose, runSessionId, runSessionReset, runSessionList, runSessionShow } from './commands/session.js';
|
|
21
29
|
import { runCapture } from './commands/capture.js';
|
|
22
30
|
import { runUpdate } from './commands/update.js';
|
|
23
31
|
import { runRelate, runUnrelate } from './commands/relate.js';
|
|
@@ -36,16 +44,135 @@ import { runCrossCut } from './commands/cross-cut.js';
|
|
|
36
44
|
import { runBrief, runCompoundBrief, isCompoundType } from './commands/brief.js';
|
|
37
45
|
import { runVerify } from './commands/verify.js';
|
|
38
46
|
import { runCodexPrep } from './commands/codex-prep.js';
|
|
47
|
+
import { runCollectionsList, runCollectionsGet, runCollectionsAudit, runCollectionsExport } from './commands/collections.js';
|
|
48
|
+
import { runWorkspaceVerify, runWorkspaceRepair, runDefinitionsDiff } from './commands/workspace.js';
|
|
49
|
+
import { runAuthorityDomainsActivateCutover, runAuthorityDomainsAdd, runAuthorityDomainsDeactivateCutover, runAuthorityDomainsBenchmark, runAuthorityDomainsDiscardPending, runAuthorityDomainsPropose, runAuthorityDomainsQueueTag, runAuthorityDomainsRatify, runAuthorityDomainsReadiness, runAuthorityDomainsRecordSample, runAuthorityDomainsReject, runAuthorityDomainsReview, runAuthorityDomainsPrincipleDistribution, } from './commands/authority-domains.js';
|
|
50
|
+
import { runDoctor } from './commands/doctor.js';
|
|
51
|
+
import { runWhoami } from './commands/whoami.js';
|
|
52
|
+
import { runFiles } from './commands/files.js';
|
|
53
|
+
import { runUpgrade } from './commands/upgrade.js';
|
|
54
|
+
import { runProfileList, runProfileCreate, runProfileUse, runProfileDelete } from './commands/profile.js';
|
|
55
|
+
import { runInit } from './commands/init.js';
|
|
56
|
+
import { runMethodList, runMethodShow, runMethodDiff, runMethodPublish } from './commands/method.js';
|
|
57
|
+
import { createAdminCommand } from './commands/admin/index.js';
|
|
58
|
+
import { createFeedbackCommand } from './commands/feedback.js';
|
|
59
|
+
import { createConflictsCommand } from './commands/conflicts.js';
|
|
60
|
+
import { runUsage } from './commands/usage.js';
|
|
61
|
+
import { runProofRun } from './commands/proof-run.js';
|
|
62
|
+
import { GLOSSARY, formatGlossary } from './lib/glossary.js';
|
|
63
|
+
import { API_KEY_PREFIX } from './lib/tokenConstants.js';
|
|
64
|
+
import { hint, heading, bold, dim, green, icons, yellow } from './lib/style.js';
|
|
65
|
+
import { getPreviewBinding } from './lib/config.js';
|
|
66
|
+
import { checkForUpdate } from './lib/update-check.js';
|
|
67
|
+
import { UPGRADE_COMMAND } from './lib/constants.js';
|
|
68
|
+
import { resolveSetupState, detectRenderTier } from './lib/state.js';
|
|
39
69
|
const program = new Command();
|
|
70
|
+
/**
|
|
71
|
+
* Top-level Chain-write commands that receive the throwaway-writes advisory in
|
|
72
|
+
* addition to the PREVIEW banner. Each is registered directly on `program`, so
|
|
73
|
+
* `actionCommand.name()` matches verbatim. We gate on top-level (parent === program)
|
|
74
|
+
* to avoid false positives from nested commands whose leaf name collides
|
|
75
|
+
* (e.g. `pb workspace verify`, which is a health check, not a Chain write).
|
|
76
|
+
*/
|
|
77
|
+
const PREVIEW_WRITE_COMMANDS = new Set([
|
|
78
|
+
'capture',
|
|
79
|
+
'update',
|
|
80
|
+
'verify',
|
|
81
|
+
'promote',
|
|
82
|
+
'relate',
|
|
83
|
+
'unrelate',
|
|
84
|
+
'ingest',
|
|
85
|
+
'accept',
|
|
86
|
+
'reject',
|
|
87
|
+
]);
|
|
88
|
+
/**
|
|
89
|
+
* Print a loud PREVIEW banner to stderr when pb is bound to a throwaway preview.
|
|
90
|
+
*
|
|
91
|
+
* Writes to stderr (NOT stdout) so stdout stays clean JSON for agents — and so the
|
|
92
|
+
* banner appears even when --json or --quiet are set, which is the whole point: the
|
|
93
|
+
* agent must see it every time. Cheap + synchronous (one file read). Never throws.
|
|
94
|
+
*
|
|
95
|
+
* For every Chain-write command (see PREVIEW_WRITE_COMMANDS), also writes an
|
|
96
|
+
* advisory reminding the user that real learnings belong in the real Chain.
|
|
97
|
+
*/
|
|
98
|
+
function printPreviewBanner(actionCommand) {
|
|
99
|
+
try {
|
|
100
|
+
const binding = getPreviewBinding();
|
|
101
|
+
if (!binding)
|
|
102
|
+
return;
|
|
103
|
+
const name = binding.workspaceName ?? 'preview';
|
|
104
|
+
process.stderr.write(yellow(bold(`⚠ PREVIEW ${name} — writes are throwaway. npm run pb:real to return to the real Chain`)) + '\n');
|
|
105
|
+
const isTopLevel = actionCommand.parent?.name() === 'pb';
|
|
106
|
+
if (isTopLevel && PREVIEW_WRITE_COMMANDS.has(actionCommand.name())) {
|
|
107
|
+
process.stderr.write(` → real learnings belong in the real Chain. Switch back with: npm run pb:real\n`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
// Never let the banner crash the CLI
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Global error handler — single exit point for all CLI errors.
|
|
116
|
+
* CLIError: format with code + category + guidance.
|
|
117
|
+
* CommanderError: re-throw for --help / --version (exitCode 0), format others.
|
|
118
|
+
* Regular Error: wrap as INTERNAL.
|
|
119
|
+
*/
|
|
120
|
+
function handleError(err) {
|
|
121
|
+
// Commander help/version exits with code 0 — let them through
|
|
122
|
+
if (err instanceof CommanderError && err.exitCode === 0) {
|
|
123
|
+
process.exit(0);
|
|
124
|
+
}
|
|
125
|
+
const json = isJsonMode();
|
|
126
|
+
if (err instanceof CLIError) {
|
|
127
|
+
if (json) {
|
|
128
|
+
process.stderr.write(JSON.stringify(err.toJSON()) + '\n');
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
process.stderr.write(err.message + '\n');
|
|
132
|
+
if (err.guidance) {
|
|
133
|
+
process.stderr.write(err.guidance + '\n');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
// CommanderError (bad usage, missing args, etc.)
|
|
139
|
+
if (err instanceof CommanderError) {
|
|
140
|
+
const cliErr = new CLIError(err.message, {
|
|
141
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
142
|
+
category: 'validation',
|
|
143
|
+
});
|
|
144
|
+
if (json) {
|
|
145
|
+
process.stderr.write(JSON.stringify(cliErr.toJSON()) + '\n');
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
process.stderr.write(err.message + '\n');
|
|
149
|
+
}
|
|
150
|
+
process.exit(err.exitCode);
|
|
151
|
+
}
|
|
152
|
+
// Unknown / unstructured errors
|
|
153
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
154
|
+
if (json) {
|
|
155
|
+
process.stderr.write(JSON.stringify({ error: message, code: 'INTERNAL', category: 'internal' }) + '\n');
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
process.stderr.write(message + '\n');
|
|
159
|
+
}
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
40
162
|
program
|
|
41
163
|
.name('pb')
|
|
42
164
|
.description('Product Brain — Chain knowledge + write-back CLI')
|
|
43
165
|
.version(cliPackageVersion.version)
|
|
44
166
|
// Global output mode flags (DEC-299, BET-181)
|
|
45
167
|
.option('--json', 'Output machine-readable JSON (overrides TTY auto-detection)')
|
|
46
|
-
.option('--pretty', 'Force human-readable output even when piped')
|
|
168
|
+
.option('--pretty', 'Force human-readable output even when piped')
|
|
169
|
+
.option('-q, --quiet', 'Suppress non-essential output (banners, hints, progress)')
|
|
170
|
+
.exitOverride(); // Throw CommanderError instead of calling process.exit directly
|
|
47
171
|
// Apply global output mode BEFORE subcommand actions run
|
|
48
|
-
|
|
172
|
+
// Commander preAction hook signature: (hookedCommand, actionCommand)
|
|
173
|
+
// hookedCommand = the command where hook was registered (root program)
|
|
174
|
+
// actionCommand = the subcommand actually being invoked
|
|
175
|
+
program.hook('preAction', (_hookedCommand, actionCommand) => {
|
|
49
176
|
const globalOpts = program.opts();
|
|
50
177
|
if (globalOpts.json) {
|
|
51
178
|
setOutputMode('json');
|
|
@@ -54,7 +181,128 @@ program.hook('preAction', (thisCommand) => {
|
|
|
54
181
|
setOutputMode('pretty');
|
|
55
182
|
}
|
|
56
183
|
// else: 'auto' (default) — TTY detection handles it
|
|
57
|
-
|
|
184
|
+
if (globalOpts.quiet) {
|
|
185
|
+
setQuietMode(true);
|
|
186
|
+
}
|
|
187
|
+
// Ambient update notification — non-blocking, suppressed in JSON mode (WP-322 S1)
|
|
188
|
+
checkForUpdate(cliPackageVersion.version);
|
|
189
|
+
// PREVIEW banner — writes to stderr so it's always visible even in --json/--quiet mode.
|
|
190
|
+
// Advisory line added for top-level Chain-write commands: real learnings belong in the real Chain.
|
|
191
|
+
printPreviewBanner(actionCommand);
|
|
192
|
+
});
|
|
193
|
+
// Default action — status dashboard when `pb` is invoked with no command.
|
|
194
|
+
// `pb --help` still works because Commander intercepts --help before the action runs.
|
|
195
|
+
program.action(async () => {
|
|
196
|
+
// Alias handling — forward common shorthands before showing the welcome screen
|
|
197
|
+
if (program.args.length > 0) {
|
|
198
|
+
const args = program.args;
|
|
199
|
+
// `pb start` / `pb start session` → `pb session start`
|
|
200
|
+
if (args[0] === 'start') {
|
|
201
|
+
await runSessionStart();
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
// `pb close` / `pb close session` → `pb session close`
|
|
205
|
+
if (args[0] === 'close') {
|
|
206
|
+
await runSessionClose({});
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
// Unknown command — show a helpful error instead of the welcome screen
|
|
210
|
+
const unknown = args[0];
|
|
211
|
+
process.stderr.write(`error: unknown command '${unknown}'\n`);
|
|
212
|
+
process.stderr.write(`Run 'pb --help' to see available commands.\n`);
|
|
213
|
+
process.exit(1);
|
|
214
|
+
}
|
|
215
|
+
const tier = detectRenderTier();
|
|
216
|
+
// JSON tier — structured status output
|
|
217
|
+
if (tier === 'json') {
|
|
218
|
+
// Check for API key first (sync, no network)
|
|
219
|
+
let hasKey = false;
|
|
220
|
+
try {
|
|
221
|
+
const { getConfig: gc } = await import('./lib/config.js');
|
|
222
|
+
gc();
|
|
223
|
+
hasKey = true;
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
// No valid key
|
|
227
|
+
}
|
|
228
|
+
if (!hasKey) {
|
|
229
|
+
process.stdout.write(JSON.stringify({
|
|
230
|
+
configured: false,
|
|
231
|
+
hint: 'Run pb login to configure your API key.',
|
|
232
|
+
}) + '\n');
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const { readSession } = await import('./lib/session.js');
|
|
236
|
+
const { probeWorkspace } = await import('./lib/workspace-probe.js');
|
|
237
|
+
const session = readSession();
|
|
238
|
+
const wsInfo = await probeWorkspace();
|
|
239
|
+
process.stdout.write(JSON.stringify({
|
|
240
|
+
configured: true,
|
|
241
|
+
workspace: wsInfo?.name ?? null,
|
|
242
|
+
session: session ? { id: session.sessionId, startedAt: session.startedAt } : null,
|
|
243
|
+
entryCount: wsInfo?.entryCount ?? null,
|
|
244
|
+
hint: 'Run pb --help for available commands.',
|
|
245
|
+
}) + '\n');
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
// Ink tier: suppress withSpinner output before Ink mounts — spinner writes pollute the TUI canvas
|
|
249
|
+
if (tier === 'ink')
|
|
250
|
+
setQuietMode(true);
|
|
251
|
+
// Resolve state (plain and ink both need it)
|
|
252
|
+
const state = await resolveSetupState();
|
|
253
|
+
// Plain tier — console output driven by state
|
|
254
|
+
if (tier === 'plain') {
|
|
255
|
+
process.stdout.write('\n');
|
|
256
|
+
if (state.stage === 'unconfigured') {
|
|
257
|
+
process.stdout.write(`${bold('Product Brain')} ${dim('— not connected')}\n\n`);
|
|
258
|
+
process.stdout.write(`${heading('Get started')}\n\n`);
|
|
259
|
+
hint('1. pb login Save your API key');
|
|
260
|
+
hint('2. pb connect Connect a workspace');
|
|
261
|
+
hint('3. pb orient -b See what\'s happening');
|
|
262
|
+
process.stdout.write('\n');
|
|
263
|
+
hint('pb --help Show all commands');
|
|
264
|
+
process.stdout.write('\n');
|
|
265
|
+
}
|
|
266
|
+
else if (state.stage === 'authenticated') {
|
|
267
|
+
process.stdout.write(`${bold('Product Brain')} ${dim('— server unreachable')}\n\n`);
|
|
268
|
+
process.stdout.write(` ${green(icons.pass)} Key: configured\n`);
|
|
269
|
+
process.stdout.write(` ! Server: unreachable — run pb doctor to diagnose\n\n`);
|
|
270
|
+
hint('pb session start Start a write session');
|
|
271
|
+
hint('pb doctor Diagnose connection issues');
|
|
272
|
+
hint('pb --help Show all commands');
|
|
273
|
+
process.stdout.write('\n');
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
// workspace-bound or active
|
|
277
|
+
const workspaceName = state.workspaceName ?? 'unknown';
|
|
278
|
+
const entryCount = state.entryCount ?? 0;
|
|
279
|
+
const title = `${bold('Product Brain')} ${dim('—')} ${bold(workspaceName)}`;
|
|
280
|
+
process.stdout.write(`${title}\n\n`);
|
|
281
|
+
process.stdout.write(` ${green(icons.pass)} Key: configured\n`);
|
|
282
|
+
process.stdout.write(` ${green(icons.pass)} Workspace: ${workspaceName} (${entryCount} entries)\n`);
|
|
283
|
+
if (state.sessionActive) {
|
|
284
|
+
process.stdout.write(` ${green(icons.pass)} Session: active\n`);
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
process.stdout.write(` ${dim('- Session: none')}\n`);
|
|
288
|
+
}
|
|
289
|
+
process.stdout.write('\n');
|
|
290
|
+
if (!state.sessionActive) {
|
|
291
|
+
hint('pb session start Start a write session');
|
|
292
|
+
}
|
|
293
|
+
hint('pb orient -b Workspace overview');
|
|
294
|
+
hint('pb --help Show all commands');
|
|
295
|
+
process.stdout.write('\n');
|
|
296
|
+
}
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
// Ink tier — interactive TUI
|
|
300
|
+
const version = cliPackageVersion.version;
|
|
301
|
+
const { render } = await import('ink');
|
|
302
|
+
const { WelcomeCockpit } = await import('./commands/welcome.js');
|
|
303
|
+
const React = await import('react');
|
|
304
|
+
const { waitUntilExit, unmount } = render(React.default.createElement(WelcomeCockpit, { state, version, onExit: () => unmount() }));
|
|
305
|
+
await waitUntilExit();
|
|
58
306
|
});
|
|
59
307
|
program
|
|
60
308
|
.command('get <entry-id>')
|
|
@@ -64,25 +312,41 @@ program
|
|
|
64
312
|
program.commands.find((c) => c.name() === 'get')?.help();
|
|
65
313
|
return;
|
|
66
314
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
315
|
+
await runGet({ entryId: entryId.trim() });
|
|
316
|
+
});
|
|
317
|
+
program
|
|
318
|
+
.command('scoreboard')
|
|
319
|
+
.description('Flywheel scoreboard — M1-M5 metrics + diagnosis layer (agent-primary; --json for structured consumption)')
|
|
320
|
+
.option('-t, --task <task>', 'Task context for the ranking-agreement (M2) + truth-state (M1) read')
|
|
321
|
+
.action(async (opts) => {
|
|
322
|
+
await runScoreboard({ ...(opts.task ? { task: opts.task } : {}) });
|
|
323
|
+
});
|
|
324
|
+
const reworkCmd = program
|
|
325
|
+
.command('rework')
|
|
326
|
+
.description('Report observed rework signals (WP-487 / FEAT-1373 — fills the M4 rework meter)');
|
|
327
|
+
reworkCmd
|
|
328
|
+
.command('report <entry-id>')
|
|
329
|
+
.description('Report a rework event attributed to a previously served governance entry (agent-native checkpoint; requires an active session)')
|
|
330
|
+
.requiredOption('--classification <kind>', 'revision | ci_review_correction | user_override')
|
|
331
|
+
.option('--via <kind>', 'How this was observed: followup_commit | ci_rerun | manual', 'manual')
|
|
332
|
+
.option('--attributable', 'Flag: this ci_review_correction is attributed to a missing/violated served decision')
|
|
333
|
+
.option('--task <text>', 'Task context this rework relates to (truncated server-side, never raw diff/comment text)')
|
|
334
|
+
.option('--conversation <id>', 'Explicit conversation override, matching `pb session start --conversation <id>` — use when the shell has no PB_CONVERSATION_ID set')
|
|
335
|
+
.action(async (entryId, opts) => {
|
|
336
|
+
await runReworkReport({
|
|
337
|
+
entryId,
|
|
338
|
+
classification: opts.classification,
|
|
339
|
+
reportedVia: opts.via,
|
|
340
|
+
attributable: opts.attributable,
|
|
341
|
+
task: opts.task,
|
|
342
|
+
conversation: opts.conversation,
|
|
343
|
+
});
|
|
74
344
|
});
|
|
75
345
|
program
|
|
76
346
|
.command('get-many <entry-ids...>')
|
|
77
347
|
.description('Fetch multiple entries in parallel (space-separated IDs)')
|
|
78
348
|
.action(async (entryIds) => {
|
|
79
|
-
|
|
80
|
-
await runGetMany({ entryIds: entryIds.map((id) => id.trim()).filter(Boolean) });
|
|
81
|
-
}
|
|
82
|
-
catch (err) {
|
|
83
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
84
|
-
process.exit(1);
|
|
85
|
-
}
|
|
349
|
+
await runGetMany({ entryIds: entryIds.map((id) => id.trim()).filter(Boolean) });
|
|
86
350
|
});
|
|
87
351
|
program
|
|
88
352
|
.command('context <entry-id>')
|
|
@@ -92,26 +356,14 @@ program
|
|
|
92
356
|
program.commands.find((c) => c.name() === 'context')?.help();
|
|
93
357
|
return;
|
|
94
358
|
}
|
|
95
|
-
|
|
96
|
-
await runContext({ entryId: entryId.trim() });
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
100
|
-
process.exit(1);
|
|
101
|
-
}
|
|
359
|
+
await runContext({ entryId: entryId.trim() });
|
|
102
360
|
});
|
|
103
361
|
program
|
|
104
362
|
.command('changes')
|
|
105
363
|
.description('Detect entries modified and relations created since a given time (BET-239)')
|
|
106
364
|
.requiredOption('--since <duration>', 'Time window: 1h, 6h, 1d, 7d, 30d')
|
|
107
365
|
.action(async (opts) => {
|
|
108
|
-
|
|
109
|
-
await runChanges({ since: opts.since });
|
|
110
|
-
}
|
|
111
|
-
catch (err) {
|
|
112
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
113
|
-
process.exit(1);
|
|
114
|
-
}
|
|
366
|
+
await runChanges({ since: opts.since });
|
|
115
367
|
});
|
|
116
368
|
program
|
|
117
369
|
.command('walk <entry-id>')
|
|
@@ -120,36 +372,26 @@ program
|
|
|
120
372
|
.option('--direction <dir>', 'Traversal direction: outgoing or incoming (default outgoing)', 'outgoing')
|
|
121
373
|
.option('-t, --type <relation-type>', 'Filter by relation type (e.g. depends_on, informs, governs)')
|
|
122
374
|
.action(async (entryId, opts) => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
await runChainWalk({
|
|
130
|
-
entryId: entryId.trim(),
|
|
131
|
-
depth,
|
|
132
|
-
direction: opts.direction,
|
|
133
|
-
type: opts.type,
|
|
375
|
+
const depth = parseInt(opts.depth, 10);
|
|
376
|
+
if (isNaN(depth) || depth < 1 || depth > 4) {
|
|
377
|
+
throw new CLIError('--depth must be between 1 and 4.', {
|
|
378
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
379
|
+
category: 'validation',
|
|
134
380
|
});
|
|
135
381
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
382
|
+
await runChainWalk({
|
|
383
|
+
entryId: entryId.trim(),
|
|
384
|
+
depth,
|
|
385
|
+
direction: opts.direction,
|
|
386
|
+
type: opts.type,
|
|
387
|
+
});
|
|
140
388
|
});
|
|
141
389
|
program
|
|
142
390
|
.command('cross-cut')
|
|
143
391
|
.description('Structural aggregation — all relations of a given type grouped by source collection (BET-239)')
|
|
144
392
|
.requiredOption('--type <relation-type>', 'Relation type to scan (e.g. part_of, informs, governs)')
|
|
145
393
|
.action(async (opts) => {
|
|
146
|
-
|
|
147
|
-
await runCrossCut({ type: opts.type });
|
|
148
|
-
}
|
|
149
|
-
catch (err) {
|
|
150
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
151
|
-
process.exit(1);
|
|
152
|
-
}
|
|
394
|
+
await runCrossCut({ type: opts.type });
|
|
153
395
|
});
|
|
154
396
|
program
|
|
155
397
|
.command('brief [type]')
|
|
@@ -162,27 +404,20 @@ program
|
|
|
162
404
|
.option('--since-last', 'Compare against last brief run (incremental mode)')
|
|
163
405
|
.option('--since <timestamp>', 'ISO 8601 timestamp for delta type (e.g. 2026-03-24T00:00:00Z)')
|
|
164
406
|
.action(async (type, opts) => {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
// Otherwise, require --skill for incremental brief
|
|
172
|
-
if (!opts.skill) {
|
|
173
|
-
console.error('Usage:\n' +
|
|
174
|
-
' pb brief --skill <name> Incremental delta\n' +
|
|
175
|
-
' pb brief steering Compound steering brief\n' +
|
|
176
|
-
' pb brief confidence Compound confidence pass\n' +
|
|
177
|
-
' pb brief delta Compound delta sync');
|
|
178
|
-
process.exit(1);
|
|
179
|
-
}
|
|
180
|
-
await runBrief({ skill: opts.skill, sinceLast: opts.sinceLast });
|
|
407
|
+
// If positional arg is a compound type, route to compound brief
|
|
408
|
+
if (type && isCompoundType(type)) {
|
|
409
|
+
await runCompoundBrief({ type, since: opts.since });
|
|
410
|
+
return;
|
|
181
411
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
412
|
+
// Otherwise, require --skill for incremental brief
|
|
413
|
+
if (!opts.skill) {
|
|
414
|
+
throw new CLIError('Usage:\n' +
|
|
415
|
+
' pb brief --skill <name> Incremental delta\n' +
|
|
416
|
+
' pb brief steering Compound steering brief\n' +
|
|
417
|
+
' pb brief confidence Compound confidence pass\n' +
|
|
418
|
+
' pb brief delta Compound delta sync', { code: ErrorCode.VALIDATION_FAILED, category: 'validation' });
|
|
185
419
|
}
|
|
420
|
+
await runBrief({ skill: opts.skill, sinceLast: opts.sinceLast });
|
|
186
421
|
});
|
|
187
422
|
program
|
|
188
423
|
.command('search [query...]')
|
|
@@ -193,80 +428,141 @@ program
|
|
|
193
428
|
program.commands.find((c) => c.name() === 'search')?.help();
|
|
194
429
|
return;
|
|
195
430
|
}
|
|
196
|
-
|
|
197
|
-
await runSearch({ query });
|
|
198
|
-
}
|
|
199
|
-
catch (err) {
|
|
200
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
201
|
-
process.exit(1);
|
|
202
|
-
}
|
|
431
|
+
await runSearch({ query });
|
|
203
432
|
});
|
|
204
433
|
program
|
|
205
434
|
.command('orient')
|
|
206
435
|
.description('Print workspace stage and all orient sections (strategic context, bets, governance, tensions, etc.)')
|
|
207
436
|
.option('-b, --brief', 'Compact view: stage, counts, top bets, tensions, planned work')
|
|
208
437
|
.option('-t, --task <task>', 'Task description for task-shaped governance and context')
|
|
209
|
-
|
|
210
|
-
.option('
|
|
438
|
+
.option('-s, --scope <domain>', 'Domain scope for governance filtering. Forwarded to the workspace model for validation and custom domain resolution.')
|
|
439
|
+
.option('--full', 'Full depth orient (tier=full). Use for thorough context loading.')
|
|
211
440
|
.action(async (opts) => {
|
|
212
|
-
|
|
213
|
-
await runOrient({ brief: opts.brief, task: opts.task?.trim() || undefined, scope: opts.scope?.trim() || undefined });
|
|
214
|
-
}
|
|
215
|
-
catch (err) {
|
|
216
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
217
|
-
process.exit(1);
|
|
218
|
-
}
|
|
441
|
+
await runOrient({ brief: opts.brief, task: opts.task?.trim() || undefined, scope: opts.scope?.trim() || undefined, full: opts.full });
|
|
219
442
|
});
|
|
220
443
|
program
|
|
221
444
|
.command('handshake')
|
|
222
445
|
.description('Generate context files for AI developer tools (AGENTS.md, .codex/skills/, CLAUDE.md, .cursor/rules/, .github/copilot-instructions.md)')
|
|
223
446
|
.option('--force', 'Overwrite adapter files even if they exist without auto-generated marker')
|
|
224
|
-
.option('--
|
|
447
|
+
.option('--apply', 'Write files (default: preview only)')
|
|
448
|
+
.option('--dry-run', 'Show what would be generated without writing files (alias for preview)')
|
|
225
449
|
.option('--init', 'Set up Claude Code integration: team hooks + personal trust level')
|
|
226
450
|
.option('--level <level>', 'With --init: trust level (guide|work|silent|full-trust). Without --init: content tier (beginner|intermediate|expert)')
|
|
451
|
+
.option('--generate', 'Fetch governance entries from the Chain and merge generated rules (BET-286)')
|
|
452
|
+
.option('--surfaces <list>', 'Comma-separated surfaces to write (cursor,claude,copilot,codex)')
|
|
453
|
+
.option('--no-prompt', 'Headless mode: refuse on tampered projection files (WP-421 S3, doneWhen #17). Always implied when stdout is not a TTY.')
|
|
454
|
+
.option('--lenient', 'WP-439 S4: continue past setup-asset body fetch failures with a warning (legacy behaviour). By default, body fetch failures are hard errors; run `pb setup-audit --repair` to fix orphaned rows.')
|
|
227
455
|
.action(async (opts) => {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
await runHandshake({ force: opts.force, dryRun: opts.dryRun, level: opts.level });
|
|
234
|
-
}
|
|
235
|
-
catch (err) {
|
|
236
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
237
|
-
process.exit(1);
|
|
456
|
+
if (opts.init) {
|
|
457
|
+
await runHandshakeInit({ level: opts.level, dryRun: opts.dryRun });
|
|
458
|
+
return;
|
|
238
459
|
}
|
|
460
|
+
// Commander turns `--no-prompt` into `prompt: false`. We invert so HandshakeOptions sees noPrompt=true.
|
|
461
|
+
const noPrompt = opts.prompt === false;
|
|
462
|
+
// Attribute the bare-handshake invocation so its context.served row is separable from
|
|
463
|
+
// session-start ('session-start') / session-close ('session-close') / manual orient rows.
|
|
464
|
+
// Without this, the kernel used to coerce the absent path to 'manual-orient', polluting the
|
|
465
|
+
// proof slice that isolates manual `pb orient --task` rows (the 'handshake' union member was
|
|
466
|
+
// otherwise never emitted).
|
|
467
|
+
await runHandshake({ force: opts.force, apply: opts.apply, dryRun: opts.dryRun, level: opts.level, generate: opts.generate, surfaces: opts.surfaces?.split(','), noPrompt, lenient: opts.lenient, invocationPath: 'handshake' });
|
|
239
468
|
});
|
|
240
469
|
program
|
|
241
470
|
.command('codex-prep <task...>')
|
|
242
471
|
.description('Generate task-specific governance context for Codex (.codex/task-context.md)')
|
|
243
472
|
.option('--dry-run', 'Print to stdout instead of writing file')
|
|
473
|
+
.option('--full', 'Full depth orient (tier=full). Use for thorough context loading.')
|
|
244
474
|
.action(async (taskParts, opts) => {
|
|
245
475
|
const task = taskParts.join(' ').trim();
|
|
246
476
|
if (!task) {
|
|
247
477
|
program.commands.find((c) => c.name() === 'codex-prep')?.help();
|
|
248
478
|
return;
|
|
249
479
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
480
|
+
await runCodexPrep({ task, dryRun: opts.dryRun, full: opts.full });
|
|
481
|
+
});
|
|
482
|
+
program
|
|
483
|
+
.command('init')
|
|
484
|
+
.description('Detect setup state and guide you through configuration (WP-303)')
|
|
485
|
+
.action(async () => {
|
|
486
|
+
await runInit();
|
|
487
|
+
});
|
|
488
|
+
program
|
|
489
|
+
.command('connect <token>')
|
|
490
|
+
.description('Redeem an onboarding token and save your API key locally (FEAT-958). Uses CONVEX_SITE_URL if set, otherwise the production gateway. Override with --gateway or PB_CONNECT_GATEWAY_URL. In a non-interactive shell (e.g. CI), pass --yes to confirm the workspace, optionally with --name to label the key.')
|
|
491
|
+
.option('--gateway <url>', 'Override redeem gateway (default: CONVEX_SITE_URL or production). Use when token came from a different Convex deployment.')
|
|
492
|
+
.option('--name <label>', 'Optional label for this API key in workspace settings. Skips the key-label prompt when set.')
|
|
493
|
+
.option('-y, --yes', 'Skip the interactive workspace confirmation. Required to connect in a non-interactive shell (e.g. CI).')
|
|
494
|
+
.action(async (token, opts) => {
|
|
495
|
+
if (!token?.trim()) {
|
|
496
|
+
program.commands.find((c) => c.name() === 'connect')?.help();
|
|
497
|
+
return;
|
|
256
498
|
}
|
|
499
|
+
await runConnect(token.trim(), { gateway: opts.gateway, name: opts.name, assumeYes: opts.yes });
|
|
257
500
|
});
|
|
258
501
|
program
|
|
259
502
|
.command('login')
|
|
260
503
|
.description('Save your API key to ~/.config/productbrain/.env (works from any directory)')
|
|
261
504
|
.action(async () => {
|
|
262
|
-
|
|
263
|
-
|
|
505
|
+
await runLogin();
|
|
506
|
+
});
|
|
507
|
+
program
|
|
508
|
+
.command('doctor')
|
|
509
|
+
.description('Check CLI configuration and connectivity')
|
|
510
|
+
.option('--fix', 'Auto-repair common configuration issues')
|
|
511
|
+
.option('--dry-run', 'Preview what --fix would do without changing anything')
|
|
512
|
+
.action(async (opts) => {
|
|
513
|
+
await runDoctor({ fix: opts.fix, dryRun: opts.dryRun });
|
|
514
|
+
});
|
|
515
|
+
program
|
|
516
|
+
.command('whoami')
|
|
517
|
+
.alias('status')
|
|
518
|
+
.description('Show the active profile + workspace (fast; no session required).')
|
|
519
|
+
.action(async () => {
|
|
520
|
+
await runWhoami();
|
|
521
|
+
});
|
|
522
|
+
program
|
|
523
|
+
.command('files')
|
|
524
|
+
.description('Show which .productbrain files are pb-owned vs committed, and what writes each.')
|
|
525
|
+
.option('--fix', 'Add any exposed pb-owned files to .gitignore (idempotent)')
|
|
526
|
+
.option('--dry-run', 'With --fix: preview the .gitignore lines without writing')
|
|
527
|
+
.action(async (opts) => {
|
|
528
|
+
await runFiles({ fix: opts.fix, dryRun: opts.dryRun });
|
|
529
|
+
});
|
|
530
|
+
program
|
|
531
|
+
.command('setup')
|
|
532
|
+
.description('Canonical pb-setup entry (DEC-995): detect surfaces, read state, emit JSON for the skill body.')
|
|
533
|
+
.action(async () => {
|
|
534
|
+
await runSetup();
|
|
535
|
+
});
|
|
536
|
+
program
|
|
537
|
+
.command('setup-detect-surfaces')
|
|
538
|
+
.description('Detect local surface markers and union-merge into manifest.surfaces (STD-235 forward-only)')
|
|
539
|
+
.action(async () => {
|
|
540
|
+
const result = await runSetupDetectSurfaces();
|
|
541
|
+
if (process.stdout.isTTY) {
|
|
542
|
+
process.stdout.write(formatDetectSurfacesSummary(result) + '\n');
|
|
264
543
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
process.exit(1);
|
|
544
|
+
else {
|
|
545
|
+
process.stderr.write(formatDetectSurfacesSummary(result) + '\n');
|
|
268
546
|
}
|
|
269
547
|
});
|
|
548
|
+
program
|
|
549
|
+
.command('setup-state')
|
|
550
|
+
.description('Emit compact JSON of getPbSetupState (machine-readable, used by the pb-setup skill body)')
|
|
551
|
+
.action(async () => {
|
|
552
|
+
await runSetupState();
|
|
553
|
+
});
|
|
554
|
+
// WP-439 S2: setup-asset orphan audit. Read-only diagnostic; exits 1 if any
|
|
555
|
+
// setup_asset row has a broken body wiring (will fail at handshake).
|
|
556
|
+
// WP-439 S3: --repair attempts to restore class III/II orphans from STARTER_*
|
|
557
|
+
// constants. Class I (inline-only) and IV (hash drift) are NOT touched.
|
|
558
|
+
program
|
|
559
|
+
.command('setup-audit')
|
|
560
|
+
.description('Audit setup_asset rows for orphaned bodies (WP-439 S2/S3). Exits 1 if any orphan or repair-failure.')
|
|
561
|
+
.option('--json', 'Emit machine-readable JSON (overrides pretty output for this command)')
|
|
562
|
+
.option('--repair', 'Attempt to restore class III/II orphans from STARTER_* constants (WP-439 S3)')
|
|
563
|
+
.action(async (opts) => {
|
|
564
|
+
await runSetupAudit({ json: opts.json, repair: opts.repair });
|
|
565
|
+
});
|
|
270
566
|
// --- Write commands (require active session) ---
|
|
271
567
|
const sessionCmd = program
|
|
272
568
|
.command('session')
|
|
@@ -275,39 +571,45 @@ sessionCmd
|
|
|
275
571
|
.command('start')
|
|
276
572
|
.description('Start a tracked write session (opens session, refreshes context)')
|
|
277
573
|
.option('--json', 'Output machine-readable JSON (deprecated: use global --json flag)')
|
|
574
|
+
.option('--conversation <id>', 'Explicit conversation identity override (WP-479 E2) — takes priority over env-detected channels. Pair with PB_CONVERSATION_ID=<id> so later bare pb commands (orient, capture) attribute to the same conversation — they resolve identity from env only')
|
|
278
575
|
.action(async (opts) => {
|
|
279
|
-
|
|
280
|
-
await runSessionStart({ json: opts.json });
|
|
281
|
-
}
|
|
282
|
-
catch (err) {
|
|
283
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
284
|
-
process.exit(1);
|
|
285
|
-
}
|
|
576
|
+
await runSessionStart({ json: opts.json, conversation: opts.conversation });
|
|
286
577
|
});
|
|
287
578
|
sessionCmd
|
|
288
579
|
.command('id')
|
|
289
580
|
.description('Print current session ID to stdout (machine-readable, TEN-707)')
|
|
290
581
|
.action(() => {
|
|
291
|
-
|
|
292
|
-
runSessionId();
|
|
293
|
-
}
|
|
294
|
-
catch (err) {
|
|
295
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
296
|
-
process.exit(1);
|
|
297
|
-
}
|
|
582
|
+
runSessionId();
|
|
298
583
|
});
|
|
299
584
|
sessionCmd
|
|
300
585
|
.command('close')
|
|
301
586
|
.description('Close the active session (wrapup, refresh context)')
|
|
302
587
|
.option('--force', 'Clear local session state even if server close fails')
|
|
303
588
|
.action(async (opts) => {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
589
|
+
await runSessionClose({ force: opts.force });
|
|
590
|
+
});
|
|
591
|
+
// WP-479 E4: traceback + quota observability.
|
|
592
|
+
sessionCmd
|
|
593
|
+
.command('list')
|
|
594
|
+
.description('List active sessions (with quota gauge) + recent non-active ones (WP-479 E4)')
|
|
595
|
+
.action(async () => {
|
|
596
|
+
await runSessionList();
|
|
597
|
+
});
|
|
598
|
+
sessionCmd
|
|
599
|
+
.command('show <id-or-conversation>')
|
|
600
|
+
.description('Show a conversation\'s full session lineage + governance serves (WP-479 E4)')
|
|
601
|
+
.action(async (idOrConversation) => {
|
|
602
|
+
await runSessionShow(idOrConversation);
|
|
603
|
+
});
|
|
604
|
+
// TEN-2189 / WP-456 E2: hard-reset worktree-local session state (no resume marker)
|
|
605
|
+
// + clear the PREVIEW_MODE marker. Recovery path for a session stranded on the wrong
|
|
606
|
+
// workspace after a pb:preview/pb:real binding flip.
|
|
607
|
+
sessionCmd
|
|
608
|
+
.command('reset')
|
|
609
|
+
.description('Hard-reset local session state (discard session.json + clear PREVIEW_MODE)')
|
|
610
|
+
.option('--force', 'Skip the confirmation prompt when an active session is present')
|
|
611
|
+
.action(async (opts) => {
|
|
612
|
+
await runSessionReset({ force: opts.force });
|
|
311
613
|
});
|
|
312
614
|
program
|
|
313
615
|
.command('capture [text...]')
|
|
@@ -315,34 +617,37 @@ program
|
|
|
315
617
|
.option('-n, --name <name>', 'Entry name (defaults to capture text)')
|
|
316
618
|
.option('-d, --description <desc>', 'Entry description (defaults to capture text)')
|
|
317
619
|
.option('-c, --collection <slug>', 'Explicit collection (skip auto-classification)')
|
|
620
|
+
.option('-f, --field <key=value>', 'Set a data field (repeatable; e.g. rationale="...")', (val, prev) => [...prev, val], [])
|
|
318
621
|
.option('-l, --link <entry-id>', 'Link new entry to an existing entry (TEN-705)')
|
|
319
622
|
.option('-t, --type <relation-type>', 'Relation type for --link (default: surfaces_tension_in)')
|
|
320
623
|
.option('--source-ref <ref>', 'Source reference URI (BET-240 E2: e.g. "meeting-2026-03-28.md")')
|
|
321
624
|
.option('--source-excerpt <text>', 'Verbatim source excerpt (BET-240 E2)')
|
|
625
|
+
// TEN-2226 / WP-456 E1: opt-in override — keeps the entry a draft even in Open governance mode.
|
|
626
|
+
.option('--draft', 'Force the entry to draft regardless of workspace governance mode (TEN-2226)')
|
|
322
627
|
.option('--json', 'Output machine-readable JSON (deprecated: use global --json flag)')
|
|
628
|
+
.option('--suggest-only', 'Show grounding preview (possible duplicates, related entries) without creating entry (WP-319)')
|
|
629
|
+
.option('--strict', 'Prompt y/N before capturing when a possible duplicate is detected (WP-319)')
|
|
323
630
|
.action(async (textParts = [], opts) => {
|
|
324
631
|
const text = textParts.join(' ').trim();
|
|
325
632
|
if (!text && !opts.name) {
|
|
326
633
|
program.commands.find((c) => c.name() === 'capture')?.help();
|
|
327
634
|
return;
|
|
328
635
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
process.exit(1);
|
|
345
|
-
}
|
|
636
|
+
await runCapture({
|
|
637
|
+
text: text || opts.name || '',
|
|
638
|
+
name: opts.name,
|
|
639
|
+
description: opts.description,
|
|
640
|
+
collection: opts.collection,
|
|
641
|
+
field: opts.field,
|
|
642
|
+
link: opts.link,
|
|
643
|
+
type: opts.type,
|
|
644
|
+
sourceRef: opts.sourceRef,
|
|
645
|
+
sourceExcerpt: opts.sourceExcerpt,
|
|
646
|
+
draft: opts.draft,
|
|
647
|
+
json: opts.json,
|
|
648
|
+
suggestOnly: opts.suggestOnly,
|
|
649
|
+
strict: opts.strict,
|
|
650
|
+
});
|
|
346
651
|
});
|
|
347
652
|
// --- Update command (TEN-703) ---
|
|
348
653
|
program
|
|
@@ -353,21 +658,23 @@ program
|
|
|
353
658
|
.option('--status <status>', 'Update entry status (draft | active | deprecated | archived)')
|
|
354
659
|
.option('--workflow-status <status>', 'Set workflow status (server-validated)')
|
|
355
660
|
.option('--note <text>', 'Change note for history')
|
|
661
|
+
.option('--override-reason <text>', 'Typed override (≥12 chars) clearing a steering coherency block — recorded with author attribution (WP-465)')
|
|
662
|
+
.option('--acknowledge <response>', 'Respond to a coherency challenge: linked | accepted-fix | diverged (WP-465)')
|
|
663
|
+
.option('--ack-entry <entry-id>', 'Authorizing entry for --acknowledge linked / accepted-fix')
|
|
664
|
+
.option('--ack-reason <text>', 'Divergence rationale (≥12 chars) for --acknowledge diverged')
|
|
356
665
|
.action(async (entryId, opts) => {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
process.exit(1);
|
|
370
|
-
}
|
|
666
|
+
await runUpdate({
|
|
667
|
+
entryId,
|
|
668
|
+
field: opts.field,
|
|
669
|
+
name: opts.name,
|
|
670
|
+
status: opts.status,
|
|
671
|
+
workflowStatus: opts.workflowStatus,
|
|
672
|
+
note: opts.note,
|
|
673
|
+
overrideReason: opts.overrideReason,
|
|
674
|
+
acknowledge: opts.acknowledge,
|
|
675
|
+
ackEntry: opts.ackEntry,
|
|
676
|
+
ackReason: opts.ackReason,
|
|
677
|
+
});
|
|
371
678
|
});
|
|
372
679
|
// --- Promote command (Wave 2 CLI Polish) ---
|
|
373
680
|
program
|
|
@@ -378,26 +685,25 @@ program
|
|
|
378
685
|
program.commands.find((c) => c.name() === 'verify')?.help();
|
|
379
686
|
return;
|
|
380
687
|
}
|
|
381
|
-
|
|
382
|
-
await runVerify({ entryId: entryId.trim() });
|
|
383
|
-
}
|
|
384
|
-
catch (err) {
|
|
385
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
386
|
-
process.exit(1);
|
|
387
|
-
}
|
|
688
|
+
await runVerify({ entryId: entryId.trim() });
|
|
388
689
|
});
|
|
389
690
|
program
|
|
390
|
-
.command('promote <entry-
|
|
391
|
-
.description('Promote
|
|
392
|
-
.option('-m, --message <text>', 'Commit message')
|
|
393
|
-
.
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
691
|
+
.command('promote <entry-ids...>')
|
|
692
|
+
.description('Promote one or more entries from draft to active (commit to SSOT). Batch: a single failure does not abort the rest (INS-1813).')
|
|
693
|
+
.option('-m, --message <text>', 'Commit message (applied to every entry in the batch)')
|
|
694
|
+
.option('--override-reason <text>', 'Typed override (≥12 chars) clearing a steering coherency block at publish — recorded with author attribution (WP-465)')
|
|
695
|
+
.option('--acknowledge <response>', 'Respond to a coherency challenge: linked | accepted-fix | diverged (WP-465)')
|
|
696
|
+
.option('--ack-entry <entry-id>', 'Authorizing entry for --acknowledge linked / accepted-fix')
|
|
697
|
+
.option('--ack-reason <text>', 'Divergence rationale (≥12 chars) for --acknowledge diverged')
|
|
698
|
+
.action(async (entryIds, opts) => {
|
|
699
|
+
await runPromote({
|
|
700
|
+
entryIds,
|
|
701
|
+
message: opts.message,
|
|
702
|
+
overrideReason: opts.overrideReason,
|
|
703
|
+
acknowledge: opts.acknowledge,
|
|
704
|
+
ackEntry: opts.ackEntry,
|
|
705
|
+
ackReason: opts.ackReason,
|
|
706
|
+
});
|
|
401
707
|
});
|
|
402
708
|
// --- Relate / Unrelate commands (TEN-704) ---
|
|
403
709
|
program
|
|
@@ -405,25 +711,13 @@ program
|
|
|
405
711
|
.description('Add a typed relation between two entries (requires active session)')
|
|
406
712
|
.option('--if-missing', 'Only create relation if it does not already exist')
|
|
407
713
|
.action(async (fromId, type, toId, opts) => {
|
|
408
|
-
|
|
409
|
-
await runRelate({ fromId, type, toId, ifMissing: opts.ifMissing });
|
|
410
|
-
}
|
|
411
|
-
catch (err) {
|
|
412
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
413
|
-
process.exit(1);
|
|
414
|
-
}
|
|
714
|
+
await runRelate({ fromId, type, toId, ifMissing: opts.ifMissing });
|
|
415
715
|
});
|
|
416
716
|
program
|
|
417
717
|
.command('unrelate <from-id> <type> <to-id>')
|
|
418
718
|
.description('Remove a typed relation between two entries (requires active session)')
|
|
419
719
|
.action(async (fromId, type, toId) => {
|
|
420
|
-
|
|
421
|
-
await runUnrelate({ fromId, type, toId });
|
|
422
|
-
}
|
|
423
|
-
catch (err) {
|
|
424
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
425
|
-
process.exit(1);
|
|
426
|
-
}
|
|
720
|
+
await runUnrelate({ fromId, type, toId });
|
|
427
721
|
});
|
|
428
722
|
// --- Ingest command (BET-81) ---
|
|
429
723
|
program
|
|
@@ -433,23 +727,43 @@ program
|
|
|
433
727
|
.option('--resume', 'Skip files whose sourceRef is already committed in staging.')
|
|
434
728
|
.option('--concurrency <n>', 'Process up to N files in parallel (default 1, max 5).', '1')
|
|
435
729
|
.action(async (pattern, opts) => {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
await runIngest({
|
|
443
|
-
pattern,
|
|
444
|
-
dryRun: opts.dryRun,
|
|
445
|
-
resume: opts.resume,
|
|
446
|
-
concurrency,
|
|
730
|
+
const concurrency = parseInt(opts.concurrency ?? '1', 10);
|
|
731
|
+
if (Number.isNaN(concurrency) || concurrency < 1) {
|
|
732
|
+
throw new CLIError('--concurrency must be a positive integer.', {
|
|
733
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
734
|
+
category: 'validation',
|
|
447
735
|
});
|
|
448
736
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
737
|
+
await runIngest({
|
|
738
|
+
pattern,
|
|
739
|
+
dryRun: opts.dryRun,
|
|
740
|
+
resume: opts.resume,
|
|
741
|
+
concurrency,
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
// --- migrate:setup command (WP-345 S0b) ---
|
|
745
|
+
program
|
|
746
|
+
.command('migrate:setup')
|
|
747
|
+
.description('Migrate .productbrain/skills|rules|hooks/*.md into the DB setup-assets collection (WP-345)')
|
|
748
|
+
.option('--dry-run', 'Show what would be migrated without writing to DB.')
|
|
749
|
+
.option('--cwd <path>', 'Override working directory (default: process.cwd())')
|
|
750
|
+
.action(async (opts) => {
|
|
751
|
+
const { runMigrateSetup } = await import('./commands/migrate-setup.js');
|
|
752
|
+
await runMigrateSetup({ dryRun: opts.dryRun, cwd: opts.cwd });
|
|
753
|
+
});
|
|
754
|
+
// --- setup:ingest command (WP-345 S3) ---
|
|
755
|
+
program
|
|
756
|
+
.command('setup:ingest <path>')
|
|
757
|
+
.description('Push a single .productbrain skill/rule/hook file to the DB setup-assets SSOT (WP-345)')
|
|
758
|
+
.option('--dry-run', 'Show what would be ingested without writing to DB.')
|
|
759
|
+
.option('--json', 'Output machine-readable JSON (deprecated: use global --json flag)')
|
|
760
|
+
.action(async (filePath, opts) => {
|
|
761
|
+
if (!filePath?.trim()) {
|
|
762
|
+
program.commands.find((c) => c.name() === 'setup:ingest')?.help();
|
|
763
|
+
return;
|
|
452
764
|
}
|
|
765
|
+
const { runSetupIngest } = await import('./commands/setup-ingest.js');
|
|
766
|
+
await runSetupIngest(filePath.trim(), { dryRun: opts.dryRun });
|
|
453
767
|
});
|
|
454
768
|
// --- Fields command (BET-181 Slice 2) ---
|
|
455
769
|
program
|
|
@@ -460,13 +774,7 @@ program
|
|
|
460
774
|
program.commands.find((c) => c.name() === 'fields')?.help();
|
|
461
775
|
return;
|
|
462
776
|
}
|
|
463
|
-
|
|
464
|
-
await runFields({ collectionSlug: collection.trim() });
|
|
465
|
-
}
|
|
466
|
-
catch (err) {
|
|
467
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
468
|
-
process.exit(1);
|
|
469
|
-
}
|
|
777
|
+
await runFields({ collectionSlug: collection.trim() });
|
|
470
778
|
});
|
|
471
779
|
// --- Constellation command (BET-181 Slice 3) ---
|
|
472
780
|
program
|
|
@@ -477,36 +785,24 @@ program
|
|
|
477
785
|
program.commands.find((c) => c.name() === 'constellation')?.help();
|
|
478
786
|
return;
|
|
479
787
|
}
|
|
480
|
-
|
|
481
|
-
await runConstellation({ entryId: entryId.trim() });
|
|
482
|
-
}
|
|
483
|
-
catch (err) {
|
|
484
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
485
|
-
process.exit(1);
|
|
486
|
-
}
|
|
788
|
+
await runConstellation({ entryId: entryId.trim() });
|
|
487
789
|
});
|
|
488
790
|
// --- Audit command (BET-182 Slice 2) ---
|
|
489
791
|
program
|
|
490
792
|
.command('audit <entry-ids...>')
|
|
491
|
-
.description('Run
|
|
793
|
+
.description('Run hygiene audit on bet(s) — 13 gates (shaping) / 18 gates (handoff), exit code reflects verdict')
|
|
492
794
|
.option('--phase <phase>', 'Override phase detection (shaping | handoff)')
|
|
493
795
|
.option('--gate <name>', 'Run only specified gate(s) (repeatable)', (val, prev) => [...prev, val], [])
|
|
494
796
|
.option('--fix', 'Auto-execute exact fixes via pb update, rerun once')
|
|
495
797
|
.option('--verbose', 'Show all gates including PASS detail')
|
|
496
798
|
.action(async (entryIds, opts) => {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
catch (err) {
|
|
507
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
508
|
-
process.exit(1);
|
|
509
|
-
}
|
|
799
|
+
await runAudit({
|
|
800
|
+
entryIds: entryIds.map((id) => id.trim()).filter(Boolean),
|
|
801
|
+
phase: opts.phase,
|
|
802
|
+
gate: opts.gate,
|
|
803
|
+
fix: opts.fix,
|
|
804
|
+
verbose: opts.verbose,
|
|
805
|
+
});
|
|
510
806
|
});
|
|
511
807
|
program
|
|
512
808
|
.command('brand-pack')
|
|
@@ -521,13 +817,7 @@ program
|
|
|
521
817
|
.command('proposals')
|
|
522
818
|
.description('List open consent proposals with expiry countdown (BET-221)')
|
|
523
819
|
.action(async () => {
|
|
524
|
-
|
|
525
|
-
await runProposals();
|
|
526
|
-
}
|
|
527
|
-
catch (err) {
|
|
528
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
529
|
-
process.exit(1);
|
|
530
|
-
}
|
|
820
|
+
await runProposals();
|
|
531
821
|
});
|
|
532
822
|
program
|
|
533
823
|
.command('accept [proposal-id]')
|
|
@@ -535,29 +825,315 @@ program
|
|
|
535
825
|
.option('-a, --auto', 'Auto-approve all open proposals (skip contradictions)')
|
|
536
826
|
.action(async (proposalId, opts) => {
|
|
537
827
|
if (!proposalId && !opts.auto) {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
await runAccept({ proposalId, auto: opts.auto });
|
|
543
|
-
}
|
|
544
|
-
catch (err) {
|
|
545
|
-
console.error(err instanceof Error ? err.message : String(err));
|
|
546
|
-
process.exit(1);
|
|
828
|
+
throw new CLIError('Usage: pb accept <proposal-id> or pb accept --auto', {
|
|
829
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
830
|
+
category: 'validation',
|
|
831
|
+
});
|
|
547
832
|
}
|
|
833
|
+
await runAccept({ proposalId, auto: opts.auto });
|
|
548
834
|
});
|
|
549
835
|
program
|
|
550
836
|
.command('reject <proposal-id>')
|
|
551
837
|
.description('Reject a consent proposal with a required reason (BR-7)')
|
|
552
838
|
.requiredOption('-r, --reason <text>', 'Reason for rejection (required)')
|
|
553
839
|
.action(async (proposalId, opts) => {
|
|
554
|
-
|
|
555
|
-
|
|
840
|
+
await runReject({ proposalId, reason: opts.reason });
|
|
841
|
+
});
|
|
842
|
+
// --- Collections command (BET-280 Slice 1) ---
|
|
843
|
+
const collectionsCmd = program
|
|
844
|
+
.command('collections')
|
|
845
|
+
.description('Inspect and audit workspace collection registry (BET-280)');
|
|
846
|
+
collectionsCmd
|
|
847
|
+
.command('list')
|
|
848
|
+
.description('List all collections — slug, name, field count, icon')
|
|
849
|
+
.action(async () => {
|
|
850
|
+
await runCollectionsList();
|
|
851
|
+
});
|
|
852
|
+
collectionsCmd
|
|
853
|
+
.command('get <slug>')
|
|
854
|
+
.description('Show full detail for a collection by slug')
|
|
855
|
+
.action(async (slug) => {
|
|
856
|
+
if (!slug?.trim()) {
|
|
857
|
+
program.commands.find((c) => c.name() === 'collections')?.help();
|
|
858
|
+
return;
|
|
556
859
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
860
|
+
await runCollectionsGet({ slug: slug.trim() });
|
|
861
|
+
});
|
|
862
|
+
collectionsCmd
|
|
863
|
+
.command('audit')
|
|
864
|
+
.description('Collection health report — classification, icon, displayHint coverage, schema gaps')
|
|
865
|
+
.action(async () => {
|
|
866
|
+
await runCollectionsAudit();
|
|
867
|
+
});
|
|
868
|
+
collectionsCmd
|
|
869
|
+
.command('export')
|
|
870
|
+
.description('Export all system_collection_definitions with full classification metadata (admin only)')
|
|
871
|
+
.action(async () => {
|
|
872
|
+
await runCollectionsExport();
|
|
873
|
+
});
|
|
874
|
+
// --- Workspace operator commands (WP-305 Slice 4) ---
|
|
875
|
+
const workspaceCmd = program
|
|
876
|
+
.command('workspace')
|
|
877
|
+
.description('Operator commands for workspace health and repair (WP-305)');
|
|
878
|
+
workspaceCmd
|
|
879
|
+
.command('verify')
|
|
880
|
+
.description('Check workspace health — seeds, collections, glossary (admin only)')
|
|
881
|
+
.action(async () => {
|
|
882
|
+
await runWorkspaceVerify();
|
|
883
|
+
});
|
|
884
|
+
workspaceCmd
|
|
885
|
+
.command('repair')
|
|
886
|
+
.description('Backfill missing seeds for the active workspace (admin only)')
|
|
887
|
+
.action(async () => {
|
|
888
|
+
await runWorkspaceRepair();
|
|
889
|
+
});
|
|
890
|
+
const authorityDomainsCmd = program
|
|
891
|
+
.command('authority-domains')
|
|
892
|
+
.description('Operator commands for WP-354 authority-domain readiness and evidence');
|
|
893
|
+
function collectRepeatableOption(value, previous) {
|
|
894
|
+
return [...(previous ?? []), value];
|
|
895
|
+
}
|
|
896
|
+
authorityDomainsCmd
|
|
897
|
+
.command('add <slug>')
|
|
898
|
+
.description('Create an authority domain for this workspace')
|
|
899
|
+
.option('--description <description>', 'Authority-domain description')
|
|
900
|
+
.option('--alias <alias>', 'Alias/keyword for this domain (repeatable)', collectRepeatableOption)
|
|
901
|
+
.option('--path-glob <glob>', 'Changed-path glob for this domain (repeatable)', collectRepeatableOption)
|
|
902
|
+
.action(async (slug, opts) => {
|
|
903
|
+
await runAuthorityDomainsAdd(slug, opts);
|
|
904
|
+
});
|
|
905
|
+
authorityDomainsCmd
|
|
906
|
+
.command('propose')
|
|
907
|
+
.description('Generate authority-domain tag proposals')
|
|
908
|
+
.option('--dry-run', 'Preview without writing staging proposals')
|
|
909
|
+
.option('--limit <n>', 'Maximum governance entries to classify')
|
|
910
|
+
.option('--mock', 'Use deterministic mock classifier')
|
|
911
|
+
.action(async (opts) => {
|
|
912
|
+
await runAuthorityDomainsPropose(opts);
|
|
913
|
+
});
|
|
914
|
+
authorityDomainsCmd
|
|
915
|
+
.command('review')
|
|
916
|
+
.description('List authority-domain tag proposals')
|
|
917
|
+
.option('--status <status>', 'pending, committed, rejected, or skipped', 'pending')
|
|
918
|
+
.option('--limit <n>', 'Maximum proposals to list')
|
|
919
|
+
.option('--sample <n>', 'Return a stable proposal sample')
|
|
920
|
+
.option('--stratified', 'Stratify sample across proposed domain and source collection')
|
|
921
|
+
.action(async (opts) => {
|
|
922
|
+
await runAuthorityDomainsReview(opts);
|
|
923
|
+
});
|
|
924
|
+
const authorityDomainsSampleCmd = authorityDomainsCmd
|
|
925
|
+
.command('sample')
|
|
926
|
+
.description('Manage human-reviewed authority-domain proposal samples');
|
|
927
|
+
authorityDomainsSampleCmd
|
|
928
|
+
.command('record')
|
|
929
|
+
.description('Record human-reviewed sample accuracy for authority-domain proposals')
|
|
930
|
+
.requiredOption('--sample-id <id>', 'Stable sample identifier from the review packet')
|
|
931
|
+
.option('--run-id <id>', 'Proposal run identifier')
|
|
932
|
+
.requiredOption('--approved <n>', 'Count of sampled proposals approved as-is')
|
|
933
|
+
.requiredOption('--rejected <n>', 'Count of sampled proposals rejected')
|
|
934
|
+
.requiredOption('--corrected <n>', 'Count of sampled proposals corrected to another domain')
|
|
935
|
+
.action(async (opts) => {
|
|
936
|
+
await runAuthorityDomainsRecordSample(opts);
|
|
937
|
+
});
|
|
938
|
+
authorityDomainsCmd
|
|
939
|
+
.command('ratify <proposal-id>')
|
|
940
|
+
.description('Ratify an authority-domain tag proposal')
|
|
941
|
+
.option('--note <note>', 'Review note')
|
|
942
|
+
.action(async (proposalId, opts) => {
|
|
943
|
+
await runAuthorityDomainsRatify(proposalId, opts);
|
|
944
|
+
});
|
|
945
|
+
authorityDomainsCmd
|
|
946
|
+
.command('queue-tag')
|
|
947
|
+
.description('Queue a known-correct authority-domain tag proposal')
|
|
948
|
+
.requiredOption('--entry <entryId>', 'Entry ID to tag, e.g. DEC-1244')
|
|
949
|
+
.requiredOption('--domain <domainSlug>', 'Authority-domain slug, e.g. product-design/ux')
|
|
950
|
+
.option('--note <note>', 'Known-correct evidence note')
|
|
951
|
+
.option('--ratify', 'Immediately ratify using the generated confirmation string')
|
|
952
|
+
.action(async (opts) => {
|
|
953
|
+
await runAuthorityDomainsQueueTag(opts);
|
|
954
|
+
});
|
|
955
|
+
authorityDomainsCmd
|
|
956
|
+
.command('reject <proposal-id>')
|
|
957
|
+
.description('Reject an authority-domain tag proposal')
|
|
958
|
+
.option('--reason <reason>', 'Rejection reason')
|
|
959
|
+
.action(async (proposalId, opts) => {
|
|
960
|
+
await runAuthorityDomainsReject(proposalId, opts);
|
|
961
|
+
});
|
|
962
|
+
authorityDomainsCmd
|
|
963
|
+
.command('discard-pending')
|
|
964
|
+
.description('Reject all pending authority-domain tag proposals after a failed batch diagnosis')
|
|
965
|
+
.option('--reason <reason>', 'Discard reason')
|
|
966
|
+
.action(async (opts) => {
|
|
967
|
+
await runAuthorityDomainsDiscardPending(opts);
|
|
968
|
+
});
|
|
969
|
+
authorityDomainsCmd
|
|
970
|
+
.command('readiness')
|
|
971
|
+
.description('Show WP-354 authority-domain readiness, evidence gap, and next action')
|
|
972
|
+
.action(async () => {
|
|
973
|
+
await runAuthorityDomainsReadiness();
|
|
974
|
+
});
|
|
975
|
+
authorityDomainsCmd
|
|
976
|
+
.command('benchmark')
|
|
977
|
+
.description('Run and persist the WP-354 authority-domain benchmark')
|
|
978
|
+
.action(async () => {
|
|
979
|
+
await runAuthorityDomainsBenchmark();
|
|
980
|
+
});
|
|
981
|
+
authorityDomainsCmd
|
|
982
|
+
.command('activate-cutover')
|
|
983
|
+
.description('Activate graph retrieval after WP-354 evidence gates pass')
|
|
984
|
+
.option('--force-pre-production', 'Bypass the permanently-locked valueProof gate (requires --dec-id, DEC-864)')
|
|
985
|
+
.option('--dec-id <decId>', 'Chain DEC ID authorizing the bypass')
|
|
986
|
+
.action(async (opts) => {
|
|
987
|
+
await runAuthorityDomainsActivateCutover({ forcePreProduction: opts.forcePreProduction, decId: opts.decId });
|
|
988
|
+
});
|
|
989
|
+
authorityDomainsCmd
|
|
990
|
+
.command('deactivate-cutover')
|
|
991
|
+
.description('Deactivate the active WP-354 authorityDomain cutover for this workspace (DEC-864 rollback).')
|
|
992
|
+
.option('--clerk-user-id <clerkUserId>', 'Override the Clerk user ID for audit trail')
|
|
993
|
+
.action(async (opts) => {
|
|
994
|
+
await runAuthorityDomainsDeactivateCutover({ clerkUserId: opts.clerkUserId });
|
|
995
|
+
});
|
|
996
|
+
authorityDomainsCmd
|
|
997
|
+
.command('principle-distribution')
|
|
998
|
+
.description('Pre-merge gate: check governance category match rate for principles entries')
|
|
999
|
+
.action(async () => {
|
|
1000
|
+
await runAuthorityDomainsPrincipleDistribution();
|
|
1001
|
+
});
|
|
1002
|
+
// --- Definitions diff command (WP-305 Slice 4) ---
|
|
1003
|
+
const definitionsCmd = program
|
|
1004
|
+
.command('definitions')
|
|
1005
|
+
.description('Inspect and compare workspace definitions (WP-305)');
|
|
1006
|
+
definitionsCmd
|
|
1007
|
+
.command('diff [file]')
|
|
1008
|
+
.description('Compare local dev-system-collections.json against server definitions (admin only)')
|
|
1009
|
+
.action(async (file) => {
|
|
1010
|
+
await runDefinitionsDiff({ file });
|
|
1011
|
+
});
|
|
1012
|
+
// --- Method commands (WP-329 S1: method visibility) ---
|
|
1013
|
+
const methodCmd = program
|
|
1014
|
+
.command('method')
|
|
1015
|
+
.description('Inspect published methods (skills + rules) and their per-surface adapter status (WP-329)');
|
|
1016
|
+
methodCmd
|
|
1017
|
+
.command('ls')
|
|
1018
|
+
.description('List all methods with version, published status, and adapter presence')
|
|
1019
|
+
.action(async () => {
|
|
1020
|
+
await runMethodList();
|
|
1021
|
+
});
|
|
1022
|
+
methodCmd
|
|
1023
|
+
.command('show <name>')
|
|
1024
|
+
.description('Show details for one method: frontmatter, Chain entry, and per-adapter fork status')
|
|
1025
|
+
.action(async (name) => {
|
|
1026
|
+
if (!name?.trim()) {
|
|
1027
|
+
program.commands.find((c) => c.name() === 'method')?.help();
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
await runMethodShow({ name: name.trim() });
|
|
1031
|
+
});
|
|
1032
|
+
methodCmd
|
|
1033
|
+
.command('diff <name>')
|
|
1034
|
+
.description('Show diff between local .productbrain/ source and last-published Chain version (WP-329 S2)')
|
|
1035
|
+
.action(async (name) => {
|
|
1036
|
+
if (!name?.trim()) {
|
|
1037
|
+
program.commands.find((c) => c.name() === 'method')?.help();
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
await runMethodDiff({ name: name.trim() });
|
|
1041
|
+
});
|
|
1042
|
+
methodCmd
|
|
1043
|
+
.command('publish <name>')
|
|
1044
|
+
.description('Publish a local .productbrain/ method (skill or rule) to the Chain methods collection (WP-329 S3)')
|
|
1045
|
+
.option('--force', 'Publish even when local body matches the last-published version (override D4 no-op guard)')
|
|
1046
|
+
.action(async (name, opts) => {
|
|
1047
|
+
if (!name?.trim()) {
|
|
1048
|
+
program.commands.find((c) => c.name() === 'method')?.help();
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
await runMethodPublish({ name: name.trim(), force: opts.force });
|
|
1052
|
+
});
|
|
1053
|
+
// --- Profile commands (WP-302 Slice 2) ---
|
|
1054
|
+
const profileCmd = program
|
|
1055
|
+
.command('profile')
|
|
1056
|
+
.description('Manage workspace profiles (WP-302: multi-workspace support)');
|
|
1057
|
+
profileCmd
|
|
1058
|
+
.command('list')
|
|
1059
|
+
.description('List all profiles, mark active one')
|
|
1060
|
+
.action(async () => {
|
|
1061
|
+
await runProfileList();
|
|
1062
|
+
});
|
|
1063
|
+
profileCmd
|
|
1064
|
+
.command('create <name>')
|
|
1065
|
+
.description('Create a new profile with an API key')
|
|
1066
|
+
.requiredOption('--api-key <key>', `API key (${API_KEY_PREFIX}...)`)
|
|
1067
|
+
.option('--url <url>', 'Convex site URL (defaults to production)')
|
|
1068
|
+
.action(async (name, opts) => {
|
|
1069
|
+
await runProfileCreate({ name, apiKey: opts.apiKey, url: opts.url });
|
|
1070
|
+
});
|
|
1071
|
+
profileCmd
|
|
1072
|
+
.command('use <name>')
|
|
1073
|
+
.description('Switch profile: reconciles the repo pin + global by default. --local = repo pin only; --global = global only.')
|
|
1074
|
+
.option('--local', 'Write the profile pin only to .productbrain/config.local.json (repo-local, gitignored)')
|
|
1075
|
+
.option('--global', 'Switch only the global active profile (does not change a locally-pinned repo)')
|
|
1076
|
+
.action(async (name, opts) => {
|
|
1077
|
+
await runProfileUse({ name, local: opts.local, global: opts.global });
|
|
1078
|
+
});
|
|
1079
|
+
profileCmd
|
|
1080
|
+
.command('delete <name>')
|
|
1081
|
+
.description('Delete a profile (cannot delete active or last profile)')
|
|
1082
|
+
.action(async (name) => {
|
|
1083
|
+
await runProfileDelete({ name });
|
|
1084
|
+
});
|
|
1085
|
+
program
|
|
1086
|
+
.command('use <name>')
|
|
1087
|
+
.description('Switch the active workspace profile (alias for `pb profile use`).')
|
|
1088
|
+
.option('--local', 'Write the profile pin only to .productbrain/config.local.json (repo-local, gitignored)')
|
|
1089
|
+
.option('--global', 'Switch only the global active profile (does not change a locally-pinned repo)')
|
|
1090
|
+
.action(async (name, opts) => {
|
|
1091
|
+
await runProfileUse({ name, local: opts.local, global: opts.global });
|
|
1092
|
+
});
|
|
1093
|
+
// --- Glossary command (WP-302 Slice 4) ---
|
|
1094
|
+
program
|
|
1095
|
+
.command('glossary')
|
|
1096
|
+
.description('Show key Product Brain CLI terms and definitions')
|
|
1097
|
+
.action(() => {
|
|
1098
|
+
if (isJsonMode()) {
|
|
1099
|
+
process.stdout.write(JSON.stringify(GLOSSARY) + '\n');
|
|
1100
|
+
return;
|
|
560
1101
|
}
|
|
1102
|
+
const lines = [
|
|
1103
|
+
'',
|
|
1104
|
+
heading('Glossary'),
|
|
1105
|
+
'',
|
|
1106
|
+
formatGlossary(),
|
|
1107
|
+
'',
|
|
1108
|
+
];
|
|
1109
|
+
process.stdout.write(lines.join('\n') + '\n');
|
|
1110
|
+
});
|
|
1111
|
+
// --- Usage command (WP-322 S4, FEAT-1011) ---
|
|
1112
|
+
program
|
|
1113
|
+
.command('usage')
|
|
1114
|
+
.description('Session and activity dashboard — 4-tab Ink TUI (WP-322)')
|
|
1115
|
+
.option('--json', 'Output machine-readable JSON (sessions, entries30d, activity array)')
|
|
1116
|
+
.action(async (opts) => {
|
|
1117
|
+
await runUsage({ json: opts.json });
|
|
1118
|
+
});
|
|
1119
|
+
// --- Proof-run command (WP-459: admin-proof bridge dogfood) ---
|
|
1120
|
+
program
|
|
1121
|
+
.command('proof-run <proof-name>')
|
|
1122
|
+
.description('Run an admin-only proof against the seeded preview via the proof bridge (WP-459)')
|
|
1123
|
+
.action(async (proofName) => {
|
|
1124
|
+
await runProofRun({ proofName: proofName.trim() });
|
|
1125
|
+
});
|
|
1126
|
+
// --- Admin command group (WP-312 S2, FEAT-969) ---
|
|
1127
|
+
program.addCommand(createAdminCommand());
|
|
1128
|
+
program.addCommand(createFeedbackCommand());
|
|
1129
|
+
program.addCommand(createConflictsCommand());
|
|
1130
|
+
// --- Upgrade command (WP-322 S1: ambient update notification) ---
|
|
1131
|
+
program
|
|
1132
|
+
.command('upgrade')
|
|
1133
|
+
.description(`Upgrade pb CLI to the latest beta (${UPGRADE_COMMAND})`)
|
|
1134
|
+
.action(async () => {
|
|
1135
|
+
await runUpgrade({ currentVersion: cliPackageVersion.version });
|
|
561
1136
|
});
|
|
562
|
-
|
|
1137
|
+
// Parse with global error handler — all uncaught errors route through handleError
|
|
1138
|
+
program.parseAsync(process.argv).catch(handleError);
|
|
563
1139
|
//# sourceMappingURL=index.js.map
|