@productbrain/cli 0.1.0-beta.1138 → 0.1.0-beta.11385
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 +14 -4
- package/dist/__tests__/adapters.test.js +79 -53
- package/dist/__tests__/adapters.test.js.map +1 -1
- package/dist/__tests__/adminConfig.test.d.ts +18 -0
- package/dist/__tests__/adminConfig.test.d.ts.map +1 -0
- package/dist/__tests__/adminConfig.test.js +221 -0
- package/dist/__tests__/adminConfig.test.js.map +1 -0
- package/dist/__tests__/batch-transformations.test.js +2 -26
- package/dist/__tests__/batch-transformations.test.js.map +1 -1
- package/dist/__tests__/capture-receipt-coaching.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-coaching.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-coaching.test.js +108 -0
- package/dist/__tests__/capture-receipt-coaching.test.js.map +1 -0
- package/dist/__tests__/capture-receipt-role-hint.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-role-hint.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-role-hint.test.js +64 -0
- package/dist/__tests__/capture-receipt-role-hint.test.js.map +1 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.js +45 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.js.map +1 -0
- package/dist/__tests__/capture.test.js +437 -231
- package/dist/__tests__/capture.test.js.map +1 -1
- package/dist/__tests__/cli-error-once.test.d.ts +2 -0
- package/dist/__tests__/cli-error-once.test.d.ts.map +1 -0
- package/dist/__tests__/cli-error-once.test.js +51 -0
- package/dist/__tests__/cli-error-once.test.js.map +1 -0
- package/dist/__tests__/client-binding-guard.test.d.ts +2 -0
- package/dist/__tests__/client-binding-guard.test.d.ts.map +1 -0
- package/dist/__tests__/client-binding-guard.test.js +84 -0
- package/dist/__tests__/client-binding-guard.test.js.map +1 -0
- package/dist/__tests__/coaching-mirror-drift.test.d.ts +2 -0
- package/dist/__tests__/coaching-mirror-drift.test.d.ts.map +1 -0
- package/dist/__tests__/coaching-mirror-drift.test.js +50 -0
- package/dist/__tests__/coaching-mirror-drift.test.js.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts +2 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.js +84 -0
- package/dist/__tests__/codex-prep-parity.test.js.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts +2 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.js +93 -0
- package/dist/__tests__/config-prod-fallthrough.test.js.map +1 -0
- package/dist/__tests__/config.test.js +583 -40
- package/dist/__tests__/config.test.js.map +1 -1
- package/dist/__tests__/constants.test.js +13 -4
- package/dist/__tests__/constants.test.js.map +1 -1
- package/dist/__tests__/constellation.test.js +26 -14
- package/dist/__tests__/constellation.test.js.map +1 -1
- package/dist/__tests__/conversation.test.d.ts +2 -0
- package/dist/__tests__/conversation.test.d.ts.map +1 -0
- package/dist/__tests__/conversation.test.js +113 -0
- package/dist/__tests__/conversation.test.js.map +1 -0
- package/dist/__tests__/entry-formatter.test.d.ts +2 -0
- package/dist/__tests__/entry-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/entry-formatter.test.js +228 -0
- package/dist/__tests__/entry-formatter.test.js.map +1 -0
- package/dist/__tests__/entry-preflight.test.d.ts +2 -0
- package/dist/__tests__/entry-preflight.test.d.ts.map +1 -0
- package/dist/__tests__/entry-preflight.test.js +58 -0
- package/dist/__tests__/entry-preflight.test.js.map +1 -0
- package/dist/__tests__/entryAccept-batch.test.d.ts +2 -0
- package/dist/__tests__/entryAccept-batch.test.d.ts.map +1 -0
- package/dist/__tests__/entryAccept-batch.test.js +305 -0
- package/dist/__tests__/entryAccept-batch.test.js.map +1 -0
- package/dist/__tests__/entryAccept.test.d.ts +2 -0
- package/dist/__tests__/entryAccept.test.d.ts.map +1 -0
- package/dist/__tests__/entryAccept.test.js +582 -0
- package/dist/__tests__/entryAccept.test.js.map +1 -0
- package/dist/__tests__/entryDiscardResolve.test.d.ts +2 -0
- package/dist/__tests__/entryDiscardResolve.test.d.ts.map +1 -0
- package/dist/__tests__/entryDiscardResolve.test.js +28 -0
- package/dist/__tests__/entryDiscardResolve.test.js.map +1 -0
- package/dist/__tests__/entryOwn.test.d.ts +2 -0
- package/dist/__tests__/entryOwn.test.d.ts.map +1 -0
- package/dist/__tests__/entryOwn.test.js +50 -0
- package/dist/__tests__/entryOwn.test.js.map +1 -0
- package/dist/__tests__/entryTick.test.d.ts +2 -0
- package/dist/__tests__/entryTick.test.d.ts.map +1 -0
- package/dist/__tests__/entryTick.test.js +40 -0
- package/dist/__tests__/entryTick.test.js.map +1 -0
- package/dist/__tests__/envelope-contract.test.js +2 -0
- package/dist/__tests__/envelope-contract.test.js.map +1 -1
- package/dist/__tests__/errors.test.js +41 -0
- package/dist/__tests__/errors.test.js.map +1 -1
- package/dist/__tests__/fields.test.js +14 -3
- package/dist/__tests__/fields.test.js.map +1 -1
- package/dist/__tests__/gateway-dry-run-timeout.test.d.ts +2 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.js +70 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.js.map +1 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.d.ts +2 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.js +116 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.js.map +1 -0
- package/dist/__tests__/glossary.test.js +10 -27
- package/dist/__tests__/glossary.test.js.map +1 -1
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts +2 -0
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts.map +1 -0
- package/dist/__tests__/health-gap-kinds-drift.test.js +43 -0
- package/dist/__tests__/health-gap-kinds-drift.test.js.map +1 -0
- package/dist/__tests__/hook-intents.test.js +31 -43
- package/dist/__tests__/hook-intents.test.js.map +1 -1
- package/dist/__tests__/init.test.d.ts +2 -1
- package/dist/__tests__/init.test.d.ts.map +1 -1
- package/dist/__tests__/init.test.js +167 -23
- package/dist/__tests__/init.test.js.map +1 -1
- package/dist/__tests__/kernel-value-sets-drift.test.d.ts +2 -0
- package/dist/__tests__/kernel-value-sets-drift.test.d.ts.map +1 -0
- package/dist/__tests__/kernel-value-sets-drift.test.js +46 -0
- package/dist/__tests__/kernel-value-sets-drift.test.js.map +1 -0
- package/dist/__tests__/kernel-value-sets-generator.test.d.ts +2 -0
- package/dist/__tests__/kernel-value-sets-generator.test.d.ts.map +1 -0
- package/dist/__tests__/kernel-value-sets-generator.test.js +108 -0
- package/dist/__tests__/kernel-value-sets-generator.test.js.map +1 -0
- package/dist/__tests__/login.test.js +18 -1
- package/dist/__tests__/login.test.js.map +1 -1
- package/dist/__tests__/missingPin.test.d.ts +11 -0
- package/dist/__tests__/missingPin.test.d.ts.map +1 -0
- package/dist/__tests__/missingPin.test.js +232 -0
- package/dist/__tests__/missingPin.test.js.map +1 -0
- package/dist/__tests__/notice-marker.test.js +146 -11
- package/dist/__tests__/notice-marker.test.js.map +1 -1
- package/dist/__tests__/orient.test.js +368 -38
- package/dist/__tests__/orient.test.js.map +1 -1
- package/dist/__tests__/perimeter.test.js +1 -1
- package/dist/__tests__/perimeter.test.js.map +1 -1
- package/dist/__tests__/preview-key-refresh.test.js +73 -13
- package/dist/__tests__/preview-key-refresh.test.js.map +1 -1
- package/dist/__tests__/profiles.test.js +498 -8
- package/dist/__tests__/profiles.test.js.map +1 -1
- package/dist/__tests__/prompts.test.js +18 -1
- package/dist/__tests__/prompts.test.js.map +1 -1
- package/dist/__tests__/rate-limit-resilience.test.d.ts +8 -0
- package/dist/__tests__/rate-limit-resilience.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-resilience.test.js +191 -0
- package/dist/__tests__/rate-limit-resilience.test.js.map +1 -0
- package/dist/__tests__/read-target-notice.test.d.ts +2 -0
- package/dist/__tests__/read-target-notice.test.d.ts.map +1 -0
- package/dist/__tests__/read-target-notice.test.js +125 -0
- package/dist/__tests__/read-target-notice.test.js.map +1 -0
- package/dist/__tests__/relate.test.js +246 -14
- package/dist/__tests__/relate.test.js.map +1 -1
- package/dist/__tests__/removed-commands.test.d.ts +2 -0
- package/dist/__tests__/removed-commands.test.d.ts.map +1 -0
- package/dist/__tests__/removed-commands.test.js +99 -0
- package/dist/__tests__/removed-commands.test.js.map +1 -0
- package/dist/__tests__/reply-commands-registered.test.d.ts +2 -0
- package/dist/__tests__/reply-commands-registered.test.d.ts.map +1 -0
- package/dist/__tests__/reply-commands-registered.test.js +81 -0
- package/dist/__tests__/reply-commands-registered.test.js.map +1 -0
- package/dist/__tests__/repo-detect.test.js +18 -38
- package/dist/__tests__/repo-detect.test.js.map +1 -1
- package/dist/__tests__/reportedProfile.test.d.ts +2 -0
- package/dist/__tests__/reportedProfile.test.d.ts.map +1 -0
- package/dist/__tests__/reportedProfile.test.js +328 -0
- package/dist/__tests__/reportedProfile.test.js.map +1 -0
- package/dist/__tests__/restore.test.d.ts +2 -0
- package/dist/__tests__/restore.test.d.ts.map +1 -0
- package/dist/__tests__/restore.test.js +85 -0
- package/dist/__tests__/restore.test.js.map +1 -0
- package/dist/__tests__/route-latency-budget.test.d.ts +2 -0
- package/dist/__tests__/route-latency-budget.test.d.ts.map +1 -0
- package/dist/__tests__/route-latency-budget.test.js +107 -0
- package/dist/__tests__/route-latency-budget.test.js.map +1 -0
- package/dist/__tests__/runner.test.js +59 -44
- package/dist/__tests__/runner.test.js.map +1 -1
- package/dist/__tests__/session-binding-refusal-tenant.test.d.ts +2 -0
- package/dist/__tests__/session-binding-refusal-tenant.test.d.ts.map +1 -0
- package/dist/__tests__/session-binding-refusal-tenant.test.js +112 -0
- package/dist/__tests__/session-binding-refusal-tenant.test.js.map +1 -0
- package/dist/__tests__/session-close-conversation.test.d.ts +2 -0
- package/dist/__tests__/session-close-conversation.test.d.ts.map +1 -0
- package/dist/__tests__/session-close-conversation.test.js +75 -0
- package/dist/__tests__/session-close-conversation.test.js.map +1 -0
- package/dist/__tests__/session-close-loop.test.d.ts +2 -0
- package/dist/__tests__/session-close-loop.test.d.ts.map +1 -0
- package/dist/__tests__/session-close-loop.test.js +259 -0
- package/dist/__tests__/session-close-loop.test.js.map +1 -0
- package/dist/__tests__/session-label.test.d.ts +2 -0
- package/dist/__tests__/session-label.test.d.ts.map +1 -0
- package/dist/__tests__/session-label.test.js +46 -0
- package/dist/__tests__/session-label.test.js.map +1 -0
- package/dist/__tests__/session-list-show.test.d.ts +2 -0
- package/dist/__tests__/session-list-show.test.d.ts.map +1 -0
- package/dist/__tests__/session-list-show.test.js +173 -0
- package/dist/__tests__/session-list-show.test.js.map +1 -0
- package/dist/__tests__/session-pinned-role.test.d.ts +2 -0
- package/dist/__tests__/session-pinned-role.test.d.ts.map +1 -0
- package/dist/__tests__/session-pinned-role.test.js +305 -0
- package/dist/__tests__/session-pinned-role.test.js.map +1 -0
- package/dist/__tests__/session-reset.test.js +23 -7
- package/dist/__tests__/session-reset.test.js.map +1 -1
- package/dist/__tests__/session-resume-backstop.test.js +42 -0
- package/dist/__tests__/session-resume-backstop.test.js.map +1 -1
- package/dist/__tests__/session-role-name-sanitize.test.d.ts +2 -0
- package/dist/__tests__/session-role-name-sanitize.test.d.ts.map +1 -0
- package/dist/__tests__/session-role-name-sanitize.test.js +122 -0
- package/dist/__tests__/session-role-name-sanitize.test.js.map +1 -0
- package/dist/__tests__/session-start-key-refresh.test.js +47 -28
- package/dist/__tests__/session-start-key-refresh.test.js.map +1 -1
- package/dist/__tests__/session-state-machine.test.js +190 -9
- package/dist/__tests__/session-state-machine.test.js.map +1 -1
- package/dist/__tests__/session-switch.test.js +217 -4
- package/dist/__tests__/session-switch.test.js.map +1 -1
- package/dist/__tests__/session-touch.test.js +48 -107
- package/dist/__tests__/session-touch.test.js.map +1 -1
- package/dist/__tests__/sessionBinding.test.d.ts +2 -0
- package/dist/__tests__/sessionBinding.test.d.ts.map +1 -0
- package/dist/__tests__/sessionBinding.test.js +118 -0
- package/dist/__tests__/sessionBinding.test.js.map +1 -0
- package/dist/__tests__/sessionByIdLookup.test.d.ts +2 -0
- package/dist/__tests__/sessionByIdLookup.test.d.ts.map +1 -0
- package/dist/__tests__/sessionByIdLookup.test.js +63 -0
- package/dist/__tests__/sessionByIdLookup.test.js.map +1 -0
- package/dist/__tests__/skill-vocabulary.test.d.ts +1 -1
- package/dist/__tests__/skill-vocabulary.test.js +7 -2
- package/dist/__tests__/skill-vocabulary.test.js.map +1 -1
- package/dist/__tests__/state.test.js +21 -1
- package/dist/__tests__/state.test.js.map +1 -1
- package/dist/__tests__/stillTrue.test.d.ts +2 -0
- package/dist/__tests__/stillTrue.test.d.ts.map +1 -0
- package/dist/__tests__/stillTrue.test.js +52 -0
- package/dist/__tests__/stillTrue.test.js.map +1 -0
- package/dist/__tests__/strip.test.js +57 -3
- package/dist/__tests__/strip.test.js.map +1 -1
- package/dist/__tests__/surfaces.test.js +3 -4
- package/dist/__tests__/surfaces.test.js.map +1 -1
- package/dist/__tests__/tenant-notice-write-path.test.d.ts +2 -0
- package/dist/__tests__/tenant-notice-write-path.test.d.ts.map +1 -0
- package/dist/__tests__/tenant-notice-write-path.test.js +183 -0
- package/dist/__tests__/tenant-notice-write-path.test.js.map +1 -0
- package/dist/__tests__/update-check.test.js +21 -1
- package/dist/__tests__/update-check.test.js.map +1 -1
- package/dist/__tests__/update.test.js +470 -8
- package/dist/__tests__/update.test.js.map +1 -1
- package/dist/__tests__/upgrade-runner.test.js +0 -3
- package/dist/__tests__/upgrade-runner.test.js.map +1 -1
- package/dist/__tests__/verify-formatter.test.d.ts +2 -0
- package/dist/__tests__/verify-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/verify-formatter.test.js +85 -0
- package/dist/__tests__/verify-formatter.test.js.map +1 -0
- package/dist/__tests__/vocabulary-leak.test.d.ts +1 -7
- package/dist/__tests__/vocabulary-leak.test.d.ts.map +1 -1
- package/dist/__tests__/vocabulary-leak.test.js +8 -115
- package/dist/__tests__/vocabulary-leak.test.js.map +1 -1
- package/dist/__tests__/workspace.test.js +11 -72
- package/dist/__tests__/workspace.test.js.map +1 -1
- package/dist/__tests__/workspaceNotice.test.d.ts +2 -0
- package/dist/__tests__/workspaceNotice.test.d.ts.map +1 -0
- package/dist/__tests__/workspaceNotice.test.js +559 -0
- package/dist/__tests__/workspaceNotice.test.js.map +1 -0
- package/dist/commands/__tests__/quality.test.d.ts +2 -0
- package/dist/commands/__tests__/quality.test.d.ts.map +1 -0
- package/dist/commands/__tests__/quality.test.js +250 -0
- package/dist/commands/__tests__/quality.test.js.map +1 -0
- package/dist/commands/__tests__/rework.test.d.ts +2 -0
- package/dist/commands/__tests__/rework.test.d.ts.map +1 -0
- package/dist/commands/__tests__/rework.test.js +149 -0
- package/dist/commands/__tests__/rework.test.js.map +1 -0
- package/dist/commands/__tests__/tensionsList.test.d.ts +2 -0
- package/dist/commands/__tests__/tensionsList.test.d.ts.map +1 -0
- package/dist/commands/__tests__/tensionsList.test.js +63 -0
- package/dist/commands/__tests__/tensionsList.test.js.map +1 -0
- package/dist/commands/accept-policy.d.ts +10 -0
- package/dist/commands/accept-policy.d.ts.map +1 -0
- package/dist/commands/accept-policy.js +107 -0
- package/dist/commands/accept-policy.js.map +1 -0
- package/dist/commands/admin/cockpit.d.ts +2 -13
- package/dist/commands/admin/cockpit.d.ts.map +1 -1
- package/dist/commands/admin/cockpit.js +5 -5
- package/dist/commands/admin/cockpit.js.map +1 -1
- package/dist/commands/admin/index.d.ts +49 -0
- package/dist/commands/admin/index.d.ts.map +1 -1
- package/dist/commands/admin/index.js +148 -29
- package/dist/commands/admin/index.js.map +1 -1
- package/dist/commands/admin/index.test.d.ts +2 -0
- package/dist/commands/admin/index.test.d.ts.map +1 -0
- package/dist/commands/admin/index.test.js +94 -0
- package/dist/commands/admin/index.test.js.map +1 -0
- package/dist/commands/admin/inspect.d.ts.map +1 -1
- package/dist/commands/admin/inspect.js +2 -7
- package/dist/commands/admin/inspect.js.map +1 -1
- package/dist/commands/admin/probe.d.ts +75 -0
- package/dist/commands/admin/probe.d.ts.map +1 -0
- package/dist/commands/admin/probe.js +224 -0
- package/dist/commands/admin/probe.js.map +1 -0
- package/dist/commands/admin/probe.test.d.ts +2 -0
- package/dist/commands/admin/probe.test.d.ts.map +1 -0
- package/dist/commands/admin/probe.test.js +193 -0
- package/dist/commands/admin/probe.test.js.map +1 -0
- package/dist/commands/admin/run.d.ts +43 -0
- package/dist/commands/admin/run.d.ts.map +1 -0
- package/dist/commands/admin/run.js +78 -0
- package/dist/commands/admin/run.js.map +1 -0
- package/dist/commands/admin/run.test.d.ts +18 -0
- package/dist/commands/admin/run.test.d.ts.map +1 -0
- package/dist/commands/admin/run.test.js +168 -0
- package/dist/commands/admin/run.test.js.map +1 -0
- package/dist/commands/admin/seed.d.ts +6 -21
- package/dist/commands/admin/seed.d.ts.map +1 -1
- package/dist/commands/admin/seed.js +41 -310
- package/dist/commands/admin/seed.js.map +1 -1
- package/dist/commands/admin/seed.test.d.ts +3 -4
- package/dist/commands/admin/seed.test.d.ts.map +1 -1
- package/dist/commands/admin/seed.test.js +26 -76
- package/dist/commands/admin/seed.test.js.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.d.ts.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.js +3 -84
- package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.test.d.ts +5 -3
- package/dist/commands/admin/seedRegistryEntries.test.d.ts.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.test.js +60 -26
- package/dist/commands/admin/seedRegistryEntries.test.js.map +1 -1
- package/dist/commands/admin/seedRowType.d.ts +22 -0
- package/dist/commands/admin/seedRowType.d.ts.map +1 -0
- package/dist/commands/admin/seedRowType.js +2 -0
- package/dist/commands/admin/seedRowType.js.map +1 -0
- package/dist/commands/admin/seedStatusColor.d.ts +9 -0
- package/dist/commands/admin/seedStatusColor.d.ts.map +1 -0
- package/dist/commands/admin/seedStatusColor.js +19 -0
- package/dist/commands/admin/seedStatusColor.js.map +1 -0
- package/dist/commands/admin/seedStatusColor.test.d.ts +2 -0
- package/dist/commands/admin/seedStatusColor.test.d.ts.map +1 -0
- package/dist/commands/admin/seedStatusColor.test.js +31 -0
- package/dist/commands/admin/seedStatusColor.test.js.map +1 -0
- package/dist/commands/brief.d.ts.map +1 -1
- package/dist/commands/brief.js +24 -2
- package/dist/commands/brief.js.map +1 -1
- package/dist/commands/capture.d.ts +17 -16
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +105 -288
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chain-walk.d.ts.map +1 -1
- package/dist/commands/chain-walk.js.map +1 -1
- package/dist/commands/changes.d.ts.map +1 -1
- package/dist/commands/changes.js.map +1 -1
- package/dist/commands/codex-prep.d.ts +11 -1
- package/dist/commands/codex-prep.d.ts.map +1 -1
- package/dist/commands/codex-prep.js +14 -83
- package/dist/commands/codex-prep.js.map +1 -1
- package/dist/commands/collections.d.ts +1 -1
- package/dist/commands/collections.d.ts.map +1 -1
- package/dist/commands/collections.js +1 -1
- package/dist/commands/collections.js.map +1 -1
- package/dist/commands/conflicts.d.ts +35 -0
- package/dist/commands/conflicts.d.ts.map +1 -0
- package/dist/commands/conflicts.js +194 -0
- package/dist/commands/conflicts.js.map +1 -0
- package/dist/commands/conflicts.test.d.ts +2 -0
- package/dist/commands/conflicts.test.d.ts.map +1 -0
- package/dist/commands/conflicts.test.js +179 -0
- package/dist/commands/conflicts.test.js.map +1 -0
- package/dist/commands/connect-config.test.js +12 -9
- package/dist/commands/connect-config.test.js.map +1 -1
- package/dist/commands/connect-decline.test.d.ts +2 -0
- package/dist/commands/connect-decline.test.d.ts.map +1 -0
- package/dist/commands/connect-decline.test.js +70 -0
- package/dist/commands/connect-decline.test.js.map +1 -0
- package/dist/commands/connect-integration.test.js +29 -15
- package/dist/commands/connect-integration.test.js.map +1 -1
- package/dist/commands/connect-legacy-migration.test.d.ts +2 -0
- package/dist/commands/connect-legacy-migration.test.d.ts.map +1 -0
- package/dist/commands/connect-legacy-migration.test.js +108 -0
- package/dist/commands/connect-legacy-migration.test.js.map +1 -0
- package/dist/commands/connect-redeem-failure.test.d.ts +2 -0
- package/dist/commands/connect-redeem-failure.test.d.ts.map +1 -0
- package/dist/commands/connect-redeem-failure.test.js +133 -0
- package/dist/commands/connect-redeem-failure.test.js.map +1 -0
- package/dist/commands/connect-screens.d.ts +11 -17
- package/dist/commands/connect-screens.d.ts.map +1 -1
- package/dist/commands/connect-screens.js +19 -81
- package/dist/commands/connect-screens.js.map +1 -1
- package/dist/commands/connect-screens.test.d.ts +2 -0
- package/dist/commands/connect-screens.test.d.ts.map +1 -0
- package/dist/commands/connect-screens.test.js +19 -0
- package/dist/commands/connect-screens.test.js.map +1 -0
- package/dist/commands/connect-seal.test.d.ts +2 -0
- package/dist/commands/connect-seal.test.d.ts.map +1 -0
- package/dist/commands/connect-seal.test.js +54 -0
- package/dist/commands/connect-seal.test.js.map +1 -0
- package/dist/commands/connect.d.ts +16 -14
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +247 -87
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connect.test.js +247 -29
- package/dist/commands/connect.test.js.map +1 -1
- package/dist/commands/constellation.d.ts.map +1 -1
- package/dist/commands/constellation.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/cross-cut.d.ts.map +1 -1
- package/dist/commands/cross-cut.js.map +1 -1
- package/dist/commands/direction.d.ts +10 -0
- package/dist/commands/direction.d.ts.map +1 -0
- package/dist/commands/direction.js +79 -0
- package/dist/commands/direction.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +112 -46
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +220 -29
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/entryAccept.d.ts +26 -0
- package/dist/commands/entryAccept.d.ts.map +1 -0
- package/dist/commands/entryAccept.js +309 -0
- package/dist/commands/entryAccept.js.map +1 -0
- package/dist/commands/entryDiscardResolve.d.ts +9 -0
- package/dist/commands/entryDiscardResolve.d.ts.map +1 -0
- package/dist/commands/entryDiscardResolve.js +27 -0
- package/dist/commands/entryDiscardResolve.js.map +1 -0
- package/dist/commands/entryOwn.d.ts +5 -0
- package/dist/commands/entryOwn.d.ts.map +1 -0
- package/dist/commands/entryOwn.js +17 -0
- package/dist/commands/entryOwn.js.map +1 -0
- package/dist/commands/entryPreflight.d.ts +8 -0
- package/dist/commands/entryPreflight.d.ts.map +1 -0
- package/dist/commands/entryPreflight.js +48 -0
- package/dist/commands/entryPreflight.js.map +1 -0
- package/dist/commands/entryTick.d.ts +8 -0
- package/dist/commands/entryTick.d.ts.map +1 -0
- package/dist/commands/entryTick.js +43 -0
- package/dist/commands/entryTick.js.map +1 -0
- package/dist/commands/feedback.d.ts +39 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +176 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/feedback.test.d.ts +2 -0
- package/dist/commands/feedback.test.d.ts.map +1 -0
- package/dist/commands/feedback.test.js +117 -0
- package/dist/commands/feedback.test.js.map +1 -0
- package/dist/commands/fields.d.ts.map +1 -1
- package/dist/commands/fields.js +1 -1
- package/dist/commands/fields.js.map +1 -1
- package/dist/commands/files.d.ts +26 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +160 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/files.test.d.ts +2 -0
- package/dist/commands/files.test.d.ts.map +1 -0
- package/dist/commands/files.test.js +278 -0
- package/dist/commands/files.test.js.map +1 -0
- package/dist/commands/handshakeCursorSkillCleanup.d.ts +36 -0
- package/dist/commands/handshakeCursorSkillCleanup.d.ts.map +1 -0
- package/dist/commands/handshakeCursorSkillCleanup.js +110 -0
- package/dist/commands/handshakeCursorSkillCleanup.js.map +1 -0
- package/dist/commands/handshakeDriftClassification.d.ts +33 -0
- package/dist/commands/handshakeDriftClassification.d.ts.map +1 -0
- package/dist/commands/handshakeDriftClassification.js +62 -0
- package/dist/commands/handshakeDriftClassification.js.map +1 -0
- package/dist/commands/history.d.ts +32 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +55 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/history.test.d.ts +2 -0
- package/dist/commands/history.test.d.ts.map +1 -0
- package/dist/commands/history.test.js +121 -0
- package/dist/commands/history.test.js.map +1 -0
- package/dist/commands/init.d.ts +15 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +111 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +15 -11
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/organisation.d.ts +12 -0
- package/dist/commands/organisation.d.ts.map +1 -0
- package/dist/commands/organisation.js +146 -0
- package/dist/commands/organisation.js.map +1 -0
- package/dist/commands/organisation.test.d.ts +2 -0
- package/dist/commands/organisation.test.d.ts.map +1 -0
- package/dist/commands/organisation.test.js +116 -0
- package/dist/commands/organisation.test.js.map +1 -0
- package/dist/commands/organisationHierarchy.d.ts +15 -0
- package/dist/commands/organisationHierarchy.d.ts.map +1 -0
- package/dist/commands/organisationHierarchy.js +114 -0
- package/dist/commands/organisationHierarchy.js.map +1 -0
- package/dist/commands/organisationHierarchy.test.d.ts +2 -0
- package/dist/commands/organisationHierarchy.test.d.ts.map +1 -0
- package/dist/commands/organisationHierarchy.test.js +144 -0
- package/dist/commands/organisationHierarchy.test.js.map +1 -0
- package/dist/commands/organisationWrite.d.ts +20 -0
- package/dist/commands/organisationWrite.d.ts.map +1 -0
- package/dist/commands/organisationWrite.js +41 -0
- package/dist/commands/organisationWrite.js.map +1 -0
- package/dist/commands/orient.d.ts +45 -96
- package/dist/commands/orient.d.ts.map +1 -1
- package/dist/commands/orient.js +139 -54
- package/dist/commands/orient.js.map +1 -1
- package/dist/commands/outcome.d.ts +90 -0
- package/dist/commands/outcome.d.ts.map +1 -0
- package/dist/commands/outcome.js +201 -0
- package/dist/commands/outcome.js.map +1 -0
- package/dist/commands/outcome.test.d.ts +2 -0
- package/dist/commands/outcome.test.d.ts.map +1 -0
- package/dist/commands/outcome.test.js +320 -0
- package/dist/commands/outcome.test.js.map +1 -0
- package/dist/commands/people.d.ts +6 -0
- package/dist/commands/people.d.ts.map +1 -0
- package/dist/commands/people.js +23 -0
- package/dist/commands/people.js.map +1 -0
- package/dist/commands/people.test.d.ts +2 -0
- package/dist/commands/people.test.d.ts.map +1 -0
- package/dist/commands/people.test.js +61 -0
- package/dist/commands/people.test.js.map +1 -0
- package/dist/commands/profile.d.ts +23 -2
- package/dist/commands/profile.d.ts.map +1 -1
- package/dist/commands/profile.js +192 -35
- package/dist/commands/profile.js.map +1 -1
- package/dist/commands/quality.d.ts +28 -0
- package/dist/commands/quality.d.ts.map +1 -0
- package/dist/commands/quality.js +74 -0
- package/dist/commands/quality.js.map +1 -0
- package/dist/commands/questions.d.ts +23 -0
- package/dist/commands/questions.d.ts.map +1 -0
- package/dist/commands/questions.js +238 -0
- package/dist/commands/questions.js.map +1 -0
- package/dist/commands/questions.test.d.ts +2 -0
- package/dist/commands/questions.test.d.ts.map +1 -0
- package/dist/commands/questions.test.js +159 -0
- package/dist/commands/questions.test.js.map +1 -0
- package/dist/commands/relate.d.ts +1 -0
- package/dist/commands/relate.d.ts.map +1 -1
- package/dist/commands/relate.js +85 -13
- package/dist/commands/relate.js.map +1 -1
- package/dist/commands/restore.d.ts +2 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +83 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/rework.d.ts +24 -0
- package/dist/commands/rework.d.ts.map +1 -0
- package/dist/commands/rework.js +97 -0
- package/dist/commands/rework.js.map +1 -0
- package/dist/commands/role.d.ts +90 -0
- package/dist/commands/role.d.ts.map +1 -0
- package/dist/commands/role.js +236 -0
- package/dist/commands/role.js.map +1 -0
- package/dist/commands/role.test.d.ts +2 -0
- package/dist/commands/role.test.d.ts.map +1 -0
- package/dist/commands/role.test.js +354 -0
- package/dist/commands/role.test.js.map +1 -0
- package/dist/commands/scoreboard.d.ts +26 -0
- package/dist/commands/scoreboard.d.ts.map +1 -0
- package/dist/commands/scoreboard.js +40 -0
- package/dist/commands/scoreboard.js.map +1 -0
- package/dist/commands/search.d.ts +2 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +5 -4
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts +36 -5
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +301 -155
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +101 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/status.test.d.ts +2 -0
- package/dist/commands/status.test.d.ts.map +1 -0
- package/dist/commands/status.test.js +75 -0
- package/dist/commands/status.test.js.map +1 -0
- package/dist/commands/stillTrue.d.ts +14 -0
- package/dist/commands/stillTrue.d.ts.map +1 -0
- package/dist/commands/stillTrue.js +48 -0
- package/dist/commands/stillTrue.js.map +1 -0
- package/dist/commands/tensionsList.d.ts +5 -0
- package/dist/commands/tensionsList.d.ts.map +1 -0
- package/dist/commands/tensionsList.js +27 -0
- package/dist/commands/tensionsList.js.map +1 -0
- package/dist/commands/update.d.ts +21 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +175 -42
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upgrade.js +2 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/usage.d.ts.map +1 -1
- package/dist/commands/usage.js +0 -18
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +5 -0
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/welcome.d.ts.map +1 -1
- package/dist/commands/welcome.js +7 -3
- package/dist/commands/welcome.js.map +1 -1
- package/dist/commands/whoami.d.ts +10 -2
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +77 -20
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/whoami.test.js +86 -6
- package/dist/commands/whoami.test.js.map +1 -1
- package/dist/commands/workspace.d.ts +7 -74
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +9 -70
- package/dist/commands/workspace.js.map +1 -1
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.d.ts +2 -0
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.js +49 -0
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.js.map +1 -0
- package/dist/formatters/__tests__/orient-provenance.test.d.ts +2 -3
- package/dist/formatters/__tests__/orient-provenance.test.d.ts.map +1 -1
- package/dist/formatters/__tests__/orient-provenance.test.js +41 -176
- package/dist/formatters/__tests__/orient-provenance.test.js.map +1 -1
- package/dist/formatters/__tests__/orient-ruleLists.test.d.ts +2 -0
- package/dist/formatters/__tests__/orient-ruleLists.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/orient-ruleLists.test.js +93 -0
- package/dist/formatters/__tests__/orient-ruleLists.test.js.map +1 -0
- package/dist/formatters/__tests__/session-list-show.test.d.ts +2 -0
- package/dist/formatters/__tests__/session-list-show.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/session-list-show.test.js +195 -0
- package/dist/formatters/__tests__/session-list-show.test.js.map +1 -0
- package/dist/formatters/__tests__/session.test.js +172 -8
- package/dist/formatters/__tests__/session.test.js.map +1 -1
- package/dist/formatters/__tests__/tensionsList.test.d.ts +2 -0
- package/dist/formatters/__tests__/tensionsList.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/tensionsList.test.js +30 -0
- package/dist/formatters/__tests__/tensionsList.test.js.map +1 -0
- package/dist/formatters/brief.d.ts +6 -15
- package/dist/formatters/brief.d.ts.map +1 -1
- package/dist/formatters/brief.js +16 -14
- package/dist/formatters/brief.js.map +1 -1
- package/dist/formatters/brief.test.d.ts +2 -0
- package/dist/formatters/brief.test.d.ts.map +1 -0
- package/dist/formatters/brief.test.js +21 -0
- package/dist/formatters/brief.test.js.map +1 -0
- package/dist/formatters/capture.d.ts +24 -13
- package/dist/formatters/capture.d.ts.map +1 -1
- package/dist/formatters/capture.js +36 -14
- package/dist/formatters/capture.js.map +1 -1
- package/dist/formatters/coaching.d.ts +59 -0
- package/dist/formatters/coaching.d.ts.map +1 -0
- package/dist/formatters/coaching.js +51 -0
- package/dist/formatters/coaching.js.map +1 -0
- package/dist/formatters/collections.d.ts +0 -1
- package/dist/formatters/collections.d.ts.map +1 -1
- package/dist/formatters/collections.js +14 -5
- package/dist/formatters/collections.js.map +1 -1
- package/dist/formatters/conflicts.d.ts +71 -0
- package/dist/formatters/conflicts.d.ts.map +1 -0
- package/dist/formatters/conflicts.js +105 -0
- package/dist/formatters/conflicts.js.map +1 -0
- package/dist/formatters/conflicts.test.d.ts +2 -0
- package/dist/formatters/conflicts.test.d.ts.map +1 -0
- package/dist/formatters/conflicts.test.js +166 -0
- package/dist/formatters/conflicts.test.js.map +1 -0
- package/dist/formatters/context.d.ts +1 -1
- package/dist/formatters/context.d.ts.map +1 -1
- package/dist/formatters/context.js.map +1 -1
- package/dist/formatters/direction.d.ts +48 -0
- package/dist/formatters/direction.d.ts.map +1 -0
- package/dist/formatters/direction.js +75 -0
- package/dist/formatters/direction.js.map +1 -0
- package/dist/formatters/direction.test.d.ts +2 -0
- package/dist/formatters/direction.test.d.ts.map +1 -0
- package/dist/formatters/direction.test.js +70 -0
- package/dist/formatters/direction.test.js.map +1 -0
- package/dist/formatters/entry.d.ts +56 -3
- package/dist/formatters/entry.d.ts.map +1 -1
- package/dist/formatters/entry.js +69 -8
- package/dist/formatters/entry.js.map +1 -1
- package/dist/formatters/entryAccept.d.ts +83 -0
- package/dist/formatters/entryAccept.d.ts.map +1 -0
- package/dist/formatters/entryAccept.js +79 -0
- package/dist/formatters/entryAccept.js.map +1 -0
- package/dist/formatters/feedback.d.ts +61 -0
- package/dist/formatters/feedback.d.ts.map +1 -0
- package/dist/formatters/feedback.js +95 -0
- package/dist/formatters/feedback.js.map +1 -0
- package/dist/formatters/feedback.test.d.ts +2 -0
- package/dist/formatters/feedback.test.d.ts.map +1 -0
- package/dist/formatters/feedback.test.js +142 -0
- package/dist/formatters/feedback.test.js.map +1 -0
- package/dist/formatters/fields.d.ts +7 -1
- package/dist/formatters/fields.d.ts.map +1 -1
- package/dist/formatters/fields.js +9 -3
- package/dist/formatters/fields.js.map +1 -1
- package/dist/formatters/fields.test.d.ts +2 -0
- package/dist/formatters/fields.test.d.ts.map +1 -0
- package/dist/formatters/fields.test.js +42 -0
- package/dist/formatters/fields.test.js.map +1 -0
- package/dist/formatters/handshake.d.ts +24 -6
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +34 -15
- package/dist/formatters/handshake.js.map +1 -1
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts +2 -0
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts.map +1 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js +22 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js.map +1 -0
- package/dist/formatters/orient.d.ts +92 -145
- package/dist/formatters/orient.d.ts.map +1 -1
- package/dist/formatters/orient.js +143 -183
- package/dist/formatters/orient.js.map +1 -1
- package/dist/formatters/orient.rcrtMiss.test.d.ts +2 -0
- package/dist/formatters/orient.rcrtMiss.test.d.ts.map +1 -0
- package/dist/formatters/orient.rcrtMiss.test.js +77 -0
- package/dist/formatters/orient.rcrtMiss.test.js.map +1 -0
- package/dist/formatters/orient.rituals.test.d.ts +2 -0
- package/dist/formatters/orient.rituals.test.d.ts.map +1 -0
- package/dist/formatters/orient.rituals.test.js +72 -0
- package/dist/formatters/orient.rituals.test.js.map +1 -0
- package/dist/formatters/orientDegradation.d.ts +38 -0
- package/dist/formatters/orientDegradation.d.ts.map +1 -0
- package/dist/formatters/orientDegradation.js +50 -0
- package/dist/formatters/orientDegradation.js.map +1 -0
- package/dist/formatters/orientDegradation.test.d.ts +2 -0
- package/dist/formatters/orientDegradation.test.d.ts.map +1 -0
- package/dist/formatters/orientDegradation.test.js +28 -0
- package/dist/formatters/orientDegradation.test.js.map +1 -0
- package/dist/formatters/orientDirection.d.ts +25 -0
- package/dist/formatters/orientDirection.d.ts.map +1 -0
- package/dist/formatters/orientDirection.js +7 -0
- package/dist/formatters/orientDirection.js.map +1 -0
- package/dist/formatters/orientDirection.test.d.ts +2 -0
- package/dist/formatters/orientDirection.test.d.ts.map +1 -0
- package/dist/formatters/orientDirection.test.js +48 -0
- package/dist/formatters/orientDirection.test.js.map +1 -0
- package/dist/formatters/orientRetrievalMiss.d.ts +22 -0
- package/dist/formatters/orientRetrievalMiss.d.ts.map +1 -0
- package/dist/formatters/orientRetrievalMiss.js +17 -0
- package/dist/formatters/orientRetrievalMiss.js.map +1 -0
- package/dist/formatters/plannedWorkCounts.d.ts +19 -0
- package/dist/formatters/plannedWorkCounts.d.ts.map +1 -0
- package/dist/formatters/plannedWorkCounts.js +17 -0
- package/dist/formatters/plannedWorkCounts.js.map +1 -0
- package/dist/formatters/qualityChecks.d.ts +14 -0
- package/dist/formatters/qualityChecks.d.ts.map +1 -0
- package/dist/formatters/qualityChecks.js +97 -0
- package/dist/formatters/qualityChecks.js.map +1 -0
- package/dist/formatters/questions.d.ts +76 -0
- package/dist/formatters/questions.d.ts.map +1 -0
- package/dist/formatters/questions.js +122 -0
- package/dist/formatters/questions.js.map +1 -0
- package/dist/formatters/questions.test.d.ts +2 -0
- package/dist/formatters/questions.test.d.ts.map +1 -0
- package/dist/formatters/questions.test.js +156 -0
- package/dist/formatters/questions.test.js.map +1 -0
- package/dist/formatters/relate.d.ts +13 -2
- package/dist/formatters/relate.d.ts.map +1 -1
- package/dist/formatters/relate.js +15 -5
- package/dist/formatters/relate.js.map +1 -1
- package/dist/formatters/relate.test.d.ts +2 -0
- package/dist/formatters/relate.test.d.ts.map +1 -0
- package/dist/formatters/relate.test.js +91 -0
- package/dist/formatters/relate.test.js.map +1 -0
- package/dist/formatters/scoreboard.d.ts +11 -0
- package/dist/formatters/scoreboard.d.ts.map +1 -0
- package/dist/formatters/scoreboard.js +156 -0
- package/dist/formatters/scoreboard.js.map +1 -0
- package/dist/formatters/scoreboard.test.d.ts +2 -0
- package/dist/formatters/scoreboard.test.d.ts.map +1 -0
- package/dist/formatters/scoreboard.test.js +284 -0
- package/dist/formatters/scoreboard.test.js.map +1 -0
- package/dist/formatters/search.d.ts +24 -0
- package/dist/formatters/search.d.ts.map +1 -1
- package/dist/formatters/search.js +26 -11
- package/dist/formatters/search.js.map +1 -1
- package/dist/formatters/search.test.d.ts +2 -0
- package/dist/formatters/search.test.d.ts.map +1 -0
- package/dist/formatters/search.test.js +86 -0
- package/dist/formatters/search.test.js.map +1 -0
- package/dist/formatters/session-feedback.test.d.ts +2 -0
- package/dist/formatters/session-feedback.test.d.ts.map +1 -0
- package/dist/formatters/session-feedback.test.js +124 -0
- package/dist/formatters/session-feedback.test.js.map +1 -0
- package/dist/formatters/session.d.ts +121 -5
- package/dist/formatters/session.d.ts.map +1 -1
- package/dist/formatters/session.js +319 -31
- package/dist/formatters/session.js.map +1 -1
- package/dist/formatters/spineCheck.d.ts +14 -0
- package/dist/formatters/spineCheck.d.ts.map +1 -0
- package/dist/formatters/spineCheck.js +113 -0
- package/dist/formatters/spineCheck.js.map +1 -0
- package/dist/formatters/spineCheck.test.d.ts +2 -0
- package/dist/formatters/spineCheck.test.d.ts.map +1 -0
- package/dist/formatters/spineCheck.test.js +76 -0
- package/dist/formatters/spineCheck.test.js.map +1 -0
- package/dist/formatters/tensionsList.d.ts +17 -0
- package/dist/formatters/tensionsList.d.ts.map +1 -0
- package/dist/formatters/tensionsList.js +33 -0
- package/dist/formatters/tensionsList.js.map +1 -0
- package/dist/formatters/update.d.ts +26 -0
- package/dist/formatters/update.d.ts.map +1 -1
- package/dist/formatters/update.js +39 -7
- package/dist/formatters/update.js.map +1 -1
- package/dist/formatters/update.test.d.ts +2 -0
- package/dist/formatters/update.test.d.ts.map +1 -0
- package/dist/formatters/update.test.js +71 -0
- package/dist/formatters/update.test.js.map +1 -0
- package/dist/formatters/verify.d.ts +12 -4
- package/dist/formatters/verify.d.ts.map +1 -1
- package/dist/formatters/verify.js +20 -2
- package/dist/formatters/verify.js.map +1 -1
- package/dist/generated/healthGapKinds.generated.d.ts +12 -0
- package/dist/generated/healthGapKinds.generated.d.ts.map +1 -0
- package/dist/generated/healthGapKinds.generated.js +16 -0
- package/dist/generated/healthGapKinds.generated.js.map +1 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.d.ts +12 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.d.ts.map +1 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.js +11 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.js.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts +54 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.js +264 -0
- package/dist/generated/routeLatencyBudget.generated.js.map +1 -0
- package/dist/generated/sourceSurfaces.generated.d.ts +12 -0
- package/dist/generated/sourceSurfaces.generated.d.ts.map +1 -0
- package/dist/generated/sourceSurfaces.generated.js +11 -0
- package/dist/generated/sourceSurfaces.generated.js.map +1 -0
- package/dist/generators/adapters.d.ts +39 -6
- package/dist/generators/adapters.d.ts.map +1 -1
- package/dist/generators/adapters.js +88 -89
- package/dist/generators/adapters.js.map +1 -1
- package/dist/generators/adapters.test.js +14 -6
- package/dist/generators/adapters.test.js.map +1 -1
- package/dist/generators/briefing-projections.test.d.ts +2 -0
- package/dist/generators/briefing-projections.test.d.ts.map +1 -0
- package/dist/generators/briefing-projections.test.js +98 -0
- package/dist/generators/briefing-projections.test.js.map +1 -0
- package/dist/generators/context-md.d.ts +7 -2
- package/dist/generators/context-md.d.ts.map +1 -1
- package/dist/generators/context-md.js +14 -53
- package/dist/generators/context-md.js.map +1 -1
- package/dist/generators/everyone-rules-md.d.ts +9 -0
- package/dist/generators/everyone-rules-md.d.ts.map +1 -0
- package/dist/generators/everyone-rules-md.js +21 -0
- package/dist/generators/everyone-rules-md.js.map +1 -0
- package/dist/generators/noProjectionAssets.d.ts +15 -0
- package/dist/generators/noProjectionAssets.d.ts.map +1 -0
- package/dist/generators/noProjectionAssets.js +6 -0
- package/dist/generators/noProjectionAssets.js.map +1 -0
- package/dist/generators/portable-knowledge.d.ts +9 -26
- package/dist/generators/portable-knowledge.d.ts.map +1 -1
- package/dist/generators/portable-knowledge.js +11 -125
- package/dist/generators/portable-knowledge.js.map +1 -1
- package/dist/generators/portable-knowledge.test.js +82 -267
- package/dist/generators/portable-knowledge.test.js.map +1 -1
- package/dist/generators/region-projections.d.ts +0 -1
- package/dist/generators/region-projections.d.ts.map +1 -1
- package/dist/generators/region-projections.js +7 -5
- package/dist/generators/region-projections.js.map +1 -1
- package/dist/generators/region-projections.test.js +10 -15
- package/dist/generators/region-projections.test.js.map +1 -1
- package/dist/generators/region.test.js +9 -10
- package/dist/generators/region.test.js.map +1 -1
- package/dist/generators/retired-projections.d.ts +12 -0
- package/dist/generators/retired-projections.d.ts.map +1 -0
- package/dist/generators/retired-projections.js +75 -0
- package/dist/generators/retired-projections.js.map +1 -0
- package/dist/generators/retired-projections.test.d.ts +2 -0
- package/dist/generators/retired-projections.test.d.ts.map +1 -0
- package/dist/generators/retired-projections.test.js +64 -0
- package/dist/generators/retired-projections.test.js.map +1 -0
- package/dist/handleCliError.d.ts +30 -0
- package/dist/handleCliError.d.ts.map +1 -0
- package/dist/handleCliError.js +91 -0
- package/dist/handleCliError.js.map +1 -0
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +168 -610
- package/dist/index.js.map +1 -1
- package/dist/lib/__tests__/parseFields.test.d.ts +2 -0
- package/dist/lib/__tests__/parseFields.test.d.ts.map +1 -0
- package/dist/lib/__tests__/parseFields.test.js +40 -0
- package/dist/lib/__tests__/parseFields.test.js.map +1 -0
- package/dist/lib/adminConfig.d.ts +48 -0
- package/dist/lib/adminConfig.d.ts.map +1 -0
- package/dist/lib/adminConfig.js +130 -0
- package/dist/lib/adminConfig.js.map +1 -0
- package/dist/lib/canonicalRefs.d.ts +27 -8
- package/dist/lib/canonicalRefs.d.ts.map +1 -1
- package/dist/lib/canonicalRefs.js +25 -6
- package/dist/lib/canonicalRefs.js.map +1 -1
- package/dist/lib/captureLink.d.ts +7 -0
- package/dist/lib/captureLink.d.ts.map +1 -0
- package/dist/lib/captureLink.js +29 -0
- package/dist/lib/captureLink.js.map +1 -0
- package/dist/lib/checklist.d.ts +32 -0
- package/dist/lib/checklist.d.ts.map +1 -0
- package/dist/lib/checklist.js +79 -0
- package/dist/lib/checklist.js.map +1 -0
- package/dist/lib/cliFirstRun.d.ts +16 -0
- package/dist/lib/cliFirstRun.d.ts.map +1 -0
- package/dist/lib/cliFirstRun.js +19 -0
- package/dist/lib/cliFirstRun.js.map +1 -0
- package/dist/lib/client.d.ts +38 -24
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +209 -102
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/commanderOptions.d.ts +8 -0
- package/dist/lib/commanderOptions.d.ts.map +1 -0
- package/dist/lib/commanderOptions.js +10 -0
- package/dist/lib/commanderOptions.js.map +1 -0
- package/dist/lib/compose-wrapup-view.d.ts +68 -0
- package/dist/lib/compose-wrapup-view.d.ts.map +1 -0
- package/dist/lib/compose-wrapup-view.js +40 -0
- package/dist/lib/compose-wrapup-view.js.map +1 -0
- package/dist/lib/config.d.ts +47 -115
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +113 -384
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/configResult.d.ts +110 -0
- package/dist/lib/configResult.d.ts.map +1 -0
- package/dist/lib/configResult.js +189 -0
- package/dist/lib/configResult.js.map +1 -0
- package/dist/lib/connectProfileName.d.ts +36 -0
- package/dist/lib/connectProfileName.d.ts.map +1 -0
- package/dist/lib/connectProfileName.js +72 -0
- package/dist/lib/connectProfileName.js.map +1 -0
- package/dist/lib/connectProfileName.test.d.ts +2 -0
- package/dist/lib/connectProfileName.test.d.ts.map +1 -0
- package/dist/lib/connectProfileName.test.js +100 -0
- package/dist/lib/connectProfileName.test.js.map +1 -0
- package/dist/lib/constants.d.ts +7 -2
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +9 -2
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/conversation.d.ts +36 -0
- package/dist/lib/conversation.d.ts.map +1 -0
- package/dist/lib/conversation.js +66 -0
- package/dist/lib/conversation.js.map +1 -0
- package/dist/lib/createEntryResult.d.ts +34 -0
- package/dist/lib/createEntryResult.d.ts.map +1 -0
- package/dist/lib/createEntryResult.js +12 -0
- package/dist/lib/createEntryResult.js.map +1 -0
- package/dist/lib/deployment.js +2 -2
- package/dist/lib/deployment.js.map +1 -1
- package/dist/lib/deployment.test.js +20 -1
- package/dist/lib/deployment.test.js.map +1 -1
- package/dist/lib/envKeySnapshot.d.ts +10 -0
- package/dist/lib/envKeySnapshot.d.ts.map +1 -0
- package/dist/lib/envKeySnapshot.js +30 -0
- package/dist/lib/envKeySnapshot.js.map +1 -0
- package/dist/lib/errors.d.ts +90 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +83 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +55 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +92 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/frontmatter.test.d.ts +15 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +98 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/gatewayTimeout.d.ts +88 -0
- package/dist/lib/gatewayTimeout.d.ts.map +1 -0
- package/dist/lib/gatewayTimeout.js +118 -0
- package/dist/lib/gatewayTimeout.js.map +1 -0
- package/dist/lib/gitEnvLeakKeysParity.test.d.ts +2 -0
- package/dist/lib/gitEnvLeakKeysParity.test.d.ts.map +1 -0
- package/dist/lib/gitEnvLeakKeysParity.test.js +73 -0
- package/dist/lib/gitEnvLeakKeysParity.test.js.map +1 -0
- package/dist/lib/glossary.d.ts +3 -15
- package/dist/lib/glossary.d.ts.map +1 -1
- package/dist/lib/glossary.js +6 -47
- package/dist/lib/glossary.js.map +1 -1
- package/dist/lib/hook-intents.d.ts +9 -4
- package/dist/lib/hook-intents.d.ts.map +1 -1
- package/dist/lib/hook-intents.js +10 -11
- package/dist/lib/hook-intents.js.map +1 -1
- package/dist/lib/judgeWait.d.ts +50 -0
- package/dist/lib/judgeWait.d.ts.map +1 -0
- package/dist/lib/judgeWait.js +64 -0
- package/dist/lib/judgeWait.js.map +1 -0
- package/dist/lib/kernelEnvelope.d.ts +42 -0
- package/dist/lib/kernelEnvelope.d.ts.map +1 -0
- package/dist/lib/kernelEnvelope.js +67 -0
- package/dist/lib/kernelEnvelope.js.map +1 -0
- package/dist/lib/localBinding.d.ts +86 -0
- package/dist/lib/localBinding.d.ts.map +1 -0
- package/dist/lib/localBinding.js +173 -0
- package/dist/lib/localBinding.js.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.d.ts +3 -3
- package/dist/lib/normalizeMaterializedFilename.js +3 -3
- package/dist/lib/notice-marker.d.ts.map +1 -1
- package/dist/lib/notice-marker.js +186 -16
- package/dist/lib/notice-marker.js.map +1 -1
- package/dist/lib/outcomeObjectiveLines.d.ts +30 -0
- package/dist/lib/outcomeObjectiveLines.d.ts.map +1 -0
- package/dist/lib/outcomeObjectiveLines.js +29 -0
- package/dist/lib/outcomeObjectiveLines.js.map +1 -0
- package/dist/lib/ownerLine.d.ts +90 -0
- package/dist/lib/ownerLine.d.ts.map +1 -0
- package/dist/lib/ownerLine.js +77 -0
- package/dist/lib/ownerLine.js.map +1 -0
- package/dist/lib/parseFields.d.ts +19 -0
- package/dist/lib/parseFields.d.ts.map +1 -0
- package/dist/lib/parseFields.js +49 -0
- package/dist/lib/parseFields.js.map +1 -0
- package/dist/lib/pinnedRole.d.ts +28 -0
- package/dist/lib/pinnedRole.d.ts.map +1 -0
- package/dist/lib/pinnedRole.js +106 -0
- package/dist/lib/pinnedRole.js.map +1 -0
- package/dist/lib/platformGlossary.d.ts +22 -0
- package/dist/lib/platformGlossary.d.ts.map +1 -0
- package/dist/lib/platformGlossary.js +26 -0
- package/dist/lib/platformGlossary.js.map +1 -0
- package/dist/lib/previewBanner.d.ts +9 -0
- package/dist/lib/previewBanner.d.ts.map +1 -0
- package/dist/lib/previewBanner.js +36 -0
- package/dist/lib/previewBanner.js.map +1 -0
- package/dist/lib/productbrain-files.d.ts +108 -0
- package/dist/lib/productbrain-files.d.ts.map +1 -0
- package/dist/lib/productbrain-files.js +240 -0
- package/dist/lib/productbrain-files.js.map +1 -0
- package/dist/lib/productbrain-files.test.d.ts +2 -0
- package/dist/lib/productbrain-files.test.d.ts.map +1 -0
- package/dist/lib/productbrain-files.test.js +518 -0
- package/dist/lib/productbrain-files.test.js.map +1 -0
- package/dist/lib/profiles.d.ts +52 -4
- package/dist/lib/profiles.d.ts.map +1 -1
- package/dist/lib/profiles.js +72 -21
- package/dist/lib/profiles.js.map +1 -1
- package/dist/lib/projectConfig.d.ts +130 -0
- package/dist/lib/projectConfig.d.ts.map +1 -0
- package/dist/lib/projectConfig.js +252 -0
- package/dist/lib/projectConfig.js.map +1 -0
- package/dist/lib/prompts.d.ts +2 -0
- package/dist/lib/prompts.d.ts.map +1 -1
- package/dist/lib/prompts.js +2 -0
- package/dist/lib/prompts.js.map +1 -1
- package/dist/lib/proseBody.d.ts +14 -0
- package/dist/lib/proseBody.d.ts.map +1 -0
- package/dist/lib/proseBody.js +25 -0
- package/dist/lib/proseBody.js.map +1 -0
- package/dist/lib/rate-limit.d.ts +34 -0
- package/dist/lib/rate-limit.d.ts.map +1 -0
- package/dist/lib/rate-limit.js +89 -0
- package/dist/lib/rate-limit.js.map +1 -0
- package/dist/lib/readinessNotices.d.ts +12 -0
- package/dist/lib/readinessNotices.d.ts.map +1 -0
- package/dist/lib/readinessNotices.js +15 -0
- package/dist/lib/readinessNotices.js.map +1 -0
- package/dist/lib/repo-detect.d.ts +8 -2
- package/dist/lib/repo-detect.d.ts.map +1 -1
- package/dist/lib/repo-detect.js +11 -6
- package/dist/lib/repo-detect.js.map +1 -1
- package/dist/lib/reportedProfile.d.ts +18 -0
- package/dist/lib/reportedProfile.d.ts.map +1 -0
- package/dist/lib/reportedProfile.js +144 -0
- package/dist/lib/reportedProfile.js.map +1 -0
- package/dist/lib/restsOn.d.ts +33 -0
- package/dist/lib/restsOn.d.ts.map +1 -0
- package/dist/lib/restsOn.js +34 -0
- package/dist/lib/restsOn.js.map +1 -0
- package/dist/lib/ruleListRender.d.ts +265 -0
- package/dist/lib/ruleListRender.d.ts.map +1 -0
- package/dist/lib/ruleListRender.js +364 -0
- package/dist/lib/ruleListRender.js.map +1 -0
- package/dist/lib/runner.d.ts +9 -1
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +30 -4
- package/dist/lib/runner.js.map +1 -1
- package/dist/lib/seatSentence.d.ts +64 -0
- package/dist/lib/seatSentence.d.ts.map +1 -0
- package/dist/lib/seatSentence.js +85 -0
- package/dist/lib/seatSentence.js.map +1 -0
- package/dist/lib/session.d.ts +86 -12
- package/dist/lib/session.d.ts.map +1 -1
- package/dist/lib/session.js +243 -24
- package/dist/lib/session.js.map +1 -1
- package/dist/lib/sessionBinding.d.ts +61 -0
- package/dist/lib/sessionBinding.d.ts.map +1 -0
- package/dist/lib/sessionBinding.js +125 -0
- package/dist/lib/sessionBinding.js.map +1 -0
- package/dist/lib/sessionNotices.d.ts +54 -0
- package/dist/lib/sessionNotices.d.ts.map +1 -0
- package/dist/lib/sessionNotices.js +132 -0
- package/dist/lib/sessionNotices.js.map +1 -0
- package/dist/lib/sessionNotices.test.d.ts +2 -0
- package/dist/lib/sessionNotices.test.d.ts.map +1 -0
- package/dist/lib/sessionNotices.test.js +53 -0
- package/dist/lib/sessionNotices.test.js.map +1 -0
- package/dist/lib/spineVerdictRead.d.ts +70 -0
- package/dist/lib/spineVerdictRead.d.ts.map +1 -0
- package/dist/lib/spineVerdictRead.js +73 -0
- package/dist/lib/spineVerdictRead.js.map +1 -0
- package/dist/lib/spinner.js +2 -2
- package/dist/lib/spinner.js.map +1 -1
- package/dist/lib/startup-resolution-signals.d.ts +34 -0
- package/dist/lib/startup-resolution-signals.d.ts.map +1 -0
- package/dist/lib/startup-resolution-signals.js +116 -0
- package/dist/lib/startup-resolution-signals.js.map +1 -0
- package/dist/lib/startup-resolution-signals.test.d.ts +2 -0
- package/dist/lib/startup-resolution-signals.test.d.ts.map +1 -0
- package/dist/lib/startup-resolution-signals.test.js +113 -0
- package/dist/lib/startup-resolution-signals.test.js.map +1 -0
- package/dist/lib/startup-signals.d.ts +12 -0
- package/dist/lib/startup-signals.d.ts.map +1 -0
- package/dist/lib/startup-signals.js +179 -0
- package/dist/lib/startup-signals.js.map +1 -0
- package/dist/lib/startup-signals.test.d.ts +2 -0
- package/dist/lib/startup-signals.test.d.ts.map +1 -0
- package/dist/lib/startup-signals.test.js +165 -0
- package/dist/lib/startup-signals.test.js.map +1 -0
- package/dist/lib/state.d.ts +11 -2
- package/dist/lib/state.d.ts.map +1 -1
- package/dist/lib/state.js +11 -4
- package/dist/lib/state.js.map +1 -1
- package/dist/lib/statusCategories.d.ts +162 -0
- package/dist/lib/statusCategories.d.ts.map +1 -0
- package/dist/lib/statusCategories.js +286 -0
- package/dist/lib/statusCategories.js.map +1 -0
- package/dist/lib/strip.d.ts +17 -0
- package/dist/lib/strip.d.ts.map +1 -1
- package/dist/lib/strip.js +48 -1
- package/dist/lib/strip.js.map +1 -1
- package/dist/lib/style.d.ts +8 -2
- package/dist/lib/style.d.ts.map +1 -1
- package/dist/lib/style.js +24 -17
- package/dist/lib/style.js.map +1 -1
- package/dist/lib/update-check.d.ts +3 -8
- package/dist/lib/update-check.d.ts.map +1 -1
- package/dist/lib/update-check.js +11 -46
- package/dist/lib/update-check.js.map +1 -1
- package/dist/lib/upgrade-runner.d.ts.map +1 -1
- package/dist/lib/upgrade-runner.js +2 -7
- package/dist/lib/upgrade-runner.js.map +1 -1
- package/dist/lib/workspaceNotice.d.ts +202 -0
- package/dist/lib/workspaceNotice.d.ts.map +1 -0
- package/dist/lib/workspaceNotice.js +345 -0
- package/dist/lib/workspaceNotice.js.map +1 -0
- package/dist/lib/writePerimeter.d.ts +72 -0
- package/dist/lib/writePerimeter.d.ts.map +1 -0
- package/dist/lib/writePerimeter.js +128 -0
- package/dist/lib/writePerimeter.js.map +1 -0
- package/dist/registerEntryCommands.d.ts +18 -0
- package/dist/registerEntryCommands.d.ts.map +1 -0
- package/dist/registerEntryCommands.js +122 -0
- package/dist/registerEntryCommands.js.map +1 -0
- package/dist/registerHistoryCommand.d.ts +8 -0
- package/dist/registerHistoryCommand.d.ts.map +1 -0
- package/dist/registerHistoryCommand.js +14 -0
- package/dist/registerHistoryCommand.js.map +1 -0
- package/dist/registerOutcomeCommands.d.ts +27 -0
- package/dist/registerOutcomeCommands.d.ts.map +1 -0
- package/dist/registerOutcomeCommands.js +27 -0
- package/dist/registerOutcomeCommands.js.map +1 -0
- package/dist/registerRoleCommands.d.ts +11 -0
- package/dist/registerRoleCommands.d.ts.map +1 -0
- package/dist/registerRoleCommands.js +43 -0
- package/dist/registerRoleCommands.js.map +1 -0
- package/dist/registerTensionsCommands.d.ts +10 -0
- package/dist/registerTensionsCommands.d.ts.map +1 -0
- package/dist/registerTensionsCommands.js +15 -0
- package/dist/registerTensionsCommands.js.map +1 -0
- package/dist/scoreboard/diagnose.d.ts +185 -0
- package/dist/scoreboard/diagnose.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.js +282 -0
- package/dist/scoreboard/diagnose.js.map +1 -0
- package/dist/scoreboard/diagnose.test.d.ts +15 -0
- package/dist/scoreboard/diagnose.test.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.test.js +288 -0
- package/dist/scoreboard/diagnose.test.js.map +1 -0
- package/dist/scoreboard/floors.d.ts +47 -0
- package/dist/scoreboard/floors.d.ts.map +1 -0
- package/dist/scoreboard/floors.js +33 -0
- package/dist/scoreboard/floors.js.map +1 -0
- package/dist/scoreboard/localDrift.d.ts +23 -0
- package/dist/scoreboard/localDrift.d.ts.map +1 -0
- package/dist/scoreboard/localDrift.js +111 -0
- package/dist/scoreboard/localDrift.js.map +1 -0
- package/dist/scoreboard/localDrift.test.d.ts +9 -0
- package/dist/scoreboard/localDrift.test.d.ts.map +1 -0
- package/dist/scoreboard/localDrift.test.js +82 -0
- package/dist/scoreboard/localDrift.test.js.map +1 -0
- package/dist/surfaces/__tests__/adapter.test.js +2 -6
- package/dist/surfaces/__tests__/adapter.test.js.map +1 -1
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.d.ts +2 -0
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.d.ts.map +1 -0
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.js +180 -0
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.js.map +1 -0
- package/dist/surfaces/__tests__/telemetry.test.js +4 -15
- package/dist/surfaces/__tests__/telemetry.test.js.map +1 -1
- package/dist/surfaces/adapters/claude.d.ts.map +1 -1
- package/dist/surfaces/adapters/claude.js +30 -25
- package/dist/surfaces/adapters/claude.js.map +1 -1
- package/dist/surfaces/registry.js +1 -1
- package/dist/surfaces/registry.js.map +1 -1
- package/dist/surfaces/telemetry.d.ts +10 -3
- package/dist/surfaces/telemetry.d.ts.map +1 -1
- package/dist/surfaces/telemetry.js +5 -11
- package/dist/surfaces/telemetry.js.map +1 -1
- package/package.json +8 -9
- package/dist/__tests__/audit.test.d.ts +0 -2
- package/dist/__tests__/audit.test.d.ts.map +0 -1
- package/dist/__tests__/audit.test.js +0 -399
- package/dist/__tests__/audit.test.js.map +0 -1
- package/dist/__tests__/authority-domains.test.d.ts +0 -2
- package/dist/__tests__/authority-domains.test.d.ts.map +0 -1
- package/dist/__tests__/authority-domains.test.js +0 -48
- package/dist/__tests__/authority-domains.test.js.map +0 -1
- package/dist/__tests__/handshake-augment.test.d.ts +0 -2
- package/dist/__tests__/handshake-augment.test.d.ts.map +0 -1
- package/dist/__tests__/handshake-augment.test.js +0 -423
- package/dist/__tests__/handshake-augment.test.js.map +0 -1
- package/dist/__tests__/handshake-dormancy.test.d.ts +0 -2
- package/dist/__tests__/handshake-dormancy.test.d.ts.map +0 -1
- package/dist/__tests__/handshake-dormancy.test.js +0 -207
- package/dist/__tests__/handshake-dormancy.test.js.map +0 -1
- package/dist/__tests__/handshake-formatter.test.d.ts +0 -2
- package/dist/__tests__/handshake-formatter.test.d.ts.map +0 -1
- package/dist/__tests__/handshake-formatter.test.js +0 -67
- package/dist/__tests__/handshake-formatter.test.js.map +0 -1
- package/dist/__tests__/handshake-preview.test.d.ts +0 -2
- package/dist/__tests__/handshake-preview.test.d.ts.map +0 -1
- package/dist/__tests__/handshake-preview.test.js +0 -841
- package/dist/__tests__/handshake-preview.test.js.map +0 -1
- package/dist/__tests__/handshake.e2e.test.d.ts +0 -2
- package/dist/__tests__/handshake.e2e.test.d.ts.map +0 -1
- package/dist/__tests__/handshake.e2e.test.js +0 -1252
- package/dist/__tests__/handshake.e2e.test.js.map +0 -1
- package/dist/__tests__/handshake.test.d.ts +0 -2
- package/dist/__tests__/handshake.test.d.ts.map +0 -1
- package/dist/__tests__/handshake.test.js +0 -805
- package/dist/__tests__/handshake.test.js.map +0 -1
- package/dist/__tests__/ingest.test.d.ts +0 -2
- package/dist/__tests__/ingest.test.d.ts.map +0 -1
- package/dist/__tests__/ingest.test.js +0 -185
- package/dist/__tests__/ingest.test.js.map +0 -1
- package/dist/__tests__/method-registry.integration.test.d.ts +0 -6
- package/dist/__tests__/method-registry.integration.test.d.ts.map +0 -1
- package/dist/__tests__/method-registry.integration.test.js +0 -18
- package/dist/__tests__/method-registry.integration.test.js.map +0 -1
- package/dist/__tests__/method-registry.test.d.ts +0 -14
- package/dist/__tests__/method-registry.test.d.ts.map +0 -1
- package/dist/__tests__/method-registry.test.js +0 -134
- package/dist/__tests__/method-registry.test.js.map +0 -1
- package/dist/__tests__/onboarding-path-b.test.d.ts +0 -2
- package/dist/__tests__/onboarding-path-b.test.d.ts.map +0 -1
- package/dist/__tests__/onboarding-path-b.test.js +0 -46
- package/dist/__tests__/onboarding-path-b.test.js.map +0 -1
- package/dist/__tests__/onboarding.test.d.ts +0 -6
- package/dist/__tests__/onboarding.test.d.ts.map +0 -1
- package/dist/__tests__/onboarding.test.js +0 -347
- package/dist/__tests__/onboarding.test.js.map +0 -1
- package/dist/__tests__/promote.test.d.ts +0 -2
- package/dist/__tests__/promote.test.d.ts.map +0 -1
- package/dist/__tests__/promote.test.js +0 -230
- package/dist/__tests__/promote.test.js.map +0 -1
- package/dist/__tests__/proposals.test.d.ts +0 -2
- package/dist/__tests__/proposals.test.d.ts.map +0 -1
- package/dist/__tests__/proposals.test.js +0 -167
- package/dist/__tests__/proposals.test.js.map +0 -1
- package/dist/__tests__/setup-ingest.test.d.ts +0 -2
- package/dist/__tests__/setup-ingest.test.d.ts.map +0 -1
- package/dist/__tests__/setup-ingest.test.js +0 -71
- package/dist/__tests__/setup-ingest.test.js.map +0 -1
- package/dist/__tests__/setup-resolver.test.d.ts +0 -14
- package/dist/__tests__/setup-resolver.test.d.ts.map +0 -1
- package/dist/__tests__/setup-resolver.test.js +0 -228
- package/dist/__tests__/setup-resolver.test.js.map +0 -1
- package/dist/commands/__tests__/connect-handoff.test.d.ts +0 -11
- package/dist/commands/__tests__/connect-handoff.test.d.ts.map +0 -1
- package/dist/commands/__tests__/connect-handoff.test.js +0 -111
- package/dist/commands/__tests__/connect-handoff.test.js.map +0 -1
- package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts +0 -15
- package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts.map +0 -1
- package/dist/commands/__tests__/setup-detect-surfaces.test.js +0 -149
- package/dist/commands/__tests__/setup-detect-surfaces.test.js.map +0 -1
- package/dist/commands/__tests__/setup-state.test.d.ts +0 -2
- package/dist/commands/__tests__/setup-state.test.d.ts.map +0 -1
- package/dist/commands/__tests__/setup-state.test.js +0 -194
- package/dist/commands/__tests__/setup-state.test.js.map +0 -1
- package/dist/commands/accept.d.ts +0 -18
- package/dist/commands/accept.d.ts.map +0 -1
- package/dist/commands/accept.js +0 -76
- package/dist/commands/accept.js.map +0 -1
- package/dist/commands/audit.d.ts +0 -25
- package/dist/commands/audit.d.ts.map +0 -1
- package/dist/commands/audit.js +0 -215
- package/dist/commands/audit.js.map +0 -1
- package/dist/commands/authority-domains.d.ts +0 -146
- package/dist/commands/authority-domains.d.ts.map +0 -1
- package/dist/commands/authority-domains.js +0 -283
- package/dist/commands/authority-domains.js.map +0 -1
- package/dist/commands/brand-pack.d.ts +0 -2
- package/dist/commands/brand-pack.d.ts.map +0 -1
- package/dist/commands/brand-pack.js +0 -25
- package/dist/commands/brand-pack.js.map +0 -1
- package/dist/commands/connect-context.d.ts +0 -45
- package/dist/commands/connect-context.d.ts.map +0 -1
- package/dist/commands/connect-context.js +0 -64
- package/dist/commands/connect-context.js.map +0 -1
- package/dist/commands/connect-context.test.d.ts +0 -2
- package/dist/commands/connect-context.test.d.ts.map +0 -1
- package/dist/commands/connect-context.test.js +0 -110
- package/dist/commands/connect-context.test.js.map +0 -1
- package/dist/commands/connect-handoff.d.ts +0 -51
- package/dist/commands/connect-handoff.d.ts.map +0 -1
- package/dist/commands/connect-handoff.js +0 -70
- package/dist/commands/connect-handoff.js.map +0 -1
- package/dist/commands/handshake.d.ts +0 -222
- package/dist/commands/handshake.d.ts.map +0 -1
- package/dist/commands/handshake.js +0 -2421
- package/dist/commands/handshake.js.map +0 -1
- package/dist/commands/ingest.d.ts +0 -14
- package/dist/commands/ingest.d.ts.map +0 -1
- package/dist/commands/ingest.js +0 -189
- package/dist/commands/ingest.js.map +0 -1
- package/dist/commands/method.d.ts +0 -99
- package/dist/commands/method.d.ts.map +0 -1
- package/dist/commands/method.js +0 -785
- package/dist/commands/method.js.map +0 -1
- package/dist/commands/migrate-setup.d.ts +0 -18
- package/dist/commands/migrate-setup.d.ts.map +0 -1
- package/dist/commands/migrate-setup.js +0 -198
- package/dist/commands/migrate-setup.js.map +0 -1
- package/dist/commands/promote.d.ts +0 -12
- package/dist/commands/promote.d.ts.map +0 -1
- package/dist/commands/promote.js +0 -113
- package/dist/commands/promote.js.map +0 -1
- package/dist/commands/proposals.d.ts +0 -9
- package/dist/commands/proposals.d.ts.map +0 -1
- package/dist/commands/proposals.js +0 -24
- package/dist/commands/proposals.js.map +0 -1
- package/dist/commands/reject.d.ts +0 -14
- package/dist/commands/reject.d.ts.map +0 -1
- package/dist/commands/reject.js +0 -44
- package/dist/commands/reject.js.map +0 -1
- package/dist/commands/setup-audit.d.ts +0 -59
- package/dist/commands/setup-audit.d.ts.map +0 -1
- package/dist/commands/setup-audit.js +0 -250
- package/dist/commands/setup-audit.js.map +0 -1
- package/dist/commands/setup-detect-surfaces.d.ts +0 -38
- package/dist/commands/setup-detect-surfaces.d.ts.map +0 -1
- package/dist/commands/setup-detect-surfaces.js +0 -76
- package/dist/commands/setup-detect-surfaces.js.map +0 -1
- package/dist/commands/setup-ingest.d.ts +0 -17
- package/dist/commands/setup-ingest.d.ts.map +0 -1
- package/dist/commands/setup-ingest.js +0 -226
- package/dist/commands/setup-ingest.js.map +0 -1
- package/dist/commands/setup-resolver.d.ts +0 -58
- package/dist/commands/setup-resolver.d.ts.map +0 -1
- package/dist/commands/setup-resolver.js +0 -150
- package/dist/commands/setup-resolver.js.map +0 -1
- package/dist/commands/setup-state.d.ts +0 -42
- package/dist/commands/setup-state.d.ts.map +0 -1
- package/dist/commands/setup-state.js +0 -93
- package/dist/commands/setup-state.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -23
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -69
- package/dist/commands/setup.js.map +0 -1
- package/dist/formatters/audit.d.ts +0 -52
- package/dist/formatters/audit.d.ts.map +0 -1
- package/dist/formatters/audit.js +0 -81
- package/dist/formatters/audit.js.map +0 -1
- package/dist/formatters/promote.d.ts +0 -30
- package/dist/formatters/promote.d.ts.map +0 -1
- package/dist/formatters/promote.js +0 -39
- package/dist/formatters/promote.js.map +0 -1
- package/dist/formatters/proposals.d.ts +0 -45
- package/dist/formatters/proposals.d.ts.map +0 -1
- package/dist/formatters/proposals.js +0 -62
- package/dist/formatters/proposals.js.map +0 -1
- package/dist/generators/archetypes.d.ts +0 -52
- package/dist/generators/archetypes.d.ts.map +0 -1
- package/dist/generators/archetypes.js +0 -153
- package/dist/generators/archetypes.js.map +0 -1
- package/dist/generators/archetypes.test.d.ts +0 -2
- package/dist/generators/archetypes.test.d.ts.map +0 -1
- package/dist/generators/archetypes.test.js +0 -237
- package/dist/generators/archetypes.test.js.map +0 -1
- package/dist/generators/chain-classifier.d.ts +0 -49
- package/dist/generators/chain-classifier.d.ts.map +0 -1
- package/dist/generators/chain-classifier.js +0 -180
- package/dist/generators/chain-classifier.js.map +0 -1
- package/dist/generators/chain-classifier.test.d.ts +0 -2
- package/dist/generators/chain-classifier.test.d.ts.map +0 -1
- package/dist/generators/chain-classifier.test.js +0 -257
- package/dist/generators/chain-classifier.test.js.map +0 -1
- package/dist/generators/chain-rules.d.ts +0 -42
- package/dist/generators/chain-rules.d.ts.map +0 -1
- package/dist/generators/chain-rules.js +0 -144
- package/dist/generators/chain-rules.js.map +0 -1
- package/dist/generators/chain-rules.test.d.ts +0 -2
- package/dist/generators/chain-rules.test.d.ts.map +0 -1
- package/dist/generators/chain-rules.test.js +0 -179
- package/dist/generators/chain-rules.test.js.map +0 -1
- package/dist/generators/handshake-diff.d.ts +0 -67
- package/dist/generators/handshake-diff.d.ts.map +0 -1
- package/dist/generators/handshake-diff.js +0 -183
- package/dist/generators/handshake-diff.js.map +0 -1
- package/dist/generators/handshake-diff.test.d.ts +0 -2
- package/dist/generators/handshake-diff.test.d.ts.map +0 -1
- package/dist/generators/handshake-diff.test.js +0 -264
- package/dist/generators/handshake-diff.test.js.map +0 -1
- package/dist/lib/activation.d.ts +0 -28
- package/dist/lib/activation.d.ts.map +0 -1
- package/dist/lib/activation.js +0 -57
- package/dist/lib/activation.js.map +0 -1
- package/dist/lib/activation.test.d.ts +0 -6
- package/dist/lib/activation.test.d.ts.map +0 -1
- package/dist/lib/activation.test.js +0 -121
- package/dist/lib/activation.test.js.map +0 -1
- package/dist/lib/collectionRegistry.d.ts +0 -38
- package/dist/lib/collectionRegistry.d.ts.map +0 -1
- package/dist/lib/collectionRegistry.js +0 -112
- package/dist/lib/collectionRegistry.js.map +0 -1
- package/dist/lib/conversation-engine.d.ts +0 -45
- package/dist/lib/conversation-engine.d.ts.map +0 -1
- package/dist/lib/conversation-engine.js +0 -112
- package/dist/lib/conversation-engine.js.map +0 -1
- package/dist/lib/conversation-phases.d.ts +0 -59
- package/dist/lib/conversation-phases.d.ts.map +0 -1
- package/dist/lib/conversation-phases.js +0 -11
- package/dist/lib/conversation-phases.js.map +0 -1
- package/dist/lib/conversation-signals.d.ts +0 -30
- package/dist/lib/conversation-signals.d.ts.map +0 -1
- package/dist/lib/conversation-signals.js +0 -64
- package/dist/lib/conversation-signals.js.map +0 -1
- package/dist/lib/inferSourceDate.d.ts +0 -12
- package/dist/lib/inferSourceDate.d.ts.map +0 -1
- package/dist/lib/inferSourceDate.js +0 -44
- package/dist/lib/inferSourceDate.js.map +0 -1
- package/dist/lib/method-registry.d.ts +0 -32
- package/dist/lib/method-registry.d.ts.map +0 -1
- package/dist/lib/method-registry.js +0 -53
- package/dist/lib/method-registry.js.map +0 -1
- package/dist/lib/onboarding-path-b.d.ts +0 -10
- package/dist/lib/onboarding-path-b.d.ts.map +0 -1
- package/dist/lib/onboarding-path-b.js +0 -213
- package/dist/lib/onboarding-path-b.js.map +0 -1
- package/dist/lib/onboarding-shared.d.ts +0 -80
- package/dist/lib/onboarding-shared.d.ts.map +0 -1
- package/dist/lib/onboarding-shared.js +0 -174
- package/dist/lib/onboarding-shared.js.map +0 -1
- package/dist/lib/onboarding-topics.d.ts +0 -27
- package/dist/lib/onboarding-topics.d.ts.map +0 -1
- package/dist/lib/onboarding-topics.js +0 -57
- package/dist/lib/onboarding-topics.js.map +0 -1
- package/dist/lib/onboarding.d.ts +0 -17
- package/dist/lib/onboarding.d.ts.map +0 -1
- package/dist/lib/onboarding.js +0 -350
- package/dist/lib/onboarding.js.map +0 -1
- package/dist/lib/telemetry/contextServed.generated.d.ts +0 -119
- package/dist/lib/telemetry/contextServed.generated.d.ts.map +0 -1
- package/dist/lib/telemetry/contextServed.generated.js +0 -85
- package/dist/lib/telemetry/contextServed.generated.js.map +0 -1
- package/dist/lib/telemetry/emitContextServed.d.ts +0 -84
- package/dist/lib/telemetry/emitContextServed.d.ts.map +0 -1
- package/dist/lib/telemetry/emitContextServed.js +0 -205
- package/dist/lib/telemetry/emitContextServed.js.map +0 -1
- package/dist/lib/telemetry/emitContextServed.test.d.ts +0 -12
- package/dist/lib/telemetry/emitContextServed.test.d.ts.map +0 -1
- package/dist/lib/telemetry/emitContextServed.test.js +0 -211
- package/dist/lib/telemetry/emitContextServed.test.js.map +0 -1
- package/dist/lib/telemetry.d.ts +0 -15
- package/dist/lib/telemetry.d.ts.map +0 -1
- package/dist/lib/telemetry.js +0 -47
- package/dist/lib/telemetry.js.map +0 -1
- package/dist/setup/__tests__/coach-traces.test.d.ts +0 -2
- package/dist/setup/__tests__/coach-traces.test.d.ts.map +0 -1
- package/dist/setup/__tests__/coach-traces.test.js +0 -189
- package/dist/setup/__tests__/coach-traces.test.js.map +0 -1
- package/dist/setup/__tests__/setup-commands.test.d.ts +0 -2
- package/dist/setup/__tests__/setup-commands.test.d.ts.map +0 -1
- package/dist/setup/__tests__/setup-commands.test.js +0 -177
- package/dist/setup/__tests__/setup-commands.test.js.map +0 -1
- package/dist/setup/__tests__/state-machine.test.d.ts +0 -2
- package/dist/setup/__tests__/state-machine.test.d.ts.map +0 -1
- package/dist/setup/__tests__/state-machine.test.js +0 -341
- package/dist/setup/__tests__/state-machine.test.js.map +0 -1
- package/dist/setup/detect-surfaces.d.ts +0 -21
- package/dist/setup/detect-surfaces.d.ts.map +0 -1
- package/dist/setup/detect-surfaces.js +0 -39
- package/dist/setup/detect-surfaces.js.map +0 -1
- package/dist/setup/manifest-writer.d.ts +0 -17
- package/dist/setup/manifest-writer.d.ts.map +0 -1
- package/dist/setup/manifest-writer.js +0 -153
- package/dist/setup/manifest-writer.js.map +0 -1
- package/dist/setup/perimeter.d.ts +0 -72
- package/dist/setup/perimeter.d.ts.map +0 -1
- package/dist/setup/perimeter.js +0 -128
- package/dist/setup/perimeter.js.map +0 -1
- package/dist/setup/state-machine.d.ts +0 -67
- package/dist/setup/state-machine.d.ts.map +0 -1
- package/dist/setup/state-machine.js +0 -124
- package/dist/setup/state-machine.js.map +0 -1
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts +0 -2
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts.map +0 -1
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.js +0 -132
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.js.map +0 -1
- package/templates/archetypes/boundary.md +0 -23
- package/templates/archetypes/constraint.md +0 -23
- package/templates/archetypes/convention.md +0 -23
- package/templates/archetypes/policy.md +0 -23
- package/templates/archetypes/quality-gate.md +0 -23
- package/templates/archetypes/workflow.md +0 -23
- package/templates/general/code-integrity.md +0 -11
- package/templates/general/getting-started.md +0 -12
- package/templates/method-registry.json +0 -16
- package/templates/node-ts/code-integrity.md +0 -13
- package/templates/node-ts/testing.md +0 -12
- package/templates/python/code-integrity.md +0 -13
- package/templates/python/testing.md +0 -12
package/dist/lib/config.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* CLI config — reads PRODUCTBRAIN_API_KEY + CONVEX_SITE_URL from:
|
|
3
3
|
* 1. Environment variables (always highest priority)
|
|
4
4
|
* 2. Project local config: .productbrain/config.local.json (walked up from CWD, machine-local)
|
|
5
|
-
* 3. Project config: .productbrain/config.json (walked up from CWD,
|
|
5
|
+
* 3. Project config: .productbrain/config.json (walked up from CWD, committed) — its presence
|
|
6
|
+
* declares a project; its siteUrl never routes a key (TEN-4500)
|
|
6
7
|
* 4. Profile system (~/.config/productbrain/profiles/{name}.env)
|
|
7
8
|
* 5. Legacy ~/.config/productbrain/.env (auto-migrated to profiles on first use)
|
|
8
9
|
* 6. CWD .env.mcp / packages/mcp-server/.env.mcp / .env
|
|
@@ -12,134 +13,28 @@
|
|
|
12
13
|
*
|
|
13
14
|
* When key is missing and retry is provided (TTY), runs guided flow per docs/cli-unauthenticated-user-journey.md.
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* - config.local.json (gitignored): profile pin — machine-local, never committed.
|
|
16
|
+
* The repo's own config files (.productbrain/config.json, config.local.json) are located and
|
|
17
|
+
* read by projectConfig.ts — this module turns what they declare into a credential.
|
|
18
18
|
*/
|
|
19
19
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
20
20
|
import { resolve } from 'path';
|
|
21
21
|
import { homedir } from 'os';
|
|
22
|
-
import { DEFAULT_SITE_URL
|
|
22
|
+
import { DEFAULT_SITE_URL } from './constants.js';
|
|
23
23
|
import { API_KEY_PREFIX } from './tokenConstants.js';
|
|
24
|
+
import { isEnvKeyBinding } from './envKeySnapshot.js';
|
|
24
25
|
import { resolveProfileConfig, resolveNamedProfileConfig, getGlobalActiveProfile } from './profiles.js';
|
|
26
|
+
import { findProjectRoot, readBoundPreviewKey, readLocalProjectConfig } from './projectConfig.js';
|
|
27
|
+
import { declaresCompletePreviewBinding, refuseWhenProjectHasNoTenant, resolveLocalBinding, resolvePinnedProfile } from './localBinding.js';
|
|
25
28
|
import { CLIError, ErrorCode } from './errors.js';
|
|
26
|
-
import {
|
|
29
|
+
import { isInsecureSiteUrl, missingKeyError, pickSiteUrl, resolveConfigResult, } from './configResult.js';
|
|
27
30
|
const HOME_CONFIG_DIR = resolve(homedir(), '.config', 'productbrain');
|
|
28
31
|
const HOME_ENV_PATH = resolve(HOME_CONFIG_DIR, '.env');
|
|
29
32
|
const CWD_ENV_PATHS = ['.env.mcp', 'packages/mcp-server/.env.mcp', '.env'];
|
|
30
|
-
// Short error when not TTY (scripts/pipes must not hang)
|
|
31
|
-
const NON_TTY_MESSAGE = 'No API key. Set PRODUCTBRAIN_API_KEY or run pb login.';
|
|
32
33
|
/** Track whether env has been loaded to avoid redundant file reads. */
|
|
33
34
|
let envLoaded = false;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* A `.productbrain/` directory only counts as a CLI project root when it carries
|
|
38
|
-
* CLI configuration — `config.json` (committed siteUrl gateway) or
|
|
39
|
-
* `config.local.json` (machine-local profile pin or preview binding). A
|
|
40
|
-
* projection-only `.productbrain/` written by `pb handshake` (briefing.md,
|
|
41
|
-
* context.md, rules/, etc.) does NOT count — otherwise a subrepo like
|
|
42
|
-
* `packages/cli/.productbrain/` would shadow the real configuring root and
|
|
43
|
-
* `npm run pb:preview` writes (which always land at the repo-root
|
|
44
|
-
* `.productbrain/`) would be invisible to commands run from the subrepo.
|
|
45
|
-
*
|
|
46
|
-
* Stops at home directory or filesystem root. Returns the directory containing
|
|
47
|
-
* a config-bearing `.productbrain/`, or null if not found.
|
|
48
|
-
*/
|
|
49
|
-
export function findProjectRoot(startDir) {
|
|
50
|
-
let dir = startDir;
|
|
51
|
-
const home = homedir();
|
|
52
|
-
while (true) {
|
|
53
|
-
const pbDir = resolve(dir, '.productbrain');
|
|
54
|
-
if (existsSync(pbDir) &&
|
|
55
|
-
(existsSync(resolve(pbDir, 'config.json')) ||
|
|
56
|
-
existsSync(resolve(pbDir, 'config.local.json')))) {
|
|
57
|
-
return dir;
|
|
58
|
-
}
|
|
59
|
-
const parent = resolve(dir, '..');
|
|
60
|
-
if (parent === dir || dir === home)
|
|
61
|
-
return null;
|
|
62
|
-
dir = parent;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Read .productbrain/config.json from the walked-up project root.
|
|
67
|
-
* Only reads siteUrl — profile and apiKey fields are ignored (legacy or misplaced).
|
|
68
|
-
* Returns null if file missing or project root not found.
|
|
69
|
-
* Warns to stderr on invalid JSON but does not throw.
|
|
70
|
-
*/
|
|
71
|
-
function readProjectConfig() {
|
|
72
|
-
const projectRoot = findProjectRoot(process.cwd());
|
|
73
|
-
if (!projectRoot)
|
|
74
|
-
return null;
|
|
75
|
-
const configPath = resolve(projectRoot, '.productbrain', 'config.json');
|
|
76
|
-
if (!existsSync(configPath))
|
|
77
|
-
return null;
|
|
78
|
-
try {
|
|
79
|
-
const raw = readFileSync(configPath, 'utf8');
|
|
80
|
-
const parsed = JSON.parse(raw);
|
|
81
|
-
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
82
|
-
process.stderr.write('Warning: .productbrain/config.json is not a JSON object, skipping.\n');
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
const result = {};
|
|
86
|
-
if (typeof parsed.siteUrl === 'string' && parsed.siteUrl) {
|
|
87
|
-
result.siteUrl = parsed.siteUrl;
|
|
88
|
-
}
|
|
89
|
-
// Silently ignore `profile` and `apiKey` in config.json — those must be in config.local.json
|
|
90
|
-
return result;
|
|
91
|
-
}
|
|
92
|
-
catch {
|
|
93
|
-
process.stderr.write('Warning: .productbrain/config.json contains invalid JSON, skipping.\n');
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Read .productbrain/config.local.json from the walked-up project root.
|
|
99
|
-
* Returns the machine-local pin (`profile`) and any preview-binding fields
|
|
100
|
-
* (`apiKey`, `siteUrl`, `preview`, `workspaceName`) written by
|
|
101
|
-
* `npm run pb:preview` — all gitignored, never committed.
|
|
102
|
-
* Returns null if file missing or project root not found.
|
|
103
|
-
* Warns to stderr on invalid JSON but does not throw.
|
|
104
|
-
*/
|
|
105
|
-
export function readLocalProjectConfig() {
|
|
106
|
-
const projectRoot = findProjectRoot(process.cwd());
|
|
107
|
-
if (!projectRoot)
|
|
108
|
-
return null;
|
|
109
|
-
const configPath = resolve(projectRoot, '.productbrain', 'config.local.json');
|
|
110
|
-
if (!existsSync(configPath))
|
|
111
|
-
return null;
|
|
112
|
-
try {
|
|
113
|
-
const raw = readFileSync(configPath, 'utf8');
|
|
114
|
-
const parsed = JSON.parse(raw);
|
|
115
|
-
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
116
|
-
process.stderr.write('Warning: .productbrain/config.local.json is not a JSON object, skipping.\n');
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
const result = {};
|
|
120
|
-
if (typeof parsed.profile === 'string' && parsed.profile) {
|
|
121
|
-
result.profile = parsed.profile;
|
|
122
|
-
}
|
|
123
|
-
// Preview binding fields — written by `npm run pb:preview`, cleared by `npm run pb:real`.
|
|
124
|
-
if (typeof parsed.apiKey === 'string' && parsed.apiKey.startsWith(API_KEY_PREFIX)) {
|
|
125
|
-
result.apiKey = parsed.apiKey;
|
|
126
|
-
}
|
|
127
|
-
if (typeof parsed.siteUrl === 'string' && parsed.siteUrl) {
|
|
128
|
-
result.siteUrl = parsed.siteUrl;
|
|
129
|
-
}
|
|
130
|
-
if (parsed.preview === true) {
|
|
131
|
-
result.preview = true;
|
|
132
|
-
}
|
|
133
|
-
if (typeof parsed.workspaceName === 'string' && parsed.workspaceName) {
|
|
134
|
-
result.workspaceName = parsed.workspaceName;
|
|
135
|
-
}
|
|
136
|
-
return result;
|
|
137
|
-
}
|
|
138
|
-
catch {
|
|
139
|
-
process.stderr.write('Warning: .productbrain/config.local.json contains invalid JSON, skipping.\n');
|
|
140
|
-
return null;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
35
|
+
// Re-exported so callers keep importing the repo-config readers from here (they are part of
|
|
36
|
+
// this module's long-standing public surface); the implementations live in projectConfig.ts.
|
|
37
|
+
export { findProjectRoot, readLocalProjectConfig } from './projectConfig.js';
|
|
143
38
|
/**
|
|
144
39
|
* Returns the preview binding metadata when pb is currently bound to a throwaway preview,
|
|
145
40
|
* or null when bound to the real Chain (the default).
|
|
@@ -161,11 +56,7 @@ export function getPreviewBinding() {
|
|
|
161
56
|
try {
|
|
162
57
|
if (process.env.PRODUCTBRAIN_API_KEY)
|
|
163
58
|
return null;
|
|
164
|
-
|
|
165
|
-
if (localConfig?.preview === true && localConfig.apiKey && localConfig.siteUrl) {
|
|
166
|
-
return { workspaceName: localConfig.workspaceName ?? null };
|
|
167
|
-
}
|
|
168
|
-
return null;
|
|
59
|
+
return declaresCompletePreviewBinding(readLocalProjectConfig());
|
|
169
60
|
}
|
|
170
61
|
catch {
|
|
171
62
|
return null;
|
|
@@ -178,7 +69,7 @@ export function getPreviewBinding() {
|
|
|
178
69
|
*
|
|
179
70
|
* Co-writer note (SF-2): scripts/pb-binding.mjs is the OTHER writer of config.local.json — it
|
|
180
71
|
* merges/strips the preview-binding keys (apiKey, siteUrl, preview, workspaceName) for
|
|
181
|
-
* `npm run pb:preview` / `npm run pb:real
|
|
72
|
+
* `npm run pb:preview` / `npm run pb:real`, plus previewKey*. Both writers keep the `profile` pin. If you add
|
|
182
73
|
* a preview-scoped key here or in readLocalProjectConfig(), update pb-binding.mjs's PREVIEW_KEYS.
|
|
183
74
|
*/
|
|
184
75
|
export function setLocalProfilePin(projectRoot, profile) {
|
|
@@ -199,17 +90,17 @@ export function setLocalProfilePin(projectRoot, profile) {
|
|
|
199
90
|
/**
|
|
200
91
|
* WP-458 E2 — one-shot preview apiKey refresh from disk.
|
|
201
92
|
*
|
|
202
|
-
* After a worktree preview is reseeded, seed-preview.mjs Step 6 mints a NEW apiKey into
|
|
203
|
-
*
|
|
93
|
+
* After a worktree preview is reseeded, seed-preview.mjs Step 6 mints a NEW apiKey into the bound key
|
|
94
|
+
* file the binding recorded (`previewKey`), but `config.local.json` (and the live `process.env` binding it
|
|
204
95
|
* seeded via loadEnv) still carry the PRE-reseed key — so the next `pb session start` fails auth
|
|
205
|
-
* with an opaque INTERNAL. This re-reads the fresh key from
|
|
206
|
-
* ONCE (session.ts). It is deliberately disk-to-disk: it compares
|
|
96
|
+
* with an opaque INTERNAL. This re-reads the fresh key from that file so the caller can retry
|
|
97
|
+
* ONCE (session.ts). It is deliberately disk-to-disk: it compares that file's key against
|
|
207
98
|
* config.local.json's bound key, NOT against process.env (which loadEnv already populated from the
|
|
208
99
|
* stale binding), so it can't be confused by its own prior population. Never throws — any error
|
|
209
100
|
* degrades to 'unavailable'/'not-bound' so it can sit on the session-start path.
|
|
210
101
|
*
|
|
211
102
|
* Co-writer note (SF-2): mirrors pb-binding.mjs / setLocalProfilePin — preserves every sibling key
|
|
212
|
-
* in config.local.json (profile, preview, workspaceName) and only rewrites apiKey + siteUrl.
|
|
103
|
+
* in config.local.json (profile, preview, workspaceName, previewKey*) and only rewrites apiKey + siteUrl.
|
|
213
104
|
*/
|
|
214
105
|
export function refreshPreviewApiKeyFromDisk() {
|
|
215
106
|
try {
|
|
@@ -220,26 +111,16 @@ export function refreshPreviewApiKeyFromDisk() {
|
|
|
220
111
|
// Only act on a real preview binding (preview:true + atomic apiKey+siteUrl pair, SF-3).
|
|
221
112
|
if (!local?.preview || !local.apiKey || !local.siteUrl)
|
|
222
113
|
return 'not-bound';
|
|
223
|
-
// Never clobber a genuine env override:
|
|
224
|
-
// the
|
|
225
|
-
//
|
|
114
|
+
// Never clobber a genuine env override. BOTH signals: the value comparison misses an operator
|
|
115
|
+
// who exported the SAME key the binding holds (Codex P2 r12); the snapshot misses one set
|
|
116
|
+
// after module load. An unset key is fine — loadEnv may not have run yet.
|
|
226
117
|
const liveKey = process.env.PRODUCTBRAIN_API_KEY;
|
|
227
|
-
if (liveKey && liveKey !== local.apiKey)
|
|
118
|
+
if (isEnvKeyBinding() || (liveKey && liveKey !== local.apiKey))
|
|
228
119
|
return 'not-bound';
|
|
229
|
-
//
|
|
230
|
-
const
|
|
231
|
-
if (!
|
|
120
|
+
// Only the key file pb:preview bound, and only while it still names that person, workspace and seat (TEN-4883).
|
|
121
|
+
const fresh = local.previewKey ? readBoundPreviewKey(projectRoot, local.previewKey) : null;
|
|
122
|
+
if (!fresh)
|
|
232
123
|
return 'unavailable';
|
|
233
|
-
let fresh;
|
|
234
|
-
try {
|
|
235
|
-
const parsed = JSON.parse(readFileSync(previewPath, 'utf8'));
|
|
236
|
-
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed))
|
|
237
|
-
return 'unavailable';
|
|
238
|
-
fresh = parsed;
|
|
239
|
-
}
|
|
240
|
-
catch {
|
|
241
|
-
return 'unavailable';
|
|
242
|
-
}
|
|
243
124
|
const freshKey = typeof fresh.apiKey === 'string' ? fresh.apiKey : '';
|
|
244
125
|
if (!freshKey.startsWith(API_KEY_PREFIX))
|
|
245
126
|
return 'unavailable';
|
|
@@ -271,21 +152,21 @@ export function refreshPreviewApiKeyFromDisk() {
|
|
|
271
152
|
}
|
|
272
153
|
}
|
|
273
154
|
/**
|
|
274
|
-
* Resolve the effective profile NAME + where it came from.
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* the
|
|
155
|
+
* Resolve the effective profile NAME + where it came from. PRECEDENCE — local pin > env >
|
|
156
|
+
* global > default: the pin outranks `PB_PROFILE` because resolveConfig() 2b / loadEnv() 1b
|
|
157
|
+
* bind the pinned key before the profile system (the only step reading `PB_PROFILE`), so
|
|
158
|
+
* under both the env name never supplies the credential and must not be reported. Unlike
|
|
159
|
+
* resolveConfig() this names the *configured* pin even when unresolvable (deleted / missing
|
|
160
|
+
* key): a dangling pin must be surfaced by `pb whoami`, never masked by the global profile
|
|
161
|
+
* — the TEN-2163 silent-drift bug. Used by `pb whoami`, session labels, "now using" prints.
|
|
281
162
|
*/
|
|
282
163
|
export function resolveEffectiveProfile() {
|
|
283
|
-
const envProfile = process.env.PB_PROFILE?.trim();
|
|
284
|
-
if (envProfile)
|
|
285
|
-
return { profile: envProfile, source: 'env' };
|
|
286
164
|
const localProfile = readLocalProjectConfig()?.profile;
|
|
287
165
|
if (localProfile)
|
|
288
166
|
return { profile: localProfile, source: 'local' };
|
|
167
|
+
const envProfile = process.env.PB_PROFILE?.trim();
|
|
168
|
+
if (envProfile)
|
|
169
|
+
return { profile: envProfile, source: 'env' };
|
|
289
170
|
const globalProfile = getGlobalActiveProfile();
|
|
290
171
|
if (globalProfile)
|
|
291
172
|
return { profile: globalProfile, source: 'global' };
|
|
@@ -298,23 +179,28 @@ export function resolveEffectiveProfile() {
|
|
|
298
179
|
* Resolution order:
|
|
299
180
|
* 1. Environment variables (highest priority)
|
|
300
181
|
* 2. config.local.json profile → resolveNamedProfileConfig(profile) for apiKey + siteUrl
|
|
301
|
-
*
|
|
182
|
+
* 2c. Declared project naming no tenant — refuses (config.json names neither a tenant nor a gateway)
|
|
302
183
|
* 3. Profile system (~/.config/productbrain/profiles/{name}.env)
|
|
303
184
|
* 4. Legacy home config (~/.config/productbrain/.env)
|
|
304
185
|
* 5. CWD .env files (.env.mcp, packages/mcp-server/.env.mcp, .env)
|
|
305
186
|
*
|
|
306
|
-
*
|
|
187
|
+
* A key travels only with the site URL stored or exported beside it (TEN-4500): every branch
|
|
188
|
+
* reads its URL from the same source as its key, and a key with no URL of its own goes to
|
|
189
|
+
* DEFAULT_SITE_URL. `.productbrain/config.json` is committed, so a cloned repo controls its
|
|
190
|
+
* siteUrl; it never routes a key. Same rule as resolveAdminConfig() (TEN-1334). loadEnv()
|
|
191
|
+
* exports this function's answer, so `pb doctor` and the command path cannot name different
|
|
192
|
+
* hosts. `siteUrlSource` records which source supplied the URL.
|
|
193
|
+
*
|
|
194
|
+
* THROWS at step 2 rather than substituting a different workspace: CONFIG_INVALID at 2a
|
|
195
|
+
* (incomplete binding), AUTH_MISSING at 2b (dangling pin), missing-pin at 2c. getConfigSafe()
|
|
196
|
+
* reports each as `ok: false` with the kind preserved, for callers that must not crash.
|
|
307
197
|
*/
|
|
308
|
-
export function resolveConfig() {
|
|
309
|
-
// 1. Env vars
|
|
310
|
-
const envKey = process.env.PRODUCTBRAIN_API_KEY;
|
|
198
|
+
export function resolveConfig(ignoreEnvKey = false) {
|
|
199
|
+
// 1. Env vars. `ignoreEnvKey`: reporting-only seam, rationale at its call site (TEN-3311).
|
|
200
|
+
const envKey = ignoreEnvKey ? undefined : process.env.PRODUCTBRAIN_API_KEY;
|
|
311
201
|
const envSite = process.env.CONVEX_SITE_URL;
|
|
312
202
|
if (envKey) {
|
|
313
|
-
return {
|
|
314
|
-
apiKey: envKey,
|
|
315
|
-
siteUrl: (envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
316
|
-
source: 'env',
|
|
317
|
-
};
|
|
203
|
+
return { apiKey: envKey, source: 'env', ...pickSiteUrl([['env', envSite]]) };
|
|
318
204
|
}
|
|
319
205
|
// 2. Local project config — check for direct preview binding first, then profile pin.
|
|
320
206
|
const localConfig = readLocalProjectConfig();
|
|
@@ -325,39 +211,35 @@ export function resolveConfig() {
|
|
|
325
211
|
//
|
|
326
212
|
// Atomic apiKey+siteUrl (SF-3): only honor the preview key when its OWN siteUrl is present.
|
|
327
213
|
// Never let a preview key borrow config.json's (real-dev) siteUrl — that would send a
|
|
328
|
-
// preview credential to a non-preview gateway (STD-261).
|
|
329
|
-
//
|
|
330
|
-
|
|
331
|
-
if (
|
|
214
|
+
// preview credential to a non-preview gateway (STD-261). A claimed but incomplete binding
|
|
215
|
+
// refuses before the profile pin, so neither credential nor tenant can silently change.
|
|
216
|
+
const localBinding = resolveLocalBinding(localConfig);
|
|
217
|
+
if (localBinding) {
|
|
218
|
+
// The binding carries its own atomic siteUrl (SF-3), so it is also the URL's origin.
|
|
332
219
|
return {
|
|
333
|
-
apiKey:
|
|
334
|
-
siteUrl:
|
|
220
|
+
apiKey: localBinding.apiKey,
|
|
221
|
+
siteUrl: localBinding.siteUrl,
|
|
335
222
|
source: 'project',
|
|
223
|
+
siteUrlSource: 'local-binding',
|
|
336
224
|
};
|
|
337
225
|
}
|
|
338
226
|
// 2b. Profile pin (config.local.json profile field, gitignored)
|
|
339
227
|
if (localConfig?.profile) {
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
siteUrl: (namedConfig.siteUrl || projectConfig?.siteUrl || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
347
|
-
source: 'project',
|
|
348
|
-
};
|
|
349
|
-
}
|
|
228
|
+
const pinned = resolvePinnedProfile(localConfig.profile);
|
|
229
|
+
return {
|
|
230
|
+
apiKey: pinned.apiKey,
|
|
231
|
+
source: 'project', profileName: localConfig.profile,
|
|
232
|
+
...pickSiteUrl([['profile-pin', pinned.siteUrl]]),
|
|
233
|
+
};
|
|
350
234
|
}
|
|
351
|
-
//
|
|
352
|
-
// Falls through; siteUrl from config.json is used as a tiebreaker below in step 3.
|
|
235
|
+
refuseWhenProjectHasNoTenant(); // 2c — declared project, no tenant named
|
|
353
236
|
// 3. Profile system
|
|
354
|
-
const projectConfig = readProjectConfig();
|
|
355
237
|
const profileConfig = resolveProfileConfig();
|
|
356
238
|
if (profileConfig?.apiKey) {
|
|
357
239
|
return {
|
|
358
240
|
apiKey: profileConfig.apiKey,
|
|
359
|
-
|
|
360
|
-
|
|
241
|
+
source: 'profile', profileName: profileConfig.profileName ?? undefined,
|
|
242
|
+
...pickSiteUrl([['profile', profileConfig.siteUrl]]),
|
|
361
243
|
};
|
|
362
244
|
}
|
|
363
245
|
// 4. Legacy home config
|
|
@@ -366,8 +248,8 @@ export function resolveConfig() {
|
|
|
366
248
|
if (vars['PRODUCTBRAIN_API_KEY']) {
|
|
367
249
|
return {
|
|
368
250
|
apiKey: vars['PRODUCTBRAIN_API_KEY'],
|
|
369
|
-
siteUrl: (projectConfig?.siteUrl || vars['CONVEX_SITE_URL'] || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
370
251
|
source: 'profile',
|
|
252
|
+
...pickSiteUrl([['legacy', vars['CONVEX_SITE_URL']]]),
|
|
371
253
|
};
|
|
372
254
|
}
|
|
373
255
|
}
|
|
@@ -379,18 +261,18 @@ export function resolveConfig() {
|
|
|
379
261
|
if (vars['PRODUCTBRAIN_API_KEY']) {
|
|
380
262
|
return {
|
|
381
263
|
apiKey: vars['PRODUCTBRAIN_API_KEY'],
|
|
382
|
-
siteUrl: (projectConfig?.siteUrl || vars['CONVEX_SITE_URL'] || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
383
264
|
source: 'cwd',
|
|
265
|
+
...pickSiteUrl([['cwd', vars['CONVEX_SITE_URL'], p]]),
|
|
384
266
|
};
|
|
385
267
|
}
|
|
386
268
|
break;
|
|
387
269
|
}
|
|
388
270
|
}
|
|
389
|
-
// 6. No API key found anywhere —
|
|
271
|
+
// 6. No API key found anywhere — siteUrl still resolves so diagnostics can report a gateway.
|
|
390
272
|
return {
|
|
391
273
|
apiKey: undefined,
|
|
392
|
-
siteUrl: (projectConfig?.siteUrl || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
393
274
|
source: 'default',
|
|
275
|
+
...pickSiteUrl([['env', envSite]]),
|
|
394
276
|
};
|
|
395
277
|
}
|
|
396
278
|
/** Parse env file content and return key-value pairs (without mutating process.env). */
|
|
@@ -415,53 +297,21 @@ function parseEnvContent(content) {
|
|
|
415
297
|
function loadEnv() {
|
|
416
298
|
if (envLoaded)
|
|
417
299
|
return;
|
|
418
|
-
|
|
419
|
-
//
|
|
420
|
-
|
|
421
|
-
//
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
process.env.PRODUCTBRAIN_API_KEY = localConfig.apiKey;
|
|
427
|
-
// SF-3 atomic pair: when we accept the preview key, we MUST pair it with
|
|
428
|
-
// its OWN siteUrl — even if CONVEX_SITE_URL is already exported. Otherwise
|
|
429
|
-
// a stale/real exported CONVEX_SITE_URL would silently route the preview
|
|
430
|
-
// credential to a non-preview gateway. Mirror of resolveConfig() step 2a,
|
|
431
|
-
// which returns localConfig.siteUrl unconditionally inside this branch.
|
|
432
|
-
process.env.CONVEX_SITE_URL = localConfig.siteUrl.replace(/\/$/, '');
|
|
433
|
-
}
|
|
434
|
-
// 1b. Profile pin
|
|
435
|
-
if (localConfig?.profile && !process.env.PRODUCTBRAIN_API_KEY) {
|
|
436
|
-
const namedConfig = resolveNamedProfileConfig(localConfig.profile);
|
|
437
|
-
if (namedConfig?.apiKey) {
|
|
438
|
-
process.env.PRODUCTBRAIN_API_KEY = namedConfig.apiKey;
|
|
439
|
-
if (!process.env.CONVEX_SITE_URL && namedConfig.siteUrl) {
|
|
440
|
-
process.env.CONVEX_SITE_URL = namedConfig.siteUrl.replace(/\/$/, '');
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
// 1b. Apply siteUrl from config.json (gateway override — no apiKey reading here)
|
|
445
|
-
const projectConfig = readProjectConfig();
|
|
446
|
-
if (projectConfig?.siteUrl && !process.env.CONVEX_SITE_URL) {
|
|
447
|
-
process.env.CONVEX_SITE_URL = projectConfig.siteUrl.replace(/\/$/, '');
|
|
448
|
-
}
|
|
449
|
-
// 2. Try profile system (handles auto-migration from legacy .env)
|
|
450
|
-
const profileConfig = resolveProfileConfig();
|
|
451
|
-
if (profileConfig) {
|
|
452
|
-
// Only set if not already set by env vars or project config
|
|
453
|
-
if (!process.env.PRODUCTBRAIN_API_KEY) {
|
|
454
|
-
process.env.PRODUCTBRAIN_API_KEY = profileConfig.apiKey;
|
|
455
|
-
}
|
|
456
|
-
if (!process.env.CONVEX_SITE_URL && profileConfig.siteUrl) {
|
|
457
|
-
process.env.CONVEX_SITE_URL = profileConfig.siteUrl.replace(/\/$/, '');
|
|
458
|
-
}
|
|
300
|
+
// 1. The credential and its site URL come from resolveConfig() as one pair, so the URL a key
|
|
301
|
+
// is sent to is decided in one place and `pb doctor` (getConfigSafe) names the same host this
|
|
302
|
+
// exports (TEN-4500). resolveConfig() throws the same refusals this path must raise: an
|
|
303
|
+
// incomplete preview binding, a dangling pin, a declared project with no pin.
|
|
304
|
+
const resolved = resolveConfig();
|
|
305
|
+
if (resolved.apiKey) {
|
|
306
|
+
process.env.PRODUCTBRAIN_API_KEY = resolved.apiKey;
|
|
307
|
+
process.env.CONVEX_SITE_URL = resolved.siteUrl;
|
|
459
308
|
}
|
|
460
|
-
//
|
|
309
|
+
// 2. The legacy home file and the first CWD env file still seed any OTHER unset variable they
|
|
310
|
+
// hold. They cannot move the pair above: both variables are already set whenever a key
|
|
311
|
+
// resolved, and when none did, resolveConfig() already read these files and found no key.
|
|
461
312
|
if (existsSync(HOME_ENV_PATH)) {
|
|
462
313
|
parseEnvContent(readFileSync(HOME_ENV_PATH, 'utf8'));
|
|
463
314
|
}
|
|
464
|
-
// 4. CWD env files
|
|
465
315
|
for (const p of CWD_ENV_PATHS) {
|
|
466
316
|
const full = resolve(process.cwd(), p);
|
|
467
317
|
if (existsSync(full)) {
|
|
@@ -469,79 +319,35 @@ function loadEnv() {
|
|
|
469
319
|
break;
|
|
470
320
|
}
|
|
471
321
|
}
|
|
322
|
+
// Marked loaded only on success: a dangling pin (step 1) throws, and latching the flag
|
|
323
|
+
// before that would leave the module "loaded" with no credential, so a caller that catches
|
|
324
|
+
// the refusal and retries would silently get the keyless path instead of the refusal again.
|
|
325
|
+
envLoaded = true;
|
|
472
326
|
}
|
|
473
327
|
/** Reset env loaded state — used for profile switching. */
|
|
474
328
|
export function resetConfigCache() {
|
|
475
329
|
envLoaded = false;
|
|
476
330
|
}
|
|
477
|
-
/**
|
|
478
|
-
* Guided flow when key is missing (TTY only). Per docs/cli-unauthenticated-user-journey.md.
|
|
479
|
-
* Returns true if we saved and ran retry; false if user said No (caller should exit).
|
|
480
|
-
*/
|
|
481
|
-
async function runGuidedFlow(retry) {
|
|
482
|
-
const hasKey = await promptConfirm({
|
|
483
|
-
message: 'Do you have an API key from Product Brain?',
|
|
484
|
-
initialValue: false,
|
|
485
|
-
});
|
|
486
|
-
if (!hasKey) {
|
|
487
|
-
console.log('Get your key: Product Brain app → Settings → API Keys. Then run: pb login');
|
|
488
|
-
process.exit(0);
|
|
489
|
-
}
|
|
490
|
-
let apiKey = await promptPassword({
|
|
491
|
-
message: `Paste your API key (${API_KEY_PREFIX}...)`,
|
|
492
|
-
validate: (v) => (!v ? 'Key is required' : undefined),
|
|
493
|
-
});
|
|
494
|
-
if (!apiKey.startsWith(API_KEY_PREFIX)) {
|
|
495
|
-
console.log(`Key must start with ${API_KEY_PREFIX}. Try again or run pb login.`);
|
|
496
|
-
apiKey = await promptPassword({
|
|
497
|
-
message: `Paste your API key (${API_KEY_PREFIX}...)`,
|
|
498
|
-
validate: (v) => (!v || !v.startsWith(API_KEY_PREFIX) ? `Key must start with ${API_KEY_PREFIX}` : undefined),
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
if (!apiKey || !apiKey.startsWith(API_KEY_PREFIX)) {
|
|
502
|
-
console.log('Get your key: Product Brain app → Settings → API Keys. Then run: pb login');
|
|
503
|
-
process.exit(0);
|
|
504
|
-
}
|
|
505
|
-
// Save as a named profile via the profile system
|
|
506
|
-
const { createProfile, getActiveProfile } = await import('./profiles.js');
|
|
507
|
-
const profileName = getActiveProfile() || 'default';
|
|
508
|
-
try {
|
|
509
|
-
createProfile(profileName, apiKey, DEFAULT_SITE_URL.replace(/\/$/, ''));
|
|
510
|
-
}
|
|
511
|
-
catch {
|
|
512
|
-
// Profile already exists — fall back to legacy path
|
|
513
|
-
const content = [
|
|
514
|
-
`# Product Brain CLI — saved by guided setup`,
|
|
515
|
-
`PRODUCTBRAIN_API_KEY=${apiKey}`,
|
|
516
|
-
`CONVEX_SITE_URL=${DEFAULT_SITE_URL.replace(/\/$/, '')}`,
|
|
517
|
-
'',
|
|
518
|
-
].join('\n');
|
|
519
|
-
mkdirSync(HOME_CONFIG_DIR, { recursive: true });
|
|
520
|
-
writeFileSync(HOME_ENV_PATH, content, { mode: 0o600 });
|
|
521
|
-
}
|
|
522
|
-
process.env.PRODUCTBRAIN_API_KEY = apiKey;
|
|
523
|
-
process.env.CONVEX_SITE_URL = DEFAULT_SITE_URL.replace(/\/$/, '');
|
|
524
|
-
console.log('Saved your key. Running your command…\n');
|
|
525
|
-
await retry();
|
|
526
|
-
return true;
|
|
527
|
-
}
|
|
528
331
|
export function getConfig() {
|
|
529
332
|
loadEnv();
|
|
530
333
|
const apiKey = process.env.PRODUCTBRAIN_API_KEY ?? '';
|
|
531
334
|
const siteUrl = (process.env.CONVEX_SITE_URL ?? DEFAULT_SITE_URL).replace(/\/$/, '');
|
|
532
|
-
|
|
533
|
-
|
|
335
|
+
// TASK-562: no key throws the one missing-key sentence getConfigSafe reports (configResult.ts).
|
|
336
|
+
if (!apiKey)
|
|
337
|
+
throw missingKeyError();
|
|
338
|
+
if (!apiKey.startsWith(API_KEY_PREFIX)) {
|
|
339
|
+
throw new CLIError(`The API key in use is not a ${API_KEY_PREFIX} key.`, {
|
|
534
340
|
code: ErrorCode.AUTH_MISSING,
|
|
535
341
|
category: 'auth',
|
|
536
|
-
guidance: '
|
|
342
|
+
guidance: 'Run `pb doctor` to see which source supplied it.',
|
|
537
343
|
});
|
|
538
344
|
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
throw new CLIError(`
|
|
345
|
+
if (isInsecureSiteUrl(siteUrl)) {
|
|
346
|
+
// loadEnv() exports a file-sourced URL into CONVEX_SITE_URL, so only `pb doctor` can name the origin.
|
|
347
|
+
throw new CLIError(`Site URL must use HTTPS (got "${siteUrl.slice(0, 30)}…"). API keys must not be sent over unencrypted connections.`, {
|
|
542
348
|
code: ErrorCode.CONFIG_INVALID,
|
|
543
349
|
category: 'config',
|
|
544
|
-
guidance: '
|
|
350
|
+
guidance: 'Run `pb doctor` to see which source supplied the URL, then set an https:// URL there.',
|
|
545
351
|
});
|
|
546
352
|
}
|
|
547
353
|
return { apiKey, siteUrl };
|
|
@@ -556,103 +362,26 @@ export function getConfig() {
|
|
|
556
362
|
* coexist by design — see WP-303 review (DW#5).
|
|
557
363
|
*
|
|
558
364
|
* Uses resolveConfig() directly (no loadEnv) to avoid env var pollution affecting source attribution.
|
|
365
|
+
*
|
|
366
|
+
* A refusal from resolveConfig() (dangling repo pin) is reported as `ok: false` with the
|
|
367
|
+
* refusal as the reason — NOT rethrown. This surface is what `pb doctor` and the bare-`pb`
|
|
368
|
+
* dashboard use to *diagnose*, and a diagnostic that dies on the condition it exists to
|
|
369
|
+
* explain is useless. The refusal keeps its teeth either way: `ok: false` hands out no
|
|
370
|
+
* credential, so nothing can proceed against the wrong workspace.
|
|
559
371
|
*/
|
|
560
372
|
export function getConfigSafe() {
|
|
561
|
-
|
|
562
|
-
if (!resolved.apiKey || !resolved.apiKey.startsWith(API_KEY_PREFIX)) {
|
|
563
|
-
return { ok: false, reason: 'No API key. Run pb login or set PRODUCTBRAIN_API_KEY.' };
|
|
564
|
-
}
|
|
565
|
-
const siteUrl = resolved.siteUrl;
|
|
566
|
-
const allowHttp = isDevMode() && siteUrl.startsWith('http://localhost');
|
|
567
|
-
if (!siteUrl.startsWith('https://') && !allowHttp) {
|
|
568
|
-
return {
|
|
569
|
-
ok: false,
|
|
570
|
-
reason: `CONVEX_SITE_URL must use HTTPS (got "${siteUrl.slice(0, 30)}…"). API keys must not be sent over unencrypted connections.`,
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
return { ok: true, apiKey: resolved.apiKey, siteUrl, source: resolved.source };
|
|
373
|
+
return resolveConfigResult(resolveConfig);
|
|
574
374
|
}
|
|
575
375
|
/**
|
|
576
|
-
* Get config
|
|
577
|
-
*
|
|
578
|
-
*
|
|
376
|
+
* Get config for a command that needs auth. TASK-562: the paste-a-key guided flow is deleted; a
|
|
377
|
+
* missing key throws the same missing-key sentence as getConfig, in a TTY too (connect, never paste).
|
|
378
|
+
* The retry callback and the null return stay for the ~30 callers; nothing retries any more.
|
|
579
379
|
*/
|
|
580
|
-
export async function getConfigOrGuide(
|
|
581
|
-
|
|
582
|
-
const apiKey = process.env.PRODUCTBRAIN_API_KEY ?? '';
|
|
583
|
-
const siteUrl = (process.env.CONVEX_SITE_URL ?? DEFAULT_SITE_URL).replace(/\/$/, '');
|
|
584
|
-
const allowHttp = isDevMode() && siteUrl.startsWith('http://localhost');
|
|
585
|
-
if (apiKey.startsWith(API_KEY_PREFIX) && (siteUrl.startsWith('https://') || allowHttp)) {
|
|
586
|
-
return { apiKey, siteUrl };
|
|
587
|
-
}
|
|
588
|
-
if (!process.stdin.isTTY) {
|
|
589
|
-
throw new CLIError(NON_TTY_MESSAGE, {
|
|
590
|
-
code: ErrorCode.AUTH_MISSING,
|
|
591
|
-
category: 'auth',
|
|
592
|
-
guidance: 'Set PRODUCTBRAIN_API_KEY or run `pb login`.',
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
const didRetry = await runGuidedFlow(retry);
|
|
596
|
-
return didRetry ? null : null;
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Resolve config for admin operations — profile-only resolution.
|
|
600
|
-
*
|
|
601
|
-
* Admin commands (pb admin ...) must NOT read .productbrain/config.json or CWD env files.
|
|
602
|
-
* The project config intentionally pins the repo to a dev Convex site; admin operations
|
|
603
|
-
* target PROD workspaces via the operator's active profile. Reading project config here
|
|
604
|
-
* would silently route admin calls to the wrong gateway (TEN-1334).
|
|
605
|
-
*
|
|
606
|
-
* Resolution order:
|
|
607
|
-
* 1. Shell env vars (PRODUCTBRAIN_API_KEY / CONVEX_SITE_URL) — always win
|
|
608
|
-
* 2. Active named profile (~/.config/productbrain/profiles/{name}.env)
|
|
609
|
-
* 3. Legacy home config (~/.config/productbrain/.env)
|
|
610
|
-
* 4. DEFAULT_SITE_URL as fallback for siteUrl
|
|
611
|
-
*
|
|
612
|
-
* Throws CLIError with AUTH_MISSING if no API key is found.
|
|
613
|
-
*/
|
|
614
|
-
export function resolveAdminConfig() {
|
|
615
|
-
let apiKey;
|
|
616
|
-
let rawSiteUrl;
|
|
617
|
-
// 1. Shell env vars — always highest priority
|
|
618
|
-
const envKey = process.env.PRODUCTBRAIN_API_KEY;
|
|
619
|
-
if (envKey?.startsWith(API_KEY_PREFIX)) {
|
|
620
|
-
apiKey = envKey;
|
|
621
|
-
rawSiteUrl = process.env.CONVEX_SITE_URL;
|
|
622
|
-
}
|
|
623
|
-
// 2. Active profile (no project config, no CWD files)
|
|
624
|
-
if (!apiKey) {
|
|
625
|
-
const profileConfig = resolveProfileConfig();
|
|
626
|
-
if (profileConfig?.apiKey?.startsWith(API_KEY_PREFIX)) {
|
|
627
|
-
apiKey = profileConfig.apiKey;
|
|
628
|
-
rawSiteUrl = profileConfig.siteUrl;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
// 3. Legacy ~/.config/productbrain/.env
|
|
632
|
-
if (!apiKey && existsSync(HOME_ENV_PATH)) {
|
|
633
|
-
const vars = parseEnvVars(readFileSync(HOME_ENV_PATH, 'utf8'));
|
|
634
|
-
if (vars['PRODUCTBRAIN_API_KEY']?.startsWith(API_KEY_PREFIX)) {
|
|
635
|
-
apiKey = vars['PRODUCTBRAIN_API_KEY'];
|
|
636
|
-
rawSiteUrl = vars['CONVEX_SITE_URL'];
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
if (!apiKey) {
|
|
640
|
-
throw new CLIError('No API key found. Run pb login or set PRODUCTBRAIN_API_KEY.', {
|
|
641
|
-
code: ErrorCode.AUTH_MISSING,
|
|
642
|
-
category: 'auth',
|
|
643
|
-
guidance: 'Run `pb login` to set your API key.',
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
const siteUrl = (rawSiteUrl || DEFAULT_SITE_URL).replace(/\/$/, '');
|
|
647
|
-
const allowHttp = isDevMode() && siteUrl.startsWith('http://localhost');
|
|
648
|
-
if (!siteUrl.startsWith('https://') && !allowHttp) {
|
|
649
|
-
throw new CLIError(`CONVEX_SITE_URL must use HTTPS for admin operations (got "${siteUrl.slice(0, 30)}…").`, {
|
|
650
|
-
code: ErrorCode.CONFIG_INVALID,
|
|
651
|
-
category: 'config',
|
|
652
|
-
guidance: 'Set CONVEX_SITE_URL to an https:// URL.',
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
return { apiKey, siteUrl };
|
|
380
|
+
export async function getConfigOrGuide(_retry) {
|
|
381
|
+
return getConfig();
|
|
656
382
|
}
|
|
657
|
-
|
|
383
|
+
// resolveAdminConfig() lives in adminConfig.ts (WP-681: split out to stay under the 500-LOC
|
|
384
|
+
// budget). NOT re-exported here — that would be a circular import (adminConfig.ts imports
|
|
385
|
+
// readLocalProjectConfig/HOME_ENV_PATH from this file); every caller imports it directly.
|
|
386
|
+
export { HOME_CONFIG_DIR, HOME_ENV_PATH };
|
|
658
387
|
//# sourceMappingURL=config.js.map
|