@ironbee-ai/cli 0.6.2 → 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 (362) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +167 -39
  3. package/dist/analysis/code-changes.js.map +1 -1
  4. package/dist/analysis/cross-session.js.map +1 -1
  5. package/dist/analysis/fix-effectiveness.js.map +1 -1
  6. package/dist/analysis/time-analysis.js.map +1 -1
  7. package/dist/analysis/verdict-details.js.map +1 -1
  8. package/dist/analysis/verification-quality.js.map +1 -1
  9. package/dist/analytics/classifier.d.ts +99 -0
  10. package/dist/analytics/classifier.d.ts.map +1 -0
  11. package/dist/analytics/classifier.js +380 -0
  12. package/dist/analytics/classifier.js.map +1 -0
  13. package/dist/analytics/emit.d.ts +67 -0
  14. package/dist/analytics/emit.d.ts.map +1 -0
  15. package/dist/analytics/emit.js +901 -0
  16. package/dist/analytics/emit.js.map +1 -0
  17. package/dist/analytics/errors.d.ts +33 -0
  18. package/dist/analytics/errors.d.ts.map +1 -0
  19. package/dist/analytics/errors.js +93 -0
  20. package/dist/analytics/errors.js.map +1 -0
  21. package/dist/analytics/hook-trigger.d.ts +39 -0
  22. package/dist/analytics/hook-trigger.d.ts.map +1 -0
  23. package/dist/analytics/hook-trigger.js +127 -0
  24. package/dist/analytics/hook-trigger.js.map +1 -0
  25. package/dist/analytics/log.d.ts +44 -0
  26. package/dist/analytics/log.d.ts.map +1 -0
  27. package/dist/analytics/log.js +158 -0
  28. package/dist/analytics/log.js.map +1 -0
  29. package/dist/analytics/merge.d.ts +40 -0
  30. package/dist/analytics/merge.d.ts.map +1 -0
  31. package/dist/analytics/merge.js +527 -0
  32. package/dist/analytics/merge.js.map +1 -0
  33. package/dist/analytics/pricing.d.ts +149 -0
  34. package/dist/analytics/pricing.d.ts.map +1 -0
  35. package/dist/analytics/pricing.js +179 -0
  36. package/dist/analytics/pricing.js.map +1 -0
  37. package/dist/analytics/projection.d.ts +356 -0
  38. package/dist/analytics/projection.d.ts.map +1 -0
  39. package/dist/analytics/projection.js +2281 -0
  40. package/dist/analytics/projection.js.map +1 -0
  41. package/dist/analytics/spawn.d.ts +28 -0
  42. package/dist/analytics/spawn.d.ts.map +1 -0
  43. package/dist/analytics/spawn.js +57 -0
  44. package/dist/analytics/spawn.js.map +1 -0
  45. package/dist/analytics/state.d.ts +58 -0
  46. package/dist/analytics/state.d.ts.map +1 -0
  47. package/dist/analytics/state.js +329 -0
  48. package/dist/analytics/state.js.map +1 -0
  49. package/dist/analytics/transcript.d.ts +150 -0
  50. package/dist/analytics/transcript.d.ts.map +1 -0
  51. package/dist/analytics/transcript.js +276 -0
  52. package/dist/analytics/transcript.js.map +1 -0
  53. package/dist/analytics/types.d.ts +875 -0
  54. package/dist/analytics/types.d.ts.map +1 -0
  55. package/dist/analytics/types.js +31 -0
  56. package/dist/analytics/types.js.map +1 -0
  57. package/dist/clients/base.d.ts +21 -2
  58. package/dist/clients/base.d.ts.map +1 -1
  59. package/dist/clients/claude/commands/ironbee-verify.md +15 -7
  60. package/dist/clients/claude/fragments/command-verify.node.md +33 -0
  61. package/dist/clients/claude/fragments/rule.node.md +29 -0
  62. package/dist/clients/claude/fragments/skill.node.md +77 -0
  63. package/dist/clients/claude/hooks/activity-end.d.ts +13 -0
  64. package/dist/clients/claude/hooks/activity-end.d.ts.map +1 -0
  65. package/dist/clients/claude/hooks/activity-end.js +42 -0
  66. package/dist/clients/claude/hooks/activity-end.js.map +1 -0
  67. package/dist/clients/claude/hooks/require-verdict.d.ts +3 -2
  68. package/dist/clients/claude/hooks/require-verdict.d.ts.map +1 -1
  69. package/dist/clients/claude/hooks/require-verdict.js +6 -5
  70. package/dist/clients/claude/hooks/require-verdict.js.map +1 -1
  71. package/dist/clients/claude/hooks/require-verification.d.ts +7 -4
  72. package/dist/clients/claude/hooks/require-verification.d.ts.map +1 -1
  73. package/dist/clients/claude/hooks/require-verification.js +44 -22
  74. package/dist/clients/claude/hooks/require-verification.js.map +1 -1
  75. package/dist/clients/claude/hooks/session-end.d.ts.map +1 -1
  76. package/dist/clients/claude/hooks/session-end.js +17 -2
  77. package/dist/clients/claude/hooks/session-end.js.map +1 -1
  78. package/dist/clients/claude/hooks/session-start.d.ts.map +1 -1
  79. package/dist/clients/claude/hooks/session-start.js +2 -1
  80. package/dist/clients/claude/hooks/session-start.js.map +1 -1
  81. package/dist/clients/claude/hooks/track-action-monitor.d.ts +27 -0
  82. package/dist/clients/claude/hooks/track-action-monitor.d.ts.map +1 -0
  83. package/dist/clients/claude/hooks/track-action-monitor.js +126 -0
  84. package/dist/clients/claude/hooks/track-action-monitor.js.map +1 -0
  85. package/dist/clients/claude/hooks/track-action.d.ts.map +1 -1
  86. package/dist/clients/claude/hooks/track-action.js +29 -20
  87. package/dist/clients/claude/hooks/track-action.js.map +1 -1
  88. package/dist/clients/claude/hooks/verify-gate.d.ts.map +1 -1
  89. package/dist/clients/claude/hooks/verify-gate.js +18 -1
  90. package/dist/clients/claude/hooks/verify-gate.js.map +1 -1
  91. package/dist/clients/claude/index.d.ts +4 -1
  92. package/dist/clients/claude/index.d.ts.map +1 -1
  93. package/dist/clients/claude/index.js +171 -94
  94. package/dist/clients/claude/index.js.map +1 -1
  95. package/dist/clients/claude/rules/ironbee-verification.md +41 -33
  96. package/dist/clients/claude/skills/ironbee-verification.md +93 -76
  97. package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +18 -10
  98. package/dist/clients/cursor/fragments/command-verify.node.md +33 -0
  99. package/dist/clients/cursor/fragments/rule.node.md +29 -0
  100. package/dist/clients/cursor/fragments/skill.node.md +77 -0
  101. package/dist/clients/cursor/hooks/activity-end.d.ts +14 -0
  102. package/dist/clients/cursor/hooks/activity-end.d.ts.map +1 -0
  103. package/dist/clients/cursor/hooks/activity-end.js +45 -0
  104. package/dist/clients/cursor/hooks/activity-end.js.map +1 -0
  105. package/dist/clients/cursor/hooks/require-verdict.d.ts +1 -1
  106. package/dist/clients/cursor/hooks/require-verdict.js +4 -4
  107. package/dist/clients/cursor/hooks/require-verification.d.ts.map +1 -1
  108. package/dist/clients/cursor/hooks/require-verification.js +42 -16
  109. package/dist/clients/cursor/hooks/require-verification.js.map +1 -1
  110. package/dist/clients/cursor/hooks/session-end.d.ts.map +1 -1
  111. package/dist/clients/cursor/hooks/session-end.js +18 -2
  112. package/dist/clients/cursor/hooks/session-end.js.map +1 -1
  113. package/dist/clients/cursor/hooks/session-start.d.ts.map +1 -1
  114. package/dist/clients/cursor/hooks/session-start.js +2 -1
  115. package/dist/clients/cursor/hooks/session-start.js.map +1 -1
  116. package/dist/clients/cursor/hooks/track-action-monitor.d.ts +27 -0
  117. package/dist/clients/cursor/hooks/track-action-monitor.d.ts.map +1 -0
  118. package/dist/clients/cursor/hooks/track-action-monitor.js +133 -0
  119. package/dist/clients/cursor/hooks/track-action-monitor.js.map +1 -0
  120. package/dist/clients/cursor/hooks/track-action.d.ts.map +1 -1
  121. package/dist/clients/cursor/hooks/track-action.js +51 -23
  122. package/dist/clients/cursor/hooks/track-action.js.map +1 -1
  123. package/dist/clients/cursor/hooks/verify-gate.d.ts.map +1 -1
  124. package/dist/clients/cursor/hooks/verify-gate.js +14 -1
  125. package/dist/clients/cursor/hooks/verify-gate.js.map +1 -1
  126. package/dist/clients/cursor/index.d.ts +4 -1
  127. package/dist/clients/cursor/index.d.ts.map +1 -1
  128. package/dist/clients/cursor/index.js +117 -71
  129. package/dist/clients/cursor/index.js.map +1 -1
  130. package/dist/clients/cursor/rules/ironbee-verification.mdc +37 -29
  131. package/dist/clients/cursor/skills/ironbee-verification.md +93 -76
  132. package/dist/clients/registry.d.ts +14 -0
  133. package/dist/clients/registry.d.ts.map +1 -1
  134. package/dist/clients/registry.js +34 -0
  135. package/dist/clients/registry.js.map +1 -1
  136. package/dist/commands/analyze.d.ts.map +1 -1
  137. package/dist/commands/analyze.js +40 -0
  138. package/dist/commands/analyze.js.map +1 -1
  139. package/dist/commands/backend-toggle.d.ts +45 -0
  140. package/dist/commands/backend-toggle.d.ts.map +1 -0
  141. package/dist/commands/backend-toggle.js +192 -0
  142. package/dist/commands/backend-toggle.js.map +1 -0
  143. package/dist/commands/disable-backend.d.ts +14 -0
  144. package/dist/commands/disable-backend.d.ts.map +1 -0
  145. package/dist/commands/disable-backend.js +34 -0
  146. package/dist/commands/disable-backend.js.map +1 -0
  147. package/dist/commands/disable-verification.d.ts +16 -0
  148. package/dist/commands/disable-verification.d.ts.map +1 -0
  149. package/dist/commands/disable-verification.js +36 -0
  150. package/dist/commands/disable-verification.js.map +1 -0
  151. package/dist/commands/enable-backend.d.ts +15 -0
  152. package/dist/commands/enable-backend.d.ts.map +1 -0
  153. package/dist/commands/enable-backend.js +35 -0
  154. package/dist/commands/enable-backend.js.map +1 -0
  155. package/dist/commands/enable-verification.d.ts +14 -0
  156. package/dist/commands/enable-verification.d.ts.map +1 -0
  157. package/dist/commands/enable-verification.js +34 -0
  158. package/dist/commands/enable-verification.js.map +1 -0
  159. package/dist/commands/hook.d.ts.map +1 -1
  160. package/dist/commands/hook.js +60 -0
  161. package/dist/commands/hook.js.map +1 -1
  162. package/dist/commands/import.d.ts +39 -0
  163. package/dist/commands/import.d.ts.map +1 -0
  164. package/dist/commands/import.js +369 -0
  165. package/dist/commands/import.js.map +1 -0
  166. package/dist/commands/install.d.ts.map +1 -1
  167. package/dist/commands/install.js +15 -20
  168. package/dist/commands/install.js.map +1 -1
  169. package/dist/commands/process-analytics.d.ts +18 -0
  170. package/dist/commands/process-analytics.d.ts.map +1 -0
  171. package/dist/commands/process-analytics.js +57 -0
  172. package/dist/commands/process-analytics.js.map +1 -0
  173. package/dist/commands/queue.d.ts +2 -3
  174. package/dist/commands/queue.d.ts.map +1 -1
  175. package/dist/commands/queue.js +2 -3
  176. package/dist/commands/queue.js.map +1 -1
  177. package/dist/commands/status.d.ts.map +1 -1
  178. package/dist/commands/status.js +29 -1
  179. package/dist/commands/status.js.map +1 -1
  180. package/dist/commands/verification-toggle.d.ts +47 -0
  181. package/dist/commands/verification-toggle.d.ts.map +1 -0
  182. package/dist/commands/verification-toggle.js +113 -0
  183. package/dist/commands/verification-toggle.js.map +1 -0
  184. package/dist/commands/verify.d.ts.map +1 -1
  185. package/dist/commands/verify.js +28 -0
  186. package/dist/commands/verify.js.map +1 -1
  187. package/dist/hooks/core/actions.d.ts +64 -67
  188. package/dist/hooks/core/actions.d.ts.map +1 -1
  189. package/dist/hooks/core/actions.js +39 -24
  190. package/dist/hooks/core/actions.js.map +1 -1
  191. package/dist/hooks/core/activity-end.d.ts +20 -0
  192. package/dist/hooks/core/activity-end.d.ts.map +1 -0
  193. package/dist/hooks/core/activity-end.js +23 -0
  194. package/dist/hooks/core/activity-end.js.map +1 -0
  195. package/dist/hooks/core/required-tools.d.ts +30 -0
  196. package/dist/hooks/core/required-tools.d.ts.map +1 -0
  197. package/dist/hooks/core/required-tools.js +70 -0
  198. package/dist/hooks/core/required-tools.js.map +1 -0
  199. package/dist/hooks/core/session-state.d.ts +12 -3
  200. package/dist/hooks/core/session-state.d.ts.map +1 -1
  201. package/dist/hooks/core/session-state.js +59 -0
  202. package/dist/hooks/core/session-state.js.map +1 -1
  203. package/dist/hooks/core/submit-verdict.d.ts.map +1 -1
  204. package/dist/hooks/core/submit-verdict.js +16 -12
  205. package/dist/hooks/core/submit-verdict.js.map +1 -1
  206. package/dist/hooks/core/verify-gate.d.ts +17 -3
  207. package/dist/hooks/core/verify-gate.d.ts.map +1 -1
  208. package/dist/hooks/core/verify-gate.js +312 -116
  209. package/dist/hooks/core/verify-gate.js.map +1 -1
  210. package/dist/import/claude/analytics-runner.d.ts +42 -0
  211. package/dist/import/claude/analytics-runner.d.ts.map +1 -0
  212. package/dist/import/claude/analytics-runner.js +213 -0
  213. package/dist/import/claude/analytics-runner.js.map +1 -0
  214. package/dist/import/claude/discovery.d.ts +22 -0
  215. package/dist/import/claude/discovery.d.ts.map +1 -0
  216. package/dist/import/claude/discovery.js +197 -0
  217. package/dist/import/claude/discovery.js.map +1 -0
  218. package/dist/import/claude/encoding.d.ts +50 -0
  219. package/dist/import/claude/encoding.d.ts.map +1 -0
  220. package/dist/import/claude/encoding.js +110 -0
  221. package/dist/import/claude/encoding.js.map +1 -0
  222. package/dist/import/claude/events/file-change.d.ts +28 -0
  223. package/dist/import/claude/events/file-change.d.ts.map +1 -0
  224. package/dist/import/claude/events/file-change.js +112 -0
  225. package/dist/import/claude/events/file-change.js.map +1 -0
  226. package/dist/import/claude/events/tool-call.d.ts +61 -0
  227. package/dist/import/claude/events/tool-call.d.ts.map +1 -0
  228. package/dist/import/claude/events/tool-call.js +119 -0
  229. package/dist/import/claude/events/tool-call.js.map +1 -0
  230. package/dist/import/claude/runner.d.ts +31 -0
  231. package/dist/import/claude/runner.d.ts.map +1 -0
  232. package/dist/import/claude/runner.js +280 -0
  233. package/dist/import/claude/runner.js.map +1 -0
  234. package/dist/import/claude/summary.d.ts +23 -0
  235. package/dist/import/claude/summary.d.ts.map +1 -0
  236. package/dist/import/claude/summary.js +186 -0
  237. package/dist/import/claude/summary.js.map +1 -0
  238. package/dist/import/claude/transcript-walk.d.ts +52 -0
  239. package/dist/import/claude/transcript-walk.d.ts.map +1 -0
  240. package/dist/import/claude/transcript-walk.js +187 -0
  241. package/dist/import/claude/transcript-walk.js.map +1 -0
  242. package/dist/import/concurrent-pool.d.ts +45 -0
  243. package/dist/import/concurrent-pool.d.ts.map +1 -0
  244. package/dist/import/concurrent-pool.js +95 -0
  245. package/dist/import/concurrent-pool.js.map +1 -0
  246. package/dist/import/emitter.d.ts +29 -0
  247. package/dist/import/emitter.d.ts.map +1 -0
  248. package/dist/import/emitter.js +66 -0
  249. package/dist/import/emitter.js.map +1 -0
  250. package/dist/import/events/activity.d.ts +23 -0
  251. package/dist/import/events/activity.d.ts.map +1 -0
  252. package/dist/import/events/activity.js +45 -0
  253. package/dist/import/events/activity.js.map +1 -0
  254. package/dist/import/events/session.d.ts +24 -0
  255. package/dist/import/events/session.d.ts.map +1 -0
  256. package/dist/import/events/session.js +47 -0
  257. package/dist/import/events/session.js.map +1 -0
  258. package/dist/import/filter.d.ts +47 -0
  259. package/dist/import/filter.d.ts.map +1 -0
  260. package/dist/import/filter.js +90 -0
  261. package/dist/import/filter.js.map +1 -0
  262. package/dist/import/ids.d.ts +56 -0
  263. package/dist/import/ids.d.ts.map +1 -0
  264. package/dist/import/ids.js +87 -0
  265. package/dist/import/ids.js.map +1 -0
  266. package/dist/import/index.d.ts +29 -0
  267. package/dist/import/index.d.ts.map +1 -0
  268. package/dist/import/index.js +52 -0
  269. package/dist/import/index.js.map +1 -0
  270. package/dist/import/marker.d.ts +20 -0
  271. package/dist/import/marker.d.ts.map +1 -0
  272. package/dist/import/marker.js +71 -0
  273. package/dist/import/marker.js.map +1 -0
  274. package/dist/import/pipeline.d.ts +41 -0
  275. package/dist/import/pipeline.d.ts.map +1 -0
  276. package/dist/import/pipeline.js +47 -0
  277. package/dist/import/pipeline.js.map +1 -0
  278. package/dist/import/progress.d.ts +20 -0
  279. package/dist/import/progress.d.ts.map +1 -0
  280. package/dist/import/progress.js +69 -0
  281. package/dist/import/progress.js.map +1 -0
  282. package/dist/import/skip.d.ts +13 -0
  283. package/dist/import/skip.d.ts.map +1 -0
  284. package/dist/import/skip.js +24 -0
  285. package/dist/import/skip.js.map +1 -0
  286. package/dist/import/types.d.ts +125 -0
  287. package/dist/import/types.d.ts.map +1 -0
  288. package/dist/import/types.js +28 -0
  289. package/dist/import/types.js.map +1 -0
  290. package/dist/index.js +21 -2
  291. package/dist/index.js.map +1 -1
  292. package/dist/lib/collector.d.ts +29 -3
  293. package/dist/lib/collector.d.ts.map +1 -1
  294. package/dist/lib/collector.js +118 -8
  295. package/dist/lib/collector.js.map +1 -1
  296. package/dist/lib/config.d.ts +240 -83
  297. package/dist/lib/config.d.ts.map +1 -1
  298. package/dist/lib/config.js +482 -89
  299. package/dist/lib/config.js.map +1 -1
  300. package/dist/lib/event.d.ts +72 -0
  301. package/dist/lib/event.d.ts.map +1 -0
  302. package/dist/lib/event.js +42 -0
  303. package/dist/lib/event.js.map +1 -0
  304. package/dist/lib/gitignore.d.ts +21 -0
  305. package/dist/lib/gitignore.d.ts.map +1 -0
  306. package/dist/lib/gitignore.js +54 -0
  307. package/dist/lib/gitignore.js.map +1 -0
  308. package/dist/lib/runtime-section.d.ts +118 -0
  309. package/dist/lib/runtime-section.d.ts.map +1 -0
  310. package/dist/lib/runtime-section.js +256 -0
  311. package/dist/lib/runtime-section.js.map +1 -0
  312. package/dist/lib/telemetry.d.ts +1 -1
  313. package/dist/lib/telemetry.d.ts.map +1 -1
  314. package/dist/lib/telemetry.js +4 -1
  315. package/dist/lib/telemetry.js.map +1 -1
  316. package/dist/queue/dead-letter.d.ts +5 -1
  317. package/dist/queue/dead-letter.d.ts.map +1 -1
  318. package/dist/queue/dead-letter.js +5 -1
  319. package/dist/queue/dead-letter.js.map +1 -1
  320. package/dist/queue/drain.d.ts +3 -2
  321. package/dist/queue/drain.d.ts.map +1 -1
  322. package/dist/queue/drain.js +3 -2
  323. package/dist/queue/drain.js.map +1 -1
  324. package/dist/queue/flush.d.ts +28 -12
  325. package/dist/queue/flush.d.ts.map +1 -1
  326. package/dist/queue/flush.js +43 -18
  327. package/dist/queue/flush.js.map +1 -1
  328. package/dist/queue/handlers/send-event.d.ts.map +1 -1
  329. package/dist/queue/handlers/send-event.js.map +1 -1
  330. package/dist/queue/index.d.ts +1 -2
  331. package/dist/queue/index.d.ts.map +1 -1
  332. package/dist/queue/index.js +2 -2
  333. package/dist/queue/index.js.map +1 -1
  334. package/dist/queue/paths.d.ts +4 -2
  335. package/dist/queue/paths.d.ts.map +1 -1
  336. package/dist/queue/paths.js +4 -2
  337. package/dist/queue/paths.js.map +1 -1
  338. package/dist/queue/process-file.d.ts +5 -1
  339. package/dist/queue/process-file.d.ts.map +1 -1
  340. package/dist/queue/process-file.js +5 -1
  341. package/dist/queue/process-file.js.map +1 -1
  342. package/dist/queue/snapshot.d.ts +4 -1
  343. package/dist/queue/snapshot.d.ts.map +1 -1
  344. package/dist/queue/snapshot.js +4 -1
  345. package/dist/queue/snapshot.js.map +1 -1
  346. package/dist/queue/spawn.d.ts +1 -3
  347. package/dist/queue/spawn.d.ts.map +1 -1
  348. package/dist/queue/spawn.js +1 -3
  349. package/dist/queue/spawn.js.map +1 -1
  350. package/dist/queue/submit.d.ts +6 -1
  351. package/dist/queue/submit.d.ts.map +1 -1
  352. package/dist/queue/submit.js +6 -1
  353. package/dist/queue/submit.js.map +1 -1
  354. package/dist/queue/types.d.ts +5 -1
  355. package/dist/queue/types.d.ts.map +1 -1
  356. package/dist/queue/types.js +5 -1
  357. package/dist/queue/types.js.map +1 -1
  358. package/dist/queue/worker-log.d.ts +3 -1
  359. package/dist/queue/worker-log.d.ts.map +1 -1
  360. package/dist/queue/worker-log.js +3 -1
  361. package/dist/queue/worker-log.js.map +1 -1
  362. package/package.json +1 -1
@@ -0,0 +1,149 @@
1
+ /**
2
+ * IronBee CLI — Model Pricing
3
+ *
4
+ * Per-model token-cost table (USD per 1M tokens) used at projection time to
5
+ * stamp each delta with `cost_usd` per model + a session total. The CLI
6
+ * estimate is a best-effort — backend may recompute with authoritative
7
+ * pricing or apply a more granular model.
8
+ *
9
+ * Source: Anthropic public pricing for the Claude 4.x family. Values are
10
+ * captured as constants because the projection runs in-hook with no
11
+ * network dependency. Update this table whenever pricing changes.
12
+ *
13
+ * Conventions:
14
+ * - `input` covers fresh (non-cached) input tokens.
15
+ * - `output` covers output tokens.
16
+ * - `cache_read` ≈ 10% of `input` (prompt cache hit).
17
+ * - `cache_creation` ≈ 125% of `input` (5-min cache write — the dominant
18
+ * case in interactive sessions). The 1-hour cache (~200% of input) is
19
+ * not broken out separately by analytics today, so we stay with the 5m
20
+ * baseline. If analytics later splits the two, add a `cache_creation_1h`
21
+ * bucket.
22
+ *
23
+ * Family fallback: when `message.model` doesn't match an exact key, we
24
+ * match by family prefix (`claude-opus-`, `claude-sonnet-`, `claude-haiku-`)
25
+ * to a representative Claude 4.x rate. Anything unrecognized returns
26
+ * `null` and contributes 0 cost — better to undercount than to invent
27
+ * pricing for an unknown family.
28
+ */
29
+ /**
30
+ * Heuristic conversion factor for estimating tokens from byte length when
31
+ * we don't have an authoritative `usage` field to read from. Used by the
32
+ * per-tool input-side attribution: a tool_result.content is part of the
33
+ * NEXT assistant message's `input_tokens`, but we can't easily compute
34
+ * "how many of those input_tokens are this tool's contribution" without
35
+ * tokenizing. Instead we estimate `bytes / BYTES_PER_TOKEN`.
36
+ *
37
+ * Anthropic's BPE tokenizer averages ~3.5–4.5 bytes/token for typical
38
+ * tool_result content (mix of code, JSON, English). 4 is a defensible
39
+ * middle. Tune if production data shows systematic over/under-attribution.
40
+ */
41
+ export declare const BYTES_PER_TOKEN: number;
42
+ export interface ModelPricing {
43
+ /** USD per 1M fresh input tokens. */
44
+ input: number;
45
+ /** USD per 1M output tokens. */
46
+ output: number;
47
+ /** USD per 1M cache-read tokens (prompt cache hit). */
48
+ cache_read: number;
49
+ /** USD per 1M cache-creation tokens (5-minute ephemeral cache write). */
50
+ cache_creation: number;
51
+ /**
52
+ * USD per 1M cache-creation tokens (1-hour ephemeral cache write tier).
53
+ * Anthropic's prompt caching has two ephemeral tiers — 5 minutes (default)
54
+ * and 1 hour (more expensive). Real sessions often use the 1h tier
55
+ * heavily, especially long agent loops where cache prefix lifetime
56
+ * matters more than per-token rate. Falls back to `cache_creation`
57
+ * (5m rate) if undefined.
58
+ */
59
+ cache_creation_1h?: number;
60
+ /**
61
+ * USD per server-side web_search request. Anthropic charges $0.01/req
62
+ * for the built-in web_search server tool. Tracked via
63
+ * `usage.server_tool_use.web_search_requests` on the assistant message.
64
+ */
65
+ web_search?: number;
66
+ }
67
+ /**
68
+ * Exact-id pricing keys. Family fallback handles unknown model ids.
69
+ *
70
+ * USD per 1M tokens. cache_read = prompt cache hit; cache_creation = 5-minute
71
+ * cache write (the default ephemeral tier on the API). 1-hour cache write is a
72
+ * separate (more expensive) tier — not modelled here since usage._tokens fields
73
+ * don't currently distinguish 5m vs 1h breakpoints in transcript JSONL.
74
+ *
75
+ * Source: https://platform.claude.com/docs/en/about-claude/pricing
76
+ *
77
+ * Opus 4.5+ note: Anthropic dropped Opus list price to ~1/3 of the Opus 4 / 4.1
78
+ * tier starting with 4.5 ($5 input / $25 output vs old $15 / $75). Opus 4 and 4.1
79
+ * retain the legacy higher pricing. Family fallback returns the NEWER (cheaper)
80
+ * pricing for unknown opus-X versions on the assumption that future Opus releases
81
+ * stay on the new tier.
82
+ */
83
+ export declare const PRICING: Record<string, ModelPricing>;
84
+ /**
85
+ * Opus 4.6 fast-mode pricing tier — 6× the regular Opus 4.5+ rate.
86
+ * Active when `usage.speed === "fast"` on an Opus 4.6 message. Looked up
87
+ * via {@link lookupPricingForUsage} which checks the speed field; the
88
+ * regular {@link PRICING} entry is used otherwise.
89
+ *
90
+ * Source: Claude Code's `getOpus46CostTier` (modelCost.ts), uses a single
91
+ * COST_TIER_30_150 constant — no separate 1h tier in fast mode.
92
+ */
93
+ export declare const OPUS_4_6_FAST_PRICING: ModelPricing;
94
+ /** Resolve pricing for a model id, with family-prefix fallback. */
95
+ export declare function lookupPricing(model: string): ModelPricing | null;
96
+ /**
97
+ * Resolve pricing for an assistant message, accounting for fast-mode tier
98
+ * upgrades. Currently only Opus 4.6 has a fast-mode tier (6× regular rates);
99
+ * any other model with `speed === "fast"` falls through to its regular tier.
100
+ *
101
+ * Mirrors Claude Code's `getOpus46CostTier`. Returns the regular tier when
102
+ * `speed` is undefined or anything other than "fast".
103
+ */
104
+ export declare function lookupPricingForUsage(model: string, speed: string | undefined): ModelPricing | null;
105
+ export interface MessageTokenUsage {
106
+ input_tokens: number;
107
+ output_tokens: number;
108
+ /**
109
+ * Total cache-creation tokens across both ephemeral tiers. Use this when
110
+ * the 5m / 1h split is unknown; otherwise prefer
111
+ * {@link cache_creation_5m_tokens} + {@link cache_creation_1h_tokens}
112
+ * which gives accurate per-tier cost.
113
+ */
114
+ cache_creation_tokens: number;
115
+ cache_read_tokens: number;
116
+ /** Subset of cache_creation_tokens billed at the 5m tier. */
117
+ cache_creation_5m_tokens?: number;
118
+ /** Subset of cache_creation_tokens billed at the 1h tier (more expensive). */
119
+ cache_creation_1h_tokens?: number;
120
+ /** Server-side web_search request count. Each is billed at `pricing.web_search` flat. */
121
+ web_search_requests?: number;
122
+ }
123
+ /**
124
+ * Compute USD cost of a single assistant-message worth of tokens given
125
+ * a pricing entry. Returns 0 when pricing is null (unknown model).
126
+ *
127
+ * Math: (tokens × $/MTok) / 1_000_000 + (web_search_requests × $/req) → USD.
128
+ *
129
+ * **5m/1h cache_creation tier handling — DISABLED for Claude Code parity.**
130
+ *
131
+ * Anthropic's published pricing distinguishes a 5-minute ephemeral cache
132
+ * write tier (e.g. $6.25/MTok for Opus 4.7) from a 1-hour tier (e.g. $10).
133
+ * Real transcripts often carry 100% 1h cache writes (long agent loops),
134
+ * which means the 5m-only formula UNDERESTIMATES the published-rate cost.
135
+ *
136
+ * However, **Claude Code's own `/cost` command uses a single rate** via
137
+ * `tokensToUSDCost` in modelCost.ts (it reads `usage.cache_creation_input_tokens`
138
+ * as a flat sum and bills at `promptCacheWriteTokens` = 5m rate). To stay
139
+ * sync with `/cost` output that users see in the terminal, we mirror this
140
+ * 5m-only behaviour here.
141
+ *
142
+ * The 5m/1h split infrastructure is intact (`cache_creation_5m_tokens`,
143
+ * `cache_creation_1h_tokens`, `pricing.cache_creation_1h`, the projection
144
+ * walks `usage.cache_creation.ephemeral_*_input_tokens`) — when Claude Code
145
+ * adopts per-tier billing OR we explicitly want to diverge from `/cost`,
146
+ * un-comment the split branch below to enable.
147
+ */
148
+ export declare function computeMessageCostUsd(usage: MessageTokenUsage, pricing: ModelPricing | null): number;
149
+ //# sourceMappingURL=pricing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/analytics/pricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;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AY,GAAG,IAAI,GAAG,MAAM,CA2BpG"}
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ /**
3
+ * IronBee CLI — Model Pricing
4
+ *
5
+ * Per-model token-cost table (USD per 1M tokens) used at projection time to
6
+ * stamp each delta with `cost_usd` per model + a session total. The CLI
7
+ * estimate is a best-effort — backend may recompute with authoritative
8
+ * pricing or apply a more granular model.
9
+ *
10
+ * Source: Anthropic public pricing for the Claude 4.x family. Values are
11
+ * captured as constants because the projection runs in-hook with no
12
+ * network dependency. Update this table whenever pricing changes.
13
+ *
14
+ * Conventions:
15
+ * - `input` covers fresh (non-cached) input tokens.
16
+ * - `output` covers output tokens.
17
+ * - `cache_read` ≈ 10% of `input` (prompt cache hit).
18
+ * - `cache_creation` ≈ 125% of `input` (5-min cache write — the dominant
19
+ * case in interactive sessions). The 1-hour cache (~200% of input) is
20
+ * not broken out separately by analytics today, so we stay with the 5m
21
+ * baseline. If analytics later splits the two, add a `cache_creation_1h`
22
+ * bucket.
23
+ *
24
+ * Family fallback: when `message.model` doesn't match an exact key, we
25
+ * match by family prefix (`claude-opus-`, `claude-sonnet-`, `claude-haiku-`)
26
+ * to a representative Claude 4.x rate. Anything unrecognized returns
27
+ * `null` and contributes 0 cost — better to undercount than to invent
28
+ * pricing for an unknown family.
29
+ */
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ exports.OPUS_4_6_FAST_PRICING = exports.PRICING = exports.BYTES_PER_TOKEN = void 0;
32
+ exports.lookupPricing = lookupPricing;
33
+ exports.lookupPricingForUsage = lookupPricingForUsage;
34
+ exports.computeMessageCostUsd = computeMessageCostUsd;
35
+ /**
36
+ * Heuristic conversion factor for estimating tokens from byte length when
37
+ * we don't have an authoritative `usage` field to read from. Used by the
38
+ * per-tool input-side attribution: a tool_result.content is part of the
39
+ * NEXT assistant message's `input_tokens`, but we can't easily compute
40
+ * "how many of those input_tokens are this tool's contribution" without
41
+ * tokenizing. Instead we estimate `bytes / BYTES_PER_TOKEN`.
42
+ *
43
+ * Anthropic's BPE tokenizer averages ~3.5–4.5 bytes/token for typical
44
+ * tool_result content (mix of code, JSON, English). 4 is a defensible
45
+ * middle. Tune if production data shows systematic over/under-attribution.
46
+ */
47
+ exports.BYTES_PER_TOKEN = 4;
48
+ /**
49
+ * Exact-id pricing keys. Family fallback handles unknown model ids.
50
+ *
51
+ * USD per 1M tokens. cache_read = prompt cache hit; cache_creation = 5-minute
52
+ * cache write (the default ephemeral tier on the API). 1-hour cache write is a
53
+ * separate (more expensive) tier — not modelled here since usage._tokens fields
54
+ * don't currently distinguish 5m vs 1h breakpoints in transcript JSONL.
55
+ *
56
+ * Source: https://platform.claude.com/docs/en/about-claude/pricing
57
+ *
58
+ * Opus 4.5+ note: Anthropic dropped Opus list price to ~1/3 of the Opus 4 / 4.1
59
+ * tier starting with 4.5 ($5 input / $25 output vs old $15 / $75). Opus 4 and 4.1
60
+ * retain the legacy higher pricing. Family fallback returns the NEWER (cheaper)
61
+ * pricing for unknown opus-X versions on the assumption that future Opus releases
62
+ * stay on the new tier.
63
+ */
64
+ exports.PRICING = {
65
+ // Claude 4.x — Opus (4.5+ on the new lower price tier)
66
+ // 5m / 1h / cache_read columns from https://platform.claude.com/docs/en/about-claude/pricing
67
+ "claude-opus-4-7": { input: 5, output: 25, cache_read: 0.5, cache_creation: 6.25, cache_creation_1h: 10, web_search: 0.01 },
68
+ "claude-opus-4-6": { input: 5, output: 25, cache_read: 0.5, cache_creation: 6.25, cache_creation_1h: 10, web_search: 0.01 },
69
+ "claude-opus-4-5": { input: 5, output: 25, cache_read: 0.5, cache_creation: 6.25, cache_creation_1h: 10, web_search: 0.01 },
70
+ // Opus 4.1 / 4 retain legacy pricing
71
+ "claude-opus-4-1": { input: 15, output: 75, cache_read: 1.5, cache_creation: 18.75, cache_creation_1h: 30, web_search: 0.01 },
72
+ "claude-opus-4": { input: 15, output: 75, cache_read: 1.5, cache_creation: 18.75, cache_creation_1h: 30, web_search: 0.01 },
73
+ // Claude 4.x — Sonnet
74
+ "claude-sonnet-4-6": { input: 3, output: 15, cache_read: 0.3, cache_creation: 3.75, cache_creation_1h: 6, web_search: 0.01 },
75
+ "claude-sonnet-4-5": { input: 3, output: 15, cache_read: 0.3, cache_creation: 3.75, cache_creation_1h: 6, web_search: 0.01 },
76
+ "claude-sonnet-4": { input: 3, output: 15, cache_read: 0.3, cache_creation: 3.75, cache_creation_1h: 6, web_search: 0.01 },
77
+ // Claude 4.x — Haiku
78
+ "claude-haiku-4-5": { input: 1, output: 5, cache_read: 0.1, cache_creation: 1.25, cache_creation_1h: 2, web_search: 0.01 },
79
+ "claude-haiku-4": { input: 1, output: 5, cache_read: 0.1, cache_creation: 1.25, cache_creation_1h: 2, web_search: 0.01 },
80
+ };
81
+ /**
82
+ * Opus 4.6 fast-mode pricing tier — 6× the regular Opus 4.5+ rate.
83
+ * Active when `usage.speed === "fast"` on an Opus 4.6 message. Looked up
84
+ * via {@link lookupPricingForUsage} which checks the speed field; the
85
+ * regular {@link PRICING} entry is used otherwise.
86
+ *
87
+ * Source: Claude Code's `getOpus46CostTier` (modelCost.ts), uses a single
88
+ * COST_TIER_30_150 constant — no separate 1h tier in fast mode.
89
+ */
90
+ exports.OPUS_4_6_FAST_PRICING = {
91
+ input: 30,
92
+ output: 150,
93
+ cache_read: 3,
94
+ cache_creation: 37.5,
95
+ cache_creation_1h: 60, // 6× regular 1h rate; absent from Claude Code which conflates 5m/1h
96
+ web_search: 0.01,
97
+ };
98
+ /** Resolve pricing for a model id, with family-prefix fallback. */
99
+ function lookupPricing(model) {
100
+ const exact = exports.PRICING[model];
101
+ if (exact !== undefined) {
102
+ return exact;
103
+ }
104
+ if (model.startsWith("claude-opus-")) {
105
+ return exports.PRICING["claude-opus-4-7"];
106
+ }
107
+ if (model.startsWith("claude-sonnet-")) {
108
+ return exports.PRICING["claude-sonnet-4-6"];
109
+ }
110
+ if (model.startsWith("claude-haiku-")) {
111
+ return exports.PRICING["claude-haiku-4-5"];
112
+ }
113
+ return null;
114
+ }
115
+ /**
116
+ * Resolve pricing for an assistant message, accounting for fast-mode tier
117
+ * upgrades. Currently only Opus 4.6 has a fast-mode tier (6× regular rates);
118
+ * any other model with `speed === "fast"` falls through to its regular tier.
119
+ *
120
+ * Mirrors Claude Code's `getOpus46CostTier`. Returns the regular tier when
121
+ * `speed` is undefined or anything other than "fast".
122
+ */
123
+ function lookupPricingForUsage(model, speed) {
124
+ if (speed === "fast" && model.includes("opus-4-6")) {
125
+ return exports.OPUS_4_6_FAST_PRICING;
126
+ }
127
+ return lookupPricing(model);
128
+ }
129
+ /**
130
+ * Compute USD cost of a single assistant-message worth of tokens given
131
+ * a pricing entry. Returns 0 when pricing is null (unknown model).
132
+ *
133
+ * Math: (tokens × $/MTok) / 1_000_000 + (web_search_requests × $/req) → USD.
134
+ *
135
+ * **5m/1h cache_creation tier handling — DISABLED for Claude Code parity.**
136
+ *
137
+ * Anthropic's published pricing distinguishes a 5-minute ephemeral cache
138
+ * write tier (e.g. $6.25/MTok for Opus 4.7) from a 1-hour tier (e.g. $10).
139
+ * Real transcripts often carry 100% 1h cache writes (long agent loops),
140
+ * which means the 5m-only formula UNDERESTIMATES the published-rate cost.
141
+ *
142
+ * However, **Claude Code's own `/cost` command uses a single rate** via
143
+ * `tokensToUSDCost` in modelCost.ts (it reads `usage.cache_creation_input_tokens`
144
+ * as a flat sum and bills at `promptCacheWriteTokens` = 5m rate). To stay
145
+ * sync with `/cost` output that users see in the terminal, we mirror this
146
+ * 5m-only behaviour here.
147
+ *
148
+ * The 5m/1h split infrastructure is intact (`cache_creation_5m_tokens`,
149
+ * `cache_creation_1h_tokens`, `pricing.cache_creation_1h`, the projection
150
+ * walks `usage.cache_creation.ephemeral_*_input_tokens`) — when Claude Code
151
+ * adopts per-tier billing OR we explicitly want to diverge from `/cost`,
152
+ * un-comment the split branch below to enable.
153
+ */
154
+ function computeMessageCostUsd(usage, pricing) {
155
+ if (pricing === null) {
156
+ return 0;
157
+ }
158
+ // ── PER-TIER BILLING (currently DISABLED — Claude Code parity) ──────
159
+ // Re-enable by replacing the single-rate `ccCost` line below with this block:
160
+ //
161
+ // let ccCost: number;
162
+ // if (usage.cache_creation_5m_tokens !== undefined || usage.cache_creation_1h_tokens !== undefined) {
163
+ // const t5m: number = usage.cache_creation_5m_tokens ?? 0;
164
+ // const t1h: number = usage.cache_creation_1h_tokens ?? 0;
165
+ // const rate1h: number = pricing.cache_creation_1h ?? pricing.cache_creation;
166
+ // ccCost = t5m * pricing.cache_creation + t1h * rate1h;
167
+ // } else {
168
+ // ccCost = usage.cache_creation_tokens * pricing.cache_creation;
169
+ // }
170
+ const ccCost = usage.cache_creation_tokens * pricing.cache_creation;
171
+ const wsReqs = usage.web_search_requests ?? 0;
172
+ const wsRate = pricing.web_search ?? 0;
173
+ return (usage.input_tokens * pricing.input
174
+ + usage.output_tokens * pricing.output
175
+ + ccCost
176
+ + usage.cache_read_tokens * pricing.cache_read) / 1000000
177
+ + wsReqs * wsRate;
178
+ }
179
+ //# sourceMappingURL=pricing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/analytics/pricing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAiGH,sCAeC;AAUD,sDAKC;AA8CD,sDA2BC;AAtMD;;;;;;;;;;;GAWG;AACU,QAAA,eAAe,GAAW,CAAC,CAAC;AA4BzC;;;;;;;;;;;;;;;GAeG;AACU,QAAA,OAAO,GAAiC;IACjD,uDAAuD;IACvD,6FAA6F;IAC7F,iBAAiB,EAAG,EAAE,KAAK,EAAE,CAAC,EAAG,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;IAC7H,iBAAiB,EAAG,EAAE,KAAK,EAAE,CAAC,EAAG,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG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