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