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