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