@productbrain/cli 0.1.0-beta.9 → 0.1.0-beta.9000
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 +84 -90
- package/dist/__tests__/adapters.test.d.ts +2 -0
- package/dist/__tests__/adapters.test.d.ts.map +1 -0
- package/dist/__tests__/adapters.test.js +470 -0
- package/dist/__tests__/adapters.test.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/__tests__/batch-transformations.test.d.ts.map +1 -0
- package/dist/__tests__/batch-transformations.test.js +239 -0
- package/dist/__tests__/batch-transformations.test.js.map +1 -0
- package/dist/__tests__/canonicalRefs.vocab.test.d.ts +2 -0
- package/dist/__tests__/canonicalRefs.vocab.test.d.ts.map +1 -0
- package/dist/__tests__/canonicalRefs.vocab.test.js +251 -0
- package/dist/__tests__/canonicalRefs.vocab.test.js.map +1 -0
- package/dist/__tests__/capture-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-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 +1566 -26
- 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 +47 -0
- package/dist/__tests__/coaching-mirror-drift.test.js.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts +2 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.js +87 -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 +107 -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.d.ts +8 -0
- package/dist/__tests__/config.test.d.ts.map +1 -0
- package/dist/__tests__/config.test.js +993 -0
- package/dist/__tests__/config.test.js.map +1 -0
- package/dist/__tests__/constants.test.d.ts +2 -0
- package/dist/__tests__/constants.test.d.ts.map +1 -0
- package/dist/__tests__/constants.test.js +146 -0
- package/dist/__tests__/constants.test.js.map +1 -0
- package/dist/__tests__/constellation.test.js +45 -39
- package/dist/__tests__/constellation.test.js.map +1 -1
- package/dist/__tests__/context-strategy.test.d.ts +2 -0
- package/dist/__tests__/context-strategy.test.d.ts.map +1 -0
- package/dist/__tests__/context-strategy.test.js +79 -0
- package/dist/__tests__/context-strategy.test.js.map +1 -0
- package/dist/__tests__/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 +129 -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 +506 -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.d.ts +15 -0
- package/dist/__tests__/envelope-contract.test.d.ts.map +1 -0
- package/dist/__tests__/envelope-contract.test.js +154 -0
- package/dist/__tests__/envelope-contract.test.js.map +1 -0
- package/dist/__tests__/errors.test.d.ts +2 -0
- package/dist/__tests__/errors.test.d.ts.map +1 -0
- package/dist/__tests__/errors.test.js +159 -0
- package/dist/__tests__/errors.test.js.map +1 -0
- package/dist/__tests__/experiment.test.d.ts +6 -0
- package/dist/__tests__/experiment.test.d.ts.map +1 -0
- package/dist/__tests__/experiment.test.js +69 -0
- package/dist/__tests__/experiment.test.js.map +1 -0
- package/dist/__tests__/fields.test.js +82 -71
- 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 +121 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.js.map +1 -0
- package/dist/__tests__/glossary.test.d.ts +2 -0
- package/dist/__tests__/glossary.test.d.ts.map +1 -0
- package/dist/__tests__/glossary.test.js +32 -0
- package/dist/__tests__/glossary.test.js.map +1 -0
- package/dist/__tests__/handshake-augment.test.d.ts +2 -0
- package/dist/__tests__/handshake-augment.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-augment.test.js +407 -0
- package/dist/__tests__/handshake-augment.test.js.map +1 -0
- package/dist/__tests__/handshake-dormancy.test.d.ts +2 -0
- package/dist/__tests__/handshake-dormancy.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-dormancy.test.js +24 -0
- package/dist/__tests__/handshake-dormancy.test.js.map +1 -0
- package/dist/__tests__/handshake-formatter.test.d.ts +2 -0
- package/dist/__tests__/handshake-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-formatter.test.js +111 -0
- package/dist/__tests__/handshake-formatter.test.js.map +1 -0
- package/dist/__tests__/handshake-preview.test.d.ts +2 -0
- package/dist/__tests__/handshake-preview.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-preview.test.js +500 -0
- package/dist/__tests__/handshake-preview.test.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/__tests__/handshake.e2e.test.d.ts.map +1 -0
- package/dist/__tests__/handshake.e2e.test.js +226 -0
- package/dist/__tests__/handshake.e2e.test.js.map +1 -0
- package/dist/__tests__/handshake.test.js +854 -21
- 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.d.ts +2 -0
- package/dist/__tests__/hook-intents.test.d.ts.map +1 -0
- package/dist/__tests__/hook-intents.test.js +184 -0
- package/dist/__tests__/hook-intents.test.js.map +1 -0
- package/dist/__tests__/ingest.test.js +119 -12
- package/dist/__tests__/ingest.test.js.map +1 -1
- package/dist/__tests__/init.test.d.ts +7 -0
- package/dist/__tests__/init.test.d.ts.map +1 -0
- package/dist/__tests__/init.test.js +183 -0
- package/dist/__tests__/init.test.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/__tests__/login.test.d.ts.map +1 -0
- package/dist/__tests__/login.test.js +167 -0
- package/dist/__tests__/login.test.js.map +1 -0
- package/dist/__tests__/manifest.test.d.ts +6 -0
- package/dist/__tests__/manifest.test.d.ts.map +1 -0
- package/dist/__tests__/manifest.test.js +255 -0
- package/dist/__tests__/manifest.test.js.map +1 -0
- package/dist/__tests__/method-publish-coherency.test.d.ts +9 -0
- package/dist/__tests__/method-publish-coherency.test.d.ts.map +1 -0
- package/dist/__tests__/method-publish-coherency.test.js +71 -0
- package/dist/__tests__/method-publish-coherency.test.js.map +1 -0
- package/dist/__tests__/method-registry.integration.test.d.ts +6 -0
- package/dist/__tests__/method-registry.integration.test.d.ts.map +1 -0
- package/dist/__tests__/method-registry.integration.test.js +17 -0
- package/dist/__tests__/method-registry.integration.test.js.map +1 -0
- package/dist/__tests__/method-registry.test.d.ts +12 -0
- package/dist/__tests__/method-registry.test.d.ts.map +1 -0
- package/dist/__tests__/method-registry.test.js +86 -0
- package/dist/__tests__/method-registry.test.js.map +1 -0
- package/dist/__tests__/missingPin.test.d.ts +11 -0
- package/dist/__tests__/missingPin.test.d.ts.map +1 -0
- package/dist/__tests__/missingPin.test.js +233 -0
- package/dist/__tests__/missingPin.test.js.map +1 -0
- package/dist/__tests__/notice-marker.test.d.ts +2 -0
- package/dist/__tests__/notice-marker.test.d.ts.map +1 -0
- package/dist/__tests__/notice-marker.test.js +176 -0
- package/dist/__tests__/notice-marker.test.js.map +1 -0
- package/dist/__tests__/onboarding-path-b.test.d.ts +2 -0
- package/dist/__tests__/onboarding-path-b.test.d.ts.map +1 -0
- package/dist/__tests__/onboarding-path-b.test.js +46 -0
- package/dist/__tests__/onboarding-path-b.test.js.map +1 -0
- package/dist/__tests__/onboarding.test.d.ts +6 -0
- package/dist/__tests__/onboarding.test.d.ts.map +1 -0
- package/dist/__tests__/onboarding.test.js +371 -0
- package/dist/__tests__/onboarding.test.js.map +1 -0
- package/dist/__tests__/onboardingFallback.test.d.ts +2 -0
- package/dist/__tests__/onboardingFallback.test.d.ts.map +1 -0
- package/dist/__tests__/onboardingFallback.test.js +74 -0
- package/dist/__tests__/onboardingFallback.test.js.map +1 -0
- package/dist/__tests__/orient.test.d.ts +2 -0
- package/dist/__tests__/orient.test.d.ts.map +1 -0
- package/dist/__tests__/orient.test.js +664 -0
- package/dist/__tests__/orient.test.js.map +1 -0
- package/dist/__tests__/perimeter.test.d.ts +2 -0
- package/dist/__tests__/perimeter.test.d.ts.map +1 -0
- package/dist/__tests__/perimeter.test.js +165 -0
- package/dist/__tests__/perimeter.test.js.map +1 -0
- package/dist/__tests__/personal-layer.test.d.ts +11 -0
- package/dist/__tests__/personal-layer.test.d.ts.map +1 -0
- package/dist/__tests__/personal-layer.test.js +268 -0
- package/dist/__tests__/personal-layer.test.js.map +1 -0
- package/dist/__tests__/preview-key-refresh.test.d.ts +2 -0
- package/dist/__tests__/preview-key-refresh.test.d.ts.map +1 -0
- package/dist/__tests__/preview-key-refresh.test.js +126 -0
- package/dist/__tests__/preview-key-refresh.test.js.map +1 -0
- package/dist/__tests__/profiles.test.d.ts +2 -0
- package/dist/__tests__/profiles.test.d.ts.map +1 -0
- package/dist/__tests__/profiles.test.js +776 -0
- package/dist/__tests__/profiles.test.js.map +1 -0
- package/dist/__tests__/prompts.test.d.ts +6 -0
- package/dist/__tests__/prompts.test.d.ts.map +1 -0
- package/dist/__tests__/prompts.test.js +146 -0
- package/dist/__tests__/prompts.test.js.map +1 -0
- package/dist/__tests__/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 +129 -0
- package/dist/__tests__/read-target-notice.test.js.map +1 -0
- package/dist/__tests__/relate.test.js +291 -35
- package/dist/__tests__/relate.test.js.map +1 -1
- 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 +77 -1
- 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 +106 -0
- package/dist/__tests__/route-latency-budget.test.js.map +1 -0
- package/dist/__tests__/runner.test.js +75 -56
- 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-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 +213 -0
- package/dist/__tests__/session-close-loop.test.js.map +1 -0
- package/dist/__tests__/session-label.test.d.ts +2 -0
- package/dist/__tests__/session-label.test.d.ts.map +1 -0
- package/dist/__tests__/session-label.test.js +46 -0
- package/dist/__tests__/session-label.test.js.map +1 -0
- package/dist/__tests__/session-list-show.test.d.ts +2 -0
- package/dist/__tests__/session-list-show.test.d.ts.map +1 -0
- package/dist/__tests__/session-list-show.test.js +174 -0
- package/dist/__tests__/session-list-show.test.js.map +1 -0
- package/dist/__tests__/session-reset.test.d.ts +2 -0
- package/dist/__tests__/session-reset.test.d.ts.map +1 -0
- package/dist/__tests__/session-reset.test.js +138 -0
- package/dist/__tests__/session-reset.test.js.map +1 -0
- package/dist/__tests__/session-resume-backstop.test.d.ts +2 -0
- package/dist/__tests__/session-resume-backstop.test.d.ts.map +1 -0
- package/dist/__tests__/session-resume-backstop.test.js +139 -0
- package/dist/__tests__/session-resume-backstop.test.js.map +1 -0
- 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 +120 -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.d.ts +2 -0
- package/dist/__tests__/session-state-machine.test.d.ts.map +1 -0
- package/dist/__tests__/session-state-machine.test.js +379 -0
- package/dist/__tests__/session-state-machine.test.js.map +1 -0
- package/dist/__tests__/session-switch.test.d.ts +2 -0
- package/dist/__tests__/session-switch.test.d.ts.map +1 -0
- package/dist/__tests__/session-switch.test.js +344 -0
- package/dist/__tests__/session-switch.test.js.map +1 -0
- package/dist/__tests__/session-touch.test.js +16 -11
- package/dist/__tests__/session-touch.test.js.map +1 -1
- package/dist/__tests__/session.test.js +4 -10
- package/dist/__tests__/session.test.js.map +1 -1
- package/dist/__tests__/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 +21 -0
- package/dist/__tests__/skill-vocabulary.test.d.ts.map +1 -0
- package/dist/__tests__/skill-vocabulary.test.js +192 -0
- package/dist/__tests__/skill-vocabulary.test.js.map +1 -0
- package/dist/__tests__/spinner-labels.test.d.ts +2 -0
- package/dist/__tests__/spinner-labels.test.d.ts.map +1 -0
- package/dist/__tests__/spinner-labels.test.js +23 -0
- package/dist/__tests__/spinner-labels.test.js.map +1 -0
- package/dist/__tests__/state.test.d.ts +6 -0
- package/dist/__tests__/state.test.d.ts.map +1 -0
- package/dist/__tests__/state.test.js +117 -0
- package/dist/__tests__/state.test.js.map +1 -0
- 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 +59 -5
- package/dist/__tests__/strip.test.js.map +1 -1
- package/dist/__tests__/surface-profiles.test.d.ts +2 -0
- package/dist/__tests__/surface-profiles.test.d.ts.map +1 -0
- package/dist/__tests__/surface-profiles.test.js +233 -0
- package/dist/__tests__/surface-profiles.test.js.map +1 -0
- package/dist/__tests__/surfaces.test.d.ts +2 -0
- package/dist/__tests__/surfaces.test.d.ts.map +1 -0
- package/dist/__tests__/surfaces.test.js +46 -0
- package/dist/__tests__/surfaces.test.js.map +1 -0
- package/dist/__tests__/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.d.ts +2 -0
- package/dist/__tests__/update-check.test.d.ts.map +1 -0
- package/dist/__tests__/update-check.test.js +215 -0
- package/dist/__tests__/update-check.test.js.map +1 -0
- package/dist/__tests__/update.test.js +578 -48
- package/dist/__tests__/update.test.js.map +1 -1
- package/dist/__tests__/upgrade-runner.test.d.ts +2 -0
- package/dist/__tests__/upgrade-runner.test.d.ts.map +1 -0
- package/dist/__tests__/upgrade-runner.test.js +54 -0
- package/dist/__tests__/upgrade-runner.test.js.map +1 -0
- package/dist/__tests__/upgrade.test.d.ts +2 -0
- package/dist/__tests__/upgrade.test.d.ts.map +1 -0
- package/dist/__tests__/upgrade.test.js +56 -0
- package/dist/__tests__/upgrade.test.js.map +1 -0
- package/dist/__tests__/verify-formatter.test.d.ts +2 -0
- package/dist/__tests__/verify-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/verify-formatter.test.js +85 -0
- package/dist/__tests__/verify-formatter.test.js.map +1 -0
- package/dist/__tests__/vocabulary-leak.test.d.ts +33 -0
- package/dist/__tests__/vocabulary-leak.test.d.ts.map +1 -0
- package/dist/__tests__/vocabulary-leak.test.js +430 -0
- package/dist/__tests__/vocabulary-leak.test.js.map +1 -0
- package/dist/__tests__/workspace.test.d.ts +2 -0
- package/dist/__tests__/workspace.test.d.ts.map +1 -0
- package/dist/__tests__/workspace.test.js +328 -0
- package/dist/__tests__/workspace.test.js.map +1 -0
- package/dist/__tests__/workspaceNotice.test.d.ts +2 -0
- package/dist/__tests__/workspaceNotice.test.d.ts.map +1 -0
- package/dist/__tests__/workspaceNotice.test.js +571 -0
- package/dist/__tests__/workspaceNotice.test.js.map +1 -0
- package/dist/commands/__tests__/connect-handoff.test.d.ts +11 -0
- package/dist/commands/__tests__/connect-handoff.test.d.ts.map +1 -0
- package/dist/commands/__tests__/connect-handoff.test.js +111 -0
- package/dist/commands/__tests__/connect-handoff.test.js.map +1 -0
- package/dist/commands/__tests__/quality.test.d.ts +2 -0
- package/dist/commands/__tests__/quality.test.d.ts.map +1 -0
- package/dist/commands/__tests__/quality.test.js +156 -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 +79 -0
- package/dist/commands/admin/cockpit.d.ts.map +1 -0
- package/dist/commands/admin/cockpit.js +618 -0
- package/dist/commands/admin/cockpit.js.map +1 -0
- package/dist/commands/admin/index.d.ts +70 -0
- package/dist/commands/admin/index.d.ts.map +1 -0
- package/dist/commands/admin/index.js +375 -0
- package/dist/commands/admin/index.js.map +1 -0
- 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 +30 -0
- package/dist/commands/admin/inspect.d.ts.map +1 -0
- package/dist/commands/admin/inspect.js +555 -0
- package/dist/commands/admin/inspect.js.map +1 -0
- package/dist/commands/admin/inspect.test.d.ts +7 -0
- package/dist/commands/admin/inspect.test.d.ts.map +1 -0
- package/dist/commands/admin/inspect.test.js +90 -0
- package/dist/commands/admin/inspect.test.js.map +1 -0
- package/dist/commands/admin/manage.d.ts +8 -0
- package/dist/commands/admin/manage.d.ts.map +1 -0
- package/dist/commands/admin/manage.js +76 -0
- package/dist/commands/admin/manage.js.map +1 -0
- package/dist/commands/admin/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 +61 -0
- package/dist/commands/admin/seed.d.ts.map +1 -0
- package/dist/commands/admin/seed.js +728 -0
- package/dist/commands/admin/seed.js.map +1 -0
- package/dist/commands/admin/seed.test.d.ts +10 -0
- package/dist/commands/admin/seed.test.d.ts.map +1 -0
- package/dist/commands/admin/seed.test.js +86 -0
- package/dist/commands/admin/seed.test.js.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.generated.d.ts +14 -0
- package/dist/commands/admin/seedRegistryEntries.generated.d.ts.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.generated.js +81 -0
- package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.test.d.ts +13 -0
- package/dist/commands/admin/seedRegistryEntries.test.d.ts.map +1 -0
- package/dist/commands/admin/seedRegistryEntries.test.js +96 -0
- package/dist/commands/admin/seedRegistryEntries.test.js.map +1 -0
- 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/brand-pack.d.ts +2 -0
- package/dist/commands/brand-pack.d.ts.map +1 -0
- package/dist/commands/brand-pack.js +25 -0
- package/dist/commands/brand-pack.js.map +1 -0
- package/dist/commands/brief.d.ts +28 -0
- package/dist/commands/brief.d.ts.map +1 -0
- package/dist/commands/brief.js +97 -0
- package/dist/commands/brief.js.map +1 -0
- package/dist/commands/capture.d.ts +18 -3
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +292 -53
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chain-walk.d.ts +14 -0
- package/dist/commands/chain-walk.d.ts.map +1 -0
- package/dist/commands/chain-walk.js +38 -0
- package/dist/commands/chain-walk.js.map +1 -0
- package/dist/commands/changes.d.ts +11 -0
- package/dist/commands/changes.d.ts.map +1 -0
- package/dist/commands/changes.js +46 -0
- package/dist/commands/changes.js.map +1 -0
- package/dist/commands/codex-prep.d.ts +23 -0
- package/dist/commands/codex-prep.d.ts.map +1 -0
- package/dist/commands/codex-prep.js +56 -0
- package/dist/commands/codex-prep.js.map +1 -0
- package/dist/commands/collections.d.ts +22 -0
- package/dist/commands/collections.d.ts.map +1 -0
- package/dist/commands/collections.js +77 -0
- package/dist/commands/collections.js.map +1 -0
- package/dist/commands/conflicts.d.ts +40 -0
- package/dist/commands/conflicts.d.ts.map +1 -0
- package/dist/commands/conflicts.js +267 -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 +219 -0
- package/dist/commands/conflicts.test.js.map +1 -0
- package/dist/commands/connect-config.test.d.ts +2 -0
- package/dist/commands/connect-config.test.d.ts.map +1 -0
- package/dist/commands/connect-config.test.js +44 -0
- package/dist/commands/connect-config.test.js.map +1 -0
- package/dist/commands/connect-context.d.ts +55 -0
- package/dist/commands/connect-context.d.ts.map +1 -0
- package/dist/commands/connect-context.js +78 -0
- package/dist/commands/connect-context.js.map +1 -0
- package/dist/commands/connect-context.test.d.ts +2 -0
- package/dist/commands/connect-context.test.d.ts.map +1 -0
- package/dist/commands/connect-context.test.js +148 -0
- package/dist/commands/connect-context.test.js.map +1 -0
- package/dist/commands/connect-handoff.d.ts +51 -0
- package/dist/commands/connect-handoff.d.ts.map +1 -0
- package/dist/commands/connect-handoff.js +70 -0
- package/dist/commands/connect-handoff.js.map +1 -0
- package/dist/commands/connect-integration.test.d.ts +7 -0
- package/dist/commands/connect-integration.test.d.ts.map +1 -0
- package/dist/commands/connect-integration.test.js +223 -0
- package/dist/commands/connect-integration.test.js.map +1 -0
- 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-screens.d.ts +34 -0
- package/dist/commands/connect-screens.d.ts.map +1 -0
- package/dist/commands/connect-screens.js +143 -0
- package/dist/commands/connect-screens.js.map +1 -0
- package/dist/commands/connect.d.ts +42 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +416 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/connect.test.d.ts +6 -0
- package/dist/commands/connect.test.d.ts.map +1 -0
- package/dist/commands/connect.test.js +571 -0
- package/dist/commands/connect.test.js.map +1 -0
- package/dist/commands/constellation.d.ts.map +1 -1
- package/dist/commands/constellation.js +8 -3
- package/dist/commands/constellation.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +8 -3
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/cross-cut.d.ts +11 -0
- package/dist/commands/cross-cut.d.ts.map +1 -0
- package/dist/commands/cross-cut.js +23 -0
- package/dist/commands/cross-cut.js.map +1 -0
- package/dist/commands/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 +18 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +367 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/doctor.test.d.ts +8 -0
- package/dist/commands/doctor.test.d.ts.map +1 -0
- package/dist/commands/doctor.test.js +657 -0
- package/dist/commands/doctor.test.js.map +1 -0
- package/dist/commands/entryAccept.d.ts +24 -0
- package/dist/commands/entryAccept.d.ts.map +1 -0
- package/dist/commands/entryAccept.js +296 -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 +174 -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 +8 -4
- package/dist/commands/fields.js.map +1 -1
- package/dist/commands/files.d.ts +26 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +160 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/files.test.d.ts +2 -0
- package/dist/commands/files.test.d.ts.map +1 -0
- package/dist/commands/files.test.js +278 -0
- package/dist/commands/files.test.js.map +1 -0
- package/dist/commands/get.d.ts.map +1 -1
- package/dist/commands/get.js +14 -6
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/handshake.d.ts +63 -3
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +1081 -109
- 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/ingest.d.ts +7 -2
- package/dist/commands/ingest.d.ts.map +1 -1
- package/dist/commands/ingest.js +146 -31
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +118 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +101 -38
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/method.d.ts +97 -0
- package/dist/commands/method.d.ts.map +1 -0
- package/dist/commands/method.js +773 -0
- package/dist/commands/method.js.map +1 -0
- package/dist/commands/organisation.d.ts +16 -0
- package/dist/commands/organisation.d.ts.map +1 -0
- package/dist/commands/organisation.js +184 -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 +198 -0
- package/dist/commands/organisation.test.js.map +1 -0
- package/dist/commands/organisationHierarchy.d.ts +8 -0
- package/dist/commands/organisationHierarchy.d.ts.map +1 -0
- package/dist/commands/organisationHierarchy.js +75 -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 +72 -0
- package/dist/commands/organisationHierarchy.test.js.map +1 -0
- package/dist/commands/organisationWrite.d.ts +18 -0
- package/dist/commands/organisationWrite.d.ts.map +1 -0
- package/dist/commands/organisationWrite.js +71 -0
- package/dist/commands/organisationWrite.js.map +1 -0
- package/dist/commands/orient.d.ts +150 -27
- package/dist/commands/orient.d.ts.map +1 -1
- package/dist/commands/orient.js +233 -14
- package/dist/commands/orient.js.map +1 -1
- package/dist/commands/outcome.d.ts +91 -0
- package/dist/commands/outcome.d.ts.map +1 -0
- package/dist/commands/outcome.js +204 -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 +308 -0
- package/dist/commands/outcome.test.js.map +1 -0
- package/dist/commands/profile.d.ts +56 -0
- package/dist/commands/profile.d.ts.map +1 -0
- package/dist/commands/profile.js +335 -0
- package/dist/commands/profile.js.map +1 -0
- 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 +16 -0
- package/dist/commands/quality.d.ts.map +1 -0
- package/dist/commands/quality.js +29 -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 +2 -0
- package/dist/commands/relate.d.ts.map +1 -1
- package/dist/commands/relate.js +128 -15
- 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 +49 -0
- package/dist/commands/role.d.ts.map +1 -0
- package/dist/commands/role.js +126 -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 +195 -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.map +1 -1
- package/dist/commands/search.js +2 -2
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts +60 -7
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +478 -61
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/shape.d.ts +16 -0
- package/dist/commands/shape.d.ts.map +1 -0
- package/dist/commands/shape.js +149 -0
- package/dist/commands/shape.js.map +1 -0
- package/dist/commands/shape.test.d.ts +2 -0
- package/dist/commands/shape.test.d.ts.map +1 -0
- package/dist/commands/shape.test.js +148 -0
- package/dist/commands/shape.test.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +102 -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 +22 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +238 -34
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upgrade.d.ts +5 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +110 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/usage.d.ts +40 -0
- package/dist/commands/usage.d.ts.map +1 -0
- package/dist/commands/usage.js +214 -0
- package/dist/commands/usage.js.map +1 -0
- package/dist/commands/verify.d.ts +13 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +55 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/welcome.d.ts +21 -0
- package/dist/commands/welcome.d.ts.map +1 -0
- package/dist/commands/welcome.js +53 -0
- package/dist/commands/welcome.js.map +1 -0
- package/dist/commands/whoami.d.ts +20 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +126 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/commands/whoami.test.d.ts +2 -0
- package/dist/commands/whoami.test.d.ts.map +1 -0
- package/dist/commands/whoami.test.js +130 -0
- package/dist/commands/whoami.test.js.map +1 -0
- package/dist/commands/workspace.d.ts +57 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +242 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/formatters/__tests__/orient-provenance.test.d.ts +6 -0
- package/dist/formatters/__tests__/orient-provenance.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/orient-provenance.test.js +322 -0
- package/dist/formatters/__tests__/orient-provenance.test.js.map +1 -0
- 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 +76 -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 +193 -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 +103 -0
- package/dist/formatters/brief.d.ts.map +1 -0
- package/dist/formatters/brief.js +181 -0
- package/dist/formatters/brief.js.map +1 -0
- package/dist/formatters/brief.test.d.ts +2 -0
- package/dist/formatters/brief.test.d.ts.map +1 -0
- package/dist/formatters/brief.test.js +21 -0
- package/dist/formatters/brief.test.js.map +1 -0
- package/dist/formatters/capture.d.ts +24 -3
- package/dist/formatters/capture.d.ts.map +1 -1
- package/dist/formatters/capture.js +37 -3
- package/dist/formatters/capture.js.map +1 -1
- package/dist/formatters/chain-walk.d.ts +33 -0
- package/dist/formatters/chain-walk.d.ts.map +1 -0
- package/dist/formatters/chain-walk.js +54 -0
- package/dist/formatters/chain-walk.js.map +1 -0
- package/dist/formatters/changes.d.ts +25 -0
- package/dist/formatters/changes.d.ts.map +1 -0
- package/dist/formatters/changes.js +60 -0
- package/dist/formatters/changes.js.map +1 -0
- package/dist/formatters/coaching.d.ts +53 -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 +40 -0
- package/dist/formatters/collections.d.ts.map +1 -0
- package/dist/formatters/collections.js +103 -0
- package/dist/formatters/collections.js.map +1 -0
- 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/cross-cut.d.ts +21 -0
- package/dist/formatters/cross-cut.d.ts.map +1 -0
- package/dist/formatters/cross-cut.js +32 -0
- package/dist/formatters/cross-cut.js.map +1 -0
- package/dist/formatters/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 +72 -4
- package/dist/formatters/entry.d.ts.map +1 -1
- package/dist/formatters/entry.js +115 -13
- package/dist/formatters/entry.js.map +1 -1
- package/dist/formatters/entryAccept.d.ts +77 -0
- package/dist/formatters/entryAccept.d.ts.map +1 -0
- package/dist/formatters/entryAccept.js +76 -0
- package/dist/formatters/entryAccept.js.map +1 -0
- package/dist/formatters/feedback.d.ts +56 -0
- package/dist/formatters/feedback.d.ts.map +1 -0
- package/dist/formatters/feedback.js +89 -0
- package/dist/formatters/feedback.js.map +1 -0
- package/dist/formatters/feedback.test.d.ts +2 -0
- package/dist/formatters/feedback.test.d.ts.map +1 -0
- package/dist/formatters/feedback.test.js +112 -0
- package/dist/formatters/feedback.test.js.map +1 -0
- package/dist/formatters/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 +63 -0
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +169 -3
- package/dist/formatters/handshake.js.map +1 -1
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts +2 -0
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts.map +1 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js +22 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js.map +1 -0
- package/dist/formatters/orient.d.ts +207 -33
- package/dist/formatters/orient.d.ts.map +1 -1
- package/dist/formatters/orient.js +293 -75
- 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 +80 -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 +76 -0
- package/dist/formatters/orient.rituals.test.js.map +1 -0
- package/dist/formatters/orient.shapeAdvisorySummary.test.d.ts +2 -0
- package/dist/formatters/orient.shapeAdvisorySummary.test.d.ts.map +1 -0
- package/dist/formatters/orient.shapeAdvisorySummary.test.js +60 -0
- package/dist/formatters/orient.shapeAdvisorySummary.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 +81 -0
- package/dist/formatters/orientDirection.d.ts.map +1 -0
- package/dist/formatters/orientDirection.js +23 -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 +73 -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/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 +14 -0
- package/dist/formatters/relate.d.ts.map +1 -1
- package/dist/formatters/relate.js +17 -1
- 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 +0 -4
- package/dist/formatters/search.d.ts.map +1 -1
- package/dist/formatters/search.js +14 -1
- 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 +57 -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 +133 -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 +312 -19
- package/dist/formatters/session.js.map +1 -1
- package/dist/formatters/shape.d.ts +54 -0
- package/dist/formatters/shape.d.ts.map +1 -0
- package/dist/formatters/shape.js +97 -0
- package/dist/formatters/shape.js.map +1 -0
- package/dist/formatters/shape.test.d.ts +2 -0
- package/dist/formatters/shape.test.d.ts.map +1 -0
- package/dist/formatters/shape.test.js +80 -0
- package/dist/formatters/shape.test.js.map +1 -0
- 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 +37 -6
- 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 +19 -0
- package/dist/formatters/verify.d.ts.map +1 -0
- package/dist/formatters/verify.js +29 -0
- package/dist/formatters/verify.js.map +1 -0
- 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 +21 -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 +56 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.js +279 -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 +69 -2
- package/dist/generators/adapters.d.ts.map +1 -1
- package/dist/generators/adapters.js +239 -20
- package/dist/generators/adapters.js.map +1 -1
- package/dist/generators/adapters.test.d.ts +2 -0
- package/dist/generators/adapters.test.d.ts.map +1 -0
- package/dist/generators/adapters.test.js +25 -0
- package/dist/generators/adapters.test.js.map +1 -0
- package/dist/generators/boundary-manifest.d.ts +29 -0
- package/dist/generators/boundary-manifest.d.ts.map +1 -0
- package/dist/generators/boundary-manifest.js +183 -0
- package/dist/generators/boundary-manifest.js.map +1 -0
- package/dist/generators/boundary-manifest.real-file.test.d.ts +2 -0
- package/dist/generators/boundary-manifest.real-file.test.d.ts.map +1 -0
- package/dist/generators/boundary-manifest.real-file.test.js +70 -0
- package/dist/generators/boundary-manifest.real-file.test.js.map +1 -0
- package/dist/generators/boundary-manifest.test.d.ts +2 -0
- package/dist/generators/boundary-manifest.test.d.ts.map +1 -0
- package/dist/generators/boundary-manifest.test.js +91 -0
- package/dist/generators/boundary-manifest.test.js.map +1 -0
- package/dist/generators/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 +97 -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 -41
- 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/manifest.d.ts +115 -0
- package/dist/generators/manifest.d.ts.map +1 -0
- package/dist/generators/manifest.js +277 -0
- package/dist/generators/manifest.js.map +1 -0
- package/dist/generators/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 +80 -10
- package/dist/generators/portable-knowledge.d.ts.map +1 -1
- package/dist/generators/portable-knowledge.js +288 -52
- package/dist/generators/portable-knowledge.js.map +1 -1
- package/dist/generators/portable-knowledge.test.js +377 -34
- package/dist/generators/portable-knowledge.test.js.map +1 -1
- package/dist/generators/region-projections.d.ts +17 -0
- package/dist/generators/region-projections.d.ts.map +1 -0
- package/dist/generators/region-projections.js +51 -0
- package/dist/generators/region-projections.js.map +1 -0
- package/dist/generators/region-projections.test.d.ts +2 -0
- package/dist/generators/region-projections.test.d.ts.map +1 -0
- package/dist/generators/region-projections.test.js +58 -0
- package/dist/generators/region-projections.test.js.map +1 -0
- package/dist/generators/region.d.ts +24 -0
- package/dist/generators/region.d.ts.map +1 -0
- package/dist/generators/region.js +87 -0
- package/dist/generators/region.js.map +1 -0
- package/dist/generators/region.test.d.ts +2 -0
- package/dist/generators/region.test.d.ts.map +1 -0
- package/dist/generators/region.test.js +126 -0
- package/dist/generators/region.test.js.map +1 -0
- package/dist/generators/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/generators/surface-profiles.d.ts +48 -0
- package/dist/generators/surface-profiles.d.ts.map +1 -0
- package/dist/generators/surface-profiles.js +98 -0
- package/dist/generators/surface-profiles.js.map +1 -0
- package/dist/handleCliError.d.ts +2 -0
- package/dist/handleCliError.d.ts.map +1 -0
- package/dist/handleCliError.js +56 -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 +552 -164
- 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 +98 -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 +160 -0
- package/dist/lib/canonicalRefs.d.ts.map +1 -0
- package/dist/lib/canonicalRefs.js +169 -0
- package/dist/lib/canonicalRefs.js.map +1 -0
- package/dist/lib/captureGrounding.d.ts +48 -0
- package/dist/lib/captureGrounding.d.ts.map +1 -0
- package/dist/lib/captureGrounding.js +56 -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 +71 -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/captureVersion.d.ts +38 -0
- package/dist/lib/captureVersion.d.ts.map +1 -0
- package/dist/lib/captureVersion.js +81 -0
- package/dist/lib/captureVersion.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 +78 -9
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +370 -53
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/collectionRegistry.d.ts +73 -0
- package/dist/lib/collectionRegistry.d.ts.map +1 -0
- package/dist/lib/collectionRegistry.js +143 -0
- package/dist/lib/collectionRegistry.js.map +1 -0
- 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 +48 -0
- package/dist/lib/compose-wrapup-view.d.ts.map +1 -0
- package/dist/lib/compose-wrapup-view.js +37 -0
- package/dist/lib/compose-wrapup-view.js.map +1 -0
- package/dist/lib/config.d.ts +132 -4
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +418 -42
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/configResult.d.ts +103 -0
- package/dist/lib/configResult.d.ts.map +1 -0
- package/dist/lib/configResult.js +180 -0
- package/dist/lib/configResult.js.map +1 -0
- package/dist/lib/connectKeyLabel.d.ts +9 -0
- package/dist/lib/connectKeyLabel.d.ts.map +1 -0
- package/dist/lib/connectKeyLabel.js +12 -0
- package/dist/lib/connectKeyLabel.js.map +1 -0
- package/dist/lib/constants.d.ts +46 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +83 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/conversation-engine.d.ts +45 -0
- package/dist/lib/conversation-engine.d.ts.map +1 -0
- package/dist/lib/conversation-engine.js +112 -0
- package/dist/lib/conversation-engine.js.map +1 -0
- package/dist/lib/conversation-phases.d.ts +59 -0
- package/dist/lib/conversation-phases.d.ts.map +1 -0
- package/dist/lib/conversation-phases.js +11 -0
- package/dist/lib/conversation-phases.js.map +1 -0
- package/dist/lib/conversation-signals.d.ts +30 -0
- package/dist/lib/conversation-signals.d.ts.map +1 -0
- package/dist/lib/conversation-signals.js +64 -0
- package/dist/lib/conversation-signals.js.map +1 -0
- package/dist/lib/conversation.d.ts +36 -0
- package/dist/lib/conversation.d.ts.map +1 -0
- package/dist/lib/conversation.js +66 -0
- package/dist/lib/conversation.js.map +1 -0
- package/dist/lib/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.d.ts +23 -0
- package/dist/lib/deployment.d.ts.map +1 -0
- package/dist/lib/deployment.js +78 -0
- package/dist/lib/deployment.js.map +1 -0
- package/dist/lib/deployment.test.d.ts +5 -0
- package/dist/lib/deployment.test.d.ts.map +1 -0
- package/dist/lib/deployment.test.js +73 -0
- package/dist/lib/deployment.test.js.map +1 -0
- 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 +148 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +148 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/experiment.d.ts +18 -0
- package/dist/lib/experiment.d.ts.map +1 -0
- package/dist/lib/experiment.js +28 -0
- package/dist/lib/experiment.js.map +1 -0
- package/dist/lib/format.d.ts +10 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +27 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +55 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +92 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/frontmatter.test.d.ts +15 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +98 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/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 +19 -0
- package/dist/lib/glossary.d.ts.map +1 -0
- package/dist/lib/glossary.js +53 -0
- package/dist/lib/glossary.js.map +1 -0
- package/dist/lib/hook-intents.d.ts +51 -0
- package/dist/lib/hook-intents.d.ts.map +1 -0
- package/dist/lib/hook-intents.js +84 -0
- package/dist/lib/hook-intents.js.map +1 -0
- 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 +26 -0
- package/dist/lib/legalRelationTypes.d.ts.map +1 -0
- package/dist/lib/legalRelationTypes.js +91 -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 +37 -0
- package/dist/lib/method-registry.d.ts.map +1 -0
- package/dist/lib/method-registry.js +41 -0
- package/dist/lib/method-registry.js.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.d.ts +28 -0
- package/dist/lib/normalizeMaterializedFilename.d.ts.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.js +56 -0
- package/dist/lib/normalizeMaterializedFilename.js.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.test.d.ts +16 -0
- package/dist/lib/normalizeMaterializedFilename.test.d.ts.map +1 -0
- package/dist/lib/normalizeMaterializedFilename.test.js +90 -0
- package/dist/lib/normalizeMaterializedFilename.test.js.map +1 -0
- package/dist/lib/notice-marker.d.ts +3 -0
- package/dist/lib/notice-marker.d.ts.map +1 -0
- package/dist/lib/notice-marker.js +223 -0
- package/dist/lib/notice-marker.js.map +1 -0
- package/dist/lib/onboarding-path-b.d.ts +10 -0
- package/dist/lib/onboarding-path-b.d.ts.map +1 -0
- package/dist/lib/onboarding-path-b.js +238 -0
- package/dist/lib/onboarding-path-b.js.map +1 -0
- package/dist/lib/onboarding-shared.d.ts +103 -0
- package/dist/lib/onboarding-shared.d.ts.map +1 -0
- package/dist/lib/onboarding-shared.js +208 -0
- package/dist/lib/onboarding-shared.js.map +1 -0
- package/dist/lib/onboarding-shared.test.d.ts +2 -0
- package/dist/lib/onboarding-shared.test.d.ts.map +1 -0
- package/dist/lib/onboarding-shared.test.js +131 -0
- package/dist/lib/onboarding-shared.test.js.map +1 -0
- package/dist/lib/onboarding-topics.d.ts +27 -0
- package/dist/lib/onboarding-topics.d.ts.map +1 -0
- package/dist/lib/onboarding-topics.js +57 -0
- package/dist/lib/onboarding-topics.js.map +1 -0
- package/dist/lib/onboarding.d.ts +21 -0
- package/dist/lib/onboarding.d.ts.map +1 -0
- package/dist/lib/onboarding.js +387 -0
- package/dist/lib/onboarding.js.map +1 -0
- package/dist/lib/ownerLine.d.ts +65 -0
- package/dist/lib/ownerLine.d.ts.map +1 -0
- package/dist/lib/ownerLine.js +55 -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/previewBanner.d.ts +9 -0
- package/dist/lib/previewBanner.d.ts.map +1 -0
- package/dist/lib/previewBanner.js +37 -0
- package/dist/lib/previewBanner.js.map +1 -0
- package/dist/lib/productbrain-files.d.ts +94 -0
- package/dist/lib/productbrain-files.d.ts.map +1 -0
- package/dist/lib/productbrain-files.js +214 -0
- package/dist/lib/productbrain-files.js.map +1 -0
- package/dist/lib/productbrain-files.test.d.ts +2 -0
- package/dist/lib/productbrain-files.test.d.ts.map +1 -0
- package/dist/lib/productbrain-files.test.js +293 -0
- package/dist/lib/productbrain-files.test.js.map +1 -0
- package/dist/lib/profiles.d.ts +87 -0
- package/dist/lib/profiles.d.ts.map +1 -0
- package/dist/lib/profiles.js +239 -0
- package/dist/lib/profiles.js.map +1 -0
- package/dist/lib/projectConfig.d.ts +81 -0
- package/dist/lib/projectConfig.d.ts.map +1 -0
- package/dist/lib/projectConfig.js +157 -0
- package/dist/lib/projectConfig.js.map +1 -0
- package/dist/lib/prompts.d.ts +65 -0
- package/dist/lib/prompts.d.ts.map +1 -0
- package/dist/lib/prompts.js +132 -0
- package/dist/lib/prompts.js.map +1 -0
- package/dist/lib/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 +25 -0
- package/dist/lib/repo-detect.d.ts.map +1 -1
- package/dist/lib/repo-detect.js +30 -0
- 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 +144 -0
- package/dist/lib/ruleListRender.d.ts.map +1 -0
- package/dist/lib/ruleListRender.js +194 -0
- package/dist/lib/ruleListRender.js.map +1 -0
- package/dist/lib/runner.d.ts +11 -1
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +51 -11
- package/dist/lib/runner.js.map +1 -1
- package/dist/lib/session.d.ts +113 -4
- package/dist/lib/session.d.ts.map +1 -1
- package/dist/lib/session.js +323 -13
- 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.d.ts +27 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +76 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/spinner.test.d.ts +2 -0
- package/dist/lib/spinner.test.d.ts.map +1 -0
- package/dist/lib/spinner.test.js +39 -0
- package/dist/lib/spinner.test.js.map +1 -0
- package/dist/lib/startup-resolution-signals.d.ts +34 -0
- package/dist/lib/startup-resolution-signals.d.ts.map +1 -0
- package/dist/lib/startup-resolution-signals.js +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 +60 -0
- package/dist/lib/state.d.ts.map +1 -0
- package/dist/lib/state.js +97 -0
- package/dist/lib/state.js.map +1 -0
- 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 +18 -0
- package/dist/lib/strip.d.ts.map +1 -1
- package/dist/lib/strip.js +62 -0
- package/dist/lib/strip.js.map +1 -1
- package/dist/lib/style.d.ts +102 -0
- package/dist/lib/style.d.ts.map +1 -0
- package/dist/lib/style.js +176 -0
- package/dist/lib/style.js.map +1 -0
- package/dist/lib/style.test.d.ts +7 -0
- package/dist/lib/style.test.d.ts.map +1 -0
- package/dist/lib/style.test.js +263 -0
- package/dist/lib/style.test.js.map +1 -0
- package/dist/lib/telemetry.d.ts +15 -0
- package/dist/lib/telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry.js +47 -0
- package/dist/lib/telemetry.js.map +1 -0
- package/dist/lib/tokenConstants.d.ts +19 -0
- package/dist/lib/tokenConstants.d.ts.map +1 -0
- package/dist/lib/tokenConstants.js +19 -0
- package/dist/lib/tokenConstants.js.map +1 -0
- package/dist/lib/update-check.d.ts +56 -0
- package/dist/lib/update-check.d.ts.map +1 -0
- package/dist/lib/update-check.js +296 -0
- package/dist/lib/update-check.js.map +1 -0
- package/dist/lib/upgrade-runner.d.ts +22 -0
- package/dist/lib/upgrade-runner.d.ts.map +1 -0
- package/dist/lib/upgrade-runner.js +110 -0
- package/dist/lib/upgrade-runner.js.map +1 -0
- package/dist/lib/versionWrite.d.ts +65 -0
- package/dist/lib/versionWrite.d.ts.map +1 -0
- package/dist/lib/versionWrite.js +32 -0
- package/dist/lib/versionWrite.js.map +1 -0
- package/dist/lib/wizard-surfaces.d.ts +47 -0
- package/dist/lib/wizard-surfaces.d.ts.map +1 -0
- package/dist/lib/wizard-surfaces.js +176 -0
- package/dist/lib/wizard-surfaces.js.map +1 -0
- package/dist/lib/wizard-surfaces.test.d.ts +2 -0
- package/dist/lib/wizard-surfaces.test.d.ts.map +1 -0
- package/dist/lib/wizard-surfaces.test.js +127 -0
- package/dist/lib/wizard-surfaces.test.js.map +1 -0
- package/dist/lib/wizard-trust.d.ts +31 -0
- package/dist/lib/wizard-trust.d.ts.map +1 -0
- package/dist/lib/wizard-trust.js +66 -0
- package/dist/lib/wizard-trust.js.map +1 -0
- package/dist/lib/wizard-trust.test.d.ts +2 -0
- package/dist/lib/wizard-trust.test.d.ts.map +1 -0
- package/dist/lib/wizard-trust.test.js +32 -0
- package/dist/lib/wizard-trust.test.js.map +1 -0
- package/dist/lib/workspace-probe.d.ts +19 -0
- package/dist/lib/workspace-probe.d.ts.map +1 -0
- package/dist/lib/workspace-probe.js +27 -0
- package/dist/lib/workspace-probe.js.map +1 -0
- package/dist/lib/workspaceNotice.d.ts +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/workspaceVocabCache.d.ts +60 -0
- package/dist/lib/workspaceVocabCache.d.ts.map +1 -0
- package/dist/lib/workspaceVocabCache.js +98 -0
- package/dist/lib/workspaceVocabCache.js.map +1 -0
- package/dist/lib/writePerimeter.d.ts +72 -0
- package/dist/lib/writePerimeter.d.ts.map +1 -0
- package/dist/lib/writePerimeter.js +128 -0
- package/dist/lib/writePerimeter.js.map +1 -0
- package/dist/registerEntryCommands.d.ts +18 -0
- package/dist/registerEntryCommands.d.ts.map +1 -0
- package/dist/registerEntryCommands.js +122 -0
- package/dist/registerEntryCommands.js.map +1 -0
- package/dist/registerHistoryCommand.d.ts +8 -0
- package/dist/registerHistoryCommand.d.ts.map +1 -0
- package/dist/registerHistoryCommand.js +14 -0
- package/dist/registerHistoryCommand.js.map +1 -0
- package/dist/registerOutcomeCommands.d.ts +27 -0
- package/dist/registerOutcomeCommands.d.ts.map +1 -0
- package/dist/registerOutcomeCommands.js +27 -0
- package/dist/registerOutcomeCommands.js.map +1 -0
- package/dist/registerRoleCommands.d.ts +10 -0
- package/dist/registerRoleCommands.d.ts.map +1 -0
- package/dist/registerRoleCommands.js +14 -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.d.ts +2 -0
- package/dist/surfaces/__tests__/adapter.test.d.ts.map +1 -0
- package/dist/surfaces/__tests__/adapter.test.js +86 -0
- package/dist/surfaces/__tests__/adapter.test.js.map +1 -0
- 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/__tests__/telemetry.test.d.ts +2 -0
- package/dist/surfaces/__tests__/telemetry.test.d.ts.map +1 -0
- package/dist/surfaces/__tests__/telemetry.test.js +55 -0
- package/dist/surfaces/__tests__/telemetry.test.js.map +1 -0
- package/dist/surfaces/adapter.d.ts +70 -0
- package/dist/surfaces/adapter.d.ts.map +1 -0
- package/dist/surfaces/adapter.js +2 -0
- package/dist/surfaces/adapter.js.map +1 -0
- package/dist/surfaces/adapters/claude.d.ts +3 -0
- package/dist/surfaces/adapters/claude.d.ts.map +1 -0
- package/dist/surfaces/adapters/claude.js +72 -0
- package/dist/surfaces/adapters/claude.js.map +1 -0
- package/dist/surfaces/adapters/codex.d.ts +3 -0
- package/dist/surfaces/adapters/codex.d.ts.map +1 -0
- package/dist/surfaces/adapters/codex.js +61 -0
- package/dist/surfaces/adapters/codex.js.map +1 -0
- package/dist/surfaces/adapters/copilot.d.ts +3 -0
- package/dist/surfaces/adapters/copilot.d.ts.map +1 -0
- package/dist/surfaces/adapters/copilot.js +59 -0
- package/dist/surfaces/adapters/copilot.js.map +1 -0
- package/dist/surfaces/adapters/cursor.d.ts +3 -0
- package/dist/surfaces/adapters/cursor.d.ts.map +1 -0
- package/dist/surfaces/adapters/cursor.js +78 -0
- package/dist/surfaces/adapters/cursor.js.map +1 -0
- package/dist/surfaces/registry.d.ts +76 -0
- package/dist/surfaces/registry.d.ts.map +1 -0
- package/dist/surfaces/registry.js +117 -0
- package/dist/surfaces/registry.js.map +1 -0
- package/dist/surfaces/telemetry.d.ts +17 -0
- package/dist/surfaces/telemetry.d.ts.map +1 -0
- package/dist/surfaces/telemetry.js +31 -0
- package/dist/surfaces/telemetry.js.map +1 -0
- package/package.json +17 -7
- package/templates/general/code-integrity.md +11 -0
- package/templates/general/getting-started.md +12 -0
- package/templates/method-registry.json +16 -0
- package/templates/node-ts/code-integrity.md +13 -0
- package/templates/node-ts/testing.md +12 -0
- package/templates/python/code-integrity.md +13 -0
- package/templates/python/testing.md +12 -0
|
@@ -1,19 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* pb handshake — generate context files for AI developer tools.
|
|
3
|
-
*
|
|
3
|
+
* Context export wiring (read-only filesystem bridge; GLO-63, DEC-161) — not a product surface.
|
|
4
4
|
*/
|
|
5
|
-
import { mkdirSync, writeFileSync, existsSync, readFileSync } from 'fs';
|
|
6
|
-
import { join } from 'path';
|
|
5
|
+
import { mkdirSync, writeFileSync, existsSync, readFileSync, readdirSync, copyFileSync, realpathSync } from 'fs';
|
|
6
|
+
import { join, dirname, resolve, basename, relative, sep } from 'path';
|
|
7
7
|
import { homedir } from 'os';
|
|
8
|
-
import {
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
import { execSync } from 'child_process';
|
|
9
10
|
import { getConfigOrGuide } from '../lib/config.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
11
|
+
import { select as promptSelect, confirm as promptConfirm } from '../lib/prompts.js';
|
|
12
|
+
import { composeHooksFromIntents, getHookStatusForSurface } from '../lib/hook-intents.js';
|
|
13
|
+
import { kernelCall } from '../lib/client.js';
|
|
14
|
+
import { readSession } from '../lib/session.js';
|
|
15
|
+
import { detectRepo, extractWorkspaceProfile } from '../lib/repo-detect.js';
|
|
12
16
|
import { generateContextMd } from '../generators/context-md.js';
|
|
13
17
|
import { generateBriefingMd } from '../generators/briefing-md.js';
|
|
14
|
-
import { MARKER, generateClaudeMd, generateCursorMdc, generateCopilotMd } from '../generators/adapters.js';
|
|
15
|
-
import { readCanonicalSkills, readCanonicalRules, generateCursorSkill, generateCursorRule,
|
|
18
|
+
import { MARKER, generateAgentsMd, generateClaudeMd, generateCursorMdc, generateCopilotMd, generateCopilotInstructionFiles } from '../generators/adapters.js';
|
|
19
|
+
import { readCanonicalSkills, readCanonicalRules, readPersonalLayer, readPersonalSkillsLayer, generateCursorSkill, generateCursorRule, generateCodexSkill, generateCodexSkillIndex, shouldEmitToTarget, filterByLevel, validateCodexSkills, evaluateConditions, } from '../generators/portable-knowledge.js';
|
|
20
|
+
import { findNoProjectionAssets } from '../generators/noProjectionAssets.js'; // WP-660 S2 combine
|
|
21
|
+
import { resolveSurfaceProfile } from '../generators/surface-profiles.js';
|
|
22
|
+
import { generateEveryoneRulesMd } from '../generators/everyone-rules-md.js';
|
|
23
|
+
import { removeStaleBriefingProjections, retireGeneratedProjections } from '../generators/retired-projections.js';
|
|
24
|
+
import { formatWorkspaceBriefingLines } from '../lib/ruleListRender.js';
|
|
16
25
|
import { formatHandshakeReport } from '../formatters/handshake.js';
|
|
26
|
+
import { classifyAdapterFile, detectEol, spliceAppend, spliceReplace } from '../generators/region.js';
|
|
27
|
+
import { REGION_PROJECTIONS } from '../generators/region-projections.js';
|
|
28
|
+
import { readManifest, readManifestStatus, filterByAdoptionState } from '../generators/manifest.js';
|
|
29
|
+
import { generateBoundaryManifest, getBoundaryEnforcementMode } from '../generators/boundary-manifest.js';
|
|
30
|
+
import { loadMethodRegistry } from '../lib/method-registry.js';
|
|
31
|
+
import { CLIError, ErrorCode } from '../lib/errors.js';
|
|
32
|
+
import { isJsonMode } from '../lib/runner.js';
|
|
33
|
+
import { stripConvexInternals } from '../lib/strip.js';
|
|
34
|
+
import { replaceVocabTokens } from '../lib/canonicalRefs.js';
|
|
35
|
+
// WP-436 S3: vocab projector — resolves {{vocab:...}} tokens before writing to disk.
|
|
36
|
+
import { getOrFetchVocabCtx } from '../lib/workspaceVocabCache.js';
|
|
37
|
+
import { normalizeMaterializedFilename } from '../lib/normalizeMaterializedFilename.js';
|
|
38
|
+
import { findLeftoverCursorSkills, LEFTOVER_FILES_MAX } from './handshakeCursorSkillCleanup.js';
|
|
39
|
+
import { classifyDriftBucket } from './handshakeDriftClassification.js';
|
|
40
|
+
import { sanitizeStartupResolutionSignals } from '../lib/startup-resolution-signals.js';
|
|
41
|
+
import { assertSetupWritePath } from '../lib/writePerimeter.js';
|
|
42
|
+
import { SURFACE_GOVERN_NO_SURFACES, SURFACE_REGISTRY, validateSurfacesForMode, } from '../surfaces/registry.js';
|
|
17
43
|
const LEVELS = {
|
|
18
44
|
guide: {
|
|
19
45
|
label: 'Guide me',
|
|
@@ -42,12 +68,8 @@ const LEVELS = {
|
|
|
42
68
|
};
|
|
43
69
|
// Explicit ordering — determines menu numbering in promptLevel(). Do not reorder.
|
|
44
70
|
const LEVEL_KEYS = ['guide', 'work', 'silent', 'full-trust'];
|
|
45
|
-
// Hook failure contract (TEN-712):
|
|
46
|
-
// so Claude Code always starts even if pb is unavailable. Never remove this suffix.
|
|
71
|
+
// Hook failure contract (TEN-712): every hook command MUST end with '|| true' so Claude Code always starts even if pb is unavailable.
|
|
47
72
|
const INIT_PERMISSION = 'Bash(pb:*)';
|
|
48
|
-
const INIT_SESSION_START_CMD = 'pb session start 2>/dev/null || true';
|
|
49
|
-
const INIT_SESSION_CLOSE_CMD = 'pb session close 2>/dev/null || true';
|
|
50
|
-
const INIT_PRECOMPACT_CMD = 'pb session id > /dev/null 2>&1 && echo \'{"systemMessage": "pb session active — capture decisions/tensions before compacting: pb capture \\"DEC: ...\\""}\' || true';
|
|
51
73
|
function readSettings(filePath) {
|
|
52
74
|
if (!existsSync(filePath))
|
|
53
75
|
return {};
|
|
@@ -59,9 +81,6 @@ function readSettings(filePath) {
|
|
|
59
81
|
return {};
|
|
60
82
|
}
|
|
61
83
|
}
|
|
62
|
-
function hasCommand(groups, cmd) {
|
|
63
|
-
return (groups ?? []).some((g) => g.hooks?.some((h) => h.command === cmd));
|
|
64
|
-
}
|
|
65
84
|
// Team write: hooks + Bash(pb:*) → .claude/settings.json (safe to commit)
|
|
66
85
|
function writeTeamSettings(cwd, dryRun) {
|
|
67
86
|
const claudeDir = join(cwd, '.claude');
|
|
@@ -77,26 +96,10 @@ function writeTeamSettings(cwd, dryRun) {
|
|
|
77
96
|
}
|
|
78
97
|
settings.permissions = permissions;
|
|
79
98
|
const hooks = (settings.hooks ?? {});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
];
|
|
85
|
-
added.push('SessionStart → pb session start');
|
|
86
|
-
}
|
|
87
|
-
if (!hasCommand(hooks.Stop, INIT_SESSION_CLOSE_CMD)) {
|
|
88
|
-
hooks.Stop = [
|
|
89
|
-
...(hooks.Stop ?? []),
|
|
90
|
-
{ hooks: [{ type: 'command', command: INIT_SESSION_CLOSE_CMD, statusMessage: 'Closing pb session...' }] },
|
|
91
|
-
];
|
|
92
|
-
added.push('Stop → pb session close');
|
|
93
|
-
}
|
|
94
|
-
if (!hasCommand(hooks.PreCompact, INIT_PRECOMPACT_CMD)) {
|
|
95
|
-
hooks.PreCompact = [
|
|
96
|
-
...(hooks.PreCompact ?? []),
|
|
97
|
-
{ hooks: [{ type: 'command', command: INIT_PRECOMPACT_CMD }] },
|
|
98
|
-
];
|
|
99
|
-
added.push('PreCompact → decision capture reminder');
|
|
99
|
+
const hookAdditions = composeHooksFromIntents(['session-start', 'session-close', 'pre-compact'], hooks);
|
|
100
|
+
for (const addition of hookAdditions) {
|
|
101
|
+
hooks[addition.event] = [...(hooks[addition.event] ?? []), addition.entry];
|
|
102
|
+
added.push(addition.label);
|
|
100
103
|
}
|
|
101
104
|
settings.hooks = hooks;
|
|
102
105
|
if (!dryRun) {
|
|
@@ -133,31 +136,26 @@ function writePersonalSettings(levelKey, dryRun) {
|
|
|
133
136
|
return added;
|
|
134
137
|
}
|
|
135
138
|
async function promptLevel() {
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return new Promise((resolve) => {
|
|
144
|
-
rl.question('> ', (answer) => {
|
|
145
|
-
rl.close();
|
|
146
|
-
const n = parseInt(answer.trim(), 10);
|
|
147
|
-
if (!(n >= 1 && n <= LEVEL_KEYS.length)) {
|
|
148
|
-
console.log(' (Invalid choice — defaulting to "Just work")');
|
|
149
|
-
}
|
|
150
|
-
resolve(n >= 1 && n <= LEVEL_KEYS.length ? LEVEL_KEYS[n - 1] : 'work');
|
|
151
|
-
});
|
|
139
|
+
const result = await promptSelect({
|
|
140
|
+
message: 'How much should Claude explain before acting?',
|
|
141
|
+
options: LEVEL_KEYS.map((key) => ({
|
|
142
|
+
value: key,
|
|
143
|
+
label: LEVELS[key].label,
|
|
144
|
+
hint: LEVELS[key].description,
|
|
145
|
+
})),
|
|
152
146
|
});
|
|
147
|
+
return result;
|
|
153
148
|
}
|
|
154
149
|
export async function runHandshakeInit(options = {}) {
|
|
155
150
|
const cwd = process.cwd();
|
|
156
151
|
const dryRun = options.dryRun ?? false;
|
|
157
152
|
const suffix = dryRun ? ' (dry run)' : '';
|
|
158
153
|
if (options.level && !LEVEL_KEYS.includes(options.level)) {
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
throw new CLIError(`Unknown level "${options.level}".`, {
|
|
155
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
156
|
+
category: 'validation',
|
|
157
|
+
guidance: `Valid levels: ${LEVEL_KEYS.join(', ')}`,
|
|
158
|
+
});
|
|
161
159
|
}
|
|
162
160
|
console.log('Setting up Claude Code integration...\n');
|
|
163
161
|
// Step 1: Team config — always, no prompt
|
|
@@ -171,8 +169,7 @@ export async function runHandshakeInit(options = {}) {
|
|
|
171
169
|
for (const item of teamAdded)
|
|
172
170
|
console.log(` + ${item}`);
|
|
173
171
|
}
|
|
174
|
-
// Step 2: Personal config — wizard or --level flag
|
|
175
|
-
// Cast is safe: LEVEL_KEYS.includes() validated above; invalid level already called process.exit(1).
|
|
172
|
+
// Step 2: Personal config — wizard or --level flag. Cast is safe: LEVEL_KEYS.includes() validated above.
|
|
176
173
|
const levelKey = options.level ? options.level : await promptLevel();
|
|
177
174
|
const level = LEVELS[levelKey];
|
|
178
175
|
const personalAdded = writePersonalSettings(levelKey, dryRun);
|
|
@@ -194,15 +191,306 @@ export async function runHandshakeInit(options = {}) {
|
|
|
194
191
|
if (!dryRun)
|
|
195
192
|
console.log('Reload /hooks in Claude Code (or restart) to activate.');
|
|
196
193
|
console.log('Run `pb handshake --init --level <guide|work|silent|full-trust>` to change level.');
|
|
194
|
+
// Step 2b: Report multi-surface hook opt-in status (WP-310 E3b) — manifest.hooks.{cursor,copilot}, silence = no manifest/flags (DEC-536).
|
|
195
|
+
const pbDirForManifest = join(cwd, '.productbrain');
|
|
196
|
+
const initManifest = readManifest(pbDirForManifest);
|
|
197
|
+
const multiSurfaceOptIns = [];
|
|
198
|
+
if (initManifest?.hooks?.cursor)
|
|
199
|
+
multiSurfaceOptIns.push('cursor');
|
|
200
|
+
if (initManifest?.hooks?.copilot)
|
|
201
|
+
multiSurfaceOptIns.push('copilot');
|
|
202
|
+
if (multiSurfaceOptIns.length > 0) {
|
|
203
|
+
console.log('');
|
|
204
|
+
for (const surface of multiSurfaceOptIns) {
|
|
205
|
+
const status = getHookStatusForSurface(surface);
|
|
206
|
+
if (status.writable) {
|
|
207
|
+
// Future-proofing path: surface has hook events, would write files.
|
|
208
|
+
console.log(`ℹ ${surface} hooks: opted in — hooks will be written`);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
console.log(`ℹ ${surface} hooks: opted in — no auto-hooks (${surface} has no session events; run \`pb session start\` manually)`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// Step 3: Scaffold starter templates if .productbrain/rules/ is empty
|
|
216
|
+
const rulesDir = join(cwd, '.productbrain', 'rules');
|
|
217
|
+
const hasExistingRules = existsSync(rulesDir) && readdirSync(rulesDir).filter((f) => f.endsWith('.md')).length > 0;
|
|
218
|
+
if (!hasExistingRules) {
|
|
219
|
+
// Detect stack from repo to pick template set
|
|
220
|
+
const repo = detectRepo(cwd);
|
|
221
|
+
const stack = repo.detectedStack.map((s) => s.toLowerCase());
|
|
222
|
+
let templateSet;
|
|
223
|
+
if (stack.some((s) => ['typescript', 'sveltekit', 'nextjs', 'react'].includes(s))) {
|
|
224
|
+
templateSet = 'node-ts';
|
|
225
|
+
}
|
|
226
|
+
else if (stack.includes('python')) {
|
|
227
|
+
templateSet = 'python';
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
templateSet = 'general';
|
|
231
|
+
}
|
|
232
|
+
// Resolve templates directory relative to this file
|
|
233
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
234
|
+
const __dirname = dirname(__filename);
|
|
235
|
+
// From dist/commands/handshake.js → ../../templates/
|
|
236
|
+
const templatesRoot = resolve(__dirname, '..', '..', 'templates');
|
|
237
|
+
const templateDir = join(templatesRoot, templateSet);
|
|
238
|
+
if (existsSync(templateDir)) {
|
|
239
|
+
const templateFiles = readdirSync(templateDir).filter((f) => f.endsWith('.md'));
|
|
240
|
+
if (templateFiles.length > 0) {
|
|
241
|
+
console.log('');
|
|
242
|
+
console.log(`Scaffolding starter rules from ${templateSet} template...`);
|
|
243
|
+
if (!dryRun) {
|
|
244
|
+
mkdirSync(rulesDir, { recursive: true });
|
|
245
|
+
for (const file of templateFiles) {
|
|
246
|
+
const src = join(templateDir, file);
|
|
247
|
+
const dest = join(rulesDir, file);
|
|
248
|
+
copyFileSync(src, dest);
|
|
249
|
+
console.log(` + .productbrain/rules/${file}`);
|
|
250
|
+
}
|
|
251
|
+
console.log('');
|
|
252
|
+
console.log('Run `pb handshake` to sync the scaffolded rules to your AI tools.');
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
for (const file of templateFiles) {
|
|
256
|
+
console.log(` + .productbrain/rules/${file} (dry run)`);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const LOCAL_REF_REGEX = /\b(?:WP|TEN|DEC|BET|FEAT|INS|STD|PRI|ARCH)[-\s#]*\d+\b|\bPR\s*#?\s*\d+\b/gi;
|
|
264
|
+
const STARTUP_RESOLUTION_RESOLVER_VERSION = 'startup-resolution-v1';
|
|
265
|
+
// Global cap on collected refs (spec "Contract: StartupResolutionSignals" — arrays are capped).
|
|
266
|
+
const LOCAL_REF_GLOBAL_CAP = 25;
|
|
267
|
+
// Per-source cap so a broad source (context.md) can't starve briefing.md's task-specific refs (Codex@677).
|
|
268
|
+
const LOCAL_REF_PER_SOURCE_CAP = 18;
|
|
269
|
+
// Time-boxed so an unauthed/slow `gh` can't stall session-start (F4).
|
|
270
|
+
const PR_DIFF_TIMEOUT_MS = 4_000;
|
|
271
|
+
// Bounds worst-case `gh` subprocess invocations per handshake.
|
|
272
|
+
const PR_DIFF_MAX_REFS = 5;
|
|
273
|
+
function runGitText(cwd, command) {
|
|
274
|
+
try {
|
|
275
|
+
const value = execSync(command, {
|
|
276
|
+
cwd,
|
|
277
|
+
encoding: 'utf8',
|
|
278
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
279
|
+
}).trim();
|
|
280
|
+
return value.length > 0 ? value : undefined;
|
|
281
|
+
}
|
|
282
|
+
catch {
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/** Dereference a "PR #N" ref to its changed paths via `gh pr diff <N> --name-only` (F4: server
|
|
287
|
+
* resolver has no git/gh access). Guarded/time-boxed; `run` is injectable for tests. */
|
|
288
|
+
export function dereferencePrRefToPaths(cwd, prNumber, run = runGitTextTimeboxed) {
|
|
289
|
+
if (!Number.isInteger(prNumber) || prNumber <= 0)
|
|
290
|
+
return [];
|
|
291
|
+
const raw = run(cwd, `gh pr diff ${prNumber} --name-only`, PR_DIFF_TIMEOUT_MS);
|
|
292
|
+
if (!raw)
|
|
293
|
+
return [];
|
|
294
|
+
return raw.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
295
|
+
}
|
|
296
|
+
/** Time-boxed variant of runGitText for the PR-diff dereference (F4). */
|
|
297
|
+
function runGitTextTimeboxed(cwd, command, timeoutMs) {
|
|
298
|
+
try {
|
|
299
|
+
const value = execSync(command, {
|
|
300
|
+
cwd,
|
|
301
|
+
encoding: 'utf8',
|
|
302
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
303
|
+
timeout: timeoutMs,
|
|
304
|
+
}).trim();
|
|
305
|
+
return value.length > 0 ? value : undefined;
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
return undefined;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function readOptionalLocalText(cwd, path) {
|
|
312
|
+
const fullPath = join(cwd, path);
|
|
313
|
+
if (!existsSync(fullPath))
|
|
314
|
+
return undefined;
|
|
315
|
+
try {
|
|
316
|
+
return readFileSync(fullPath, 'utf8');
|
|
317
|
+
}
|
|
318
|
+
catch {
|
|
319
|
+
return undefined;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function normalizeLocalRef(ref) {
|
|
323
|
+
const trimmed = ref.trim().replace(/\s+/g, ' ');
|
|
324
|
+
const pr = trimmed.match(/^PR\s*#?\s*(\d+)$/i);
|
|
325
|
+
if (pr)
|
|
326
|
+
return `PR #${pr[1]}`;
|
|
327
|
+
const entry = trimmed.match(/^([A-Z]+)[-\s#]*(\d+)$/i);
|
|
328
|
+
if (entry)
|
|
329
|
+
return `${entry[1].toUpperCase()}-${entry[2]}`;
|
|
330
|
+
return trimmed;
|
|
331
|
+
}
|
|
332
|
+
/** Collect normalized local refs across several text sources, deduped. Codex@677: a per-source
|
|
333
|
+
* cap alongside the global one, so a broad source (context.md) can't starve a later,
|
|
334
|
+
* task-specific source (briefing.md); already-collected refs dedupe without spending later quota. */
|
|
335
|
+
function collectLocalRefs(texts) {
|
|
336
|
+
const refs = [];
|
|
337
|
+
const seen = new Set();
|
|
338
|
+
for (const text of texts) {
|
|
339
|
+
if (!text)
|
|
340
|
+
continue;
|
|
341
|
+
let fromThisSource = 0;
|
|
342
|
+
for (const match of text.matchAll(LOCAL_REF_REGEX)) {
|
|
343
|
+
const ref = normalizeLocalRef(match[0]);
|
|
344
|
+
const key = ref.toLowerCase();
|
|
345
|
+
if (seen.has(key))
|
|
346
|
+
continue;
|
|
347
|
+
if (fromThisSource >= LOCAL_REF_PER_SOURCE_CAP)
|
|
348
|
+
break;
|
|
349
|
+
seen.add(key);
|
|
350
|
+
refs.push(ref);
|
|
351
|
+
fromThisSource++;
|
|
352
|
+
if (refs.length >= LOCAL_REF_GLOBAL_CAP)
|
|
353
|
+
return refs;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return refs;
|
|
357
|
+
}
|
|
358
|
+
function deriveHandshakeStartupTask(refs, changedPaths, callerTask) {
|
|
359
|
+
if (callerTask && callerTask.trim())
|
|
360
|
+
return callerTask.trim();
|
|
361
|
+
const parts = [];
|
|
362
|
+
if (refs.length > 0)
|
|
363
|
+
parts.push(refs.join(' '));
|
|
364
|
+
if (changedPaths.length > 0)
|
|
365
|
+
parts.push(`changed paths ${changedPaths.slice(0, 5).join(' ')}`);
|
|
366
|
+
return parts.length > 0 ? parts.join(' ') : undefined;
|
|
367
|
+
}
|
|
368
|
+
const DEFAULT_HANDSHAKE_SIGNAL_DEPS = {
|
|
369
|
+
runGit: runGitText,
|
|
370
|
+
prDiff: (cwd, prNumber) => dereferencePrRefToPaths(cwd, prNumber),
|
|
371
|
+
};
|
|
372
|
+
/** Extract the PR number from a normalized "PR #N" ref, else null. */
|
|
373
|
+
function prNumberFromRef(ref) {
|
|
374
|
+
const m = ref.match(/^PR\s*#?\s*(\d+)$/i);
|
|
375
|
+
if (!m)
|
|
376
|
+
return null;
|
|
377
|
+
const n = Number(m[1]);
|
|
378
|
+
return Number.isInteger(n) && n > 0 ? n : null;
|
|
379
|
+
}
|
|
380
|
+
export function deriveHandshakeStartupSignals(cwd, callerSignals = {}, deps = DEFAULT_HANDSHAKE_SIGNAL_DEPS) {
|
|
381
|
+
const { runGit, prDiff } = deps;
|
|
382
|
+
const branchName = runGit(cwd, 'git branch --show-current');
|
|
383
|
+
const commitSha = runGit(cwd, 'git rev-parse --short HEAD');
|
|
384
|
+
// Changed paths, unioned + deduped: (1) dirty worktree; (2) committed branch delta vs origin/main's
|
|
385
|
+
// merge-base (Codex@665, invisible once the tree is clean); (3) PR-ref dereference (F4), appended later.
|
|
386
|
+
const dirtyChangedPaths = runGit(cwd, 'git diff --name-only HEAD')?.split(/\r?\n/).filter(Boolean) ?? [];
|
|
387
|
+
const mergeBase = runGit(cwd, 'git merge-base HEAD origin/main');
|
|
388
|
+
const branchChangedPaths = mergeBase
|
|
389
|
+
? (runGit(cwd, `git diff --name-only ${mergeBase} HEAD`)?.split(/\r?\n/).filter(Boolean) ?? [])
|
|
390
|
+
: [];
|
|
391
|
+
const worktreeName = basename(cwd);
|
|
392
|
+
const contextText = readOptionalLocalText(cwd, '.productbrain/context.md');
|
|
393
|
+
const briefingText = readOptionalLocalText(cwd, '.productbrain/briefing.md');
|
|
394
|
+
const callerRefs = Array.isArray(callerSignals.reviewedArtifactRefs) ? callerSignals.reviewedArtifactRefs.join('\n') : undefined;
|
|
395
|
+
// Codex@677: briefing.md (task-specific) reads BEFORE context.md (broad) so its refs collect first — with the per-source cap, context.md can't starve briefing.
|
|
396
|
+
const refs = collectLocalRefs([
|
|
397
|
+
callerSignals.taskText ?? undefined,
|
|
398
|
+
callerSignals.explicitScope ?? undefined,
|
|
399
|
+
callerRefs,
|
|
400
|
+
branchName,
|
|
401
|
+
worktreeName,
|
|
402
|
+
briefingText,
|
|
403
|
+
contextText,
|
|
404
|
+
]);
|
|
405
|
+
// F4: dereference "PR #N" refs to diff paths, folded into changedPaths — the only place this can happen (server records dereferenced:false, no git access). Time-boxed; absent/unauthed gh no-ops.
|
|
406
|
+
const prDiffPaths = [];
|
|
407
|
+
if (callerSignals.changedPaths === undefined) {
|
|
408
|
+
let derefed = 0;
|
|
409
|
+
for (const ref of refs) {
|
|
410
|
+
const prNumber = prNumberFromRef(ref);
|
|
411
|
+
if (prNumber === null)
|
|
412
|
+
continue;
|
|
413
|
+
if (derefed >= PR_DIFF_MAX_REFS)
|
|
414
|
+
break;
|
|
415
|
+
derefed++;
|
|
416
|
+
try {
|
|
417
|
+
for (const p of prDiff(cwd, prNumber))
|
|
418
|
+
prDiffPaths.push(p);
|
|
419
|
+
}
|
|
420
|
+
catch {
|
|
421
|
+
// gh absent / unauthed / PR missing — skip gracefully, leave existing behavior.
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
// Caller-supplied changedPaths win (backward compat); otherwise union the
|
|
426
|
+
// three local sources, deduped, order-stable.
|
|
427
|
+
const unionedChangedPaths = callerSignals.changedPaths ??
|
|
428
|
+
Array.from(new Set([...dirtyChangedPaths, ...branchChangedPaths, ...prDiffPaths]));
|
|
429
|
+
const baseSignals = sanitizeStartupResolutionSignals({
|
|
430
|
+
...callerSignals,
|
|
431
|
+
sourceSurface: callerSignals.sourceSurface ?? 'cli',
|
|
432
|
+
resolverVersion: callerSignals.resolverVersion ?? STARTUP_RESOLUTION_RESOLVER_VERSION,
|
|
433
|
+
branchName: callerSignals.branchName ?? branchName,
|
|
434
|
+
worktreeName: callerSignals.worktreeName ?? worktreeName,
|
|
435
|
+
changedPaths: unionedChangedPaths,
|
|
436
|
+
reviewedArtifactRefs: callerSignals.reviewedArtifactRefs ?? refs,
|
|
437
|
+
commitSha: callerSignals.commitSha ?? commitSha,
|
|
438
|
+
});
|
|
439
|
+
const taskText = deriveHandshakeStartupTask(baseSignals.reviewedArtifactRefs ?? [], baseSignals.changedPaths ?? [], baseSignals.taskText);
|
|
440
|
+
const sanitized = sanitizeStartupResolutionSignals({
|
|
441
|
+
...baseSignals,
|
|
442
|
+
taskText,
|
|
443
|
+
});
|
|
444
|
+
const hasMeaningfulEvidence = Boolean(sanitized.taskText) ||
|
|
445
|
+
(sanitized.changedPaths?.length ?? 0) > 0 ||
|
|
446
|
+
(sanitized.reviewedArtifactRefs?.length ?? 0) > 0 ||
|
|
447
|
+
Boolean(sanitized.explicitScope);
|
|
448
|
+
if (hasMeaningfulEvidence)
|
|
449
|
+
return sanitized;
|
|
450
|
+
// Codex@704: even with no evidence, emit a minimal envelope carrying attribution — {} would
|
|
451
|
+
// drop the whole startup block, losing the loud domain-unresolved signal (spec "Loud Unresolved State", AC #4).
|
|
452
|
+
return sanitizeStartupResolutionSignals({
|
|
453
|
+
sourceSurface: sanitized.sourceSurface ?? 'cli',
|
|
454
|
+
resolverVersion: sanitized.resolverVersion ?? STARTUP_RESOLUTION_RESOLVER_VERSION,
|
|
455
|
+
branchName: sanitized.branchName,
|
|
456
|
+
worktreeName: sanitized.worktreeName,
|
|
457
|
+
commitSha: sanitized.commitSha,
|
|
458
|
+
changeId: sanitized.changeId,
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
/** Normalize volatile handshake-only timestamps before comparing generated files — keeps visible
|
|
462
|
+
* timestamps in artifacts while avoiding meaningless rewrites when content is unchanged. */
|
|
463
|
+
export function normalizeHandshakeContentForComparison(content) {
|
|
464
|
+
return content
|
|
465
|
+
.replace(/<!-- auto-generated by pb handshake — [0-9]{4}-[0-9]{2}-[0-9]{2}T[^>]+ -->/g, '<!-- auto-generated by pb handshake — <TIMESTAMP> -->')
|
|
466
|
+
.replace(/^_Generated: [0-9]{4}-[0-9]{2}-[0-9]{2}T.*_$/gm, '_Generated: <TIMESTAMP>_');
|
|
197
467
|
}
|
|
198
468
|
function shouldWriteAdapter(filePath, force) {
|
|
199
|
-
|
|
200
|
-
return true;
|
|
469
|
+
// An absent file at an adapter path is a projection target → materialize it.
|
|
201
470
|
if (!existsSync(filePath))
|
|
202
471
|
return true;
|
|
203
472
|
const content = readFileSync(filePath, 'utf8');
|
|
473
|
+
// No MARKER → user-owned/committed-static (CLAUDE.md, AGENTS.md, Copilot instructions) — never overwritten, not even under --force.
|
|
474
|
+
void force;
|
|
204
475
|
return content.includes(MARKER);
|
|
205
476
|
}
|
|
477
|
+
function normalizeSurfaceName(surface) {
|
|
478
|
+
const stripped = surface.startsWith('.') ? surface.slice(1) : surface;
|
|
479
|
+
const normalized = stripped === 'github' ? 'copilot' : stripped;
|
|
480
|
+
return normalized in SURFACE_REGISTRY ? normalized : null;
|
|
481
|
+
}
|
|
482
|
+
function surfacePerimeterRoots(surface) {
|
|
483
|
+
if (surface === 'codex')
|
|
484
|
+
return ['.codex', SURFACE_REGISTRY.codex.hookFilePath];
|
|
485
|
+
if (surface === 'copilot')
|
|
486
|
+
return ['.github', SURFACE_REGISTRY.copilot.hookFilePath];
|
|
487
|
+
if (surface === 'claude')
|
|
488
|
+
return ['.claude', 'CLAUDE.md'];
|
|
489
|
+
return [`.${surface}`];
|
|
490
|
+
}
|
|
491
|
+
// ── WP-421 S3: Three-bucket drift classification (doneWhen #17) — now its own module (STD-2/DEC-1504
|
|
492
|
+
// shrink-only offset). Re-exported so existing imports `from '../commands/handshake.js'` keep working.
|
|
493
|
+
export { classifyDriftBucket };
|
|
206
494
|
function deduplicateEntries(entries) {
|
|
207
495
|
const seen = new Set();
|
|
208
496
|
const result = [];
|
|
@@ -215,26 +503,144 @@ function deduplicateEntries(entries) {
|
|
|
215
503
|
}
|
|
216
504
|
return result;
|
|
217
505
|
}
|
|
506
|
+
/**
|
|
507
|
+
* findLeftoverProjections — WP-379 S5b
|
|
508
|
+
*
|
|
509
|
+
* Lists marker-bearing files under .cursor/rules/, .claude/rules/, .claude/skills/, .codex/skills/
|
|
510
|
+
* (plus the nested .cursor/skills/<name>/SKILL.md layout) that look stale: orphan (no canonical
|
|
511
|
+
* asset), stale case/punctuation variant, or a leftover `.dormant` copy. User-owned (no MARKER)
|
|
512
|
+
* files and unselected `allowedTargets` are never reported.
|
|
513
|
+
*
|
|
514
|
+
* Round 12: stops once `LEFTOVER_FILES_MAX + 1` matches are found across the flat + merged
|
|
515
|
+
* nested-Cursor scan combined — bounds read/enumerate I/O, not just the reported list.
|
|
516
|
+
* `truncated` says more exist beyond the capped, returned `files`.
|
|
517
|
+
*
|
|
518
|
+
* @param cursorSkillNames Cursor-specific, SKILL-kind-only canon (falls back to `assetNames`).
|
|
519
|
+
* @param exactRelativePaths Round 11: exact write-plan paths (forward-slash), exempted from both
|
|
520
|
+
* checks — covers asset-less generated files and a canonical raw name not already normalized.
|
|
521
|
+
*/
|
|
522
|
+
export function findLeftoverProjections(cwd, assetNames, allowedTargets, cursorSkillNames, exactRelativePaths) {
|
|
523
|
+
const TARGET_DIRS_BY_EXT = [
|
|
524
|
+
{ dir: join(cwd, '.cursor', 'rules'), ext: '.mdc', surface: 'cursor' },
|
|
525
|
+
{ dir: join(cwd, '.claude', 'rules'), ext: '.md', surface: 'claude' },
|
|
526
|
+
{ dir: join(cwd, '.claude', 'skills'), ext: '.md', surface: 'claude' },
|
|
527
|
+
{ dir: join(cwd, '.codex', 'skills'), ext: '.md', surface: 'codex' },
|
|
528
|
+
];
|
|
529
|
+
const canonicalNormalizedStems = new Set(assetNames.map((n) => normalizeMaterializedFilename(n)));
|
|
530
|
+
const exactPaths = exactRelativePaths ?? new Set();
|
|
531
|
+
const leftovers = [];
|
|
532
|
+
let truncated = false;
|
|
533
|
+
scanLoop: for (const { dir, ext, surface } of TARGET_DIRS_BY_EXT) {
|
|
534
|
+
if (!allowedTargets.has(surface))
|
|
535
|
+
continue;
|
|
536
|
+
if (!existsSync(dir))
|
|
537
|
+
continue;
|
|
538
|
+
let files;
|
|
539
|
+
try {
|
|
540
|
+
files = readdirSync(dir);
|
|
541
|
+
}
|
|
542
|
+
catch {
|
|
543
|
+
continue; // unreadable dir — skip
|
|
544
|
+
}
|
|
545
|
+
for (const filename of files) {
|
|
546
|
+
if (!filename.endsWith(ext) && !filename.endsWith(`${ext}.dormant`))
|
|
547
|
+
continue;
|
|
548
|
+
const fullPath = join(dir, filename);
|
|
549
|
+
let content;
|
|
550
|
+
try {
|
|
551
|
+
content = readFileSync(fullPath, 'utf8');
|
|
552
|
+
}
|
|
553
|
+
catch {
|
|
554
|
+
continue; // unreadable file — skip
|
|
555
|
+
}
|
|
556
|
+
if (!content.includes(MARKER))
|
|
557
|
+
continue; // user-owned — never reported
|
|
558
|
+
const isDormant = filename.endsWith('.dormant');
|
|
559
|
+
// A live file the write plan targets by this exact path is canonical by construction.
|
|
560
|
+
if (!isDormant) {
|
|
561
|
+
const relativePath = relative(cwd, fullPath).split(sep).join('/');
|
|
562
|
+
if (exactPaths.has(relativePath))
|
|
563
|
+
continue;
|
|
564
|
+
}
|
|
565
|
+
const stem = basename(isDormant ? filename.slice(0, -'.dormant'.length) : filename, ext);
|
|
566
|
+
const normalizedStem = normalizeMaterializedFilename(stem);
|
|
567
|
+
let entry = null;
|
|
568
|
+
if (!canonicalNormalizedStems.has(normalizedStem)) {
|
|
569
|
+
entry = { path: fullPath, reason: 'orphan — no canonical asset matches this name' };
|
|
570
|
+
}
|
|
571
|
+
else if (isDormant) {
|
|
572
|
+
entry = { path: fullPath, reason: 'leftover .dormant file from an older binary version' };
|
|
573
|
+
}
|
|
574
|
+
else if (stem !== normalizedStem) {
|
|
575
|
+
entry = { path: fullPath, reason: `stale case/punctuation variant — canonical form is "${normalizedStem}${ext}"` };
|
|
576
|
+
}
|
|
577
|
+
if (!entry)
|
|
578
|
+
continue;
|
|
579
|
+
leftovers.push(entry);
|
|
580
|
+
if (leftovers.length > LEFTOVER_FILES_MAX) {
|
|
581
|
+
truncated = true;
|
|
582
|
+
leftovers.pop();
|
|
583
|
+
break scanLoop;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
// Nested Cursor skills — extracted to its own module (STD-2/DEC-1504 shrink-only offset).
|
|
588
|
+
// Skipped once the flat scan already hit the cap; the remaining budget keeps the combined
|
|
589
|
+
// total across both scans stopping at LEFTOVER_FILES_MAX + 1.
|
|
590
|
+
if (!truncated && allowedTargets.has('cursor')) {
|
|
591
|
+
const nested = findLeftoverCursorSkills(cwd, cursorSkillNames ?? assetNames, LEFTOVER_FILES_MAX - leftovers.length);
|
|
592
|
+
leftovers.push(...nested.files);
|
|
593
|
+
truncated = nested.truncated;
|
|
594
|
+
}
|
|
595
|
+
return { files: leftovers, truncated };
|
|
596
|
+
}
|
|
597
|
+
/** Round 13 (Codex P1, security): strips a `user:token@` userinfo segment from an https remote
|
|
598
|
+
* so a credential never reaches JSON output. SSH remotes (`git@host:...`) are untouched — that
|
|
599
|
+
* `git@` is a fixed public username, not a secret. */
|
|
600
|
+
function redactGitRemote(remote) {
|
|
601
|
+
return remote ? remote.replace(/^(https?:\/\/)[^@/]+@/i, '$1') : remote;
|
|
602
|
+
}
|
|
603
|
+
/** Round 13 (Codex P1, security): `pb --json handshake` serialized the report directly — leaking
|
|
604
|
+
* an HTTPS git-remote credential and raw Convex `_id`/`_creationTime` on `matchedEntries` (never
|
|
605
|
+
* went through the shared runner's `stripConvexInternals`). One public shape, both JSON paths. */
|
|
606
|
+
function toPublicJsonReport(report) {
|
|
607
|
+
return stripConvexInternals({ ...report, repo: { ...report.repo, gitRemote: redactGitRemote(report.repo.gitRemote) } });
|
|
608
|
+
}
|
|
609
|
+
/** TASK-554 (RULE-659): getOrientView always serves the briefing's facts; a view without them is a broken contract. */
|
|
610
|
+
function servedBriefing(view) {
|
|
611
|
+
if (view.briefing)
|
|
612
|
+
return view.briefing;
|
|
613
|
+
throw new CLIError('The orient view carried no briefing; getOrientView always serves one.', { code: ErrorCode.INTERNAL, category: 'internal' });
|
|
614
|
+
}
|
|
218
615
|
export async function runHandshake(options = {}) {
|
|
219
|
-
const config = await getConfigOrGuide(() => runHandshake(options));
|
|
616
|
+
const config = await getConfigOrGuide(async () => { await runHandshake(options); });
|
|
220
617
|
if (!config)
|
|
221
|
-
return;
|
|
618
|
+
return undefined;
|
|
222
619
|
const cwd = process.cwd();
|
|
223
620
|
const force = options.force ?? false;
|
|
224
621
|
const dryRun = options.dryRun ?? false;
|
|
622
|
+
// Preview mode: default when neither --apply nor --dry-run is passed (--dry-run is a backward-compat alias).
|
|
623
|
+
const preview = !options.apply && !dryRun;
|
|
624
|
+
const applyMode = options.apply === true && !dryRun;
|
|
225
625
|
const level = options.level;
|
|
626
|
+
// `quiet` gates the final report write (`--json` alone still prints). `suppressProgress`
|
|
627
|
+
// also silences stdout log() prose in JSON mode. logErr() stays on `quiet` alone (stderr).
|
|
226
628
|
const quiet = options.quiet ?? false;
|
|
629
|
+
const suppressProgress = quiet || isJsonMode();
|
|
227
630
|
const timestamp = new Date().toISOString();
|
|
228
|
-
// Helper: emit progress line only when not
|
|
229
|
-
const log = (msg) => { if (!
|
|
631
|
+
// Helper: emit progress line only when not suppressed. logErr is gated on `quiet` alone.
|
|
632
|
+
const log = (msg) => { if (!suppressProgress)
|
|
230
633
|
process.stdout.write(msg + '\n'); };
|
|
231
634
|
const logErr = (msg) => { if (!quiet)
|
|
232
635
|
process.stderr.write(msg + '\n'); };
|
|
233
636
|
// Validate --level if provided (for handshake content filtering, not --init trust level)
|
|
234
637
|
const VALID_HANDSHAKE_LEVELS = ['beginner', 'intermediate', 'expert'];
|
|
235
638
|
if (level && !VALID_HANDSHAKE_LEVELS.includes(level)) {
|
|
236
|
-
|
|
237
|
-
|
|
639
|
+
throw new CLIError(`Unknown level "${level}".`, {
|
|
640
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
641
|
+
category: 'validation',
|
|
642
|
+
guidance: `Valid levels: ${VALID_HANDSHAKE_LEVELS.join(', ')}`,
|
|
643
|
+
});
|
|
238
644
|
}
|
|
239
645
|
// 1. Detect repo
|
|
240
646
|
const repo = detectRepo(cwd);
|
|
@@ -242,16 +648,45 @@ export async function runHandshake(options = {}) {
|
|
|
242
648
|
if (repo.detectedStack.length > 0) {
|
|
243
649
|
log(`Stack: ${repo.detectedStack.join(', ')}`);
|
|
244
650
|
}
|
|
245
|
-
|
|
651
|
+
const startupSignals = deriveHandshakeStartupSignals(cwd, options.startupSignals ?? {});
|
|
652
|
+
const orientArgs = { tier: 'standard' };
|
|
653
|
+
if (options.invocationPath)
|
|
654
|
+
orientArgs.invocationPath = options.invocationPath;
|
|
655
|
+
if (Object.keys(startupSignals).length > 0) {
|
|
656
|
+
orientArgs.startupSignals = startupSignals;
|
|
657
|
+
if (startupSignals.taskText)
|
|
658
|
+
orientArgs.task = startupSignals.taskText;
|
|
659
|
+
}
|
|
660
|
+
// Scopes the role rule lists this orient call returns to THIS session, not a sibling's.
|
|
661
|
+
const activeSession = readSession();
|
|
662
|
+
if (activeSession?.sessionId)
|
|
663
|
+
orientArgs.sessionId = activeSession.sessionId;
|
|
664
|
+
if (activeSession?.conversationId)
|
|
665
|
+
orientArgs.conversationId = activeSession.conversationId;
|
|
666
|
+
// 2. Fetch orient view + workspace readiness in parallel (budget max +200ms added latency)
|
|
246
667
|
log('Fetching workspace context...');
|
|
247
668
|
let orientView = null;
|
|
669
|
+
let workspaceProfile = null;
|
|
248
670
|
try {
|
|
249
|
-
|
|
671
|
+
const workspaceReadinessPromise = kernelCall('chain.workspaceReadiness', {}).catch(() => null);
|
|
672
|
+
const [orientResult, readinessRaw] = await Promise.all([
|
|
673
|
+
kernelCall('chain.getOrientView', orientArgs).catch((err) => {
|
|
674
|
+
logErr(`Warning: could not fetch workspace context — ${err instanceof Error ? err.message : err}`);
|
|
675
|
+
logErr('Continuing with limited context (Chain search + portable knowledge only).');
|
|
676
|
+
return null;
|
|
677
|
+
}),
|
|
678
|
+
workspaceReadinessPromise,
|
|
679
|
+
]);
|
|
680
|
+
orientView = orientResult;
|
|
681
|
+
workspaceProfile = extractWorkspaceProfile(readinessRaw);
|
|
250
682
|
}
|
|
251
683
|
catch (err) {
|
|
252
684
|
logErr(`Warning: could not fetch workspace context — ${err instanceof Error ? err.message : err}`);
|
|
253
685
|
logErr('Continuing with limited context (Chain search + portable knowledge only).');
|
|
254
686
|
}
|
|
687
|
+
if (workspaceProfile) {
|
|
688
|
+
log(`Workspace profile: entries=${workspaceProfile.totalEntries}`);
|
|
689
|
+
}
|
|
255
690
|
// 3. Build search queries from repo context
|
|
256
691
|
const searchQueries = [];
|
|
257
692
|
if (repo.name && repo.name.length >= 2)
|
|
@@ -269,110 +704,647 @@ export async function runHandshake(options = {}) {
|
|
|
269
704
|
let matchedEntries = [];
|
|
270
705
|
if (uniqueQueries.length > 0) {
|
|
271
706
|
log(`Searching Chain for: ${uniqueQueries.join(', ')}...`);
|
|
272
|
-
const searchResults = await Promise.all(uniqueQueries.map((q) =>
|
|
707
|
+
const searchResults = await Promise.all(uniqueQueries.map((q) => kernelCall('chain.searchEntries', { query: q }).catch(() => [])));
|
|
273
708
|
matchedEntries = deduplicateEntries(searchResults.flat());
|
|
274
709
|
}
|
|
275
|
-
// 5. Read canonical skills & rules
|
|
710
|
+
// 5. Read canonical skills & rules — DB-first (WP-345 S0c, TEN-1459): query setup.listAssetsForUser, FS fallback.
|
|
276
711
|
const pbDir = join(cwd, '.productbrain');
|
|
712
|
+
const manifestStatus = readManifestStatus(pbDir);
|
|
713
|
+
const manifest = manifestStatus.manifest;
|
|
714
|
+
const surfaceValidation = validateSurfacesForMode(manifestStatus.mode, manifestStatus.surfaces);
|
|
715
|
+
if (applyMode && surfaceValidation.error === SURFACE_GOVERN_NO_SURFACES) {
|
|
716
|
+
throw new CLIError('materialize: govern requires at least one registered manifest surface.', {
|
|
717
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
718
|
+
category: 'validation',
|
|
719
|
+
guidance: 'Add surfaces such as `.cursor` or `.claude` to .productbrain/manifest.yaml.',
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
for (const surface of surfaceValidation.unregisteredSurfaces) {
|
|
723
|
+
logErr(`Warning: manifest surface "${surface}" is not registered; skipping it.`);
|
|
724
|
+
}
|
|
725
|
+
const manifestTargets = new Set(surfaceValidation.registeredSurfaces);
|
|
726
|
+
const cliTargets = new Set();
|
|
727
|
+
const ignoredCliSurfaces = [];
|
|
728
|
+
for (const surface of options.surfaces ?? []) {
|
|
729
|
+
const normalized = normalizeSurfaceName(surface);
|
|
730
|
+
if (normalized && manifestTargets.has(normalized)) {
|
|
731
|
+
cliTargets.add(normalized);
|
|
732
|
+
}
|
|
733
|
+
else {
|
|
734
|
+
ignoredCliSurfaces.push(surface);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
if (ignoredCliSurfaces.length > 0) {
|
|
738
|
+
logErr(`Warning: --surfaces ignored outside manifest.surfaces: ${ignoredCliSurfaces.join(', ')}`);
|
|
739
|
+
}
|
|
740
|
+
const allowedTargets = options.surfaces && options.surfaces.length > 0
|
|
741
|
+
? cliTargets
|
|
742
|
+
: manifestTargets;
|
|
743
|
+
const perimeterManifest = {
|
|
744
|
+
surfaces: [...manifestTargets].flatMap(surfacePerimeterRoots),
|
|
745
|
+
};
|
|
746
|
+
const authorityCanWrite = manifestStatus.mode === 'project' || manifestStatus.mode === 'govern';
|
|
747
|
+
const authorityPreviewOnly = applyMode && !authorityCanWrite;
|
|
748
|
+
const writeMode = applyMode && authorityCanWrite;
|
|
749
|
+
// TASK-554 (TEN-4036): materialize governs the coding-tool surfaces (DEC-951). PB's own files
|
|
750
|
+
// under .productbrain/ (context.md, briefing.md, generated/) refresh on every --apply wherever
|
|
751
|
+
// that folder exists; mode `off` means it does not (DEC-955), and then nothing is created.
|
|
752
|
+
const pbOwnedWriteMode = applyMode && manifestStatus.mode !== 'off';
|
|
753
|
+
// Skills and rules are read from the filesystem only (WP-776 S3f, DEC-1771).
|
|
277
754
|
const allSkills = readCanonicalSkills(pbDir);
|
|
278
|
-
const
|
|
279
|
-
//
|
|
280
|
-
|
|
281
|
-
|
|
755
|
+
const manualRules = readCanonicalRules(pbDir);
|
|
756
|
+
// The --generate flag and its chain-rules generator are gone: the everyone/team/role rule lists
|
|
757
|
+
// (DEC-1774) are the rule-delivery path (context.md, chain.mdc, everyone-rules.md).
|
|
758
|
+
let allRules = manualRules;
|
|
759
|
+
// 5b. Read personal layer (WP-310 E2) — machine-local rules/skills from .productbrain/.local/, [] if absent, all persist: 'local'.
|
|
760
|
+
const personalRules = readPersonalLayer(pbDir);
|
|
761
|
+
if (personalRules.length > 0) {
|
|
762
|
+
// Name collision detection — warn when a personal rule overrides a team rule
|
|
763
|
+
const teamRuleNames = new Set(allRules.map((r) => r.name));
|
|
764
|
+
for (const pr of personalRules) {
|
|
765
|
+
if (teamRuleNames.has(pr.name)) {
|
|
766
|
+
logErr(`Personal rule "${pr.name}" overrides team rule (local takes precedence).`);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
// Merge: team rules first, personal rules appended (personal takes precedence via name collision above)
|
|
770
|
+
allRules = [...allRules, ...personalRules];
|
|
771
|
+
}
|
|
772
|
+
const personalSkills = readPersonalSkillsLayer(pbDir);
|
|
773
|
+
if (personalSkills.length > 0) {
|
|
774
|
+
const teamSkillNames = new Set(allSkills.map((s) => s.name));
|
|
775
|
+
for (const ps of personalSkills) {
|
|
776
|
+
if (teamSkillNames.has(ps.name)) {
|
|
777
|
+
logErr(`Personal skill "${ps.name}" overrides team skill (local takes precedence).`);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
allSkills.push(...personalSkills);
|
|
781
|
+
}
|
|
782
|
+
// 5d. Load method registry (WP-310 E4) — only when manifest is present. Unrelated to the
|
|
783
|
+
// setup-assets system (WP-329's own "methods" Chain collection, no setup.* coupling) — kept.
|
|
784
|
+
let registrySource;
|
|
785
|
+
let registryStale;
|
|
786
|
+
if (manifest) {
|
|
787
|
+
const registryResult = await loadMethodRegistry().catch(() => null);
|
|
788
|
+
if (registryResult) {
|
|
789
|
+
registrySource = registryResult.source;
|
|
790
|
+
registryStale = registryResult.stale;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
const adoptionFilteredSkills = filterByAdoptionState(allSkills, manifest);
|
|
794
|
+
const adoptionFilteredRules = filterByAdoptionState(allRules, manifest);
|
|
795
|
+
// Compute adoption counts for report (only meaningful when manifest is present)
|
|
796
|
+
const adoptedRulesCount = manifest ? adoptionFilteredRules.length : undefined;
|
|
797
|
+
const rejectedRulesCount = manifest ? allRules.length - adoptionFilteredRules.length : undefined;
|
|
798
|
+
// Level filtering: requested level only (WP-762 C4e-2, DEC-1800 — no more stage cap).
|
|
799
|
+
const levelFilteredSkills = filterByLevel(adoptionFilteredSkills, level);
|
|
800
|
+
const levelFilteredRules = filterByLevel(adoptionFilteredRules, level);
|
|
801
|
+
// Apply when-condition filtering (workspace profile + repo context)
|
|
802
|
+
const canonicalSkills = levelFilteredSkills.filter((skill) => {
|
|
803
|
+
const result = evaluateConditions(skill.conditions ?? {}, workspaceProfile, repo);
|
|
804
|
+
if (dryRun && !result.included) {
|
|
805
|
+
log(` EXCLUDED skill ${skill.name}: ${result.reasons.join(', ')}`);
|
|
806
|
+
}
|
|
807
|
+
return result.included;
|
|
808
|
+
});
|
|
809
|
+
const canonicalRules = levelFilteredRules.filter((rule) => {
|
|
810
|
+
const result = evaluateConditions(rule.conditions ?? {}, workspaceProfile, repo);
|
|
811
|
+
if (dryRun && !result.included) {
|
|
812
|
+
log(` EXCLUDED rule ${rule.name}: ${result.reasons.join(', ')}`);
|
|
813
|
+
}
|
|
814
|
+
return result.included;
|
|
815
|
+
});
|
|
816
|
+
if (dryRun && canonicalSkills.length > 0) {
|
|
817
|
+
log(` INCLUDED skills: ${canonicalSkills.map((s) => s.name).join(', ')}`);
|
|
818
|
+
}
|
|
819
|
+
if (dryRun && canonicalRules.length > 0) {
|
|
820
|
+
log(` INCLUDED rules: ${canonicalRules.map((r) => r.name).join(', ')}`);
|
|
821
|
+
}
|
|
822
|
+
const noProjectionAssets = findNoProjectionAssets(canonicalSkills, canonicalRules);
|
|
282
823
|
if (canonicalSkills.length > 0 || canonicalRules.length > 0) {
|
|
283
824
|
const levelSuffix = level ? ` (level: ${level})` : '';
|
|
284
|
-
|
|
825
|
+
const stackSuffix = repo.detectedStack.length > 0 ? `, stack: [${repo.detectedStack.join(', ')}]` : '';
|
|
826
|
+
const totalSkills = allSkills.length;
|
|
827
|
+
const totalRules = allRules.length;
|
|
828
|
+
log(`Portable knowledge: ${canonicalSkills.length}/${totalSkills} skills, ${canonicalRules.length}/${totalRules} rules${levelSuffix}${stackSuffix}`);
|
|
285
829
|
}
|
|
286
830
|
// 6. Generate file contents
|
|
287
|
-
|
|
831
|
+
// Build workspace context for AGENTS.md enrichment (focus, entry count) — TASK-435 (C4c) deleted `stage` from it.
|
|
832
|
+
const agentsWorkspaceContext = workspaceProfile
|
|
833
|
+
? {
|
|
834
|
+
focus: orientView?.strategicContext?.currentWorkPackage ?? undefined,
|
|
835
|
+
totalEntries: workspaceProfile.totalEntries,
|
|
836
|
+
}
|
|
837
|
+
: undefined;
|
|
838
|
+
// Collect codex-targeted skills for AGENTS.md skill directory — persist: 'local' entries included (all projections are local-only now).
|
|
839
|
+
const agentsCodexSkills = canonicalSkills
|
|
840
|
+
.filter((s) => shouldEmitToTarget(s, 'codex'))
|
|
841
|
+
.map((s) => ({
|
|
842
|
+
name: s.name,
|
|
843
|
+
description: s.description,
|
|
844
|
+
triggers: s.triggers,
|
|
845
|
+
}));
|
|
846
|
+
// Collect copilot-targeted skills for copilot-instructions.md skill summaries
|
|
847
|
+
const copilotSkills = canonicalSkills
|
|
848
|
+
.filter((s) => shouldEmitToTarget(s, 'copilot'))
|
|
849
|
+
.map((s) => ({
|
|
850
|
+
name: s.name,
|
|
851
|
+
description: s.description,
|
|
852
|
+
triggers: s.triggers,
|
|
853
|
+
}));
|
|
854
|
+
// Collect copilot-targeted rules for copilot-instructions.md rule summaries
|
|
855
|
+
const copilotRules = canonicalRules
|
|
856
|
+
.filter((r) => shouldEmitToTarget(r, 'copilot'))
|
|
857
|
+
.map((r) => ({
|
|
858
|
+
name: r.name,
|
|
859
|
+
description: r.description,
|
|
860
|
+
}));
|
|
861
|
+
const copilotProfile = resolveSurfaceProfile('copilot');
|
|
862
|
+
const copilotOptions = {
|
|
863
|
+
profile: copilotProfile,
|
|
864
|
+
workspaceContext: agentsWorkspaceContext,
|
|
865
|
+
skills: copilotSkills.length > 0 ? copilotSkills : undefined,
|
|
866
|
+
rules: copilotRules.length > 0 ? copilotRules : undefined,
|
|
867
|
+
};
|
|
868
|
+
// TASK-554 (WP-777, DEC-1888): one workspace briefing (spine and the Everyone rule list, from
|
|
869
|
+
// the kernel builder) feeds context.md, everyone-rules.md and chain.mdc. `null` means the orient
|
|
870
|
+
// fetch failed: the two briefing files are not written (and a stale copy is removed in apply
|
|
871
|
+
// mode below), and chain.mdc says the briefing is unavailable.
|
|
872
|
+
const workspaceBriefingLines = orientView ? formatWorkspaceBriefingLines(servedBriefing(orientView), orientView.ruleLists) : null;
|
|
873
|
+
const contextContent = orientView && workspaceBriefingLines ? generateContextMd(orientView, workspaceBriefingLines, repo, timestamp) : null;
|
|
874
|
+
const everyoneRulesContent = workspaceBriefingLines ? generateEveryoneRulesMd(workspaceBriefingLines, timestamp) : null;
|
|
288
875
|
const briefingContent = generateBriefingMd(matchedEntries, repo, uniqueQueries, timestamp);
|
|
876
|
+
const agentsContent = generateAgentsMd(timestamp, {
|
|
877
|
+
workspaceContext: agentsWorkspaceContext,
|
|
878
|
+
skills: agentsCodexSkills.length > 0 ? agentsCodexSkills : undefined,
|
|
879
|
+
});
|
|
289
880
|
const claudeContent = generateClaudeMd(timestamp);
|
|
290
|
-
const cursorContent = generateCursorMdc(timestamp);
|
|
291
|
-
const copilotContent = generateCopilotMd(timestamp);
|
|
881
|
+
const cursorContent = generateCursorMdc(timestamp, workspaceBriefingLines);
|
|
882
|
+
const copilotContent = generateCopilotMd(timestamp, copilotOptions);
|
|
883
|
+
// DEC-1343: one committed .github/instructions/<slug>.instructions.md per copilot rule with applyTo; repo-wide rules stay above.
|
|
884
|
+
const copilotInstructionFiles = generateCopilotInstructionFiles(canonicalRules
|
|
885
|
+
.filter((r) => shouldEmitToTarget(r, 'copilot'))
|
|
886
|
+
// `.github/instructions/` is COMMITTED — never project a machine-local (persist: 'local') rule into it.
|
|
887
|
+
.filter((r) => r.persist !== 'local')
|
|
888
|
+
.map((r) => ({ name: r.name, body: r.body, applyTo: r.applyTo, sourcePath: r.sourcePath })), timestamp);
|
|
889
|
+
const boundaryEnforcementMode = getBoundaryEnforcementMode(manifest);
|
|
890
|
+
const boundaryManifestContent = boundaryEnforcementMode === 'advisory'
|
|
891
|
+
? null
|
|
892
|
+
: generateBoundaryManifest(pbDir);
|
|
292
893
|
// 7. Write files
|
|
293
894
|
const filesWritten = [];
|
|
294
895
|
const filesSkipped = [];
|
|
896
|
+
const previewPlan = [];
|
|
295
897
|
const writes = [
|
|
296
898
|
...(contextContent ? [{ path: join(cwd, '.productbrain', 'context.md'), relative: '.productbrain/context.md', content: contextContent, dirs: join(cwd, '.productbrain'), isAdapter: false }] : []),
|
|
899
|
+
...(everyoneRulesContent
|
|
900
|
+
? [{
|
|
901
|
+
path: join(cwd, '.productbrain', 'generated', 'everyone-rules.md'),
|
|
902
|
+
relative: '.productbrain/generated/everyone-rules.md',
|
|
903
|
+
content: everyoneRulesContent,
|
|
904
|
+
dirs: join(cwd, '.productbrain', 'generated'),
|
|
905
|
+
isAdapter: false,
|
|
906
|
+
}]
|
|
907
|
+
: []),
|
|
297
908
|
{ path: join(cwd, '.productbrain', 'briefing.md'), relative: '.productbrain/briefing.md', content: briefingContent, isAdapter: false },
|
|
298
|
-
{ path: join(cwd, '
|
|
299
|
-
{ path: join(cwd, '.
|
|
300
|
-
{ path: join(cwd, '.
|
|
909
|
+
{ path: join(cwd, 'AGENTS.md'), relative: 'AGENTS.md', content: agentsContent, isAdapter: true, target: 'codex', augmentTarget: true },
|
|
910
|
+
{ path: join(cwd, 'CLAUDE.md'), relative: 'CLAUDE.md', content: claudeContent, isAdapter: true, target: 'claude', augmentTarget: true },
|
|
911
|
+
{ path: join(cwd, '.cursor', 'rules', 'chain.mdc'), relative: '.cursor/rules/chain.mdc', content: cursorContent, dirs: join(cwd, '.cursor', 'rules'), isAdapter: true, target: 'cursor' },
|
|
912
|
+
{ path: join(cwd, '.github', 'copilot-instructions.md'), relative: '.github/copilot-instructions.md', content: copilotContent, dirs: join(cwd, '.github'), isAdapter: true, target: 'copilot' },
|
|
913
|
+
...copilotInstructionFiles.map((f) => ({
|
|
914
|
+
path: join(cwd, f.relativePath),
|
|
915
|
+
relative: f.relativePath,
|
|
916
|
+
content: f.content,
|
|
917
|
+
dirs: join(cwd, '.github', 'instructions'),
|
|
918
|
+
isAdapter: true,
|
|
919
|
+
target: 'copilot',
|
|
920
|
+
})),
|
|
921
|
+
...(boundaryManifestContent ? [{
|
|
922
|
+
path: join(cwd, '.productbrain', 'generated', 'boundaries.json'),
|
|
923
|
+
relative: '.productbrain/generated/boundaries.json',
|
|
924
|
+
content: boundaryManifestContent,
|
|
925
|
+
dirs: join(cwd, '.productbrain', 'generated'),
|
|
926
|
+
isAdapter: false,
|
|
927
|
+
}] : []),
|
|
301
928
|
];
|
|
302
929
|
// Add Cursor skill copies (filtered by target)
|
|
930
|
+
const cursorProfile = resolveSurfaceProfile('cursor');
|
|
303
931
|
for (const skill of canonicalSkills) {
|
|
304
932
|
if (!shouldEmitToTarget(skill, 'cursor'))
|
|
305
933
|
continue;
|
|
934
|
+
const dbAssetEntryId = skill.sourcePath.startsWith('db:') ? skill.sourcePath.slice(3) : undefined;
|
|
306
935
|
const skillDir = join(cwd, '.cursor', 'skills', skill.name);
|
|
307
936
|
writes.push({
|
|
308
937
|
path: join(skillDir, 'SKILL.md'),
|
|
309
938
|
relative: `.cursor/skills/${skill.name}/SKILL.md`,
|
|
310
|
-
content: generateCursorSkill(skill),
|
|
939
|
+
content: generateCursorSkill(skill, cursorProfile),
|
|
311
940
|
dirs: skillDir,
|
|
312
941
|
isAdapter: true,
|
|
942
|
+
target: 'cursor',
|
|
943
|
+
dbAssetEntryId,
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
// Add Codex skill copies (projected markdown + index)
|
|
947
|
+
const codexProfile = resolveSurfaceProfile('codex');
|
|
948
|
+
const codexSkills = canonicalSkills.filter((s) => shouldEmitToTarget(s, 'codex'));
|
|
949
|
+
for (const skill of codexSkills) {
|
|
950
|
+
const dbAssetEntryId = skill.sourcePath.startsWith('db:') ? skill.sourcePath.slice(3) : undefined;
|
|
951
|
+
writes.push({
|
|
952
|
+
path: join(cwd, '.codex', 'skills', `${skill.name}.md`),
|
|
953
|
+
relative: `.codex/skills/${skill.name}.md`,
|
|
954
|
+
content: generateCodexSkill(skill, codexProfile),
|
|
955
|
+
dirs: join(cwd, '.codex', 'skills'),
|
|
956
|
+
isAdapter: true,
|
|
957
|
+
target: 'codex',
|
|
958
|
+
dbAssetEntryId,
|
|
313
959
|
});
|
|
314
960
|
}
|
|
961
|
+
writes.push({
|
|
962
|
+
path: join(cwd, '.codex', 'skills', 'README.md'),
|
|
963
|
+
relative: '.codex/skills/README.md',
|
|
964
|
+
content: generateCodexSkillIndex(codexSkills),
|
|
965
|
+
dirs: join(cwd, '.codex', 'skills'),
|
|
966
|
+
isAdapter: true,
|
|
967
|
+
target: 'codex',
|
|
968
|
+
});
|
|
969
|
+
// Validate Codex-projected skills for dead references
|
|
970
|
+
const codexWarnings = validateCodexSkills(codexSkills);
|
|
315
971
|
// Add Cursor rule copies (filtered by target)
|
|
316
972
|
for (const rule of canonicalRules) {
|
|
317
973
|
if (!shouldEmitToTarget(rule, 'cursor'))
|
|
318
974
|
continue;
|
|
975
|
+
const dbAssetEntryId = rule.sourcePath.startsWith('db:') ? rule.sourcePath.slice(3) : undefined;
|
|
319
976
|
writes.push({
|
|
320
977
|
path: join(cwd, '.cursor', 'rules', `${rule.name}.mdc`),
|
|
321
978
|
relative: `.cursor/rules/${rule.name}.mdc`,
|
|
322
|
-
content: generateCursorRule(rule),
|
|
979
|
+
content: generateCursorRule(rule, cursorProfile),
|
|
323
980
|
dirs: join(cwd, '.cursor', 'rules'),
|
|
324
981
|
isAdapter: true,
|
|
982
|
+
target: 'cursor',
|
|
983
|
+
dbAssetEntryId,
|
|
325
984
|
});
|
|
326
985
|
}
|
|
327
|
-
//
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
986
|
+
// 7a. WP-379 S5b: find leftover projections (apply mode) — REPORT-ONLY (coordinator ruling, PR
|
|
987
|
+
// #912 round 10), see findLeftoverProjections's own header. WP-776 S3f: gated on writeMode
|
|
988
|
+
// alone now — the DB source (dbQuerySucceeded) is gone, so activeAssetNames comes from the
|
|
989
|
+
// filesystem-sourced allSkills/allRules (which already include the personal layer, merged in
|
|
990
|
+
// above) instead of dbAssetRows.
|
|
991
|
+
let leftoverFiles = [];
|
|
992
|
+
let leftoverFilesTruncated = false;
|
|
993
|
+
// TASK-554 (RULE-659): a failed orient fetch is named in the report, and apply removes stale briefing copies.
|
|
994
|
+
if (orientView === null) {
|
|
995
|
+
for (const path of ['.productbrain/context.md', '.productbrain/generated/everyone-rules.md'])
|
|
996
|
+
filesSkipped.push({ path, reason: 'briefing unavailable — the orient fetch failed' });
|
|
997
|
+
const stale = pbOwnedWriteMode ? removeStaleBriefingProjections(cwd) : [];
|
|
998
|
+
if (stale.length > 0)
|
|
999
|
+
logErr(`Warning: the workspace briefing could not be fetched; removed the stale ${stale.join(', ')}.`);
|
|
338
1000
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
1001
|
+
if (writeMode) {
|
|
1002
|
+
retireGeneratedProjections(cwd, log);
|
|
1003
|
+
const activeAssetNames = [
|
|
1004
|
+
...allSkills.map((s) => s.name),
|
|
1005
|
+
...allRules.map((r) => r.name),
|
|
1006
|
+
];
|
|
1007
|
+
// Nested .cursor/skills scan gets its OWN canon: canonicalSkills is SKILL-kind only and
|
|
1008
|
+
// shouldEmitToTarget(_, 'cursor') respects per-skill target routing.
|
|
1009
|
+
const cursorSkillNames = canonicalSkills.filter((s) => shouldEmitToTarget(s, 'cursor')).map((s) => s.name);
|
|
1010
|
+
// Round 11: exempt exact write-plan paths from the leftover scan (see findLeftoverProjections's own doc).
|
|
1011
|
+
const exactRelativePaths = new Set(writes.map((w) => w.relative));
|
|
1012
|
+
const scanResult = findLeftoverProjections(cwd, activeAssetNames, allowedTargets, cursorSkillNames, exactRelativePaths);
|
|
1013
|
+
leftoverFiles = scanResult.files;
|
|
1014
|
+
leftoverFilesTruncated = scanResult.truncated;
|
|
1015
|
+
}
|
|
1016
|
+
// ── WP-436 S3: Vocab projector — fetch workspace vocab context once per handshake. Source-side
|
|
1017
|
+
// stays tokenized; resolves {{vocab:...}} before writing. Fail-open: a failed fetch writes the raw token.
|
|
1018
|
+
const handshakeVocabCtx = await getOrFetchVocabCtx(config.apiKey, async () => {
|
|
1019
|
+
try {
|
|
1020
|
+
const vocab = await kernelCall('chain.getVocabulary', {});
|
|
1021
|
+
if (vocab?.collectionLabels || vocab?.collectionDefaults) {
|
|
1022
|
+
return {
|
|
1023
|
+
...(vocab.collectionLabels ? { collectionLabels: vocab.collectionLabels } : {}),
|
|
1024
|
+
...(vocab.collectionDefaults ? { collectionDefaults: vocab.collectionDefaults } : {}),
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
return null;
|
|
1028
|
+
}
|
|
1029
|
+
catch {
|
|
1030
|
+
return null; // fail-open
|
|
1031
|
+
}
|
|
1032
|
+
});
|
|
1033
|
+
const userOwnedSkipped = [];
|
|
1034
|
+
const cleanBucketPaths = [];
|
|
1035
|
+
const tamperedBucket = [];
|
|
1036
|
+
// TEN-2155: region augmentation context + symlink dedupe — codexActive gates the AGENTS.md skills-index pointer.
|
|
1037
|
+
const regionCtx = { codexActive: allowedTargets.has('codex') };
|
|
1038
|
+
const malformedRegionPaths = [];
|
|
1039
|
+
// Same inode for two augment targets (e.g. CLAUDE.md symlinked to AGENTS.md): augment only first-seen.
|
|
1040
|
+
const seenAugmentRealpaths = new Set();
|
|
1041
|
+
const augmentTargetSkip = new Set();
|
|
1042
|
+
for (const w of writes) {
|
|
1043
|
+
if (!w.augmentTarget || !w.target || !allowedTargets.has(w.target) || !existsSync(w.path))
|
|
1044
|
+
continue;
|
|
1045
|
+
let real;
|
|
1046
|
+
try {
|
|
1047
|
+
real = realpathSync(w.path);
|
|
1048
|
+
}
|
|
1049
|
+
catch {
|
|
1050
|
+
real = w.path;
|
|
1051
|
+
}
|
|
1052
|
+
if (seenAugmentRealpaths.has(real))
|
|
1053
|
+
augmentTargetSkip.add(w.path);
|
|
1054
|
+
else
|
|
1055
|
+
seenAugmentRealpaths.add(real);
|
|
350
1056
|
}
|
|
351
1057
|
for (const w of writes) {
|
|
1058
|
+
// Surface filtering: skip adapter writes for targets not in the allowed set
|
|
1059
|
+
if (w.target && !allowedTargets.has(w.target)) {
|
|
1060
|
+
filesSkipped.push({ path: w.relative, reason: `filtered (surface: ${w.target})` });
|
|
1061
|
+
if (preview)
|
|
1062
|
+
previewPlan.push({ path: w.relative, status: 'filtered' });
|
|
1063
|
+
continue;
|
|
1064
|
+
}
|
|
1065
|
+
// ── TEN-2155: augment user-owned CLAUDE.md / AGENTS.md with a marked PB region — runs ahead
|
|
1066
|
+
// of the legacy MARKER gates; absent/legacy-pb-managed fall through to the legacy path.
|
|
1067
|
+
if (w.augmentTarget) {
|
|
1068
|
+
const projection = REGION_PROJECTIONS[w.target];
|
|
1069
|
+
if (projection && existsSync(w.path)) {
|
|
1070
|
+
if (augmentTargetSkip.has(w.path)) {
|
|
1071
|
+
filesSkipped.push({ path: w.relative, reason: 'symlinked to another augment target — augmented once' });
|
|
1072
|
+
continue;
|
|
1073
|
+
}
|
|
1074
|
+
const disk = readFileSync(w.path, 'utf8');
|
|
1075
|
+
const cls = classifyAdapterFile(disk);
|
|
1076
|
+
if (cls === 'augmentable' || cls === 'region-present') {
|
|
1077
|
+
const eol = detectEol(disk);
|
|
1078
|
+
const region = replaceVocabTokens(projection.build(regionCtx, eol), handshakeVocabCtx);
|
|
1079
|
+
// Defense-in-depth: the composed region (post vocab-token resolution) must itself be a
|
|
1080
|
+
// single well-formed region. v1 content has no vocab tokens so this is a no-op, but it
|
|
1081
|
+
// guards the documented future override/vocab seam from injecting a stray sentinel/MARKER.
|
|
1082
|
+
if (classifyAdapterFile(region) !== 'region-present') {
|
|
1083
|
+
filesSkipped.push({ path: w.relative, reason: 'internal: composed PB region malformed — skipped to protect your file' });
|
|
1084
|
+
if (preview)
|
|
1085
|
+
previewPlan.push({ path: w.relative, status: 'needs-attention' });
|
|
1086
|
+
continue;
|
|
1087
|
+
}
|
|
1088
|
+
const candidate = cls === 'augmentable' ? spliceAppend(disk, region, eol) : spliceReplace(disk, region);
|
|
1089
|
+
if (candidate === disk) {
|
|
1090
|
+
filesSkipped.push({ path: w.relative, reason: 'unchanged' });
|
|
1091
|
+
if (preview)
|
|
1092
|
+
previewPlan.push({ path: w.relative, status: 'unchanged' });
|
|
1093
|
+
continue;
|
|
1094
|
+
}
|
|
1095
|
+
if (preview || dryRun) {
|
|
1096
|
+
filesWritten.push(w.relative + (dryRun ? ' (dry run)' : ''));
|
|
1097
|
+
if (preview)
|
|
1098
|
+
previewPlan.push({ path: w.relative, status: 'would-augment' });
|
|
1099
|
+
continue;
|
|
1100
|
+
}
|
|
1101
|
+
if (authorityPreviewOnly) {
|
|
1102
|
+
// apply + materialize observe/off: honor authority — do NOT write; mirror the legacy
|
|
1103
|
+
// preview-only skip so the report does not falsely list it as written.
|
|
1104
|
+
filesSkipped.push({ path: w.relative, reason: `preview-only (materialize: ${manifestStatus.mode})` });
|
|
1105
|
+
continue;
|
|
1106
|
+
}
|
|
1107
|
+
assertSetupWritePath(w.path, perimeterManifest);
|
|
1108
|
+
writeFileSync(w.path, candidate);
|
|
1109
|
+
filesWritten.push(w.relative);
|
|
1110
|
+
continue;
|
|
1111
|
+
}
|
|
1112
|
+
if (cls === 'malformed') {
|
|
1113
|
+
filesSkipped.push({ path: w.relative, reason: 'malformed PB region — left untouched; fix the pb:region sentinels' });
|
|
1114
|
+
if (preview)
|
|
1115
|
+
previewPlan.push({ path: w.relative, status: 'needs-attention' });
|
|
1116
|
+
malformedRegionPaths.push(w.relative);
|
|
1117
|
+
continue;
|
|
1118
|
+
}
|
|
1119
|
+
// cls 'pb-managed' falls through to legacy re-projection; 'opt-out' (pb:no-augment) falls through to the user-owned skip.
|
|
1120
|
+
}
|
|
1121
|
+
// absent file → fall through to legacy whole-file CREATE.
|
|
1122
|
+
}
|
|
352
1123
|
if (w.isAdapter && !shouldWriteAdapter(w.path, force)) {
|
|
353
|
-
|
|
1124
|
+
// User-owned: a file at an adapter path without our auto-gen MARKER is the
|
|
1125
|
+
// user's own file. Leave it untouched — never overwrite, never treat as drift
|
|
1126
|
+
// or log a TEN (TEN-2150). Relayed to the connect screen via userOwnedSkipped.
|
|
1127
|
+
filesSkipped.push({ path: w.relative, reason: 'user-owned — left untouched (pb won\'t overwrite your file)' });
|
|
1128
|
+
if (preview) {
|
|
1129
|
+
previewPlan.push({ path: w.relative, status: 'user-owned' });
|
|
1130
|
+
}
|
|
1131
|
+
else {
|
|
1132
|
+
userOwnedSkipped.push(w.relative);
|
|
1133
|
+
}
|
|
354
1134
|
continue;
|
|
355
1135
|
}
|
|
356
|
-
if (
|
|
357
|
-
|
|
1136
|
+
if (w.isAdapter ? authorityPreviewOnly : applyMode && !pbOwnedWriteMode) {
|
|
1137
|
+
filesSkipped.push({
|
|
1138
|
+
path: w.relative,
|
|
1139
|
+
reason: `preview-only (materialize: ${manifestStatus.mode})`,
|
|
1140
|
+
});
|
|
358
1141
|
continue;
|
|
359
1142
|
}
|
|
1143
|
+
if (preview || dryRun) {
|
|
1144
|
+
// In preview/dry-run mode: check content to distinguish new/update/unchanged
|
|
1145
|
+
if (existsSync(w.path)) {
|
|
1146
|
+
const current = readFileSync(w.path, 'utf8');
|
|
1147
|
+
const nextNormalized = normalizeHandshakeContentForComparison(w.content);
|
|
1148
|
+
const currentNormalized = normalizeHandshakeContentForComparison(current);
|
|
1149
|
+
if (nextNormalized === currentNormalized) {
|
|
1150
|
+
filesSkipped.push({ path: w.relative, reason: 'unchanged' });
|
|
1151
|
+
if (preview)
|
|
1152
|
+
previewPlan.push({ path: w.relative, status: 'unchanged' });
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
filesWritten.push(w.relative + (dryRun ? ' (dry run)' : ''));
|
|
1156
|
+
if (preview)
|
|
1157
|
+
previewPlan.push({ path: w.relative, status: 'would-update' });
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
else {
|
|
1161
|
+
filesWritten.push(w.relative + (dryRun ? ' (dry run)' : ''));
|
|
1162
|
+
if (preview)
|
|
1163
|
+
previewPlan.push({ path: w.relative, status: 'would-write' });
|
|
1164
|
+
}
|
|
1165
|
+
continue;
|
|
1166
|
+
}
|
|
1167
|
+
// ── WP-421 S3: defer tampered adapter writes (doneWhen #17) — classify pb-managed-clean vs
|
|
1168
|
+
// pb-managed-tampered, deferred not overwritten; post-loop resolves. --force bypasses the defer.
|
|
1169
|
+
if (w.isAdapter && !force) {
|
|
1170
|
+
const drift = classifyDriftBucket(w.path);
|
|
1171
|
+
if (drift && drift.bucket === 'pb-managed-tampered') {
|
|
1172
|
+
tamperedBucket.push({
|
|
1173
|
+
path: w.path,
|
|
1174
|
+
relative: w.relative,
|
|
1175
|
+
content: w.content,
|
|
1176
|
+
expectedHash: drift.expectedHash,
|
|
1177
|
+
actualHash: drift.actualHash,
|
|
1178
|
+
dirs: w.dirs,
|
|
1179
|
+
});
|
|
1180
|
+
// Do NOT write — defer until prompt/refusal resolves the file.
|
|
1181
|
+
continue;
|
|
1182
|
+
}
|
|
1183
|
+
if (drift && drift.bucket === 'pb-managed-clean') {
|
|
1184
|
+
cleanBucketPaths.push(w.relative);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
assertSetupWritePath(w.path, perimeterManifest);
|
|
360
1188
|
if (w.dirs)
|
|
361
1189
|
mkdirSync(w.dirs, { recursive: true });
|
|
362
|
-
|
|
1190
|
+
// WP-436 S3: resolve {{vocab:...}} tokens before writing projected adapter files only
|
|
1191
|
+
// (source-side stays tokenized). Fail-open: undefined vocabCtx falls back to canonicalKey literals.
|
|
1192
|
+
const resolvedContent = w.isAdapter
|
|
1193
|
+
? replaceVocabTokens(w.content, handshakeVocabCtx)
|
|
1194
|
+
: w.content;
|
|
1195
|
+
if (existsSync(w.path)) {
|
|
1196
|
+
const current = readFileSync(w.path, 'utf8');
|
|
1197
|
+
const nextNormalized = normalizeHandshakeContentForComparison(resolvedContent);
|
|
1198
|
+
const currentNormalized = normalizeHandshakeContentForComparison(current);
|
|
1199
|
+
if (nextNormalized === currentNormalized) {
|
|
1200
|
+
filesSkipped.push({ path: w.relative, reason: 'unchanged' });
|
|
1201
|
+
continue;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
writeFileSync(w.path, resolvedContent);
|
|
363
1205
|
filesWritten.push(w.relative);
|
|
364
1206
|
}
|
|
365
|
-
//
|
|
1207
|
+
// Runs AFTER the write loop (malformed files were never written, nothing to record). TEN-2155:
|
|
1208
|
+
// non-interactive apply refuses on a malformed region — gated on applyMode per STD-263 vi.
|
|
1209
|
+
if (applyMode && malformedRegionPaths.length > 0 && (options.noPrompt || !process.stdout.isTTY)) {
|
|
1210
|
+
throw new CLIError(`Malformed PB region in: ${malformedRegionPaths.join(', ')}`, {
|
|
1211
|
+
code: ErrorCode.VALIDATION_FAILED,
|
|
1212
|
+
category: 'validation',
|
|
1213
|
+
guidance: 'Fix the `<!-- pb:region:start -->` / `<!-- pb:region:end -->` sentinels (one balanced pair), then re-run `pb handshake`.',
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
// ── WP-421 S3: tampered-bucket resolution (doneWhen #17), apply mode only — headless (--no-prompt
|
|
1217
|
+
// / non-TTY) refuses, exit non-zero. WP-776 S3d/S3f: the setup-assets system this resolution used
|
|
1218
|
+
// to offer as an "adopt" alternative (capture tampered edits as a personal-scoped draft via
|
|
1219
|
+
// setup.ingestSetupAsset) is deleted, and with it the only OTHER option besides overwriting —
|
|
1220
|
+
// per DEC-1771 (delete, never hide) there is no shim standing in for that capability. Revert
|
|
1221
|
+
// (re-project canonical content) is the only resolution left; this is a real capability loss
|
|
1222
|
+
// for anyone who was relying on "adopt" to preserve hand-edits, named here rather than silently
|
|
1223
|
+
// dropped. The refusal receipt (`setup.recordTamperRefusal`) is deleted along with the rest of
|
|
1224
|
+
// the setup-assets gateway routes — headless mode still refuses and reports, it just no longer
|
|
1225
|
+
// writes an audit row for the refusal.
|
|
1226
|
+
const revertedTamperedPaths = [];
|
|
1227
|
+
if (writeMode && tamperedBucket.length > 0) {
|
|
1228
|
+
const headless = options.noPrompt === true || !process.stdout.isTTY;
|
|
1229
|
+
if (headless) {
|
|
1230
|
+
// ── Headless refusal path (doneWhen #17) ────────────────────────────────
|
|
1231
|
+
logErr('');
|
|
1232
|
+
logErr(`pb handshake: ${tamperedBucket.length} PB-managed projection file(s) were edited downstream of the auto-gen marker.`);
|
|
1233
|
+
logErr('Headless mode (--no-prompt or no TTY) cannot confirm an overwrite — refusing.');
|
|
1234
|
+
logErr('');
|
|
1235
|
+
const refusedTamperedFiles = tamperedBucket.map((t) => ({
|
|
1236
|
+
path: t.relative,
|
|
1237
|
+
expectedHash: t.expectedHash,
|
|
1238
|
+
actualHash: t.actualHash,
|
|
1239
|
+
}));
|
|
1240
|
+
for (const refused of refusedTamperedFiles) {
|
|
1241
|
+
// Per #17: stderr enumerates each tampered file as
|
|
1242
|
+
// {path, expectedHash, actualHash, bucket}.
|
|
1243
|
+
logErr(` ${JSON.stringify({ ...refused, bucket: 'pb-managed-tampered' })}`);
|
|
1244
|
+
}
|
|
1245
|
+
logErr('');
|
|
1246
|
+
logErr('Re-run interactively to resolve, or use --force to overwrite (data loss).');
|
|
1247
|
+
// Surface the report counts before exit (visibility for CI logs).
|
|
1248
|
+
if (!quiet) {
|
|
1249
|
+
const refusalReport = {
|
|
1250
|
+
filesWritten,
|
|
1251
|
+
filesSkipped,
|
|
1252
|
+
matchedEntries,
|
|
1253
|
+
searchQueries: uniqueQueries,
|
|
1254
|
+
repo,
|
|
1255
|
+
codexWarnings: codexWarnings.length > 0 ? codexWarnings : undefined,
|
|
1256
|
+
adoptedCount: adoptedRulesCount,
|
|
1257
|
+
rejectedCount: rejectedRulesCount,
|
|
1258
|
+
personalRuleCount: personalRules.length > 0 ? personalRules.length : undefined,
|
|
1259
|
+
personalSkillCount: personalSkills.length > 0 ? personalSkills.length : undefined,
|
|
1260
|
+
registrySource,
|
|
1261
|
+
registryStale,
|
|
1262
|
+
userOwnedSkipped: userOwnedSkipped.length > 0 ? userOwnedSkipped : undefined,
|
|
1263
|
+
managedCleanCount: cleanBucketPaths.length || undefined,
|
|
1264
|
+
tamperedFiles: refusedTamperedFiles,
|
|
1265
|
+
leftoverFiles: leftoverFiles.length > 0 ? leftoverFiles : undefined,
|
|
1266
|
+
leftoverFilesTruncated: leftoverFilesTruncated || undefined, noProjectionAssets: noProjectionAssets.length > 0 ? noProjectionAssets : undefined, // same-line combine, shrink-only budget
|
|
1267
|
+
};
|
|
1268
|
+
process.stdout.write('\n');
|
|
1269
|
+
process.stdout.write(isJsonMode() ? JSON.stringify(toPublicJsonReport(refusalReport)) + '\n' : formatHandshakeReport(refusalReport) + '\n');
|
|
1270
|
+
}
|
|
1271
|
+
// Exit non-zero per #17.
|
|
1272
|
+
process.exit(1);
|
|
1273
|
+
}
|
|
1274
|
+
// ── Interactive path: confirm, then revert every tampered file ─────────────
|
|
1275
|
+
log('');
|
|
1276
|
+
log(`pb handshake: ${tamperedBucket.length} PB-managed projection file(s) were edited downstream of the auto-gen marker.`);
|
|
1277
|
+
log('These will be REVERTED (overwritten with canonical content) — there is no adopt/draft path any more.');
|
|
1278
|
+
const proceed = await promptConfirm({
|
|
1279
|
+
message: `Overwrite ${tamperedBucket.length} tampered file(s) with canonical content?`,
|
|
1280
|
+
initialValue: false,
|
|
1281
|
+
});
|
|
1282
|
+
if (proceed) {
|
|
1283
|
+
for (const tamper of tamperedBucket) {
|
|
1284
|
+
log('');
|
|
1285
|
+
log(`Reverting: ${tamper.relative}`);
|
|
1286
|
+
log(` expected: ${tamper.expectedHash}`);
|
|
1287
|
+
log(` actual: ${tamper.actualHash}`);
|
|
1288
|
+
// Re-project canonical content over the tampered file.
|
|
1289
|
+
// WP-436 S3: resolve vocab tokens before writing (all tampered files are adapters).
|
|
1290
|
+
if (tamper.dirs)
|
|
1291
|
+
mkdirSync(tamper.dirs, { recursive: true });
|
|
1292
|
+
assertSetupWritePath(tamper.path, perimeterManifest);
|
|
1293
|
+
writeFileSync(tamper.path, replaceVocabTokens(tamper.content, handshakeVocabCtx));
|
|
1294
|
+
revertedTamperedPaths.push(tamper.relative);
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
else {
|
|
1298
|
+
logErr('Skipped — tampered files left as-is; re-run to resolve.');
|
|
1299
|
+
process.exit(1); // doneWhen #17: never exit 0 with a tampered file unresolved (codex review round 3)
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
// DEC-1690: a dormant (gate-failed) asset is simply not projected — dbAssets already comes
|
|
1303
|
+
// from the server's activeAssets list. The WP-379 S4 / WP-426 E4 on-disk marker/rename/restore
|
|
1304
|
+
// machinery (and its .authoring-sync.json registries) is retired: nothing to reconcile.
|
|
1305
|
+
// 8. User-owned files left untouched are NOT drift (TEN-2150) — a marker-less adapter-path
|
|
1306
|
+
// file is the user's own; handshake never wrote it, so no "sync", no draft TEN, just a benign
|
|
1307
|
+
// "Skipped:" surfaced via report.userOwnedSkipped.
|
|
1308
|
+
// 8. Case-collision and dormant-drift TENs are gone (coordinator ruling, PR #912 round 10) —
|
|
1309
|
+
// they existed only to audit automated deletions that no longer happen; `report.leftoverFiles`
|
|
1310
|
+
// below is the single reporting surface now.
|
|
1311
|
+
// 9. Report
|
|
366
1312
|
const report = {
|
|
367
1313
|
filesWritten,
|
|
368
1314
|
filesSkipped,
|
|
369
1315
|
matchedEntries,
|
|
370
1316
|
searchQueries: uniqueQueries,
|
|
371
1317
|
repo,
|
|
1318
|
+
codexWarnings: codexWarnings.length > 0 ? codexWarnings : undefined,
|
|
1319
|
+
adoptedCount: adoptedRulesCount,
|
|
1320
|
+
rejectedCount: rejectedRulesCount,
|
|
1321
|
+
personalRuleCount: personalRules.length > 0 ? personalRules.length : undefined,
|
|
1322
|
+
personalSkillCount: personalSkills.length > 0 ? personalSkills.length : undefined,
|
|
1323
|
+
registrySource,
|
|
1324
|
+
registryStale,
|
|
1325
|
+
preview: preview ? true : undefined,
|
|
1326
|
+
previewPlan: preview && previewPlan.length > 0 ? previewPlan : undefined,
|
|
1327
|
+
userOwnedSkipped: userOwnedSkipped.length > 0 ? userOwnedSkipped : undefined,
|
|
1328
|
+
// WP-421 S3: three-bucket drift report (doneWhen #17). PB-managed-clean is
|
|
1329
|
+
// the count of files whose marker + hash matched. Tampered files were
|
|
1330
|
+
// resolved (reverted) above and are reported separately. WP-776 S3d/S3f:
|
|
1331
|
+
// adoptedTamperedPaths is gone — "adopt" is no longer an option (see the
|
|
1332
|
+
// tampered-bucket resolution comment above).
|
|
1333
|
+
managedCleanCount: cleanBucketPaths.length > 0 ? cleanBucketPaths.length : undefined,
|
|
1334
|
+
revertedTamperedPaths: revertedTamperedPaths.length > 0 ? revertedTamperedPaths : undefined,
|
|
1335
|
+
// REPORT-ONLY leftover-file listing (coordinator ruling, PR #912 round 10) — the human removes these.
|
|
1336
|
+
leftoverFiles: leftoverFiles.length > 0 ? leftoverFiles : undefined,
|
|
1337
|
+
leftoverFilesTruncated: leftoverFilesTruncated || undefined, noProjectionAssets: noProjectionAssets.length > 0 ? noProjectionAssets : undefined, // WP-660 S2 combine
|
|
372
1338
|
};
|
|
373
1339
|
if (!quiet) {
|
|
374
1340
|
process.stdout.write('\n');
|
|
375
|
-
process.stdout.write(formatHandshakeReport(report) + '\n');
|
|
1341
|
+
process.stdout.write(isJsonMode() ? JSON.stringify(toPublicJsonReport(report)) + '\n' : formatHandshakeReport(report) + '\n');
|
|
376
1342
|
}
|
|
1343
|
+
// Return the report so non-UI callers (e.g. prepareConnectContext) can surface
|
|
1344
|
+
// skipped/user-owned files without re-deriving the skip logic (TEN-2107).
|
|
1345
|
+
return report;
|
|
377
1346
|
}
|
|
1347
|
+
// WP-426 E3/E4: exported test-only surface (not part of the public CLI API). setupAuthoringPath
|
|
1348
|
+
// and loadAuthoringSyncState are gone with the setup-authoring sync machinery (WP-776 S3d/S3f).
|
|
1349
|
+
export const __test = { MARKER };
|
|
378
1350
|
//# sourceMappingURL=handshake.js.map
|