@productbrain/cli 0.1.0-beta.91 → 0.1.0-beta.9118

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.
Files changed (1455) hide show
  1. package/README.md +11 -2
  2. package/dist/__tests__/adapters.test.js +76 -23
  3. package/dist/__tests__/adapters.test.js.map +1 -1
  4. package/dist/__tests__/adminConfig.test.d.ts +18 -0
  5. package/dist/__tests__/adminConfig.test.d.ts.map +1 -0
  6. package/dist/__tests__/adminConfig.test.js +221 -0
  7. package/dist/__tests__/adminConfig.test.js.map +1 -0
  8. package/dist/__tests__/batch-transformations.test.js +2 -26
  9. package/dist/__tests__/batch-transformations.test.js.map +1 -1
  10. package/dist/__tests__/canonicalRefs.vocab.test.d.ts +2 -0
  11. package/dist/__tests__/canonicalRefs.vocab.test.d.ts.map +1 -0
  12. package/dist/__tests__/canonicalRefs.vocab.test.js +251 -0
  13. package/dist/__tests__/canonicalRefs.vocab.test.js.map +1 -0
  14. package/dist/__tests__/capture-receipt-coaching.test.d.ts +2 -0
  15. package/dist/__tests__/capture-receipt-coaching.test.d.ts.map +1 -0
  16. package/dist/__tests__/capture-receipt-coaching.test.js +109 -0
  17. package/dist/__tests__/capture-receipt-coaching.test.js.map +1 -0
  18. package/dist/__tests__/capture-receipt-role-hint.test.d.ts +2 -0
  19. package/dist/__tests__/capture-receipt-role-hint.test.d.ts.map +1 -0
  20. package/dist/__tests__/capture-receipt-role-hint.test.js +66 -0
  21. package/dist/__tests__/capture-receipt-role-hint.test.js.map +1 -0
  22. package/dist/__tests__/capture-receipt-spine-floor.test.d.ts +2 -0
  23. package/dist/__tests__/capture-receipt-spine-floor.test.d.ts.map +1 -0
  24. package/dist/__tests__/capture-receipt-spine-floor.test.js +45 -0
  25. package/dist/__tests__/capture-receipt-spine-floor.test.js.map +1 -0
  26. package/dist/__tests__/capture.test.js +1339 -181
  27. package/dist/__tests__/capture.test.js.map +1 -1
  28. package/dist/__tests__/client-binding-guard.test.d.ts +2 -0
  29. package/dist/__tests__/client-binding-guard.test.d.ts.map +1 -0
  30. package/dist/__tests__/client-binding-guard.test.js +84 -0
  31. package/dist/__tests__/client-binding-guard.test.js.map +1 -0
  32. package/dist/__tests__/coaching-mirror-drift.test.d.ts +2 -0
  33. package/dist/__tests__/coaching-mirror-drift.test.d.ts.map +1 -0
  34. package/dist/__tests__/coaching-mirror-drift.test.js +47 -0
  35. package/dist/__tests__/coaching-mirror-drift.test.js.map +1 -0
  36. package/dist/__tests__/codex-prep-parity.test.d.ts +2 -0
  37. package/dist/__tests__/codex-prep-parity.test.d.ts.map +1 -0
  38. package/dist/__tests__/codex-prep-parity.test.js +87 -0
  39. package/dist/__tests__/codex-prep-parity.test.js.map +1 -0
  40. package/dist/__tests__/collection-registry-seed-drift.test.d.ts +2 -0
  41. package/dist/__tests__/collection-registry-seed-drift.test.d.ts.map +1 -0
  42. package/dist/__tests__/collection-registry-seed-drift.test.js +107 -0
  43. package/dist/__tests__/collection-registry-seed-drift.test.js.map +1 -0
  44. package/dist/__tests__/config-prod-fallthrough.test.d.ts +2 -0
  45. package/dist/__tests__/config-prod-fallthrough.test.d.ts.map +1 -0
  46. package/dist/__tests__/config-prod-fallthrough.test.js +93 -0
  47. package/dist/__tests__/config-prod-fallthrough.test.js.map +1 -0
  48. package/dist/__tests__/config.test.d.ts +1 -1
  49. package/dist/__tests__/config.test.js +845 -18
  50. package/dist/__tests__/config.test.js.map +1 -1
  51. package/dist/__tests__/constants.test.js +6 -1
  52. package/dist/__tests__/constants.test.js.map +1 -1
  53. package/dist/__tests__/constellation.test.js +26 -14
  54. package/dist/__tests__/constellation.test.js.map +1 -1
  55. package/dist/__tests__/conversation.test.d.ts +2 -0
  56. package/dist/__tests__/conversation.test.d.ts.map +1 -0
  57. package/dist/__tests__/conversation.test.js +113 -0
  58. package/dist/__tests__/conversation.test.js.map +1 -0
  59. package/dist/__tests__/entry-formatter.test.d.ts +2 -0
  60. package/dist/__tests__/entry-formatter.test.d.ts.map +1 -0
  61. package/dist/__tests__/entry-formatter.test.js +135 -0
  62. package/dist/__tests__/entry-formatter.test.js.map +1 -0
  63. package/dist/__tests__/entry-preflight.test.d.ts +2 -0
  64. package/dist/__tests__/entry-preflight.test.d.ts.map +1 -0
  65. package/dist/__tests__/entry-preflight.test.js +58 -0
  66. package/dist/__tests__/entry-preflight.test.js.map +1 -0
  67. package/dist/__tests__/entryAccept-batch.test.d.ts +2 -0
  68. package/dist/__tests__/entryAccept-batch.test.d.ts.map +1 -0
  69. package/dist/__tests__/entryAccept-batch.test.js +305 -0
  70. package/dist/__tests__/entryAccept-batch.test.js.map +1 -0
  71. package/dist/__tests__/entryAccept.test.d.ts +2 -0
  72. package/dist/__tests__/entryAccept.test.d.ts.map +1 -0
  73. package/dist/__tests__/entryAccept.test.js +506 -0
  74. package/dist/__tests__/entryAccept.test.js.map +1 -0
  75. package/dist/__tests__/entryDiscardResolve.test.d.ts +2 -0
  76. package/dist/__tests__/entryDiscardResolve.test.d.ts.map +1 -0
  77. package/dist/__tests__/entryDiscardResolve.test.js +28 -0
  78. package/dist/__tests__/entryDiscardResolve.test.js.map +1 -0
  79. package/dist/__tests__/entryOwn.test.d.ts +2 -0
  80. package/dist/__tests__/entryOwn.test.d.ts.map +1 -0
  81. package/dist/__tests__/entryOwn.test.js +50 -0
  82. package/dist/__tests__/entryOwn.test.js.map +1 -0
  83. package/dist/__tests__/entryTick.test.d.ts +2 -0
  84. package/dist/__tests__/entryTick.test.d.ts.map +1 -0
  85. package/dist/__tests__/entryTick.test.js +40 -0
  86. package/dist/__tests__/entryTick.test.js.map +1 -0
  87. package/dist/__tests__/envelope-contract.test.d.ts +15 -0
  88. package/dist/__tests__/envelope-contract.test.d.ts.map +1 -0
  89. package/dist/__tests__/envelope-contract.test.js +154 -0
  90. package/dist/__tests__/envelope-contract.test.js.map +1 -0
  91. package/dist/__tests__/errors.test.js +42 -0
  92. package/dist/__tests__/errors.test.js.map +1 -1
  93. package/dist/__tests__/fields.test.js +14 -3
  94. package/dist/__tests__/fields.test.js.map +1 -1
  95. package/dist/__tests__/gateway-dry-run-timeout.test.d.ts +2 -0
  96. package/dist/__tests__/gateway-dry-run-timeout.test.d.ts.map +1 -0
  97. package/dist/__tests__/gateway-dry-run-timeout.test.js +70 -0
  98. package/dist/__tests__/gateway-dry-run-timeout.test.js.map +1 -0
  99. package/dist/__tests__/gateway-timeout-body-phase.test.d.ts +2 -0
  100. package/dist/__tests__/gateway-timeout-body-phase.test.d.ts.map +1 -0
  101. package/dist/__tests__/gateway-timeout-body-phase.test.js +121 -0
  102. package/dist/__tests__/gateway-timeout-body-phase.test.js.map +1 -0
  103. package/dist/__tests__/handshake-augment.test.d.ts +2 -0
  104. package/dist/__tests__/handshake-augment.test.d.ts.map +1 -0
  105. package/dist/__tests__/handshake-augment.test.js +407 -0
  106. package/dist/__tests__/handshake-augment.test.js.map +1 -0
  107. package/dist/__tests__/handshake-dormancy.test.d.ts +2 -0
  108. package/dist/__tests__/handshake-dormancy.test.d.ts.map +1 -0
  109. package/dist/__tests__/handshake-dormancy.test.js +24 -0
  110. package/dist/__tests__/handshake-dormancy.test.js.map +1 -0
  111. package/dist/__tests__/handshake-formatter.test.d.ts +2 -0
  112. package/dist/__tests__/handshake-formatter.test.d.ts.map +1 -0
  113. package/dist/__tests__/handshake-formatter.test.js +111 -0
  114. package/dist/__tests__/handshake-formatter.test.js.map +1 -0
  115. package/dist/__tests__/handshake-preview.test.js +360 -16
  116. package/dist/__tests__/handshake-preview.test.js.map +1 -1
  117. package/dist/__tests__/handshake-session-threading.test.d.ts +2 -0
  118. package/dist/__tests__/handshake-session-threading.test.d.ts.map +1 -0
  119. package/dist/__tests__/handshake-session-threading.test.js +185 -0
  120. package/dist/__tests__/handshake-session-threading.test.js.map +1 -0
  121. package/dist/__tests__/handshake.e2e.test.d.ts +2 -0
  122. package/dist/__tests__/handshake.e2e.test.d.ts.map +1 -0
  123. package/dist/__tests__/handshake.e2e.test.js +226 -0
  124. package/dist/__tests__/handshake.e2e.test.js.map +1 -0
  125. package/dist/__tests__/handshake.test.js +828 -4
  126. package/dist/__tests__/handshake.test.js.map +1 -1
  127. package/dist/__tests__/health-gap-kinds-drift.test.d.ts +2 -0
  128. package/dist/__tests__/health-gap-kinds-drift.test.d.ts.map +1 -0
  129. package/dist/__tests__/health-gap-kinds-drift.test.js +43 -0
  130. package/dist/__tests__/health-gap-kinds-drift.test.js.map +1 -0
  131. package/dist/__tests__/hook-intents.test.js +2 -2
  132. package/dist/__tests__/hook-intents.test.js.map +1 -1
  133. package/dist/__tests__/ingest.test.js +9 -0
  134. package/dist/__tests__/ingest.test.js.map +1 -1
  135. package/dist/__tests__/init.test.js +51 -14
  136. package/dist/__tests__/init.test.js.map +1 -1
  137. package/dist/__tests__/kernel-value-sets-drift.test.d.ts +2 -0
  138. package/dist/__tests__/kernel-value-sets-drift.test.d.ts.map +1 -0
  139. package/dist/__tests__/kernel-value-sets-drift.test.js +46 -0
  140. package/dist/__tests__/kernel-value-sets-drift.test.js.map +1 -0
  141. package/dist/__tests__/kernel-value-sets-generator.test.d.ts +2 -0
  142. package/dist/__tests__/kernel-value-sets-generator.test.d.ts.map +1 -0
  143. package/dist/__tests__/kernel-value-sets-generator.test.js +108 -0
  144. package/dist/__tests__/kernel-value-sets-generator.test.js.map +1 -0
  145. package/dist/__tests__/manifest.test.js +118 -1
  146. package/dist/__tests__/manifest.test.js.map +1 -1
  147. package/dist/__tests__/method-registry.integration.test.js +2 -3
  148. package/dist/__tests__/method-registry.integration.test.js.map +1 -1
  149. package/dist/__tests__/method-registry.test.d.ts +6 -8
  150. package/dist/__tests__/method-registry.test.d.ts.map +1 -1
  151. package/dist/__tests__/method-registry.test.js +22 -70
  152. package/dist/__tests__/method-registry.test.js.map +1 -1
  153. package/dist/__tests__/missingPin.test.d.ts +11 -0
  154. package/dist/__tests__/missingPin.test.d.ts.map +1 -0
  155. package/dist/__tests__/missingPin.test.js +233 -0
  156. package/dist/__tests__/missingPin.test.js.map +1 -0
  157. package/dist/__tests__/notice-marker.test.d.ts +2 -0
  158. package/dist/__tests__/notice-marker.test.d.ts.map +1 -0
  159. package/dist/__tests__/notice-marker.test.js +176 -0
  160. package/dist/__tests__/notice-marker.test.js.map +1 -0
  161. package/dist/__tests__/onboarding-path-b.test.js +4 -4
  162. package/dist/__tests__/onboarding-path-b.test.js.map +1 -1
  163. package/dist/__tests__/onboarding.test.js +29 -5
  164. package/dist/__tests__/onboarding.test.js.map +1 -1
  165. package/dist/__tests__/onboardingFallback.test.d.ts +2 -0
  166. package/dist/__tests__/onboardingFallback.test.d.ts.map +1 -0
  167. package/dist/__tests__/onboardingFallback.test.js +74 -0
  168. package/dist/__tests__/onboardingFallback.test.js.map +1 -0
  169. package/dist/__tests__/orient.test.js +539 -18
  170. package/dist/__tests__/orient.test.js.map +1 -1
  171. package/dist/__tests__/perimeter.test.d.ts +2 -0
  172. package/dist/__tests__/perimeter.test.d.ts.map +1 -0
  173. package/dist/__tests__/perimeter.test.js +165 -0
  174. package/dist/__tests__/perimeter.test.js.map +1 -0
  175. package/dist/__tests__/personal-layer.test.d.ts +1 -2
  176. package/dist/__tests__/personal-layer.test.d.ts.map +1 -1
  177. package/dist/__tests__/personal-layer.test.js +12 -48
  178. package/dist/__tests__/personal-layer.test.js.map +1 -1
  179. package/dist/__tests__/preview-key-refresh.test.d.ts +2 -0
  180. package/dist/__tests__/preview-key-refresh.test.d.ts.map +1 -0
  181. package/dist/__tests__/preview-key-refresh.test.js +126 -0
  182. package/dist/__tests__/preview-key-refresh.test.js.map +1 -0
  183. package/dist/__tests__/profiles.test.js +613 -5
  184. package/dist/__tests__/profiles.test.js.map +1 -1
  185. package/dist/__tests__/proof-run.test.d.ts +2 -0
  186. package/dist/__tests__/proof-run.test.d.ts.map +1 -0
  187. package/dist/__tests__/proof-run.test.js +255 -0
  188. package/dist/__tests__/proof-run.test.js.map +1 -0
  189. package/dist/__tests__/rate-limit-resilience.test.d.ts +7 -0
  190. package/dist/__tests__/rate-limit-resilience.test.d.ts.map +1 -0
  191. package/dist/__tests__/rate-limit-resilience.test.js +209 -0
  192. package/dist/__tests__/rate-limit-resilience.test.js.map +1 -0
  193. package/dist/__tests__/read-target-notice.test.d.ts +2 -0
  194. package/dist/__tests__/read-target-notice.test.d.ts.map +1 -0
  195. package/dist/__tests__/read-target-notice.test.js +129 -0
  196. package/dist/__tests__/read-target-notice.test.js.map +1 -0
  197. package/dist/__tests__/relate.test.js +246 -14
  198. package/dist/__tests__/relate.test.js.map +1 -1
  199. package/dist/__tests__/reply-commands-registered.test.d.ts +2 -0
  200. package/dist/__tests__/reply-commands-registered.test.d.ts.map +1 -0
  201. package/dist/__tests__/reply-commands-registered.test.js +81 -0
  202. package/dist/__tests__/reply-commands-registered.test.js.map +1 -0
  203. package/dist/__tests__/repo-detect.test.js +18 -38
  204. package/dist/__tests__/repo-detect.test.js.map +1 -1
  205. package/dist/__tests__/reportedProfile.test.d.ts +2 -0
  206. package/dist/__tests__/reportedProfile.test.d.ts.map +1 -0
  207. package/dist/__tests__/reportedProfile.test.js +328 -0
  208. package/dist/__tests__/reportedProfile.test.js.map +1 -0
  209. package/dist/__tests__/restore.test.d.ts +2 -0
  210. package/dist/__tests__/restore.test.d.ts.map +1 -0
  211. package/dist/__tests__/restore.test.js +85 -0
  212. package/dist/__tests__/restore.test.js.map +1 -0
  213. package/dist/__tests__/route-latency-budget.test.d.ts +2 -0
  214. package/dist/__tests__/route-latency-budget.test.d.ts.map +1 -0
  215. package/dist/__tests__/route-latency-budget.test.js +106 -0
  216. package/dist/__tests__/route-latency-budget.test.js.map +1 -0
  217. package/dist/__tests__/runner.test.js +59 -44
  218. package/dist/__tests__/runner.test.js.map +1 -1
  219. package/dist/__tests__/session-binding-refusal-tenant.test.d.ts +2 -0
  220. package/dist/__tests__/session-binding-refusal-tenant.test.d.ts.map +1 -0
  221. package/dist/__tests__/session-binding-refusal-tenant.test.js +112 -0
  222. package/dist/__tests__/session-binding-refusal-tenant.test.js.map +1 -0
  223. package/dist/__tests__/session-close-loop.test.d.ts +2 -0
  224. package/dist/__tests__/session-close-loop.test.d.ts.map +1 -0
  225. package/dist/__tests__/session-close-loop.test.js +213 -0
  226. package/dist/__tests__/session-close-loop.test.js.map +1 -0
  227. package/dist/__tests__/session-label.test.d.ts +2 -0
  228. package/dist/__tests__/session-label.test.d.ts.map +1 -0
  229. package/dist/__tests__/session-label.test.js +46 -0
  230. package/dist/__tests__/session-label.test.js.map +1 -0
  231. package/dist/__tests__/session-list-show.test.d.ts +2 -0
  232. package/dist/__tests__/session-list-show.test.d.ts.map +1 -0
  233. package/dist/__tests__/session-list-show.test.js +174 -0
  234. package/dist/__tests__/session-list-show.test.js.map +1 -0
  235. package/dist/__tests__/session-reset.test.d.ts +2 -0
  236. package/dist/__tests__/session-reset.test.d.ts.map +1 -0
  237. package/dist/__tests__/session-reset.test.js +138 -0
  238. package/dist/__tests__/session-reset.test.js.map +1 -0
  239. package/dist/__tests__/session-resume-backstop.test.d.ts +2 -0
  240. package/dist/__tests__/session-resume-backstop.test.d.ts.map +1 -0
  241. package/dist/__tests__/session-resume-backstop.test.js +139 -0
  242. package/dist/__tests__/session-resume-backstop.test.js.map +1 -0
  243. package/dist/__tests__/session-role-name-sanitize.test.d.ts +2 -0
  244. package/dist/__tests__/session-role-name-sanitize.test.d.ts.map +1 -0
  245. package/dist/__tests__/session-role-name-sanitize.test.js +127 -0
  246. package/dist/__tests__/session-role-name-sanitize.test.js.map +1 -0
  247. package/dist/__tests__/session-start-key-refresh.test.d.ts +2 -0
  248. package/dist/__tests__/session-start-key-refresh.test.d.ts.map +1 -0
  249. package/dist/__tests__/session-start-key-refresh.test.js +197 -0
  250. package/dist/__tests__/session-start-key-refresh.test.js.map +1 -0
  251. package/dist/__tests__/session-state-machine.test.js +235 -10
  252. package/dist/__tests__/session-state-machine.test.js.map +1 -1
  253. package/dist/__tests__/session-switch.test.d.ts +2 -0
  254. package/dist/__tests__/session-switch.test.d.ts.map +1 -0
  255. package/dist/__tests__/session-switch.test.js +344 -0
  256. package/dist/__tests__/session-switch.test.js.map +1 -0
  257. package/dist/__tests__/session-touch.test.js +6 -1
  258. package/dist/__tests__/session-touch.test.js.map +1 -1
  259. package/dist/__tests__/sessionBinding.test.d.ts +2 -0
  260. package/dist/__tests__/sessionBinding.test.d.ts.map +1 -0
  261. package/dist/__tests__/sessionBinding.test.js +118 -0
  262. package/dist/__tests__/sessionBinding.test.js.map +1 -0
  263. package/dist/__tests__/sessionByIdLookup.test.d.ts +2 -0
  264. package/dist/__tests__/sessionByIdLookup.test.d.ts.map +1 -0
  265. package/dist/__tests__/sessionByIdLookup.test.js +63 -0
  266. package/dist/__tests__/sessionByIdLookup.test.js.map +1 -0
  267. package/dist/__tests__/skill-vocabulary.test.d.ts +21 -0
  268. package/dist/__tests__/skill-vocabulary.test.d.ts.map +1 -0
  269. package/dist/__tests__/skill-vocabulary.test.js +192 -0
  270. package/dist/__tests__/skill-vocabulary.test.js.map +1 -0
  271. package/dist/__tests__/state.test.js +21 -1
  272. package/dist/__tests__/state.test.js.map +1 -1
  273. package/dist/__tests__/stillTrue.test.d.ts +2 -0
  274. package/dist/__tests__/stillTrue.test.d.ts.map +1 -0
  275. package/dist/__tests__/stillTrue.test.js +52 -0
  276. package/dist/__tests__/stillTrue.test.js.map +1 -0
  277. package/dist/__tests__/strip.test.js +57 -3
  278. package/dist/__tests__/strip.test.js.map +1 -1
  279. package/dist/__tests__/tenant-notice-write-path.test.d.ts +2 -0
  280. package/dist/__tests__/tenant-notice-write-path.test.d.ts.map +1 -0
  281. package/dist/__tests__/tenant-notice-write-path.test.js +169 -0
  282. package/dist/__tests__/tenant-notice-write-path.test.js.map +1 -0
  283. package/dist/__tests__/update-check.test.d.ts +2 -0
  284. package/dist/__tests__/update-check.test.d.ts.map +1 -0
  285. package/dist/__tests__/update-check.test.js +215 -0
  286. package/dist/__tests__/update-check.test.js.map +1 -0
  287. package/dist/__tests__/update.test.js +458 -8
  288. package/dist/__tests__/update.test.js.map +1 -1
  289. package/dist/__tests__/upgrade-runner.test.d.ts +2 -0
  290. package/dist/__tests__/upgrade-runner.test.d.ts.map +1 -0
  291. package/dist/__tests__/upgrade-runner.test.js +54 -0
  292. package/dist/__tests__/upgrade-runner.test.js.map +1 -0
  293. package/dist/__tests__/upgrade.test.d.ts +2 -0
  294. package/dist/__tests__/upgrade.test.d.ts.map +1 -0
  295. package/dist/__tests__/upgrade.test.js +56 -0
  296. package/dist/__tests__/upgrade.test.js.map +1 -0
  297. package/dist/__tests__/verify-formatter.test.d.ts +2 -0
  298. package/dist/__tests__/verify-formatter.test.d.ts.map +1 -0
  299. package/dist/__tests__/verify-formatter.test.js +85 -0
  300. package/dist/__tests__/verify-formatter.test.js.map +1 -0
  301. package/dist/__tests__/vocabulary-leak.test.d.ts +33 -0
  302. package/dist/__tests__/vocabulary-leak.test.d.ts.map +1 -0
  303. package/dist/__tests__/vocabulary-leak.test.js +430 -0
  304. package/dist/__tests__/vocabulary-leak.test.js.map +1 -0
  305. package/dist/__tests__/workspace.test.js +31 -20
  306. package/dist/__tests__/workspace.test.js.map +1 -1
  307. package/dist/__tests__/workspaceNotice.test.d.ts +2 -0
  308. package/dist/__tests__/workspaceNotice.test.d.ts.map +1 -0
  309. package/dist/__tests__/workspaceNotice.test.js +571 -0
  310. package/dist/__tests__/workspaceNotice.test.js.map +1 -0
  311. package/dist/commands/__tests__/connect-handoff.test.d.ts +11 -0
  312. package/dist/commands/__tests__/connect-handoff.test.d.ts.map +1 -0
  313. package/dist/commands/__tests__/connect-handoff.test.js +111 -0
  314. package/dist/commands/__tests__/connect-handoff.test.js.map +1 -0
  315. package/dist/commands/__tests__/quality.test.d.ts +2 -0
  316. package/dist/commands/__tests__/quality.test.d.ts.map +1 -0
  317. package/dist/commands/__tests__/quality.test.js +156 -0
  318. package/dist/commands/__tests__/quality.test.js.map +1 -0
  319. package/dist/commands/__tests__/rework.test.d.ts +2 -0
  320. package/dist/commands/__tests__/rework.test.d.ts.map +1 -0
  321. package/dist/commands/__tests__/rework.test.js +149 -0
  322. package/dist/commands/__tests__/rework.test.js.map +1 -0
  323. package/dist/commands/__tests__/tensionsList.test.d.ts +2 -0
  324. package/dist/commands/__tests__/tensionsList.test.d.ts.map +1 -0
  325. package/dist/commands/__tests__/tensionsList.test.js +63 -0
  326. package/dist/commands/__tests__/tensionsList.test.js.map +1 -0
  327. package/dist/commands/accept-policy.d.ts +10 -0
  328. package/dist/commands/accept-policy.d.ts.map +1 -0
  329. package/dist/commands/accept-policy.js +107 -0
  330. package/dist/commands/accept-policy.js.map +1 -0
  331. package/dist/commands/admin/cockpit.d.ts +2 -13
  332. package/dist/commands/admin/cockpit.d.ts.map +1 -1
  333. package/dist/commands/admin/cockpit.js +5 -5
  334. package/dist/commands/admin/cockpit.js.map +1 -1
  335. package/dist/commands/admin/index.d.ts +49 -0
  336. package/dist/commands/admin/index.d.ts.map +1 -1
  337. package/dist/commands/admin/index.js +148 -29
  338. package/dist/commands/admin/index.js.map +1 -1
  339. package/dist/commands/admin/index.test.d.ts +2 -0
  340. package/dist/commands/admin/index.test.d.ts.map +1 -0
  341. package/dist/commands/admin/index.test.js +94 -0
  342. package/dist/commands/admin/index.test.js.map +1 -0
  343. package/dist/commands/admin/inspect.js +1 -1
  344. package/dist/commands/admin/inspect.js.map +1 -1
  345. package/dist/commands/admin/probe.d.ts +75 -0
  346. package/dist/commands/admin/probe.d.ts.map +1 -0
  347. package/dist/commands/admin/probe.js +224 -0
  348. package/dist/commands/admin/probe.js.map +1 -0
  349. package/dist/commands/admin/probe.test.d.ts +2 -0
  350. package/dist/commands/admin/probe.test.d.ts.map +1 -0
  351. package/dist/commands/admin/probe.test.js +193 -0
  352. package/dist/commands/admin/probe.test.js.map +1 -0
  353. package/dist/commands/admin/run.d.ts +43 -0
  354. package/dist/commands/admin/run.d.ts.map +1 -0
  355. package/dist/commands/admin/run.js +78 -0
  356. package/dist/commands/admin/run.js.map +1 -0
  357. package/dist/commands/admin/run.test.d.ts +18 -0
  358. package/dist/commands/admin/run.test.d.ts.map +1 -0
  359. package/dist/commands/admin/run.test.js +168 -0
  360. package/dist/commands/admin/run.test.js.map +1 -0
  361. package/dist/commands/admin/seed.d.ts +32 -3
  362. package/dist/commands/admin/seed.d.ts.map +1 -1
  363. package/dist/commands/admin/seed.js +308 -113
  364. package/dist/commands/admin/seed.js.map +1 -1
  365. package/dist/commands/admin/seed.test.d.ts +4 -0
  366. package/dist/commands/admin/seed.test.d.ts.map +1 -1
  367. package/dist/commands/admin/seed.test.js +30 -9
  368. package/dist/commands/admin/seed.test.js.map +1 -1
  369. package/dist/commands/admin/seedRegistryEntries.generated.d.ts +14 -0
  370. package/dist/commands/admin/seedRegistryEntries.generated.d.ts.map +1 -0
  371. package/dist/commands/admin/seedRegistryEntries.generated.js +45 -0
  372. package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -0
  373. package/dist/commands/admin/seedRegistryEntries.test.d.ts +13 -0
  374. package/dist/commands/admin/seedRegistryEntries.test.d.ts.map +1 -0
  375. package/dist/commands/admin/seedRegistryEntries.test.js +100 -0
  376. package/dist/commands/admin/seedRegistryEntries.test.js.map +1 -0
  377. package/dist/commands/admin/seedRowType.d.ts +22 -0
  378. package/dist/commands/admin/seedRowType.d.ts.map +1 -0
  379. package/dist/commands/admin/seedRowType.js +2 -0
  380. package/dist/commands/admin/seedRowType.js.map +1 -0
  381. package/dist/commands/admin/seedStatusColor.d.ts +9 -0
  382. package/dist/commands/admin/seedStatusColor.d.ts.map +1 -0
  383. package/dist/commands/admin/seedStatusColor.js +19 -0
  384. package/dist/commands/admin/seedStatusColor.js.map +1 -0
  385. package/dist/commands/admin/seedStatusColor.test.d.ts +2 -0
  386. package/dist/commands/admin/seedStatusColor.test.d.ts.map +1 -0
  387. package/dist/commands/admin/seedStatusColor.test.js +31 -0
  388. package/dist/commands/admin/seedStatusColor.test.js.map +1 -0
  389. package/dist/commands/brief.d.ts.map +1 -1
  390. package/dist/commands/brief.js +24 -2
  391. package/dist/commands/brief.js.map +1 -1
  392. package/dist/commands/capture.d.ts +15 -9
  393. package/dist/commands/capture.d.ts.map +1 -1
  394. package/dist/commands/capture.js +173 -228
  395. package/dist/commands/capture.js.map +1 -1
  396. package/dist/commands/chain-walk.d.ts.map +1 -1
  397. package/dist/commands/chain-walk.js.map +1 -1
  398. package/dist/commands/changes.d.ts.map +1 -1
  399. package/dist/commands/changes.js.map +1 -1
  400. package/dist/commands/codex-prep.d.ts +12 -1
  401. package/dist/commands/codex-prep.d.ts.map +1 -1
  402. package/dist/commands/codex-prep.js +18 -84
  403. package/dist/commands/codex-prep.js.map +1 -1
  404. package/dist/commands/collections.d.ts.map +1 -1
  405. package/dist/commands/collections.js.map +1 -1
  406. package/dist/commands/conflicts.d.ts +40 -0
  407. package/dist/commands/conflicts.d.ts.map +1 -0
  408. package/dist/commands/conflicts.js +267 -0
  409. package/dist/commands/conflicts.js.map +1 -0
  410. package/dist/commands/conflicts.test.d.ts +2 -0
  411. package/dist/commands/conflicts.test.d.ts.map +1 -0
  412. package/dist/commands/conflicts.test.js +219 -0
  413. package/dist/commands/conflicts.test.js.map +1 -0
  414. package/dist/commands/connect-config.test.d.ts +2 -0
  415. package/dist/commands/connect-config.test.d.ts.map +1 -0
  416. package/dist/commands/connect-config.test.js +44 -0
  417. package/dist/commands/connect-config.test.js.map +1 -0
  418. package/dist/commands/connect-context.d.ts +55 -0
  419. package/dist/commands/connect-context.d.ts.map +1 -0
  420. package/dist/commands/connect-context.js +78 -0
  421. package/dist/commands/connect-context.js.map +1 -0
  422. package/dist/commands/connect-context.test.d.ts +2 -0
  423. package/dist/commands/connect-context.test.d.ts.map +1 -0
  424. package/dist/commands/connect-context.test.js +148 -0
  425. package/dist/commands/connect-context.test.js.map +1 -0
  426. package/dist/commands/connect-handoff.d.ts +51 -0
  427. package/dist/commands/connect-handoff.d.ts.map +1 -0
  428. package/dist/commands/connect-handoff.js +70 -0
  429. package/dist/commands/connect-handoff.js.map +1 -0
  430. package/dist/commands/connect-integration.test.js +44 -16
  431. package/dist/commands/connect-integration.test.js.map +1 -1
  432. package/dist/commands/connect-legacy-migration.test.d.ts +2 -0
  433. package/dist/commands/connect-legacy-migration.test.d.ts.map +1 -0
  434. package/dist/commands/connect-legacy-migration.test.js +109 -0
  435. package/dist/commands/connect-legacy-migration.test.js.map +1 -0
  436. package/dist/commands/connect-screens.d.ts +17 -4
  437. package/dist/commands/connect-screens.d.ts.map +1 -1
  438. package/dist/commands/connect-screens.js +83 -19
  439. package/dist/commands/connect-screens.js.map +1 -1
  440. package/dist/commands/connect.d.ts +27 -6
  441. package/dist/commands/connect.d.ts.map +1 -1
  442. package/dist/commands/connect.js +254 -75
  443. package/dist/commands/connect.js.map +1 -1
  444. package/dist/commands/connect.test.js +344 -7
  445. package/dist/commands/connect.test.js.map +1 -1
  446. package/dist/commands/constellation.d.ts.map +1 -1
  447. package/dist/commands/constellation.js.map +1 -1
  448. package/dist/commands/context.d.ts.map +1 -1
  449. package/dist/commands/context.js.map +1 -1
  450. package/dist/commands/cross-cut.d.ts.map +1 -1
  451. package/dist/commands/cross-cut.js.map +1 -1
  452. package/dist/commands/digest.d.ts +17 -0
  453. package/dist/commands/digest.d.ts.map +1 -0
  454. package/dist/commands/digest.js +58 -0
  455. package/dist/commands/digest.js.map +1 -0
  456. package/dist/commands/digest.test.d.ts +2 -0
  457. package/dist/commands/digest.test.d.ts.map +1 -0
  458. package/dist/commands/digest.test.js +36 -0
  459. package/dist/commands/digest.test.js.map +1 -0
  460. package/dist/commands/direction.d.ts +10 -0
  461. package/dist/commands/direction.d.ts.map +1 -0
  462. package/dist/commands/direction.js +79 -0
  463. package/dist/commands/direction.js.map +1 -0
  464. package/dist/commands/doctor.d.ts.map +1 -1
  465. package/dist/commands/doctor.js +173 -38
  466. package/dist/commands/doctor.js.map +1 -1
  467. package/dist/commands/doctor.test.js +352 -6
  468. package/dist/commands/doctor.test.js.map +1 -1
  469. package/dist/commands/entryAccept.d.ts +24 -0
  470. package/dist/commands/entryAccept.d.ts.map +1 -0
  471. package/dist/commands/entryAccept.js +296 -0
  472. package/dist/commands/entryAccept.js.map +1 -0
  473. package/dist/commands/entryDiscardResolve.d.ts +9 -0
  474. package/dist/commands/entryDiscardResolve.d.ts.map +1 -0
  475. package/dist/commands/entryDiscardResolve.js +27 -0
  476. package/dist/commands/entryDiscardResolve.js.map +1 -0
  477. package/dist/commands/entryOwn.d.ts +5 -0
  478. package/dist/commands/entryOwn.d.ts.map +1 -0
  479. package/dist/commands/entryOwn.js +17 -0
  480. package/dist/commands/entryOwn.js.map +1 -0
  481. package/dist/commands/entryPreflight.d.ts +8 -0
  482. package/dist/commands/entryPreflight.d.ts.map +1 -0
  483. package/dist/commands/entryPreflight.js +48 -0
  484. package/dist/commands/entryPreflight.js.map +1 -0
  485. package/dist/commands/entryTick.d.ts +8 -0
  486. package/dist/commands/entryTick.d.ts.map +1 -0
  487. package/dist/commands/entryTick.js +43 -0
  488. package/dist/commands/entryTick.js.map +1 -0
  489. package/dist/commands/feedback.d.ts +36 -0
  490. package/dist/commands/feedback.d.ts.map +1 -0
  491. package/dist/commands/feedback.js +174 -0
  492. package/dist/commands/feedback.js.map +1 -0
  493. package/dist/commands/feedback.test.d.ts +2 -0
  494. package/dist/commands/feedback.test.d.ts.map +1 -0
  495. package/dist/commands/feedback.test.js +109 -0
  496. package/dist/commands/feedback.test.js.map +1 -0
  497. package/dist/commands/fields.d.ts.map +1 -1
  498. package/dist/commands/fields.js +1 -1
  499. package/dist/commands/fields.js.map +1 -1
  500. package/dist/commands/files.d.ts +26 -0
  501. package/dist/commands/files.d.ts.map +1 -0
  502. package/dist/commands/files.js +160 -0
  503. package/dist/commands/files.js.map +1 -0
  504. package/dist/commands/files.test.d.ts +2 -0
  505. package/dist/commands/files.test.d.ts.map +1 -0
  506. package/dist/commands/files.test.js +278 -0
  507. package/dist/commands/files.test.js.map +1 -0
  508. package/dist/commands/handshake.d.ts +57 -9
  509. package/dist/commands/handshake.d.ts.map +1 -1
  510. package/dist/commands/handshake.js +781 -157
  511. package/dist/commands/handshake.js.map +1 -1
  512. package/dist/commands/handshakeCursorSkillCleanup.d.ts +36 -0
  513. package/dist/commands/handshakeCursorSkillCleanup.d.ts.map +1 -0
  514. package/dist/commands/handshakeCursorSkillCleanup.js +110 -0
  515. package/dist/commands/handshakeCursorSkillCleanup.js.map +1 -0
  516. package/dist/commands/handshakeDriftClassification.d.ts +33 -0
  517. package/dist/commands/handshakeDriftClassification.d.ts.map +1 -0
  518. package/dist/commands/handshakeDriftClassification.js +62 -0
  519. package/dist/commands/handshakeDriftClassification.js.map +1 -0
  520. package/dist/commands/history.d.ts +30 -0
  521. package/dist/commands/history.d.ts.map +1 -0
  522. package/dist/commands/history.js +62 -0
  523. package/dist/commands/history.js.map +1 -0
  524. package/dist/commands/history.test.d.ts +2 -0
  525. package/dist/commands/history.test.d.ts.map +1 -0
  526. package/dist/commands/history.test.js +106 -0
  527. package/dist/commands/history.test.js.map +1 -0
  528. package/dist/commands/ingest.d.ts.map +1 -1
  529. package/dist/commands/ingest.js +9 -0
  530. package/dist/commands/ingest.js.map +1 -1
  531. package/dist/commands/init.d.ts +1 -1
  532. package/dist/commands/init.d.ts.map +1 -1
  533. package/dist/commands/init.js +22 -13
  534. package/dist/commands/init.js.map +1 -1
  535. package/dist/commands/organisation.d.ts +16 -0
  536. package/dist/commands/organisation.d.ts.map +1 -0
  537. package/dist/commands/organisation.js +184 -0
  538. package/dist/commands/organisation.js.map +1 -0
  539. package/dist/commands/organisation.test.d.ts +2 -0
  540. package/dist/commands/organisation.test.d.ts.map +1 -0
  541. package/dist/commands/organisation.test.js +198 -0
  542. package/dist/commands/organisation.test.js.map +1 -0
  543. package/dist/commands/organisationHierarchy.d.ts +8 -0
  544. package/dist/commands/organisationHierarchy.d.ts.map +1 -0
  545. package/dist/commands/organisationHierarchy.js +75 -0
  546. package/dist/commands/organisationHierarchy.js.map +1 -0
  547. package/dist/commands/organisationHierarchy.test.d.ts +2 -0
  548. package/dist/commands/organisationHierarchy.test.d.ts.map +1 -0
  549. package/dist/commands/organisationHierarchy.test.js +72 -0
  550. package/dist/commands/organisationHierarchy.test.js.map +1 -0
  551. package/dist/commands/organisationWrite.d.ts +18 -0
  552. package/dist/commands/organisationWrite.d.ts.map +1 -0
  553. package/dist/commands/organisationWrite.js +71 -0
  554. package/dist/commands/organisationWrite.js.map +1 -0
  555. package/dist/commands/orient.d.ts +82 -64
  556. package/dist/commands/orient.d.ts.map +1 -1
  557. package/dist/commands/orient.js +226 -18
  558. package/dist/commands/orient.js.map +1 -1
  559. package/dist/commands/outcome.d.ts +91 -0
  560. package/dist/commands/outcome.d.ts.map +1 -0
  561. package/dist/commands/outcome.js +204 -0
  562. package/dist/commands/outcome.js.map +1 -0
  563. package/dist/commands/outcome.test.d.ts +2 -0
  564. package/dist/commands/outcome.test.d.ts.map +1 -0
  565. package/dist/commands/outcome.test.js +308 -0
  566. package/dist/commands/outcome.test.js.map +1 -0
  567. package/dist/commands/profile.d.ts +34 -2
  568. package/dist/commands/profile.d.ts.map +1 -1
  569. package/dist/commands/profile.js +294 -41
  570. package/dist/commands/profile.js.map +1 -1
  571. package/dist/commands/proof-run.d.ts +51 -0
  572. package/dist/commands/proof-run.d.ts.map +1 -0
  573. package/dist/commands/proof-run.js +209 -0
  574. package/dist/commands/proof-run.js.map +1 -0
  575. package/dist/commands/quality.d.ts +16 -0
  576. package/dist/commands/quality.d.ts.map +1 -0
  577. package/dist/commands/quality.js +29 -0
  578. package/dist/commands/quality.js.map +1 -0
  579. package/dist/commands/questions.d.ts +23 -0
  580. package/dist/commands/questions.d.ts.map +1 -0
  581. package/dist/commands/questions.js +238 -0
  582. package/dist/commands/questions.js.map +1 -0
  583. package/dist/commands/questions.test.d.ts +2 -0
  584. package/dist/commands/questions.test.d.ts.map +1 -0
  585. package/dist/commands/questions.test.js +159 -0
  586. package/dist/commands/questions.test.js.map +1 -0
  587. package/dist/commands/relate.d.ts +1 -0
  588. package/dist/commands/relate.d.ts.map +1 -1
  589. package/dist/commands/relate.js +94 -7
  590. package/dist/commands/relate.js.map +1 -1
  591. package/dist/commands/restore.d.ts +2 -0
  592. package/dist/commands/restore.d.ts.map +1 -0
  593. package/dist/commands/restore.js +83 -0
  594. package/dist/commands/restore.js.map +1 -0
  595. package/dist/commands/rework.d.ts +24 -0
  596. package/dist/commands/rework.d.ts.map +1 -0
  597. package/dist/commands/rework.js +97 -0
  598. package/dist/commands/rework.js.map +1 -0
  599. package/dist/commands/role.d.ts +49 -0
  600. package/dist/commands/role.d.ts.map +1 -0
  601. package/dist/commands/role.js +126 -0
  602. package/dist/commands/role.js.map +1 -0
  603. package/dist/commands/role.test.d.ts +2 -0
  604. package/dist/commands/role.test.d.ts.map +1 -0
  605. package/dist/commands/role.test.js +195 -0
  606. package/dist/commands/role.test.js.map +1 -0
  607. package/dist/commands/scoreboard.d.ts +26 -0
  608. package/dist/commands/scoreboard.d.ts.map +1 -0
  609. package/dist/commands/scoreboard.js +40 -0
  610. package/dist/commands/scoreboard.js.map +1 -0
  611. package/dist/commands/search.d.ts.map +1 -1
  612. package/dist/commands/search.js.map +1 -1
  613. package/dist/commands/session.d.ts +60 -7
  614. package/dist/commands/session.d.ts.map +1 -1
  615. package/dist/commands/session.js +413 -69
  616. package/dist/commands/session.js.map +1 -1
  617. package/dist/commands/shape.d.ts +16 -0
  618. package/dist/commands/shape.d.ts.map +1 -0
  619. package/dist/commands/shape.js +149 -0
  620. package/dist/commands/shape.js.map +1 -0
  621. package/dist/commands/shape.test.d.ts +2 -0
  622. package/dist/commands/shape.test.d.ts.map +1 -0
  623. package/dist/commands/shape.test.js +148 -0
  624. package/dist/commands/shape.test.js.map +1 -0
  625. package/dist/commands/status.d.ts +7 -0
  626. package/dist/commands/status.d.ts.map +1 -0
  627. package/dist/commands/status.js +102 -0
  628. package/dist/commands/status.js.map +1 -0
  629. package/dist/commands/status.test.d.ts +2 -0
  630. package/dist/commands/status.test.d.ts.map +1 -0
  631. package/dist/commands/status.test.js +75 -0
  632. package/dist/commands/status.test.js.map +1 -0
  633. package/dist/commands/stillTrue.d.ts +14 -0
  634. package/dist/commands/stillTrue.d.ts.map +1 -0
  635. package/dist/commands/stillTrue.js +48 -0
  636. package/dist/commands/stillTrue.js.map +1 -0
  637. package/dist/commands/tensionsList.d.ts +5 -0
  638. package/dist/commands/tensionsList.d.ts.map +1 -0
  639. package/dist/commands/tensionsList.js +27 -0
  640. package/dist/commands/tensionsList.js.map +1 -0
  641. package/dist/commands/update.d.ts +21 -0
  642. package/dist/commands/update.d.ts.map +1 -1
  643. package/dist/commands/update.js +157 -42
  644. package/dist/commands/update.js.map +1 -1
  645. package/dist/commands/upgrade.d.ts +5 -0
  646. package/dist/commands/upgrade.d.ts.map +1 -0
  647. package/dist/commands/upgrade.js +110 -0
  648. package/dist/commands/upgrade.js.map +1 -0
  649. package/dist/commands/usage.d.ts.map +1 -1
  650. package/dist/commands/usage.js +0 -18
  651. package/dist/commands/usage.js.map +1 -1
  652. package/dist/commands/verify.d.ts.map +1 -1
  653. package/dist/commands/verify.js +7 -1
  654. package/dist/commands/verify.js.map +1 -1
  655. package/dist/commands/welcome.d.ts.map +1 -1
  656. package/dist/commands/welcome.js +5 -2
  657. package/dist/commands/welcome.js.map +1 -1
  658. package/dist/commands/whoami.d.ts +20 -0
  659. package/dist/commands/whoami.d.ts.map +1 -0
  660. package/dist/commands/whoami.js +126 -0
  661. package/dist/commands/whoami.js.map +1 -0
  662. package/dist/commands/whoami.test.d.ts +2 -0
  663. package/dist/commands/whoami.test.d.ts.map +1 -0
  664. package/dist/commands/whoami.test.js +130 -0
  665. package/dist/commands/whoami.test.js.map +1 -0
  666. package/dist/commands/workspace.d.ts +18 -3
  667. package/dist/commands/workspace.d.ts.map +1 -1
  668. package/dist/commands/workspace.js +5 -3
  669. package/dist/commands/workspace.js.map +1 -1
  670. package/dist/formatters/__tests__/orient-provenance.test.d.ts +6 -0
  671. package/dist/formatters/__tests__/orient-provenance.test.d.ts.map +1 -0
  672. package/dist/formatters/__tests__/orient-provenance.test.js +322 -0
  673. package/dist/formatters/__tests__/orient-provenance.test.js.map +1 -0
  674. package/dist/formatters/__tests__/orient-ruleLists.test.d.ts +2 -0
  675. package/dist/formatters/__tests__/orient-ruleLists.test.d.ts.map +1 -0
  676. package/dist/formatters/__tests__/orient-ruleLists.test.js +93 -0
  677. package/dist/formatters/__tests__/orient-ruleLists.test.js.map +1 -0
  678. package/dist/formatters/__tests__/session-list-show.test.d.ts +2 -0
  679. package/dist/formatters/__tests__/session-list-show.test.d.ts.map +1 -0
  680. package/dist/formatters/__tests__/session-list-show.test.js +195 -0
  681. package/dist/formatters/__tests__/session-list-show.test.js.map +1 -0
  682. package/dist/formatters/__tests__/session.test.d.ts +2 -0
  683. package/dist/formatters/__tests__/session.test.d.ts.map +1 -0
  684. package/dist/formatters/__tests__/session.test.js +193 -0
  685. package/dist/formatters/__tests__/session.test.js.map +1 -0
  686. package/dist/formatters/__tests__/tensionsList.test.d.ts +2 -0
  687. package/dist/formatters/__tests__/tensionsList.test.d.ts.map +1 -0
  688. package/dist/formatters/__tests__/tensionsList.test.js +30 -0
  689. package/dist/formatters/__tests__/tensionsList.test.js.map +1 -0
  690. package/dist/formatters/brief.d.ts +6 -15
  691. package/dist/formatters/brief.d.ts.map +1 -1
  692. package/dist/formatters/brief.js +16 -14
  693. package/dist/formatters/brief.js.map +1 -1
  694. package/dist/formatters/brief.test.d.ts +2 -0
  695. package/dist/formatters/brief.test.d.ts.map +1 -0
  696. package/dist/formatters/brief.test.js +21 -0
  697. package/dist/formatters/brief.test.js.map +1 -0
  698. package/dist/formatters/capture.d.ts +17 -10
  699. package/dist/formatters/capture.d.ts.map +1 -1
  700. package/dist/formatters/capture.js +32 -10
  701. package/dist/formatters/capture.js.map +1 -1
  702. package/dist/formatters/coaching.d.ts +53 -0
  703. package/dist/formatters/coaching.d.ts.map +1 -0
  704. package/dist/formatters/coaching.js +51 -0
  705. package/dist/formatters/coaching.js.map +1 -0
  706. package/dist/formatters/collections.d.ts.map +1 -1
  707. package/dist/formatters/collections.js +13 -3
  708. package/dist/formatters/collections.js.map +1 -1
  709. package/dist/formatters/conflicts.d.ts +69 -0
  710. package/dist/formatters/conflicts.d.ts.map +1 -0
  711. package/dist/formatters/conflicts.js +87 -0
  712. package/dist/formatters/conflicts.js.map +1 -0
  713. package/dist/formatters/conflicts.test.d.ts +2 -0
  714. package/dist/formatters/conflicts.test.d.ts.map +1 -0
  715. package/dist/formatters/conflicts.test.js +136 -0
  716. package/dist/formatters/conflicts.test.js.map +1 -0
  717. package/dist/formatters/context.d.ts +1 -1
  718. package/dist/formatters/context.d.ts.map +1 -1
  719. package/dist/formatters/context.js.map +1 -1
  720. package/dist/formatters/digest.d.ts +13 -0
  721. package/dist/formatters/digest.d.ts.map +1 -0
  722. package/dist/formatters/digest.js +98 -0
  723. package/dist/formatters/digest.js.map +1 -0
  724. package/dist/formatters/digest.test.d.ts +2 -0
  725. package/dist/formatters/digest.test.d.ts.map +1 -0
  726. package/dist/formatters/digest.test.js +166 -0
  727. package/dist/formatters/digest.test.js.map +1 -0
  728. package/dist/formatters/direction.d.ts +48 -0
  729. package/dist/formatters/direction.d.ts.map +1 -0
  730. package/dist/formatters/direction.js +75 -0
  731. package/dist/formatters/direction.js.map +1 -0
  732. package/dist/formatters/direction.test.d.ts +2 -0
  733. package/dist/formatters/direction.test.d.ts.map +1 -0
  734. package/dist/formatters/direction.test.js +70 -0
  735. package/dist/formatters/direction.test.js.map +1 -0
  736. package/dist/formatters/entry.d.ts +61 -0
  737. package/dist/formatters/entry.d.ts.map +1 -1
  738. package/dist/formatters/entry.js +100 -11
  739. package/dist/formatters/entry.js.map +1 -1
  740. package/dist/formatters/entryAccept.d.ts +77 -0
  741. package/dist/formatters/entryAccept.d.ts.map +1 -0
  742. package/dist/formatters/entryAccept.js +76 -0
  743. package/dist/formatters/entryAccept.js.map +1 -0
  744. package/dist/formatters/feedback.d.ts +56 -0
  745. package/dist/formatters/feedback.d.ts.map +1 -0
  746. package/dist/formatters/feedback.js +89 -0
  747. package/dist/formatters/feedback.js.map +1 -0
  748. package/dist/formatters/feedback.test.d.ts +2 -0
  749. package/dist/formatters/feedback.test.d.ts.map +1 -0
  750. package/dist/formatters/feedback.test.js +112 -0
  751. package/dist/formatters/feedback.test.js.map +1 -0
  752. package/dist/formatters/fields.d.ts +7 -1
  753. package/dist/formatters/fields.d.ts.map +1 -1
  754. package/dist/formatters/fields.js +9 -3
  755. package/dist/formatters/fields.js.map +1 -1
  756. package/dist/formatters/fields.test.d.ts +2 -0
  757. package/dist/formatters/fields.test.d.ts.map +1 -0
  758. package/dist/formatters/fields.test.js +42 -0
  759. package/dist/formatters/fields.test.js.map +1 -0
  760. package/dist/formatters/handshake.d.ts +43 -9
  761. package/dist/formatters/handshake.d.ts.map +1 -1
  762. package/dist/formatters/handshake.js +83 -29
  763. package/dist/formatters/handshake.js.map +1 -1
  764. package/dist/formatters/orient.coherencyCheckTag.test.d.ts +2 -0
  765. package/dist/formatters/orient.coherencyCheckTag.test.d.ts.map +1 -0
  766. package/dist/formatters/orient.coherencyCheckTag.test.js +22 -0
  767. package/dist/formatters/orient.coherencyCheckTag.test.js.map +1 -0
  768. package/dist/formatters/orient.d.ts +136 -69
  769. package/dist/formatters/orient.d.ts.map +1 -1
  770. package/dist/formatters/orient.js +203 -111
  771. package/dist/formatters/orient.js.map +1 -1
  772. package/dist/formatters/orient.rcrtMiss.test.d.ts +2 -0
  773. package/dist/formatters/orient.rcrtMiss.test.d.ts.map +1 -0
  774. package/dist/formatters/orient.rcrtMiss.test.js +80 -0
  775. package/dist/formatters/orient.rcrtMiss.test.js.map +1 -0
  776. package/dist/formatters/orient.rituals.test.d.ts +2 -0
  777. package/dist/formatters/orient.rituals.test.d.ts.map +1 -0
  778. package/dist/formatters/orient.rituals.test.js +76 -0
  779. package/dist/formatters/orient.rituals.test.js.map +1 -0
  780. package/dist/formatters/orient.shapeAdvisorySummary.test.d.ts +2 -0
  781. package/dist/formatters/orient.shapeAdvisorySummary.test.d.ts.map +1 -0
  782. package/dist/formatters/orient.shapeAdvisorySummary.test.js +60 -0
  783. package/dist/formatters/orient.shapeAdvisorySummary.test.js.map +1 -0
  784. package/dist/formatters/orientDegradation.d.ts +38 -0
  785. package/dist/formatters/orientDegradation.d.ts.map +1 -0
  786. package/dist/formatters/orientDegradation.js +50 -0
  787. package/dist/formatters/orientDegradation.js.map +1 -0
  788. package/dist/formatters/orientDegradation.test.d.ts +2 -0
  789. package/dist/formatters/orientDegradation.test.d.ts.map +1 -0
  790. package/dist/formatters/orientDegradation.test.js +28 -0
  791. package/dist/formatters/orientDegradation.test.js.map +1 -0
  792. package/dist/formatters/orientDirection.d.ts +81 -0
  793. package/dist/formatters/orientDirection.d.ts.map +1 -0
  794. package/dist/formatters/orientDirection.js +23 -0
  795. package/dist/formatters/orientDirection.js.map +1 -0
  796. package/dist/formatters/orientDirection.test.d.ts +2 -0
  797. package/dist/formatters/orientDirection.test.d.ts.map +1 -0
  798. package/dist/formatters/orientDirection.test.js +73 -0
  799. package/dist/formatters/orientDirection.test.js.map +1 -0
  800. package/dist/formatters/orientRetrievalMiss.d.ts +22 -0
  801. package/dist/formatters/orientRetrievalMiss.d.ts.map +1 -0
  802. package/dist/formatters/orientRetrievalMiss.js +17 -0
  803. package/dist/formatters/orientRetrievalMiss.js.map +1 -0
  804. package/dist/formatters/questions.d.ts +72 -0
  805. package/dist/formatters/questions.d.ts.map +1 -0
  806. package/dist/formatters/questions.js +116 -0
  807. package/dist/formatters/questions.js.map +1 -0
  808. package/dist/formatters/questions.test.d.ts +2 -0
  809. package/dist/formatters/questions.test.d.ts.map +1 -0
  810. package/dist/formatters/questions.test.js +144 -0
  811. package/dist/formatters/questions.test.js.map +1 -0
  812. package/dist/formatters/relate.d.ts +13 -2
  813. package/dist/formatters/relate.d.ts.map +1 -1
  814. package/dist/formatters/relate.js +15 -5
  815. package/dist/formatters/relate.js.map +1 -1
  816. package/dist/formatters/relate.test.d.ts +2 -0
  817. package/dist/formatters/relate.test.d.ts.map +1 -0
  818. package/dist/formatters/relate.test.js +91 -0
  819. package/dist/formatters/relate.test.js.map +1 -0
  820. package/dist/formatters/scoreboard.d.ts +11 -0
  821. package/dist/formatters/scoreboard.d.ts.map +1 -0
  822. package/dist/formatters/scoreboard.js +162 -0
  823. package/dist/formatters/scoreboard.js.map +1 -0
  824. package/dist/formatters/scoreboard.test.d.ts +2 -0
  825. package/dist/formatters/scoreboard.test.d.ts.map +1 -0
  826. package/dist/formatters/scoreboard.test.js +301 -0
  827. package/dist/formatters/scoreboard.test.js.map +1 -0
  828. package/dist/formatters/search.d.ts.map +1 -1
  829. package/dist/formatters/search.js +11 -1
  830. package/dist/formatters/search.js.map +1 -1
  831. package/dist/formatters/search.test.d.ts +2 -0
  832. package/dist/formatters/search.test.d.ts.map +1 -0
  833. package/dist/formatters/search.test.js +57 -0
  834. package/dist/formatters/search.test.js.map +1 -0
  835. package/dist/formatters/session-feedback.test.d.ts +2 -0
  836. package/dist/formatters/session-feedback.test.d.ts.map +1 -0
  837. package/dist/formatters/session-feedback.test.js +146 -0
  838. package/dist/formatters/session-feedback.test.js.map +1 -0
  839. package/dist/formatters/session.d.ts +122 -5
  840. package/dist/formatters/session.d.ts.map +1 -1
  841. package/dist/formatters/session.js +312 -21
  842. package/dist/formatters/session.js.map +1 -1
  843. package/dist/formatters/shape.d.ts +54 -0
  844. package/dist/formatters/shape.d.ts.map +1 -0
  845. package/dist/formatters/shape.js +97 -0
  846. package/dist/formatters/shape.js.map +1 -0
  847. package/dist/formatters/shape.test.d.ts +2 -0
  848. package/dist/formatters/shape.test.d.ts.map +1 -0
  849. package/dist/formatters/shape.test.js +80 -0
  850. package/dist/formatters/shape.test.js.map +1 -0
  851. package/dist/formatters/spineCheck.d.ts +14 -0
  852. package/dist/formatters/spineCheck.d.ts.map +1 -0
  853. package/dist/formatters/spineCheck.js +113 -0
  854. package/dist/formatters/spineCheck.js.map +1 -0
  855. package/dist/formatters/spineCheck.test.d.ts +2 -0
  856. package/dist/formatters/spineCheck.test.d.ts.map +1 -0
  857. package/dist/formatters/spineCheck.test.js +76 -0
  858. package/dist/formatters/spineCheck.test.js.map +1 -0
  859. package/dist/formatters/tensionsList.d.ts +17 -0
  860. package/dist/formatters/tensionsList.d.ts.map +1 -0
  861. package/dist/formatters/tensionsList.js +33 -0
  862. package/dist/formatters/tensionsList.js.map +1 -0
  863. package/dist/formatters/update.d.ts +22 -0
  864. package/dist/formatters/update.d.ts.map +1 -1
  865. package/dist/formatters/update.js +36 -7
  866. package/dist/formatters/update.js.map +1 -1
  867. package/dist/formatters/update.test.d.ts +2 -0
  868. package/dist/formatters/update.test.d.ts.map +1 -0
  869. package/dist/formatters/update.test.js +59 -0
  870. package/dist/formatters/update.test.js.map +1 -0
  871. package/dist/formatters/verify.d.ts +12 -4
  872. package/dist/formatters/verify.d.ts.map +1 -1
  873. package/dist/formatters/verify.js +20 -2
  874. package/dist/formatters/verify.js.map +1 -1
  875. package/dist/generated/healthGapKinds.generated.d.ts +12 -0
  876. package/dist/generated/healthGapKinds.generated.d.ts.map +1 -0
  877. package/dist/generated/healthGapKinds.generated.js +18 -0
  878. package/dist/generated/healthGapKinds.generated.js.map +1 -0
  879. package/dist/generated/organisationalAuthorityRefusalCodes.generated.d.ts +12 -0
  880. package/dist/generated/organisationalAuthorityRefusalCodes.generated.d.ts.map +1 -0
  881. package/dist/generated/organisationalAuthorityRefusalCodes.generated.js +11 -0
  882. package/dist/generated/organisationalAuthorityRefusalCodes.generated.js.map +1 -0
  883. package/dist/generated/relationTypes.generated.d.ts +12 -0
  884. package/dist/generated/relationTypes.generated.d.ts.map +1 -0
  885. package/dist/generated/relationTypes.generated.js +11 -0
  886. package/dist/generated/relationTypes.generated.js.map +1 -0
  887. package/dist/generated/routeLatencyBudget.generated.d.ts +56 -0
  888. package/dist/generated/routeLatencyBudget.generated.d.ts.map +1 -0
  889. package/dist/generated/routeLatencyBudget.generated.js +279 -0
  890. package/dist/generated/routeLatencyBudget.generated.js.map +1 -0
  891. package/dist/generated/sourceSurfaces.generated.d.ts +12 -0
  892. package/dist/generated/sourceSurfaces.generated.d.ts.map +1 -0
  893. package/dist/generated/sourceSurfaces.generated.js +11 -0
  894. package/dist/generated/sourceSurfaces.generated.js.map +1 -0
  895. package/dist/generators/adapters.d.ts +39 -6
  896. package/dist/generators/adapters.d.ts.map +1 -1
  897. package/dist/generators/adapters.js +86 -55
  898. package/dist/generators/adapters.js.map +1 -1
  899. package/dist/generators/adapters.test.js +1 -3
  900. package/dist/generators/adapters.test.js.map +1 -1
  901. package/dist/generators/boundary-manifest.d.ts +29 -0
  902. package/dist/generators/boundary-manifest.d.ts.map +1 -0
  903. package/dist/generators/boundary-manifest.js +183 -0
  904. package/dist/generators/boundary-manifest.js.map +1 -0
  905. package/dist/generators/boundary-manifest.real-file.test.d.ts +2 -0
  906. package/dist/generators/boundary-manifest.real-file.test.d.ts.map +1 -0
  907. package/dist/generators/boundary-manifest.real-file.test.js +70 -0
  908. package/dist/generators/boundary-manifest.real-file.test.js.map +1 -0
  909. package/dist/generators/boundary-manifest.test.d.ts +2 -0
  910. package/dist/generators/boundary-manifest.test.d.ts.map +1 -0
  911. package/dist/generators/boundary-manifest.test.js +91 -0
  912. package/dist/generators/boundary-manifest.test.js.map +1 -0
  913. package/dist/generators/briefing-projections.test.d.ts +2 -0
  914. package/dist/generators/briefing-projections.test.d.ts.map +1 -0
  915. package/dist/generators/briefing-projections.test.js +97 -0
  916. package/dist/generators/briefing-projections.test.js.map +1 -0
  917. package/dist/generators/context-md.d.ts +7 -2
  918. package/dist/generators/context-md.d.ts.map +1 -1
  919. package/dist/generators/context-md.js +14 -52
  920. package/dist/generators/context-md.js.map +1 -1
  921. package/dist/generators/everyone-rules-md.d.ts +9 -0
  922. package/dist/generators/everyone-rules-md.d.ts.map +1 -0
  923. package/dist/generators/everyone-rules-md.js +21 -0
  924. package/dist/generators/everyone-rules-md.js.map +1 -0
  925. package/dist/generators/manifest.d.ts +78 -0
  926. package/dist/generators/manifest.d.ts.map +1 -1
  927. package/dist/generators/manifest.js +125 -14
  928. package/dist/generators/manifest.js.map +1 -1
  929. package/dist/generators/noProjectionAssets.d.ts +15 -0
  930. package/dist/generators/noProjectionAssets.d.ts.map +1 -0
  931. package/dist/generators/noProjectionAssets.js +6 -0
  932. package/dist/generators/noProjectionAssets.js.map +1 -0
  933. package/dist/generators/portable-knowledge.d.ts +15 -38
  934. package/dist/generators/portable-knowledge.d.ts.map +1 -1
  935. package/dist/generators/portable-knowledge.js +13 -144
  936. package/dist/generators/portable-knowledge.js.map +1 -1
  937. package/dist/generators/portable-knowledge.test.js +82 -267
  938. package/dist/generators/portable-knowledge.test.js.map +1 -1
  939. package/dist/generators/region-projections.d.ts +17 -0
  940. package/dist/generators/region-projections.d.ts.map +1 -0
  941. package/dist/generators/region-projections.js +51 -0
  942. package/dist/generators/region-projections.js.map +1 -0
  943. package/dist/generators/region-projections.test.d.ts +2 -0
  944. package/dist/generators/region-projections.test.d.ts.map +1 -0
  945. package/dist/generators/region-projections.test.js +58 -0
  946. package/dist/generators/region-projections.test.js.map +1 -0
  947. package/dist/generators/region.d.ts +24 -0
  948. package/dist/generators/region.d.ts.map +1 -0
  949. package/dist/generators/region.js +87 -0
  950. package/dist/generators/region.js.map +1 -0
  951. package/dist/generators/region.test.d.ts +2 -0
  952. package/dist/generators/region.test.d.ts.map +1 -0
  953. package/dist/generators/region.test.js +126 -0
  954. package/dist/generators/region.test.js.map +1 -0
  955. package/dist/generators/retired-projections.d.ts +12 -0
  956. package/dist/generators/retired-projections.d.ts.map +1 -0
  957. package/dist/generators/retired-projections.js +75 -0
  958. package/dist/generators/retired-projections.js.map +1 -0
  959. package/dist/generators/retired-projections.test.d.ts +2 -0
  960. package/dist/generators/retired-projections.test.d.ts.map +1 -0
  961. package/dist/generators/retired-projections.test.js +64 -0
  962. package/dist/generators/retired-projections.test.js.map +1 -0
  963. package/dist/generators/surface-profiles.d.ts +1 -2
  964. package/dist/generators/surface-profiles.d.ts.map +1 -1
  965. package/dist/generators/surface-profiles.js.map +1 -1
  966. package/dist/handleCliError.d.ts +2 -0
  967. package/dist/handleCliError.d.ts.map +1 -0
  968. package/dist/handleCliError.js +56 -0
  969. package/dist/handleCliError.js.map +1 -0
  970. package/dist/index.d.ts +0 -5
  971. package/dist/index.d.ts.map +1 -1
  972. package/dist/index.js +216 -350
  973. package/dist/index.js.map +1 -1
  974. package/dist/lib/__tests__/legalRelationTypes.test.d.ts +2 -0
  975. package/dist/lib/__tests__/legalRelationTypes.test.d.ts.map +1 -0
  976. package/dist/lib/__tests__/legalRelationTypes.test.js +61 -0
  977. package/dist/lib/__tests__/legalRelationTypes.test.js.map +1 -0
  978. package/dist/lib/__tests__/parseFields.test.d.ts +2 -0
  979. package/dist/lib/__tests__/parseFields.test.d.ts.map +1 -0
  980. package/dist/lib/__tests__/parseFields.test.js +40 -0
  981. package/dist/lib/__tests__/parseFields.test.js.map +1 -0
  982. package/dist/lib/adminConfig.d.ts +48 -0
  983. package/dist/lib/adminConfig.d.ts.map +1 -0
  984. package/dist/lib/adminConfig.js +130 -0
  985. package/dist/lib/adminConfig.js.map +1 -0
  986. package/dist/lib/canonicalRefs.d.ts +160 -0
  987. package/dist/lib/canonicalRefs.d.ts.map +1 -0
  988. package/dist/lib/canonicalRefs.js +169 -0
  989. package/dist/lib/canonicalRefs.js.map +1 -0
  990. package/dist/lib/captureGrounding.d.ts +48 -0
  991. package/dist/lib/captureGrounding.d.ts.map +1 -0
  992. package/dist/lib/captureGrounding.js +54 -0
  993. package/dist/lib/captureGrounding.js.map +1 -0
  994. package/dist/lib/captureGrounding.test.d.ts +2 -0
  995. package/dist/lib/captureGrounding.test.d.ts.map +1 -0
  996. package/dist/lib/captureGrounding.test.js +74 -0
  997. package/dist/lib/captureGrounding.test.js.map +1 -0
  998. package/dist/lib/captureLink.d.ts +26 -0
  999. package/dist/lib/captureLink.d.ts.map +1 -0
  1000. package/dist/lib/captureLink.js +110 -0
  1001. package/dist/lib/captureLink.js.map +1 -0
  1002. package/dist/lib/checklist.d.ts +32 -0
  1003. package/dist/lib/checklist.d.ts.map +1 -0
  1004. package/dist/lib/checklist.js +77 -0
  1005. package/dist/lib/checklist.js.map +1 -0
  1006. package/dist/lib/client.d.ts +46 -19
  1007. package/dist/lib/client.d.ts.map +1 -1
  1008. package/dist/lib/client.js +231 -66
  1009. package/dist/lib/client.js.map +1 -1
  1010. package/dist/lib/collectionRegistry.d.ts +40 -5
  1011. package/dist/lib/collectionRegistry.d.ts.map +1 -1
  1012. package/dist/lib/collectionRegistry.js +70 -39
  1013. package/dist/lib/collectionRegistry.js.map +1 -1
  1014. package/dist/lib/commanderOptions.d.ts +8 -0
  1015. package/dist/lib/commanderOptions.d.ts.map +1 -0
  1016. package/dist/lib/commanderOptions.js +10 -0
  1017. package/dist/lib/commanderOptions.js.map +1 -0
  1018. package/dist/lib/compose-wrapup-view.d.ts +48 -0
  1019. package/dist/lib/compose-wrapup-view.d.ts.map +1 -0
  1020. package/dist/lib/compose-wrapup-view.js +37 -0
  1021. package/dist/lib/compose-wrapup-view.js.map +1 -0
  1022. package/dist/lib/config.d.ts +102 -54
  1023. package/dist/lib/config.d.ts.map +1 -1
  1024. package/dist/lib/config.js +252 -156
  1025. package/dist/lib/config.js.map +1 -1
  1026. package/dist/lib/configResult.d.ts +103 -0
  1027. package/dist/lib/configResult.d.ts.map +1 -0
  1028. package/dist/lib/configResult.js +180 -0
  1029. package/dist/lib/configResult.js.map +1 -0
  1030. package/dist/lib/connectKeyLabel.d.ts +9 -0
  1031. package/dist/lib/connectKeyLabel.d.ts.map +1 -0
  1032. package/dist/lib/connectKeyLabel.js +12 -0
  1033. package/dist/lib/connectKeyLabel.js.map +1 -0
  1034. package/dist/lib/constants.d.ts +5 -1
  1035. package/dist/lib/constants.d.ts.map +1 -1
  1036. package/dist/lib/constants.js +8 -1
  1037. package/dist/lib/constants.js.map +1 -1
  1038. package/dist/lib/conversation.d.ts +36 -0
  1039. package/dist/lib/conversation.d.ts.map +1 -0
  1040. package/dist/lib/conversation.js +66 -0
  1041. package/dist/lib/conversation.js.map +1 -0
  1042. package/dist/lib/createEntryResult.d.ts +34 -0
  1043. package/dist/lib/createEntryResult.d.ts.map +1 -0
  1044. package/dist/lib/createEntryResult.js +12 -0
  1045. package/dist/lib/createEntryResult.js.map +1 -0
  1046. package/dist/lib/deployment.js +2 -2
  1047. package/dist/lib/deployment.js.map +1 -1
  1048. package/dist/lib/deployment.test.js +20 -1
  1049. package/dist/lib/deployment.test.js.map +1 -1
  1050. package/dist/lib/envKeySnapshot.d.ts +10 -0
  1051. package/dist/lib/envKeySnapshot.d.ts.map +1 -0
  1052. package/dist/lib/envKeySnapshot.js +30 -0
  1053. package/dist/lib/envKeySnapshot.js.map +1 -0
  1054. package/dist/lib/errors.d.ts +90 -0
  1055. package/dist/lib/errors.d.ts.map +1 -1
  1056. package/dist/lib/errors.js +81 -0
  1057. package/dist/lib/errors.js.map +1 -1
  1058. package/dist/lib/frontmatter.d.ts +55 -0
  1059. package/dist/lib/frontmatter.d.ts.map +1 -0
  1060. package/dist/lib/frontmatter.js +92 -0
  1061. package/dist/lib/frontmatter.js.map +1 -0
  1062. package/dist/lib/frontmatter.test.d.ts +15 -0
  1063. package/dist/lib/frontmatter.test.d.ts.map +1 -0
  1064. package/dist/lib/frontmatter.test.js +98 -0
  1065. package/dist/lib/frontmatter.test.js.map +1 -0
  1066. package/dist/lib/gatewayTimeout.d.ts +88 -0
  1067. package/dist/lib/gatewayTimeout.d.ts.map +1 -0
  1068. package/dist/lib/gatewayTimeout.js +118 -0
  1069. package/dist/lib/gatewayTimeout.js.map +1 -0
  1070. package/dist/lib/gitEnvLeakKeysParity.test.d.ts +2 -0
  1071. package/dist/lib/gitEnvLeakKeysParity.test.d.ts.map +1 -0
  1072. package/dist/lib/gitEnvLeakKeysParity.test.js +73 -0
  1073. package/dist/lib/gitEnvLeakKeysParity.test.js.map +1 -0
  1074. package/dist/lib/glossary.js +1 -1
  1075. package/dist/lib/glossary.js.map +1 -1
  1076. package/dist/lib/hook-intents.d.ts.map +1 -1
  1077. package/dist/lib/hook-intents.js +2 -3
  1078. package/dist/lib/hook-intents.js.map +1 -1
  1079. package/dist/lib/judgeWait.d.ts +50 -0
  1080. package/dist/lib/judgeWait.d.ts.map +1 -0
  1081. package/dist/lib/judgeWait.js +64 -0
  1082. package/dist/lib/judgeWait.js.map +1 -0
  1083. package/dist/lib/kernelEnvelope.d.ts +42 -0
  1084. package/dist/lib/kernelEnvelope.d.ts.map +1 -0
  1085. package/dist/lib/kernelEnvelope.js +67 -0
  1086. package/dist/lib/kernelEnvelope.js.map +1 -0
  1087. package/dist/lib/legalRelationTypes.d.ts +19 -0
  1088. package/dist/lib/legalRelationTypes.d.ts.map +1 -0
  1089. package/dist/lib/legalRelationTypes.js +66 -0
  1090. package/dist/lib/legalRelationTypes.js.map +1 -0
  1091. package/dist/lib/localBinding.d.ts +86 -0
  1092. package/dist/lib/localBinding.d.ts.map +1 -0
  1093. package/dist/lib/localBinding.js +173 -0
  1094. package/dist/lib/localBinding.js.map +1 -0
  1095. package/dist/lib/method-registry.d.ts +16 -11
  1096. package/dist/lib/method-registry.d.ts.map +1 -1
  1097. package/dist/lib/method-registry.js +13 -25
  1098. package/dist/lib/method-registry.js.map +1 -1
  1099. package/dist/lib/normalizeMaterializedFilename.d.ts +28 -0
  1100. package/dist/lib/normalizeMaterializedFilename.d.ts.map +1 -0
  1101. package/dist/lib/normalizeMaterializedFilename.js +56 -0
  1102. package/dist/lib/normalizeMaterializedFilename.js.map +1 -0
  1103. package/dist/lib/normalizeMaterializedFilename.test.d.ts +16 -0
  1104. package/dist/lib/normalizeMaterializedFilename.test.d.ts.map +1 -0
  1105. package/dist/lib/normalizeMaterializedFilename.test.js +90 -0
  1106. package/dist/lib/normalizeMaterializedFilename.test.js.map +1 -0
  1107. package/dist/lib/notice-marker.d.ts +3 -0
  1108. package/dist/lib/notice-marker.d.ts.map +1 -0
  1109. package/dist/lib/notice-marker.js +223 -0
  1110. package/dist/lib/notice-marker.js.map +1 -0
  1111. package/dist/lib/onboarding-path-b.d.ts.map +1 -1
  1112. package/dist/lib/onboarding-path-b.js +39 -15
  1113. package/dist/lib/onboarding-path-b.js.map +1 -1
  1114. package/dist/lib/onboarding-shared.d.ts +27 -5
  1115. package/dist/lib/onboarding-shared.d.ts.map +1 -1
  1116. package/dist/lib/onboarding-shared.js +55 -37
  1117. package/dist/lib/onboarding-shared.js.map +1 -1
  1118. package/dist/lib/onboarding-shared.test.d.ts +2 -0
  1119. package/dist/lib/onboarding-shared.test.d.ts.map +1 -0
  1120. package/dist/lib/onboarding-shared.test.js +131 -0
  1121. package/dist/lib/onboarding-shared.test.js.map +1 -0
  1122. package/dist/lib/onboarding-topics.js +1 -1
  1123. package/dist/lib/onboarding.d.ts +5 -1
  1124. package/dist/lib/onboarding.d.ts.map +1 -1
  1125. package/dist/lib/onboarding.js +62 -25
  1126. package/dist/lib/onboarding.js.map +1 -1
  1127. package/dist/lib/ownerLine.d.ts +73 -0
  1128. package/dist/lib/ownerLine.d.ts.map +1 -0
  1129. package/dist/lib/ownerLine.js +57 -0
  1130. package/dist/lib/ownerLine.js.map +1 -0
  1131. package/dist/lib/parseFields.d.ts +19 -0
  1132. package/dist/lib/parseFields.d.ts.map +1 -0
  1133. package/dist/lib/parseFields.js +49 -0
  1134. package/dist/lib/parseFields.js.map +1 -0
  1135. package/dist/lib/previewBanner.d.ts +9 -0
  1136. package/dist/lib/previewBanner.d.ts.map +1 -0
  1137. package/dist/lib/previewBanner.js +37 -0
  1138. package/dist/lib/previewBanner.js.map +1 -0
  1139. package/dist/lib/productbrain-files.d.ts +94 -0
  1140. package/dist/lib/productbrain-files.d.ts.map +1 -0
  1141. package/dist/lib/productbrain-files.js +214 -0
  1142. package/dist/lib/productbrain-files.js.map +1 -0
  1143. package/dist/lib/productbrain-files.test.d.ts +2 -0
  1144. package/dist/lib/productbrain-files.test.d.ts.map +1 -0
  1145. package/dist/lib/productbrain-files.test.js +293 -0
  1146. package/dist/lib/productbrain-files.test.js.map +1 -0
  1147. package/dist/lib/profiles.d.ts +53 -5
  1148. package/dist/lib/profiles.d.ts.map +1 -1
  1149. package/dist/lib/profiles.js +77 -23
  1150. package/dist/lib/profiles.js.map +1 -1
  1151. package/dist/lib/projectConfig.d.ts +81 -0
  1152. package/dist/lib/projectConfig.d.ts.map +1 -0
  1153. package/dist/lib/projectConfig.js +157 -0
  1154. package/dist/lib/projectConfig.js.map +1 -0
  1155. package/dist/lib/proseBody.d.ts +14 -0
  1156. package/dist/lib/proseBody.d.ts.map +1 -0
  1157. package/dist/lib/proseBody.js +25 -0
  1158. package/dist/lib/proseBody.js.map +1 -0
  1159. package/dist/lib/rate-limit.d.ts +38 -0
  1160. package/dist/lib/rate-limit.d.ts.map +1 -0
  1161. package/dist/lib/rate-limit.js +83 -0
  1162. package/dist/lib/rate-limit.js.map +1 -0
  1163. package/dist/lib/readinessNotices.d.ts +12 -0
  1164. package/dist/lib/readinessNotices.d.ts.map +1 -0
  1165. package/dist/lib/readinessNotices.js +15 -0
  1166. package/dist/lib/readinessNotices.js.map +1 -0
  1167. package/dist/lib/repo-detect.d.ts +8 -2
  1168. package/dist/lib/repo-detect.d.ts.map +1 -1
  1169. package/dist/lib/repo-detect.js +11 -6
  1170. package/dist/lib/repo-detect.js.map +1 -1
  1171. package/dist/lib/reportedProfile.d.ts +18 -0
  1172. package/dist/lib/reportedProfile.d.ts.map +1 -0
  1173. package/dist/lib/reportedProfile.js +144 -0
  1174. package/dist/lib/reportedProfile.js.map +1 -0
  1175. package/dist/lib/ruleListRender.d.ts +178 -0
  1176. package/dist/lib/ruleListRender.d.ts.map +1 -0
  1177. package/dist/lib/ruleListRender.js +257 -0
  1178. package/dist/lib/ruleListRender.js.map +1 -0
  1179. package/dist/lib/runner.d.ts +9 -1
  1180. package/dist/lib/runner.d.ts.map +1 -1
  1181. package/dist/lib/runner.js +30 -4
  1182. package/dist/lib/runner.js.map +1 -1
  1183. package/dist/lib/session.d.ts +90 -6
  1184. package/dist/lib/session.d.ts.map +1 -1
  1185. package/dist/lib/session.js +261 -17
  1186. package/dist/lib/session.js.map +1 -1
  1187. package/dist/lib/sessionBinding.d.ts +61 -0
  1188. package/dist/lib/sessionBinding.d.ts.map +1 -0
  1189. package/dist/lib/sessionBinding.js +125 -0
  1190. package/dist/lib/sessionBinding.js.map +1 -0
  1191. package/dist/lib/sessionNotices.d.ts +54 -0
  1192. package/dist/lib/sessionNotices.d.ts.map +1 -0
  1193. package/dist/lib/sessionNotices.js +130 -0
  1194. package/dist/lib/sessionNotices.js.map +1 -0
  1195. package/dist/lib/sessionNotices.test.d.ts +2 -0
  1196. package/dist/lib/sessionNotices.test.d.ts.map +1 -0
  1197. package/dist/lib/sessionNotices.test.js +55 -0
  1198. package/dist/lib/sessionNotices.test.js.map +1 -0
  1199. package/dist/lib/spineVerdictRead.d.ts +70 -0
  1200. package/dist/lib/spineVerdictRead.d.ts.map +1 -0
  1201. package/dist/lib/spineVerdictRead.js +73 -0
  1202. package/dist/lib/spineVerdictRead.js.map +1 -0
  1203. package/dist/lib/spinner.js +2 -2
  1204. package/dist/lib/spinner.js.map +1 -1
  1205. package/dist/lib/startup-resolution-signals.d.ts +34 -0
  1206. package/dist/lib/startup-resolution-signals.d.ts.map +1 -0
  1207. package/dist/lib/startup-resolution-signals.js +116 -0
  1208. package/dist/lib/startup-resolution-signals.js.map +1 -0
  1209. package/dist/lib/startup-resolution-signals.test.d.ts +2 -0
  1210. package/dist/lib/startup-resolution-signals.test.d.ts.map +1 -0
  1211. package/dist/lib/startup-resolution-signals.test.js +113 -0
  1212. package/dist/lib/startup-resolution-signals.test.js.map +1 -0
  1213. package/dist/lib/startup-signals.d.ts +12 -0
  1214. package/dist/lib/startup-signals.d.ts.map +1 -0
  1215. package/dist/lib/startup-signals.js +179 -0
  1216. package/dist/lib/startup-signals.js.map +1 -0
  1217. package/dist/lib/startup-signals.test.d.ts +2 -0
  1218. package/dist/lib/startup-signals.test.d.ts.map +1 -0
  1219. package/dist/lib/startup-signals.test.js +165 -0
  1220. package/dist/lib/startup-signals.test.js.map +1 -0
  1221. package/dist/lib/state.d.ts +11 -2
  1222. package/dist/lib/state.d.ts.map +1 -1
  1223. package/dist/lib/state.js +11 -4
  1224. package/dist/lib/state.js.map +1 -1
  1225. package/dist/lib/statusCategories.d.ts +160 -0
  1226. package/dist/lib/statusCategories.d.ts.map +1 -0
  1227. package/dist/lib/statusCategories.js +284 -0
  1228. package/dist/lib/statusCategories.js.map +1 -0
  1229. package/dist/lib/strip.d.ts +17 -0
  1230. package/dist/lib/strip.d.ts.map +1 -1
  1231. package/dist/lib/strip.js +48 -1
  1232. package/dist/lib/strip.js.map +1 -1
  1233. package/dist/lib/style.d.ts +8 -2
  1234. package/dist/lib/style.d.ts.map +1 -1
  1235. package/dist/lib/style.js +24 -17
  1236. package/dist/lib/style.js.map +1 -1
  1237. package/dist/lib/tokenConstants.d.ts +2 -0
  1238. package/dist/lib/tokenConstants.d.ts.map +1 -1
  1239. package/dist/lib/tokenConstants.js +2 -0
  1240. package/dist/lib/tokenConstants.js.map +1 -1
  1241. package/dist/lib/update-check.d.ts +42 -7
  1242. package/dist/lib/update-check.d.ts.map +1 -1
  1243. package/dist/lib/update-check.js +213 -62
  1244. package/dist/lib/update-check.js.map +1 -1
  1245. package/dist/lib/upgrade-runner.d.ts +22 -0
  1246. package/dist/lib/upgrade-runner.d.ts.map +1 -0
  1247. package/dist/lib/upgrade-runner.js +110 -0
  1248. package/dist/lib/upgrade-runner.js.map +1 -0
  1249. package/dist/lib/workspaceNotice.d.ts +202 -0
  1250. package/dist/lib/workspaceNotice.d.ts.map +1 -0
  1251. package/dist/lib/workspaceNotice.js +345 -0
  1252. package/dist/lib/workspaceNotice.js.map +1 -0
  1253. package/dist/lib/workspaceVocabCache.d.ts +60 -0
  1254. package/dist/lib/workspaceVocabCache.d.ts.map +1 -0
  1255. package/dist/lib/workspaceVocabCache.js +98 -0
  1256. package/dist/lib/workspaceVocabCache.js.map +1 -0
  1257. package/dist/lib/writePerimeter.d.ts +72 -0
  1258. package/dist/lib/writePerimeter.d.ts.map +1 -0
  1259. package/dist/lib/writePerimeter.js +128 -0
  1260. package/dist/lib/writePerimeter.js.map +1 -0
  1261. package/dist/registerEntryCommands.d.ts +18 -0
  1262. package/dist/registerEntryCommands.d.ts.map +1 -0
  1263. package/dist/registerEntryCommands.js +122 -0
  1264. package/dist/registerEntryCommands.js.map +1 -0
  1265. package/dist/registerHistoryCommand.d.ts +8 -0
  1266. package/dist/registerHistoryCommand.d.ts.map +1 -0
  1267. package/dist/registerHistoryCommand.js +14 -0
  1268. package/dist/registerHistoryCommand.js.map +1 -0
  1269. package/dist/registerOutcomeCommands.d.ts +27 -0
  1270. package/dist/registerOutcomeCommands.d.ts.map +1 -0
  1271. package/dist/registerOutcomeCommands.js +27 -0
  1272. package/dist/registerOutcomeCommands.js.map +1 -0
  1273. package/dist/registerRoleCommands.d.ts +10 -0
  1274. package/dist/registerRoleCommands.d.ts.map +1 -0
  1275. package/dist/registerRoleCommands.js +14 -0
  1276. package/dist/registerRoleCommands.js.map +1 -0
  1277. package/dist/registerTensionsCommands.d.ts +10 -0
  1278. package/dist/registerTensionsCommands.d.ts.map +1 -0
  1279. package/dist/registerTensionsCommands.js +15 -0
  1280. package/dist/registerTensionsCommands.js.map +1 -0
  1281. package/dist/scoreboard/diagnose.d.ts +190 -0
  1282. package/dist/scoreboard/diagnose.d.ts.map +1 -0
  1283. package/dist/scoreboard/diagnose.js +282 -0
  1284. package/dist/scoreboard/diagnose.js.map +1 -0
  1285. package/dist/scoreboard/diagnose.test.d.ts +15 -0
  1286. package/dist/scoreboard/diagnose.test.d.ts.map +1 -0
  1287. package/dist/scoreboard/diagnose.test.js +288 -0
  1288. package/dist/scoreboard/diagnose.test.js.map +1 -0
  1289. package/dist/scoreboard/floors.d.ts +47 -0
  1290. package/dist/scoreboard/floors.d.ts.map +1 -0
  1291. package/dist/scoreboard/floors.js +33 -0
  1292. package/dist/scoreboard/floors.js.map +1 -0
  1293. package/dist/scoreboard/localDrift.d.ts +23 -0
  1294. package/dist/scoreboard/localDrift.d.ts.map +1 -0
  1295. package/dist/scoreboard/localDrift.js +111 -0
  1296. package/dist/scoreboard/localDrift.js.map +1 -0
  1297. package/dist/scoreboard/localDrift.test.d.ts +9 -0
  1298. package/dist/scoreboard/localDrift.test.d.ts.map +1 -0
  1299. package/dist/scoreboard/localDrift.test.js +82 -0
  1300. package/dist/scoreboard/localDrift.test.js.map +1 -0
  1301. package/dist/surfaces/__tests__/adapter.test.d.ts +2 -0
  1302. package/dist/surfaces/__tests__/adapter.test.d.ts.map +1 -0
  1303. package/dist/surfaces/__tests__/adapter.test.js +86 -0
  1304. package/dist/surfaces/__tests__/adapter.test.js.map +1 -0
  1305. package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.d.ts +2 -0
  1306. package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.d.ts.map +1 -0
  1307. package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.js +179 -0
  1308. package/dist/surfaces/__tests__/claude-skill-pointer-drift.test.js.map +1 -0
  1309. package/dist/surfaces/__tests__/telemetry.test.d.ts +2 -0
  1310. package/dist/surfaces/__tests__/telemetry.test.d.ts.map +1 -0
  1311. package/dist/surfaces/__tests__/telemetry.test.js +55 -0
  1312. package/dist/surfaces/__tests__/telemetry.test.js.map +1 -0
  1313. package/dist/surfaces/adapter.d.ts +70 -0
  1314. package/dist/surfaces/adapter.d.ts.map +1 -0
  1315. package/dist/surfaces/adapter.js +2 -0
  1316. package/dist/surfaces/adapter.js.map +1 -0
  1317. package/dist/surfaces/adapters/claude.d.ts +3 -0
  1318. package/dist/surfaces/adapters/claude.d.ts.map +1 -0
  1319. package/dist/surfaces/adapters/claude.js +72 -0
  1320. package/dist/surfaces/adapters/claude.js.map +1 -0
  1321. package/dist/surfaces/adapters/codex.d.ts +3 -0
  1322. package/dist/surfaces/adapters/codex.d.ts.map +1 -0
  1323. package/dist/surfaces/adapters/codex.js +61 -0
  1324. package/dist/surfaces/adapters/codex.js.map +1 -0
  1325. package/dist/surfaces/adapters/copilot.d.ts +3 -0
  1326. package/dist/surfaces/adapters/copilot.d.ts.map +1 -0
  1327. package/dist/surfaces/adapters/copilot.js +59 -0
  1328. package/dist/surfaces/adapters/copilot.js.map +1 -0
  1329. package/dist/surfaces/adapters/cursor.d.ts +3 -0
  1330. package/dist/surfaces/adapters/cursor.d.ts.map +1 -0
  1331. package/dist/surfaces/adapters/cursor.js +78 -0
  1332. package/dist/surfaces/adapters/cursor.js.map +1 -0
  1333. package/dist/surfaces/registry.d.ts +58 -2
  1334. package/dist/surfaces/registry.d.ts.map +1 -1
  1335. package/dist/surfaces/registry.js +82 -7
  1336. package/dist/surfaces/registry.js.map +1 -1
  1337. package/dist/surfaces/telemetry.d.ts +17 -0
  1338. package/dist/surfaces/telemetry.d.ts.map +1 -0
  1339. package/dist/surfaces/telemetry.js +31 -0
  1340. package/dist/surfaces/telemetry.js.map +1 -0
  1341. package/package.json +9 -5
  1342. package/dist/__tests__/audit.test.d.ts +0 -2
  1343. package/dist/__tests__/audit.test.d.ts.map +0 -1
  1344. package/dist/__tests__/audit.test.js +0 -394
  1345. package/dist/__tests__/audit.test.js.map +0 -1
  1346. package/dist/__tests__/promote.test.d.ts +0 -2
  1347. package/dist/__tests__/promote.test.d.ts.map +0 -1
  1348. package/dist/__tests__/promote.test.js +0 -161
  1349. package/dist/__tests__/promote.test.js.map +0 -1
  1350. package/dist/__tests__/proposals.test.d.ts +0 -2
  1351. package/dist/__tests__/proposals.test.d.ts.map +0 -1
  1352. package/dist/__tests__/proposals.test.js +0 -167
  1353. package/dist/__tests__/proposals.test.js.map +0 -1
  1354. package/dist/__tests__/setup.test.d.ts +0 -2
  1355. package/dist/__tests__/setup.test.d.ts.map +0 -1
  1356. package/dist/__tests__/setup.test.js +0 -141
  1357. package/dist/__tests__/setup.test.js.map +0 -1
  1358. package/dist/commands/accept.d.ts +0 -18
  1359. package/dist/commands/accept.d.ts.map +0 -1
  1360. package/dist/commands/accept.js +0 -76
  1361. package/dist/commands/accept.js.map +0 -1
  1362. package/dist/commands/audit.d.ts +0 -25
  1363. package/dist/commands/audit.d.ts.map +0 -1
  1364. package/dist/commands/audit.js +0 -188
  1365. package/dist/commands/audit.js.map +0 -1
  1366. package/dist/commands/method.d.ts +0 -99
  1367. package/dist/commands/method.d.ts.map +0 -1
  1368. package/dist/commands/method.js +0 -781
  1369. package/dist/commands/method.js.map +0 -1
  1370. package/dist/commands/promote.d.ts +0 -12
  1371. package/dist/commands/promote.d.ts.map +0 -1
  1372. package/dist/commands/promote.js +0 -90
  1373. package/dist/commands/promote.js.map +0 -1
  1374. package/dist/commands/proposals.d.ts +0 -9
  1375. package/dist/commands/proposals.d.ts.map +0 -1
  1376. package/dist/commands/proposals.js +0 -24
  1377. package/dist/commands/proposals.js.map +0 -1
  1378. package/dist/commands/reject.d.ts +0 -14
  1379. package/dist/commands/reject.d.ts.map +0 -1
  1380. package/dist/commands/reject.js +0 -43
  1381. package/dist/commands/reject.js.map +0 -1
  1382. package/dist/commands/setup.d.ts +0 -15
  1383. package/dist/commands/setup.d.ts.map +0 -1
  1384. package/dist/commands/setup.js +0 -148
  1385. package/dist/commands/setup.js.map +0 -1
  1386. package/dist/formatters/audit.d.ts +0 -46
  1387. package/dist/formatters/audit.d.ts.map +0 -1
  1388. package/dist/formatters/audit.js +0 -81
  1389. package/dist/formatters/audit.js.map +0 -1
  1390. package/dist/formatters/promote.d.ts +0 -30
  1391. package/dist/formatters/promote.d.ts.map +0 -1
  1392. package/dist/formatters/promote.js +0 -39
  1393. package/dist/formatters/promote.js.map +0 -1
  1394. package/dist/formatters/proposals.d.ts +0 -45
  1395. package/dist/formatters/proposals.d.ts.map +0 -1
  1396. package/dist/formatters/proposals.js +0 -62
  1397. package/dist/formatters/proposals.js.map +0 -1
  1398. package/dist/generators/__tests__/surface-profiles.test.d.ts +0 -2
  1399. package/dist/generators/__tests__/surface-profiles.test.d.ts.map +0 -1
  1400. package/dist/generators/__tests__/surface-profiles.test.js +0 -89
  1401. package/dist/generators/__tests__/surface-profiles.test.js.map +0 -1
  1402. package/dist/generators/archetypes.d.ts +0 -52
  1403. package/dist/generators/archetypes.d.ts.map +0 -1
  1404. package/dist/generators/archetypes.js +0 -153
  1405. package/dist/generators/archetypes.js.map +0 -1
  1406. package/dist/generators/archetypes.test.d.ts +0 -2
  1407. package/dist/generators/archetypes.test.d.ts.map +0 -1
  1408. package/dist/generators/archetypes.test.js +0 -237
  1409. package/dist/generators/archetypes.test.js.map +0 -1
  1410. package/dist/generators/chain-classifier.d.ts +0 -49
  1411. package/dist/generators/chain-classifier.d.ts.map +0 -1
  1412. package/dist/generators/chain-classifier.js +0 -180
  1413. package/dist/generators/chain-classifier.js.map +0 -1
  1414. package/dist/generators/chain-classifier.test.d.ts +0 -2
  1415. package/dist/generators/chain-classifier.test.d.ts.map +0 -1
  1416. package/dist/generators/chain-classifier.test.js +0 -257
  1417. package/dist/generators/chain-classifier.test.js.map +0 -1
  1418. package/dist/generators/chain-rules.d.ts +0 -42
  1419. package/dist/generators/chain-rules.d.ts.map +0 -1
  1420. package/dist/generators/chain-rules.js +0 -144
  1421. package/dist/generators/chain-rules.js.map +0 -1
  1422. package/dist/generators/chain-rules.test.d.ts +0 -2
  1423. package/dist/generators/chain-rules.test.d.ts.map +0 -1
  1424. package/dist/generators/chain-rules.test.js +0 -179
  1425. package/dist/generators/chain-rules.test.js.map +0 -1
  1426. package/dist/generators/handshake-diff.d.ts +0 -67
  1427. package/dist/generators/handshake-diff.d.ts.map +0 -1
  1428. package/dist/generators/handshake-diff.js +0 -183
  1429. package/dist/generators/handshake-diff.js.map +0 -1
  1430. package/dist/generators/handshake-diff.test.d.ts +0 -2
  1431. package/dist/generators/handshake-diff.test.d.ts.map +0 -1
  1432. package/dist/generators/handshake-diff.test.js +0 -264
  1433. package/dist/generators/handshake-diff.test.js.map +0 -1
  1434. package/dist/lib/activation.d.ts +0 -28
  1435. package/dist/lib/activation.d.ts.map +0 -1
  1436. package/dist/lib/activation.js +0 -57
  1437. package/dist/lib/activation.js.map +0 -1
  1438. package/dist/lib/activation.test.d.ts +0 -6
  1439. package/dist/lib/activation.test.d.ts.map +0 -1
  1440. package/dist/lib/activation.test.js +0 -121
  1441. package/dist/lib/activation.test.js.map +0 -1
  1442. package/dist/lib/inferSourceDate.d.ts +0 -12
  1443. package/dist/lib/inferSourceDate.d.ts.map +0 -1
  1444. package/dist/lib/inferSourceDate.js +0 -44
  1445. package/dist/lib/inferSourceDate.js.map +0 -1
  1446. package/dist/lib/onboarding-phases.d.ts +0 -9
  1447. package/dist/lib/onboarding-phases.d.ts.map +0 -1
  1448. package/dist/lib/onboarding-phases.js +0 -120
  1449. package/dist/lib/onboarding-phases.js.map +0 -1
  1450. package/templates/archetypes/boundary.md +0 -23
  1451. package/templates/archetypes/constraint.md +0 -23
  1452. package/templates/archetypes/convention.md +0 -23
  1453. package/templates/archetypes/policy.md +0 -23
  1454. package/templates/archetypes/quality-gate.md +0 -23
  1455. 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
- * WP-319 S3: grounding fires in parallel, fail-open, --suggest-only, --strict, PB_GROUNDING_MODE.
4
+ * WP-319 S3: grounding fires in parallel, fail-open, --strict, PB_GROUNDING_MODE.
5
5
  */
6
- import { beforeEach, describe, expect, it, vi } from 'vitest';
6
+ import { afterEach, 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,119 +25,1239 @@ describe('runCapture --link', () => {
22
25
  kernelCallWithSessionMock.mockReset();
23
26
  mockSession = { sessionId: 'sess-test' };
24
27
  });
25
- it('creates entry then links to target with default relation type', async () => {
26
- // Prefix "TEN:" is extracted → skips classification, routes directly to tensions
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) => {
34
+ if (fn === 'chain.capture')
35
+ return Promise.resolve(null);
36
+ if (fn === 'chain.createEntry')
37
+ return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-710' });
38
+ if (fn === 'chain.getEntry') {
39
+ const entryId = args?.entryId;
40
+ if (entryId === 'TEN-710')
41
+ return Promise.resolve({ entryId: 'TEN-710', name: 'x', status: 'draft', canonicalKey: 'tension' });
42
+ return Promise.resolve(null);
43
+ }
44
+ // bdABL: the type row is resolved by scanning the semantic-types collection and
45
+ // matching on data.canonical_key — NOT by guessing entryId === `TYPE-<key>`. This
46
+ // row deliberately uses a non-conventional entryId (`ST-1`) to prove that.
47
+ if (fn === 'chain.listEntries') {
48
+ 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' } }]);
49
+ }
50
+ return Promise.resolve({});
51
+ });
52
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
53
+ await expect(runCapture({ text: 'TEN: missing validation', link: 'BET-151' })).rejects.toThrow(CLIError);
54
+ // The entry was created for real — only the LINK is refused.
55
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
56
+ collectionSlug: 'tensions',
57
+ name: 'missing validation',
58
+ }));
59
+ // Legal verbs are READ by scanning the semantic-types collection (chain.listEntries)
60
+ // and matching data.canonical_key — the same resolution loadTypeMap itself uses,
61
+ // never a probe, never a guessed entryId.
62
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.getEntry', { entryId: 'TEN-710' });
63
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.listEntries', { collectionSlug: 'semantic-types' });
64
+ // Never a createEntryRelation call at all — a real write, preview, or probe.
65
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntryRelation', expect.anything());
66
+ writeSpy.mockRestore();
67
+ });
68
+ it('--link without --link-type: refusal message lists the source entry\'s declared relation types', async () => {
69
+ kernelCallWithSessionMock.mockImplementation((fn, args) => {
70
+ if (fn === 'chain.capture')
71
+ return Promise.resolve(null);
72
+ if (fn === 'chain.createEntry')
73
+ return Promise.resolve({ docId: 'doc-1b', entryId: 'TEN-711' });
74
+ if (fn === 'chain.getEntry') {
75
+ const entryId = args?.entryId;
76
+ if (entryId === 'TEN-711')
77
+ return Promise.resolve({ entryId: 'TEN-711', name: 'x', status: 'draft', canonicalKey: 'tension' });
78
+ // bcRUMR: the target must actually resolve for this test to exercise the
79
+ // pb-relate-guidance branch rather than the target-missing branch.
80
+ if (entryId === 'BET-151')
81
+ return Promise.resolve({ entryId: 'BET-151', name: 'y', status: 'active', canonicalKey: 'work_package' });
82
+ return Promise.resolve(null);
83
+ }
84
+ if (fn === 'chain.listEntries') {
85
+ 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' } }]);
86
+ }
87
+ return Promise.resolve({});
88
+ });
89
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
90
+ let caught;
91
+ try {
92
+ await runCapture({ text: 'TEN: missing validation', link: 'BET-151' });
93
+ }
94
+ catch (e) {
95
+ caught = e;
96
+ }
97
+ writeSpy.mockRestore();
98
+ expect(caught).toBeInstanceOf(CLIError);
99
+ expect(caught?.code).toBe(ErrorCode.VALIDATION_FAILED);
100
+ expect(caught?.message).toContain('related_to, depends_on, surfaces_tension_in');
101
+ expect(caught?.guidance).toContain('TEN-711');
102
+ expect(caught?.guidance).toContain('pb relate TEN-711');
103
+ });
104
+ // WP-688 S4 review round 5 (bcRUML): a whitespace-only --link must not silently no-op —
105
+ // the entry still gets created, but the link itself must be explicitly refused.
106
+ it('--link " " (whitespace-only) refuses instead of silently dropping the link', async () => {
107
+ kernelCallWithSessionMock.mockImplementation((fn) => {
108
+ if (fn === 'chain.capture')
109
+ return Promise.resolve(null);
110
+ if (fn === 'chain.createEntry')
111
+ return Promise.resolve({ docId: 'doc-ws', entryId: 'TEN-720' });
112
+ return Promise.resolve({});
113
+ });
114
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
115
+ let caught;
116
+ try {
117
+ await runCapture({ text: 'TEN: whitespace link', link: ' ' });
118
+ }
119
+ catch (e) {
120
+ caught = e;
121
+ }
122
+ writeSpy.mockRestore();
123
+ expect(caught).toBeInstanceOf(CLIError);
124
+ expect(caught?.message).toContain('--link requires a non-empty entry ID');
125
+ // Never a relate/probe call — the target never resolved to anything real.
126
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntryRelation', expect.anything());
127
+ });
128
+ // WP-688 S4 review round 5 (bcRpJQ): --link "" is falsy at the outer `if (options.link)` —
129
+ // must check `!== undefined` instead, or this whole block (and the bcRUML refusal) never runs.
130
+ it('--link "" (empty string) refuses instead of silently dropping the link', async () => {
131
+ kernelCallWithSessionMock.mockImplementation((fn) => {
132
+ if (fn === 'chain.capture')
133
+ return Promise.resolve(null);
134
+ if (fn === 'chain.createEntry')
135
+ return Promise.resolve({ docId: 'doc-empty', entryId: 'TEN-722' });
136
+ return Promise.resolve({});
137
+ });
138
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
139
+ let caught;
140
+ try {
141
+ await runCapture({ text: 'TEN: empty link', link: '' });
142
+ }
143
+ catch (e) {
144
+ caught = e;
145
+ }
146
+ writeSpy.mockRestore();
147
+ expect(caught).toBeInstanceOf(CLIError);
148
+ expect(caught?.message).toContain('--link requires a non-empty entry ID');
149
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntryRelation', expect.anything());
150
+ });
151
+ // WP-688 S4 review round 5 (bcRUMR): the target entry doesn't exist — the recovery
152
+ // guidance must say so rather than recommending `pb relate <verb> <missing-id>`.
153
+ it('--link <missing-id> without --link-type reports the target was not found, not a verb-recovery command', async () => {
154
+ kernelCallWithSessionMock.mockImplementation((fn, args) => {
155
+ if (fn === 'chain.capture')
156
+ return Promise.resolve(null);
157
+ if (fn === 'chain.createEntry')
158
+ return Promise.resolve({ docId: 'doc-miss', entryId: 'TEN-721' });
159
+ if (fn === 'chain.getEntry') {
160
+ const entryId = args?.entryId;
161
+ if (entryId === 'TEN-721')
162
+ return Promise.resolve({ entryId: 'TEN-721', name: 'x', status: 'draft', canonicalKey: 'tension' });
163
+ return Promise.resolve(null); // GHOST-1 does not exist
164
+ }
165
+ if (fn === 'chain.listEntries') {
166
+ return Promise.resolve([{ entryId: 'TYPE-tension', name: 'tension', status: 'active', data: { canonical_key: 'tension', valid_relation_types: ['informs'], description: 'x', cardinality_rule: 'multiple' } }]);
167
+ }
168
+ return Promise.resolve({});
169
+ });
170
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
171
+ let caught;
172
+ try {
173
+ await runCapture({ text: 'TEN: bad target', link: 'GHOST-1' });
174
+ }
175
+ catch (e) {
176
+ caught = e;
177
+ }
178
+ writeSpy.mockRestore();
179
+ expect(caught?.guidance).toContain('not found');
180
+ expect(caught?.guidance).toContain('GHOST-1');
181
+ expect(caught?.guidance).not.toContain('pb relate');
182
+ });
183
+ // WP-688 S4 review round 3 (bc4Pj): `replaces`/`do_not_confuse_with` are declared for
184
+ // scoring but hard-refused at the generic relate door with a DIFFERENT recovery command
185
+ // (setSupersededBy / addDoNotConfuseWith, guards.ts:308-321) — listing them as usable via
186
+ // `pb relate` would name a guaranteed-to-fail re-run.
187
+ it('excludes replaces and do_not_confuse_with from the refusal\'s legal-verb list (both are door-blocked)', async () => {
188
+ kernelCallWithSessionMock.mockImplementation((fn, args) => {
189
+ if (fn === 'chain.capture')
190
+ return Promise.resolve(null);
191
+ if (fn === 'chain.createEntry')
192
+ return Promise.resolve({ docId: 'doc-1c', entryId: 'DEC-1' });
193
+ if (fn === 'chain.getEntry') {
194
+ const entryId = args?.entryId;
195
+ if (entryId === 'DEC-1')
196
+ return Promise.resolve({ entryId: 'DEC-1', name: 'x', status: 'draft', canonicalKey: 'decision' });
197
+ return Promise.resolve(null);
198
+ }
199
+ if (fn === 'chain.listEntries') {
200
+ 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' } }]);
201
+ }
202
+ return Promise.resolve({});
203
+ });
204
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
205
+ let caught;
206
+ try {
207
+ await runCapture({ text: 'DEC: no link-type', link: 'STD-1' });
208
+ }
209
+ catch (e) {
210
+ caught = e;
211
+ }
212
+ writeSpy.mockRestore();
213
+ expect(caught?.message).toContain('informs, governs, conflicts_with');
214
+ expect(caught?.message).not.toContain('replaces');
215
+ });
216
+ // WP-688 S4 review round 5 (bdB5K): registry reconciliation deliberately preserves a
217
+ // workspace's customized valid_relation_types even when it contains a verb outside the
218
+ // kernel ALLOWED_RELATION_TYPES allowlist (registryReconcile.test.ts:131-147) — a supported
219
+ // persisted state, not malformed data. guardRelation still refuses it (guards.ts:302-307),
220
+ // so it must never be listed as a `pb relate`-usable recovery verb.
221
+ it('excludes a declared verb outside the kernel allowlist from the refusal\'s legal-verb list', async () => {
222
+ kernelCallWithSessionMock.mockImplementation((fn, args) => {
223
+ if (fn === 'chain.capture')
224
+ return Promise.resolve(null);
225
+ if (fn === 'chain.createEntry')
226
+ return Promise.resolve({ docId: 'doc-1d', entryId: 'GOAL-1' });
227
+ if (fn === 'chain.getEntry') {
228
+ const entryId = args?.entryId;
229
+ if (entryId === 'GOAL-1')
230
+ return Promise.resolve({ entryId: 'GOAL-1', name: 'x', status: 'draft', canonicalKey: 'goal' });
231
+ return Promise.resolve(null);
232
+ }
233
+ if (fn === 'chain.listEntries') {
234
+ 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' } }]);
235
+ }
236
+ return Promise.resolve({});
237
+ });
238
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
239
+ let caught;
240
+ try {
241
+ await runCapture({ text: 'GOAL: no link-type', link: 'BET-1' });
242
+ }
243
+ catch (e) {
244
+ caught = e;
245
+ }
246
+ writeSpy.mockRestore();
247
+ expect(caught?.message).toContain('informs, depends_on');
248
+ expect(caught?.message).not.toContain('custom_hand_added');
249
+ });
250
+ // WP-688 S4 review round 5 (cQFZ_): belongs_to/authority_domain toward a domain-tagged
251
+ // target require ratification metadata (stagingEntryId + source) that `pb relate` cannot
252
+ // supply (guards.ts:349-363) — never recommend them as recovery verbs for such a target.
253
+ it('excludes domain-tag verbs from the refusal\'s legal-verb list when the target is a domain', async () => {
254
+ kernelCallWithSessionMock.mockImplementation((fn, args) => {
255
+ if (fn === 'chain.capture')
256
+ return Promise.resolve(null);
257
+ if (fn === 'chain.createEntry')
258
+ return Promise.resolve({ docId: 'doc-1e', entryId: 'INS-1' });
259
+ if (fn === 'chain.getEntry') {
260
+ const entryId = args?.entryId;
261
+ if (entryId === 'INS-1')
262
+ return Promise.resolve({ entryId: 'INS-1', name: 'x', status: 'draft', canonicalKey: 'insight' });
263
+ if (entryId === 'DOM-1')
264
+ return Promise.resolve({ entryId: 'DOM-1', name: 'product-design', status: 'active', canonicalKey: 'domain' });
265
+ return Promise.resolve(null);
266
+ }
267
+ if (fn === 'chain.listEntries') {
268
+ 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' } }]);
269
+ }
270
+ return Promise.resolve({});
271
+ });
272
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
273
+ let caught;
274
+ try {
275
+ await runCapture({ text: 'INS: no link-type', link: 'DOM-1' });
276
+ }
277
+ catch (e) {
278
+ caught = e;
279
+ }
280
+ writeSpy.mockRestore();
281
+ expect(caught?.message).toContain('Legal relation types for this entry: informs.');
282
+ expect(caught?.message).not.toContain('belongs_to');
283
+ expect(caught?.message).not.toContain('authority_domain');
284
+ });
285
+ it('uses the supplied relation type when --link-type provided (no probe, real write)', async () => {
286
+ // Prefix "INS:" is extracted → skips classification, routes directly to insights
287
+ kernelCallWithSessionMock.mockImplementation((fn) => {
288
+ if (fn === 'chain.capture')
289
+ return Promise.resolve(null);
290
+ if (fn === 'chain.createEntry')
291
+ return Promise.resolve({ docId: 'doc-2', entryId: 'INS-50' });
292
+ if (fn === 'chain.createEntryRelation')
293
+ return Promise.resolve({ relationId: 'rel-1' });
294
+ return Promise.resolve({});
295
+ });
296
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
297
+ await runCapture({ text: 'INS: discovered X', link: 'DEC-264', linkType: 'informed_by' });
298
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
299
+ // A REAL (non-preview) write — the exact verb supplied, echoed verbatim, no probe call.
300
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntryRelation', {
301
+ fromEntryId: 'INS-50',
302
+ toEntryId: 'DEC-264',
303
+ type: 'informed_by',
304
+ });
305
+ const previewCalls = kernelCallWithSessionMock.mock.calls.filter(([fn, args]) => fn === 'chain.createEntryRelation' && args?.preview);
306
+ expect(previewCalls).toHaveLength(0);
307
+ writeSpy.mockRestore();
308
+ });
309
+ // WP-745 review (Codex P1): a relate-door refusal (e.g. REL-LEGAL-2) at the --link-type
310
+ // branch must not escape as an unhandled rejection — the entry above was ALREADY persisted,
311
+ // so the capture reports it, naming only the link as refused (same shape as the
312
+ // --link-without---link-type branch above).
313
+ it('a relate-door refusal during --link is deferred, naming the persisted entry — never an unhandled rejection', async () => {
314
+ kernelCallWithSessionMock.mockImplementation((fn) => {
315
+ if (fn === 'chain.capture')
316
+ return Promise.resolve(null);
317
+ if (fn === 'chain.createEntry')
318
+ return Promise.resolve({ docId: 'doc-wp', entryId: 'WP-6' });
319
+ if (fn === 'chain.createEntryRelation') {
320
+ 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' }));
321
+ }
322
+ return Promise.resolve({});
323
+ });
324
+ let caught;
325
+ try {
326
+ await runCapture({ text: 'WP: child work package', link: 'WP-5', linkType: 'part_of' });
327
+ }
328
+ catch (e) {
329
+ caught = e;
330
+ }
331
+ expect(caught).toBeInstanceOf(CLIError);
332
+ expect(caught?.message).toContain('A work package is never part_of another work package');
333
+ expect(caught?.guidance).toContain('WP-6 was captured');
334
+ expect(caught?.guidance).toContain('only the link was refused');
335
+ });
336
+ // WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0CCc): a NON-REL-LEGAL-2 relate-door
337
+ // failure (auth denial, rate limit) must keep its OWN code/category — the earlier fix
338
+ // unconditionally relabeled every deferred link failure VALIDATION_FAILED, discarding the
339
+ // real error's identity.
340
+ it('a non-validation relate-door failure during --link preserves its own code/category, not a relabeled VALIDATION_FAILED', async () => {
341
+ kernelCallWithSessionMock.mockImplementation((fn) => {
342
+ if (fn === 'chain.capture')
343
+ return Promise.resolve(null);
344
+ if (fn === 'chain.createEntry')
345
+ return Promise.resolve({ docId: 'doc-wp7', entryId: 'WP-7' });
346
+ if (fn === 'chain.createEntryRelation') {
347
+ return Promise.reject(new CLIError('Rate limit exceeded', { code: ErrorCode.RATE_LIMITED, category: 'network', guidance: 'Wait and retry.' }));
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.RATE_LIMITED);
362
+ expect(caught?.category).toBe('network');
363
+ expect(caught?.message).toBe('Rate limit exceeded');
364
+ expect(caught?.guidance).toContain('WP-7 was captured');
365
+ });
366
+ // WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0VPP): a NETWORK_TIMEOUT relate failure is
367
+ // outcome-UNKNOWN (the write may have landed server-side) — the guidance must say so, never
368
+ // the "was refused, re-run" template, which would prompt a blind duplicate-risking retry.
369
+ it('a NETWORK_TIMEOUT relate-door failure during --link says outcome-unknown, never "was refused"', async () => {
370
+ kernelCallWithSessionMock.mockImplementation((fn) => {
371
+ if (fn === 'chain.capture')
372
+ return Promise.resolve(null);
373
+ if (fn === 'chain.createEntry')
374
+ return Promise.resolve({ docId: 'doc-wp9', entryId: 'WP-9' });
375
+ if (fn === 'chain.createEntryRelation') {
376
+ return Promise.reject(new CLIError('"chain.createEntryRelation" exceeded its budget.', { code: ErrorCode.NETWORK_TIMEOUT, category: 'network', guidance: 'Check before retrying.' }));
377
+ }
378
+ if (fn === 'quality.evaluateHeuristicAndSchedule')
379
+ return Promise.resolve(undefined);
380
+ return Promise.resolve({});
381
+ });
382
+ let caught;
383
+ try {
384
+ await runCapture({ text: 'WP: child work package', link: 'WP-5', linkType: 'part_of' });
385
+ }
386
+ catch (e) {
387
+ caught = e;
388
+ }
389
+ expect(caught).toBeInstanceOf(CLIError);
390
+ expect(caught?.code).toBe(ErrorCode.NETWORK_TIMEOUT);
391
+ expect(caught?.guidance).toContain('outcome is UNKNOWN');
392
+ expect(caught?.guidance).not.toContain('was refused');
393
+ });
394
+ // WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0CCc): the quality re-eval must still run
395
+ // (un-defers deferLLMSchedule) even when the relate call itself throws — previously the
396
+ // re-eval sat INSIDE the same try as the relate call, so a thrown refusal skipped it
397
+ // entirely, leaving the entry stuck at llmStatus:'skipped' with no background judgment ever
398
+ // scheduled.
399
+ it('the quality re-eval still runs after a relate-door refusal — the entry is not left permanently deferred', async () => {
400
+ kernelCallWithSessionMock.mockImplementation((fn) => {
401
+ if (fn === 'chain.capture')
402
+ return Promise.resolve(null);
403
+ if (fn === 'chain.createEntry')
404
+ return Promise.resolve({ docId: 'doc-wp8', entryId: 'WP-8' });
405
+ if (fn === 'chain.createEntryRelation') {
406
+ return Promise.reject(Object.assign(new Error('refused'), { name: 'McpError' }));
407
+ }
408
+ if (fn === 'quality.evaluateHeuristicAndSchedule')
409
+ return Promise.resolve({ verdict: 'pass' });
410
+ return Promise.resolve({});
411
+ });
412
+ try {
413
+ await runCapture({ text: 'WP: child work package', link: 'WP-5', linkType: 'part_of' });
414
+ }
415
+ catch {
416
+ // The refusal itself is expected — asserted by the sibling test above; this test only
417
+ // cares that the re-eval call happened before/regardless of it.
418
+ }
419
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', {
420
+ entryId: 'WP-8',
421
+ context: 'capture',
422
+ });
423
+ });
424
+ // WP-688 S4 (element 11): the human receipt prints the REAL verb — no `?? 'surfaces_tension_in'`
425
+ // fallback (formatters/capture.ts:105).
426
+ it('the human-readable receipt prints the real relation type, never the dead surfaces_tension_in fallback', async () => {
427
+ kernelCallWithSessionMock.mockImplementation((fn) => {
428
+ if (fn === 'chain.capture')
429
+ return Promise.resolve(null);
430
+ if (fn === 'chain.createEntry')
431
+ return Promise.resolve({ docId: 'doc-2b', entryId: 'INS-51' });
432
+ if (fn === 'chain.createEntryRelation')
433
+ return Promise.resolve({ relationId: 'rel-1' });
434
+ return Promise.resolve({});
435
+ });
436
+ let stdoutOutput = '';
437
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
438
+ stdoutOutput += String(chunk);
439
+ return true;
440
+ });
441
+ setOutputMode('pretty'); // force the human receipt path (test harness's stdout is non-TTY)
442
+ try {
443
+ await runCapture({ text: 'INS: discovered Y', link: 'DEC-265', linkType: 'validates' });
444
+ }
445
+ finally {
446
+ setOutputMode('auto');
447
+ writeSpy.mockRestore();
448
+ }
449
+ expect(stdoutOutput).toContain('Linked: → DEC-265 (validates)');
450
+ expect(stdoutOutput).not.toContain('surfaces_tension_in');
451
+ });
452
+ // WP-688 S4 review round 2 (bc04z): a diverted relation call (the DEC-1399 auto-link gate
453
+ // routing an edge to a pending suggestion instead of writing it — WP-776 S2a, DEC-1771
454
+ // deletes the OTHER diversion this once named, the governs-consent proposal) returns
455
+ // WITHOUT a relationId — only a real, persisted write may claim `linkedTo`/`relationType`.
456
+ it('an auto-link-gate diversion (no relationId) is never reported as a persisted link', async () => {
457
+ kernelCallWithSessionMock.mockImplementation((fn) => {
458
+ if (fn === 'chain.capture')
459
+ return Promise.resolve(null);
460
+ if (fn === 'chain.createEntry')
461
+ return Promise.resolve({ docId: 'doc-3', entryId: 'WPKG-1' });
462
+ if (fn === 'chain.createEntryRelation') {
463
+ return Promise.resolve({ ok: false, status: 'advised', advised: true });
464
+ }
465
+ return Promise.resolve({});
466
+ });
467
+ let stdoutOutput = '';
468
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
469
+ stdoutOutput += String(chunk);
470
+ return true;
471
+ });
472
+ await runCapture({ text: 'WPKG: governance test', link: 'STD-1', linkType: 'governs', json: true });
473
+ writeSpy.mockRestore();
474
+ const output = JSON.parse(stdoutOutput.split('\n').find((line) => {
475
+ try {
476
+ JSON.parse(line);
477
+ return true;
478
+ }
479
+ catch {
480
+ return false;
481
+ }
482
+ }));
483
+ expect(output.relationType).toBeUndefined();
484
+ // WP-688 S4 review fix (bc7cr): the re-eval call STILL fires — it's the only thing that
485
+ // un-defers the LLM schedule deferLLMSchedule set (a relate WAS attempted) — but its
486
+ // verdict is discarded: no relation landed, so relation-dependent criteria stay unscored.
487
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', {
488
+ entryId: 'WPKG-1',
489
+ context: 'capture',
490
+ });
491
+ expect(output.coaching).toBeUndefined();
492
+ });
493
+ // WP-688 S4 review round 2 (bc045): --link without --link-type must not defer the LLM
494
+ // schedule — the refusal branch never runs the re-eval that would un-defer it, so a
495
+ // deferred-then-never-run schedule would leave the entry permanently stuck.
496
+ it('--link without --link-type does NOT defer the LLM schedule (nothing will ever un-defer it)', async () => {
497
+ kernelCallWithSessionMock.mockImplementation((fn) => {
498
+ if (fn === 'chain.capture')
499
+ return Promise.resolve(null);
500
+ if (fn === 'chain.createEntry')
501
+ return Promise.resolve({ docId: 'doc-4', entryId: 'TEN-20' });
502
+ if (fn === 'chain.createEntryRelation')
503
+ return Promise.resolve({ preview: true, advisories: [] });
504
+ return Promise.resolve({});
505
+ });
506
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
507
+ await expect(runCapture({ text: 'TEN: refused link, no defer', link: 'BET-1' })).rejects.toThrow(CLIError);
508
+ writeSpy.mockRestore();
509
+ const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
510
+ expect(createCall?.[1]).not.toHaveProperty('deferLLMSchedule');
511
+ });
512
+ // WP-688 S4 review round 2 (bc049): a dropped field and a --link-type refusal can both be true
513
+ // on the SAME capture — the entry was created either way, so both must reach the operator.
514
+ // TASK-584 (WP-802, TEN-4312): the dropped field is a warning on the landed reply, the link
515
+ // refusal is the only error.
516
+ it('prints the dropped-field warning AND throws the link-type refusal when they co-occur', async () => {
517
+ kernelCallWithSessionMock.mockImplementation((fn) => {
518
+ if (fn === 'chain.capture')
519
+ return Promise.resolve(null);
520
+ if (fn === 'chain.createEntry') {
521
+ return Promise.resolve({
522
+ docId: 'doc-5', entryId: 'TEN-21',
523
+ normalization: { remapped: {}, rejected: ['badField'], accepted: [] },
524
+ });
525
+ }
526
+ if (fn === 'chain.createEntryRelation')
527
+ return Promise.resolve({ preview: true, advisories: [] });
528
+ return Promise.resolve({});
529
+ });
530
+ const out = [];
531
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out.push(String(chunk)); return true; });
532
+ let caught;
533
+ try {
534
+ await runCapture({ text: 'TEN: both failures at once', link: 'BET-1', json: true });
535
+ }
536
+ catch (e) {
537
+ caught = e;
538
+ }
539
+ writeSpy.mockRestore();
540
+ expect(caught).toBeInstanceOf(CLIError);
541
+ expect(JSON.parse(out.join(''))).toMatchObject({ id: 'TEN-21', droppedFields: ['badField'] });
542
+ expect(caught?.message).not.toContain('Fields rejected');
543
+ expect(caught?.message).toContain('--link requires --link-type');
544
+ expect(caught?.guidance).toContain('TEN-21');
545
+ });
546
+ // WP-745 round 3 (PR #896 review, PRRT_kwDORS4ils6h0e82): the link-refused error beside a
547
+ // dropped field must preserve the link failure's OWN code/category (e.g. NETWORK_TIMEOUT)
548
+ // rather than always relabeling the aggregate VALIDATION_FAILED — automation branching on the
549
+ // error code must still see the timeout, not a generic validation failure.
550
+ it('the link-refused error beside a dropped field keeps the link failure\'s own code (NETWORK_TIMEOUT), not VALIDATION_FAILED', async () => {
551
+ kernelCallWithSessionMock.mockImplementation((fn) => {
552
+ if (fn === 'chain.capture')
553
+ return Promise.resolve(null);
554
+ if (fn === 'chain.createEntry') {
555
+ return Promise.resolve({
556
+ docId: 'doc-10', entryId: 'TEN-22',
557
+ normalization: { remapped: {}, rejected: ['badField'], accepted: [] },
558
+ });
559
+ }
560
+ if (fn === 'chain.createEntryRelation') {
561
+ return Promise.reject(new CLIError('"chain.createEntryRelation" exceeded its budget.', { code: ErrorCode.NETWORK_TIMEOUT, category: 'network', guidance: 'Check before retrying.' }));
562
+ }
563
+ if (fn === 'quality.evaluateHeuristicAndSchedule')
564
+ return Promise.resolve(undefined);
565
+ return Promise.resolve({});
566
+ });
567
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
568
+ let caught;
569
+ try {
570
+ await runCapture({ text: 'TEN: both failures, timeout link', link: 'BET-1', linkType: 'part_of' });
571
+ }
572
+ catch (e) {
573
+ caught = e;
574
+ }
575
+ writeSpy.mockRestore();
576
+ expect(caught).toBeInstanceOf(CLIError);
577
+ expect(caught?.code).toBe(ErrorCode.NETWORK_TIMEOUT);
578
+ expect(caught?.message).not.toContain('Fields rejected');
579
+ });
580
+ });
581
+ // WP-684 TASK-77 (E1.3): one-step typed create — --entry-type forwards to chain.createEntry's
582
+ // existing `canonicalKey` arg. Named --entry-type since -t/--type is the --link relation type.
583
+ describe('runCapture --entry-type', () => {
584
+ beforeEach(() => {
585
+ kernelCallWithSessionMock.mockReset();
586
+ mockSession = { sessionId: 'sess-test' };
587
+ });
588
+ it('forwards --entry-type as canonicalKey on the chain.createEntry payload', async () => {
589
+ kernelCallWithSessionMock.mockImplementation((fn) => {
590
+ if (fn === 'chain.capture')
591
+ return Promise.resolve(null);
592
+ if (fn === 'chain.createEntry')
593
+ return Promise.resolve({ docId: 'doc-3', entryId: 'OBJ-1' });
594
+ return Promise.resolve({});
595
+ });
596
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
597
+ await runCapture({ text: 'the objective', collection: 'key-results', entryType: 'objective' });
598
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
599
+ collectionSlug: 'key-results',
600
+ canonicalKey: 'objective',
601
+ }));
602
+ writeSpy.mockRestore();
603
+ });
604
+ it('omits canonicalKey entirely when --entry-type is absent (byte-identical default path)', async () => {
605
+ kernelCallWithSessionMock.mockImplementation((fn) => {
606
+ if (fn === 'chain.capture')
607
+ return Promise.resolve(null);
608
+ if (fn === 'chain.createEntry')
609
+ return Promise.resolve({ docId: 'doc-4', entryId: 'OBJ-1' });
610
+ return Promise.resolve({});
611
+ });
612
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
613
+ await runCapture({ text: 'a key result', collection: 'key-results' });
614
+ const call = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
615
+ expect(call?.[1]).not.toHaveProperty('canonicalKey');
616
+ writeSpy.mockRestore();
617
+ });
618
+ // Review round 2 (bcI42): --entry-type's help text promises it "bypasses classification",
619
+ // but without an ALSO-explicit --collection, the resolution chain fell through to
620
+ // chain.resolveCollection anyway — objective/key_result text could classify into the wrong
621
+ // collection (e.g. strategy) and then fail the placement guard. --entry-type alone must route
622
+ // straight to the shared Objectives drawer with no classification call at all.
623
+ it('--entry-type objective alone (no --collection) skips classification and routes to the Objectives drawer (bcI42)', async () => {
624
+ kernelCallWithSessionMock.mockImplementation((fn) => {
625
+ if (fn === 'chain.capture')
626
+ return Promise.resolve(null);
627
+ if (fn === 'chain.createEntry')
628
+ return Promise.resolve({ docId: 'doc-5', entryId: 'OBJ-2' });
629
+ return Promise.resolve({});
630
+ });
631
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
632
+ await runCapture({ text: 'another objective', entryType: 'objective' });
633
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
634
+ // PR #713 post-merge review (PRRT_kwDORS4ils6cQP_I, P1): 'key-results' is the RETIRED slug —
635
+ // the fix derives the drawer's current slug from the live registry (OBJ idPrefix), which is
636
+ // 'objectives' post-WP-686.
637
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
638
+ collectionSlug: 'objectives',
639
+ canonicalKey: 'objective',
640
+ }));
641
+ writeSpy.mockRestore();
642
+ });
643
+ // WP-707 S1 round 2 (DEC-1622, Codex PRRT_kwDORS4ils6dUxaz): key_result now files into its
644
+ // OWN 1:1 drawer (key-results, idPrefix KR) — it no longer shares the Objectives drawer.
645
+ it('--entry-type key_result alone (no --collection) routes to the Key Results drawer (DEC-1622)', async () => {
646
+ kernelCallWithSessionMock.mockImplementation((fn) => {
647
+ if (fn === 'chain.capture')
648
+ return Promise.resolve(null);
649
+ if (fn === 'chain.createEntry')
650
+ return Promise.resolve({ docId: 'doc-6', entryId: 'KR-2' });
651
+ return Promise.resolve({});
652
+ });
653
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
654
+ await runCapture({ text: 'another key result', entryType: 'key_result' });
655
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
656
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
657
+ collectionSlug: 'key-results',
658
+ canonicalKey: 'key_result',
659
+ }));
660
+ writeSpy.mockRestore();
661
+ });
662
+ // Review round 3 (bclZ9): --entry-type Objective (mixed case) or " objective " (whitespace)
663
+ // must route to the drawer too -- the server normalizes explicit keys with
664
+ // toLowerCase().trim() downstream, so client-side routing must match or it falls through to
665
+ // classification (often landing in 'strategy') and the placement guard then rejects it.
666
+ it('--entry-type with mixed case/whitespace still routes to the Objectives drawer, no classification call (bclZ9)', async () => {
667
+ kernelCallWithSessionMock.mockImplementation((fn) => {
668
+ if (fn === 'chain.capture')
669
+ return Promise.resolve(null);
670
+ if (fn === 'chain.createEntry')
671
+ return Promise.resolve({ docId: 'doc-7', entryId: 'OBJ-3' });
672
+ return Promise.resolve({});
673
+ });
674
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
675
+ await runCapture({ text: 'a padded objective', entryType: ' Objective ' });
676
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
677
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
678
+ collectionSlug: 'objectives',
679
+ }));
680
+ writeSpy.mockRestore();
681
+ });
682
+ // WP-707 S1 round 3 (operator ruling #13): the fast path is now a GENERAL derivation off the
683
+ // registry's defaultCanonicalKey (getCanonicalKeyToCollection), not two hardcoded
684
+ // objective/key_result branches — this proves a THIRD kind that was never one of those two
685
+ // branches (strategy) still skips classification and routes to its own drawer.
686
+ it('--entry-type strategy alone (no --collection) skips classification and routes to the Strategy drawer — proves the derivation is general, not a hardcoded pair', async () => {
687
+ kernelCallWithSessionMock.mockImplementation((fn) => {
688
+ if (fn === 'chain.capture')
689
+ return Promise.resolve(null);
690
+ if (fn === 'chain.createEntry')
691
+ return Promise.resolve({ docId: 'doc-8', entryId: 'STR-1' });
692
+ return Promise.resolve({});
693
+ });
694
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
695
+ await runCapture({ text: 'our approach to winning', entryType: 'strategy' });
696
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
697
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
698
+ collectionSlug: 'strategy',
699
+ canonicalKey: 'strategy',
700
+ }));
701
+ writeSpy.mockRestore();
702
+ });
703
+ // WP-707 S1 round 3.1 (Codex post-round-3 P2): vision/purpose are brand-new drawers this same
704
+ // PR adds — the offline SEED fallback (collectionRegistry.ts) must carry them too, or the
705
+ // --entry-type derivation silently can't resolve them during a chain.listCollections outage.
706
+ it('--entry-type vision alone (no --collection) skips classification and routes to the Vision drawer, even offline', async () => {
707
+ kernelCallWithSessionMock.mockImplementation((fn) => {
708
+ if (fn === 'chain.capture')
709
+ return Promise.resolve(null);
710
+ if (fn === 'chain.createEntry')
711
+ return Promise.resolve({ docId: 'doc-9', entryId: 'VIS-1' });
712
+ return Promise.resolve({});
713
+ });
714
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
715
+ await runCapture({ text: 'a world where knowledge compounds', entryType: 'vision' });
716
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
717
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
718
+ collectionSlug: 'vision',
719
+ canonicalKey: 'vision',
720
+ }));
721
+ writeSpy.mockRestore();
722
+ });
723
+ });
724
+ describe('runCapture --json', () => {
725
+ beforeEach(() => {
726
+ kernelCallWithSessionMock.mockReset();
727
+ mockSession = { sessionId: 'sess-test' };
728
+ });
729
+ it('outputs valid JSON with id field and no other stdout', async () => {
730
+ // Prefix "TEN:" is extracted → skips classification
731
+ kernelCallWithSessionMock.mockImplementation((fn) => {
732
+ if (fn === 'chain.capture')
733
+ return Promise.resolve(null);
734
+ if (fn === 'chain.createEntry')
735
+ return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-711' });
736
+ return Promise.resolve({});
737
+ });
738
+ let stdoutOutput = '';
739
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
740
+ stdoutOutput += String(chunk);
741
+ return true;
742
+ });
743
+ await runCapture({ text: 'TEN: test', json: true });
744
+ writeSpy.mockRestore();
745
+ // Find JSON lines in stdout
746
+ const jsonLines = stdoutOutput.split('\n').filter(line => {
747
+ try {
748
+ JSON.parse(line);
749
+ return true;
750
+ }
751
+ catch {
752
+ return false;
753
+ }
754
+ });
755
+ expect(jsonLines).toHaveLength(1);
756
+ const output = JSON.parse(jsonLines[0]);
757
+ expect(output).toHaveProperty('id', 'TEN-711');
758
+ expect(output).toHaveProperty('collection', 'tensions');
759
+ expect(output).toHaveProperty('confidence');
760
+ });
761
+ });
762
+ describe('runCapture coaching passthrough (WP-475 E1)', () => {
763
+ beforeEach(() => {
764
+ kernelCallWithSessionMock.mockReset();
765
+ mockSession = { sessionId: 'sess-test' };
766
+ });
767
+ const coaching = {
768
+ source: 'heuristic',
769
+ verdict: {
770
+ entryId: 'DEC-77',
771
+ canonicalKey: 'decision',
772
+ tier: 'assertive',
773
+ context: 'capture',
774
+ passed: false,
775
+ criteria: [
776
+ { id: 'specificity', passed: false, weight: 2, hint: 'Be specific.', questionTemplate: 'What exactly?' },
777
+ ],
778
+ weakest: { criterion: 'specificity', hint: 'Be specific.', questionTemplate: 'What exactly?' },
779
+ overridden: false,
780
+ },
781
+ };
782
+ it('--json output includes the raw coaching object from the write response', async () => {
783
+ kernelCallWithSessionMock.mockImplementation((fn) => {
784
+ if (fn === 'chain.capture')
785
+ return Promise.resolve(null);
786
+ if (fn === 'chain.createEntry')
787
+ return Promise.resolve({ docId: 'doc-c1', entryId: 'DEC-77', coaching });
788
+ return Promise.resolve({});
789
+ });
790
+ let stdoutOutput = '';
791
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
792
+ stdoutOutput += String(chunk);
793
+ return true;
794
+ });
795
+ await runCapture({ text: 'DEC: chose something', json: true });
796
+ writeSpy.mockRestore();
797
+ const jsonLines = stdoutOutput.split('\n').filter((line) => {
798
+ try {
799
+ JSON.parse(line);
800
+ return true;
801
+ }
802
+ catch {
803
+ return false;
804
+ }
805
+ });
806
+ expect(jsonLines).toHaveLength(1);
807
+ const output = JSON.parse(jsonLines[0]);
808
+ expect(output.coaching).toEqual(coaching);
809
+ });
810
+ it('--json output omits coaching when the write response has none (backward compat)', async () => {
811
+ kernelCallWithSessionMock.mockImplementation((fn) => {
812
+ if (fn === 'chain.capture')
813
+ return Promise.resolve(null);
814
+ if (fn === 'chain.createEntry')
815
+ return Promise.resolve({ docId: 'doc-c2', entryId: 'DEC-78' });
816
+ return Promise.resolve({});
817
+ });
818
+ let stdoutOutput = '';
819
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
820
+ stdoutOutput += String(chunk);
821
+ return true;
822
+ });
823
+ await runCapture({ text: 'DEC: chose another thing', json: true });
824
+ writeSpy.mockRestore();
825
+ const jsonLines = stdoutOutput.split('\n').filter((line) => {
826
+ try {
827
+ JSON.parse(line);
828
+ return true;
829
+ }
830
+ catch {
831
+ return false;
832
+ }
833
+ });
834
+ expect(jsonLines).toHaveLength(1);
835
+ expect(JSON.parse(jsonLines[0])).not.toHaveProperty('coaching');
836
+ });
837
+ // ── WP-475 E1 fix: relation-aware receipt on --link ────────────────────────
838
+ // The create-response verdict is computed BEFORE the --link relation exists,
839
+ // so relation-dependent criteria (wired-in checks) read falsely failed. When
840
+ // the capture created a relation, the CLI re-evaluates AFTER it lands and
841
+ // renders THAT verdict.
842
+ const reEvalCoaching = {
843
+ source: 'heuristic',
844
+ verdict: {
845
+ ...coaching.verdict,
846
+ passed: true,
847
+ criteria: [{ id: 'specificity', passed: true, weight: 2, hint: 'Be specific.', questionTemplate: 'What exactly?' }],
848
+ weakest: null,
849
+ },
850
+ };
851
+ it('--link: re-evaluates after the relation lands and renders the post-relation verdict', async () => {
852
+ kernelCallWithSessionMock.mockImplementation((fn) => {
853
+ if (fn === 'chain.capture')
854
+ return Promise.resolve(null);
855
+ if (fn === 'chain.createEntry')
856
+ return Promise.resolve({ docId: 'doc-c3', entryId: 'DEC-79', coaching });
857
+ if (fn === 'chain.createEntryRelation')
858
+ return Promise.resolve({ relationId: 'rel-1' });
859
+ if (fn === 'quality.evaluateHeuristicAndSchedule')
860
+ return Promise.resolve(reEvalCoaching);
861
+ return Promise.resolve({});
862
+ });
863
+ let stdoutOutput = '';
864
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
865
+ stdoutOutput += String(chunk);
866
+ return true;
867
+ });
868
+ await runCapture({ text: 'DEC: chose with a link', link: 'TEN-1', linkType: 'informs', json: true });
869
+ writeSpy.mockRestore();
870
+ // Deterministic --link fix: the CREATE call defers the LLM schedule (the
871
+ // post-relation re-eval owns the single LLM run)…
872
+ const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
873
+ expect(createCall?.[1]).toMatchObject({ deferLLMSchedule: true });
874
+ // …and the re-eval fires with the created entry, AFTER the relation write,
875
+ // WITHOUT the defer flag (it schedules the LLM run as normal).
876
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', {
877
+ entryId: 'DEC-79',
878
+ context: 'capture',
879
+ });
880
+ const callOrder = kernelCallWithSessionMock.mock.calls.map(([fn]) => fn);
881
+ expect(callOrder.indexOf('chain.createEntryRelation')).toBeLessThan(callOrder.indexOf('quality.evaluateHeuristicAndSchedule'));
882
+ // The receipt carries the POST-relation verdict, not the create-response one.
883
+ const jsonLines = stdoutOutput.split('\n').filter((line) => {
884
+ try {
885
+ JSON.parse(line);
886
+ return true;
887
+ }
888
+ catch {
889
+ return false;
890
+ }
891
+ });
892
+ expect(jsonLines).toHaveLength(1);
893
+ expect(JSON.parse(jsonLines[0]).coaching).toEqual(reEvalCoaching);
894
+ });
895
+ it('--link: keeps the create-response verdict when the re-eval fails (fail-open, BR-144)', async () => {
27
896
  kernelCallWithSessionMock.mockImplementation((fn) => {
28
- if (fn === 'chain.suggestLinksForCapture')
29
- return Promise.resolve([]);
897
+ if (fn === 'chain.capture')
898
+ return Promise.resolve(null);
30
899
  if (fn === 'chain.createEntry')
31
- return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-710' });
900
+ return Promise.resolve({ docId: 'doc-c4', entryId: 'DEC-80', coaching });
32
901
  if (fn === 'chain.createEntryRelation')
33
- return Promise.resolve({});
902
+ return Promise.resolve({ relationId: 'rel-1' });
903
+ if (fn === 'quality.evaluateHeuristicAndSchedule')
904
+ return Promise.reject(new Error('network'));
905
+ return Promise.resolve({});
906
+ });
907
+ let stdoutOutput = '';
908
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
909
+ stdoutOutput += String(chunk);
910
+ return true;
911
+ });
912
+ await runCapture({ text: 'DEC: chose with a broken re-eval', link: 'TEN-2', linkType: 'informs', json: true });
913
+ writeSpy.mockRestore();
914
+ const jsonLines = stdoutOutput.split('\n').filter((line) => {
915
+ try {
916
+ JSON.parse(line);
917
+ return true;
918
+ }
919
+ catch {
920
+ return false;
921
+ }
922
+ });
923
+ expect(jsonLines).toHaveLength(1);
924
+ expect(JSON.parse(jsonLines[0]).coaching).toEqual(coaching);
925
+ });
926
+ it('no --link: does NOT call the re-evaluation and does NOT defer the LLM schedule (plain capture unchanged)', async () => {
927
+ kernelCallWithSessionMock.mockImplementation((fn) => {
928
+ if (fn === 'chain.capture')
929
+ return Promise.resolve(null);
930
+ if (fn === 'chain.createEntry')
931
+ return Promise.resolve({ docId: 'doc-c5', entryId: 'DEC-81', coaching });
34
932
  return Promise.resolve({});
35
933
  });
36
934
  const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
37
- await runCapture({ text: 'TEN: missing validation', link: 'BET-151' });
38
- // Verify classification was skipped (no resolveCollection call)
39
- expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
40
- // Verify prefix was stripped from entry name and routed to correct collection
935
+ await runCapture({ text: 'DEC: chose without a link', json: true });
936
+ writeSpy.mockRestore();
937
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('quality.evaluateHeuristicAndSchedule', expect.anything());
938
+ const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
939
+ expect(createCall?.[1]).not.toHaveProperty('deferLLMSchedule');
940
+ });
941
+ });
942
+ // WP-690 S7 (TASK-120): the 'runCapture description field routing' describe block (TEN-1258's
943
+ // ASM:-shortcode -> 'assumptions' collectionSlug routing test) is DELETED here — `assumption` is
944
+ // one of the 15 genuinely-retired canonicalKeys (collectionRegistry.ts no longer carries an
945
+ // 'assumptions'/ASM entry at all), so the scenario this test asserted can no longer occur: an
946
+ // 'ASM:' capture now falls through to auto-classification (collectionSlug: undefined) instead of
947
+ // the old explicit-shortcode routing. Found via the CI Quality Gate on this PR (new failure caused
948
+ // by the S7 registry purge, fixed at root per the standing "fix new failures at root" contract —
949
+ // not deferred, not papered over).
950
+ describe('runCapture --field passthrough', () => {
951
+ beforeEach(() => {
952
+ kernelCallWithSessionMock.mockReset();
953
+ mockSession = { sessionId: 'sess-test' };
954
+ });
955
+ it('merges --field pairs into data', async () => {
956
+ kernelCallWithSessionMock.mockImplementation((fn) => {
957
+ if (fn === 'chain.capture')
958
+ return Promise.resolve(null);
959
+ if (fn === 'chain.createEntry')
960
+ return Promise.resolve({ docId: 'doc-6', entryId: 'STD-1' });
961
+ return Promise.resolve({});
962
+ });
963
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
964
+ await runCapture({
965
+ text: 'touched-code stewardship',
966
+ collection: 'standards',
967
+ field: ['rationale=signed specs define scope but agents need permission'],
968
+ });
41
969
  expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
42
- collectionSlug: 'tensions',
43
- name: 'missing validation',
970
+ data: expect.objectContaining({
971
+ description: 'touched-code stewardship',
972
+ rationale: 'signed specs define scope but agents need permission',
973
+ }),
44
974
  }));
45
- expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntryRelation', {
46
- fromEntryId: 'TEN-710',
47
- toEntryId: 'BET-151',
48
- type: 'surfaces_tension_in',
49
- });
50
975
  writeSpy.mockRestore();
51
976
  });
52
- it('uses custom relation type when --type provided', async () => {
53
- // Prefix "INS:" is extracted → skips classification, routes directly to insights
977
+ it('--field description=X overrides the derived description', async () => {
54
978
  kernelCallWithSessionMock.mockImplementation((fn) => {
55
- if (fn === 'chain.suggestLinksForCapture')
56
- return Promise.resolve([]);
979
+ if (fn === 'chain.capture')
980
+ return Promise.resolve(null);
57
981
  if (fn === 'chain.createEntry')
58
- return Promise.resolve({ docId: 'doc-2', entryId: 'INS-50' });
59
- if (fn === 'chain.createEntryRelation')
60
- return Promise.resolve({});
982
+ return Promise.resolve({ docId: 'doc-7', entryId: 'TEN-1' });
61
983
  return Promise.resolve({});
62
984
  });
63
985
  const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
64
- await runCapture({ text: 'INS: discovered X', link: 'DEC-264', type: 'informed_by' });
65
- expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.resolveCollection', expect.anything());
66
- expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntryRelation', {
67
- fromEntryId: 'INS-50',
68
- toEntryId: 'DEC-264',
69
- type: 'informed_by',
986
+ await runCapture({
987
+ text: 'derived',
988
+ collection: 'tensions',
989
+ field: ['description=explicit'],
70
990
  });
991
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.objectContaining({
992
+ data: expect.objectContaining({ description: 'explicit' }),
993
+ }));
71
994
  writeSpy.mockRestore();
72
995
  });
73
996
  });
74
- describe('runCapture --json', () => {
997
+ // TASK-584 (WP-802, TEN-4312): the CLI sends only the fields the caller sent. The default
998
+ // description (the capture text) exists to be remapped into the collection's primary field;
999
+ // when -f already set that field and no -d was passed, it is left out.
1000
+ describe('runCapture sends only caller fields (TASK-584)', () => {
75
1001
  beforeEach(() => {
76
1002
  kernelCallWithSessionMock.mockReset();
77
1003
  mockSession = { sessionId: 'sess-test' };
78
1004
  });
79
- it('outputs valid JSON with id field and no other stdout', async () => {
80
- // Prefix "TEN:" is extracted → skips classification
1005
+ const bodyContract = { governed: false, whyField: null, minChars: 0, descriptionFieldKey: 'body' };
1006
+ const createData = () => kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry')?.[1]?.data;
1007
+ it('omits description when -f sets the primary field and no -d is given', async () => {
81
1008
  kernelCallWithSessionMock.mockImplementation((fn) => {
82
- if (fn === 'chain.suggestLinksForCapture')
83
- return Promise.resolve([]);
1009
+ if (fn === 'chain.capture')
1010
+ return Promise.resolve(null);
1011
+ if (fn === 'chain.getCollectionFields')
1012
+ return Promise.resolve(bodyContract);
84
1013
  if (fn === 'chain.createEntry')
85
- return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-711' });
1014
+ return Promise.resolve({ docId: 'd', entryId: 'INS-1', status: 'draft' });
86
1015
  return Promise.resolve({});
87
1016
  });
88
- let stdoutOutput = '';
89
- const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
90
- stdoutOutput += String(chunk);
91
- return true;
1017
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1018
+ await runCapture({ text: 'an insight', collection: 'insights', field: ['body=the full body'] });
1019
+ writeSpy.mockRestore();
1020
+ expect(createData()).toEqual({ body: 'the full body' });
1021
+ });
1022
+ it('keeps description when -d is given, even with -f body', async () => {
1023
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1024
+ if (fn === 'chain.capture')
1025
+ return Promise.resolve(null);
1026
+ if (fn === 'chain.getCollectionFields')
1027
+ return Promise.resolve(bodyContract);
1028
+ if (fn === 'chain.createEntry')
1029
+ return Promise.resolve({ docId: 'd', entryId: 'INS-2', status: 'draft' });
1030
+ return Promise.resolve({});
92
1031
  });
93
- await runCapture({ text: 'TEN: test', json: true });
1032
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1033
+ await runCapture({ text: 'an insight', description: 'explicit', collection: 'insights', field: ['body=b'] });
94
1034
  writeSpy.mockRestore();
95
- // Find JSON lines in stdout
96
- const jsonLines = stdoutOutput.split('\n').filter(line => {
97
- try {
98
- JSON.parse(line);
99
- return true;
100
- }
101
- catch {
102
- return false;
1035
+ expect(createData()).toEqual({ description: 'explicit', body: 'b' });
1036
+ });
1037
+ it('keeps description on a bare capture so the server can remap it into body', async () => {
1038
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1039
+ if (fn === 'chain.capture')
1040
+ return Promise.resolve(null);
1041
+ if (fn === 'chain.getCollectionFields')
1042
+ return Promise.resolve(bodyContract);
1043
+ if (fn === 'chain.createEntry')
1044
+ return Promise.resolve({ docId: 'd', entryId: 'INS-3', status: 'draft' });
1045
+ return Promise.resolve({});
1046
+ });
1047
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1048
+ await runCapture({ text: 'an insight', collection: 'insights' });
1049
+ writeSpy.mockRestore();
1050
+ expect(createData()).toEqual({ description: 'an insight' });
1051
+ });
1052
+ it('sends description as before when the contract fetch fails', async () => {
1053
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1054
+ if (fn === 'chain.capture')
1055
+ return Promise.resolve(null);
1056
+ if (fn === 'chain.getCollectionFields')
1057
+ return Promise.reject(new Error('network'));
1058
+ if (fn === 'chain.createEntry')
1059
+ return Promise.resolve({ docId: 'd', entryId: 'INS-4', status: 'draft' });
1060
+ return Promise.resolve({});
1061
+ });
1062
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1063
+ await runCapture({ text: 'an insight', collection: 'insights', field: ['body=b'] });
1064
+ writeSpy.mockRestore();
1065
+ expect(createData()).toEqual({ description: 'an insight', body: 'b' });
1066
+ });
1067
+ it('a landed create with a dropped field resolves (exit 0) and names only that field as dropped', async () => {
1068
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1069
+ if (fn === 'chain.capture')
1070
+ return Promise.resolve(null);
1071
+ if (fn === 'chain.getCollectionFields')
1072
+ return Promise.resolve(bodyContract);
1073
+ if (fn === 'chain.createEntry') {
1074
+ return Promise.resolve({
1075
+ docId: 'd', entryId: 'INS-5', status: 'draft', warnings: ['Unknown fields dropped: nosuchfield. Expected: body (text, required).'],
1076
+ normalization: { remapped: {}, rejected: ['nosuchfield'], accepted: ['body'] },
1077
+ });
103
1078
  }
1079
+ return Promise.resolve({});
104
1080
  });
105
- expect(jsonLines).toHaveLength(1);
106
- const output = JSON.parse(jsonLines[0]);
107
- expect(output).toHaveProperty('id', 'TEN-711');
108
- expect(output).toHaveProperty('collection', 'tensions');
109
- expect(output).toHaveProperty('confidence');
1081
+ const out = [];
1082
+ const errOut = [];
1083
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { out.push(String(chunk)); return true; });
1084
+ const errSpy = vi.spyOn(process.stderr, 'write').mockImplementation((chunk) => { errOut.push(String(chunk)); return true; });
1085
+ await expect(runCapture({ text: 'an insight', collection: 'insights', field: ['nosuchfield=x'], json: true })).resolves.toBeUndefined();
1086
+ writeSpy.mockRestore();
1087
+ errSpy.mockRestore();
1088
+ expect(JSON.parse(out.join(''))).toMatchObject({ id: 'INS-5', droppedFields: ['nosuchfield'] });
1089
+ expect(errOut.join('')).not.toContain('Fields rejected');
1090
+ });
1091
+ it('the human receipt names the dropped field as a warning, with pb fields for the collection', () => {
1092
+ const out = formatCaptureReceipt({
1093
+ entryId: 'INS-5', name: 'an insight', collection: 'insights', status: 'draft', classification: null,
1094
+ warnings: ['Unknown fields dropped: nosuchfield. Expected: body (text, required).'],
1095
+ normalization: { remapped: {}, rejected: ['nosuchfield'], accepted: [] },
1096
+ });
1097
+ expect(out).toContain('Warning: Unknown fields dropped: nosuchfield.');
1098
+ expect(out).toContain('pb fields insights');
1099
+ expect(out).not.toContain('Rejected fields');
110
1100
  });
111
1101
  });
112
- describe('runCapture description field routing', () => {
1102
+ describe('runCapture WHY pre-flight', () => {
113
1103
  beforeEach(() => {
114
1104
  kernelCallWithSessionMock.mockReset();
115
1105
  mockSession = { sessionId: 'sess-test' };
116
1106
  });
117
- it('passes description key to createEntry for assumptions (TEN-1258 — remap happens in Convex)', async () => {
118
- // The CLI always sends `description` — the Convex write gate remaps it to `belief`
119
- // for the assumptions collection (TEN-1258). Verify the CLI routes correctly and
120
- // sends the text as description so the Convex remap can fire.
1107
+ it('blocks with guidance when governed and whyField is missing', async () => {
1108
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1109
+ if (fn === 'chain.capture')
1110
+ return Promise.resolve(null);
1111
+ if (fn === 'chain.getCollectionFields') {
1112
+ return Promise.resolve({ governed: true, whyField: 'rationale', minChars: 12, fields: [] });
1113
+ }
1114
+ if (fn === 'chain.createEntry')
1115
+ return Promise.resolve({ docId: 'doc-8', entryId: 'STD-2' });
1116
+ return Promise.resolve({});
1117
+ });
1118
+ await expect(runCapture({ text: 'x', collection: 'standards' })).rejects.toThrow(/rationale/);
1119
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntry', expect.anything());
1120
+ });
1121
+ it('blocks with guidance for a why-required, non-governed collection (WP-770 W2a, DEC-1787 ruling A)', async () => {
1122
+ // purpose/vision/strategy/objective are why-required but NOT `governed` (steering-shared
1123
+ // subject) — the gate must fire on `whyField` alone, since getCollectionFields now widens
1124
+ // `whyField` for these four independently of `governed`.
1125
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1126
+ if (fn === 'chain.capture')
1127
+ return Promise.resolve(null);
1128
+ if (fn === 'chain.getCollectionFields') {
1129
+ return Promise.resolve({ governed: false, whyField: 'why', minChars: 12, fields: [] });
1130
+ }
1131
+ if (fn === 'chain.createEntry')
1132
+ return Promise.resolve({ docId: 'doc-10', entryId: 'STRAT-2' });
1133
+ return Promise.resolve({});
1134
+ });
1135
+ await expect(runCapture({ text: 'x', collection: 'strategy' })).rejects.toThrow(/why/);
1136
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntry', expect.anything());
1137
+ });
1138
+ it('does not block when whyField is description', async () => {
121
1139
  kernelCallWithSessionMock.mockImplementation((fn) => {
122
- if (fn === 'chain.suggestLinksForCapture')
123
- return Promise.resolve([]);
1140
+ if (fn === 'chain.capture')
1141
+ return Promise.resolve(null);
1142
+ if (fn === 'chain.getCollectionFields') {
1143
+ return Promise.resolve({ governed: true, whyField: 'description', minChars: 12, fields: [] });
1144
+ }
124
1145
  if (fn === 'chain.createEntry')
125
- return Promise.resolve({ docId: 'doc-5', entryId: 'ASM-1' });
1146
+ return Promise.resolve({ docId: 'doc-9', entryId: 'ARCH-1' });
126
1147
  return Promise.resolve({});
127
1148
  });
128
1149
  const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
129
- await runCapture({ text: 'ASM: users won\'t pay before seeing value' });
130
- const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
131
- expect(createCall?.[1]).toMatchObject({
132
- collectionSlug: 'assumptions',
133
- name: "users won't pay before seeing value",
134
- data: { description: "users won't pay before seeing value" },
1150
+ await runCapture({ text: 'an architecture note body', collection: 'architecture' });
1151
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
1152
+ writeSpy.mockRestore();
1153
+ });
1154
+ it('does not block when description remaps to the whyField (descriptionFieldKey === whyField)', async () => {
1155
+ // TEN-1258 regression: `decisions` sets descriptionFieldKey='rationale' and the server
1156
+ // remaps data.description → rationale before the WHY gate. A bare `pb capture "DEC: …"`
1157
+ // (description set, no --field rationale) must NOT be false-blocked client-side.
1158
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1159
+ if (fn === 'chain.capture')
1160
+ return Promise.resolve(null);
1161
+ if (fn === 'chain.getCollectionFields') {
1162
+ return Promise.resolve({
1163
+ governed: true,
1164
+ whyField: 'rationale',
1165
+ minChars: 12,
1166
+ descriptionFieldKey: 'rationale',
1167
+ fields: [],
1168
+ });
1169
+ }
1170
+ if (fn === 'chain.createEntry')
1171
+ return Promise.resolve({ docId: 'doc-12', entryId: 'DEC-5' });
1172
+ return Promise.resolve({});
1173
+ });
1174
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1175
+ await runCapture({ text: 'chose X because it is simpler', collection: 'decisions' });
1176
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
1177
+ writeSpy.mockRestore();
1178
+ });
1179
+ it('still blocks a governed collection whose descriptionFieldKey does NOT map to the whyField', async () => {
1180
+ // proof_governed has whyField='rationale' but no descriptionFieldKey remap, so a bare
1181
+ // capture (no --field rationale) is correctly blocked — the description will not satisfy it.
1182
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1183
+ if (fn === 'chain.capture')
1184
+ return Promise.resolve(null);
1185
+ if (fn === 'chain.getCollectionFields') {
1186
+ return Promise.resolve({
1187
+ governed: true,
1188
+ whyField: 'rationale',
1189
+ minChars: 12,
1190
+ descriptionFieldKey: null,
1191
+ fields: [],
1192
+ });
1193
+ }
1194
+ if (fn === 'chain.createEntry')
1195
+ return Promise.resolve({ docId: 'doc-13', entryId: 'PGV-9' });
1196
+ return Promise.resolve({});
1197
+ });
1198
+ await expect(runCapture({ text: 'x', collection: 'proof_governed' })).rejects.toThrow(/rationale/);
1199
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.createEntry', expect.anything());
1200
+ });
1201
+ it('fails open and proceeds when the contract fetch fails', async () => {
1202
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1203
+ if (fn === 'chain.capture')
1204
+ return Promise.resolve(null);
1205
+ if (fn === 'chain.getCollectionFields')
1206
+ return Promise.reject(new Error('network'));
1207
+ if (fn === 'chain.createEntry')
1208
+ return Promise.resolve({ docId: 'doc-10', entryId: 'STD-3' });
1209
+ return Promise.resolve({});
1210
+ });
1211
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1212
+ await runCapture({
1213
+ text: 'x',
1214
+ collection: 'standards',
1215
+ field: ['rationale=enough characters here ok'],
1216
+ });
1217
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
1218
+ writeSpy.mockRestore();
1219
+ });
1220
+ it('fails open when the contract fetch rejects with a CLIError (server 4xx/5xx surfaces as McpError, an instanceof CLIError)', async () => {
1221
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1222
+ if (fn === 'chain.capture')
1223
+ return Promise.resolve(null);
1224
+ if (fn === 'chain.getCollectionFields') {
1225
+ return Promise.reject(new CLIError('Could not reach test.convex.site.', {
1226
+ code: ErrorCode.NETWORK_UNREACHABLE,
1227
+ category: 'network',
1228
+ }));
1229
+ }
1230
+ if (fn === 'chain.createEntry')
1231
+ return Promise.resolve({ docId: 'doc-11', entryId: 'STD-4' });
1232
+ return Promise.resolve({});
1233
+ });
1234
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1235
+ await runCapture({
1236
+ text: 'x',
1237
+ collection: 'standards',
1238
+ field: ['rationale=enough characters here ok'],
135
1239
  });
1240
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
136
1241
  writeSpy.mockRestore();
137
1242
  });
1243
+ it('surfaces the server WHY-gate reason on rejection', async () => {
1244
+ const serverReason = 'Governance entries (standard) require an explicit WHY before they can be created. Set "rationale" to at least 12 characters.';
1245
+ kernelCallWithSessionMock.mockImplementation((fn) => {
1246
+ if (fn === 'chain.capture')
1247
+ return Promise.resolve(null);
1248
+ if (fn === 'chain.getCollectionFields') {
1249
+ return Promise.resolve({ governed: true, whyField: 'rationale', minChars: 12, fields: [] });
1250
+ }
1251
+ if (fn === 'chain.createEntry')
1252
+ return Promise.reject(new Error(serverReason));
1253
+ return Promise.resolve({});
1254
+ });
1255
+ await expect(runCapture({
1256
+ text: 'x',
1257
+ collection: 'standards',
1258
+ field: ['rationale=short'],
1259
+ })).rejects.toThrow(/at least 12 characters/);
1260
+ });
138
1261
  });
139
1262
  describe('runCapture classification guard', () => {
140
1263
  beforeEach(() => {
@@ -146,71 +1269,60 @@ describe('runCapture classification guard', () => {
146
1269
  await expect(runCapture({ text: 'Ambiguous capture' })).rejects.toThrow('Classification needs review before capture can continue.');
147
1270
  });
148
1271
  });
149
- describe('runCapture date inference', () => {
1272
+ describe('runCapture writes no date (TEN-4244, DEC-1787)', () => {
150
1273
  beforeEach(() => {
151
1274
  kernelCallWithSessionMock.mockReset();
152
1275
  mockSession = { sessionId: 'sess-test' };
153
1276
  });
154
- it('does not default date to today when no source date is present', async () => {
1277
+ it.each([
1278
+ ['tasks', 'TASK-10', 'Task due April 1, 2026'],
1279
+ ['decisions', 'DEC-10', 'Decision from April 1, 2026 steering meeting'],
1280
+ ['tasks', 'TASK-11', 'Task without any date'],
1281
+ ])('a %s capture carries no data.date, even when the text names a date', async (collection, entryId, text) => {
155
1282
  kernelCallWithSessionMock.mockImplementation((fn) => {
156
- if (fn === 'chain.suggestLinksForCapture')
157
- return Promise.resolve([]);
1283
+ if (fn === 'chain.capture')
1284
+ return Promise.resolve(null);
158
1285
  if (fn === 'chain.resolveCollection')
159
- return Promise.resolve({ collection: 'decisions', confidence: 0.9, tier: 'high' });
1286
+ return Promise.resolve({ collection, confidence: 0.9, tier: 'high' });
160
1287
  if (fn === 'chain.createEntry')
161
- return Promise.resolve({ docId: 'doc-3', entryId: 'DEC-10' });
1288
+ return Promise.resolve({ docId: 'doc-3', entryId });
162
1289
  return Promise.resolve({});
163
1290
  });
164
1291
  const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
165
- await runCapture({ text: 'Decision without explicit source date' });
1292
+ await runCapture({ text });
166
1293
  const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
167
- expect(createCall?.[1]).toMatchObject({
168
- collectionSlug: 'decisions',
169
- data: { description: 'Decision without explicit source date' },
170
- });
1294
+ expect(createCall?.[1]).toMatchObject({ collectionSlug: collection });
171
1295
  expect((createCall?.[1]).data).not.toHaveProperty('date');
172
1296
  writeSpy.mockRestore();
173
1297
  });
174
- it('uses inferred source date when the capture text includes one', async () => {
175
- 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
- if (fn === 'chain.createEntry')
181
- return Promise.resolve({ docId: 'doc-4', entryId: 'DEC-11' });
182
- return Promise.resolve({});
183
- });
184
- const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
185
- await runCapture({ text: 'Decision from April 1, 2026 steering meeting' });
186
- const createCall = kernelCallWithSessionMock.mock.calls.find(([fn]) => fn === 'chain.createEntry');
187
- expect((createCall?.[1]).data.date).toBe('2026-04-01');
188
- writeSpy.mockRestore();
189
- });
190
1298
  });
191
1299
  // ---------------------------------------------------------------------------
192
- // WP-319 S3: Pre-write grounding tests
1300
+ // WP-319 S3 / WP-755 C1a: Pre-write grounding tests (the one capture door)
193
1301
  // ---------------------------------------------------------------------------
194
- describe('runCapture WP-319 grounding', () => {
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,
1302
+ describe('runCapture WP-319/WP-755 grounding', () => {
1303
+ const emptyVerdict = { kind: 'create', candidates: [], scanTruncated: false };
1304
+ const askVerdict = {
1305
+ kind: 'ask',
1306
+ candidates: [{ entryId: 'TEN-5', name: 'Similar tension', collectionSlug: 'tensions', score: 0.6 }],
1307
+ scanTruncated: false,
202
1308
  };
203
1309
  beforeEach(() => {
204
1310
  kernelCallWithSessionMock.mockReset();
205
1311
  mockSession = { sessionId: 'sess-test' };
206
1312
  delete process.env.PB_GROUNDING_MODE;
1313
+ // Pre-existing gap this fix round's new --strict tests surfaced: runner.ts's outputMode is
1314
+ // module-level `let` state, set permanently by any earlier test in this file that passed
1315
+ // `json: true` (setOutputMode is never test-scoped). Reset it here so a later test's
1316
+ // `!json` branches (the --strict prompt gate) are never silently skipped by an earlier
1317
+ // test's leaked JSON mode.
1318
+ setOutputMode('auto');
207
1319
  });
208
- it('fires chain.suggestLinksForCapture in parallel and still calls createEntry', async () => {
1320
+ it('fires chain.capture in parallel and still calls createEntry', async () => {
209
1321
  // Prefix-based route skips classification; grounding fires for TEN prefix
210
1322
  kernelCallWithSessionMock
211
1323
  .mockImplementation((fn) => {
212
- if (fn === 'chain.suggestLinksForCapture')
213
- return Promise.resolve([emptyGrounding]);
1324
+ if (fn === 'chain.capture')
1325
+ return Promise.resolve(emptyVerdict);
214
1326
  if (fn === 'chain.createEntry')
215
1327
  return Promise.resolve({ docId: 'doc-1', entryId: 'TEN-720' });
216
1328
  return Promise.resolve({});
@@ -218,8 +1330,8 @@ describe('runCapture WP-319 grounding', () => {
218
1330
  const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
219
1331
  const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
220
1332
  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' })]),
1333
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.capture', expect.objectContaining({
1334
+ name: 'grounding test tension',
223
1335
  }));
224
1336
  expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
225
1337
  writeSpy.mockRestore();
@@ -228,7 +1340,7 @@ describe('runCapture WP-319 grounding', () => {
228
1340
  it('does NOT block capture when grounding call fails', async () => {
229
1341
  kernelCallWithSessionMock
230
1342
  .mockImplementation((fn) => {
231
- if (fn === 'chain.suggestLinksForCapture')
1343
+ if (fn === 'chain.capture')
232
1344
  return Promise.reject(new Error('network error'));
233
1345
  if (fn === 'chain.createEntry')
234
1346
  return Promise.resolve({ docId: 'doc-2', entryId: 'TEN-721' });
@@ -242,70 +1354,11 @@ describe('runCapture WP-319 grounding', () => {
242
1354
  writeSpy.mockRestore();
243
1355
  stderrSpy.mockRestore();
244
1356
  });
245
- it('--suggest-only does NOT call createEntry and outputs grounding data', async () => {
246
- // In test env (non-TTY), isJsonMode() returns true → JSON path is taken.
247
- kernelCallWithSessionMock
248
- .mockImplementation((fn) => {
249
- if (fn === 'chain.suggestLinksForCapture')
250
- return Promise.resolve([groundingWithDuplicate]);
251
- return Promise.resolve({});
252
- });
253
- let stdoutOutput = '';
254
- const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
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();
273
- writeSpy.mockRestore();
274
- stderrSpy.mockRestore();
275
- });
276
- it('--suggest-only with --json outputs machine-readable object without calling createEntry', async () => {
277
- kernelCallWithSessionMock
278
- .mockImplementation((fn) => {
279
- if (fn === 'chain.suggestLinksForCapture')
280
- return Promise.resolve([emptyGrounding]);
281
- return Promise.resolve({});
282
- });
283
- let stdoutOutput = '';
284
- const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
285
- stdoutOutput += String(chunk);
286
- return true;
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);
301
- writeSpy.mockRestore();
302
- stderrSpy.mockRestore();
303
- });
304
- it('banner is suppressed when grounding has no matches (zero-noise floor)', async () => {
1357
+ it('a create verdict prints no Related line and no how-it-connects list (TASK-608, DEC-1915)', async () => {
305
1358
  kernelCallWithSessionMock
306
1359
  .mockImplementation((fn) => {
307
- if (fn === 'chain.suggestLinksForCapture')
308
- return Promise.resolve([emptyGrounding]);
1360
+ if (fn === 'chain.capture')
1361
+ return Promise.resolve(emptyVerdict);
309
1362
  if (fn === 'chain.createEntry')
310
1363
  return Promise.resolve({ docId: 'doc-3', entryId: 'TEN-722' });
311
1364
  return Promise.resolve({});
@@ -317,13 +1370,15 @@ describe('runCapture WP-319 grounding', () => {
317
1370
  return true;
318
1371
  });
319
1372
  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'));
1373
+ // No "Related"/"Possible match" banner in stderr, and no first-capture "how it connects" list.
1374
+ const groundingInStderr = stderrLines.some((l) => l.includes('Related') || l.includes('Possible match'));
322
1375
  expect(groundingInStderr).toBe(false);
1376
+ const stdoutText = writeSpy.mock.calls.map(([chunk]) => String(chunk)).join('');
1377
+ expect(stdoutText).not.toContain('how it connects');
323
1378
  writeSpy.mockRestore();
324
1379
  stderrSpy.mockRestore();
325
1380
  });
326
- it('PB_GROUNDING_MODE=off skips grounding call entirely', async () => {
1381
+ it('PB_GROUNDING_MODE=off skips the door entirely', async () => {
327
1382
  process.env.PB_GROUNDING_MODE = 'off';
328
1383
  kernelCallWithSessionMock
329
1384
  .mockImplementation((fn) => {
@@ -334,7 +1389,7 @@ describe('runCapture WP-319 grounding', () => {
334
1389
  const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
335
1390
  const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
336
1391
  await runCapture({ text: 'TEN: no grounding env off' });
337
- expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.suggestLinksForCapture', expect.anything());
1392
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.capture', expect.anything());
338
1393
  expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
339
1394
  delete process.env.PB_GROUNDING_MODE;
340
1395
  writeSpy.mockRestore();
@@ -343,8 +1398,8 @@ describe('runCapture WP-319 grounding', () => {
343
1398
  it('--json output stdout is clean (no grounding on stdout)', async () => {
344
1399
  kernelCallWithSessionMock
345
1400
  .mockImplementation((fn) => {
346
- if (fn === 'chain.suggestLinksForCapture')
347
- return Promise.resolve([groundingWithDuplicate]);
1401
+ if (fn === 'chain.capture')
1402
+ return Promise.resolve(askVerdict);
348
1403
  if (fn === 'chain.createEntry')
349
1404
  return Promise.resolve({ docId: 'doc-5', entryId: 'TEN-724' });
350
1405
  return Promise.resolve({});
@@ -369,9 +1424,112 @@ describe('runCapture WP-319 grounding', () => {
369
1424
  expect(parsed.id).toBe('TEN-724');
370
1425
  // No grounding content in stdout
371
1426
  expect(stdoutOutput).not.toContain('Grounding');
372
- expect(stdoutOutput).not.toContain('duplicate');
1427
+ expect(stdoutOutput).not.toContain('Possible match');
1428
+ writeSpy.mockRestore();
1429
+ stderrSpy.mockRestore();
1430
+ });
1431
+ // TASK-619: an automated --json caller must learn the close match (id, name, collection, score)
1432
+ // to update it deliberately — still one JSON line on stdout.
1433
+ it('--json on an ask verdict carries possibleMatches in the single JSON line', async () => {
1434
+ kernelCallWithSessionMock
1435
+ .mockImplementation((fn) => {
1436
+ if (fn === 'chain.capture')
1437
+ return Promise.resolve(askVerdict);
1438
+ if (fn === 'chain.createEntry')
1439
+ return Promise.resolve({ docId: 'doc-6', entryId: 'TEN-725' });
1440
+ return Promise.resolve({});
1441
+ });
1442
+ let stdoutOutput = '';
1443
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { stdoutOutput += String(chunk); return true; });
1444
+ const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
1445
+ await runCapture({ text: 'TEN: json ask shape', json: true });
1446
+ const lines = stdoutOutput.split('\n').filter((l) => l.trim());
1447
+ expect(lines).toHaveLength(1);
1448
+ const parsed = JSON.parse(lines[0]);
1449
+ expect(parsed.id).toBe('TEN-725');
1450
+ expect(parsed.possibleMatches).toEqual([{ entryId: 'TEN-5', name: 'Similar tension', collection: 'tensions', score: 0.6 }]);
1451
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.updateEntry', expect.anything());
1452
+ writeSpy.mockRestore();
1453
+ stderrSpy.mockRestore();
1454
+ });
1455
+ it('--json on a create verdict carries no possibleMatches field', async () => {
1456
+ kernelCallWithSessionMock
1457
+ .mockImplementation((fn) => {
1458
+ if (fn === 'chain.capture')
1459
+ return Promise.resolve(emptyVerdict);
1460
+ if (fn === 'chain.createEntry')
1461
+ return Promise.resolve({ docId: 'doc-7', entryId: 'TEN-726' });
1462
+ return Promise.resolve({});
1463
+ });
1464
+ let stdoutOutput = '';
1465
+ const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => { stdoutOutput += String(chunk); return true; });
1466
+ const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
1467
+ await runCapture({ text: 'TEN: json create shape', json: true });
1468
+ const parsed = JSON.parse(stdoutOutput.split('\n').filter((l) => l.trim())[0]);
1469
+ expect(parsed).not.toHaveProperty('possibleMatches');
373
1470
  writeSpy.mockRestore();
374
1471
  stderrSpy.mockRestore();
375
1472
  });
1473
+ const originalStdinIsTTY = process.stdin.isTTY;
1474
+ function mockInteractiveStdin(answer) {
1475
+ Object.defineProperty(process.stdin, 'isTTY', { value: true, configurable: true });
1476
+ vi.spyOn(process.stdin, 'once').mockImplementation((_event, cb) => {
1477
+ cb(Buffer.from(answer));
1478
+ return process.stdin;
1479
+ });
1480
+ }
1481
+ afterEach(() => {
1482
+ // vitest's own hook, not a manual end-of-test call — runs even when an assertion above threw,
1483
+ // so one failing case in this block can never leak its stdin mock into the next test.
1484
+ Object.defineProperty(process.stdin, 'isTTY', { value: originalStdinIsTTY, configurable: true });
1485
+ vi.restoreAllMocks();
1486
+ });
1487
+ it('--strict prompts on an "ask" verdict too (unchanged from before this fix round)', async () => {
1488
+ kernelCallWithSessionMock
1489
+ .mockImplementation((fn) => {
1490
+ if (fn === 'chain.capture')
1491
+ return Promise.resolve(askVerdict);
1492
+ if (fn === 'chain.createEntry')
1493
+ return Promise.resolve({ docId: 'doc-12', entryId: 'TEN-728' });
1494
+ return Promise.resolve({});
1495
+ });
1496
+ mockInteractiveStdin('y');
1497
+ vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1498
+ const stderrLines = [];
1499
+ vi.spyOn(process.stderr, 'write').mockImplementation((chunk) => {
1500
+ stderrLines.push(String(chunk));
1501
+ return true;
1502
+ });
1503
+ await runCapture({ text: 'TEN: ask strict prompt', strict: true });
1504
+ expect(stderrLines.some((l) => l.includes('Proceed with capture?'))).toBe(true);
1505
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
1506
+ });
1507
+ // TASK-619 (TEN-4420): a close match never overwrites the matched entry. The CLI names the
1508
+ // match and writes only its own new draft; chain.updateEntry is never called from capture.
1509
+ it('a close same-collection match names the match and never updates it', async () => {
1510
+ const closeMatch = {
1511
+ kind: 'ask',
1512
+ candidates: [{ entryId: 'TEN-9', name: 'Existing near-duplicate tension', collectionSlug: 'tensions', score: 0.95 }],
1513
+ scanTruncated: false,
1514
+ };
1515
+ kernelCallWithSessionMock
1516
+ .mockImplementation((fn) => {
1517
+ if (fn === 'chain.capture')
1518
+ return Promise.resolve(closeMatch);
1519
+ if (fn === 'chain.createEntry')
1520
+ return Promise.resolve({ docId: 'doc-13', entryId: 'TEN-729' });
1521
+ return Promise.resolve({});
1522
+ });
1523
+ vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
1524
+ const stderrLines = [];
1525
+ vi.spyOn(process.stderr, 'write').mockImplementation((chunk) => {
1526
+ stderrLines.push(String(chunk));
1527
+ return true;
1528
+ });
1529
+ await runCapture({ text: 'TEN: existing near-duplicate tension' });
1530
+ expect(stderrLines.some((l) => l.includes('Possible match') && l.includes('TEN-9'))).toBe(true);
1531
+ expect(kernelCallWithSessionMock).not.toHaveBeenCalledWith('chain.updateEntry', expect.anything());
1532
+ expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.createEntry', expect.anything());
1533
+ });
376
1534
  });
377
1535
  //# sourceMappingURL=capture.test.js.map