@productbrain/cli 0.1.0-beta.83 → 0.1.0-beta.8308

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