@productbrain/cli 0.1.0-beta.1065 → 0.1.0-beta.10656
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 +11 -2
- 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 +109 -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 +67 -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 +1365 -182
- package/dist/__tests__/capture.test.js.map +1 -1
- 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__/collection-registry-seed-drift.test.d.ts +2 -0
- package/dist/__tests__/collection-registry-seed-drift.test.d.ts.map +1 -0
- package/dist/__tests__/collection-registry-seed-drift.test.js +102 -0
- package/dist/__tests__/collection-registry-seed-drift.test.js.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts +2 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.js +93 -0
- package/dist/__tests__/config-prod-fallthrough.test.js.map +1 -0
- package/dist/__tests__/config.test.js +559 -40
- package/dist/__tests__/config.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 +182 -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 +526 -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__/handshake-augment.test.js +4 -20
- package/dist/__tests__/handshake-augment.test.js.map +1 -1
- package/dist/__tests__/handshake-dormancy.test.js +10 -193
- package/dist/__tests__/handshake-dormancy.test.js.map +1 -1
- package/dist/__tests__/handshake-formatter.test.js +44 -0
- package/dist/__tests__/handshake-formatter.test.js.map +1 -1
- package/dist/__tests__/handshake-preview.test.js +271 -612
- package/dist/__tests__/handshake-preview.test.js.map +1 -1
- package/dist/__tests__/handshake-session-threading.test.d.ts +2 -0
- package/dist/__tests__/handshake-session-threading.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-session-threading.test.js +185 -0
- package/dist/__tests__/handshake-session-threading.test.js.map +1 -0
- package/dist/__tests__/handshake.e2e.test.js +7 -1033
- package/dist/__tests__/handshake.e2e.test.js.map +1 -1
- package/dist/__tests__/handshake.test.js +552 -317
- package/dist/__tests__/handshake.test.js.map +1 -1
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts +2 -0
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts.map +1 -0
- package/dist/__tests__/health-gap-kinds-drift.test.js +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.js +51 -14
- 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__/method-registry.integration.test.js +2 -3
- package/dist/__tests__/method-registry.integration.test.js.map +1 -1
- package/dist/__tests__/method-registry.test.d.ts +6 -8
- package/dist/__tests__/method-registry.test.d.ts.map +1 -1
- package/dist/__tests__/method-registry.test.js +22 -70
- package/dist/__tests__/method-registry.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 +367 -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.d.ts +2 -0
- package/dist/__tests__/preview-key-refresh.test.d.ts.map +1 -0
- package/dist/__tests__/preview-key-refresh.test.js +186 -0
- package/dist/__tests__/preview-key-refresh.test.js.map +1 -0
- 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__/proof-run.test.d.ts +2 -0
- package/dist/__tests__/proof-run.test.d.ts.map +1 -0
- package/dist/__tests__/proof-run.test.js +255 -0
- package/dist/__tests__/proof-run.test.js.map +1 -0
- package/dist/__tests__/rate-limit-resilience.test.d.ts +7 -0
- package/dist/__tests__/rate-limit-resilience.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-resilience.test.js +209 -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 +64 -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 +227 -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.d.ts +2 -0
- package/dist/__tests__/session-start-key-refresh.test.d.ts.map +1 -0
- package/dist/__tests__/session-start-key-refresh.test.js +197 -0
- package/dist/__tests__/session-start-key-refresh.test.js.map +1 -0
- 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 +218 -4
- package/dist/__tests__/session-switch.test.js.map +1 -1
- package/dist/__tests__/session-touch.test.js +6 -1
- 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 +169 -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 +458 -8
- package/dist/__tests__/update.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 +7 -114
- 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 +571 -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 +171 -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 +16 -10
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +172 -227
- 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 +11 -3
- package/dist/commands/connect-config.test.js.map +1 -1
- package/dist/commands/connect-context.d.ts +27 -17
- package/dist/commands/connect-context.d.ts.map +1 -1
- package/dist/commands/connect-context.js +45 -31
- package/dist/commands/connect-context.js.map +1 -1
- package/dist/commands/connect-context.test.js +91 -53
- package/dist/commands/connect-context.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 +24 -7
- 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 +109 -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 +134 -0
- package/dist/commands/connect-redeem-failure.test.js.map +1 -0
- package/dist/commands/connect-screens.d.ts +14 -3
- package/dist/commands/connect-screens.d.ts.map +1 -1
- package/dist/commands/connect-screens.js +62 -9
- package/dist/commands/connect-screens.js.map +1 -1
- 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 +55 -0
- package/dist/commands/connect-seal.test.js.map +1 -0
- package/dist/commands/connect.d.ts +14 -11
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +236 -69
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connect.test.js +226 -23
- 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/digest.d.ts +17 -0
- package/dist/commands/digest.d.ts.map +1 -0
- package/dist/commands/digest.js +58 -0
- package/dist/commands/digest.js.map +1 -0
- package/dist/commands/digest.test.d.ts +2 -0
- package/dist/commands/digest.test.d.ts.map +1 -0
- package/dist/commands/digest.test.js +36 -0
- package/dist/commands/digest.test.js.map +1 -0
- 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 +105 -35
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +202 -6
- 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 +308 -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 +36 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +171 -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 +109 -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/handshake.d.ts +42 -186
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +480 -1542
- package/dist/commands/handshake.js.map +1 -1
- 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 +30 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +62 -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 +106 -0
- package/dist/commands/history.test.js.map +1 -0
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +22 -13
- 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 +147 -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 +135 -29
- 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 +22 -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/proof-run.d.ts +51 -0
- package/dist/commands/proof-run.d.ts.map +1 -0
- package/dist/commands/proof-run.js +209 -0
- package/dist/commands/proof-run.js.map +1 -0
- package/dist/commands/quality.d.ts +21 -0
- package/dist/commands/quality.d.ts.map +1 -0
- package/dist/commands/quality.js +52 -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 +88 -0
- package/dist/commands/role.d.ts.map +1 -0
- package/dist/commands/role.js +234 -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 +348 -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 +40 -7
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +362 -121
- 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 +155 -41
- package/dist/commands/update.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 +5 -2
- 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 +76 -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 +39 -174
- 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.d.ts +2 -0
- package/dist/formatters/__tests__/session.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/session.test.js +265 -0
- package/dist/formatters/__tests__/session.test.js.map +1 -0
- 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 +17 -10
- package/dist/formatters/capture.d.ts.map +1 -1
- package/dist/formatters/capture.js +33 -10
- package/dist/formatters/capture.js.map +1 -1
- package/dist/formatters/coaching.d.ts +60 -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 +69 -0
- package/dist/formatters/conflicts.d.ts.map +1 -0
- package/dist/formatters/conflicts.js +87 -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 +136 -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/digest.d.ts +13 -0
- package/dist/formatters/digest.d.ts.map +1 -0
- package/dist/formatters/digest.js +98 -0
- package/dist/formatters/digest.js.map +1 -0
- package/dist/formatters/digest.test.d.ts +2 -0
- package/dist/formatters/digest.test.d.ts.map +1 -0
- package/dist/formatters/digest.test.js +166 -0
- package/dist/formatters/digest.test.js.map +1 -0
- 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 +49 -3
- package/dist/formatters/entry.d.ts.map +1 -1
- package/dist/formatters/entry.js +59 -7
- package/dist/formatters/entry.js.map +1 -1
- package/dist/formatters/entryAccept.d.ts +79 -0
- package/dist/formatters/entryAccept.d.ts.map +1 -0
- package/dist/formatters/entryAccept.js +78 -0
- package/dist/formatters/entryAccept.js.map +1 -0
- package/dist/formatters/feedback.d.ts +58 -0
- package/dist/formatters/feedback.d.ts.map +1 -0
- package/dist/formatters/feedback.js +91 -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 +123 -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 +94 -145
- package/dist/formatters/orient.d.ts.map +1 -1
- package/dist/formatters/orient.js +145 -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 +8 -0
- package/dist/formatters/qualityChecks.d.ts.map +1 -0
- package/dist/formatters/qualityChecks.js +19 -0
- package/dist/formatters/qualityChecks.js.map +1 -0
- package/dist/formatters/questions.d.ts +72 -0
- package/dist/formatters/questions.d.ts.map +1 -0
- package/dist/formatters/questions.js +116 -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 +144 -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 +162 -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 +301 -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 +118 -0
- package/dist/formatters/session-feedback.test.js.map +1 -0
- package/dist/formatters/session.d.ts +123 -5
- package/dist/formatters/session.d.ts.map +1 -1
- package/dist/formatters/session.js +333 -21
- 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 +22 -0
- package/dist/formatters/update.d.ts.map +1 -1
- package/dist/formatters/update.js +36 -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 +59 -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/relationTypes.generated.d.ts +12 -0
- package/dist/generated/relationTypes.generated.d.ts.map +1 -0
- package/dist/generated/relationTypes.generated.js +11 -0
- package/dist/generated/relationTypes.generated.js.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts +55 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.js +272 -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 +15 -0
- package/dist/handleCliError.d.ts.map +1 -0
- package/dist/handleCliError.js +77 -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 +175 -582
- package/dist/index.js.map +1 -1
- package/dist/lib/__tests__/legalRelationTypes.test.d.ts +2 -0
- package/dist/lib/__tests__/legalRelationTypes.test.d.ts.map +1 -0
- package/dist/lib/__tests__/legalRelationTypes.test.js +61 -0
- package/dist/lib/__tests__/legalRelationTypes.test.js.map +1 -0
- 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/captureGrounding.d.ts +48 -0
- package/dist/lib/captureGrounding.d.ts.map +1 -0
- package/dist/lib/captureGrounding.js +54 -0
- package/dist/lib/captureGrounding.js.map +1 -0
- package/dist/lib/captureGrounding.test.d.ts +2 -0
- package/dist/lib/captureGrounding.test.d.ts.map +1 -0
- package/dist/lib/captureGrounding.test.js +74 -0
- package/dist/lib/captureGrounding.test.js.map +1 -0
- package/dist/lib/captureLink.d.ts +26 -0
- package/dist/lib/captureLink.d.ts.map +1 -0
- package/dist/lib/captureLink.js +110 -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 +77 -0
- package/dist/lib/checklist.js.map +1 -0
- package/dist/lib/client.d.ts +32 -19
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +211 -67
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/collectionRegistry.d.ts +40 -5
- package/dist/lib/collectionRegistry.d.ts.map +1 -1
- package/dist/lib/collectionRegistry.js +71 -48
- package/dist/lib/collectionRegistry.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 +56 -0
- package/dist/lib/compose-wrapup-view.d.ts.map +1 -0
- package/dist/lib/compose-wrapup-view.js +39 -0
- package/dist/lib/compose-wrapup-view.js.map +1 -0
- package/dist/lib/config.d.ts +66 -103
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +155 -287
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/configResult.d.ts +102 -0
- package/dist/lib/configResult.d.ts.map +1 -0
- package/dist/lib/configResult.js +179 -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 +6 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +9 -1
- 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/legalRelationTypes.d.ts +19 -0
- package/dist/lib/legalRelationTypes.d.ts.map +1 -0
- package/dist/lib/legalRelationTypes.js +64 -0
- package/dist/lib/legalRelationTypes.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/method-registry.d.ts +16 -11
- package/dist/lib/method-registry.d.ts.map +1 -1
- package/dist/lib/method-registry.js +13 -25
- package/dist/lib/method-registry.js.map +1 -1
- 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 +121 -0
- package/dist/lib/projectConfig.d.ts.map +1 -0
- package/dist/lib/projectConfig.js +226 -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 +38 -0
- package/dist/lib/rate-limit.d.ts.map +1 -0
- package/dist/lib/rate-limit.js +83 -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/ruleListRender.d.ts +253 -0
- package/dist/lib/ruleListRender.d.ts.map +1 -0
- package/dist/lib/ruleListRender.js +335 -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 +45 -0
- package/dist/lib/seatSentence.d.ts.map +1 -0
- package/dist/lib/seatSentence.js +46 -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 +130 -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 +55 -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 +160 -0
- package/dist/lib/statusCategories.d.ts.map +1 -0
- package/dist/lib/statusCategories.js +284 -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/tokenConstants.d.ts +2 -0
- package/dist/lib/tokenConstants.d.ts.map +1 -1
- package/dist/lib/tokenConstants.js +2 -0
- package/dist/lib/tokenConstants.js.map +1 -1
- package/dist/lib/update-check.d.ts +3 -2
- package/dist/lib/update-check.d.ts.map +1 -1
- package/dist/lib/update-check.js +10 -4
- package/dist/lib/update-check.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 +123 -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 +42 -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 +190 -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 +179 -0
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.js.map +1 -0
- 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/package.json +9 -8
- 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__/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__/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__/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/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/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/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/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/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,18 +13,21 @@
|
|
|
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
29
|
import { confirm as promptConfirm, password as promptPassword } from './prompts.js';
|
|
30
|
+
import { isInsecureSiteUrl, pickSiteUrl, resolveConfigResult, } from './configResult.js';
|
|
27
31
|
const HOME_CONFIG_DIR = resolve(homedir(), '.config', 'productbrain');
|
|
28
32
|
const HOME_ENV_PATH = resolve(HOME_CONFIG_DIR, '.env');
|
|
29
33
|
const CWD_ENV_PATHS = ['.env.mcp', 'packages/mcp-server/.env.mcp', '.env'];
|
|
@@ -31,115 +35,9 @@ const CWD_ENV_PATHS = ['.env.mcp', 'packages/mcp-server/.env.mcp', '.env'];
|
|
|
31
35
|
const NON_TTY_MESSAGE = 'No API key. Set PRODUCTBRAIN_API_KEY or run pb login.';
|
|
32
36
|
/** Track whether env has been loaded to avoid redundant file reads. */
|
|
33
37
|
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
|
-
}
|
|
38
|
+
// Re-exported so callers keep importing the repo-config readers from here (they are part of
|
|
39
|
+
// this module's long-standing public surface); the implementations live in projectConfig.ts.
|
|
40
|
+
export { findProjectRoot, readLocalProjectConfig } from './projectConfig.js';
|
|
143
41
|
/**
|
|
144
42
|
* Returns the preview binding metadata when pb is currently bound to a throwaway preview,
|
|
145
43
|
* or null when bound to the real Chain (the default).
|
|
@@ -161,11 +59,7 @@ export function getPreviewBinding() {
|
|
|
161
59
|
try {
|
|
162
60
|
if (process.env.PRODUCTBRAIN_API_KEY)
|
|
163
61
|
return null;
|
|
164
|
-
|
|
165
|
-
if (localConfig?.preview === true && localConfig.apiKey && localConfig.siteUrl) {
|
|
166
|
-
return { workspaceName: localConfig.workspaceName ?? null };
|
|
167
|
-
}
|
|
168
|
-
return null;
|
|
62
|
+
return declaresCompletePreviewBinding(readLocalProjectConfig());
|
|
169
63
|
}
|
|
170
64
|
catch {
|
|
171
65
|
return null;
|
|
@@ -178,7 +72,7 @@ export function getPreviewBinding() {
|
|
|
178
72
|
*
|
|
179
73
|
* Co-writer note (SF-2): scripts/pb-binding.mjs is the OTHER writer of config.local.json — it
|
|
180
74
|
* merges/strips the preview-binding keys (apiKey, siteUrl, preview, workspaceName) for
|
|
181
|
-
* `npm run pb:preview` / `npm run pb:real
|
|
75
|
+
* `npm run pb:preview` / `npm run pb:real`, plus previewKey*. Both writers keep the `profile` pin. If you add
|
|
182
76
|
* a preview-scoped key here or in readLocalProjectConfig(), update pb-binding.mjs's PREVIEW_KEYS.
|
|
183
77
|
*/
|
|
184
78
|
export function setLocalProfilePin(projectRoot, profile) {
|
|
@@ -197,21 +91,85 @@ export function setLocalProfilePin(projectRoot, profile) {
|
|
|
197
91
|
writeFileSync(localConfigPath, JSON.stringify({ ...existing, profile }, null, 2) + '\n');
|
|
198
92
|
}
|
|
199
93
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
94
|
+
* WP-458 E2 — one-shot preview apiKey refresh from disk.
|
|
95
|
+
*
|
|
96
|
+
* After a worktree preview is reseeded, seed-preview.mjs Step 6 mints a NEW apiKey into the bound key
|
|
97
|
+
* file the binding recorded (`previewKey`), but `config.local.json` (and the live `process.env` binding it
|
|
98
|
+
* seeded via loadEnv) still carry the PRE-reseed key — so the next `pb session start` fails auth
|
|
99
|
+
* with an opaque INTERNAL. This re-reads the fresh key from that file so the caller can retry
|
|
100
|
+
* ONCE (session.ts). It is deliberately disk-to-disk: it compares that file's key against
|
|
101
|
+
* config.local.json's bound key, NOT against process.env (which loadEnv already populated from the
|
|
102
|
+
* stale binding), so it can't be confused by its own prior population. Never throws — any error
|
|
103
|
+
* degrades to 'unavailable'/'not-bound' so it can sit on the session-start path.
|
|
104
|
+
*
|
|
105
|
+
* Co-writer note (SF-2): mirrors pb-binding.mjs / setLocalProfilePin — preserves every sibling key
|
|
106
|
+
* in config.local.json (profile, preview, workspaceName, previewKey*) and only rewrites apiKey + siteUrl.
|
|
107
|
+
*/
|
|
108
|
+
export function refreshPreviewApiKeyFromDisk() {
|
|
109
|
+
try {
|
|
110
|
+
const projectRoot = findProjectRoot(process.cwd());
|
|
111
|
+
if (!projectRoot)
|
|
112
|
+
return 'not-bound';
|
|
113
|
+
const local = readLocalProjectConfig();
|
|
114
|
+
// Only act on a real preview binding (preview:true + atomic apiKey+siteUrl pair, SF-3).
|
|
115
|
+
if (!local?.preview || !local.apiKey || !local.siteUrl)
|
|
116
|
+
return 'not-bound';
|
|
117
|
+
// Never clobber a genuine env override. BOTH signals: the value comparison misses an operator
|
|
118
|
+
// who exported the SAME key the binding holds (Codex P2 r12); the snapshot misses one set
|
|
119
|
+
// after module load. An unset key is fine — loadEnv may not have run yet.
|
|
120
|
+
const liveKey = process.env.PRODUCTBRAIN_API_KEY;
|
|
121
|
+
if (isEnvKeyBinding() || (liveKey && liveKey !== local.apiKey))
|
|
122
|
+
return 'not-bound';
|
|
123
|
+
// Only the key file pb:preview bound, and only while it still names that person, workspace and seat (TEN-4883).
|
|
124
|
+
const fresh = local.previewKey ? readBoundPreviewKey(projectRoot, local.previewKey) : null;
|
|
125
|
+
if (!fresh)
|
|
126
|
+
return 'unavailable';
|
|
127
|
+
const freshKey = typeof fresh.apiKey === 'string' ? fresh.apiKey : '';
|
|
128
|
+
if (!freshKey.startsWith(API_KEY_PREFIX))
|
|
129
|
+
return 'unavailable';
|
|
130
|
+
// Same key as the one already bound — retrying would just fail again; the failure is not a
|
|
131
|
+
// stale key, so the caller surfaces the real error rather than relabelling it.
|
|
132
|
+
if (freshKey === local.apiKey)
|
|
133
|
+
return 'unchanged';
|
|
134
|
+
const freshSite = typeof fresh.siteUrl === 'string' && fresh.siteUrl ? fresh.siteUrl : local.siteUrl;
|
|
135
|
+
// Merge the fresh preview key into config.local.json, preserving siblings.
|
|
136
|
+
const localConfigPath = resolve(projectRoot, '.productbrain', 'config.local.json');
|
|
137
|
+
let existing = {};
|
|
138
|
+
if (existsSync(localConfigPath)) {
|
|
139
|
+
try {
|
|
140
|
+
const parsed = JSON.parse(readFileSync(localConfigPath, 'utf8'));
|
|
141
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed))
|
|
142
|
+
existing = parsed;
|
|
143
|
+
}
|
|
144
|
+
catch { /* overwrite below */ }
|
|
145
|
+
}
|
|
146
|
+
writeFileSync(localConfigPath, JSON.stringify({ ...existing, apiKey: freshKey, siteUrl: freshSite }, null, 2) + '\n');
|
|
147
|
+
// Update the live binding + drop the load cache so the next getConfig() uses the fresh key.
|
|
148
|
+
process.env.PRODUCTBRAIN_API_KEY = freshKey;
|
|
149
|
+
process.env.CONVEX_SITE_URL = freshSite.replace(/\/$/, '');
|
|
150
|
+
resetConfigCache();
|
|
151
|
+
return 'refreshed';
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
return 'unavailable';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Resolve the effective profile NAME + where it came from. PRECEDENCE — local pin > env >
|
|
159
|
+
* global > default: the pin outranks `PB_PROFILE` because resolveConfig() 2b / loadEnv() 1b
|
|
160
|
+
* bind the pinned key before the profile system (the only step reading `PB_PROFILE`), so
|
|
161
|
+
* under both the env name never supplies the credential and must not be reported. Unlike
|
|
162
|
+
* resolveConfig() this names the *configured* pin even when unresolvable (deleted / missing
|
|
163
|
+
* key): a dangling pin must be surfaced by `pb whoami`, never masked by the global profile
|
|
164
|
+
* — the TEN-2163 silent-drift bug. Used by `pb whoami`, session labels, "now using" prints.
|
|
207
165
|
*/
|
|
208
166
|
export function resolveEffectiveProfile() {
|
|
209
|
-
const envProfile = process.env.PB_PROFILE?.trim();
|
|
210
|
-
if (envProfile)
|
|
211
|
-
return { profile: envProfile, source: 'env' };
|
|
212
167
|
const localProfile = readLocalProjectConfig()?.profile;
|
|
213
168
|
if (localProfile)
|
|
214
169
|
return { profile: localProfile, source: 'local' };
|
|
170
|
+
const envProfile = process.env.PB_PROFILE?.trim();
|
|
171
|
+
if (envProfile)
|
|
172
|
+
return { profile: envProfile, source: 'env' };
|
|
215
173
|
const globalProfile = getGlobalActiveProfile();
|
|
216
174
|
if (globalProfile)
|
|
217
175
|
return { profile: globalProfile, source: 'global' };
|
|
@@ -224,23 +182,28 @@ export function resolveEffectiveProfile() {
|
|
|
224
182
|
* Resolution order:
|
|
225
183
|
* 1. Environment variables (highest priority)
|
|
226
184
|
* 2. config.local.json profile → resolveNamedProfileConfig(profile) for apiKey + siteUrl
|
|
227
|
-
*
|
|
185
|
+
* 2c. Declared project naming no tenant — refuses (config.json names neither a tenant nor a gateway)
|
|
228
186
|
* 3. Profile system (~/.config/productbrain/profiles/{name}.env)
|
|
229
187
|
* 4. Legacy home config (~/.config/productbrain/.env)
|
|
230
188
|
* 5. CWD .env files (.env.mcp, packages/mcp-server/.env.mcp, .env)
|
|
231
189
|
*
|
|
232
|
-
*
|
|
190
|
+
* A key travels only with the site URL stored or exported beside it (TEN-4500): every branch
|
|
191
|
+
* reads its URL from the same source as its key, and a key with no URL of its own goes to
|
|
192
|
+
* DEFAULT_SITE_URL. `.productbrain/config.json` is committed, so a cloned repo controls its
|
|
193
|
+
* siteUrl; it never routes a key. Same rule as resolveAdminConfig() (TEN-1334). loadEnv()
|
|
194
|
+
* exports this function's answer, so `pb doctor` and the command path cannot name different
|
|
195
|
+
* hosts. `siteUrlSource` records which source supplied the URL.
|
|
196
|
+
*
|
|
197
|
+
* THROWS at step 2 rather than substituting a different workspace: CONFIG_INVALID at 2a
|
|
198
|
+
* (incomplete binding), AUTH_MISSING at 2b (dangling pin), missing-pin at 2c. getConfigSafe()
|
|
199
|
+
* reports each as `ok: false` with the kind preserved, for callers that must not crash.
|
|
233
200
|
*/
|
|
234
|
-
export function resolveConfig() {
|
|
235
|
-
// 1. Env vars
|
|
236
|
-
const envKey = process.env.PRODUCTBRAIN_API_KEY;
|
|
201
|
+
export function resolveConfig(ignoreEnvKey = false) {
|
|
202
|
+
// 1. Env vars. `ignoreEnvKey`: reporting-only seam, rationale at its call site (TEN-3311).
|
|
203
|
+
const envKey = ignoreEnvKey ? undefined : process.env.PRODUCTBRAIN_API_KEY;
|
|
237
204
|
const envSite = process.env.CONVEX_SITE_URL;
|
|
238
205
|
if (envKey) {
|
|
239
|
-
return {
|
|
240
|
-
apiKey: envKey,
|
|
241
|
-
siteUrl: (envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
242
|
-
source: 'env',
|
|
243
|
-
};
|
|
206
|
+
return { apiKey: envKey, source: 'env', ...pickSiteUrl([['env', envSite]]) };
|
|
244
207
|
}
|
|
245
208
|
// 2. Local project config — check for direct preview binding first, then profile pin.
|
|
246
209
|
const localConfig = readLocalProjectConfig();
|
|
@@ -251,39 +214,35 @@ export function resolveConfig() {
|
|
|
251
214
|
//
|
|
252
215
|
// Atomic apiKey+siteUrl (SF-3): only honor the preview key when its OWN siteUrl is present.
|
|
253
216
|
// Never let a preview key borrow config.json's (real-dev) siteUrl — that would send a
|
|
254
|
-
// preview credential to a non-preview gateway (STD-261).
|
|
255
|
-
//
|
|
256
|
-
|
|
257
|
-
if (
|
|
217
|
+
// preview credential to a non-preview gateway (STD-261). A claimed but incomplete binding
|
|
218
|
+
// refuses before the profile pin, so neither credential nor tenant can silently change.
|
|
219
|
+
const localBinding = resolveLocalBinding(localConfig);
|
|
220
|
+
if (localBinding) {
|
|
221
|
+
// The binding carries its own atomic siteUrl (SF-3), so it is also the URL's origin.
|
|
258
222
|
return {
|
|
259
|
-
apiKey:
|
|
260
|
-
siteUrl:
|
|
223
|
+
apiKey: localBinding.apiKey,
|
|
224
|
+
siteUrl: localBinding.siteUrl,
|
|
261
225
|
source: 'project',
|
|
226
|
+
siteUrlSource: 'local-binding',
|
|
262
227
|
};
|
|
263
228
|
}
|
|
264
229
|
// 2b. Profile pin (config.local.json profile field, gitignored)
|
|
265
230
|
if (localConfig?.profile) {
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
siteUrl: (namedConfig.siteUrl || projectConfig?.siteUrl || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
273
|
-
source: 'project',
|
|
274
|
-
};
|
|
275
|
-
}
|
|
231
|
+
const pinned = resolvePinnedProfile(localConfig.profile);
|
|
232
|
+
return {
|
|
233
|
+
apiKey: pinned.apiKey,
|
|
234
|
+
source: 'project', profileName: localConfig.profile,
|
|
235
|
+
...pickSiteUrl([['profile-pin', pinned.siteUrl]]),
|
|
236
|
+
};
|
|
276
237
|
}
|
|
277
|
-
//
|
|
278
|
-
// Falls through; siteUrl from config.json is used as a tiebreaker below in step 3.
|
|
238
|
+
refuseWhenProjectHasNoTenant(); // 2c — declared project, no tenant named
|
|
279
239
|
// 3. Profile system
|
|
280
|
-
const projectConfig = readProjectConfig();
|
|
281
240
|
const profileConfig = resolveProfileConfig();
|
|
282
241
|
if (profileConfig?.apiKey) {
|
|
283
242
|
return {
|
|
284
243
|
apiKey: profileConfig.apiKey,
|
|
285
|
-
|
|
286
|
-
|
|
244
|
+
source: 'profile', profileName: profileConfig.profileName ?? undefined,
|
|
245
|
+
...pickSiteUrl([['profile', profileConfig.siteUrl]]),
|
|
287
246
|
};
|
|
288
247
|
}
|
|
289
248
|
// 4. Legacy home config
|
|
@@ -292,8 +251,8 @@ export function resolveConfig() {
|
|
|
292
251
|
if (vars['PRODUCTBRAIN_API_KEY']) {
|
|
293
252
|
return {
|
|
294
253
|
apiKey: vars['PRODUCTBRAIN_API_KEY'],
|
|
295
|
-
siteUrl: (projectConfig?.siteUrl || vars['CONVEX_SITE_URL'] || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
296
254
|
source: 'profile',
|
|
255
|
+
...pickSiteUrl([['legacy', vars['CONVEX_SITE_URL']]]),
|
|
297
256
|
};
|
|
298
257
|
}
|
|
299
258
|
}
|
|
@@ -305,18 +264,18 @@ export function resolveConfig() {
|
|
|
305
264
|
if (vars['PRODUCTBRAIN_API_KEY']) {
|
|
306
265
|
return {
|
|
307
266
|
apiKey: vars['PRODUCTBRAIN_API_KEY'],
|
|
308
|
-
siteUrl: (projectConfig?.siteUrl || vars['CONVEX_SITE_URL'] || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
309
267
|
source: 'cwd',
|
|
268
|
+
...pickSiteUrl([['cwd', vars['CONVEX_SITE_URL'], p]]),
|
|
310
269
|
};
|
|
311
270
|
}
|
|
312
271
|
break;
|
|
313
272
|
}
|
|
314
273
|
}
|
|
315
|
-
// 6. No API key found anywhere —
|
|
274
|
+
// 6. No API key found anywhere — siteUrl still resolves so diagnostics can report a gateway.
|
|
316
275
|
return {
|
|
317
276
|
apiKey: undefined,
|
|
318
|
-
siteUrl: (projectConfig?.siteUrl || envSite || DEFAULT_SITE_URL).replace(/\/$/, ''),
|
|
319
277
|
source: 'default',
|
|
278
|
+
...pickSiteUrl([['env', envSite]]),
|
|
320
279
|
};
|
|
321
280
|
}
|
|
322
281
|
/** Parse env file content and return key-value pairs (without mutating process.env). */
|
|
@@ -341,53 +300,21 @@ function parseEnvContent(content) {
|
|
|
341
300
|
function loadEnv() {
|
|
342
301
|
if (envLoaded)
|
|
343
302
|
return;
|
|
344
|
-
|
|
345
|
-
//
|
|
346
|
-
|
|
347
|
-
//
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
process.env.PRODUCTBRAIN_API_KEY = localConfig.apiKey;
|
|
353
|
-
// SF-3 atomic pair: when we accept the preview key, we MUST pair it with
|
|
354
|
-
// its OWN siteUrl — even if CONVEX_SITE_URL is already exported. Otherwise
|
|
355
|
-
// a stale/real exported CONVEX_SITE_URL would silently route the preview
|
|
356
|
-
// credential to a non-preview gateway. Mirror of resolveConfig() step 2a,
|
|
357
|
-
// which returns localConfig.siteUrl unconditionally inside this branch.
|
|
358
|
-
process.env.CONVEX_SITE_URL = localConfig.siteUrl.replace(/\/$/, '');
|
|
359
|
-
}
|
|
360
|
-
// 1b. Profile pin
|
|
361
|
-
if (localConfig?.profile && !process.env.PRODUCTBRAIN_API_KEY) {
|
|
362
|
-
const namedConfig = resolveNamedProfileConfig(localConfig.profile);
|
|
363
|
-
if (namedConfig?.apiKey) {
|
|
364
|
-
process.env.PRODUCTBRAIN_API_KEY = namedConfig.apiKey;
|
|
365
|
-
if (!process.env.CONVEX_SITE_URL && namedConfig.siteUrl) {
|
|
366
|
-
process.env.CONVEX_SITE_URL = namedConfig.siteUrl.replace(/\/$/, '');
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
// 1b. Apply siteUrl from config.json (gateway override — no apiKey reading here)
|
|
371
|
-
const projectConfig = readProjectConfig();
|
|
372
|
-
if (projectConfig?.siteUrl && !process.env.CONVEX_SITE_URL) {
|
|
373
|
-
process.env.CONVEX_SITE_URL = projectConfig.siteUrl.replace(/\/$/, '');
|
|
374
|
-
}
|
|
375
|
-
// 2. Try profile system (handles auto-migration from legacy .env)
|
|
376
|
-
const profileConfig = resolveProfileConfig();
|
|
377
|
-
if (profileConfig) {
|
|
378
|
-
// Only set if not already set by env vars or project config
|
|
379
|
-
if (!process.env.PRODUCTBRAIN_API_KEY) {
|
|
380
|
-
process.env.PRODUCTBRAIN_API_KEY = profileConfig.apiKey;
|
|
381
|
-
}
|
|
382
|
-
if (!process.env.CONVEX_SITE_URL && profileConfig.siteUrl) {
|
|
383
|
-
process.env.CONVEX_SITE_URL = profileConfig.siteUrl.replace(/\/$/, '');
|
|
384
|
-
}
|
|
303
|
+
// 1. The credential and its site URL come from resolveConfig() as one pair, so the URL a key
|
|
304
|
+
// is sent to is decided in one place and `pb doctor` (getConfigSafe) names the same host this
|
|
305
|
+
// exports (TEN-4500). resolveConfig() throws the same refusals this path must raise: an
|
|
306
|
+
// incomplete preview binding, a dangling pin, a declared project with no pin.
|
|
307
|
+
const resolved = resolveConfig();
|
|
308
|
+
if (resolved.apiKey) {
|
|
309
|
+
process.env.PRODUCTBRAIN_API_KEY = resolved.apiKey;
|
|
310
|
+
process.env.CONVEX_SITE_URL = resolved.siteUrl;
|
|
385
311
|
}
|
|
386
|
-
//
|
|
312
|
+
// 2. The legacy home file and the first CWD env file still seed any OTHER unset variable they
|
|
313
|
+
// hold. They cannot move the pair above: both variables are already set whenever a key
|
|
314
|
+
// resolved, and when none did, resolveConfig() already read these files and found no key.
|
|
387
315
|
if (existsSync(HOME_ENV_PATH)) {
|
|
388
316
|
parseEnvContent(readFileSync(HOME_ENV_PATH, 'utf8'));
|
|
389
317
|
}
|
|
390
|
-
// 4. CWD env files
|
|
391
318
|
for (const p of CWD_ENV_PATHS) {
|
|
392
319
|
const full = resolve(process.cwd(), p);
|
|
393
320
|
if (existsSync(full)) {
|
|
@@ -395,6 +322,10 @@ function loadEnv() {
|
|
|
395
322
|
break;
|
|
396
323
|
}
|
|
397
324
|
}
|
|
325
|
+
// Marked loaded only on success: a dangling pin (step 1) throws, and latching the flag
|
|
326
|
+
// before that would leave the module "loaded" with no credential, so a caller that catches
|
|
327
|
+
// the refusal and retries would silently get the keyless path instead of the refusal again.
|
|
328
|
+
envLoaded = true;
|
|
398
329
|
}
|
|
399
330
|
/** Reset env loaded state — used for profile switching. */
|
|
400
331
|
export function resetConfigCache() {
|
|
@@ -462,12 +393,12 @@ export function getConfig() {
|
|
|
462
393
|
guidance: 'Set PRODUCTBRAIN_API_KEY or run `pb login`.',
|
|
463
394
|
});
|
|
464
395
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
throw new CLIError(`
|
|
396
|
+
if (isInsecureSiteUrl(siteUrl)) {
|
|
397
|
+
// loadEnv() exports a file-sourced URL into CONVEX_SITE_URL, so only `pb doctor` can name the origin.
|
|
398
|
+
throw new CLIError(`Site URL must use HTTPS (got "${siteUrl.slice(0, 30)}…"). API keys must not be sent over unencrypted connections.`, {
|
|
468
399
|
code: ErrorCode.CONFIG_INVALID,
|
|
469
400
|
category: 'config',
|
|
470
|
-
guidance: '
|
|
401
|
+
guidance: 'Run `pb doctor` to see which source supplied the URL, then set an https:// URL there.',
|
|
471
402
|
});
|
|
472
403
|
}
|
|
473
404
|
return { apiKey, siteUrl };
|
|
@@ -482,21 +413,15 @@ export function getConfig() {
|
|
|
482
413
|
* coexist by design — see WP-303 review (DW#5).
|
|
483
414
|
*
|
|
484
415
|
* Uses resolveConfig() directly (no loadEnv) to avoid env var pollution affecting source attribution.
|
|
416
|
+
*
|
|
417
|
+
* A refusal from resolveConfig() (dangling repo pin) is reported as `ok: false` with the
|
|
418
|
+
* refusal as the reason — NOT rethrown. This surface is what `pb doctor` and the bare-`pb`
|
|
419
|
+
* dashboard use to *diagnose*, and a diagnostic that dies on the condition it exists to
|
|
420
|
+
* explain is useless. The refusal keeps its teeth either way: `ok: false` hands out no
|
|
421
|
+
* credential, so nothing can proceed against the wrong workspace.
|
|
485
422
|
*/
|
|
486
423
|
export function getConfigSafe() {
|
|
487
|
-
|
|
488
|
-
if (!resolved.apiKey || !resolved.apiKey.startsWith(API_KEY_PREFIX)) {
|
|
489
|
-
return { ok: false, reason: 'No API key. Run pb login or set PRODUCTBRAIN_API_KEY.' };
|
|
490
|
-
}
|
|
491
|
-
const siteUrl = resolved.siteUrl;
|
|
492
|
-
const allowHttp = isDevMode() && siteUrl.startsWith('http://localhost');
|
|
493
|
-
if (!siteUrl.startsWith('https://') && !allowHttp) {
|
|
494
|
-
return {
|
|
495
|
-
ok: false,
|
|
496
|
-
reason: `CONVEX_SITE_URL must use HTTPS (got "${siteUrl.slice(0, 30)}…"). API keys must not be sent over unencrypted connections.`,
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
return { ok: true, apiKey: resolved.apiKey, siteUrl, source: resolved.source };
|
|
424
|
+
return resolveConfigResult(resolveConfig);
|
|
500
425
|
}
|
|
501
426
|
/**
|
|
502
427
|
* Get config; if key is missing and stdin is a TTY, run guided flow (y/n → paste key → save → retry).
|
|
@@ -507,8 +432,7 @@ export async function getConfigOrGuide(retry) {
|
|
|
507
432
|
loadEnv();
|
|
508
433
|
const apiKey = process.env.PRODUCTBRAIN_API_KEY ?? '';
|
|
509
434
|
const siteUrl = (process.env.CONVEX_SITE_URL ?? DEFAULT_SITE_URL).replace(/\/$/, '');
|
|
510
|
-
|
|
511
|
-
if (apiKey.startsWith(API_KEY_PREFIX) && (siteUrl.startsWith('https://') || allowHttp)) {
|
|
435
|
+
if (apiKey.startsWith(API_KEY_PREFIX) && !isInsecureSiteUrl(siteUrl)) {
|
|
512
436
|
return { apiKey, siteUrl };
|
|
513
437
|
}
|
|
514
438
|
if (!process.stdin.isTTY) {
|
|
@@ -521,64 +445,8 @@ export async function getConfigOrGuide(retry) {
|
|
|
521
445
|
const didRetry = await runGuidedFlow(retry);
|
|
522
446
|
return didRetry ? null : null;
|
|
523
447
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
* The project config intentionally pins the repo to a dev Convex site; admin operations
|
|
529
|
-
* target PROD workspaces via the operator's active profile. Reading project config here
|
|
530
|
-
* would silently route admin calls to the wrong gateway (TEN-1334).
|
|
531
|
-
*
|
|
532
|
-
* Resolution order:
|
|
533
|
-
* 1. Shell env vars (PRODUCTBRAIN_API_KEY / CONVEX_SITE_URL) — always win
|
|
534
|
-
* 2. Active named profile (~/.config/productbrain/profiles/{name}.env)
|
|
535
|
-
* 3. Legacy home config (~/.config/productbrain/.env)
|
|
536
|
-
* 4. DEFAULT_SITE_URL as fallback for siteUrl
|
|
537
|
-
*
|
|
538
|
-
* Throws CLIError with AUTH_MISSING if no API key is found.
|
|
539
|
-
*/
|
|
540
|
-
export function resolveAdminConfig() {
|
|
541
|
-
let apiKey;
|
|
542
|
-
let rawSiteUrl;
|
|
543
|
-
// 1. Shell env vars — always highest priority
|
|
544
|
-
const envKey = process.env.PRODUCTBRAIN_API_KEY;
|
|
545
|
-
if (envKey?.startsWith(API_KEY_PREFIX)) {
|
|
546
|
-
apiKey = envKey;
|
|
547
|
-
rawSiteUrl = process.env.CONVEX_SITE_URL;
|
|
548
|
-
}
|
|
549
|
-
// 2. Active profile (no project config, no CWD files)
|
|
550
|
-
if (!apiKey) {
|
|
551
|
-
const profileConfig = resolveProfileConfig();
|
|
552
|
-
if (profileConfig?.apiKey?.startsWith(API_KEY_PREFIX)) {
|
|
553
|
-
apiKey = profileConfig.apiKey;
|
|
554
|
-
rawSiteUrl = profileConfig.siteUrl;
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
// 3. Legacy ~/.config/productbrain/.env
|
|
558
|
-
if (!apiKey && existsSync(HOME_ENV_PATH)) {
|
|
559
|
-
const vars = parseEnvVars(readFileSync(HOME_ENV_PATH, 'utf8'));
|
|
560
|
-
if (vars['PRODUCTBRAIN_API_KEY']?.startsWith(API_KEY_PREFIX)) {
|
|
561
|
-
apiKey = vars['PRODUCTBRAIN_API_KEY'];
|
|
562
|
-
rawSiteUrl = vars['CONVEX_SITE_URL'];
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
if (!apiKey) {
|
|
566
|
-
throw new CLIError('No API key found. Run pb login or set PRODUCTBRAIN_API_KEY.', {
|
|
567
|
-
code: ErrorCode.AUTH_MISSING,
|
|
568
|
-
category: 'auth',
|
|
569
|
-
guidance: 'Run `pb login` to set your API key.',
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
const siteUrl = (rawSiteUrl || DEFAULT_SITE_URL).replace(/\/$/, '');
|
|
573
|
-
const allowHttp = isDevMode() && siteUrl.startsWith('http://localhost');
|
|
574
|
-
if (!siteUrl.startsWith('https://') && !allowHttp) {
|
|
575
|
-
throw new CLIError(`CONVEX_SITE_URL must use HTTPS for admin operations (got "${siteUrl.slice(0, 30)}…").`, {
|
|
576
|
-
code: ErrorCode.CONFIG_INVALID,
|
|
577
|
-
category: 'config',
|
|
578
|
-
guidance: 'Set CONVEX_SITE_URL to an https:// URL.',
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
return { apiKey, siteUrl };
|
|
582
|
-
}
|
|
583
|
-
export { HOME_CONFIG_DIR, HOME_ENV_PATH, readProjectConfig };
|
|
448
|
+
// resolveAdminConfig() lives in adminConfig.ts (WP-681: split out to stay under the 500-LOC
|
|
449
|
+
// budget). NOT re-exported here — that would be a circular import (adminConfig.ts imports
|
|
450
|
+
// readLocalProjectConfig/HOME_ENV_PATH from this file); every caller imports it directly.
|
|
451
|
+
export { HOME_CONFIG_DIR, HOME_ENV_PATH };
|
|
584
452
|
//# sourceMappingURL=config.js.map
|