@productbrain/cli 0.1.0-beta.1108 → 0.1.0-beta.11090
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/__tests__/adapters.test.js +79 -53
- package/dist/__tests__/adapters.test.js.map +1 -1
- package/dist/__tests__/adminConfig.test.d.ts +18 -0
- package/dist/__tests__/adminConfig.test.d.ts.map +1 -0
- package/dist/__tests__/adminConfig.test.js +221 -0
- package/dist/__tests__/adminConfig.test.js.map +1 -0
- package/dist/__tests__/batch-transformations.test.js +2 -26
- package/dist/__tests__/batch-transformations.test.js.map +1 -1
- package/dist/__tests__/capture-receipt-coaching.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-coaching.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-coaching.test.js +109 -0
- package/dist/__tests__/capture-receipt-coaching.test.js.map +1 -0
- package/dist/__tests__/capture-receipt-role-hint.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-role-hint.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-role-hint.test.js +64 -0
- package/dist/__tests__/capture-receipt-role-hint.test.js.map +1 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.d.ts +2 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.d.ts.map +1 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.js +45 -0
- package/dist/__tests__/capture-receipt-spine-floor.test.js.map +1 -0
- package/dist/__tests__/capture.test.js +953 -218
- package/dist/__tests__/capture.test.js.map +1 -1
- package/dist/__tests__/client-binding-guard.test.d.ts +2 -0
- package/dist/__tests__/client-binding-guard.test.d.ts.map +1 -0
- package/dist/__tests__/client-binding-guard.test.js +84 -0
- package/dist/__tests__/client-binding-guard.test.js.map +1 -0
- package/dist/__tests__/coaching-mirror-drift.test.d.ts +2 -0
- package/dist/__tests__/coaching-mirror-drift.test.d.ts.map +1 -0
- package/dist/__tests__/coaching-mirror-drift.test.js +50 -0
- package/dist/__tests__/coaching-mirror-drift.test.js.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts +2 -0
- package/dist/__tests__/codex-prep-parity.test.d.ts.map +1 -0
- package/dist/__tests__/codex-prep-parity.test.js +84 -0
- package/dist/__tests__/codex-prep-parity.test.js.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts +2 -0
- package/dist/__tests__/config-prod-fallthrough.test.d.ts.map +1 -0
- package/dist/__tests__/config-prod-fallthrough.test.js +93 -0
- package/dist/__tests__/config-prod-fallthrough.test.js.map +1 -0
- package/dist/__tests__/config.test.js +559 -40
- package/dist/__tests__/config.test.js.map +1 -1
- package/dist/__tests__/constellation.test.js +26 -14
- package/dist/__tests__/constellation.test.js.map +1 -1
- package/dist/__tests__/conversation.test.d.ts +2 -0
- package/dist/__tests__/conversation.test.d.ts.map +1 -0
- package/dist/__tests__/conversation.test.js +113 -0
- package/dist/__tests__/conversation.test.js.map +1 -0
- package/dist/__tests__/entry-formatter.test.d.ts +2 -0
- package/dist/__tests__/entry-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/entry-formatter.test.js +214 -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 +572 -0
- package/dist/__tests__/entryAccept.test.js.map +1 -0
- package/dist/__tests__/entryDiscardResolve.test.d.ts +2 -0
- package/dist/__tests__/entryDiscardResolve.test.d.ts.map +1 -0
- package/dist/__tests__/entryDiscardResolve.test.js +28 -0
- package/dist/__tests__/entryDiscardResolve.test.js.map +1 -0
- package/dist/__tests__/entryOwn.test.d.ts +2 -0
- package/dist/__tests__/entryOwn.test.d.ts.map +1 -0
- package/dist/__tests__/entryOwn.test.js +50 -0
- package/dist/__tests__/entryOwn.test.js.map +1 -0
- package/dist/__tests__/entryTick.test.d.ts +2 -0
- package/dist/__tests__/entryTick.test.d.ts.map +1 -0
- package/dist/__tests__/entryTick.test.js +40 -0
- package/dist/__tests__/entryTick.test.js.map +1 -0
- package/dist/__tests__/envelope-contract.test.js +2 -0
- package/dist/__tests__/envelope-contract.test.js.map +1 -1
- package/dist/__tests__/errors.test.js +41 -0
- package/dist/__tests__/errors.test.js.map +1 -1
- package/dist/__tests__/fields.test.js +14 -3
- package/dist/__tests__/fields.test.js.map +1 -1
- package/dist/__tests__/gateway-dry-run-timeout.test.d.ts +2 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.js +70 -0
- package/dist/__tests__/gateway-dry-run-timeout.test.js.map +1 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.d.ts +2 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.js +116 -0
- package/dist/__tests__/gateway-timeout-body-phase.test.js.map +1 -0
- package/dist/__tests__/glossary.test.js +10 -27
- package/dist/__tests__/glossary.test.js.map +1 -1
- package/dist/__tests__/handshake-augment.test.js +4 -20
- package/dist/__tests__/handshake-augment.test.js.map +1 -1
- package/dist/__tests__/handshake-dormancy.test.js +10 -193
- package/dist/__tests__/handshake-dormancy.test.js.map +1 -1
- package/dist/__tests__/handshake-formatter.test.js +44 -0
- package/dist/__tests__/handshake-formatter.test.js.map +1 -1
- package/dist/__tests__/handshake-preview.test.js +271 -612
- package/dist/__tests__/handshake-preview.test.js.map +1 -1
- package/dist/__tests__/handshake-session-threading.test.d.ts +2 -0
- package/dist/__tests__/handshake-session-threading.test.d.ts.map +1 -0
- package/dist/__tests__/handshake-session-threading.test.js +185 -0
- package/dist/__tests__/handshake-session-threading.test.js.map +1 -0
- package/dist/__tests__/handshake.e2e.test.js +7 -1033
- package/dist/__tests__/handshake.e2e.test.js.map +1 -1
- package/dist/__tests__/handshake.test.js +552 -317
- package/dist/__tests__/handshake.test.js.map +1 -1
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts +2 -0
- package/dist/__tests__/health-gap-kinds-drift.test.d.ts.map +1 -0
- package/dist/__tests__/health-gap-kinds-drift.test.js +43 -0
- package/dist/__tests__/health-gap-kinds-drift.test.js.map +1 -0
- package/dist/__tests__/hook-intents.test.js +31 -43
- package/dist/__tests__/hook-intents.test.js.map +1 -1
- package/dist/__tests__/init.test.js +51 -14
- package/dist/__tests__/init.test.js.map +1 -1
- package/dist/__tests__/kernel-value-sets-drift.test.d.ts +2 -0
- package/dist/__tests__/kernel-value-sets-drift.test.d.ts.map +1 -0
- package/dist/__tests__/kernel-value-sets-drift.test.js +46 -0
- package/dist/__tests__/kernel-value-sets-drift.test.js.map +1 -0
- package/dist/__tests__/kernel-value-sets-generator.test.d.ts +2 -0
- package/dist/__tests__/kernel-value-sets-generator.test.d.ts.map +1 -0
- package/dist/__tests__/kernel-value-sets-generator.test.js +108 -0
- package/dist/__tests__/kernel-value-sets-generator.test.js.map +1 -0
- package/dist/__tests__/login.test.js +18 -1
- package/dist/__tests__/login.test.js.map +1 -1
- package/dist/__tests__/method-registry.integration.test.js +2 -3
- package/dist/__tests__/method-registry.integration.test.js.map +1 -1
- package/dist/__tests__/method-registry.test.d.ts +6 -8
- package/dist/__tests__/method-registry.test.d.ts.map +1 -1
- package/dist/__tests__/method-registry.test.js +22 -70
- package/dist/__tests__/method-registry.test.js.map +1 -1
- package/dist/__tests__/missingPin.test.d.ts +11 -0
- package/dist/__tests__/missingPin.test.d.ts.map +1 -0
- package/dist/__tests__/missingPin.test.js +232 -0
- package/dist/__tests__/missingPin.test.js.map +1 -0
- package/dist/__tests__/notice-marker.test.js +146 -11
- package/dist/__tests__/notice-marker.test.js.map +1 -1
- package/dist/__tests__/orient.test.js +368 -38
- package/dist/__tests__/orient.test.js.map +1 -1
- package/dist/__tests__/perimeter.test.js +1 -1
- package/dist/__tests__/perimeter.test.js.map +1 -1
- package/dist/__tests__/preview-key-refresh.test.js +73 -13
- package/dist/__tests__/preview-key-refresh.test.js.map +1 -1
- package/dist/__tests__/profiles.test.js +498 -8
- package/dist/__tests__/profiles.test.js.map +1 -1
- package/dist/__tests__/prompts.test.js +18 -1
- package/dist/__tests__/prompts.test.js.map +1 -1
- package/dist/__tests__/rate-limit-resilience.test.d.ts +8 -0
- package/dist/__tests__/rate-limit-resilience.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-resilience.test.js +191 -0
- package/dist/__tests__/rate-limit-resilience.test.js.map +1 -0
- package/dist/__tests__/read-target-notice.test.d.ts +2 -0
- package/dist/__tests__/read-target-notice.test.d.ts.map +1 -0
- package/dist/__tests__/read-target-notice.test.js +125 -0
- package/dist/__tests__/read-target-notice.test.js.map +1 -0
- package/dist/__tests__/relate.test.js +246 -14
- package/dist/__tests__/relate.test.js.map +1 -1
- package/dist/__tests__/removed-commands.test.d.ts +2 -0
- package/dist/__tests__/removed-commands.test.d.ts.map +1 -0
- package/dist/__tests__/removed-commands.test.js +70 -0
- package/dist/__tests__/removed-commands.test.js.map +1 -0
- package/dist/__tests__/reply-commands-registered.test.d.ts +2 -0
- package/dist/__tests__/reply-commands-registered.test.d.ts.map +1 -0
- package/dist/__tests__/reply-commands-registered.test.js +81 -0
- package/dist/__tests__/reply-commands-registered.test.js.map +1 -0
- package/dist/__tests__/repo-detect.test.js +18 -38
- package/dist/__tests__/repo-detect.test.js.map +1 -1
- package/dist/__tests__/reportedProfile.test.d.ts +2 -0
- package/dist/__tests__/reportedProfile.test.d.ts.map +1 -0
- package/dist/__tests__/reportedProfile.test.js +328 -0
- package/dist/__tests__/reportedProfile.test.js.map +1 -0
- package/dist/__tests__/restore.test.d.ts +2 -0
- package/dist/__tests__/restore.test.d.ts.map +1 -0
- package/dist/__tests__/restore.test.js +85 -0
- package/dist/__tests__/restore.test.js.map +1 -0
- package/dist/__tests__/route-latency-budget.test.d.ts +2 -0
- package/dist/__tests__/route-latency-budget.test.d.ts.map +1 -0
- package/dist/__tests__/route-latency-budget.test.js +107 -0
- package/dist/__tests__/route-latency-budget.test.js.map +1 -0
- package/dist/__tests__/runner.test.js +59 -44
- package/dist/__tests__/runner.test.js.map +1 -1
- package/dist/__tests__/session-binding-refusal-tenant.test.d.ts +2 -0
- package/dist/__tests__/session-binding-refusal-tenant.test.d.ts.map +1 -0
- package/dist/__tests__/session-binding-refusal-tenant.test.js +112 -0
- package/dist/__tests__/session-binding-refusal-tenant.test.js.map +1 -0
- package/dist/__tests__/session-close-conversation.test.d.ts +2 -0
- package/dist/__tests__/session-close-conversation.test.d.ts.map +1 -0
- package/dist/__tests__/session-close-conversation.test.js +75 -0
- package/dist/__tests__/session-close-conversation.test.js.map +1 -0
- package/dist/__tests__/session-close-loop.test.d.ts +2 -0
- package/dist/__tests__/session-close-loop.test.d.ts.map +1 -0
- package/dist/__tests__/session-close-loop.test.js +259 -0
- package/dist/__tests__/session-close-loop.test.js.map +1 -0
- package/dist/__tests__/session-label.test.d.ts +2 -0
- package/dist/__tests__/session-label.test.d.ts.map +1 -0
- package/dist/__tests__/session-label.test.js +46 -0
- package/dist/__tests__/session-label.test.js.map +1 -0
- package/dist/__tests__/session-list-show.test.d.ts +2 -0
- package/dist/__tests__/session-list-show.test.d.ts.map +1 -0
- package/dist/__tests__/session-list-show.test.js +173 -0
- package/dist/__tests__/session-list-show.test.js.map +1 -0
- package/dist/__tests__/session-pinned-role.test.d.ts +2 -0
- package/dist/__tests__/session-pinned-role.test.d.ts.map +1 -0
- package/dist/__tests__/session-pinned-role.test.js +305 -0
- package/dist/__tests__/session-pinned-role.test.js.map +1 -0
- package/dist/__tests__/session-reset.test.js +23 -7
- package/dist/__tests__/session-reset.test.js.map +1 -1
- package/dist/__tests__/session-resume-backstop.test.js +42 -0
- package/dist/__tests__/session-resume-backstop.test.js.map +1 -1
- package/dist/__tests__/session-role-name-sanitize.test.d.ts +2 -0
- package/dist/__tests__/session-role-name-sanitize.test.d.ts.map +1 -0
- package/dist/__tests__/session-role-name-sanitize.test.js +122 -0
- package/dist/__tests__/session-role-name-sanitize.test.js.map +1 -0
- package/dist/__tests__/session-start-key-refresh.test.js +47 -28
- package/dist/__tests__/session-start-key-refresh.test.js.map +1 -1
- package/dist/__tests__/session-state-machine.test.js +190 -9
- package/dist/__tests__/session-state-machine.test.js.map +1 -1
- package/dist/__tests__/session-switch.test.js +217 -4
- package/dist/__tests__/session-switch.test.js.map +1 -1
- package/dist/__tests__/session-touch.test.js +48 -107
- package/dist/__tests__/session-touch.test.js.map +1 -1
- package/dist/__tests__/sessionBinding.test.d.ts +2 -0
- package/dist/__tests__/sessionBinding.test.d.ts.map +1 -0
- package/dist/__tests__/sessionBinding.test.js +118 -0
- package/dist/__tests__/sessionBinding.test.js.map +1 -0
- package/dist/__tests__/sessionByIdLookup.test.d.ts +2 -0
- package/dist/__tests__/sessionByIdLookup.test.d.ts.map +1 -0
- package/dist/__tests__/sessionByIdLookup.test.js +63 -0
- package/dist/__tests__/sessionByIdLookup.test.js.map +1 -0
- package/dist/__tests__/skill-vocabulary.test.d.ts +1 -1
- package/dist/__tests__/skill-vocabulary.test.js +7 -2
- package/dist/__tests__/skill-vocabulary.test.js.map +1 -1
- package/dist/__tests__/state.test.js +21 -1
- package/dist/__tests__/state.test.js.map +1 -1
- package/dist/__tests__/stillTrue.test.d.ts +2 -0
- package/dist/__tests__/stillTrue.test.d.ts.map +1 -0
- package/dist/__tests__/stillTrue.test.js +52 -0
- package/dist/__tests__/stillTrue.test.js.map +1 -0
- package/dist/__tests__/strip.test.js +57 -3
- package/dist/__tests__/strip.test.js.map +1 -1
- package/dist/__tests__/surfaces.test.js +3 -4
- package/dist/__tests__/surfaces.test.js.map +1 -1
- package/dist/__tests__/tenant-notice-write-path.test.d.ts +2 -0
- package/dist/__tests__/tenant-notice-write-path.test.d.ts.map +1 -0
- package/dist/__tests__/tenant-notice-write-path.test.js +183 -0
- package/dist/__tests__/tenant-notice-write-path.test.js.map +1 -0
- package/dist/__tests__/update-check.test.js +21 -1
- package/dist/__tests__/update-check.test.js.map +1 -1
- package/dist/__tests__/update.test.js +471 -8
- package/dist/__tests__/update.test.js.map +1 -1
- package/dist/__tests__/verify-formatter.test.d.ts +2 -0
- package/dist/__tests__/verify-formatter.test.d.ts.map +1 -0
- package/dist/__tests__/verify-formatter.test.js +85 -0
- package/dist/__tests__/verify-formatter.test.js.map +1 -0
- package/dist/__tests__/vocabulary-leak.test.d.ts +1 -7
- package/dist/__tests__/vocabulary-leak.test.d.ts.map +1 -1
- package/dist/__tests__/vocabulary-leak.test.js +8 -115
- package/dist/__tests__/vocabulary-leak.test.js.map +1 -1
- package/dist/__tests__/workspace.test.js +11 -72
- package/dist/__tests__/workspace.test.js.map +1 -1
- package/dist/__tests__/workspaceNotice.test.d.ts +2 -0
- package/dist/__tests__/workspaceNotice.test.d.ts.map +1 -0
- package/dist/__tests__/workspaceNotice.test.js +559 -0
- package/dist/__tests__/workspaceNotice.test.js.map +1 -0
- package/dist/commands/__tests__/quality.test.d.ts +2 -0
- package/dist/commands/__tests__/quality.test.d.ts.map +1 -0
- package/dist/commands/__tests__/quality.test.js +222 -0
- package/dist/commands/__tests__/quality.test.js.map +1 -0
- package/dist/commands/__tests__/rework.test.d.ts +2 -0
- package/dist/commands/__tests__/rework.test.d.ts.map +1 -0
- package/dist/commands/__tests__/rework.test.js +149 -0
- package/dist/commands/__tests__/rework.test.js.map +1 -0
- package/dist/commands/__tests__/tensionsList.test.d.ts +2 -0
- package/dist/commands/__tests__/tensionsList.test.d.ts.map +1 -0
- package/dist/commands/__tests__/tensionsList.test.js +63 -0
- package/dist/commands/__tests__/tensionsList.test.js.map +1 -0
- package/dist/commands/accept-policy.d.ts +10 -0
- package/dist/commands/accept-policy.d.ts.map +1 -0
- package/dist/commands/accept-policy.js +107 -0
- package/dist/commands/accept-policy.js.map +1 -0
- package/dist/commands/admin/cockpit.d.ts +2 -13
- package/dist/commands/admin/cockpit.d.ts.map +1 -1
- package/dist/commands/admin/cockpit.js +5 -5
- package/dist/commands/admin/cockpit.js.map +1 -1
- package/dist/commands/admin/index.d.ts +49 -0
- package/dist/commands/admin/index.d.ts.map +1 -1
- package/dist/commands/admin/index.js +148 -29
- package/dist/commands/admin/index.js.map +1 -1
- package/dist/commands/admin/index.test.d.ts +2 -0
- package/dist/commands/admin/index.test.d.ts.map +1 -0
- package/dist/commands/admin/index.test.js +94 -0
- package/dist/commands/admin/index.test.js.map +1 -0
- package/dist/commands/admin/inspect.d.ts.map +1 -1
- package/dist/commands/admin/inspect.js +2 -7
- package/dist/commands/admin/inspect.js.map +1 -1
- package/dist/commands/admin/probe.d.ts +75 -0
- package/dist/commands/admin/probe.d.ts.map +1 -0
- package/dist/commands/admin/probe.js +224 -0
- package/dist/commands/admin/probe.js.map +1 -0
- package/dist/commands/admin/probe.test.d.ts +2 -0
- package/dist/commands/admin/probe.test.d.ts.map +1 -0
- package/dist/commands/admin/probe.test.js +193 -0
- package/dist/commands/admin/probe.test.js.map +1 -0
- package/dist/commands/admin/run.d.ts +43 -0
- package/dist/commands/admin/run.d.ts.map +1 -0
- package/dist/commands/admin/run.js +78 -0
- package/dist/commands/admin/run.js.map +1 -0
- package/dist/commands/admin/run.test.d.ts +18 -0
- package/dist/commands/admin/run.test.d.ts.map +1 -0
- package/dist/commands/admin/run.test.js +168 -0
- package/dist/commands/admin/run.test.js.map +1 -0
- package/dist/commands/admin/seed.d.ts +6 -21
- package/dist/commands/admin/seed.d.ts.map +1 -1
- package/dist/commands/admin/seed.js +41 -310
- package/dist/commands/admin/seed.js.map +1 -1
- package/dist/commands/admin/seed.test.d.ts +3 -4
- package/dist/commands/admin/seed.test.d.ts.map +1 -1
- package/dist/commands/admin/seed.test.js +26 -76
- package/dist/commands/admin/seed.test.js.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.d.ts.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.js +3 -84
- package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.test.d.ts +5 -3
- package/dist/commands/admin/seedRegistryEntries.test.d.ts.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.test.js +60 -26
- package/dist/commands/admin/seedRegistryEntries.test.js.map +1 -1
- package/dist/commands/admin/seedRowType.d.ts +22 -0
- package/dist/commands/admin/seedRowType.d.ts.map +1 -0
- package/dist/commands/admin/seedRowType.js +2 -0
- package/dist/commands/admin/seedRowType.js.map +1 -0
- package/dist/commands/admin/seedStatusColor.d.ts +9 -0
- package/dist/commands/admin/seedStatusColor.d.ts.map +1 -0
- package/dist/commands/admin/seedStatusColor.js +19 -0
- package/dist/commands/admin/seedStatusColor.js.map +1 -0
- package/dist/commands/admin/seedStatusColor.test.d.ts +2 -0
- package/dist/commands/admin/seedStatusColor.test.d.ts.map +1 -0
- package/dist/commands/admin/seedStatusColor.test.js +31 -0
- package/dist/commands/admin/seedStatusColor.test.js.map +1 -0
- package/dist/commands/brief.d.ts.map +1 -1
- package/dist/commands/brief.js +24 -2
- package/dist/commands/brief.js.map +1 -1
- package/dist/commands/capture.d.ts +16 -15
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +124 -287
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chain-walk.d.ts.map +1 -1
- package/dist/commands/chain-walk.js.map +1 -1
- package/dist/commands/changes.d.ts.map +1 -1
- package/dist/commands/changes.js.map +1 -1
- package/dist/commands/codex-prep.d.ts +11 -1
- package/dist/commands/codex-prep.d.ts.map +1 -1
- package/dist/commands/codex-prep.js +14 -83
- package/dist/commands/codex-prep.js.map +1 -1
- package/dist/commands/collections.d.ts +1 -1
- package/dist/commands/collections.d.ts.map +1 -1
- package/dist/commands/collections.js +1 -1
- package/dist/commands/collections.js.map +1 -1
- package/dist/commands/conflicts.d.ts +35 -0
- package/dist/commands/conflicts.d.ts.map +1 -0
- package/dist/commands/conflicts.js +194 -0
- package/dist/commands/conflicts.js.map +1 -0
- package/dist/commands/conflicts.test.d.ts +2 -0
- package/dist/commands/conflicts.test.d.ts.map +1 -0
- package/dist/commands/conflicts.test.js +179 -0
- package/dist/commands/conflicts.test.js.map +1 -0
- package/dist/commands/connect-config.test.js +11 -3
- package/dist/commands/connect-config.test.js.map +1 -1
- package/dist/commands/connect-context.d.ts +27 -17
- package/dist/commands/connect-context.d.ts.map +1 -1
- package/dist/commands/connect-context.js +45 -31
- package/dist/commands/connect-context.js.map +1 -1
- package/dist/commands/connect-context.test.js +91 -53
- package/dist/commands/connect-context.test.js.map +1 -1
- package/dist/commands/connect-decline.test.d.ts +2 -0
- package/dist/commands/connect-decline.test.d.ts.map +1 -0
- package/dist/commands/connect-decline.test.js +70 -0
- package/dist/commands/connect-decline.test.js.map +1 -0
- package/dist/commands/connect-integration.test.js +24 -7
- package/dist/commands/connect-integration.test.js.map +1 -1
- package/dist/commands/connect-legacy-migration.test.d.ts +2 -0
- package/dist/commands/connect-legacy-migration.test.d.ts.map +1 -0
- package/dist/commands/connect-legacy-migration.test.js +109 -0
- package/dist/commands/connect-legacy-migration.test.js.map +1 -0
- package/dist/commands/connect-redeem-failure.test.d.ts +2 -0
- package/dist/commands/connect-redeem-failure.test.d.ts.map +1 -0
- package/dist/commands/connect-redeem-failure.test.js +134 -0
- package/dist/commands/connect-redeem-failure.test.js.map +1 -0
- package/dist/commands/connect-screens.d.ts +14 -3
- package/dist/commands/connect-screens.d.ts.map +1 -1
- package/dist/commands/connect-screens.js +62 -9
- package/dist/commands/connect-screens.js.map +1 -1
- package/dist/commands/connect-seal.test.d.ts +2 -0
- package/dist/commands/connect-seal.test.d.ts.map +1 -0
- package/dist/commands/connect-seal.test.js +55 -0
- package/dist/commands/connect-seal.test.js.map +1 -0
- package/dist/commands/connect.d.ts +14 -11
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +236 -69
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connect.test.js +226 -23
- package/dist/commands/connect.test.js.map +1 -1
- package/dist/commands/constellation.d.ts.map +1 -1
- package/dist/commands/constellation.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/cross-cut.d.ts.map +1 -1
- package/dist/commands/cross-cut.js.map +1 -1
- package/dist/commands/digest.d.ts +17 -0
- package/dist/commands/digest.d.ts.map +1 -0
- package/dist/commands/digest.js +58 -0
- package/dist/commands/digest.js.map +1 -0
- package/dist/commands/digest.test.d.ts +2 -0
- package/dist/commands/digest.test.d.ts.map +1 -0
- package/dist/commands/digest.test.js +36 -0
- package/dist/commands/digest.test.js.map +1 -0
- package/dist/commands/direction.d.ts +10 -0
- package/dist/commands/direction.d.ts.map +1 -0
- package/dist/commands/direction.js +79 -0
- package/dist/commands/direction.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +105 -35
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +202 -6
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/entryAccept.d.ts +26 -0
- package/dist/commands/entryAccept.d.ts.map +1 -0
- package/dist/commands/entryAccept.js +308 -0
- package/dist/commands/entryAccept.js.map +1 -0
- package/dist/commands/entryDiscardResolve.d.ts +9 -0
- package/dist/commands/entryDiscardResolve.d.ts.map +1 -0
- package/dist/commands/entryDiscardResolve.js +27 -0
- package/dist/commands/entryDiscardResolve.js.map +1 -0
- package/dist/commands/entryOwn.d.ts +5 -0
- package/dist/commands/entryOwn.d.ts.map +1 -0
- package/dist/commands/entryOwn.js +17 -0
- package/dist/commands/entryOwn.js.map +1 -0
- package/dist/commands/entryPreflight.d.ts +8 -0
- package/dist/commands/entryPreflight.d.ts.map +1 -0
- package/dist/commands/entryPreflight.js +48 -0
- package/dist/commands/entryPreflight.js.map +1 -0
- package/dist/commands/entryTick.d.ts +8 -0
- package/dist/commands/entryTick.d.ts.map +1 -0
- package/dist/commands/entryTick.js +43 -0
- package/dist/commands/entryTick.js.map +1 -0
- package/dist/commands/feedback.d.ts +39 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +176 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/feedback.test.d.ts +2 -0
- package/dist/commands/feedback.test.d.ts.map +1 -0
- package/dist/commands/feedback.test.js +117 -0
- package/dist/commands/feedback.test.js.map +1 -0
- package/dist/commands/fields.d.ts.map +1 -1
- package/dist/commands/fields.js +1 -1
- package/dist/commands/fields.js.map +1 -1
- package/dist/commands/files.d.ts +26 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +160 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/files.test.d.ts +2 -0
- package/dist/commands/files.test.d.ts.map +1 -0
- package/dist/commands/files.test.js +278 -0
- package/dist/commands/files.test.js.map +1 -0
- package/dist/commands/handshake.d.ts +42 -186
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +480 -1542
- package/dist/commands/handshake.js.map +1 -1
- package/dist/commands/handshakeCursorSkillCleanup.d.ts +36 -0
- package/dist/commands/handshakeCursorSkillCleanup.d.ts.map +1 -0
- package/dist/commands/handshakeCursorSkillCleanup.js +110 -0
- package/dist/commands/handshakeCursorSkillCleanup.js.map +1 -0
- package/dist/commands/handshakeDriftClassification.d.ts +33 -0
- package/dist/commands/handshakeDriftClassification.d.ts.map +1 -0
- package/dist/commands/handshakeDriftClassification.js +62 -0
- package/dist/commands/handshakeDriftClassification.js.map +1 -0
- package/dist/commands/history.d.ts +32 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +55 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/history.test.d.ts +2 -0
- package/dist/commands/history.test.d.ts.map +1 -0
- package/dist/commands/history.test.js +121 -0
- package/dist/commands/history.test.js.map +1 -0
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +22 -13
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +15 -11
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/organisation.d.ts +12 -0
- package/dist/commands/organisation.d.ts.map +1 -0
- package/dist/commands/organisation.js +146 -0
- package/dist/commands/organisation.js.map +1 -0
- package/dist/commands/organisation.test.d.ts +2 -0
- package/dist/commands/organisation.test.d.ts.map +1 -0
- package/dist/commands/organisation.test.js +116 -0
- package/dist/commands/organisation.test.js.map +1 -0
- package/dist/commands/organisationHierarchy.d.ts +15 -0
- package/dist/commands/organisationHierarchy.d.ts.map +1 -0
- package/dist/commands/organisationHierarchy.js +114 -0
- package/dist/commands/organisationHierarchy.js.map +1 -0
- package/dist/commands/organisationHierarchy.test.d.ts +2 -0
- package/dist/commands/organisationHierarchy.test.d.ts.map +1 -0
- package/dist/commands/organisationHierarchy.test.js +144 -0
- package/dist/commands/organisationHierarchy.test.js.map +1 -0
- package/dist/commands/organisationWrite.d.ts +20 -0
- package/dist/commands/organisationWrite.d.ts.map +1 -0
- package/dist/commands/organisationWrite.js +41 -0
- package/dist/commands/organisationWrite.js.map +1 -0
- package/dist/commands/orient.d.ts +45 -96
- package/dist/commands/orient.d.ts.map +1 -1
- package/dist/commands/orient.js +139 -36
- package/dist/commands/orient.js.map +1 -1
- package/dist/commands/outcome.d.ts +90 -0
- package/dist/commands/outcome.d.ts.map +1 -0
- package/dist/commands/outcome.js +201 -0
- package/dist/commands/outcome.js.map +1 -0
- package/dist/commands/outcome.test.d.ts +2 -0
- package/dist/commands/outcome.test.d.ts.map +1 -0
- package/dist/commands/outcome.test.js +320 -0
- package/dist/commands/outcome.test.js.map +1 -0
- package/dist/commands/people.d.ts +6 -0
- package/dist/commands/people.d.ts.map +1 -0
- package/dist/commands/people.js +23 -0
- package/dist/commands/people.js.map +1 -0
- package/dist/commands/people.test.d.ts +2 -0
- package/dist/commands/people.test.d.ts.map +1 -0
- package/dist/commands/people.test.js +61 -0
- package/dist/commands/people.test.js.map +1 -0
- package/dist/commands/profile.d.ts +23 -2
- package/dist/commands/profile.d.ts.map +1 -1
- package/dist/commands/profile.js +192 -35
- package/dist/commands/profile.js.map +1 -1
- package/dist/commands/quality.d.ts +26 -0
- package/dist/commands/quality.d.ts.map +1 -0
- package/dist/commands/quality.js +63 -0
- package/dist/commands/quality.js.map +1 -0
- package/dist/commands/questions.d.ts +23 -0
- package/dist/commands/questions.d.ts.map +1 -0
- package/dist/commands/questions.js +238 -0
- package/dist/commands/questions.js.map +1 -0
- package/dist/commands/questions.test.d.ts +2 -0
- package/dist/commands/questions.test.d.ts.map +1 -0
- package/dist/commands/questions.test.js +159 -0
- package/dist/commands/questions.test.js.map +1 -0
- package/dist/commands/relate.d.ts +1 -0
- package/dist/commands/relate.d.ts.map +1 -1
- package/dist/commands/relate.js +85 -13
- package/dist/commands/relate.js.map +1 -1
- package/dist/commands/restore.d.ts +2 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +83 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/rework.d.ts +24 -0
- package/dist/commands/rework.d.ts.map +1 -0
- package/dist/commands/rework.js +97 -0
- package/dist/commands/rework.js.map +1 -0
- package/dist/commands/role.d.ts +88 -0
- package/dist/commands/role.d.ts.map +1 -0
- package/dist/commands/role.js +235 -0
- package/dist/commands/role.js.map +1 -0
- package/dist/commands/role.test.d.ts +2 -0
- package/dist/commands/role.test.d.ts.map +1 -0
- package/dist/commands/role.test.js +348 -0
- package/dist/commands/role.test.js.map +1 -0
- package/dist/commands/scoreboard.d.ts +26 -0
- package/dist/commands/scoreboard.d.ts.map +1 -0
- package/dist/commands/scoreboard.js +40 -0
- package/dist/commands/scoreboard.js.map +1 -0
- package/dist/commands/search.d.ts +2 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +5 -4
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts +36 -5
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +306 -153
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +101 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/status.test.d.ts +2 -0
- package/dist/commands/status.test.d.ts.map +1 -0
- package/dist/commands/status.test.js +75 -0
- package/dist/commands/status.test.js.map +1 -0
- package/dist/commands/stillTrue.d.ts +14 -0
- package/dist/commands/stillTrue.d.ts.map +1 -0
- package/dist/commands/stillTrue.js +48 -0
- package/dist/commands/stillTrue.js.map +1 -0
- package/dist/commands/tensionsList.d.ts +5 -0
- package/dist/commands/tensionsList.d.ts.map +1 -0
- package/dist/commands/tensionsList.js +27 -0
- package/dist/commands/tensionsList.js.map +1 -0
- package/dist/commands/update.d.ts +21 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +158 -42
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/usage.d.ts.map +1 -1
- package/dist/commands/usage.js +0 -18
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +5 -0
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/welcome.d.ts.map +1 -1
- package/dist/commands/welcome.js +5 -2
- package/dist/commands/welcome.js.map +1 -1
- package/dist/commands/whoami.d.ts +10 -2
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +76 -20
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/whoami.test.js +86 -6
- package/dist/commands/whoami.test.js.map +1 -1
- package/dist/commands/workspace.d.ts +7 -74
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +9 -70
- package/dist/commands/workspace.js.map +1 -1
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.d.ts +2 -0
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.js +49 -0
- package/dist/formatters/__tests__/orient-plannedWorkCut.test.js.map +1 -0
- package/dist/formatters/__tests__/orient-provenance.test.d.ts +2 -3
- package/dist/formatters/__tests__/orient-provenance.test.d.ts.map +1 -1
- package/dist/formatters/__tests__/orient-provenance.test.js +41 -176
- package/dist/formatters/__tests__/orient-provenance.test.js.map +1 -1
- package/dist/formatters/__tests__/orient-ruleLists.test.d.ts +2 -0
- package/dist/formatters/__tests__/orient-ruleLists.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/orient-ruleLists.test.js +93 -0
- package/dist/formatters/__tests__/orient-ruleLists.test.js.map +1 -0
- package/dist/formatters/__tests__/session-list-show.test.d.ts +2 -0
- package/dist/formatters/__tests__/session-list-show.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/session-list-show.test.js +195 -0
- package/dist/formatters/__tests__/session-list-show.test.js.map +1 -0
- package/dist/formatters/__tests__/session.test.d.ts +2 -0
- package/dist/formatters/__tests__/session.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/session.test.js +199 -0
- package/dist/formatters/__tests__/session.test.js.map +1 -0
- package/dist/formatters/__tests__/tensionsList.test.d.ts +2 -0
- package/dist/formatters/__tests__/tensionsList.test.d.ts.map +1 -0
- package/dist/formatters/__tests__/tensionsList.test.js +30 -0
- package/dist/formatters/__tests__/tensionsList.test.js.map +1 -0
- package/dist/formatters/brief.d.ts +6 -15
- package/dist/formatters/brief.d.ts.map +1 -1
- package/dist/formatters/brief.js +16 -14
- package/dist/formatters/brief.js.map +1 -1
- package/dist/formatters/brief.test.d.ts +2 -0
- package/dist/formatters/brief.test.d.ts.map +1 -0
- package/dist/formatters/brief.test.js +21 -0
- package/dist/formatters/brief.test.js.map +1 -0
- package/dist/formatters/capture.d.ts +20 -11
- package/dist/formatters/capture.d.ts.map +1 -1
- package/dist/formatters/capture.js +35 -12
- package/dist/formatters/capture.js.map +1 -1
- package/dist/formatters/coaching.d.ts +60 -0
- package/dist/formatters/coaching.d.ts.map +1 -0
- package/dist/formatters/coaching.js +51 -0
- package/dist/formatters/coaching.js.map +1 -0
- package/dist/formatters/collections.d.ts +0 -1
- package/dist/formatters/collections.d.ts.map +1 -1
- package/dist/formatters/collections.js +14 -5
- package/dist/formatters/collections.js.map +1 -1
- package/dist/formatters/conflicts.d.ts +71 -0
- package/dist/formatters/conflicts.d.ts.map +1 -0
- package/dist/formatters/conflicts.js +105 -0
- package/dist/formatters/conflicts.js.map +1 -0
- package/dist/formatters/conflicts.test.d.ts +2 -0
- package/dist/formatters/conflicts.test.d.ts.map +1 -0
- package/dist/formatters/conflicts.test.js +166 -0
- package/dist/formatters/conflicts.test.js.map +1 -0
- package/dist/formatters/context.d.ts +1 -1
- package/dist/formatters/context.d.ts.map +1 -1
- package/dist/formatters/context.js.map +1 -1
- package/dist/formatters/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 +54 -3
- package/dist/formatters/entry.d.ts.map +1 -1
- package/dist/formatters/entry.js +62 -7
- package/dist/formatters/entry.js.map +1 -1
- package/dist/formatters/entryAccept.d.ts +83 -0
- package/dist/formatters/entryAccept.d.ts.map +1 -0
- package/dist/formatters/entryAccept.js +79 -0
- package/dist/formatters/entryAccept.js.map +1 -0
- package/dist/formatters/feedback.d.ts +61 -0
- package/dist/formatters/feedback.d.ts.map +1 -0
- package/dist/formatters/feedback.js +95 -0
- package/dist/formatters/feedback.js.map +1 -0
- package/dist/formatters/feedback.test.d.ts +2 -0
- package/dist/formatters/feedback.test.d.ts.map +1 -0
- package/dist/formatters/feedback.test.js +142 -0
- package/dist/formatters/feedback.test.js.map +1 -0
- package/dist/formatters/fields.d.ts +7 -1
- package/dist/formatters/fields.d.ts.map +1 -1
- package/dist/formatters/fields.js +9 -3
- package/dist/formatters/fields.js.map +1 -1
- package/dist/formatters/fields.test.d.ts +2 -0
- package/dist/formatters/fields.test.d.ts.map +1 -0
- package/dist/formatters/fields.test.js +42 -0
- package/dist/formatters/fields.test.js.map +1 -0
- package/dist/formatters/handshake.d.ts +24 -6
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +34 -15
- package/dist/formatters/handshake.js.map +1 -1
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts +2 -0
- package/dist/formatters/orient.coherencyCheckTag.test.d.ts.map +1 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js +22 -0
- package/dist/formatters/orient.coherencyCheckTag.test.js.map +1 -0
- package/dist/formatters/orient.d.ts +92 -145
- package/dist/formatters/orient.d.ts.map +1 -1
- package/dist/formatters/orient.js +143 -183
- package/dist/formatters/orient.js.map +1 -1
- package/dist/formatters/orient.rcrtMiss.test.d.ts +2 -0
- package/dist/formatters/orient.rcrtMiss.test.d.ts.map +1 -0
- package/dist/formatters/orient.rcrtMiss.test.js +77 -0
- package/dist/formatters/orient.rcrtMiss.test.js.map +1 -0
- package/dist/formatters/orient.rituals.test.d.ts +2 -0
- package/dist/formatters/orient.rituals.test.d.ts.map +1 -0
- package/dist/formatters/orient.rituals.test.js +72 -0
- package/dist/formatters/orient.rituals.test.js.map +1 -0
- package/dist/formatters/orientDegradation.d.ts +38 -0
- package/dist/formatters/orientDegradation.d.ts.map +1 -0
- package/dist/formatters/orientDegradation.js +50 -0
- package/dist/formatters/orientDegradation.js.map +1 -0
- package/dist/formatters/orientDegradation.test.d.ts +2 -0
- package/dist/formatters/orientDegradation.test.d.ts.map +1 -0
- package/dist/formatters/orientDegradation.test.js +28 -0
- package/dist/formatters/orientDegradation.test.js.map +1 -0
- package/dist/formatters/orientDirection.d.ts +25 -0
- package/dist/formatters/orientDirection.d.ts.map +1 -0
- package/dist/formatters/orientDirection.js +7 -0
- package/dist/formatters/orientDirection.js.map +1 -0
- package/dist/formatters/orientDirection.test.d.ts +2 -0
- package/dist/formatters/orientDirection.test.d.ts.map +1 -0
- package/dist/formatters/orientDirection.test.js +48 -0
- package/dist/formatters/orientDirection.test.js.map +1 -0
- package/dist/formatters/orientRetrievalMiss.d.ts +22 -0
- package/dist/formatters/orientRetrievalMiss.d.ts.map +1 -0
- package/dist/formatters/orientRetrievalMiss.js +17 -0
- package/dist/formatters/orientRetrievalMiss.js.map +1 -0
- package/dist/formatters/plannedWorkCounts.d.ts +19 -0
- package/dist/formatters/plannedWorkCounts.d.ts.map +1 -0
- package/dist/formatters/plannedWorkCounts.js +17 -0
- package/dist/formatters/plannedWorkCounts.js.map +1 -0
- package/dist/formatters/qualityChecks.d.ts +11 -0
- package/dist/formatters/qualityChecks.d.ts.map +1 -0
- package/dist/formatters/qualityChecks.js +82 -0
- package/dist/formatters/qualityChecks.js.map +1 -0
- package/dist/formatters/questions.d.ts +72 -0
- package/dist/formatters/questions.d.ts.map +1 -0
- package/dist/formatters/questions.js +116 -0
- package/dist/formatters/questions.js.map +1 -0
- package/dist/formatters/questions.test.d.ts +2 -0
- package/dist/formatters/questions.test.d.ts.map +1 -0
- package/dist/formatters/questions.test.js +144 -0
- package/dist/formatters/questions.test.js.map +1 -0
- package/dist/formatters/relate.d.ts +13 -2
- package/dist/formatters/relate.d.ts.map +1 -1
- package/dist/formatters/relate.js +15 -5
- package/dist/formatters/relate.js.map +1 -1
- package/dist/formatters/relate.test.d.ts +2 -0
- package/dist/formatters/relate.test.d.ts.map +1 -0
- package/dist/formatters/relate.test.js +91 -0
- package/dist/formatters/relate.test.js.map +1 -0
- package/dist/formatters/scoreboard.d.ts +11 -0
- package/dist/formatters/scoreboard.d.ts.map +1 -0
- package/dist/formatters/scoreboard.js +156 -0
- package/dist/formatters/scoreboard.js.map +1 -0
- package/dist/formatters/scoreboard.test.d.ts +2 -0
- package/dist/formatters/scoreboard.test.d.ts.map +1 -0
- package/dist/formatters/scoreboard.test.js +284 -0
- package/dist/formatters/scoreboard.test.js.map +1 -0
- package/dist/formatters/search.d.ts +24 -0
- package/dist/formatters/search.d.ts.map +1 -1
- package/dist/formatters/search.js +26 -11
- package/dist/formatters/search.js.map +1 -1
- package/dist/formatters/search.test.d.ts +2 -0
- package/dist/formatters/search.test.d.ts.map +1 -0
- package/dist/formatters/search.test.js +86 -0
- package/dist/formatters/search.test.js.map +1 -0
- package/dist/formatters/session-feedback.test.d.ts +2 -0
- package/dist/formatters/session-feedback.test.d.ts.map +1 -0
- package/dist/formatters/session-feedback.test.js +124 -0
- package/dist/formatters/session-feedback.test.js.map +1 -0
- package/dist/formatters/session.d.ts +121 -5
- package/dist/formatters/session.d.ts.map +1 -1
- package/dist/formatters/session.js +317 -21
- package/dist/formatters/session.js.map +1 -1
- package/dist/formatters/spineCheck.d.ts +14 -0
- package/dist/formatters/spineCheck.d.ts.map +1 -0
- package/dist/formatters/spineCheck.js +113 -0
- package/dist/formatters/spineCheck.js.map +1 -0
- package/dist/formatters/spineCheck.test.d.ts +2 -0
- package/dist/formatters/spineCheck.test.d.ts.map +1 -0
- package/dist/formatters/spineCheck.test.js +76 -0
- package/dist/formatters/spineCheck.test.js.map +1 -0
- package/dist/formatters/tensionsList.d.ts +17 -0
- package/dist/formatters/tensionsList.d.ts.map +1 -0
- package/dist/formatters/tensionsList.js +33 -0
- package/dist/formatters/tensionsList.js.map +1 -0
- package/dist/formatters/update.d.ts +26 -0
- package/dist/formatters/update.d.ts.map +1 -1
- package/dist/formatters/update.js +39 -7
- package/dist/formatters/update.js.map +1 -1
- package/dist/formatters/update.test.d.ts +2 -0
- package/dist/formatters/update.test.d.ts.map +1 -0
- package/dist/formatters/update.test.js +71 -0
- package/dist/formatters/update.test.js.map +1 -0
- package/dist/formatters/verify.d.ts +12 -4
- package/dist/formatters/verify.d.ts.map +1 -1
- package/dist/formatters/verify.js +20 -2
- package/dist/formatters/verify.js.map +1 -1
- package/dist/generated/healthGapKinds.generated.d.ts +12 -0
- package/dist/generated/healthGapKinds.generated.d.ts.map +1 -0
- package/dist/generated/healthGapKinds.generated.js +16 -0
- package/dist/generated/healthGapKinds.generated.js.map +1 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.d.ts +12 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.d.ts.map +1 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.js +11 -0
- package/dist/generated/organisationalAuthorityRefusalCodes.generated.js.map +1 -0
- package/dist/generated/relationTypes.generated.d.ts +12 -0
- package/dist/generated/relationTypes.generated.d.ts.map +1 -0
- package/dist/generated/relationTypes.generated.js +11 -0
- package/dist/generated/relationTypes.generated.js.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts +55 -0
- package/dist/generated/routeLatencyBudget.generated.d.ts.map +1 -0
- package/dist/generated/routeLatencyBudget.generated.js +273 -0
- package/dist/generated/routeLatencyBudget.generated.js.map +1 -0
- package/dist/generated/sourceSurfaces.generated.d.ts +12 -0
- package/dist/generated/sourceSurfaces.generated.d.ts.map +1 -0
- package/dist/generated/sourceSurfaces.generated.js +11 -0
- package/dist/generated/sourceSurfaces.generated.js.map +1 -0
- package/dist/generators/adapters.d.ts +39 -6
- package/dist/generators/adapters.d.ts.map +1 -1
- package/dist/generators/adapters.js +88 -89
- package/dist/generators/adapters.js.map +1 -1
- package/dist/generators/adapters.test.js +14 -6
- package/dist/generators/adapters.test.js.map +1 -1
- package/dist/generators/briefing-projections.test.d.ts +2 -0
- package/dist/generators/briefing-projections.test.d.ts.map +1 -0
- package/dist/generators/briefing-projections.test.js +98 -0
- package/dist/generators/briefing-projections.test.js.map +1 -0
- package/dist/generators/context-md.d.ts +7 -2
- package/dist/generators/context-md.d.ts.map +1 -1
- package/dist/generators/context-md.js +14 -53
- package/dist/generators/context-md.js.map +1 -1
- package/dist/generators/everyone-rules-md.d.ts +9 -0
- package/dist/generators/everyone-rules-md.d.ts.map +1 -0
- package/dist/generators/everyone-rules-md.js +21 -0
- package/dist/generators/everyone-rules-md.js.map +1 -0
- package/dist/generators/noProjectionAssets.d.ts +15 -0
- package/dist/generators/noProjectionAssets.d.ts.map +1 -0
- package/dist/generators/noProjectionAssets.js +6 -0
- package/dist/generators/noProjectionAssets.js.map +1 -0
- package/dist/generators/portable-knowledge.d.ts +9 -26
- package/dist/generators/portable-knowledge.d.ts.map +1 -1
- package/dist/generators/portable-knowledge.js +11 -125
- package/dist/generators/portable-knowledge.js.map +1 -1
- package/dist/generators/portable-knowledge.test.js +82 -267
- package/dist/generators/portable-knowledge.test.js.map +1 -1
- package/dist/generators/region-projections.d.ts +0 -1
- package/dist/generators/region-projections.d.ts.map +1 -1
- package/dist/generators/region-projections.js +7 -5
- package/dist/generators/region-projections.js.map +1 -1
- package/dist/generators/region-projections.test.js +10 -15
- package/dist/generators/region-projections.test.js.map +1 -1
- package/dist/generators/region.test.js +9 -10
- package/dist/generators/region.test.js.map +1 -1
- package/dist/generators/retired-projections.d.ts +12 -0
- package/dist/generators/retired-projections.d.ts.map +1 -0
- package/dist/generators/retired-projections.js +75 -0
- package/dist/generators/retired-projections.js.map +1 -0
- package/dist/generators/retired-projections.test.d.ts +2 -0
- package/dist/generators/retired-projections.test.d.ts.map +1 -0
- package/dist/generators/retired-projections.test.js +64 -0
- package/dist/generators/retired-projections.test.js.map +1 -0
- package/dist/handleCliError.d.ts +13 -0
- package/dist/handleCliError.d.ts.map +1 -0
- package/dist/handleCliError.js +80 -0
- package/dist/handleCliError.js.map +1 -0
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +168 -584
- package/dist/index.js.map +1 -1
- package/dist/lib/__tests__/legalRelationTypes.test.d.ts +2 -0
- package/dist/lib/__tests__/legalRelationTypes.test.d.ts.map +1 -0
- package/dist/lib/__tests__/legalRelationTypes.test.js +61 -0
- package/dist/lib/__tests__/legalRelationTypes.test.js.map +1 -0
- package/dist/lib/__tests__/parseFields.test.d.ts +2 -0
- package/dist/lib/__tests__/parseFields.test.d.ts.map +1 -0
- package/dist/lib/__tests__/parseFields.test.js +40 -0
- package/dist/lib/__tests__/parseFields.test.js.map +1 -0
- package/dist/lib/adminConfig.d.ts +48 -0
- package/dist/lib/adminConfig.d.ts.map +1 -0
- package/dist/lib/adminConfig.js +130 -0
- package/dist/lib/adminConfig.js.map +1 -0
- package/dist/lib/canonicalRefs.d.ts +27 -8
- package/dist/lib/canonicalRefs.d.ts.map +1 -1
- package/dist/lib/canonicalRefs.js +25 -6
- package/dist/lib/canonicalRefs.js.map +1 -1
- package/dist/lib/captureLink.d.ts +31 -0
- package/dist/lib/captureLink.d.ts.map +1 -0
- package/dist/lib/captureLink.js +125 -0
- package/dist/lib/captureLink.js.map +1 -0
- package/dist/lib/checklist.d.ts +32 -0
- package/dist/lib/checklist.d.ts.map +1 -0
- package/dist/lib/checklist.js +79 -0
- package/dist/lib/checklist.js.map +1 -0
- package/dist/lib/client.d.ts +38 -24
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +208 -100
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/commanderOptions.d.ts +8 -0
- package/dist/lib/commanderOptions.d.ts.map +1 -0
- package/dist/lib/commanderOptions.js +10 -0
- package/dist/lib/commanderOptions.js.map +1 -0
- package/dist/lib/compose-wrapup-view.d.ts +68 -0
- package/dist/lib/compose-wrapup-view.d.ts.map +1 -0
- package/dist/lib/compose-wrapup-view.js +40 -0
- package/dist/lib/compose-wrapup-view.js.map +1 -0
- package/dist/lib/config.d.ts +43 -111
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +103 -309
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/configResult.d.ts +102 -0
- package/dist/lib/configResult.d.ts.map +1 -0
- package/dist/lib/configResult.js +179 -0
- package/dist/lib/configResult.js.map +1 -0
- package/dist/lib/connectProfileName.d.ts +36 -0
- package/dist/lib/connectProfileName.d.ts.map +1 -0
- package/dist/lib/connectProfileName.js +72 -0
- package/dist/lib/connectProfileName.js.map +1 -0
- package/dist/lib/connectProfileName.test.d.ts +2 -0
- package/dist/lib/connectProfileName.test.d.ts.map +1 -0
- package/dist/lib/connectProfileName.test.js +100 -0
- package/dist/lib/connectProfileName.test.js.map +1 -0
- package/dist/lib/constants.d.ts +6 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +9 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/conversation.d.ts +36 -0
- package/dist/lib/conversation.d.ts.map +1 -0
- package/dist/lib/conversation.js +66 -0
- package/dist/lib/conversation.js.map +1 -0
- package/dist/lib/createEntryResult.d.ts +34 -0
- package/dist/lib/createEntryResult.d.ts.map +1 -0
- package/dist/lib/createEntryResult.js +12 -0
- package/dist/lib/createEntryResult.js.map +1 -0
- package/dist/lib/deployment.js +2 -2
- package/dist/lib/deployment.js.map +1 -1
- package/dist/lib/deployment.test.js +20 -1
- package/dist/lib/deployment.test.js.map +1 -1
- package/dist/lib/envKeySnapshot.d.ts +10 -0
- package/dist/lib/envKeySnapshot.d.ts.map +1 -0
- package/dist/lib/envKeySnapshot.js +30 -0
- package/dist/lib/envKeySnapshot.js.map +1 -0
- package/dist/lib/errors.d.ts +90 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +83 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +55 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +92 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/frontmatter.test.d.ts +15 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +98 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/gatewayTimeout.d.ts +88 -0
- package/dist/lib/gatewayTimeout.d.ts.map +1 -0
- package/dist/lib/gatewayTimeout.js +118 -0
- package/dist/lib/gatewayTimeout.js.map +1 -0
- package/dist/lib/gitEnvLeakKeysParity.test.d.ts +2 -0
- package/dist/lib/gitEnvLeakKeysParity.test.d.ts.map +1 -0
- package/dist/lib/gitEnvLeakKeysParity.test.js +73 -0
- package/dist/lib/gitEnvLeakKeysParity.test.js.map +1 -0
- package/dist/lib/glossary.d.ts +3 -15
- package/dist/lib/glossary.d.ts.map +1 -1
- package/dist/lib/glossary.js +6 -47
- package/dist/lib/glossary.js.map +1 -1
- package/dist/lib/hook-intents.d.ts +9 -4
- package/dist/lib/hook-intents.d.ts.map +1 -1
- package/dist/lib/hook-intents.js +10 -11
- package/dist/lib/hook-intents.js.map +1 -1
- package/dist/lib/judgeWait.d.ts +50 -0
- package/dist/lib/judgeWait.d.ts.map +1 -0
- package/dist/lib/judgeWait.js +64 -0
- package/dist/lib/judgeWait.js.map +1 -0
- package/dist/lib/kernelEnvelope.d.ts +42 -0
- package/dist/lib/kernelEnvelope.d.ts.map +1 -0
- package/dist/lib/kernelEnvelope.js +67 -0
- package/dist/lib/kernelEnvelope.js.map +1 -0
- package/dist/lib/legalRelationTypes.d.ts +19 -0
- package/dist/lib/legalRelationTypes.d.ts.map +1 -0
- package/dist/lib/legalRelationTypes.js +64 -0
- package/dist/lib/legalRelationTypes.js.map +1 -0
- package/dist/lib/localBinding.d.ts +86 -0
- package/dist/lib/localBinding.d.ts.map +1 -0
- package/dist/lib/localBinding.js +173 -0
- package/dist/lib/localBinding.js.map +1 -0
- package/dist/lib/method-registry.d.ts +16 -11
- package/dist/lib/method-registry.d.ts.map +1 -1
- package/dist/lib/method-registry.js +13 -25
- package/dist/lib/method-registry.js.map +1 -1
- package/dist/lib/normalizeMaterializedFilename.d.ts +3 -3
- package/dist/lib/normalizeMaterializedFilename.js +3 -3
- package/dist/lib/notice-marker.d.ts.map +1 -1
- package/dist/lib/notice-marker.js +186 -16
- package/dist/lib/notice-marker.js.map +1 -1
- package/dist/lib/outcomeObjectiveLines.d.ts +30 -0
- package/dist/lib/outcomeObjectiveLines.d.ts.map +1 -0
- package/dist/lib/outcomeObjectiveLines.js +29 -0
- package/dist/lib/outcomeObjectiveLines.js.map +1 -0
- package/dist/lib/ownerLine.d.ts +90 -0
- package/dist/lib/ownerLine.d.ts.map +1 -0
- package/dist/lib/ownerLine.js +77 -0
- package/dist/lib/ownerLine.js.map +1 -0
- package/dist/lib/parseFields.d.ts +19 -0
- package/dist/lib/parseFields.d.ts.map +1 -0
- package/dist/lib/parseFields.js +49 -0
- package/dist/lib/parseFields.js.map +1 -0
- package/dist/lib/pinnedRole.d.ts +28 -0
- package/dist/lib/pinnedRole.d.ts.map +1 -0
- package/dist/lib/pinnedRole.js +106 -0
- package/dist/lib/pinnedRole.js.map +1 -0
- package/dist/lib/platformGlossary.d.ts +22 -0
- package/dist/lib/platformGlossary.d.ts.map +1 -0
- package/dist/lib/platformGlossary.js +26 -0
- package/dist/lib/platformGlossary.js.map +1 -0
- package/dist/lib/previewBanner.d.ts +9 -0
- package/dist/lib/previewBanner.d.ts.map +1 -0
- package/dist/lib/previewBanner.js +36 -0
- package/dist/lib/previewBanner.js.map +1 -0
- package/dist/lib/productbrain-files.d.ts +108 -0
- package/dist/lib/productbrain-files.d.ts.map +1 -0
- package/dist/lib/productbrain-files.js +240 -0
- package/dist/lib/productbrain-files.js.map +1 -0
- package/dist/lib/productbrain-files.test.d.ts +2 -0
- package/dist/lib/productbrain-files.test.d.ts.map +1 -0
- package/dist/lib/productbrain-files.test.js +518 -0
- package/dist/lib/productbrain-files.test.js.map +1 -0
- package/dist/lib/profiles.d.ts +52 -4
- package/dist/lib/profiles.d.ts.map +1 -1
- package/dist/lib/profiles.js +72 -21
- package/dist/lib/profiles.js.map +1 -1
- package/dist/lib/projectConfig.d.ts +121 -0
- package/dist/lib/projectConfig.d.ts.map +1 -0
- package/dist/lib/projectConfig.js +226 -0
- package/dist/lib/projectConfig.js.map +1 -0
- package/dist/lib/prompts.d.ts +2 -0
- package/dist/lib/prompts.d.ts.map +1 -1
- package/dist/lib/prompts.js +2 -0
- package/dist/lib/prompts.js.map +1 -1
- package/dist/lib/proseBody.d.ts +14 -0
- package/dist/lib/proseBody.d.ts.map +1 -0
- package/dist/lib/proseBody.js +25 -0
- package/dist/lib/proseBody.js.map +1 -0
- package/dist/lib/rate-limit.d.ts +34 -0
- package/dist/lib/rate-limit.d.ts.map +1 -0
- package/dist/lib/rate-limit.js +89 -0
- package/dist/lib/rate-limit.js.map +1 -0
- package/dist/lib/readinessNotices.d.ts +12 -0
- package/dist/lib/readinessNotices.d.ts.map +1 -0
- package/dist/lib/readinessNotices.js +15 -0
- package/dist/lib/readinessNotices.js.map +1 -0
- package/dist/lib/repo-detect.d.ts +8 -2
- package/dist/lib/repo-detect.d.ts.map +1 -1
- package/dist/lib/repo-detect.js +11 -6
- package/dist/lib/repo-detect.js.map +1 -1
- package/dist/lib/reportedProfile.d.ts +18 -0
- package/dist/lib/reportedProfile.d.ts.map +1 -0
- package/dist/lib/reportedProfile.js +144 -0
- package/dist/lib/reportedProfile.js.map +1 -0
- package/dist/lib/restsOn.d.ts +33 -0
- package/dist/lib/restsOn.d.ts.map +1 -0
- package/dist/lib/restsOn.js +34 -0
- package/dist/lib/restsOn.js.map +1 -0
- package/dist/lib/ruleListRender.d.ts +268 -0
- package/dist/lib/ruleListRender.d.ts.map +1 -0
- package/dist/lib/ruleListRender.js +350 -0
- package/dist/lib/ruleListRender.js.map +1 -0
- package/dist/lib/runner.d.ts +9 -1
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +30 -4
- package/dist/lib/runner.js.map +1 -1
- package/dist/lib/seatSentence.d.ts +62 -0
- package/dist/lib/seatSentence.d.ts.map +1 -0
- package/dist/lib/seatSentence.js +82 -0
- package/dist/lib/seatSentence.js.map +1 -0
- package/dist/lib/session.d.ts +86 -12
- package/dist/lib/session.d.ts.map +1 -1
- package/dist/lib/session.js +243 -24
- package/dist/lib/session.js.map +1 -1
- package/dist/lib/sessionBinding.d.ts +61 -0
- package/dist/lib/sessionBinding.d.ts.map +1 -0
- package/dist/lib/sessionBinding.js +125 -0
- package/dist/lib/sessionBinding.js.map +1 -0
- package/dist/lib/sessionNotices.d.ts +54 -0
- package/dist/lib/sessionNotices.d.ts.map +1 -0
- package/dist/lib/sessionNotices.js +132 -0
- package/dist/lib/sessionNotices.js.map +1 -0
- package/dist/lib/sessionNotices.test.d.ts +2 -0
- package/dist/lib/sessionNotices.test.d.ts.map +1 -0
- package/dist/lib/sessionNotices.test.js +53 -0
- package/dist/lib/sessionNotices.test.js.map +1 -0
- package/dist/lib/spineVerdictRead.d.ts +70 -0
- package/dist/lib/spineVerdictRead.d.ts.map +1 -0
- package/dist/lib/spineVerdictRead.js +73 -0
- package/dist/lib/spineVerdictRead.js.map +1 -0
- package/dist/lib/spinner.js +2 -2
- package/dist/lib/spinner.js.map +1 -1
- package/dist/lib/startup-resolution-signals.d.ts +34 -0
- package/dist/lib/startup-resolution-signals.d.ts.map +1 -0
- package/dist/lib/startup-resolution-signals.js +116 -0
- package/dist/lib/startup-resolution-signals.js.map +1 -0
- package/dist/lib/startup-resolution-signals.test.d.ts +2 -0
- package/dist/lib/startup-resolution-signals.test.d.ts.map +1 -0
- package/dist/lib/startup-resolution-signals.test.js +113 -0
- package/dist/lib/startup-resolution-signals.test.js.map +1 -0
- package/dist/lib/startup-signals.d.ts +12 -0
- package/dist/lib/startup-signals.d.ts.map +1 -0
- package/dist/lib/startup-signals.js +179 -0
- package/dist/lib/startup-signals.js.map +1 -0
- package/dist/lib/startup-signals.test.d.ts +2 -0
- package/dist/lib/startup-signals.test.d.ts.map +1 -0
- package/dist/lib/startup-signals.test.js +165 -0
- package/dist/lib/startup-signals.test.js.map +1 -0
- package/dist/lib/state.d.ts +11 -2
- package/dist/lib/state.d.ts.map +1 -1
- package/dist/lib/state.js +11 -4
- package/dist/lib/state.js.map +1 -1
- package/dist/lib/statusCategories.d.ts +160 -0
- package/dist/lib/statusCategories.d.ts.map +1 -0
- package/dist/lib/statusCategories.js +284 -0
- package/dist/lib/statusCategories.js.map +1 -0
- package/dist/lib/strip.d.ts +17 -0
- package/dist/lib/strip.d.ts.map +1 -1
- package/dist/lib/strip.js +48 -1
- package/dist/lib/strip.js.map +1 -1
- package/dist/lib/style.d.ts +8 -2
- package/dist/lib/style.d.ts.map +1 -1
- package/dist/lib/style.js +24 -17
- package/dist/lib/style.js.map +1 -1
- package/dist/lib/update-check.d.ts +3 -2
- package/dist/lib/update-check.d.ts.map +1 -1
- package/dist/lib/update-check.js +10 -4
- package/dist/lib/update-check.js.map +1 -1
- package/dist/lib/workspaceNotice.d.ts +202 -0
- package/dist/lib/workspaceNotice.d.ts.map +1 -0
- package/dist/lib/workspaceNotice.js +345 -0
- package/dist/lib/workspaceNotice.js.map +1 -0
- package/dist/lib/writePerimeter.d.ts +72 -0
- package/dist/lib/writePerimeter.d.ts.map +1 -0
- package/dist/lib/writePerimeter.js +128 -0
- package/dist/lib/writePerimeter.js.map +1 -0
- package/dist/registerEntryCommands.d.ts +18 -0
- package/dist/registerEntryCommands.d.ts.map +1 -0
- package/dist/registerEntryCommands.js +122 -0
- package/dist/registerEntryCommands.js.map +1 -0
- package/dist/registerHistoryCommand.d.ts +8 -0
- package/dist/registerHistoryCommand.d.ts.map +1 -0
- package/dist/registerHistoryCommand.js +14 -0
- package/dist/registerHistoryCommand.js.map +1 -0
- package/dist/registerOutcomeCommands.d.ts +27 -0
- package/dist/registerOutcomeCommands.d.ts.map +1 -0
- package/dist/registerOutcomeCommands.js +27 -0
- package/dist/registerOutcomeCommands.js.map +1 -0
- package/dist/registerRoleCommands.d.ts +11 -0
- package/dist/registerRoleCommands.d.ts.map +1 -0
- package/dist/registerRoleCommands.js +42 -0
- package/dist/registerRoleCommands.js.map +1 -0
- package/dist/registerTensionsCommands.d.ts +10 -0
- package/dist/registerTensionsCommands.d.ts.map +1 -0
- package/dist/registerTensionsCommands.js +15 -0
- package/dist/registerTensionsCommands.js.map +1 -0
- package/dist/scoreboard/diagnose.d.ts +185 -0
- package/dist/scoreboard/diagnose.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.js +282 -0
- package/dist/scoreboard/diagnose.js.map +1 -0
- package/dist/scoreboard/diagnose.test.d.ts +15 -0
- package/dist/scoreboard/diagnose.test.d.ts.map +1 -0
- package/dist/scoreboard/diagnose.test.js +288 -0
- package/dist/scoreboard/diagnose.test.js.map +1 -0
- package/dist/scoreboard/floors.d.ts +47 -0
- package/dist/scoreboard/floors.d.ts.map +1 -0
- package/dist/scoreboard/floors.js +33 -0
- package/dist/scoreboard/floors.js.map +1 -0
- package/dist/scoreboard/localDrift.d.ts +23 -0
- package/dist/scoreboard/localDrift.d.ts.map +1 -0
- package/dist/scoreboard/localDrift.js +111 -0
- package/dist/scoreboard/localDrift.js.map +1 -0
- package/dist/scoreboard/localDrift.test.d.ts +9 -0
- package/dist/scoreboard/localDrift.test.d.ts.map +1 -0
- package/dist/scoreboard/localDrift.test.js +82 -0
- package/dist/scoreboard/localDrift.test.js.map +1 -0
- package/dist/surfaces/__tests__/adapter.test.js +2 -6
- package/dist/surfaces/__tests__/adapter.test.js.map +1 -1
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.d.ts +2 -0
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.d.ts.map +1 -0
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.js +179 -0
- package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.js.map +1 -0
- package/dist/surfaces/adapters/claude.d.ts.map +1 -1
- package/dist/surfaces/adapters/claude.js +30 -25
- package/dist/surfaces/adapters/claude.js.map +1 -1
- package/dist/surfaces/registry.js +1 -1
- package/dist/surfaces/registry.js.map +1 -1
- package/package.json +9 -8
- package/dist/__tests__/audit.test.d.ts +0 -2
- package/dist/__tests__/audit.test.d.ts.map +0 -1
- package/dist/__tests__/audit.test.js +0 -399
- package/dist/__tests__/audit.test.js.map +0 -1
- package/dist/__tests__/authority-domains.test.d.ts +0 -2
- package/dist/__tests__/authority-domains.test.d.ts.map +0 -1
- package/dist/__tests__/authority-domains.test.js +0 -48
- package/dist/__tests__/authority-domains.test.js.map +0 -1
- package/dist/__tests__/ingest.test.d.ts +0 -2
- package/dist/__tests__/ingest.test.d.ts.map +0 -1
- package/dist/__tests__/ingest.test.js +0 -185
- package/dist/__tests__/ingest.test.js.map +0 -1
- package/dist/__tests__/onboarding-path-b.test.d.ts +0 -2
- package/dist/__tests__/onboarding-path-b.test.d.ts.map +0 -1
- package/dist/__tests__/onboarding-path-b.test.js +0 -46
- package/dist/__tests__/onboarding-path-b.test.js.map +0 -1
- package/dist/__tests__/onboarding.test.d.ts +0 -6
- package/dist/__tests__/onboarding.test.d.ts.map +0 -1
- package/dist/__tests__/onboarding.test.js +0 -347
- package/dist/__tests__/onboarding.test.js.map +0 -1
- package/dist/__tests__/promote.test.d.ts +0 -2
- package/dist/__tests__/promote.test.d.ts.map +0 -1
- package/dist/__tests__/promote.test.js +0 -230
- package/dist/__tests__/promote.test.js.map +0 -1
- package/dist/__tests__/proposals.test.d.ts +0 -2
- package/dist/__tests__/proposals.test.d.ts.map +0 -1
- package/dist/__tests__/proposals.test.js +0 -167
- package/dist/__tests__/proposals.test.js.map +0 -1
- package/dist/__tests__/setup-ingest.test.d.ts +0 -2
- package/dist/__tests__/setup-ingest.test.d.ts.map +0 -1
- package/dist/__tests__/setup-ingest.test.js +0 -71
- package/dist/__tests__/setup-ingest.test.js.map +0 -1
- package/dist/__tests__/setup-resolver.test.d.ts +0 -14
- package/dist/__tests__/setup-resolver.test.d.ts.map +0 -1
- package/dist/__tests__/setup-resolver.test.js +0 -228
- package/dist/__tests__/setup-resolver.test.js.map +0 -1
- package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts +0 -15
- package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts.map +0 -1
- package/dist/commands/__tests__/setup-detect-surfaces.test.js +0 -149
- package/dist/commands/__tests__/setup-detect-surfaces.test.js.map +0 -1
- package/dist/commands/__tests__/setup-state.test.d.ts +0 -2
- package/dist/commands/__tests__/setup-state.test.d.ts.map +0 -1
- package/dist/commands/__tests__/setup-state.test.js +0 -194
- package/dist/commands/__tests__/setup-state.test.js.map +0 -1
- package/dist/commands/accept.d.ts +0 -18
- package/dist/commands/accept.d.ts.map +0 -1
- package/dist/commands/accept.js +0 -76
- package/dist/commands/accept.js.map +0 -1
- package/dist/commands/audit.d.ts +0 -25
- package/dist/commands/audit.d.ts.map +0 -1
- package/dist/commands/audit.js +0 -215
- package/dist/commands/audit.js.map +0 -1
- package/dist/commands/authority-domains.d.ts +0 -146
- package/dist/commands/authority-domains.d.ts.map +0 -1
- package/dist/commands/authority-domains.js +0 -283
- package/dist/commands/authority-domains.js.map +0 -1
- package/dist/commands/brand-pack.d.ts +0 -2
- package/dist/commands/brand-pack.d.ts.map +0 -1
- package/dist/commands/brand-pack.js +0 -25
- package/dist/commands/brand-pack.js.map +0 -1
- package/dist/commands/ingest.d.ts +0 -14
- package/dist/commands/ingest.d.ts.map +0 -1
- package/dist/commands/ingest.js +0 -189
- package/dist/commands/ingest.js.map +0 -1
- package/dist/commands/method.d.ts +0 -99
- package/dist/commands/method.d.ts.map +0 -1
- package/dist/commands/method.js +0 -785
- package/dist/commands/method.js.map +0 -1
- package/dist/commands/migrate-setup.d.ts +0 -18
- package/dist/commands/migrate-setup.d.ts.map +0 -1
- package/dist/commands/migrate-setup.js +0 -198
- package/dist/commands/migrate-setup.js.map +0 -1
- package/dist/commands/promote.d.ts +0 -12
- package/dist/commands/promote.d.ts.map +0 -1
- package/dist/commands/promote.js +0 -113
- package/dist/commands/promote.js.map +0 -1
- package/dist/commands/proposals.d.ts +0 -9
- package/dist/commands/proposals.d.ts.map +0 -1
- package/dist/commands/proposals.js +0 -24
- package/dist/commands/proposals.js.map +0 -1
- package/dist/commands/reject.d.ts +0 -14
- package/dist/commands/reject.d.ts.map +0 -1
- package/dist/commands/reject.js +0 -44
- package/dist/commands/reject.js.map +0 -1
- package/dist/commands/setup-audit.d.ts +0 -59
- package/dist/commands/setup-audit.d.ts.map +0 -1
- package/dist/commands/setup-audit.js +0 -250
- package/dist/commands/setup-audit.js.map +0 -1
- package/dist/commands/setup-detect-surfaces.d.ts +0 -38
- package/dist/commands/setup-detect-surfaces.d.ts.map +0 -1
- package/dist/commands/setup-detect-surfaces.js +0 -76
- package/dist/commands/setup-detect-surfaces.js.map +0 -1
- package/dist/commands/setup-ingest.d.ts +0 -17
- package/dist/commands/setup-ingest.d.ts.map +0 -1
- package/dist/commands/setup-ingest.js +0 -226
- package/dist/commands/setup-ingest.js.map +0 -1
- package/dist/commands/setup-resolver.d.ts +0 -58
- package/dist/commands/setup-resolver.d.ts.map +0 -1
- package/dist/commands/setup-resolver.js +0 -150
- package/dist/commands/setup-resolver.js.map +0 -1
- package/dist/commands/setup-state.d.ts +0 -42
- package/dist/commands/setup-state.d.ts.map +0 -1
- package/dist/commands/setup-state.js +0 -93
- package/dist/commands/setup-state.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -23
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -69
- package/dist/commands/setup.js.map +0 -1
- package/dist/formatters/audit.d.ts +0 -52
- package/dist/formatters/audit.d.ts.map +0 -1
- package/dist/formatters/audit.js +0 -81
- package/dist/formatters/audit.js.map +0 -1
- package/dist/formatters/promote.d.ts +0 -30
- package/dist/formatters/promote.d.ts.map +0 -1
- package/dist/formatters/promote.js +0 -39
- package/dist/formatters/promote.js.map +0 -1
- package/dist/formatters/proposals.d.ts +0 -45
- package/dist/formatters/proposals.d.ts.map +0 -1
- package/dist/formatters/proposals.js +0 -62
- package/dist/formatters/proposals.js.map +0 -1
- package/dist/generators/archetypes.d.ts +0 -52
- package/dist/generators/archetypes.d.ts.map +0 -1
- package/dist/generators/archetypes.js +0 -153
- package/dist/generators/archetypes.js.map +0 -1
- package/dist/generators/archetypes.test.d.ts +0 -2
- package/dist/generators/archetypes.test.d.ts.map +0 -1
- package/dist/generators/archetypes.test.js +0 -237
- package/dist/generators/archetypes.test.js.map +0 -1
- package/dist/generators/chain-classifier.d.ts +0 -49
- package/dist/generators/chain-classifier.d.ts.map +0 -1
- package/dist/generators/chain-classifier.js +0 -180
- package/dist/generators/chain-classifier.js.map +0 -1
- package/dist/generators/chain-classifier.test.d.ts +0 -2
- package/dist/generators/chain-classifier.test.d.ts.map +0 -1
- package/dist/generators/chain-classifier.test.js +0 -257
- package/dist/generators/chain-classifier.test.js.map +0 -1
- package/dist/generators/chain-rules.d.ts +0 -42
- package/dist/generators/chain-rules.d.ts.map +0 -1
- package/dist/generators/chain-rules.js +0 -144
- package/dist/generators/chain-rules.js.map +0 -1
- package/dist/generators/chain-rules.test.d.ts +0 -2
- package/dist/generators/chain-rules.test.d.ts.map +0 -1
- package/dist/generators/chain-rules.test.js +0 -179
- package/dist/generators/chain-rules.test.js.map +0 -1
- package/dist/generators/handshake-diff.d.ts +0 -67
- package/dist/generators/handshake-diff.d.ts.map +0 -1
- package/dist/generators/handshake-diff.js +0 -183
- package/dist/generators/handshake-diff.js.map +0 -1
- package/dist/generators/handshake-diff.test.d.ts +0 -2
- package/dist/generators/handshake-diff.test.d.ts.map +0 -1
- package/dist/generators/handshake-diff.test.js +0 -264
- package/dist/generators/handshake-diff.test.js.map +0 -1
- package/dist/lib/activation.d.ts +0 -28
- package/dist/lib/activation.d.ts.map +0 -1
- package/dist/lib/activation.js +0 -57
- package/dist/lib/activation.js.map +0 -1
- package/dist/lib/activation.test.d.ts +0 -6
- package/dist/lib/activation.test.d.ts.map +0 -1
- package/dist/lib/activation.test.js +0 -121
- package/dist/lib/activation.test.js.map +0 -1
- package/dist/lib/collectionRegistry.d.ts +0 -38
- package/dist/lib/collectionRegistry.d.ts.map +0 -1
- package/dist/lib/collectionRegistry.js +0 -112
- package/dist/lib/collectionRegistry.js.map +0 -1
- package/dist/lib/conversation-engine.d.ts +0 -45
- package/dist/lib/conversation-engine.d.ts.map +0 -1
- package/dist/lib/conversation-engine.js +0 -112
- package/dist/lib/conversation-engine.js.map +0 -1
- package/dist/lib/conversation-phases.d.ts +0 -59
- package/dist/lib/conversation-phases.d.ts.map +0 -1
- package/dist/lib/conversation-phases.js +0 -11
- package/dist/lib/conversation-phases.js.map +0 -1
- package/dist/lib/conversation-signals.d.ts +0 -30
- package/dist/lib/conversation-signals.d.ts.map +0 -1
- package/dist/lib/conversation-signals.js +0 -64
- package/dist/lib/conversation-signals.js.map +0 -1
- package/dist/lib/inferSourceDate.d.ts +0 -12
- package/dist/lib/inferSourceDate.d.ts.map +0 -1
- package/dist/lib/inferSourceDate.js +0 -44
- package/dist/lib/inferSourceDate.js.map +0 -1
- package/dist/lib/onboarding-path-b.d.ts +0 -10
- package/dist/lib/onboarding-path-b.d.ts.map +0 -1
- package/dist/lib/onboarding-path-b.js +0 -213
- package/dist/lib/onboarding-path-b.js.map +0 -1
- package/dist/lib/onboarding-shared.d.ts +0 -80
- package/dist/lib/onboarding-shared.d.ts.map +0 -1
- package/dist/lib/onboarding-shared.js +0 -174
- package/dist/lib/onboarding-shared.js.map +0 -1
- package/dist/lib/onboarding-topics.d.ts +0 -27
- package/dist/lib/onboarding-topics.d.ts.map +0 -1
- package/dist/lib/onboarding-topics.js +0 -57
- package/dist/lib/onboarding-topics.js.map +0 -1
- package/dist/lib/onboarding.d.ts +0 -17
- package/dist/lib/onboarding.d.ts.map +0 -1
- package/dist/lib/onboarding.js +0 -350
- package/dist/lib/onboarding.js.map +0 -1
- package/dist/setup/__tests__/coach-traces.test.d.ts +0 -2
- package/dist/setup/__tests__/coach-traces.test.d.ts.map +0 -1
- package/dist/setup/__tests__/coach-traces.test.js +0 -189
- package/dist/setup/__tests__/coach-traces.test.js.map +0 -1
- package/dist/setup/__tests__/setup-commands.test.d.ts +0 -2
- package/dist/setup/__tests__/setup-commands.test.d.ts.map +0 -1
- package/dist/setup/__tests__/setup-commands.test.js +0 -177
- package/dist/setup/__tests__/setup-commands.test.js.map +0 -1
- package/dist/setup/__tests__/state-machine.test.d.ts +0 -2
- package/dist/setup/__tests__/state-machine.test.d.ts.map +0 -1
- package/dist/setup/__tests__/state-machine.test.js +0 -341
- package/dist/setup/__tests__/state-machine.test.js.map +0 -1
- package/dist/setup/detect-surfaces.d.ts +0 -21
- package/dist/setup/detect-surfaces.d.ts.map +0 -1
- package/dist/setup/detect-surfaces.js +0 -39
- package/dist/setup/detect-surfaces.js.map +0 -1
- package/dist/setup/manifest-writer.d.ts +0 -17
- package/dist/setup/manifest-writer.d.ts.map +0 -1
- package/dist/setup/manifest-writer.js +0 -153
- package/dist/setup/manifest-writer.js.map +0 -1
- package/dist/setup/perimeter.d.ts +0 -72
- package/dist/setup/perimeter.d.ts.map +0 -1
- package/dist/setup/perimeter.js +0 -128
- package/dist/setup/perimeter.js.map +0 -1
- package/dist/setup/state-machine.d.ts +0 -67
- package/dist/setup/state-machine.d.ts.map +0 -1
- package/dist/setup/state-machine.js +0 -124
- package/dist/setup/state-machine.js.map +0 -1
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts +0 -2
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts.map +0 -1
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.js +0 -132
- package/dist/surfaces/__tests__/pb-setup-passthrough.test.js.map +0 -1
- package/templates/archetypes/boundary.md +0 -23
- package/templates/archetypes/constraint.md +0 -23
- package/templates/archetypes/convention.md +0 -23
- package/templates/archetypes/policy.md +0 -23
- package/templates/archetypes/quality-gate.md +0 -23
- package/templates/archetypes/workflow.md +0 -23
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* pb capture extensions — --link, --json flags, WP-319 grounding.
|
|
3
3
|
* TEN-341 test contract: capture --link calls createEntryRelation, capture --json outputs JSON.
|
|
4
|
-
*
|
|
4
|
+
* TASK-894 (DEC-2113): one chain.createEntry per capture; the kernel's verdict rides the reply.
|
|
5
5
|
*/
|
|
6
6
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
7
7
|
import { runCapture } from '../commands/capture.js';
|
|
8
|
+
import { formatCaptureReceipt } from '../formatters/capture.js';
|
|
9
|
+
import { CLIError, ErrorCode } from '../lib/errors.js';
|
|
10
|
+
import { setOutputMode } from '../lib/runner.js';
|
|
8
11
|
const kernelCallWithSessionMock = vi.fn();
|
|
9
12
|
vi.mock('../lib/client.js', () => ({
|
|
10
13
|
kernelCallWithSession: (...args) => kernelCallWithSessionMock(...args),
|
|
@@ -22,54 +25,565 @@ describe('runCapture --link', () => {
|
|
|
22
25
|
kernelCallWithSessionMock.mockReset();
|
|
23
26
|
mockSession = { sessionId: 'sess-test' };
|
|
24
27
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// WP-688 S4 (TASK-105, element 11): --link with no --link-type no longer defaults to
|
|
29
|
+
// surfaces_tension_in — it refuses instead. The capture itself still succeeds (createEntry
|
|
30
|
+
// ran for real); only the relation write is skipped, replaced by a PREVIEW probe used to
|
|
31
|
+
// list the source entry's legal verbs in the refusal message.
|
|
32
|
+
it('--link without --link-type refuses (no default), preserving the created entry', async () => {
|
|
33
|
+
kernelCallWithSessionMock.mockImplementation((fn, args) => {
|
|
30
34
|
if (fn === 'chain.createEntry')
|
|
31
35
|
return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-710' });
|
|
32
|
-
if (fn === 'chain.
|
|
33
|
-
|
|
36
|
+
if (fn === 'chain.getEntry') {
|
|
37
|
+
const entryId = args?.entryId;
|
|
38
|
+
if (entryId === 'TEN-710')
|
|
39
|
+
return Promise.resolve({ entryId: 'TEN-710', name: 'x', status: 'draft', canonicalKey: 'tension' });
|
|
40
|
+
return Promise.resolve(null);
|
|
41
|
+
}
|
|
42
|
+
// bdABL: the type row is resolved by scanning the semantic-types collection and
|
|
43
|
+
// matching on data.canonical_key — NOT by guessing entryId === `TYPE-<key>`. This
|
|
44
|
+
// row deliberately uses a non-conventional entryId (`ST-1`) to prove that.
|
|
45
|
+
if (fn === 'chain.listEntries') {
|
|
46
|
+
return Promise.resolve([{ entryId: 'ST-1', name: 'tension', status: 'active', data: { canonical_key: 'tension', valid_relation_types: ['related_to', 'depends_on', 'surfaces_tension_in'], description: 'x', cardinality_rule: 'multiple' } }]);
|
|
47
|
+
}
|
|
34
48
|
return Promise.resolve({});
|
|
35
49
|
});
|
|
36
50
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
37
|
-
await runCapture({ text: 'TEN: missing validation', link: 'BET-151' });
|
|
38
|
-
//
|
|
39
|
-
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
|
|
40
|
-
// Verify prefix was stripped from entry name and routed to correct collection
|
|
51
|
+
await expect(runCapture({ text: 'TEN: missing validation', link: 'BET-151' })).rejects.toThrow(CLIError);
|
|
52
|
+
// The entry was created for real — only the LINK is refused. TASK-894: the text goes as typed; the kernel routes the prefix.
|
|
41
53
|
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
|
|
42
|
-
|
|
43
|
-
name: 'missing validation',
|
|
54
|
+
name: 'TEN: missing validation',
|
|
44
55
|
}));
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
// Legal verbs are READ by scanning the semantic-types collection (chain.listEntries)
|
|
57
|
+
// and matching data.canonical_key — the same resolution loadTypeMap itself uses,
|
|
58
|
+
// never a probe, never a guessed entryId.
|
|
59
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.getEntry', { entryId: 'TEN-710' });
|
|
60
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.listEntries', { collectionSlug: 'semantic-types' });
|
|
61
|
+
// Never a createEntryRelation call at all — a real write, preview, or probe.
|
|
62
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntryRelation', expect.anything());
|
|
63
|
+
writeSpy.mockRestore();
|
|
64
|
+
});
|
|
65
|
+
it('--link without --link-type: refusal message lists the source entry\'s declared relation types', async () => {
|
|
66
|
+
kernelCallWithSessionMock.mockImplementation((fn, args) => {
|
|
67
|
+
if (fn === 'chain.createEntry')
|
|
68
|
+
return Promise.resolve({ docId: 'doc-1b', entryId: 'TEN-711' });
|
|
69
|
+
if (fn === 'chain.getEntry') {
|
|
70
|
+
const entryId = args?.entryId;
|
|
71
|
+
if (entryId === 'TEN-711')
|
|
72
|
+
return Promise.resolve({ entryId: 'TEN-711', name: 'x', status: 'draft', canonicalKey: 'tension' });
|
|
73
|
+
// bcRUMR: the target must actually resolve for this test to exercise the
|
|
74
|
+
// pb-relate-guidance branch rather than the target-missing branch.
|
|
75
|
+
if (entryId === 'BET-151')
|
|
76
|
+
return Promise.resolve({ entryId: 'BET-151', name: 'y', status: 'active', canonicalKey: 'work_package' });
|
|
77
|
+
return Promise.resolve(null);
|
|
78
|
+
}
|
|
79
|
+
if (fn === 'chain.listEntries') {
|
|
80
|
+
return Promise.resolve([{ entryId: 'TYPE-tension', name: 'tension', status: 'active', data: { canonical_key: 'tension', valid_relation_types: ['related_to', 'depends_on', 'surfaces_tension_in'], description: 'x', cardinality_rule: 'multiple' } }]);
|
|
81
|
+
}
|
|
82
|
+
return Promise.resolve({});
|
|
83
|
+
});
|
|
84
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
85
|
+
let caught;
|
|
86
|
+
try {
|
|
87
|
+
await runCapture({ text: 'TEN: missing validation', link: 'BET-151' });
|
|
88
|
+
}
|
|
89
|
+
catch (e) {
|
|
90
|
+
caught = e;
|
|
91
|
+
}
|
|
92
|
+
writeSpy.mockRestore();
|
|
93
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
94
|
+
expect(caught?.code).toBe(ErrorCode.VALIDATION_FAILED);
|
|
95
|
+
expect(caught?.message).toContain('related_to, depends_on, surfaces_tension_in');
|
|
96
|
+
expect(caught?.guidance).toContain('TEN-711');
|
|
97
|
+
expect(caught?.guidance).toContain('pb relate TEN-711');
|
|
98
|
+
});
|
|
99
|
+
// WP-688 S4 review round 5 (bcRUML): a whitespace-only --link must not silently no-op —
|
|
100
|
+
// the entry still gets created, but the link itself must be explicitly refused.
|
|
101
|
+
it('--link " " (whitespace-only) refuses instead of silently dropping the link', async () => {
|
|
102
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
103
|
+
if (fn === 'chain.createEntry')
|
|
104
|
+
return Promise.resolve({ docId: 'doc-ws', entryId: 'TEN-720' });
|
|
105
|
+
return Promise.resolve({});
|
|
106
|
+
});
|
|
107
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
108
|
+
let caught;
|
|
109
|
+
try {
|
|
110
|
+
await runCapture({ text: 'TEN: whitespace link', link: ' ' });
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
caught = e;
|
|
114
|
+
}
|
|
115
|
+
writeSpy.mockRestore();
|
|
116
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
117
|
+
expect(caught?.message).toContain('--link requires a non-empty entry ID');
|
|
118
|
+
// Never a relate/probe call — the target never resolved to anything real.
|
|
119
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntryRelation', expect.anything());
|
|
120
|
+
});
|
|
121
|
+
// WP-688 S4 review round 5 (bcRpJQ): --link "" is falsy at the outer `if (options.link)` —
|
|
122
|
+
// must check `!== undefined` instead, or this whole block (and the bcRUML refusal) never runs.
|
|
123
|
+
it('--link "" (empty string) refuses instead of silently dropping the link', async () => {
|
|
124
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
125
|
+
if (fn === 'chain.createEntry')
|
|
126
|
+
return Promise.resolve({ docId: 'doc-empty', entryId: 'TEN-722' });
|
|
127
|
+
return Promise.resolve({});
|
|
128
|
+
});
|
|
129
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
130
|
+
let caught;
|
|
131
|
+
try {
|
|
132
|
+
await runCapture({ text: 'TEN: empty link', link: '' });
|
|
133
|
+
}
|
|
134
|
+
catch (e) {
|
|
135
|
+
caught = e;
|
|
136
|
+
}
|
|
137
|
+
writeSpy.mockRestore();
|
|
138
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
139
|
+
expect(caught?.message).toContain('--link requires a non-empty entry ID');
|
|
140
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntryRelation', expect.anything());
|
|
141
|
+
});
|
|
142
|
+
// WP-688 S4 review round 5 (bcRUMR): the target entry doesn't exist — the recovery
|
|
143
|
+
// guidance must say so rather than recommending `pb relate <verb> <missing-id>`.
|
|
144
|
+
it('--link <missing-id> without --link-type reports the target was not found, not a verb-recovery command', async () => {
|
|
145
|
+
kernelCallWithSessionMock.mockImplementation((fn, args) => {
|
|
146
|
+
if (fn === 'chain.createEntry')
|
|
147
|
+
return Promise.resolve({ docId: 'doc-miss', entryId: 'TEN-721' });
|
|
148
|
+
if (fn === 'chain.getEntry') {
|
|
149
|
+
const entryId = args?.entryId;
|
|
150
|
+
if (entryId === 'TEN-721')
|
|
151
|
+
return Promise.resolve({ entryId: 'TEN-721', name: 'x', status: 'draft', canonicalKey: 'tension' });
|
|
152
|
+
return Promise.resolve(null); // GHOST-1 does not exist
|
|
153
|
+
}
|
|
154
|
+
if (fn === 'chain.listEntries') {
|
|
155
|
+
return Promise.resolve([{ entryId: 'TYPE-tension', name: 'tension', status: 'active', data: { canonical_key: 'tension', valid_relation_types: ['informs'], description: 'x', cardinality_rule: 'multiple' } }]);
|
|
156
|
+
}
|
|
157
|
+
return Promise.resolve({});
|
|
158
|
+
});
|
|
159
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
160
|
+
let caught;
|
|
161
|
+
try {
|
|
162
|
+
await runCapture({ text: 'TEN: bad target', link: 'GHOST-1' });
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
caught = e;
|
|
166
|
+
}
|
|
167
|
+
writeSpy.mockRestore();
|
|
168
|
+
expect(caught?.guidance).toContain('not found');
|
|
169
|
+
expect(caught?.guidance).toContain('GHOST-1');
|
|
170
|
+
expect(caught?.guidance).not.toContain('pb relate');
|
|
171
|
+
});
|
|
172
|
+
// WP-688 S4 review round 3 (bc4Pj): `replaces`/`do_not_confuse_with` are declared for
|
|
173
|
+
// scoring but hard-refused at the generic relate door with a DIFFERENT recovery command
|
|
174
|
+
// (setSupersededBy / addDoNotConfuseWith, guards.ts:308-321) — listing them as usable via
|
|
175
|
+
// `pb relate` would name a guaranteed-to-fail re-run.
|
|
176
|
+
it('excludes replaces and do_not_confuse_with from the refusal\'s legal-verb list (both are door-blocked)', async () => {
|
|
177
|
+
kernelCallWithSessionMock.mockImplementation((fn, args) => {
|
|
178
|
+
if (fn === 'chain.createEntry')
|
|
179
|
+
return Promise.resolve({ docId: 'doc-1c', entryId: 'DEC-1' });
|
|
180
|
+
if (fn === 'chain.getEntry') {
|
|
181
|
+
const entryId = args?.entryId;
|
|
182
|
+
if (entryId === 'DEC-1')
|
|
183
|
+
return Promise.resolve({ entryId: 'DEC-1', name: 'x', status: 'draft', canonicalKey: 'decision' });
|
|
184
|
+
return Promise.resolve(null);
|
|
185
|
+
}
|
|
186
|
+
if (fn === 'chain.listEntries') {
|
|
187
|
+
return Promise.resolve([{ entryId: 'TYPE-decision', name: 'decision', status: 'active', data: { canonical_key: 'decision', valid_relation_types: ['informs', 'governs', 'replaces', 'conflicts_with'], description: 'x', cardinality_rule: 'multiple' } }]);
|
|
188
|
+
}
|
|
189
|
+
return Promise.resolve({});
|
|
190
|
+
});
|
|
191
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
192
|
+
let caught;
|
|
193
|
+
try {
|
|
194
|
+
await runCapture({ text: 'DEC: no link-type', link: 'STD-1' });
|
|
195
|
+
}
|
|
196
|
+
catch (e) {
|
|
197
|
+
caught = e;
|
|
198
|
+
}
|
|
199
|
+
writeSpy.mockRestore();
|
|
200
|
+
expect(caught?.message).toContain('informs, governs, conflicts_with');
|
|
201
|
+
expect(caught?.message).not.toContain('replaces');
|
|
202
|
+
});
|
|
203
|
+
// WP-688 S4 review round 5 (bdB5K): a type's declared valid_relation_types may name a verb outside
|
|
204
|
+
// the kernel ALLOWED_RELATION_TYPES allowlist. guardRelation still refuses it (guards.ts:302-307),
|
|
205
|
+
// so it must never be listed as a `pb relate`-usable recovery verb.
|
|
206
|
+
it('excludes a declared verb outside the kernel allowlist from the refusal\'s legal-verb list', async () => {
|
|
207
|
+
kernelCallWithSessionMock.mockImplementation((fn, args) => {
|
|
208
|
+
if (fn === 'chain.createEntry')
|
|
209
|
+
return Promise.resolve({ docId: 'doc-1d', entryId: 'GOAL-1' });
|
|
210
|
+
if (fn === 'chain.getEntry') {
|
|
211
|
+
const entryId = args?.entryId;
|
|
212
|
+
if (entryId === 'GOAL-1')
|
|
213
|
+
return Promise.resolve({ entryId: 'GOAL-1', name: 'x', status: 'draft', canonicalKey: 'goal' });
|
|
214
|
+
return Promise.resolve(null);
|
|
215
|
+
}
|
|
216
|
+
if (fn === 'chain.listEntries') {
|
|
217
|
+
return Promise.resolve([{ entryId: 'TYPE-goal', name: 'goal', status: 'active', data: { canonical_key: 'goal', valid_relation_types: ['informs', 'depends_on', 'custom_hand_added'], description: 'x', cardinality_rule: 'multiple' } }]);
|
|
218
|
+
}
|
|
219
|
+
return Promise.resolve({});
|
|
49
220
|
});
|
|
221
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
222
|
+
let caught;
|
|
223
|
+
try {
|
|
224
|
+
await runCapture({ text: 'GOAL: no link-type', link: 'BET-1' });
|
|
225
|
+
}
|
|
226
|
+
catch (e) {
|
|
227
|
+
caught = e;
|
|
228
|
+
}
|
|
50
229
|
writeSpy.mockRestore();
|
|
230
|
+
expect(caught?.message).toContain('informs, depends_on');
|
|
231
|
+
expect(caught?.message).not.toContain('custom_hand_added');
|
|
51
232
|
});
|
|
52
|
-
|
|
53
|
-
|
|
233
|
+
// WP-688 S4 review round 5 (cQFZ_): belongs_to/authority_domain toward a domain-tagged
|
|
234
|
+
// target require ratification metadata (stagingEntryId + source) that `pb relate` cannot
|
|
235
|
+
// supply (guards.ts:349-363) — never recommend them as recovery verbs for such a target.
|
|
236
|
+
it('excludes domain-tag verbs from the refusal\'s legal-verb list when the target is a domain', async () => {
|
|
237
|
+
kernelCallWithSessionMock.mockImplementation((fn, args) => {
|
|
238
|
+
if (fn === 'chain.createEntry')
|
|
239
|
+
return Promise.resolve({ docId: 'doc-1e', entryId: 'INS-1' });
|
|
240
|
+
if (fn === 'chain.getEntry') {
|
|
241
|
+
const entryId = args?.entryId;
|
|
242
|
+
if (entryId === 'INS-1')
|
|
243
|
+
return Promise.resolve({ entryId: 'INS-1', name: 'x', status: 'draft', canonicalKey: 'insight' });
|
|
244
|
+
if (entryId === 'DOM-1')
|
|
245
|
+
return Promise.resolve({ entryId: 'DOM-1', name: 'product-design', status: 'active', canonicalKey: 'domain' });
|
|
246
|
+
return Promise.resolve(null);
|
|
247
|
+
}
|
|
248
|
+
if (fn === 'chain.listEntries') {
|
|
249
|
+
return Promise.resolve([{ entryId: 'TYPE-insight', name: 'insight', status: 'active', data: { canonical_key: 'insight', valid_relation_types: ['informs', 'belongs_to', 'authority_domain'], description: 'x', cardinality_rule: 'multiple' } }]);
|
|
250
|
+
}
|
|
251
|
+
return Promise.resolve({});
|
|
252
|
+
});
|
|
253
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
254
|
+
let caught;
|
|
255
|
+
try {
|
|
256
|
+
await runCapture({ text: 'INS: no link-type', link: 'DOM-1' });
|
|
257
|
+
}
|
|
258
|
+
catch (e) {
|
|
259
|
+
caught = e;
|
|
260
|
+
}
|
|
261
|
+
writeSpy.mockRestore();
|
|
262
|
+
expect(caught?.message).toContain('Legal relation types for this entry: informs.');
|
|
263
|
+
expect(caught?.message).not.toContain('belongs_to');
|
|
264
|
+
expect(caught?.message).not.toContain('authority_domain');
|
|
265
|
+
});
|
|
266
|
+
it('uses the supplied relation type when --link-type provided (no probe, real write)', async () => {
|
|
54
267
|
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
55
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
56
|
-
return Promise.resolve([]);
|
|
57
268
|
if (fn === 'chain.createEntry')
|
|
58
269
|
return Promise.resolve({ docId: 'doc-2', entryId: 'INS-50' });
|
|
59
270
|
if (fn === 'chain.createEntryRelation')
|
|
60
|
-
return Promise.resolve({});
|
|
271
|
+
return Promise.resolve({ relationId: 'rel-1' });
|
|
61
272
|
return Promise.resolve({});
|
|
62
273
|
});
|
|
63
274
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
64
|
-
await runCapture({ text: 'INS: discovered X', link: 'DEC-264',
|
|
65
|
-
|
|
275
|
+
await runCapture({ text: 'INS: discovered X', link: 'DEC-264', linkType: 'informed_by' });
|
|
276
|
+
// A REAL (non-preview) write — the exact verb supplied, echoed verbatim, no probe call.
|
|
66
277
|
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntryRelation', {
|
|
67
278
|
fromEntryId: 'INS-50',
|
|
68
279
|
toEntryId: 'DEC-264',
|
|
69
280
|
type: 'informed_by',
|
|
70
281
|
});
|
|
282
|
+
const previewCalls = kernelCallWithSessionMock.mock.calls.filter(([fn, args]) => fn === 'chain.createEntryRelation' && args?.preview);
|
|
283
|
+
expect(previewCalls).toHaveLength(0);
|
|
71
284
|
writeSpy.mockRestore();
|
|
72
285
|
});
|
|
286
|
+
// WP-745 review (Codex P1): a relate-door refusal (e.g. REL-LEGAL-2) at the --link-type
|
|
287
|
+
// branch must not escape as an unhandled rejection — the entry above was ALREADY persisted,
|
|
288
|
+
// so the capture reports it, naming only the link as refused (same shape as the
|
|
289
|
+
// --link-without---link-type branch above).
|
|
290
|
+
it('a relate-door refusal during --link is deferred, naming the persisted entry — never an unhandled rejection', async () => {
|
|
291
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
292
|
+
if (fn === 'chain.createEntry')
|
|
293
|
+
return Promise.resolve({ docId: 'doc-wp', entryId: 'WP-6' });
|
|
294
|
+
if (fn === 'chain.createEntryRelation') {
|
|
295
|
+
return Promise.reject(Object.assign(new Error('A work package is never part_of another work package — capture the smaller piece as a task and relate it part_of this work package.'), { name: 'McpError' }));
|
|
296
|
+
}
|
|
297
|
+
return Promise.resolve({});
|
|
298
|
+
});
|
|
299
|
+
let caught;
|
|
300
|
+
try {
|
|
301
|
+
await runCapture({ text: 'WP: child work package', link: 'WP-5', linkType: 'part_of' });
|
|
302
|
+
}
|
|
303
|
+
catch (e) {
|
|
304
|
+
caught = e;
|
|
305
|
+
}
|
|
306
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
307
|
+
expect(caught?.message).toContain('A work package is never part_of another work package');
|
|
308
|
+
expect(caught?.guidance).toContain('WP-6 was captured');
|
|
309
|
+
expect(caught?.guidance).toContain('only the link was refused');
|
|
310
|
+
});
|
|
311
|
+
// WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0CCc): a NON-REL-LEGAL-2 relate-door
|
|
312
|
+
// failure (auth denial, rate limit) must keep its OWN code/category — the earlier fix
|
|
313
|
+
// unconditionally relabeled every deferred link failure VALIDATION_FAILED, discarding the
|
|
314
|
+
// real error's identity.
|
|
315
|
+
it('a non-validation relate-door failure during --link preserves its own code/category, not a relabeled VALIDATION_FAILED', async () => {
|
|
316
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
317
|
+
if (fn === 'chain.createEntry')
|
|
318
|
+
return Promise.resolve({ docId: 'doc-wp7', entryId: 'WP-7' });
|
|
319
|
+
if (fn === 'chain.createEntryRelation') {
|
|
320
|
+
return Promise.reject(new CLIError('Rate limit exceeded', { code: ErrorCode.RATE_LIMITED, category: 'network', guidance: 'Wait and retry.' }));
|
|
321
|
+
}
|
|
322
|
+
if (fn === 'quality.evaluateHeuristicAndSchedule')
|
|
323
|
+
return Promise.resolve(undefined);
|
|
324
|
+
return Promise.resolve({});
|
|
325
|
+
});
|
|
326
|
+
let caught;
|
|
327
|
+
try {
|
|
328
|
+
await runCapture({ text: 'WP: child work package', link: 'WP-5', linkType: 'part_of' });
|
|
329
|
+
}
|
|
330
|
+
catch (e) {
|
|
331
|
+
caught = e;
|
|
332
|
+
}
|
|
333
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
334
|
+
expect(caught?.code).toBe(ErrorCode.RATE_LIMITED);
|
|
335
|
+
expect(caught?.category).toBe('network');
|
|
336
|
+
expect(caught?.message).toBe('Rate limit exceeded');
|
|
337
|
+
expect(caught?.guidance).toContain('WP-7 was captured');
|
|
338
|
+
});
|
|
339
|
+
// WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0VPP): a NETWORK_TIMEOUT relate failure is
|
|
340
|
+
// outcome-UNKNOWN (the write may have landed server-side) — the guidance must say so, never
|
|
341
|
+
// the "was refused, re-run" template, which would prompt a blind duplicate-risking retry.
|
|
342
|
+
it('a NETWORK_TIMEOUT relate-door failure during --link says outcome-unknown, never "was refused"', async () => {
|
|
343
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
344
|
+
if (fn === 'chain.createEntry')
|
|
345
|
+
return Promise.resolve({ docId: 'doc-wp9', entryId: 'WP-9' });
|
|
346
|
+
if (fn === 'chain.createEntryRelation') {
|
|
347
|
+
return Promise.reject(new CLIError('"chain.createEntryRelation" exceeded its budget.', { code: ErrorCode.NETWORK_TIMEOUT, category: 'network', guidance: 'Check before retrying.' }));
|
|
348
|
+
}
|
|
349
|
+
if (fn === 'quality.evaluateHeuristicAndSchedule')
|
|
350
|
+
return Promise.resolve(undefined);
|
|
351
|
+
return Promise.resolve({});
|
|
352
|
+
});
|
|
353
|
+
let caught;
|
|
354
|
+
try {
|
|
355
|
+
await runCapture({ text: 'WP: child work package', link: 'WP-5', linkType: 'part_of' });
|
|
356
|
+
}
|
|
357
|
+
catch (e) {
|
|
358
|
+
caught = e;
|
|
359
|
+
}
|
|
360
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
361
|
+
expect(caught?.code).toBe(ErrorCode.NETWORK_TIMEOUT);
|
|
362
|
+
expect(caught?.guidance).toContain('outcome is UNKNOWN');
|
|
363
|
+
expect(caught?.guidance).not.toContain('was refused');
|
|
364
|
+
});
|
|
365
|
+
// WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0CCc): the quality re-eval must still run
|
|
366
|
+
// (un-defers deferLLMSchedule) even when the relate call itself throws — previously the
|
|
367
|
+
// re-eval sat INSIDE the same try as the relate call, so a thrown refusal skipped it
|
|
368
|
+
// entirely, leaving the entry stuck at llmStatus:'skipped' with no background judgment ever
|
|
369
|
+
// scheduled.
|
|
370
|
+
it('the quality re-eval still runs after a relate-door refusal — the entry is not left permanently deferred', async () => {
|
|
371
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
372
|
+
if (fn === 'chain.createEntry')
|
|
373
|
+
return Promise.resolve({ docId: 'doc-wp8', entryId: 'WP-8' });
|
|
374
|
+
if (fn === 'chain.createEntryRelation') {
|
|
375
|
+
return Promise.reject(Object.assign(new Error('refused'), { name: 'McpError' }));
|
|
376
|
+
}
|
|
377
|
+
if (fn === 'quality.evaluateHeuristicAndSchedule')
|
|
378
|
+
return Promise.resolve({ verdict: 'pass' });
|
|
379
|
+
return Promise.resolve({});
|
|
380
|
+
});
|
|
381
|
+
try {
|
|
382
|
+
await runCapture({ text: 'WP: child work package', link: 'WP-5', linkType: 'part_of' });
|
|
383
|
+
}
|
|
384
|
+
catch {
|
|
385
|
+
// The refusal itself is expected — asserted by the sibling test above; this test only
|
|
386
|
+
// cares that the re-eval call happened before/regardless of it.
|
|
387
|
+
}
|
|
388
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', {
|
|
389
|
+
entryId: 'WP-8',
|
|
390
|
+
context: 'capture',
|
|
391
|
+
});
|
|
392
|
+
});
|
|
393
|
+
// WP-688 S4 (element 11): the human receipt prints the REAL verb — no `?? 'surfaces_tension_in'`
|
|
394
|
+
// fallback (formatters/capture.ts:105).
|
|
395
|
+
it('the human-readable receipt prints the real relation type, never the dead surfaces_tension_in fallback', async () => {
|
|
396
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
397
|
+
if (fn === 'chain.createEntry')
|
|
398
|
+
return Promise.resolve({ docId: 'doc-2b', entryId: 'INS-51' });
|
|
399
|
+
if (fn === 'chain.createEntryRelation')
|
|
400
|
+
return Promise.resolve({ relationId: 'rel-1' });
|
|
401
|
+
return Promise.resolve({});
|
|
402
|
+
});
|
|
403
|
+
let stdoutOutput = '';
|
|
404
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
|
|
405
|
+
stdoutOutput += String(chunk);
|
|
406
|
+
return true;
|
|
407
|
+
});
|
|
408
|
+
setOutputMode('pretty'); // force the human receipt path (test harness's stdout is non-TTY)
|
|
409
|
+
try {
|
|
410
|
+
await runCapture({ text: 'INS: discovered Y', link: 'DEC-265', linkType: 'validates' });
|
|
411
|
+
}
|
|
412
|
+
finally {
|
|
413
|
+
setOutputMode('auto');
|
|
414
|
+
writeSpy.mockRestore();
|
|
415
|
+
}
|
|
416
|
+
expect(stdoutOutput).toContain('Linked: → DEC-265 (validates)');
|
|
417
|
+
expect(stdoutOutput).not.toContain('surfaces_tension_in');
|
|
418
|
+
});
|
|
419
|
+
// WP-688 S4 review round 2 (bc04z): a diverted relation call (the DEC-1399 auto-link gate
|
|
420
|
+
// routing an edge to a pending suggestion instead of writing it — WP-776 S2a, DEC-1771
|
|
421
|
+
// deletes the OTHER diversion this once named, the governs-consent proposal) returns
|
|
422
|
+
// WITHOUT a relationId — only a real, persisted write may claim `linkedTo`/`relationType`.
|
|
423
|
+
it('an auto-link-gate diversion (no relationId) is never reported as a persisted link', async () => {
|
|
424
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
425
|
+
if (fn === 'chain.createEntry')
|
|
426
|
+
return Promise.resolve({ docId: 'doc-3', entryId: 'WPKG-1' });
|
|
427
|
+
if (fn === 'chain.createEntryRelation') {
|
|
428
|
+
return Promise.resolve({ ok: false, status: 'advised', advised: true });
|
|
429
|
+
}
|
|
430
|
+
return Promise.resolve({});
|
|
431
|
+
});
|
|
432
|
+
let stdoutOutput = '';
|
|
433
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
|
|
434
|
+
stdoutOutput += String(chunk);
|
|
435
|
+
return true;
|
|
436
|
+
});
|
|
437
|
+
await runCapture({ text: 'WPKG: governance test', link: 'STD-1', linkType: 'governs', json: true });
|
|
438
|
+
writeSpy.mockRestore();
|
|
439
|
+
const output = JSON.parse(stdoutOutput.split('\n').find((line) => {
|
|
440
|
+
try {
|
|
441
|
+
JSON.parse(line);
|
|
442
|
+
return true;
|
|
443
|
+
}
|
|
444
|
+
catch {
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
}));
|
|
448
|
+
expect(output.relationType).toBeUndefined();
|
|
449
|
+
// WP-688 S4 review fix (bc7cr): the re-eval call STILL fires — it's the only thing that
|
|
450
|
+
// un-defers the LLM schedule deferLLMSchedule set (a relate WAS attempted) — but its
|
|
451
|
+
// verdict is discarded: no relation landed, so relation-dependent criteria stay unscored.
|
|
452
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', {
|
|
453
|
+
entryId: 'WPKG-1',
|
|
454
|
+
context: 'capture',
|
|
455
|
+
});
|
|
456
|
+
expect(output.coaching).toBeUndefined();
|
|
457
|
+
});
|
|
458
|
+
// WP-688 S4 review round 2 (bc045): --link without --link-type must not defer the LLM
|
|
459
|
+
// schedule — the refusal branch never runs the re-eval that would un-defer it, so a
|
|
460
|
+
// deferred-then-never-run schedule would leave the entry permanently stuck.
|
|
461
|
+
it('--link without --link-type does NOT defer the LLM schedule (nothing will ever un-defer it)', async () => {
|
|
462
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
463
|
+
if (fn === 'chain.createEntry')
|
|
464
|
+
return Promise.resolve({ docId: 'doc-4', entryId: 'TEN-20' });
|
|
465
|
+
if (fn === 'chain.createEntryRelation')
|
|
466
|
+
return Promise.resolve({ preview: true, advisories: [] });
|
|
467
|
+
return Promise.resolve({});
|
|
468
|
+
});
|
|
469
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
470
|
+
await expect(runCapture({ text: 'TEN: refused link, no defer', link: 'BET-1' })).rejects.toThrow(CLIError);
|
|
471
|
+
writeSpy.mockRestore();
|
|
472
|
+
const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
|
|
473
|
+
expect(createCall?.[1]).not.toHaveProperty('deferLLMSchedule');
|
|
474
|
+
});
|
|
475
|
+
// WP-688 S4 review round 2 (bc049): a dropped field and a --link-type refusal can both be true
|
|
476
|
+
// on the SAME capture — the entry was created either way, so both must reach the operator.
|
|
477
|
+
// TASK-584 (WP-802, TEN-4312): the dropped field is a warning on the landed reply, the link
|
|
478
|
+
// refusal is the only error.
|
|
479
|
+
it('prints the dropped-field warning AND throws the link-type refusal when they co-occur', async () => {
|
|
480
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
481
|
+
if (fn === 'chain.createEntry') {
|
|
482
|
+
return Promise.resolve({
|
|
483
|
+
docId: 'doc-5', entryId: 'TEN-21',
|
|
484
|
+
normalization: { remapped: {}, rejected: ['badField'], accepted: [] },
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
if (fn === 'chain.createEntryRelation')
|
|
488
|
+
return Promise.resolve({ preview: true, advisories: [] });
|
|
489
|
+
return Promise.resolve({});
|
|
490
|
+
});
|
|
491
|
+
const out = [];
|
|
492
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out.push(String(chunk)); return true; });
|
|
493
|
+
let caught;
|
|
494
|
+
try {
|
|
495
|
+
await runCapture({ text: 'TEN: both failures at once', link: 'BET-1', json: true });
|
|
496
|
+
}
|
|
497
|
+
catch (e) {
|
|
498
|
+
caught = e;
|
|
499
|
+
}
|
|
500
|
+
writeSpy.mockRestore();
|
|
501
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
502
|
+
expect(JSON.parse(out.join(''))).toMatchObject({ id: 'TEN-21', droppedFields: ['badField'] });
|
|
503
|
+
expect(caught?.message).not.toContain('Fields rejected');
|
|
504
|
+
expect(caught?.message).toContain('--link requires --link-type');
|
|
505
|
+
expect(caught?.guidance).toContain('TEN-21');
|
|
506
|
+
});
|
|
507
|
+
// WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0e82): the link-refused error beside a
|
|
508
|
+
// dropped field must preserve the link failure's OWN code/category (e.g. NETWORK_TIMEOUT)
|
|
509
|
+
// rather than always relabeling the aggregate VALIDATION_FAILED — automation branching on the
|
|
510
|
+
// error code must still see the timeout, not a generic validation failure.
|
|
511
|
+
it('the link-refused error beside a dropped field keeps the link failure\'s own code (NETWORK_TIMEOUT), not VALIDATION_FAILED', async () => {
|
|
512
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
513
|
+
if (fn === 'chain.createEntry') {
|
|
514
|
+
return Promise.resolve({
|
|
515
|
+
docId: 'doc-10', entryId: 'TEN-22',
|
|
516
|
+
normalization: { remapped: {}, rejected: ['badField'], accepted: [] },
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
if (fn === 'chain.createEntryRelation') {
|
|
520
|
+
return Promise.reject(new CLIError('"chain.createEntryRelation" exceeded its budget.', { code: ErrorCode.NETWORK_TIMEOUT, category: 'network', guidance: 'Check before retrying.' }));
|
|
521
|
+
}
|
|
522
|
+
if (fn === 'quality.evaluateHeuristicAndSchedule')
|
|
523
|
+
return Promise.resolve(undefined);
|
|
524
|
+
return Promise.resolve({});
|
|
525
|
+
});
|
|
526
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
527
|
+
let caught;
|
|
528
|
+
try {
|
|
529
|
+
await runCapture({ text: 'TEN: both failures, timeout link', link: 'BET-1', linkType: 'part_of' });
|
|
530
|
+
}
|
|
531
|
+
catch (e) {
|
|
532
|
+
caught = e;
|
|
533
|
+
}
|
|
534
|
+
writeSpy.mockRestore();
|
|
535
|
+
expect(caught).toBeInstanceOf(CLIError);
|
|
536
|
+
expect(caught?.code).toBe(ErrorCode.NETWORK_TIMEOUT);
|
|
537
|
+
expect(caught?.message).not.toContain('Fields rejected');
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
// WP-684 TASK-77 (E1.3): one-step typed create — --entry-type forwards to chain.createEntry's
|
|
541
|
+
// existing `canonicalKey` arg. Named --entry-type since -t/--type is the --link relation type.
|
|
542
|
+
describe('runCapture --entry-type', () => {
|
|
543
|
+
beforeEach(() => {
|
|
544
|
+
kernelCallWithSessionMock.mockReset();
|
|
545
|
+
mockSession = { sessionId: 'sess-test' };
|
|
546
|
+
});
|
|
547
|
+
it('forwards --entry-type as canonicalKey on the chain.createEntry payload', async () => {
|
|
548
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
549
|
+
if (fn === 'chain.createEntry')
|
|
550
|
+
return Promise.resolve({ docId: 'doc-3', entryId: 'OBJ-1' });
|
|
551
|
+
return Promise.resolve({});
|
|
552
|
+
});
|
|
553
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
554
|
+
await runCapture({ text: 'the objective', collection: 'key-results', entryType: 'objective' });
|
|
555
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
|
|
556
|
+
collectionSlug: 'key-results',
|
|
557
|
+
canonicalKey: 'objective',
|
|
558
|
+
}));
|
|
559
|
+
writeSpy.mockRestore();
|
|
560
|
+
});
|
|
561
|
+
it('omits canonicalKey entirely when --entry-type is absent (byte-identical default path)', async () => {
|
|
562
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
563
|
+
if (fn === 'chain.createEntry')
|
|
564
|
+
return Promise.resolve({ docId: 'doc-4', entryId: 'OBJ-1' });
|
|
565
|
+
return Promise.resolve({});
|
|
566
|
+
});
|
|
567
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
568
|
+
await runCapture({ text: 'a key result', collection: 'key-results' });
|
|
569
|
+
const call = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
|
|
570
|
+
expect(call?.[1]).not.toHaveProperty('canonicalKey');
|
|
571
|
+
writeSpy.mockRestore();
|
|
572
|
+
});
|
|
573
|
+
// TASK-894 (DEC-2113): --entry-type alone routes in the kernel (getTypeHintMap), so the CLI sends
|
|
574
|
+
// one request with the key and no collection: no listCollections, no resolveCollection.
|
|
575
|
+
it('--entry-type alone sends one chain.createEntry with canonicalKey and no collectionSlug', async () => {
|
|
576
|
+
kernelCallWithSessionMock.mockImplementation((fn) => (fn === 'chain.createEntry' ? Promise.resolve({ docId: 'doc-5', entryId: 'OBJ-2', collection: 'objectives' }) : Promise.resolve({})));
|
|
577
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
578
|
+
const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
|
|
579
|
+
await runCapture({ text: 'another objective', entryType: 'objective' });
|
|
580
|
+
expect(kernelCallWithSessionMock.mock.calls.map(([fn]) => fn)).toEqual(['chain.createEntry']);
|
|
581
|
+
const args = kernelCallWithSessionMock.mock.calls[0][1];
|
|
582
|
+
expect(args).toMatchObject({ canonicalKey: 'objective', name: 'another objective' });
|
|
583
|
+
expect(args).not.toHaveProperty('collectionSlug');
|
|
584
|
+
writeSpy.mockRestore();
|
|
585
|
+
stderrSpy.mockRestore();
|
|
586
|
+
});
|
|
73
587
|
});
|
|
74
588
|
describe('runCapture --json', () => {
|
|
75
589
|
beforeEach(() => {
|
|
@@ -77,12 +591,10 @@ describe('runCapture --json', () => {
|
|
|
77
591
|
mockSession = { sessionId: 'sess-test' };
|
|
78
592
|
});
|
|
79
593
|
it('outputs valid JSON with id field and no other stdout', async () => {
|
|
80
|
-
//
|
|
594
|
+
// TASK-894: the kernel routes the "TEN:" prefix and names the slug on the reply.
|
|
81
595
|
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
82
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
83
|
-
return Promise.resolve([]);
|
|
84
596
|
if (fn === 'chain.createEntry')
|
|
85
|
-
return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-711' });
|
|
597
|
+
return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-711', collection: 'tensions' });
|
|
86
598
|
return Promise.resolve({});
|
|
87
599
|
});
|
|
88
600
|
let stdoutOutput = '';
|
|
@@ -109,269 +621,492 @@ describe('runCapture --json', () => {
|
|
|
109
621
|
expect(output).toHaveProperty('confidence');
|
|
110
622
|
});
|
|
111
623
|
});
|
|
112
|
-
describe('runCapture
|
|
624
|
+
describe('runCapture coaching passthrough (WP-475 E1)', () => {
|
|
113
625
|
beforeEach(() => {
|
|
114
626
|
kernelCallWithSessionMock.mockReset();
|
|
115
627
|
mockSession = { sessionId: 'sess-test' };
|
|
116
628
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
629
|
+
const coaching = {
|
|
630
|
+
source: 'heuristic',
|
|
631
|
+
verdict: {
|
|
632
|
+
entryId: 'DEC-77',
|
|
633
|
+
canonicalKey: 'decision',
|
|
634
|
+
tier: 'assertive',
|
|
635
|
+
context: 'capture',
|
|
636
|
+
passed: false,
|
|
637
|
+
criteria: [
|
|
638
|
+
{ id: 'specificity', passed: false, weight: 2, hint: 'Be specific.', questionTemplate: 'What exactly?' },
|
|
639
|
+
],
|
|
640
|
+
weakest: { criterion: 'specificity', hint: 'Be specific.', questionTemplate: 'What exactly?' },
|
|
641
|
+
overridden: false,
|
|
642
|
+
},
|
|
643
|
+
};
|
|
644
|
+
it('--json output includes the raw coaching object from the write response', async () => {
|
|
121
645
|
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
122
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
123
|
-
return Promise.resolve([]);
|
|
124
646
|
if (fn === 'chain.createEntry')
|
|
125
|
-
return Promise.resolve({ docId: 'doc-
|
|
647
|
+
return Promise.resolve({ docId: 'doc-c1', entryId: 'DEC-77', coaching });
|
|
126
648
|
return Promise.resolve({});
|
|
127
649
|
});
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
collectionSlug: 'assumptions',
|
|
133
|
-
name: "users won't pay before seeing value",
|
|
134
|
-
data: { description: "users won't pay before seeing value" },
|
|
650
|
+
let stdoutOutput = '';
|
|
651
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
|
|
652
|
+
stdoutOutput += String(chunk);
|
|
653
|
+
return true;
|
|
135
654
|
});
|
|
655
|
+
await runCapture({ text: 'DEC: chose something', json: true });
|
|
136
656
|
writeSpy.mockRestore();
|
|
657
|
+
const jsonLines = stdoutOutput.split('\n').filter((line) => {
|
|
658
|
+
try {
|
|
659
|
+
JSON.parse(line);
|
|
660
|
+
return true;
|
|
661
|
+
}
|
|
662
|
+
catch {
|
|
663
|
+
return false;
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
expect(jsonLines).toHaveLength(1);
|
|
667
|
+
const output = JSON.parse(jsonLines[0]);
|
|
668
|
+
expect(output.coaching).toEqual(coaching);
|
|
137
669
|
});
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
670
|
+
it('--json output omits coaching when the write response has none (backward compat)', async () => {
|
|
671
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
672
|
+
if (fn === 'chain.createEntry')
|
|
673
|
+
return Promise.resolve({ docId: 'doc-c2', entryId: 'DEC-78' });
|
|
674
|
+
return Promise.resolve({});
|
|
675
|
+
});
|
|
676
|
+
let stdoutOutput = '';
|
|
677
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
|
|
678
|
+
stdoutOutput += String(chunk);
|
|
679
|
+
return true;
|
|
680
|
+
});
|
|
681
|
+
await runCapture({ text: 'DEC: chose another thing', json: true });
|
|
682
|
+
writeSpy.mockRestore();
|
|
683
|
+
const jsonLines = stdoutOutput.split('\n').filter((line) => {
|
|
684
|
+
try {
|
|
685
|
+
JSON.parse(line);
|
|
686
|
+
return true;
|
|
687
|
+
}
|
|
688
|
+
catch {
|
|
689
|
+
return false;
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
expect(jsonLines).toHaveLength(1);
|
|
693
|
+
expect(JSON.parse(jsonLines[0])).not.toHaveProperty('coaching');
|
|
143
694
|
});
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
695
|
+
// ── WP-475 E1 fix: relation-aware receipt on --link ────────────────────────
|
|
696
|
+
// The create-response verdict is computed BEFORE the --link relation exists,
|
|
697
|
+
// so relation-dependent criteria (wired-in checks) read falsely failed. When
|
|
698
|
+
// the capture created a relation, the CLI re-evaluates AFTER it lands and
|
|
699
|
+
// renders THAT verdict.
|
|
700
|
+
const reEvalCoaching = {
|
|
701
|
+
source: 'heuristic',
|
|
702
|
+
verdict: {
|
|
703
|
+
...coaching.verdict,
|
|
704
|
+
passed: true,
|
|
705
|
+
criteria: [{ id: 'specificity', passed: true, weight: 2, hint: 'Be specific.', questionTemplate: 'What exactly?' }],
|
|
706
|
+
weakest: null,
|
|
707
|
+
},
|
|
708
|
+
};
|
|
709
|
+
it('--link: re-evaluates after the relation lands and renders the post-relation verdict', async () => {
|
|
710
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
711
|
+
if (fn === 'chain.createEntry')
|
|
712
|
+
return Promise.resolve({ docId: 'doc-c3', entryId: 'DEC-79', coaching });
|
|
713
|
+
if (fn === 'chain.createEntryRelation')
|
|
714
|
+
return Promise.resolve({ relationId: 'rel-1' });
|
|
715
|
+
if (fn === 'quality.evaluateHeuristicAndSchedule')
|
|
716
|
+
return Promise.resolve(reEvalCoaching);
|
|
717
|
+
return Promise.resolve({});
|
|
718
|
+
});
|
|
719
|
+
let stdoutOutput = '';
|
|
720
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
|
|
721
|
+
stdoutOutput += String(chunk);
|
|
722
|
+
return true;
|
|
723
|
+
});
|
|
724
|
+
await runCapture({ text: 'DEC: chose with a link', link: 'TEN-1', linkType: 'informs', json: true });
|
|
725
|
+
writeSpy.mockRestore();
|
|
726
|
+
// Deterministic --link fix: the CREATE call defers the LLM schedule (the
|
|
727
|
+
// post-relation re-eval owns the single LLM run)…
|
|
728
|
+
const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
|
|
729
|
+
expect(createCall?.[1]).toMatchObject({ deferLLMSchedule: true });
|
|
730
|
+
// …and the re-eval fires with the created entry, AFTER the relation write,
|
|
731
|
+
// WITHOUT the defer flag (it schedules the LLM run as normal).
|
|
732
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', {
|
|
733
|
+
entryId: 'DEC-79',
|
|
734
|
+
context: 'capture',
|
|
735
|
+
});
|
|
736
|
+
const callOrder = kernelCallWithSessionMock.mock.calls.map(([fn]) => fn);
|
|
737
|
+
expect(callOrder.indexOf('chain.createEntryRelation')).toBeLessThan(callOrder.indexOf('quality.evaluateHeuristicAndSchedule'));
|
|
738
|
+
// The receipt carries the POST-relation verdict, not the create-response one.
|
|
739
|
+
const jsonLines = stdoutOutput.split('\n').filter((line) => {
|
|
740
|
+
try {
|
|
741
|
+
JSON.parse(line);
|
|
742
|
+
return true;
|
|
743
|
+
}
|
|
744
|
+
catch {
|
|
745
|
+
return false;
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
expect(jsonLines).toHaveLength(1);
|
|
749
|
+
expect(JSON.parse(jsonLines[0]).coaching).toEqual(reEvalCoaching);
|
|
750
|
+
});
|
|
751
|
+
it('--link: keeps the create-response verdict when the re-eval fails (fail-open, BR-144)', async () => {
|
|
752
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
753
|
+
if (fn === 'chain.createEntry')
|
|
754
|
+
return Promise.resolve({ docId: 'doc-c4', entryId: 'DEC-80', coaching });
|
|
755
|
+
if (fn === 'chain.createEntryRelation')
|
|
756
|
+
return Promise.resolve({ relationId: 'rel-1' });
|
|
757
|
+
if (fn === 'quality.evaluateHeuristicAndSchedule')
|
|
758
|
+
return Promise.reject(new Error('network'));
|
|
759
|
+
return Promise.resolve({});
|
|
760
|
+
});
|
|
761
|
+
let stdoutOutput = '';
|
|
762
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
|
|
763
|
+
stdoutOutput += String(chunk);
|
|
764
|
+
return true;
|
|
765
|
+
});
|
|
766
|
+
await runCapture({ text: 'DEC: chose with a broken re-eval', link: 'TEN-2', linkType: 'informs', json: true });
|
|
767
|
+
writeSpy.mockRestore();
|
|
768
|
+
const jsonLines = stdoutOutput.split('\n').filter((line) => {
|
|
769
|
+
try {
|
|
770
|
+
JSON.parse(line);
|
|
771
|
+
return true;
|
|
772
|
+
}
|
|
773
|
+
catch {
|
|
774
|
+
return false;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
expect(jsonLines).toHaveLength(1);
|
|
778
|
+
expect(JSON.parse(jsonLines[0]).coaching).toEqual(coaching);
|
|
779
|
+
});
|
|
780
|
+
it('no --link: does NOT call the re-evaluation and does NOT defer the LLM schedule (plain capture unchanged)', async () => {
|
|
781
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
782
|
+
if (fn === 'chain.createEntry')
|
|
783
|
+
return Promise.resolve({ docId: 'doc-c5', entryId: 'DEC-81', coaching });
|
|
784
|
+
return Promise.resolve({});
|
|
785
|
+
});
|
|
786
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
787
|
+
await runCapture({ text: 'DEC: chose without a link', json: true });
|
|
788
|
+
writeSpy.mockRestore();
|
|
789
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', expect.anything());
|
|
790
|
+
const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
|
|
791
|
+
expect(createCall?.[1]).not.toHaveProperty('deferLLMSchedule');
|
|
147
792
|
});
|
|
148
793
|
});
|
|
149
|
-
|
|
794
|
+
// WP-690 S7 (TASK-120): the 'runCapture description field routing' describe block (TEN-1258's
|
|
795
|
+
// ASM:-shortcode -> 'assumptions' collectionSlug routing test) is DELETED here — `assumption` is
|
|
796
|
+
// one of the 15 genuinely-retired canonicalKeys (collectionRegistry.ts no longer carries an
|
|
797
|
+
// 'assumptions'/ASM entry at all), so the scenario this test asserted can no longer occur: an
|
|
798
|
+
// 'ASM:' capture now falls through to auto-classification (collectionSlug: undefined) instead of
|
|
799
|
+
// the old explicit-shortcode routing. Found via the CI Quality Gate on this PR (new failure caused
|
|
800
|
+
// by the S7 registry purge, fixed at root per the standing "fix new failures at root" contract —
|
|
801
|
+
// not deferred, not papered over).
|
|
802
|
+
describe('runCapture --field passthrough', () => {
|
|
150
803
|
beforeEach(() => {
|
|
151
804
|
kernelCallWithSessionMock.mockReset();
|
|
152
805
|
mockSession = { sessionId: 'sess-test' };
|
|
153
806
|
});
|
|
154
|
-
it('
|
|
807
|
+
it('merges --field pairs into data', async () => {
|
|
155
808
|
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
156
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
157
|
-
return Promise.resolve([]);
|
|
158
|
-
if (fn === 'chain.resolveCollection')
|
|
159
|
-
return Promise.resolve({ collection: 'decisions', confidence: 0.9, tier: 'high' });
|
|
160
809
|
if (fn === 'chain.createEntry')
|
|
161
|
-
return Promise.resolve({ docId: 'doc-
|
|
810
|
+
return Promise.resolve({ docId: 'doc-6', entryId: 'STD-1' });
|
|
162
811
|
return Promise.resolve({});
|
|
163
812
|
});
|
|
164
813
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
165
|
-
await runCapture({
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
data: { description: 'Decision without explicit source date' },
|
|
814
|
+
await runCapture({
|
|
815
|
+
text: 'touched-code stewardship',
|
|
816
|
+
collection: 'standards',
|
|
817
|
+
field: ['rationale=signed specs define scope but agents need permission'],
|
|
170
818
|
});
|
|
171
|
-
expect(
|
|
819
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
|
|
820
|
+
description: 'touched-code stewardship', // TASK-894: the capture text; the kernel files it when the main field is empty
|
|
821
|
+
data: { rationale: 'signed specs define scope but agents need permission' },
|
|
822
|
+
}));
|
|
172
823
|
writeSpy.mockRestore();
|
|
173
824
|
});
|
|
174
|
-
it('
|
|
825
|
+
it('--field description=X overrides the derived description', async () => {
|
|
175
826
|
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
176
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
177
|
-
return Promise.resolve([]);
|
|
178
|
-
if (fn === 'chain.resolveCollection')
|
|
179
|
-
return Promise.resolve({ collection: 'decisions', confidence: 0.9, tier: 'high' });
|
|
180
827
|
if (fn === 'chain.createEntry')
|
|
181
|
-
return Promise.resolve({ docId: 'doc-
|
|
828
|
+
return Promise.resolve({ docId: 'doc-7', entryId: 'TEN-1' });
|
|
182
829
|
return Promise.resolve({});
|
|
183
830
|
});
|
|
184
831
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
185
|
-
await runCapture({
|
|
186
|
-
|
|
187
|
-
|
|
832
|
+
await runCapture({
|
|
833
|
+
text: 'derived',
|
|
834
|
+
collection: 'tensions',
|
|
835
|
+
field: ['description=explicit'],
|
|
836
|
+
});
|
|
837
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
|
|
838
|
+
data: expect.objectContaining({ description: 'explicit' }),
|
|
839
|
+
}));
|
|
188
840
|
writeSpy.mockRestore();
|
|
189
841
|
});
|
|
190
842
|
});
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
describe('runCapture
|
|
195
|
-
const emptyGrounding = { index: 0, related: [], duplicates: [], governance: [], v: 1 };
|
|
196
|
-
const groundingWithDuplicate = {
|
|
197
|
-
index: 0,
|
|
198
|
-
related: [],
|
|
199
|
-
duplicates: [{ entryId: 'TEN-5', name: 'Similar tension', collectionSlug: 'tensions', matchType: 'possible_duplicate', overlapRatio: 0.9 }],
|
|
200
|
-
governance: [],
|
|
201
|
-
v: 1,
|
|
202
|
-
};
|
|
843
|
+
// TASK-584 (WP-802, TEN-4312): the CLI sends only the fields the caller sent. The default
|
|
844
|
+
// description (the capture text) exists to be remapped into the collection's primary field;
|
|
845
|
+
// TASK-894: data carries only what the caller sent; the kernel fills the main text field when it is empty.
|
|
846
|
+
describe('runCapture sends only caller fields (TASK-584)', () => {
|
|
203
847
|
beforeEach(() => {
|
|
204
848
|
kernelCallWithSessionMock.mockReset();
|
|
205
849
|
mockSession = { sessionId: 'sess-test' };
|
|
206
|
-
delete process.env.PB_GROUNDING_MODE;
|
|
207
850
|
});
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
kernelCallWithSessionMock
|
|
211
|
-
.mockImplementation((fn) => {
|
|
212
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
213
|
-
return Promise.resolve([emptyGrounding]);
|
|
851
|
+
const createData = () => kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry')?.[1]?.data;
|
|
852
|
+
it('omits description when -f sets the primary field and no -d is given', async () => {
|
|
853
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
214
854
|
if (fn === 'chain.createEntry')
|
|
215
|
-
return Promise.resolve({ docId: '
|
|
855
|
+
return Promise.resolve({ docId: 'd', entryId: 'INS-1', status: 'draft' });
|
|
216
856
|
return Promise.resolve({});
|
|
217
857
|
});
|
|
218
858
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
219
|
-
|
|
220
|
-
await runCapture({ text: 'TEN: grounding test tension' });
|
|
221
|
-
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.suggestLinksForCapture', expect.objectContaining({
|
|
222
|
-
entries: expect.arrayContaining([expect.objectContaining({ name: 'grounding test tension' })]),
|
|
223
|
-
}));
|
|
224
|
-
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
|
|
859
|
+
await runCapture({ text: 'an insight', collection: 'insights', field: ['body=the full body'] });
|
|
225
860
|
writeSpy.mockRestore();
|
|
226
|
-
|
|
861
|
+
expect(createData()).toEqual({ body: 'the full body' });
|
|
227
862
|
});
|
|
228
|
-
it('
|
|
229
|
-
kernelCallWithSessionMock
|
|
230
|
-
.mockImplementation((fn) => {
|
|
231
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
232
|
-
return Promise.reject(new Error('network error'));
|
|
863
|
+
it('keeps description when -d is given, even with -f body', async () => {
|
|
864
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
233
865
|
if (fn === 'chain.createEntry')
|
|
234
|
-
return Promise.resolve({ docId: '
|
|
866
|
+
return Promise.resolve({ docId: 'd', entryId: 'INS-2', status: 'draft' });
|
|
235
867
|
return Promise.resolve({});
|
|
236
868
|
});
|
|
237
869
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
238
|
-
|
|
239
|
-
// Must not throw — grounding failure is fail-open
|
|
240
|
-
await expect(runCapture({ text: 'TEN: grounding failure test' })).resolves.toBeUndefined();
|
|
241
|
-
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
|
|
870
|
+
await runCapture({ text: 'an insight', description: 'explicit', collection: 'insights', field: ['body=b'] });
|
|
242
871
|
writeSpy.mockRestore();
|
|
243
|
-
|
|
872
|
+
expect(createData()).toEqual({ description: 'explicit', body: 'b' });
|
|
244
873
|
});
|
|
245
|
-
it('
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if (fn === 'chain.suggestLinksForCapture')
|
|
250
|
-
return Promise.resolve([groundingWithDuplicate]);
|
|
874
|
+
it('a bare capture sends its text as description only, for the kernel to file in the empty body', async () => {
|
|
875
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
876
|
+
if (fn === 'chain.createEntry')
|
|
877
|
+
return Promise.resolve({ docId: 'd', entryId: 'INS-3', status: 'draft' });
|
|
251
878
|
return Promise.resolve({});
|
|
252
879
|
});
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
stdoutOutput += String(chunk);
|
|
256
|
-
return true;
|
|
257
|
-
});
|
|
258
|
-
const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
|
|
259
|
-
await runCapture({ text: 'TEN: duplicate candidate', suggestOnly: true });
|
|
260
|
-
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntry', expect.anything());
|
|
261
|
-
// JSON output contains suggestOnly flag and grounding report
|
|
262
|
-
const jsonLines = stdoutOutput.split('\n').filter((l) => { try {
|
|
263
|
-
JSON.parse(l);
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
catch {
|
|
267
|
-
return false;
|
|
268
|
-
} });
|
|
269
|
-
expect(jsonLines).toHaveLength(1);
|
|
270
|
-
const parsed = JSON.parse(jsonLines[0]);
|
|
271
|
-
expect(parsed.suggestOnly).toBe(true);
|
|
272
|
-
expect(parsed.groundingReport).toBeDefined();
|
|
880
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
881
|
+
await runCapture({ text: 'an insight', collection: 'insights' });
|
|
273
882
|
writeSpy.mockRestore();
|
|
274
|
-
|
|
883
|
+
expect(createData()).toEqual({});
|
|
884
|
+
expect(kernelCallWithSessionMock.mock.calls[0][1]).toMatchObject({ description: 'an insight' });
|
|
275
885
|
});
|
|
276
|
-
it('
|
|
277
|
-
kernelCallWithSessionMock
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
886
|
+
it('a landed create with a dropped field resolves (exit 0) and names only that field as dropped', async () => {
|
|
887
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
888
|
+
if (fn === 'chain.createEntry') {
|
|
889
|
+
return Promise.resolve({
|
|
890
|
+
docId: 'd', entryId: 'INS-5', status: 'draft', warnings: ['Unknown fields dropped: nosuchfield. Expected: body (text, required).'],
|
|
891
|
+
normalization: { remapped: {}, rejected: ['nosuchfield'], accepted: ['body'] },
|
|
892
|
+
});
|
|
893
|
+
}
|
|
281
894
|
return Promise.resolve({});
|
|
282
895
|
});
|
|
283
|
-
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
});
|
|
288
|
-
const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
|
|
289
|
-
await runCapture({ text: 'TEN: dry run json', json: true, suggestOnly: true });
|
|
290
|
-
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntry', expect.anything());
|
|
291
|
-
const jsonLines = stdoutOutput.split('\n').filter((l) => { try {
|
|
292
|
-
JSON.parse(l);
|
|
293
|
-
return true;
|
|
294
|
-
}
|
|
295
|
-
catch {
|
|
296
|
-
return false;
|
|
297
|
-
} });
|
|
298
|
-
expect(jsonLines).toHaveLength(1);
|
|
299
|
-
const parsed = JSON.parse(jsonLines[0]);
|
|
300
|
-
expect(parsed.suggestOnly).toBe(true);
|
|
896
|
+
const out = [];
|
|
897
|
+
const errOut = [];
|
|
898
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out.push(String(chunk)); return true; });
|
|
899
|
+
const errSpy = vi.spyOn(process.stderr, 'write').mockImplementation((chunk) => { errOut.push(String(chunk)); return true; });
|
|
900
|
+
await expect(runCapture({ text: 'an insight', collection: 'insights', field: ['nosuchfield=x'], json: true })).resolves.toBeUndefined();
|
|
301
901
|
writeSpy.mockRestore();
|
|
302
|
-
|
|
902
|
+
errSpy.mockRestore();
|
|
903
|
+
expect(JSON.parse(out.join(''))).toMatchObject({ id: 'INS-5', droppedFields: ['nosuchfield'] });
|
|
904
|
+
expect(errOut.join('')).not.toContain('Fields rejected');
|
|
303
905
|
});
|
|
304
|
-
it('
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
906
|
+
it('the human receipt names the dropped field as a warning, with pb fields for the collection', () => {
|
|
907
|
+
const out = formatCaptureReceipt({
|
|
908
|
+
entryId: 'INS-5', name: 'an insight', collection: 'insights', statusLabel: 'Draft', classification: null,
|
|
909
|
+
warnings: ['Unknown fields dropped: nosuchfield. Expected: body (text, required).'],
|
|
910
|
+
normalization: { remapped: {}, rejected: ['nosuchfield'], accepted: [] },
|
|
911
|
+
});
|
|
912
|
+
expect(out).toContain('Warning: Unknown fields dropped: nosuchfield.');
|
|
913
|
+
expect(out).toContain('pb fields insights');
|
|
914
|
+
expect(out).not.toContain('Rejected fields');
|
|
915
|
+
});
|
|
916
|
+
});
|
|
917
|
+
describe('runCapture prints the kernel pool sentence (TASK-800)', () => {
|
|
918
|
+
const POOL = 'This workspace already has an unscoped strategy, Grow the core (STR-1). Saved as a draft. Scope this one to a product (belongs_to a product), or merge it into Grow the core by hand.';
|
|
919
|
+
beforeEach(() => {
|
|
920
|
+
kernelCallWithSessionMock.mockReset();
|
|
921
|
+
mockSession = { sessionId: 'sess-test' };
|
|
922
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
309
923
|
if (fn === 'chain.createEntry')
|
|
310
|
-
return Promise.resolve({ docId: '
|
|
924
|
+
return Promise.resolve({ docId: 'd', entryId: 'STR-2', status: 'draft', warnings: [POOL] });
|
|
311
925
|
return Promise.resolve({});
|
|
312
926
|
});
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
});
|
|
319
|
-
await runCapture({ text: 'TEN: no matches tension' });
|
|
320
|
-
// No "Grounding" banner in stderr when zero matches
|
|
321
|
-
const groundingInStderr = stderrLines.some((l) => l.includes('Grounding'));
|
|
322
|
-
expect(groundingInStderr).toBe(false);
|
|
927
|
+
});
|
|
928
|
+
it('--json carries the sentence verbatim in warnings', async () => {
|
|
929
|
+
const out = [];
|
|
930
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out.push(String(chunk)); return true; });
|
|
931
|
+
await runCapture({ text: 'Grow through partner referrals', collection: 'strategy', json: true });
|
|
323
932
|
writeSpy.mockRestore();
|
|
933
|
+
expect(JSON.parse(out.join(''))).toMatchObject({ id: 'STR-2', status: 'draft', warnings: [POOL] });
|
|
934
|
+
});
|
|
935
|
+
it('the human receipt prints the sentence verbatim', () => {
|
|
936
|
+
const out = formatCaptureReceipt({ entryId: 'STR-2', name: 'Grow through partner referrals', collection: 'strategy', statusLabel: 'Draft', classification: null, warnings: [POOL] });
|
|
937
|
+
expect(out).toContain(`Warning: ${POOL}`);
|
|
938
|
+
});
|
|
939
|
+
});
|
|
940
|
+
// TASK-894 (DEC-2113): no client pre-check answers before the kernel; every refusal is the server's own 400.
|
|
941
|
+
describe('runCapture leaves every refusal to the kernel', () => {
|
|
942
|
+
beforeEach(() => {
|
|
943
|
+
kernelCallWithSessionMock.mockReset();
|
|
944
|
+
mockSession = { sessionId: 'sess-test' };
|
|
945
|
+
});
|
|
946
|
+
it.each([
|
|
947
|
+
['the WHY gate', 'Governance entries (standard) require an explicit WHY before they can be created. Set "rationale" to at least 12 characters.'],
|
|
948
|
+
['an abstaining classifier', 'No collection fits this capture. Choose one: decisions, insights, tensions.'],
|
|
949
|
+
['the exact-name guard', 'Duplicate entry: "x" already exists in tensions.'],
|
|
950
|
+
])('%s: the one request is refused and the server sentence reaches the caller unchanged', async (_gate, reason) => {
|
|
951
|
+
kernelCallWithSessionMock.mockImplementation((fn) => (fn === 'chain.createEntry' ? Promise.reject(new CLIError(reason, { code: ErrorCode.VALIDATION_FAILED, category: 'validation' })) : Promise.resolve({})));
|
|
952
|
+
const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
|
|
953
|
+
await expect(runCapture({ text: 'x', collection: 'standards', field: ['rationale=short'] })).rejects.toThrow(reason);
|
|
954
|
+
expect(kernelCallWithSessionMock.mock.calls.map(([fn]) => fn)).toEqual(['chain.createEntry']);
|
|
324
955
|
stderrSpy.mockRestore();
|
|
325
956
|
});
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
957
|
+
});
|
|
958
|
+
describe('runCapture writes no date (TEN-4244, DEC-1787)', () => {
|
|
959
|
+
beforeEach(() => {
|
|
960
|
+
kernelCallWithSessionMock.mockReset();
|
|
961
|
+
mockSession = { sessionId: 'sess-test' };
|
|
962
|
+
});
|
|
963
|
+
it.each([
|
|
964
|
+
['tasks', 'TASK-10', 'Task due April 1, 2026'],
|
|
965
|
+
['decisions', 'DEC-10', 'Decision from April 1, 2026 steering meeting'],
|
|
966
|
+
['tasks', 'TASK-11', 'Task without any date'],
|
|
967
|
+
])('a %s capture carries no data.date, even when the text names a date', async (collection, entryId, text) => {
|
|
968
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
330
969
|
if (fn === 'chain.createEntry')
|
|
331
|
-
return Promise.resolve({ docId: 'doc-
|
|
970
|
+
return Promise.resolve({ docId: 'doc-3', entryId, collection });
|
|
332
971
|
return Promise.resolve({});
|
|
333
972
|
});
|
|
334
973
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
expect(
|
|
338
|
-
expect(
|
|
339
|
-
delete process.env.PB_GROUNDING_MODE;
|
|
974
|
+
await runCapture({ text });
|
|
975
|
+
const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
|
|
976
|
+
expect(createCall?.[1]).not.toHaveProperty('collectionSlug');
|
|
977
|
+
expect((createCall?.[1]).data).not.toHaveProperty('date');
|
|
340
978
|
writeSpy.mockRestore();
|
|
341
|
-
stderrSpy.mockRestore();
|
|
342
979
|
});
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
980
|
+
});
|
|
981
|
+
// TASK-894 (DEC-2113): the kernel judges inside chain.createEntry; the CLI renders its verdict.
|
|
982
|
+
describe('runCapture renders the kernel verdict', () => {
|
|
983
|
+
const ask = { kind: 'ask', matches: [{ entryId: 'TEN-5', name: 'Similar tension', collectionSlug: 'tensions', score: 0.6 }] };
|
|
984
|
+
beforeEach(() => {
|
|
985
|
+
kernelCallWithSessionMock.mockReset();
|
|
986
|
+
mockSession = { sessionId: 'sess-test' };
|
|
987
|
+
setOutputMode('auto'); // runner.ts keeps output mode at module level; an earlier json test must not leak it
|
|
988
|
+
});
|
|
989
|
+
async function capture(reply, options = {}) {
|
|
990
|
+
kernelCallWithSessionMock.mockImplementation((fn) => Promise.resolve(fn === 'chain.createEntry' ? { docId: 'doc-1', collection: 'tensions', ...reply } : {}));
|
|
991
|
+
let out = '';
|
|
992
|
+
let err = '';
|
|
993
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out += String(chunk); return true; });
|
|
994
|
+
const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation((chunk) => { err += String(chunk); return true; });
|
|
995
|
+
try {
|
|
996
|
+
await runCapture({ text: 'TEN: a capture', ...options });
|
|
997
|
+
}
|
|
998
|
+
finally {
|
|
999
|
+
writeSpy.mockRestore();
|
|
1000
|
+
stderrSpy.mockRestore();
|
|
1001
|
+
}
|
|
1002
|
+
return { out, err };
|
|
1003
|
+
}
|
|
1004
|
+
it('one request: no chain.capture, listCollections, resolveCollection, getCollectionFields or recordGroundingOutcome', async () => {
|
|
1005
|
+
await capture({ entryId: 'TEN-720', verdict: { kind: 'create' }, judged: true });
|
|
1006
|
+
expect(kernelCallWithSessionMock.mock.calls.map(([fn]) => fn)).toEqual(['chain.createEntry']);
|
|
1007
|
+
expect(kernelCallWithSessionMock.mock.calls[0][1]).toMatchObject({ name: 'TEN: a capture', description: 'TEN: a capture' });
|
|
1008
|
+
});
|
|
1009
|
+
it('a create verdict prints no Possible match line (TASK-608, DEC-1915)', async () => {
|
|
1010
|
+
const { err } = await capture({ entryId: 'TEN-722', verdict: { kind: 'create' }, judged: true });
|
|
1011
|
+
expect(err).not.toContain('Possible match');
|
|
1012
|
+
});
|
|
1013
|
+
// TASK-619 (TEN-4420): a close match is named and never written to.
|
|
1014
|
+
it('an ask names the match on stderr and never updates it', async () => {
|
|
1015
|
+
const { err } = await capture({ entryId: 'TEN-729', verdict: ask, judged: true });
|
|
1016
|
+
expect(err).toContain('Possible match: TEN-5 "Similar tension". Nothing was written to it');
|
|
1017
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.updateEntry', expect.anything());
|
|
1018
|
+
});
|
|
1019
|
+
it('a judge that missed its budget says the check is still running', async () => {
|
|
1020
|
+
const { err } = await capture({ entryId: 'TEN-730', judged: false });
|
|
1021
|
+
expect(err).toContain('The duplicate check is still running; pb get TEN-730');
|
|
1022
|
+
});
|
|
1023
|
+
it('a capped judge scan says more matches may exist', async () => {
|
|
1024
|
+
const { err } = await capture({ entryId: 'TEN-731', verdict: { kind: 'create', scanTruncated: true }, judged: true });
|
|
1025
|
+
expect(err).toContain('read a capped sample; more matching entries may exist');
|
|
1026
|
+
});
|
|
1027
|
+
it('--json is one clean line carrying possibleMatches, verdict and judged', async () => {
|
|
1028
|
+
const { out } = await capture({ entryId: 'TEN-725', verdict: ask, judged: true }, { json: true });
|
|
1029
|
+
const lines = out.split('\n').filter((l) => l.trim());
|
|
1030
|
+
expect(lines).toHaveLength(1);
|
|
1031
|
+
expect(JSON.parse(lines[0])).toMatchObject({
|
|
1032
|
+
id: 'TEN-725', collection: 'tensions', verdict: ask, judged: true,
|
|
1033
|
+
possibleMatches: [{ entryId: 'TEN-5', name: 'Similar tension', collection: 'tensions', score: 0.6 }],
|
|
1034
|
+
});
|
|
1035
|
+
});
|
|
1036
|
+
it('--json on a create verdict carries no possibleMatches field', async () => {
|
|
1037
|
+
const { out } = await capture({ entryId: 'TEN-726', verdict: { kind: 'create' }, judged: true }, { json: true });
|
|
1038
|
+
expect(JSON.parse(out.trim())).not.toHaveProperty('possibleMatches');
|
|
1039
|
+
});
|
|
1040
|
+
});
|
|
1041
|
+
// TASK-898 (DEC-2113): a re-sent capture the kernel replayed. The first send may have timed out before its link,
|
|
1042
|
+
// so the link is resent if-missing; nothing model-driven (the re-eval) or bookkeeping (the grounding outcome) runs
|
|
1043
|
+
// again, and the reply names the collection the first send landed in, not the retry's own resolution.
|
|
1044
|
+
describe('runCapture on a replayed reply (TASK-898)', () => {
|
|
1045
|
+
const REPLAY = { entryId: 'INS-60', docId: 'doc-60', status: 'draft', collection: 'decisions', replayed: true };
|
|
1046
|
+
function mockReplay(relate) {
|
|
1047
|
+
kernelCallWithSessionMock.mockReset();
|
|
1048
|
+
mockSession = { sessionId: 'sess-test' };
|
|
1049
|
+
kernelCallWithSessionMock.mockImplementation((fn) => {
|
|
348
1050
|
if (fn === 'chain.createEntry')
|
|
349
|
-
return Promise.resolve(
|
|
1051
|
+
return Promise.resolve(REPLAY);
|
|
1052
|
+
if (fn === 'chain.createEntryRelation')
|
|
1053
|
+
return relate();
|
|
350
1054
|
return Promise.resolve({});
|
|
351
1055
|
});
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
await runCapture({ text: 'TEN: json clean stdout', json: true });
|
|
359
|
-
// Stdout must be exactly one valid JSON line (jq .id must work)
|
|
360
|
-
const jsonLines = stdoutOutput.split('\n').filter((l) => { try {
|
|
361
|
-
JSON.parse(l);
|
|
362
|
-
return true;
|
|
1056
|
+
}
|
|
1057
|
+
async function run() {
|
|
1058
|
+
let out = '';
|
|
1059
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out += String(chunk); return true; });
|
|
1060
|
+
try {
|
|
1061
|
+
await runCapture({ text: 'INS: discovered Z', link: 'DEC-266', linkType: 'informed_by', json: true });
|
|
363
1062
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
1063
|
+
finally {
|
|
1064
|
+
writeSpy.mockRestore();
|
|
1065
|
+
}
|
|
1066
|
+
return out;
|
|
1067
|
+
}
|
|
1068
|
+
const calledFns = () => kernelCallWithSessionMock.mock.calls.map(([fn]) => fn);
|
|
1069
|
+
it('an already-existing link is success: exit 0, "existing", no re-eval, no outcome row, the kernel collection', async () => {
|
|
1070
|
+
mockReplay(() => Promise.reject(new CLIError('Duplicate relation: a "informed_by" relation from this entry to the target already exists.', { code: ErrorCode.VALIDATION_FAILED, category: 'validation' })));
|
|
1071
|
+
const output = JSON.parse((await run()).trim().split('\n').pop());
|
|
1072
|
+
expect(output).toMatchObject({ id: 'INS-60', collection: 'decisions', replayed: true, relationType: 'informed_by', linkOutcome: 'existing' });
|
|
1073
|
+
expect(calledFns()).not.toContain('quality.evaluateHeuristicAndSchedule');
|
|
1074
|
+
expect(calledFns()).not.toContain('chain.recordGroundingOutcome');
|
|
1075
|
+
});
|
|
1076
|
+
it('a link the first send never reached is written now, still with no re-eval', async () => {
|
|
1077
|
+
mockReplay(() => Promise.resolve({ relationId: 'rel-60' }));
|
|
1078
|
+
const output = JSON.parse((await run()).trim().split('\n').pop());
|
|
1079
|
+
expect(output).toMatchObject({ id: 'INS-60', collection: 'decisions', replayed: true, linkOutcome: 'written' });
|
|
1080
|
+
expect(calledFns().filter((fn) => fn === 'chain.createEntryRelation')).toHaveLength(1);
|
|
1081
|
+
expect(calledFns()).not.toContain('quality.evaluateHeuristicAndSchedule');
|
|
1082
|
+
});
|
|
1083
|
+
it('the receipt names the first send\'s collection and says the link is already there', async () => {
|
|
1084
|
+
mockReplay(() => Promise.reject(new CLIError('Duplicate relation: already exists.', { code: ErrorCode.VALIDATION_FAILED, category: 'validation' })));
|
|
1085
|
+
let out = '';
|
|
1086
|
+
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out += String(chunk); return true; });
|
|
1087
|
+
setOutputMode('pretty');
|
|
1088
|
+
try {
|
|
1089
|
+
await runCapture({ text: 'INS: discovered Z', link: 'DEC-266', linkType: 'informed_by' });
|
|
1090
|
+
}
|
|
1091
|
+
finally {
|
|
1092
|
+
setOutputMode('auto');
|
|
1093
|
+
writeSpy.mockRestore();
|
|
1094
|
+
}
|
|
1095
|
+
expect(out).toContain('decisions');
|
|
1096
|
+
expect(out).toContain('Already captured as INS-60');
|
|
1097
|
+
expect(out).toContain('Link informed_by DEC-266: already there.');
|
|
1098
|
+
});
|
|
1099
|
+
});
|
|
1100
|
+
// TASK-889 (TEN-4610, RULE-664): the capture receipt names the new row in the kernel's word, the one the Rail shows.
|
|
1101
|
+
describe('formatCaptureReceipt state word (TASK-889)', () => {
|
|
1102
|
+
it('prints the kernel label for a born-live question, never the stored trust word', () => {
|
|
1103
|
+
const out = formatCaptureReceipt({ entryId: 'Q-1', name: 'Who decides?', collection: 'questions', statusLabel: 'Open', classification: null });
|
|
1104
|
+
expect(out.split('\n')[0]).toBe('→ Q-1 captured as Open');
|
|
1105
|
+
expect(out).not.toContain('current');
|
|
1106
|
+
});
|
|
1107
|
+
it('names no state when the backend sends no label', () => {
|
|
1108
|
+
const out = formatCaptureReceipt({ entryId: 'Q-1', name: 'Who decides?', collection: 'questions', classification: null });
|
|
1109
|
+
expect(out.split('\n')[0]).toBe('→ Q-1 captured');
|
|
375
1110
|
});
|
|
376
1111
|
});
|
|
377
1112
|
//# sourceMappingURL=capture.test.js.map
|