@ironbee-ai/cli 0.6.1 → 0.7.0

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 (381) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +167 -39
  3. package/dist/analysis/code-changes.js +3 -3
  4. package/dist/analysis/code-changes.js.map +1 -1
  5. package/dist/analysis/cross-session.js.map +1 -1
  6. package/dist/analysis/fix-effectiveness.js.map +1 -1
  7. package/dist/analysis/time-analysis.js.map +1 -1
  8. package/dist/analysis/verdict-details.js.map +1 -1
  9. package/dist/analysis/verification-quality.js.map +1 -1
  10. package/dist/analytics/classifier.d.ts +99 -0
  11. package/dist/analytics/classifier.d.ts.map +1 -0
  12. package/dist/analytics/classifier.js +380 -0
  13. package/dist/analytics/classifier.js.map +1 -0
  14. package/dist/analytics/emit.d.ts +67 -0
  15. package/dist/analytics/emit.d.ts.map +1 -0
  16. package/dist/analytics/emit.js +901 -0
  17. package/dist/analytics/emit.js.map +1 -0
  18. package/dist/analytics/errors.d.ts +33 -0
  19. package/dist/analytics/errors.d.ts.map +1 -0
  20. package/dist/analytics/errors.js +93 -0
  21. package/dist/analytics/errors.js.map +1 -0
  22. package/dist/analytics/hook-trigger.d.ts +39 -0
  23. package/dist/analytics/hook-trigger.d.ts.map +1 -0
  24. package/dist/analytics/hook-trigger.js +127 -0
  25. package/dist/analytics/hook-trigger.js.map +1 -0
  26. package/dist/analytics/log.d.ts +44 -0
  27. package/dist/analytics/log.d.ts.map +1 -0
  28. package/dist/analytics/log.js +158 -0
  29. package/dist/analytics/log.js.map +1 -0
  30. package/dist/analytics/merge.d.ts +40 -0
  31. package/dist/analytics/merge.d.ts.map +1 -0
  32. package/dist/analytics/merge.js +527 -0
  33. package/dist/analytics/merge.js.map +1 -0
  34. package/dist/analytics/pricing.d.ts +149 -0
  35. package/dist/analytics/pricing.d.ts.map +1 -0
  36. package/dist/analytics/pricing.js +179 -0
  37. package/dist/analytics/pricing.js.map +1 -0
  38. package/dist/analytics/projection.d.ts +356 -0
  39. package/dist/analytics/projection.d.ts.map +1 -0
  40. package/dist/analytics/projection.js +2281 -0
  41. package/dist/analytics/projection.js.map +1 -0
  42. package/dist/analytics/spawn.d.ts +28 -0
  43. package/dist/analytics/spawn.d.ts.map +1 -0
  44. package/dist/analytics/spawn.js +57 -0
  45. package/dist/analytics/spawn.js.map +1 -0
  46. package/dist/analytics/state.d.ts +58 -0
  47. package/dist/analytics/state.d.ts.map +1 -0
  48. package/dist/analytics/state.js +329 -0
  49. package/dist/analytics/state.js.map +1 -0
  50. package/dist/analytics/transcript.d.ts +150 -0
  51. package/dist/analytics/transcript.d.ts.map +1 -0
  52. package/dist/analytics/transcript.js +276 -0
  53. package/dist/analytics/transcript.js.map +1 -0
  54. package/dist/analytics/types.d.ts +875 -0
  55. package/dist/analytics/types.d.ts.map +1 -0
  56. package/dist/analytics/types.js +31 -0
  57. package/dist/analytics/types.js.map +1 -0
  58. package/dist/clients/base.d.ts +21 -2
  59. package/dist/clients/base.d.ts.map +1 -1
  60. package/dist/clients/claude/commands/ironbee-verify.md +15 -7
  61. package/dist/clients/claude/fragments/command-verify.node.md +33 -0
  62. package/dist/clients/claude/fragments/rule.node.md +29 -0
  63. package/dist/clients/claude/fragments/skill.node.md +77 -0
  64. package/dist/clients/claude/hooks/activity-end.d.ts +13 -0
  65. package/dist/clients/claude/hooks/activity-end.d.ts.map +1 -0
  66. package/dist/clients/claude/hooks/activity-end.js +42 -0
  67. package/dist/clients/claude/hooks/activity-end.js.map +1 -0
  68. package/dist/clients/claude/hooks/clear-verdict.d.ts +9 -4
  69. package/dist/clients/claude/hooks/clear-verdict.d.ts.map +1 -1
  70. package/dist/clients/claude/hooks/clear-verdict.js +50 -12
  71. package/dist/clients/claude/hooks/clear-verdict.js.map +1 -1
  72. package/dist/clients/claude/hooks/require-verdict.d.ts +8 -3
  73. package/dist/clients/claude/hooks/require-verdict.d.ts.map +1 -1
  74. package/dist/clients/claude/hooks/require-verdict.js +17 -6
  75. package/dist/clients/claude/hooks/require-verdict.js.map +1 -1
  76. package/dist/clients/claude/hooks/require-verification.d.ts +7 -4
  77. package/dist/clients/claude/hooks/require-verification.d.ts.map +1 -1
  78. package/dist/clients/claude/hooks/require-verification.js +44 -22
  79. package/dist/clients/claude/hooks/require-verification.js.map +1 -1
  80. package/dist/clients/claude/hooks/session-end.d.ts.map +1 -1
  81. package/dist/clients/claude/hooks/session-end.js +17 -2
  82. package/dist/clients/claude/hooks/session-end.js.map +1 -1
  83. package/dist/clients/claude/hooks/session-start.d.ts.map +1 -1
  84. package/dist/clients/claude/hooks/session-start.js +2 -1
  85. package/dist/clients/claude/hooks/session-start.js.map +1 -1
  86. package/dist/clients/claude/hooks/track-action-monitor.d.ts +27 -0
  87. package/dist/clients/claude/hooks/track-action-monitor.d.ts.map +1 -0
  88. package/dist/clients/claude/hooks/track-action-monitor.js +126 -0
  89. package/dist/clients/claude/hooks/track-action-monitor.js.map +1 -0
  90. package/dist/clients/claude/hooks/track-action.d.ts.map +1 -1
  91. package/dist/clients/claude/hooks/track-action.js +29 -20
  92. package/dist/clients/claude/hooks/track-action.js.map +1 -1
  93. package/dist/clients/claude/hooks/verify-gate.d.ts.map +1 -1
  94. package/dist/clients/claude/hooks/verify-gate.js +18 -1
  95. package/dist/clients/claude/hooks/verify-gate.js.map +1 -1
  96. package/dist/clients/claude/index.d.ts +4 -1
  97. package/dist/clients/claude/index.d.ts.map +1 -1
  98. package/dist/clients/claude/index.js +185 -94
  99. package/dist/clients/claude/index.js.map +1 -1
  100. package/dist/clients/claude/rules/ironbee-verification.md +41 -33
  101. package/dist/clients/claude/skills/ironbee-verification.md +93 -76
  102. package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +18 -10
  103. package/dist/clients/cursor/fragments/command-verify.node.md +33 -0
  104. package/dist/clients/cursor/fragments/rule.node.md +29 -0
  105. package/dist/clients/cursor/fragments/skill.node.md +77 -0
  106. package/dist/clients/cursor/hooks/activity-end.d.ts +14 -0
  107. package/dist/clients/cursor/hooks/activity-end.d.ts.map +1 -0
  108. package/dist/clients/cursor/hooks/activity-end.js +45 -0
  109. package/dist/clients/cursor/hooks/activity-end.js.map +1 -0
  110. package/dist/clients/cursor/hooks/clear-verdict.d.ts +13 -4
  111. package/dist/clients/cursor/hooks/clear-verdict.d.ts.map +1 -1
  112. package/dist/clients/cursor/hooks/clear-verdict.js +59 -14
  113. package/dist/clients/cursor/hooks/clear-verdict.js.map +1 -1
  114. package/dist/clients/cursor/hooks/require-verdict.d.ts +8 -3
  115. package/dist/clients/cursor/hooks/require-verdict.d.ts.map +1 -1
  116. package/dist/clients/cursor/hooks/require-verdict.js +17 -6
  117. package/dist/clients/cursor/hooks/require-verdict.js.map +1 -1
  118. package/dist/clients/cursor/hooks/require-verification.d.ts.map +1 -1
  119. package/dist/clients/cursor/hooks/require-verification.js +42 -16
  120. package/dist/clients/cursor/hooks/require-verification.js.map +1 -1
  121. package/dist/clients/cursor/hooks/session-end.d.ts.map +1 -1
  122. package/dist/clients/cursor/hooks/session-end.js +18 -2
  123. package/dist/clients/cursor/hooks/session-end.js.map +1 -1
  124. package/dist/clients/cursor/hooks/session-start.d.ts.map +1 -1
  125. package/dist/clients/cursor/hooks/session-start.js +2 -1
  126. package/dist/clients/cursor/hooks/session-start.js.map +1 -1
  127. package/dist/clients/cursor/hooks/track-action-monitor.d.ts +27 -0
  128. package/dist/clients/cursor/hooks/track-action-monitor.d.ts.map +1 -0
  129. package/dist/clients/cursor/hooks/track-action-monitor.js +133 -0
  130. package/dist/clients/cursor/hooks/track-action-monitor.js.map +1 -0
  131. package/dist/clients/cursor/hooks/track-action.d.ts.map +1 -1
  132. package/dist/clients/cursor/hooks/track-action.js +51 -23
  133. package/dist/clients/cursor/hooks/track-action.js.map +1 -1
  134. package/dist/clients/cursor/hooks/verify-gate.d.ts.map +1 -1
  135. package/dist/clients/cursor/hooks/verify-gate.js +14 -1
  136. package/dist/clients/cursor/hooks/verify-gate.js.map +1 -1
  137. package/dist/clients/cursor/index.d.ts +4 -1
  138. package/dist/clients/cursor/index.d.ts.map +1 -1
  139. package/dist/clients/cursor/index.js +131 -65
  140. package/dist/clients/cursor/index.js.map +1 -1
  141. package/dist/clients/cursor/rules/ironbee-verification.mdc +37 -29
  142. package/dist/clients/cursor/skills/ironbee-verification.md +93 -76
  143. package/dist/clients/registry.d.ts +14 -0
  144. package/dist/clients/registry.d.ts.map +1 -1
  145. package/dist/clients/registry.js +34 -0
  146. package/dist/clients/registry.js.map +1 -1
  147. package/dist/commands/analyze.d.ts.map +1 -1
  148. package/dist/commands/analyze.js +40 -0
  149. package/dist/commands/analyze.js.map +1 -1
  150. package/dist/commands/backend-toggle.d.ts +45 -0
  151. package/dist/commands/backend-toggle.d.ts.map +1 -0
  152. package/dist/commands/backend-toggle.js +192 -0
  153. package/dist/commands/backend-toggle.js.map +1 -0
  154. package/dist/commands/disable-backend.d.ts +14 -0
  155. package/dist/commands/disable-backend.d.ts.map +1 -0
  156. package/dist/commands/disable-backend.js +34 -0
  157. package/dist/commands/disable-backend.js.map +1 -0
  158. package/dist/commands/disable-verification.d.ts +16 -0
  159. package/dist/commands/disable-verification.d.ts.map +1 -0
  160. package/dist/commands/disable-verification.js +36 -0
  161. package/dist/commands/disable-verification.js.map +1 -0
  162. package/dist/commands/enable-backend.d.ts +15 -0
  163. package/dist/commands/enable-backend.d.ts.map +1 -0
  164. package/dist/commands/enable-backend.js +35 -0
  165. package/dist/commands/enable-backend.js.map +1 -0
  166. package/dist/commands/enable-verification.d.ts +14 -0
  167. package/dist/commands/enable-verification.d.ts.map +1 -0
  168. package/dist/commands/enable-verification.js +34 -0
  169. package/dist/commands/enable-verification.js.map +1 -0
  170. package/dist/commands/hook.d.ts.map +1 -1
  171. package/dist/commands/hook.js +60 -0
  172. package/dist/commands/hook.js.map +1 -1
  173. package/dist/commands/import.d.ts +39 -0
  174. package/dist/commands/import.d.ts.map +1 -0
  175. package/dist/commands/import.js +369 -0
  176. package/dist/commands/import.js.map +1 -0
  177. package/dist/commands/install.d.ts.map +1 -1
  178. package/dist/commands/install.js +15 -20
  179. package/dist/commands/install.js.map +1 -1
  180. package/dist/commands/process-analytics.d.ts +18 -0
  181. package/dist/commands/process-analytics.d.ts.map +1 -0
  182. package/dist/commands/process-analytics.js +57 -0
  183. package/dist/commands/process-analytics.js.map +1 -0
  184. package/dist/commands/queue.d.ts +2 -3
  185. package/dist/commands/queue.d.ts.map +1 -1
  186. package/dist/commands/queue.js +2 -3
  187. package/dist/commands/queue.js.map +1 -1
  188. package/dist/commands/status.d.ts.map +1 -1
  189. package/dist/commands/status.js +29 -1
  190. package/dist/commands/status.js.map +1 -1
  191. package/dist/commands/verification-toggle.d.ts +47 -0
  192. package/dist/commands/verification-toggle.d.ts.map +1 -0
  193. package/dist/commands/verification-toggle.js +113 -0
  194. package/dist/commands/verification-toggle.js.map +1 -0
  195. package/dist/commands/verify.d.ts.map +1 -1
  196. package/dist/commands/verify.js +28 -0
  197. package/dist/commands/verify.js.map +1 -1
  198. package/dist/hooks/core/actions.d.ts +77 -70
  199. package/dist/hooks/core/actions.d.ts.map +1 -1
  200. package/dist/hooks/core/actions.js +45 -30
  201. package/dist/hooks/core/actions.js.map +1 -1
  202. package/dist/hooks/core/activity-end.d.ts +20 -0
  203. package/dist/hooks/core/activity-end.d.ts.map +1 -0
  204. package/dist/hooks/core/activity-end.js +23 -0
  205. package/dist/hooks/core/activity-end.js.map +1 -0
  206. package/dist/hooks/core/file-diff.d.ts +19 -0
  207. package/dist/hooks/core/file-diff.d.ts.map +1 -0
  208. package/dist/hooks/core/file-diff.js +39 -0
  209. package/dist/hooks/core/file-diff.js.map +1 -0
  210. package/dist/hooks/core/required-tools.d.ts +30 -0
  211. package/dist/hooks/core/required-tools.d.ts.map +1 -0
  212. package/dist/hooks/core/required-tools.js +70 -0
  213. package/dist/hooks/core/required-tools.js.map +1 -0
  214. package/dist/hooks/core/session-state.d.ts +12 -3
  215. package/dist/hooks/core/session-state.d.ts.map +1 -1
  216. package/dist/hooks/core/session-state.js +59 -0
  217. package/dist/hooks/core/session-state.js.map +1 -1
  218. package/dist/hooks/core/submit-verdict.d.ts.map +1 -1
  219. package/dist/hooks/core/submit-verdict.js +16 -12
  220. package/dist/hooks/core/submit-verdict.js.map +1 -1
  221. package/dist/hooks/core/tool-use-stash.d.ts +41 -0
  222. package/dist/hooks/core/tool-use-stash.d.ts.map +1 -0
  223. package/dist/hooks/core/tool-use-stash.js +82 -0
  224. package/dist/hooks/core/tool-use-stash.js.map +1 -0
  225. package/dist/hooks/core/verify-gate.d.ts +17 -3
  226. package/dist/hooks/core/verify-gate.d.ts.map +1 -1
  227. package/dist/hooks/core/verify-gate.js +315 -119
  228. package/dist/hooks/core/verify-gate.js.map +1 -1
  229. package/dist/import/claude/analytics-runner.d.ts +42 -0
  230. package/dist/import/claude/analytics-runner.d.ts.map +1 -0
  231. package/dist/import/claude/analytics-runner.js +213 -0
  232. package/dist/import/claude/analytics-runner.js.map +1 -0
  233. package/dist/import/claude/discovery.d.ts +22 -0
  234. package/dist/import/claude/discovery.d.ts.map +1 -0
  235. package/dist/import/claude/discovery.js +197 -0
  236. package/dist/import/claude/discovery.js.map +1 -0
  237. package/dist/import/claude/encoding.d.ts +50 -0
  238. package/dist/import/claude/encoding.d.ts.map +1 -0
  239. package/dist/import/claude/encoding.js +110 -0
  240. package/dist/import/claude/encoding.js.map +1 -0
  241. package/dist/import/claude/events/file-change.d.ts +28 -0
  242. package/dist/import/claude/events/file-change.d.ts.map +1 -0
  243. package/dist/import/claude/events/file-change.js +112 -0
  244. package/dist/import/claude/events/file-change.js.map +1 -0
  245. package/dist/import/claude/events/tool-call.d.ts +61 -0
  246. package/dist/import/claude/events/tool-call.d.ts.map +1 -0
  247. package/dist/import/claude/events/tool-call.js +119 -0
  248. package/dist/import/claude/events/tool-call.js.map +1 -0
  249. package/dist/import/claude/runner.d.ts +31 -0
  250. package/dist/import/claude/runner.d.ts.map +1 -0
  251. package/dist/import/claude/runner.js +280 -0
  252. package/dist/import/claude/runner.js.map +1 -0
  253. package/dist/import/claude/summary.d.ts +23 -0
  254. package/dist/import/claude/summary.d.ts.map +1 -0
  255. package/dist/import/claude/summary.js +186 -0
  256. package/dist/import/claude/summary.js.map +1 -0
  257. package/dist/import/claude/transcript-walk.d.ts +52 -0
  258. package/dist/import/claude/transcript-walk.d.ts.map +1 -0
  259. package/dist/import/claude/transcript-walk.js +187 -0
  260. package/dist/import/claude/transcript-walk.js.map +1 -0
  261. package/dist/import/concurrent-pool.d.ts +45 -0
  262. package/dist/import/concurrent-pool.d.ts.map +1 -0
  263. package/dist/import/concurrent-pool.js +95 -0
  264. package/dist/import/concurrent-pool.js.map +1 -0
  265. package/dist/import/emitter.d.ts +29 -0
  266. package/dist/import/emitter.d.ts.map +1 -0
  267. package/dist/import/emitter.js +66 -0
  268. package/dist/import/emitter.js.map +1 -0
  269. package/dist/import/events/activity.d.ts +23 -0
  270. package/dist/import/events/activity.d.ts.map +1 -0
  271. package/dist/import/events/activity.js +45 -0
  272. package/dist/import/events/activity.js.map +1 -0
  273. package/dist/import/events/session.d.ts +24 -0
  274. package/dist/import/events/session.d.ts.map +1 -0
  275. package/dist/import/events/session.js +47 -0
  276. package/dist/import/events/session.js.map +1 -0
  277. package/dist/import/filter.d.ts +47 -0
  278. package/dist/import/filter.d.ts.map +1 -0
  279. package/dist/import/filter.js +90 -0
  280. package/dist/import/filter.js.map +1 -0
  281. package/dist/import/ids.d.ts +56 -0
  282. package/dist/import/ids.d.ts.map +1 -0
  283. package/dist/import/ids.js +87 -0
  284. package/dist/import/ids.js.map +1 -0
  285. package/dist/import/index.d.ts +29 -0
  286. package/dist/import/index.d.ts.map +1 -0
  287. package/dist/import/index.js +52 -0
  288. package/dist/import/index.js.map +1 -0
  289. package/dist/import/marker.d.ts +20 -0
  290. package/dist/import/marker.d.ts.map +1 -0
  291. package/dist/import/marker.js +71 -0
  292. package/dist/import/marker.js.map +1 -0
  293. package/dist/import/pipeline.d.ts +41 -0
  294. package/dist/import/pipeline.d.ts.map +1 -0
  295. package/dist/import/pipeline.js +47 -0
  296. package/dist/import/pipeline.js.map +1 -0
  297. package/dist/import/progress.d.ts +20 -0
  298. package/dist/import/progress.d.ts.map +1 -0
  299. package/dist/import/progress.js +69 -0
  300. package/dist/import/progress.js.map +1 -0
  301. package/dist/import/skip.d.ts +13 -0
  302. package/dist/import/skip.d.ts.map +1 -0
  303. package/dist/import/skip.js +24 -0
  304. package/dist/import/skip.js.map +1 -0
  305. package/dist/import/types.d.ts +125 -0
  306. package/dist/import/types.d.ts.map +1 -0
  307. package/dist/import/types.js +28 -0
  308. package/dist/import/types.js.map +1 -0
  309. package/dist/index.js +21 -2
  310. package/dist/index.js.map +1 -1
  311. package/dist/lib/collector.d.ts +29 -3
  312. package/dist/lib/collector.d.ts.map +1 -1
  313. package/dist/lib/collector.js +118 -8
  314. package/dist/lib/collector.js.map +1 -1
  315. package/dist/lib/config.d.ts +240 -83
  316. package/dist/lib/config.d.ts.map +1 -1
  317. package/dist/lib/config.js +482 -89
  318. package/dist/lib/config.js.map +1 -1
  319. package/dist/lib/event.d.ts +72 -0
  320. package/dist/lib/event.d.ts.map +1 -0
  321. package/dist/lib/event.js +42 -0
  322. package/dist/lib/event.js.map +1 -0
  323. package/dist/lib/gitignore.d.ts +21 -0
  324. package/dist/lib/gitignore.d.ts.map +1 -0
  325. package/dist/lib/gitignore.js +54 -0
  326. package/dist/lib/gitignore.js.map +1 -0
  327. package/dist/lib/runtime-section.d.ts +118 -0
  328. package/dist/lib/runtime-section.d.ts.map +1 -0
  329. package/dist/lib/runtime-section.js +256 -0
  330. package/dist/lib/runtime-section.js.map +1 -0
  331. package/dist/lib/telemetry.d.ts +1 -1
  332. package/dist/lib/telemetry.d.ts.map +1 -1
  333. package/dist/lib/telemetry.js +4 -1
  334. package/dist/lib/telemetry.js.map +1 -1
  335. package/dist/queue/dead-letter.d.ts +5 -1
  336. package/dist/queue/dead-letter.d.ts.map +1 -1
  337. package/dist/queue/dead-letter.js +5 -1
  338. package/dist/queue/dead-letter.js.map +1 -1
  339. package/dist/queue/drain.d.ts +3 -2
  340. package/dist/queue/drain.d.ts.map +1 -1
  341. package/dist/queue/drain.js +3 -2
  342. package/dist/queue/drain.js.map +1 -1
  343. package/dist/queue/flush.d.ts +28 -12
  344. package/dist/queue/flush.d.ts.map +1 -1
  345. package/dist/queue/flush.js +43 -18
  346. package/dist/queue/flush.js.map +1 -1
  347. package/dist/queue/handlers/send-event.d.ts.map +1 -1
  348. package/dist/queue/handlers/send-event.js.map +1 -1
  349. package/dist/queue/index.d.ts +1 -2
  350. package/dist/queue/index.d.ts.map +1 -1
  351. package/dist/queue/index.js +2 -2
  352. package/dist/queue/index.js.map +1 -1
  353. package/dist/queue/paths.d.ts +4 -2
  354. package/dist/queue/paths.d.ts.map +1 -1
  355. package/dist/queue/paths.js +4 -2
  356. package/dist/queue/paths.js.map +1 -1
  357. package/dist/queue/process-file.d.ts +5 -1
  358. package/dist/queue/process-file.d.ts.map +1 -1
  359. package/dist/queue/process-file.js +5 -1
  360. package/dist/queue/process-file.js.map +1 -1
  361. package/dist/queue/snapshot.d.ts +4 -1
  362. package/dist/queue/snapshot.d.ts.map +1 -1
  363. package/dist/queue/snapshot.js +4 -1
  364. package/dist/queue/snapshot.js.map +1 -1
  365. package/dist/queue/spawn.d.ts +1 -3
  366. package/dist/queue/spawn.d.ts.map +1 -1
  367. package/dist/queue/spawn.js +1 -3
  368. package/dist/queue/spawn.js.map +1 -1
  369. package/dist/queue/submit.d.ts +6 -1
  370. package/dist/queue/submit.d.ts.map +1 -1
  371. package/dist/queue/submit.js +6 -1
  372. package/dist/queue/submit.js.map +1 -1
  373. package/dist/queue/types.d.ts +5 -1
  374. package/dist/queue/types.d.ts.map +1 -1
  375. package/dist/queue/types.js +5 -1
  376. package/dist/queue/types.js.map +1 -1
  377. package/dist/queue/worker-log.d.ts +3 -1
  378. package/dist/queue/worker-log.d.ts.map +1 -1
  379. package/dist/queue/worker-log.js +3 -1
  380. package/dist/queue/worker-log.js.map +1 -1
  381. package/package.json +3 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/analytics/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,MAAc,CAAC;AAE5C,6FAA6F;AAC7F,MAAM,MAAM,iBAAiB,GACvB,KAAK,GACL,MAAM,GACN,OAAO,GACP,OAAO,GACP,QAAQ,GACR,MAAM,CAAC;AAEb,sFAAsF;AACtF,MAAM,MAAM,iBAAiB,GACvB,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,OAAO,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAClB,QAAQ,GACR,WAAW,GACX,SAAS,GACT,aAAa,GACb,SAAS,GACT,aAAa,GACb,UAAU,GACV,YAAY,GACZ,KAAK,GACL,cAAc,GACd,cAAc,GACd,eAAe,GACf,SAAS,CAAC;AAEhB;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GACjB,gBAAgB,GAChB,aAAa,GACb,sBAAsB,GACtB,YAAY,GACZ,aAAa,GACb,SAAS,CAAC;AAEhB;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,eAAe,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB;AAMD;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IACxB,yFAAyF;IACzF,g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AAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IACxD,iFAAiF;IACjF,wBAAwB,EAAE,OAAO,CAAC;IAClC;;;OAGG;IACH,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC1D,8EAA8E;IAC9E,oBAAoB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC9C,8CAA8C;IAC9C,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC;;;;OAIG;IACH,eAAe,EAAE,wBAAwB,EAAE,CAAC;IAC5C;;;;;;OAMG;IACH,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;CAC7C"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * IronBee CLI — Analytics Types
4
+ *
5
+ * Type definitions for the analytics collection pipeline. The CLI projects
6
+ * the host transcript JSONL into a `SessionAnalytics` record (no content)
7
+ * and ships it to the IronBee collector as a `session_analytics` event.
8
+ *
9
+ * Privacy invariant: no field in any of these types ever holds raw
10
+ * user-prompt text or assistant-text content. Every field is structured
11
+ * metadata, count, label, byte size, or timestamp. The projection reads
12
+ * content locally for keyword matching / byte counting but emits only
13
+ * derived structural signals.
14
+ *
15
+ * Wire shape: top-level scalar fields are grouped into cohesive nested
16
+ * objects (`time`, `turns`, `classification`, `usage`, `tool_meta`,
17
+ * `code_changes`, `errors`, `user_activity`, `context_tokens`,
18
+ * `process_errors`, `user_messages`). Per-tool measurement is byte-based
19
+ * (`input_size`, `output_size`) plus a heuristic `approximated_*_tokens`;
20
+ * there is no per-tool token attribution and no `unattributed_*` residual.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.SCHEMA_VERSION = void 0;
24
+ /**
25
+ * Current schema_version emitted on the wire. Kept at "1.0" by operator
26
+ * choice — the internal refactor (logical groups + byte-based ToolUsage)
27
+ * doesn't bump the wire-version; backend migrates to the new shape under
28
+ * the same `schema_version: "1.0"` label.
29
+ */
30
+ exports.SCHEMA_VERSION = "1.0";
31
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/analytics/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH;;;;;GAKG;AACU,QAAA,cAAc,GAAW,KAAK,CAAC"}
@@ -1,9 +1,15 @@
1
+ import { IronBeeConfig } from "../lib/config";
1
2
  export interface IClient {
2
3
  readonly name: string;
3
4
  /** Returns true if this client is detected in the project directory. */
4
5
  detect(projectDir: string): boolean;
5
- /** Installs hooks and guidance files into the project directory. */
6
- install(projectDir: string): void;
6
+ /**
7
+ * Installs hooks and guidance files into the project directory.
8
+ * Pass `config` to render artifacts for a state different from what's on
9
+ * disk (used by toggle commands to apply the new state before persisting
10
+ * config). Omit to use the on-disk config.
11
+ */
12
+ install(projectDir: string, config?: IronBeeConfig): void;
7
13
  /** Removes IronBee hooks and guidance files from the project directory. */
8
14
  uninstall(projectDir: string): void;
9
15
  /** Resolves the project directory from client-specific env vars, falling back to cwd. */
@@ -14,6 +20,13 @@ export interface IClient {
14
20
  runClearVerdict(projectDir: string): Promise<void>;
15
21
  /** Runs the track-action PostToolUse hook for this client. */
16
22
  runTrackAction(projectDir: string): Promise<void>;
23
+ /**
24
+ * Runs the lean track-action variant for monitoring-only mode.
25
+ * Submits send_event jobs for non-devtools tools and falls back to
26
+ * starting an activity if one isn't already active. Skips devtools-to-actions.jsonl,
27
+ * recording state, and bdt_execute nested extraction (all verify-gate-only concerns).
28
+ */
29
+ runTrackActionMonitor(projectDir: string): Promise<void>;
17
30
  /** Runs the session-start hook for this client. */
18
31
  runSessionStart(projectDir: string): Promise<void>;
19
32
  /** Runs the require-verdict PreToolUse hook for this client. */
@@ -22,6 +35,12 @@ export interface IClient {
22
35
  runRequireVerification(projectDir: string): Promise<void>;
23
36
  /** Runs the activity-start hook for this client (UserPromptSubmit / beforeSubmitPrompt). */
24
37
  runActivityStart(projectDir: string): Promise<void>;
38
+ /**
39
+ * Runs the lean Stop hook for monitoring-only mode.
40
+ * Closes the active activity and triggers a background queue flush.
41
+ * Pairs with runActivityStart in the monitoring hook set.
42
+ */
43
+ runActivityEnd(projectDir: string): Promise<void>;
25
44
  /** Runs the session-end hook for this client (SessionEnd). */
26
45
  runSessionEnd(projectDir: string): Promise<void>;
27
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/clients/base.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,wEAAwE;IACxE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAEpC,oEAAoE;IACpE,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,2EAA2E;IAC3E,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,yFAAyF;IACzF,iBAAiB,IAAI,MAAM,CAAC;IAE5B,sDAAsD;IACtD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD,+DAA+D;IAC/D,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,8DAA8D;IAC9D,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD,mDAAmD;I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AM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD,mDAAmD;IACnD,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,gEAAgE;IAChE,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD,qEAAqE;IACrE,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D,4FAA4F;IAC5F,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;;;OAIG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD,8DAA8D;IAC9D,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD"}
@@ -1,20 +1,22 @@
1
1
  # IronBee Verify
2
2
 
3
- Verify the current code changes in the browser.
3
+ Verify the current code changes through real tools — browser interaction for frontend, runtime-specific debugger for any enabled backend cycle.
4
4
 
5
5
  ## Usage
6
- - `/ironbee-verify` — **default** — focus on what changed, visual + functional checks on affected areas
6
+ - `/ironbee-verify` — **default** — focus on what changed, visual + functional checks on affected areas (browser-cycle modes; any enabled backend-runtime cycle runs alongside automatically — see runtime section below)
7
7
  - `/ironbee-verify full` — **full scope** — entire application, all checklists, edge cases, responsive, accessibility deep dive
8
8
  - `/ironbee-verify visual` — **visual only** — contrast, layout, spacing, fonts, images, theming
9
9
  - `/ironbee-verify functional` — **functional only** — clicks, forms, navigation, data flow, error handling
10
10
 
11
- If no argument is given, use **default** mode.
11
+ If no argument is given, use **default** mode. The mode argument controls only the browser-cycle thoroughness — any active backend-runtime cycle runs the same way regardless of mode.
12
+
13
+ A backend-runtime cycle (e.g. `node` after `ironbee enable-backend node`) may also be active for this project — **see the runtime section near the bottom of this file** for whether it applies and which tools to call.
12
14
 
13
15
  ---
14
16
 
15
17
  ## Steps (all modes)
16
18
 
17
- 1. **Start verification**: Run `echo '{"session_id":"$IRONBEE_SESSION_ID"}' | ironbee hook verification-start` via Bash
19
+ 1. **Start verification**: Run `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` via Bash (substitute the actual session ID printed by the SessionStart hook).
18
20
  2. **Build and start** the application if not already running
19
21
  3. **For EVERY page you visit**, repeat this cycle:
20
22
  a. **Navigate** using `mcp__browser-devtools__bdt_navigation_go-to`
@@ -35,11 +37,12 @@ If no argument is given, use **default** mode.
35
37
  4. **Functionally test** — run the checklist for your mode (see below). After each significant interaction, take another screenshot and repeat the visual analysis.
36
38
  5. **Check console** for errors using `mcp__browser-devtools__bdt_o11y_get-console-messages`
37
39
  6. **Stop** the dev server when verification is complete
38
- 7. **Submit your verdict** via Bash:
40
+ 7. **If recording was started, stop it now** — `mcp__browser-devtools__bdt_content_stop-recording`. submit-verdict rejects with `"recording is still active"` when this step is skipped. (Recording is a server-side opt-in via `recording.enable` — when on, the gate forces `bdt_content_start-recording` BEFORE the steps above and demands the matching stop here.)
41
+ 8. **Submit your verdict** via Bash:
39
42
  - Pass: `echo '{"session_id":"...","status":"pass","pages_tested":[...],"checks":[...],"console_errors":0,"network_failures":0}' | ironbee hook submit-verdict`
40
43
  - Fail: `echo '{"session_id":"...","status":"fail","pages_tested":[...],"checks":[...],"console_errors":N,"network_failures":N,"issues":["describe what failed"]}' | ironbee hook submit-verdict`
41
- 8. **If failed** → collect ALL issues first (finish testing all affected pages), submit one fail verdict with all issues, then fix everything, rebuild, and re-verify. Do not fix one issue at a time — batch fixes to avoid repeated build/restart cycles.
42
- 9. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed
44
+ 9. **If failed** → collect ALL issues first (finish testing all affected pages), submit one fail verdict with all issues, then fix everything, rebuild, and re-verify. Do not fix one issue at a time — batch fixes to avoid repeated build/restart cycles.
45
+ 10. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed
43
46
 
44
47
  ---
45
48
 
@@ -125,3 +128,8 @@ Your `checks` array must list **specific observations**, not generic statements:
125
128
  - ALWAYS submit a verdict after every verification attempt — both pass AND fail
126
129
  - Do NOT edit code before submitting a fail verdict
127
130
  - **Noticing a bug and submitting pass is the #1 violation** — if you see it, fail it
131
+
132
+ ---
133
+
134
+ <!--IRONBEE:RUNTIME:node-->
135
+ <!--/IRONBEE:RUNTIME:node-->
@@ -0,0 +1,33 @@
1
+ <!-- Node backend verification is ENABLED for this project. -->
2
+
3
+ ## Backend Node Mode (when `backend.node.verifyPatterns` matches an edited file)
4
+
5
+ > **Precondition: the backend must actually be Node.js.** If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., this section does NOT apply — `ndt_*` tools won't connect to non-Node processes. Just do browser verification.
6
+
7
+ If the project has node backend verification enabled (`ironbee enable-backend node` once at setup, by an operator who confirmed the backend is Node.js) and your edits touch matching paths (e.g. `server/**`, `pages/api/**`), the Stop hook also enforces a Node cycle. The same `verification-start` covers both cycles; the same verdict file carries fields for both.
8
+
9
+ ### Steps (additive to the browser flow above)
10
+ 1. **Identify the running Node process** — note its PID, container name (`docker compose ps`), or inspector port.
11
+ 2. **Connect**: `mcp__node-devtools__ndt_debug_connect` with one of `pid` / `processName` / `containerId` / `containerName` / `inspectorPort` / `wsUrl`. Inspector is auto-activated via SIGUSR1 if needed.
12
+ 3. **Pick an evidence path** for each changed code path:
13
+ - **Probe path** (proves the code path executed): `mcp__node-devtools__ndt_debug_put-tracepoint` (or `put-logpoint` / `put-exceptionpoint`) at the changed code, exercise the path (e.g. trigger the API call from the browser), then `mcp__node-devtools__ndt_debug_get-probe-snapshots`. At least one probe must come back with `triggered: true`.
14
+ - **Log path** (proves no errors): exercise the path, then `mcp__node-devtools__ndt_debug_get-logs` with the error level filter. `backend_node_log_errors` must be empty for `status: pass`.
15
+ 4. **Disconnect** (optional): `mcp__node-devtools__ndt_debug_disconnect`.
16
+ 5. **Submit verdict** including `backend_node_*` fields. If browser cycle is also active, include browser fields in the SAME verdict — do not submit two verdicts.
17
+
18
+ ### Verdict (node-cycle fields)
19
+ ```json
20
+ {
21
+ "session_id": "...",
22
+ "status": "pass",
23
+ "checks": ["POST /api/orders returned 201", "tracepoint at handler.ts:42 fired once"],
24
+ "backend_node_processes_connected": ["pid:12345 (next-server)"],
25
+ "backend_node_probes_set": [
26
+ { "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
27
+ ],
28
+ "backend_node_probe_snapshots_collected": 1,
29
+ "backend_node_log_errors": []
30
+ }
31
+ ```
32
+
33
+ For a multi-cycle pass, both browser and node criteria must hold — claiming `pass` without one cycle's evidence will be overridden to fail by the gate.
@@ -0,0 +1,29 @@
1
+ <!-- Node backend verification is ENABLED for this project. The Stop hook
2
+ enforces a node cycle in addition to the browser cycle whenever an
3
+ edited file matches `backend.node.verifyPatterns`. -->
4
+
5
+ ## Node cycle
6
+
7
+ Backend file changes IF the file matches `backend.node.verifyPatterns` ALSO require verification through the **node-devtools** MCP server (prefix `ndt_`). Node-cycle verification means attaching to the running Node process via the V8 inspector, setting a probe (tracepoint / logpoint / exceptionpoint) at the changed code, exercising the path so the probe fires, and reading snapshots — OR inspecting runtime error logs.
8
+
9
+ Both cycles can be active simultaneously (e.g. you edit both a React component and an API handler in the same task). One `verification-start` covers all active cycles; one verdict file carries fields for all active cycles; one retry counter applies globally.
10
+
11
+ ### ⚠️ `node-devtools` is ONLY for Node.js backends
12
+
13
+ `node-devtools` is a V8 inspector wrapper. It does NOT work for Java, Python, Go, Rust, Ruby, .NET, PHP, or any other runtime. If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., the backend is NOT Node.js and you must NOT call `ndt_*` tools — they will fail to connect to non-Node processes.
14
+
15
+ **Misconfiguration recovery.** If you reach this state, the operator enabled the node cycle for a non-Node project by mistake. The Stop hook will keep blocking with `incomplete_tools` for the node cycle until you call `ndt_debug_connect` (which will fail) or until `maxRetries` is exhausted. Don't attempt the connection. Instead, stop and clearly report to the user: the project's backend is not Node.js, and they must run `ironbee disable-backend node` to unblock the gate. Continue with browser-cycle verification only in the meantime.
16
+
17
+ ### Node-cycle additions to the main flow
18
+
19
+ These attach to the **Required steps** above — they don't replace any step. Numbering follows the main flow:
20
+
21
+ - **Within step 3 (run flow):** also run the node flow: connect (`ndt_debug_connect`) → set probe (`ndt_debug_put-tracepoint` / `put-logpoint` / `put-exceptionpoint`) AND exercise + read snapshots (`ndt_debug_get-probe-snapshots`), OR exercise + read logs (`ndt_debug_get-logs`). When both browser and node cycles are active, run BOTH within the same verification cycle.
22
+ - **Within step 6 (submit verdict):** include `backend_node_*` fields (`backend_node_processes_connected` non-empty, plus `backend_node_probes_set` and/or `backend_node_log_errors`). One verdict carries fields for every active cycle.
23
+
24
+ ### Additional BANNED for node cycle
25
+
26
+ - Calling `ndt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
27
+ - **Calling `ndt_*` tools when the project's backend is NOT Node.js** (Java / Python / Go / Rust / .NET / Ruby / PHP / Elixir / etc.). Use the browser cycle only for non-Node backends.
28
+ - Claiming `status: pass` for a node cycle when no probe triggered AND `backend_node_log_errors` was never collected.
29
+ - Submitting a node-only verdict that omits `backend_node_processes_connected` — every node-cycle verdict requires this field non-empty.
@@ -0,0 +1,77 @@
1
+ <!-- Node backend verification is ENABLED for this project. The Stop hook
2
+ enforces a node cycle in addition to the browser cycle whenever an
3
+ edited file matches `backend.node.verifyPatterns`. -->
4
+
5
+ ## ⚠️ CRITICAL: when NOT to use node-devtools
6
+
7
+ **`node-devtools` is ONLY for Node.js backends.** It is a V8 inspector wrapper (`node --inspect` attach via PID / inspector port / Docker container). It does **NOT** work with any other runtime. Do **NOT** call `ndt_*` tools for projects whose backend is:
8
+ - Java (Spring, Quarkus, Micronaut, …) — use the JVM debugger, not supported by IronBee yet
9
+ - Python (FastAPI, Django, Flask, …) — not supported yet
10
+ - Go, Rust, Ruby, .NET, PHP, Elixir, Kotlin/JVM, Swift — not supported yet
11
+
12
+ **How to tell whether the backend is Node.js:**
13
+ - `package.json` is the main project manifest, with `"type": "module"` or `"engines": { "node": ... }`, or scripts that run `node`/`tsx`/`ts-node`.
14
+ - The dev server command is `npm run dev`, `next dev`, `nest start`, `nodemon`, etc.
15
+
16
+ If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `Gemfile`, `composer.json`, `*.csproj` — the backend is NOT Node.js. Do NOT call any `ndt_*` tools.
17
+
18
+ **Misconfiguration recovery.** If you read this section it means the operator enabled the node cycle for this project. If the backend isn't actually Node.js, this was a mistake — the Stop hook will keep blocking the gate (with `incomplete_tools` for the node cycle) until you call `ndt_debug_connect` (which will fail) or `maxRetries` is exhausted. Don't attempt the connection. Stop and tell the user clearly: the project's backend is not Node.js; ask them to run `ironbee disable-backend node` to unblock the gate. Continue with browser-cycle verification only in the meantime.
19
+
20
+ ## Node flow
21
+
22
+ 1. **Identify the running Node process** — note its PID, container name (`docker compose ps`), or inspector port.
23
+ 2. **Connect**: `mcp__node-devtools__ndt_debug_connect` with one of `pid` / `processName` / `containerId` / `containerName` / `inspectorPort` / `wsUrl`. SIGUSR1 is auto-sent if the inspector isn't on; for Docker, it goes through `docker exec`.
24
+ 3. **Pick an evidence path** per changed code path:
25
+ - **Probe path** (proves the code path executed):
26
+ - Set a probe at the changed location: `ndt_debug_put-tracepoint` (checkpoint), `ndt_debug_put-logpoint` (logged expression), or `ndt_debug_put-exceptionpoint` (caught/uncaught exception).
27
+ - **Exercise the path** (e.g. send a request from the browser, run a CLI command, post to a queue) — without this the probe never fires.
28
+ - Read collected snapshots: `ndt_debug_get-probe-snapshots`. At least one probe must come back with `triggered: true`.
29
+ - **Log path** (proves no errors during execution):
30
+ - Exercise the path.
31
+ - Read errors: `ndt_debug_get-logs` with the error-level filter. `backend_node_log_errors` must be empty for `status: pass`.
32
+ 4. **Disconnect** (optional): `ndt_debug_disconnect`.
33
+
34
+ ### Node verdict fields
35
+ ```json
36
+ {
37
+ "session_id": "<sid>",
38
+ "status": "pass",
39
+ "checks": ["POST /api/orders returned 201", "tracepoint at handler.ts:42 fired once"],
40
+ "backend_node_processes_connected": ["pid:12345 (next-server)"],
41
+ "backend_node_probes_set": [
42
+ { "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
43
+ ],
44
+ "backend_node_probe_snapshots_collected": 1,
45
+ "backend_node_log_errors": []
46
+ }
47
+ ```
48
+
49
+ For `status: "pass"` (node cycle):
50
+ - If probes were set, at least one must have `triggered: true` (proves the code path executed).
51
+ - If only logs were used, `backend_node_log_errors.length === 0` (no errors observed).
52
+ - If both forms were used, both conditions must hold.
53
+
54
+ ## Multi-cycle (browser + node simultaneously)
55
+
56
+ Common case: in the same task you edit a `.tsx` component (browser-cycle) and a `server/api/*.ts` handler (node-cycle). Both cycles activate. **Single** `verification-start`, **single** `verdict.json`, **single** retry counter cover both.
57
+
58
+ Submit ONE verdict carrying fields for every active cycle:
59
+
60
+ ```json
61
+ {
62
+ "session_id": "<sid>",
63
+ "status": "pass",
64
+ "pages_tested": ["http://localhost:3000/checkout"],
65
+ "checks": ["checkout submits", "POST /api/orders returned 201", "no console errors"],
66
+ "console_errors": 0,
67
+ "network_failures": 0,
68
+ "backend_node_processes_connected": ["pid:12345 (next-server)"],
69
+ "backend_node_probes_set": [
70
+ { "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
71
+ ],
72
+ "backend_node_probe_snapshots_collected": 1,
73
+ "backend_node_log_errors": []
74
+ }
75
+ ```
76
+
77
+ For a multi-cycle `pass`, BOTH cycles' pass criteria must hold. Claiming `pass` without one cycle's evidence will be overridden to `fail` by the gate.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Claude Code — activity-end hook adapter (monitoring-only mode).
3
+ *
4
+ * Stop hook for sessions where verification is disabled. Closes the active
5
+ * activity and triggers a background queue flush so accumulated `send_event`
6
+ * jobs ship to the collector before the next turn starts.
7
+ *
8
+ * Replaces `verify-gate` on Stop when `verification.enable: false`. The two
9
+ * are mutually exclusive at install time — only one Stop handler is registered
10
+ * per session.
11
+ */
12
+ export declare function run(projectDir: string): Promise<void>;
13
+ //# sourceMappingURL=activity-end.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-end.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/activity-end.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB3D"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * Claude Code — activity-end hook adapter (monitoring-only mode).
4
+ *
5
+ * Stop hook for sessions where verification is disabled. Closes the active
6
+ * activity and triggers a background queue flush so accumulated `send_event`
7
+ * jobs ship to the collector before the next turn starts.
8
+ *
9
+ * Replaces `verify-gate` on Stop when `verification.enable: false`. The two
10
+ * are mutually exclusive at install time — only one Stop handler is registered
11
+ * per session.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.run = run;
15
+ const activity_end_1 = require("../../../hooks/core/activity-end");
16
+ const logger_1 = require("../../../lib/logger");
17
+ const stdin_1 = require("../../../lib/stdin");
18
+ const hook_trigger_1 = require("../../../analytics/hook-trigger");
19
+ async function run(projectDir) {
20
+ let input;
21
+ try {
22
+ input = JSON.parse((0, stdin_1.readStdin)());
23
+ }
24
+ catch (e) {
25
+ logger_1.logger.debug(`failed to parse stdin: ${e}`);
26
+ process.exit(0);
27
+ }
28
+ const sessionId = input.session_id ?? "default";
29
+ const sessionDir = `${projectDir}/.ironbee/sessions/${sessionId}`;
30
+ const actionsFile = `${sessionDir}/actions.jsonl`;
31
+ (0, logger_1.setLogFile)(`${sessionDir}/session.log`);
32
+ await (0, activity_end_1.runActivityEnd)({ sessionDir, actionsFile, projectDir, sessionId });
33
+ // Analytics trigger after the existing primary work. Fail-safe.
34
+ (0, hook_trigger_1.runAnalyticsTrigger)({
35
+ projectDir,
36
+ sessionId,
37
+ triggerType: "Stop",
38
+ transcriptSource: "claude-code",
39
+ });
40
+ process.exit(0);
41
+ }
42
+ //# sourceMappingURL=activity-end.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-end.js","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/activity-end.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAWH,kBAyBC;AAlCD,mEAAkE;AAClE,gDAAyD;AACzD,8CAA+C;AAC/C,kEAAsE;AAM/D,KAAK,UAAU,GAAG,CAAC,UAAkB;IACxC,IAAI,KAA0B,CAAC;IAC/B,IAAI,CAAC;QACD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAS,GAAE,CAAwB,CAAC;IAC3D,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,SAAS,GAAW,KAAK,CAAC,UAAU,IAAI,SAAS,CAAC;IACxD,MAAM,UAAU,GAAW,GAAG,UAAU,sBAAsB,SAAS,EAAE,CAAC;IAC1E,MAAM,WAAW,GAAW,GAAG,UAAU,gBAAgB,CAAC;IAC1D,IAAA,mBAAU,EAAC,GAAG,UAAU,cAAc,CAAC,CAAC;IAExC,MAAM,IAAA,6BAAc,EAAC,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;IAEzE,gEAAgE;IAChE,IAAA,kCAAmB,EAAC;QAChB,UAAU;QACV,SAAS;QACT,WAAW,EAAE,MAAM;QACnB,gBAAgB,EAAE,aAAa;KAClC,CAAC,CAAC;IAEH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
@@ -1,11 +1,16 @@
1
1
  /**
2
2
  * Claude Code — clear-verdict hook adapter
3
3
  *
4
- * Reads Claude Code's stdin format, extracts session_id,
5
- * then delegates to the shared core logic.
4
+ * PostToolUse hook for Write|Edit. Records a `file_change` event with
5
+ * `operation` + line counts and clears the verdict.
6
6
  *
7
- * Only records file_edit and clears verdict for files with
8
- * extensions in the verifyExtensions whitelist.
7
+ * - Edit → operation:"update", lines diffed from old_string/new_string
8
+ * - Write operation derived from PreToolUse stash (create vs update);
9
+ * lines_added counts the new content, lines_removed is null
10
+ * on overwrite (we deliberately don't pre-read old content).
11
+ *
12
+ * Skips files that don't match the verifyPatterns config and the verdict
13
+ * file itself, mirroring the original behavior.
9
14
  */
10
15
  export declare function run(projectDir: string): Promise<void>;
11
16
  //# sourceMappingURL=clear-verdict.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clear-verdict.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/clear-verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAiBH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqD3D"}
1
+ {"version":3,"file":"clear-verdict.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/clear-verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA6DH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0D3D"}
@@ -2,20 +2,54 @@
2
2
  /**
3
3
  * Claude Code — clear-verdict hook adapter
4
4
  *
5
- * Reads Claude Code's stdin format, extracts session_id,
6
- * then delegates to the shared core logic.
5
+ * PostToolUse hook for Write|Edit. Records a `file_change` event with
6
+ * `operation` + line counts and clears the verdict.
7
7
  *
8
- * Only records file_edit and clears verdict for files with
9
- * extensions in the verifyExtensions whitelist.
8
+ * - Edit → operation:"update", lines diffed from old_string/new_string
9
+ * - Write operation derived from PreToolUse stash (create vs update);
10
+ * lines_added counts the new content, lines_removed is null
11
+ * on overwrite (we deliberately don't pre-read old content).
12
+ *
13
+ * Skips files that don't match the verifyPatterns config and the verdict
14
+ * file itself, mirroring the original behavior.
10
15
  */
11
16
  Object.defineProperty(exports, "__esModule", { value: true });
12
17
  exports.run = run;
13
18
  const clear_verdict_1 = require("../../../hooks/core/clear-verdict");
14
19
  const actions_1 = require("../../../hooks/core/actions");
15
20
  const session_state_1 = require("../../../hooks/core/session-state");
21
+ const tool_use_stash_1 = require("../../../hooks/core/tool-use-stash");
22
+ const file_diff_1 = require("../../../hooks/core/file-diff");
16
23
  const config_1 = require("../../../lib/config");
17
24
  const logger_1 = require("../../../lib/logger");
18
25
  const stdin_1 = require("../../../lib/stdin");
26
+ function deriveChangeFacts(input, sessionId) {
27
+ const tool = input.tool_name;
28
+ const ti = input.tool_input;
29
+ if (!ti) {
30
+ return null;
31
+ }
32
+ if (tool === "Edit") {
33
+ const oldStr = ti.old_string ?? "";
34
+ const newStr = ti.new_string ?? "";
35
+ const counts = (0, file_diff_1.diffLineCounts)(oldStr, newStr);
36
+ return { tool_name: "Edit", operation: "update", lines_added: counts.added, lines_removed: counts.removed };
37
+ }
38
+ if (tool === "Write") {
39
+ const content = ti.content ?? "";
40
+ const stash = input.tool_use_id
41
+ ? (0, tool_use_stash_1.consumeToolUseData)(sessionId, input.tool_use_id)
42
+ : null;
43
+ const fileExisted = stash?.file_existed ?? false;
44
+ return {
45
+ tool_name: "Write",
46
+ operation: fileExisted ? "update" : "create",
47
+ lines_added: (0, file_diff_1.countLines)(content),
48
+ lines_removed: fileExisted ? null : 0,
49
+ };
50
+ }
51
+ return null;
52
+ }
19
53
  async function run(projectDir) {
20
54
  let sessionId = "default";
21
55
  let input;
@@ -28,18 +62,15 @@ async function run(projectDir) {
28
62
  logger_1.logger.debug(`failed to parse stdin: ${e}`);
29
63
  process.exit(0);
30
64
  }
31
- // skip clear if the write target is the verdict file itself
32
65
  const writtenFile = input.tool_input?.file_path;
33
66
  if (writtenFile && writtenFile.includes(".ironbee/sessions/") && writtenFile.endsWith("verdict.json")) {
34
67
  logger_1.logger.debug(`skipping clear-verdict: write target is verdict file ${writtenFile}`);
35
68
  process.exit(0);
36
69
  }
37
- // skip if file path is missing — nothing to record
38
70
  if (!writtenFile) {
39
71
  logger_1.logger.debug("skipping clear-verdict: missing file_path in tool_input");
40
72
  process.exit(0);
41
73
  }
42
- // skip if file does not require verification
43
74
  const config = (0, config_1.loadConfig)(projectDir);
44
75
  if (!(0, config_1.requiresVerification)(writtenFile, config)) {
45
76
  logger_1.logger.debug(`skipping clear-verdict: file does not require verification (${writtenFile})`);
@@ -47,17 +78,24 @@ async function run(projectDir) {
47
78
  }
48
79
  const sessionDir = `${projectDir}/.ironbee/sessions/${sessionId}`;
49
80
  const actionsFile = `${sessionDir}/actions.jsonl`;
50
- // record file edit in actions.jsonl
51
- const fileEditEntry = {
81
+ const facts = deriveChangeFacts(input, sessionId);
82
+ if (!facts) {
83
+ logger_1.logger.debug(`skipping clear-verdict: unsupported tool ${input.tool_name}`);
84
+ process.exit(0);
85
+ }
86
+ const entry = {
52
87
  ...(0, actions_1.baseFields)(actionsFile),
53
- type: "file_edit",
88
+ type: "file_change",
54
89
  timestamp: Date.now(),
55
- tool_name: input.tool_name ?? "unknown",
90
+ tool_name: facts.tool_name,
56
91
  file_path: writtenFile,
92
+ operation: facts.operation,
93
+ lines_added: facts.lines_added,
94
+ lines_removed: facts.lines_removed,
57
95
  activity_id: (0, session_state_1.getActiveActivityId)(sessionDir),
58
96
  fix_id: (0, session_state_1.getActiveFixId)(sessionDir),
59
97
  };
60
- await (0, actions_1.appendAction)(actionsFile, fileEditEntry);
98
+ await (0, actions_1.appendAction)(actionsFile, entry);
61
99
  (0, clear_verdict_1.runClearVerdict)({
62
100
  verdictFile: `${projectDir}/.ironbee/sessions/${sessionId}/verdict.json`,
63
101
  sessionDir,
@@ -1 +1 @@
1
- {"version":3,"file":"clear-verdict.js","sourceRoot":"","sources":["../../../../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IAAI,CAAC,KAAK,EAAE,CAAC;QACT,eAAM,CAAC,KAAK,CAAC,4CAA4C,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;QAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,KAAK,GAAqB;QAC5B,GAAG,IAAA,oBAAU,EAAC,WAAW,CAAC;QAC1B,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,WAAW,EAAE,IAAA,mCAAmB,EAAC,UAAU,CAAE;QAC7C,MAAM,EAAE,IAAA,8BAAc,EAAC,UAAU,CAAE;KACtC,CAAC;IACF,MAAM,IAAA,sBAAY,EAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAEvC,IAAA,+BAAe,EAAC;QACZ,WAAW,EAAE,GAAG,UAAU,sBAAsB,SAAS,eAAe;QACxE,UAAU;KACb,CAAC,CAAC;IAEH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
@@ -1,11 +1,16 @@
1
1
  /**
2
2
  * Claude Code — require-verdict hook adapter
3
3
  *
4
- * PreToolUse hook for Write|Edit|MultiEdit — blocks file edits
5
- * if the agent used browser-devtools tools but hasn't submitted
6
- * a verdict yet. Forces the agent to submit a fail verdict
4
+ * PreToolUse hook for Write|Edit — blocks file edits if the agent used
5
+ * any devtools tools (browser-devtools or node-devtools) but hasn't
6
+ * submitted a verdict yet. Forces the agent to submit a fail verdict
7
7
  * before fixing code.
8
8
  *
9
+ * Side effect: when `tool_name === "Write"`, stashes whether the target
10
+ * file already exists so the matching PostToolUse adapter can decide
11
+ * `operation: "create"` vs `"update"` (the file is always present in
12
+ * PostToolUse, so this distinction is only recoverable here).
13
+ *
9
14
  * Exit 0 = allow edit
10
15
  * Exit 2 = block edit (stderr message shown to agent)
11
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"require-verdict.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/require-verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6B3D"}
1
+ {"version":3,"file":"require-verdict.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/require-verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAkBH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC3D"}
@@ -2,18 +2,25 @@
2
2
  /**
3
3
  * Claude Code — require-verdict hook adapter
4
4
  *
5
- * PreToolUse hook for Write|Edit|MultiEdit — blocks file edits
6
- * if the agent used browser-devtools tools but hasn't submitted
7
- * a verdict yet. Forces the agent to submit a fail verdict
5
+ * PreToolUse hook for Write|Edit — blocks file edits if the agent used
6
+ * any devtools tools (browser-devtools or node-devtools) but hasn't
7
+ * submitted a verdict yet. Forces the agent to submit a fail verdict
8
8
  * before fixing code.
9
9
  *
10
+ * Side effect: when `tool_name === "Write"`, stashes whether the target
11
+ * file already exists so the matching PostToolUse adapter can decide
12
+ * `operation: "create"` vs `"update"` (the file is always present in
13
+ * PostToolUse, so this distinction is only recoverable here).
14
+ *
10
15
  * Exit 0 = allow edit
11
16
  * Exit 2 = block edit (stderr message shown to agent)
12
17
  */
13
18
  Object.defineProperty(exports, "__esModule", { value: true });
14
19
  exports.run = run;
20
+ const fs_1 = require("fs");
15
21
  const actions_1 = require("../../../hooks/core/actions");
16
22
  const activity_1 = require("../../../hooks/core/activity");
23
+ const tool_use_stash_1 = require("../../../hooks/core/tool-use-stash");
17
24
  const logger_1 = require("../../../lib/logger");
18
25
  const stdin_1 = require("../../../lib/stdin");
19
26
  async function run(projectDir) {
@@ -30,15 +37,19 @@ async function run(projectDir) {
30
37
  const sessionDir = `${projectDir}/.ironbee/sessions/${sessionId}`;
31
38
  const actionsFile = `${sessionDir}/actions.jsonl`;
32
39
  if ((0, actions_1.hasToolCallsSinceLastVerdict)(actionsFile)) {
33
- process.stderr.write(`BLOCKED: You used browser-devtools tools but did not submit a verdict. You MUST submit a verdict (pass or fail) before editing code.
40
+ process.stderr.write(`BLOCKED: You used verification tools (browser-devtools or node-devtools) but did not submit a verdict. You MUST submit a verdict (pass or fail) before editing code.
34
41
 
35
- Submit your verdict first:
36
- echo '{"session_id":"${sessionId}","status":"fail","pages_tested":[...],"checks":[...],"console_errors":0,"network_failures":0,"issues":["describe what failed"]}' | ironbee hook submit-verdict
42
+ Submit your verdict first (include cycle-appropriate fields — browser fields for bdt_*, backend_node_* fields for ndt_*):
43
+ echo '{"session_id":"${sessionId}","status":"fail","checks":[...],"issues":["describe what failed"], ...}' | ironbee hook submit-verdict
37
44
 
38
45
  Then you can edit code to fix the issues.
39
46
  `);
40
47
  process.exit(2);
41
48
  }
49
+ if (input.tool_name === "Write" && input.tool_input?.file_path && input.tool_use_id) {
50
+ const state = { file_existed: (0, fs_1.existsSync)(input.tool_input.file_path) };
51
+ (0, tool_use_stash_1.stashToolUseData)(sessionId, input.tool_use_id, state);
52
+ }
42
53
  await (0, activity_1.startActivity)({ sessionDir, actionsFile, source: "pre_tool_use" });
43
54
  process.exit(0);
44
55
  }