claude-code-best 1.3.7 → 1.4.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 (270) hide show
  1. package/README.md +1 -0
  2. package/dist/{chunk-xtaw765g.js → chunk-00b2znqm.js} +2 -2
  3. package/dist/{chunk-vam5at9t.js → chunk-0ctfznp2.js} +83 -82
  4. package/dist/{chunk-db82mfh9.js → chunk-0kp39at8.js} +38 -38
  5. package/dist/{chunk-427mfnyx.js → chunk-0n0r9fwa.js} +1 -1
  6. package/dist/{chunk-86tz7yxt.js → chunk-0qe6jzfm.js} +26 -26
  7. package/dist/{chunk-z66q1nam.js → chunk-0rbezx7s.js} +26 -26
  8. package/dist/{chunk-6ex0f5ej.js → chunk-0w8eb8gt.js} +2 -2
  9. package/dist/{chunk-d267stxj.js → chunk-0z0m6mm5.js} +1 -1
  10. package/dist/{chunk-mfzgqp0c.js → chunk-157v5wtn.js} +2 -2
  11. package/dist/{chunk-ps5rsyxe.js → chunk-1e8f0nx0.js} +26 -26
  12. package/dist/{chunk-xcq3rdb0.js → chunk-1j332jvg.js} +10 -10
  13. package/dist/{chunk-9jg130e9.js → chunk-1neq14g8.js} +26 -26
  14. package/dist/{chunk-qwa5erw8.js → chunk-1zjrec16.js} +5 -5
  15. package/dist/{chunk-tvnrwrg3.js → chunk-21pvq2fw.js} +29 -29
  16. package/dist/{chunk-9tc901nb.js → chunk-25yy8wx5.js} +4 -4
  17. package/dist/{chunk-yp2yx0qj.js → chunk-29p0hjfs.js} +2 -2
  18. package/dist/{chunk-mcbqmbp2.js → chunk-29yjrfeq.js} +1 -1
  19. package/dist/{chunk-2h06sph0.js → chunk-2apay7a3.js} +29 -29
  20. package/dist/{chunk-9k2c5sxb.js → chunk-2c4003f8.js} +26 -26
  21. package/dist/{chunk-h7ffkxg4.js → chunk-2eb66dha.js} +6 -6
  22. package/dist/{chunk-8q4yg5pk.js → chunk-2j4wdmkt.js} +1 -1
  23. package/dist/{chunk-r6gyed9y.js → chunk-2mbctja8.js} +5 -5
  24. package/dist/{chunk-zc1s4swn.js → chunk-2smwf3e9.js} +2 -2
  25. package/dist/{chunk-k303kw9v.js → chunk-2x5az5dc.js} +27 -27
  26. package/dist/{chunk-76hrbqgr.js → chunk-34vnwd0v.js} +8 -8
  27. package/dist/{chunk-ga2vcmhy.js → chunk-386z9vh4.js} +28 -28
  28. package/dist/{chunk-14mkqwft.js → chunk-3ah2pq1f.js} +32 -32
  29. package/dist/{chunk-c8rgc3hw.js → chunk-3c0rxf7q.js} +31 -31
  30. package/dist/{chunk-e8zmtbry.js → chunk-3ef0cpf6.js} +27 -27
  31. package/dist/{chunk-mh8752jz.js → chunk-3fjgkntc.js} +1 -1
  32. package/dist/{chunk-qvywetwr.js → chunk-3gtk4mh3.js} +31 -31
  33. package/dist/{chunk-4ayhftnk.js → chunk-3gww1j1y.js} +32 -28
  34. package/dist/{chunk-zhe3rws3.js → chunk-3wjy1cpr.js} +4 -4
  35. package/dist/{chunk-w65283w4.js → chunk-4169yf5x.js} +2 -2
  36. package/dist/{chunk-h6dqpbac.js → chunk-43b84za2.js} +1 -1
  37. package/dist/{chunk-zmpygkz6.js → chunk-4581z0wr.js} +8 -8
  38. package/dist/{chunk-kcp8svja.js → chunk-45bbgebk.js} +4 -4
  39. package/dist/{chunk-xfft38wf.js → chunk-4drmj637.js} +5 -5
  40. package/dist/{chunk-2crz81z3.js → chunk-4f4jqsza.js} +1 -1
  41. package/dist/{chunk-fx6ghdvg.js → chunk-4f5xrg8h.js} +26 -26
  42. package/dist/{chunk-cdgv0k77.js → chunk-4gpt5ay1.js} +27 -27
  43. package/dist/{chunk-tw2wjsnb.js → chunk-4krsdy3p.js} +2 -2
  44. package/dist/{chunk-qhbchv06.js → chunk-4m47hfh0.js} +26 -26
  45. package/dist/{chunk-qahkzpj6.js → chunk-4nf1ec4f.js} +1 -1
  46. package/dist/{chunk-g5rf37hh.js → chunk-4vj2d7dz.js} +33 -33
  47. package/dist/{chunk-px27vhxx.js → chunk-4vjvqns0.js} +3 -3
  48. package/dist/{chunk-qmckdcc4.js → chunk-50xwa16q.js} +27 -27
  49. package/dist/{chunk-drsh1vv8.js → chunk-53sfy7n4.js} +26 -26
  50. package/dist/{chunk-24qcj0k5.js → chunk-53vj9v9s.js} +6 -6
  51. package/dist/{chunk-ftajx4gw.js → chunk-5526qw2k.js} +1 -1
  52. package/dist/{chunk-t0b0bas5.js → chunk-5840qkdv.js} +1 -1
  53. package/dist/{chunk-tm4w23dp.js → chunk-5hjsrynt.js} +1 -1
  54. package/dist/{chunk-gfk81w5r.js → chunk-5km8j211.js} +1 -1
  55. package/dist/{chunk-qkrenskm.js → chunk-5wzcv9gh.js} +5 -5
  56. package/dist/{chunk-18mm4jf8.js → chunk-5xjn56aq.js} +3 -3
  57. package/dist/{chunk-g71q1n7x.js → chunk-5yd55bg7.js} +26 -26
  58. package/dist/{chunk-fye86v7m.js → chunk-607fe07t.js} +26 -26
  59. package/dist/{chunk-g2tmm7k7.js → chunk-688ah6p4.js} +40 -40
  60. package/dist/{chunk-3c81vb6k.js → chunk-6ad36q0w.js} +3 -3
  61. package/dist/{chunk-zh6xf1fd.js → chunk-6b45etp0.js} +2 -2
  62. package/dist/{chunk-bhvmpf9m.js → chunk-6cqap182.js} +30 -30
  63. package/dist/{chunk-s2cwz71x.js → chunk-6k1w8x4k.js} +27 -27
  64. package/dist/{chunk-y3rg86fk.js → chunk-6sqsx9jy.js} +5 -5
  65. package/dist/{chunk-451hjtv9.js → chunk-6wpr3tjc.js} +26 -26
  66. package/dist/{chunk-5h17d17z.js → chunk-6yahjmr9.js} +1 -1
  67. package/dist/{chunk-t38536jf.js → chunk-75fdprgp.js} +1 -1
  68. package/dist/{chunk-h0s737p0.js → chunk-7750n93j.js} +1 -1
  69. package/dist/{chunk-s13m8efn.js → chunk-77dn0tk8.js} +1 -1
  70. package/dist/{chunk-v7xwthvg.js → chunk-79wycw4g.js} +68 -66
  71. package/dist/{chunk-145d3809.js → chunk-7cfbwd7q.js} +27 -27
  72. package/dist/{chunk-fskf0b3x.js → chunk-7hftfbxa.js} +2 -2
  73. package/dist/{chunk-n35gnb9g.js → chunk-7hmy36fh.js} +121 -2
  74. package/dist/{chunk-vmpcmvqq.js → chunk-7p1esgzf.js} +1 -1
  75. package/dist/{chunk-qn4cbm38.js → chunk-7w2h14a6.js} +5 -5
  76. package/dist/{chunk-2z6bv21c.js → chunk-86epd45z.js} +11 -11
  77. package/dist/{chunk-62dx37pf.js → chunk-8833n19q.js} +1 -1
  78. package/dist/{chunk-gpk30ekc.js → chunk-8cn35yvf.js} +4 -4
  79. package/dist/{chunk-zahg0adp.js → chunk-8favkbxx.js} +2 -2
  80. package/dist/{chunk-q890kpff.js → chunk-8fwh1vg6.js} +5 -5
  81. package/dist/{chunk-m83vaktc.js → chunk-8j0cag62.js} +1 -1
  82. package/dist/{chunk-wkx2xsed.js → chunk-8n7czf03.js} +27 -27
  83. package/dist/{chunk-ky85ntn8.js → chunk-90vttb3v.js} +36 -36
  84. package/dist/{chunk-e6nenv5n.js → chunk-9fsvmcz5.js} +29 -29
  85. package/dist/{chunk-p2sww3pd.js → chunk-9gpr8jae.js} +27 -27
  86. package/dist/{chunk-dne2ghq6.js → chunk-9je35yst.js} +3 -3
  87. package/dist/{chunk-2c4jgf3n.js → chunk-9qbwahdr.js} +3 -3
  88. package/dist/{chunk-8y1zs48n.js → chunk-9tgts6mc.js} +1 -1
  89. package/dist/{chunk-pvtzf6vs.js → chunk-a27gcyws.js} +2 -2
  90. package/dist/{chunk-c4x4fb6d.js → chunk-a5b9swcd.js} +26 -26
  91. package/dist/{chunk-3j857x3k.js → chunk-adjan1zm.js} +26 -26
  92. package/dist/{chunk-7gxyarah.js → chunk-agabmbjf.js} +29 -29
  93. package/dist/{chunk-xwhmcc3g.js → chunk-ajs8dza3.js} +26 -26
  94. package/dist/{chunk-sn3wbs2w.js → chunk-akkp39da.js} +26 -26
  95. package/dist/{chunk-nwgkkhk7.js → chunk-amyrs3hm.js} +2 -2
  96. package/dist/{chunk-f6wypwa6.js → chunk-ap1ykep6.js} +1 -1
  97. package/dist/{chunk-bzps3qec.js → chunk-azksrewr.js} +32 -32
  98. package/dist/{chunk-xvjdbsfa.js → chunk-b0x349dj.js} +27 -27
  99. package/dist/{chunk-ag3hbrat.js → chunk-b2vzxkee.js} +5 -5
  100. package/dist/{chunk-zy4fsy90.js → chunk-beq5rrj7.js} +5 -5
  101. package/dist/{chunk-gwah3f17.js → chunk-bv1k9d6v.js} +26 -26
  102. package/dist/{chunk-hbf3y5tw.js → chunk-bx6g17ek.js} +4 -4
  103. package/dist/{chunk-vm0b9vaz.js → chunk-c1jzx2gv.js} +4 -4
  104. package/dist/{chunk-z2aps7d9.js → chunk-c4y7537k.js} +2 -2
  105. package/dist/{chunk-cpvn0j86.js → chunk-ccb92crb.js} +4 -4
  106. package/dist/{chunk-3nwsgn73.js → chunk-cd6mvmte.js} +27 -27
  107. package/dist/{chunk-5k4kh5n9.js → chunk-cdqf4qst.js} +26 -26
  108. package/dist/{chunk-h5dk6k0g.js → chunk-cj8t81dc.js} +26 -26
  109. package/dist/{chunk-7etmzq13.js → chunk-cnggqnzm.js} +6 -6
  110. package/dist/{chunk-9p95042q.js → chunk-cqndxy46.js} +1 -1
  111. package/dist/chunk-cr6s4vp6.js +1396 -0
  112. package/dist/{chunk-rshk7m9c.js → chunk-crvsdcfv.js} +26 -26
  113. package/dist/{chunk-540608wh.js → chunk-cyjjqcs3.js} +27 -27
  114. package/dist/{chunk-fsex4yt2.js → chunk-cyxsqapw.js} +3 -3
  115. package/dist/{chunk-5ccpwbk7.js → chunk-d3paf9v2.js} +26 -26
  116. package/dist/{chunk-m2cskgz4.js → chunk-d6ecf8f1.js} +35 -35
  117. package/dist/{chunk-ermvk1xn.js → chunk-d92pjy0h.js} +29 -29
  118. package/dist/{chunk-dvf5921w.js → chunk-deatxv64.js} +8 -8
  119. package/dist/{chunk-v081mpyx.js → chunk-djp9rrcq.js} +17 -17
  120. package/dist/{chunk-e1t8jh0t.js → chunk-dtv3phgm.js} +26 -26
  121. package/dist/{chunk-1wykga1n.js → chunk-e5mw3cyw.js} +1 -1
  122. package/dist/{chunk-ar8awa36.js → chunk-e6rrn2tj.js} +26 -26
  123. package/dist/{chunk-n42nvr59.js → chunk-ebzv9705.js} +2 -2
  124. package/dist/{chunk-kmzv85ze.js → chunk-edz2xqmx.js} +35 -35
  125. package/dist/{chunk-4stgesb0.js → chunk-egwqdd9k.js} +13 -13
  126. package/dist/{chunk-w6rh4zpx.js → chunk-enzrrdn4.js} +1 -1
  127. package/dist/{chunk-y95se10r.js → chunk-erjs2wr4.js} +4 -4
  128. package/dist/{chunk-ms9225af.js → chunk-etg0he8j.js} +26 -26
  129. package/dist/{chunk-n2gc23dm.js → chunk-evww0yyb.js} +2 -2
  130. package/dist/{chunk-1ez8vf1y.js → chunk-ew9re4pd.js} +3 -3
  131. package/dist/{chunk-wp9nwczx.js → chunk-ewb2cm8z.js} +2 -2
  132. package/dist/{chunk-b4btw5kv.js → chunk-fbs21kq9.js} +1 -1
  133. package/dist/{chunk-ydraa9ey.js → chunk-fezbtqkp.js} +35 -35
  134. package/dist/{chunk-s1p2w5a5.js → chunk-fjh0vhqw.js} +3 -3
  135. package/dist/{chunk-dchgtage.js → chunk-fsqp1hdd.js} +2 -2
  136. package/dist/{chunk-2fx2x8qp.js → chunk-fsrg55vw.js} +4 -4
  137. package/dist/{chunk-4ydmya8m.js → chunk-g3t3tpmr.js} +5 -5
  138. package/dist/{chunk-7z0078sp.js → chunk-g5w87dmr.js} +1 -1
  139. package/dist/{chunk-ez958w7j.js → chunk-g9t81ym4.js} +27 -27
  140. package/dist/{chunk-379rspd7.js → chunk-gc91es60.js} +26 -26
  141. package/dist/{chunk-gz4r3k7a.js → chunk-gfc6zk7q.js} +3 -3
  142. package/dist/{chunk-symd8dvh.js → chunk-gra7rch0.js} +35 -35
  143. package/dist/{chunk-66j7fn6z.js → chunk-gyzh9997.js} +26 -26
  144. package/dist/{chunk-h7bkf3h2.js → chunk-h65cdcmj.js} +8 -8
  145. package/dist/{chunk-5s1bctjb.js → chunk-hcwq2bw3.js} +5 -5
  146. package/dist/{chunk-9f01qpne.js → chunk-hhx05ny2.js} +37 -37
  147. package/dist/{chunk-1av0kkwh.js → chunk-hy2yy9dj.js} +1 -1
  148. package/dist/{chunk-zwrt0s3s.js → chunk-hz4cc1fy.js} +26 -26
  149. package/dist/{chunk-n0rn505k.js → chunk-j5pcp6j1.js} +2 -2
  150. package/dist/{chunk-x42kc5wj.js → chunk-jhbtp60e.js} +4 -4
  151. package/dist/{chunk-kmcaa88h.js → chunk-jjcks6sw.js} +1 -1
  152. package/dist/{chunk-9nddm5c7.js → chunk-jver0cay.js} +1 -1
  153. package/dist/{chunk-m2rx2dtd.js → chunk-jz86pz25.js} +38 -38
  154. package/dist/{chunk-ay9wm3tf.js → chunk-k5kw9hyy.js} +1 -1
  155. package/dist/{chunk-antr836n.js → chunk-k8vb990d.js} +26 -26
  156. package/dist/{chunk-m95fj0wm.js → chunk-kyvg0zcc.js} +2 -2
  157. package/dist/{chunk-r325sbz7.js → chunk-m007chff.js} +12 -12
  158. package/dist/{chunk-qxv21mcq.js → chunk-m08081ys.js} +27 -27
  159. package/dist/{chunk-wmd0v561.js → chunk-m77e1esy.js} +1 -1
  160. package/dist/{chunk-1vzaw5f6.js → chunk-mcwdvkc5.js} +5 -5
  161. package/dist/{chunk-y10byvag.js → chunk-mdk5vcer.js} +9 -9
  162. package/dist/{chunk-9ejadhq8.js → chunk-mfmqxvy3.js} +28 -28
  163. package/dist/{chunk-c1cm8km0.js → chunk-mg88phh5.js} +26 -26
  164. package/dist/{chunk-vvm5az9j.js → chunk-mh9bbz4s.js} +2 -2
  165. package/dist/{chunk-9gypgvd7.js → chunk-mhd4n6av.js} +1 -1
  166. package/dist/{chunk-4q5a5mjb.js → chunk-mmc59v16.js} +332 -132
  167. package/dist/{chunk-jty4xkhc.js → chunk-mqqg7cf6.js} +3 -3
  168. package/dist/{chunk-0pxmxyxv.js → chunk-mt10f1tp.js} +1 -1
  169. package/dist/{chunk-9b0btjar.js → chunk-mz2rbmwe.js} +29 -29
  170. package/dist/{chunk-n612gr22.js → chunk-n4by7yk8.js} +27 -27
  171. package/dist/{chunk-nbzntnkz.js → chunk-ndgnv15y.js} +27 -27
  172. package/dist/{chunk-rgpxnjx4.js → chunk-ne7y2xb5.js} +3 -3
  173. package/dist/{chunk-j44ngncb.js → chunk-nnbp6hww.js} +2 -2
  174. package/dist/{chunk-d969b8ne.js → chunk-nrgyjw8e.js} +5 -5
  175. package/dist/{chunk-psp1n9vg.js → chunk-ns09xpt7.js} +1 -1
  176. package/dist/{chunk-22rs73mh.js → chunk-ns11b23b.js} +28 -28
  177. package/dist/{chunk-g14ex9z0.js → chunk-nskrydpn.js} +26 -26
  178. package/dist/{chunk-nzchm0f2.js → chunk-nt5vedsr.js} +1 -1
  179. package/dist/{chunk-rhxtttx1.js → chunk-nzrgdzqp.js} +2 -2
  180. package/dist/{chunk-6qexrv9a.js → chunk-p2pgnk1y.js} +26 -26
  181. package/dist/{chunk-ynjbppdn.js → chunk-p78dmmrg.js} +26 -26
  182. package/dist/{chunk-6wrs3ahh.js → chunk-p88crc0s.js} +4 -4
  183. package/dist/{chunk-40ax4h54.js → chunk-p9rdn455.js} +27 -27
  184. package/dist/{chunk-xjd32sva.js → chunk-pc4szfak.js} +5 -5
  185. package/dist/{chunk-64mwy58c.js → chunk-pp11ggs7.js} +1 -1
  186. package/dist/{chunk-bpmw0wp2.js → chunk-ptpynwv2.js} +26 -26
  187. package/dist/{chunk-5r3wgr44.js → chunk-ptxwtjpj.js} +17 -1387
  188. package/dist/{chunk-jg7na104.js → chunk-pzxksam8.js} +26 -26
  189. package/dist/{chunk-1vzb650a.js → chunk-q223vmcc.js} +1 -1
  190. package/dist/{chunk-zajs1j2b.js → chunk-q6d7rjw1.js} +26 -26
  191. package/dist/{chunk-58rg6rn2.js → chunk-q7e35wkk.js} +1 -1
  192. package/dist/{chunk-6xr5mayh.js → chunk-qbmbmhef.js} +26 -26
  193. package/dist/{chunk-zv5yt0g4.js → chunk-qga7he5v.js} +2 -2
  194. package/dist/{chunk-s3aygngf.js → chunk-qkwmefpm.js} +27 -27
  195. package/dist/{chunk-y82s03p7.js → chunk-qpprdv6x.js} +2 -2
  196. package/dist/{chunk-855katq2.js → chunk-qqfr3g23.js} +28 -28
  197. package/dist/{chunk-c2ktjyc0.js → chunk-qxy16bqn.js} +91 -1028
  198. package/dist/{chunk-k5c76pvm.js → chunk-r1gkg1zh.js} +29 -29
  199. package/dist/{chunk-egcx83tp.js → chunk-r4hf85nn.js} +3 -3
  200. package/dist/{chunk-ymtkahxp.js → chunk-r8cbwyz2.js} +35 -35
  201. package/dist/{chunk-kbshq7zc.js → chunk-rck3g0jk.js} +26 -26
  202. package/dist/{chunk-2pdcq92c.js → chunk-rejx7z4t.js} +1 -1
  203. package/dist/{chunk-0ahxmrws.js → chunk-rfnh6gdw.js} +5 -5
  204. package/dist/{chunk-52evx0rm.js → chunk-rywnz223.js} +4 -4
  205. package/dist/{chunk-r7s0jwb1.js → chunk-s0c72pgz.js} +27 -27
  206. package/dist/{chunk-tbma29g4.js → chunk-s4erjnky.js} +26 -26
  207. package/dist/{chunk-tf8gr3bs.js → chunk-s7gt9pbp.js} +27 -27
  208. package/dist/{chunk-c14sp904.js → chunk-s95y1wsx.js} +3 -3
  209. package/dist/{chunk-4yxd0e7k.js → chunk-sfs23jb0.js} +26 -26
  210. package/dist/{chunk-y29pdynp.js → chunk-sjr9vygr.js} +3 -3
  211. package/dist/{chunk-z7svjppe.js → chunk-smskbnfh.js} +4 -4
  212. package/dist/{chunk-p7d5ms03.js → chunk-swjmy1ec.js} +4 -4
  213. package/dist/{chunk-c96k89rp.js → chunk-t5vfbd78.js} +26 -26
  214. package/dist/{chunk-163379k5.js → chunk-t76a178c.js} +26 -26
  215. package/dist/{chunk-h93tjx98.js → chunk-tgav5bz9.js} +84 -83
  216. package/dist/chunk-tr91zear.js +1012 -0
  217. package/dist/{chunk-b6whrv9m.js → chunk-ts2892h4.js} +6 -6
  218. package/dist/{chunk-bkzs71af.js → chunk-txz05nf1.js} +1 -1
  219. package/dist/{chunk-ztrgnar4.js → chunk-v3kfrhgg.js} +1 -1
  220. package/dist/chunk-v47r6dev.js +3799 -0
  221. package/dist/{chunk-vb6w46m9.js → chunk-v7vav1dg.js} +27 -27
  222. package/dist/{chunk-3avnvgnv.js → chunk-v88g6btg.js} +2 -2
  223. package/dist/{chunk-h7mpryyc.js → chunk-v9bnkmpp.js} +27 -27
  224. package/dist/{chunk-8wv29424.js → chunk-vchfbqh0.js} +1 -1
  225. package/dist/{chunk-9v5bwvbm.js → chunk-vcv8kqah.js} +29 -29
  226. package/dist/{chunk-gdb6dvba.js → chunk-vdv5g7q5.js} +27 -27
  227. package/dist/{chunk-awwfrm4f.js → chunk-vjbm6e89.js} +8 -8
  228. package/dist/{chunk-cxf74p1t.js → chunk-vjvstd86.js} +1 -1
  229. package/dist/{chunk-3er4wswe.js → chunk-vmb323h1.js} +113 -113
  230. package/dist/{chunk-r7r3jm3y.js → chunk-vq51wj3f.js} +26 -26
  231. package/dist/{chunk-kz13d2bs.js → chunk-vqrph16d.js} +2 -2
  232. package/dist/{chunk-3s2gjp2n.js → chunk-vvsc8651.js} +34 -34
  233. package/dist/{chunk-wkjjv1jr.js → chunk-w5b8wpff.js} +27 -27
  234. package/dist/{chunk-yevbmk5g.js → chunk-w5f4g9ty.js} +1 -1
  235. package/dist/{chunk-nsxw7en4.js → chunk-w64rnehj.js} +5 -5
  236. package/dist/{chunk-b31v41mz.js → chunk-w74twxev.js} +5 -5
  237. package/dist/{chunk-ry1jb15g.js → chunk-w8hh0w92.js} +26 -26
  238. package/dist/{chunk-kh04yrpx.js → chunk-wh42d494.js} +27 -27
  239. package/dist/{chunk-536fmbtq.js → chunk-wm9c1620.js} +1 -1
  240. package/dist/{chunk-08a6n2pp.js → chunk-x0qzkte0.js} +1 -1
  241. package/dist/{chunk-9nydmbm4.js → chunk-x3p67k4j.js} +1 -1
  242. package/dist/{chunk-eef1npre.js → chunk-x7jtxq14.js} +1 -1
  243. package/dist/{chunk-b4twmt0s.js → chunk-xayw54gs.js} +5 -5
  244. package/dist/{chunk-hgfw7nx2.js → chunk-xe4dvfz2.js} +26 -26
  245. package/dist/{chunk-x639j7py.js → chunk-xjcmfp13.js} +29 -29
  246. package/dist/{chunk-59mg8c5k.js → chunk-xmretc2b.js} +26 -26
  247. package/dist/{chunk-1q82ecz5.js → chunk-xqf27kff.js} +26 -26
  248. package/dist/{chunk-0fpkjw2j.js → chunk-xsevshsa.js} +4 -4
  249. package/dist/{chunk-bnvd1jc1.js → chunk-y0fvv8rp.js} +3 -3
  250. package/dist/{chunk-5cc50ecq.js → chunk-y2x0t2gb.js} +32 -32
  251. package/dist/{chunk-d73t8nhj.js → chunk-y315v6st.js} +12 -12
  252. package/dist/{chunk-0a2qnsbr.js → chunk-y81y5v3d.js} +28 -28
  253. package/dist/{chunk-5scrgrwv.js → chunk-yatby2yh.js} +1 -1
  254. package/dist/{chunk-e03zrq9n.js → chunk-yg0h97bm.js} +26 -26
  255. package/dist/{chunk-667f3w39.js → chunk-ypgs2acw.js} +5 -5
  256. package/dist/{chunk-p1af059d.js → chunk-ysdxmhpv.js} +29 -29
  257. package/dist/{chunk-0h4sw1v3.js → chunk-ytwnb2km.js} +26 -26
  258. package/dist/{chunk-0xq2bfvv.js → chunk-z6gvvfmf.js} +2 -2
  259. package/dist/{chunk-2tcznfv0.js → chunk-z6q66vf8.js} +1 -1
  260. package/dist/{chunk-35xyzbd2.js → chunk-z9f8mvd1.js} +32 -32
  261. package/dist/{chunk-j3ctqpsn.js → chunk-zda436nm.js} +2 -2
  262. package/dist/{chunk-49n22kr8.js → chunk-zddcrj90.js} +26 -26
  263. package/dist/{chunk-c209ascy.js → chunk-zh7z8zmq.js} +3 -3
  264. package/dist/{chunk-9byk2a4b.js → chunk-zhq7vk2g.js} +5 -5
  265. package/dist/{chunk-c9p5eyxf.js → chunk-zjhz0qyc.js} +28 -28
  266. package/dist/{chunk-vqawqpkx.js → chunk-zkv7atzf.js} +37 -37
  267. package/dist/{chunk-wef34bk5.js → chunk-zrrd9egx.js} +27 -27
  268. package/dist/{chunk-9r28w6ye.js → chunk-zttmdag3.js} +1 -1
  269. package/dist/cli.js +14 -8
  270. package/package.json +9 -3
@@ -2,41 +2,36 @@
2
2
  import {
3
3
  HybridTransport,
4
4
  WebSocketTransport
5
- } from "./chunk-egcx83tp.js";
5
+ } from "./chunk-r4hf85nn.js";
6
6
  import {
7
7
  CCRClient,
8
8
  CCRInitError
9
- } from "./chunk-n2gc23dm.js";
9
+ } from "./chunk-evww0yyb.js";
10
10
  import {
11
11
  StructuredIO,
12
- buildSystemInitMessage,
13
- exports_MessageSelector,
14
12
  exports_cronJitterConfig,
15
13
  exports_cronScheduler,
16
14
  extractInboundMessageFields,
17
- init_MessageSelector,
18
15
  init_cronJitterConfig,
19
16
  init_cronScheduler,
20
17
  ndjsonSafeStringify,
21
18
  outputSchema,
22
19
  permissionPromptToolResultToPermissionDecision,
23
- processUserInput,
24
- reconcileMarketplaces,
25
- sdkCompatToolName
26
- } from "./chunk-5r3wgr44.js";
20
+ reconcileMarketplaces
21
+ } from "./chunk-ptxwtjpj.js";
22
+ import {
23
+ detectAndUninstallDelistedPlugins
24
+ } from "./chunk-6ad36q0w.js";
27
25
  import {
28
26
  restoreAgentFromSession,
29
27
  restoreSessionStateFromLog,
30
28
  skillChangeDetector
31
- } from "./chunk-r6gyed9y.js";
32
- import {
33
- detectAndUninstallDelistedPlugins
34
- } from "./chunk-3c81vb6k.js";
29
+ } from "./chunk-2mbctja8.js";
35
30
  import"./chunk-nt837qt9.js";
36
- import"./chunk-dchgtage.js";
31
+ import"./chunk-fsqp1hdd.js";
37
32
  import {
38
33
  externalMetadataToAppState
39
- } from "./chunk-s1p2w5a5.js";
34
+ } from "./chunk-fjh0vhqw.js";
40
35
  import {
41
36
  getSessionState,
42
37
  notifySessionMetadataChanged,
@@ -44,87 +39,82 @@ import {
44
39
  setPermissionModeChangedListener,
45
40
  setSessionMetadataChangedListener,
46
41
  setSessionStateChangedListener
47
- } from "./chunk-2tcznfv0.js";
42
+ } from "./chunk-z6q66vf8.js";
48
43
  import {
49
44
  getPollIntervalConfig
50
- } from "./chunk-tm4w23dp.js";
45
+ } from "./chunk-5hjsrynt.js";
51
46
  import"./chunk-txeekahj.js";
52
47
  import {
53
48
  SSETransport,
54
49
  init_SSETransport
55
- } from "./chunk-6ex0f5ej.js";
50
+ } from "./chunk-0w8eb8gt.js";
51
+ import {
52
+ ask,
53
+ buildSideQuestionFallbackParams
54
+ } from "./chunk-tr91zear.js";
55
+ import"./chunk-cr6s4vp6.js";
56
56
  import {
57
57
  init_toolPool,
58
58
  mergeAndFilterTools
59
- } from "./chunk-y82s03p7.js";
60
- import"./chunk-m83vaktc.js";
59
+ } from "./chunk-qpprdv6x.js";
60
+ import"./chunk-8j0cag62.js";
61
61
  import {
62
62
  init_settingsSync
63
- } from "./chunk-tw2wjsnb.js";
63
+ } from "./chunk-4krsdy3p.js";
64
64
  import {
65
65
  init_refresh,
66
66
  refreshActivePlugins
67
- } from "./chunk-wmd0v561.js";
67
+ } from "./chunk-m77e1esy.js";
68
68
  import {
69
69
  init_mappers,
70
- localCommandOutputToSDKAssistantMessage,
71
70
  toInternalMessages,
72
- toSDKCompactMetadata,
73
71
  toSDKRateLimitInfo
74
- } from "./chunk-yevbmk5g.js";
72
+ } from "./chunk-w5f4g9ty.js";
75
73
  import {
76
74
  generateSessionTitle,
77
75
  init_sessionTitle
78
- } from "./chunk-f6wypwa6.js";
79
- import {
80
- init_systemTheme,
81
- resolveThemeSetting
82
- } from "./chunk-cnsj3vq2.js";
76
+ } from "./chunk-ap1ykep6.js";
77
+ import"./chunk-cnsj3vq2.js";
83
78
  import {
84
79
  init_omit,
85
80
  omit_default
86
- } from "./chunk-n0rn505k.js";
87
- import"./chunk-zhe3rws3.js";
88
- import"./chunk-jty4xkhc.js";
81
+ } from "./chunk-j5pcp6j1.js";
82
+ import"./chunk-3wjy1cpr.js";
83
+ import"./chunk-mqqg7cf6.js";
89
84
  import {
90
85
  ChannelMessageNotificationSchema,
91
86
  findChannelEntry,
92
87
  gateChannelServer,
93
88
  init_channelNotification,
94
89
  wrapChannelMessage
95
- } from "./chunk-kcp8svja.js";
90
+ } from "./chunk-45bbgebk.js";
96
91
  import {
97
92
  init_channelAllowlist,
98
93
  isChannelAllowlisted,
99
94
  isChannelsEnabled
100
- } from "./chunk-kz13d2bs.js";
95
+ } from "./chunk-vqrph16d.js";
101
96
  import {
102
97
  collectContextData,
103
98
  init_context_noninteractive
104
- } from "./chunk-vvm5az9j.js";
99
+ } from "./chunk-mh9bbz4s.js";
105
100
  import"./chunk-q2pkj7sp.js";
106
101
  import {
107
102
  init_sideQuestion,
108
103
  runSideQuestion
109
- } from "./chunk-mcbqmbp2.js";
104
+ } from "./chunk-29yjrfeq.js";
110
105
  import"./chunk-rn0v1hk8.js";
111
106
  import {
112
107
  DEFAULT_OUTPUT_STYLE_NAME,
113
108
  EFFORT_LEVELS,
114
109
  OAuthService,
115
110
  SHELL_TOOL_NAMES,
116
- SYNTHETIC_MESSAGES,
117
- SYNTHETIC_OUTPUT_TOOL_NAME,
118
111
  SandboxManager,
119
- accumulateUsage,
120
112
  applySettingsChange,
121
113
  areMcpConfigsEqual,
122
114
  asSessionId,
123
- asSystemPrompt,
124
115
  assembleToolPool,
125
116
  atomicWriteToZipCache,
126
117
  buildBridgeConnectUrl,
127
- categorizeRetryableAPIError,
128
118
  checkGroveForNonInteractive,
129
119
  cleanupSessionPluginCache,
130
120
  clearCommandsCache,
@@ -133,7 +123,6 @@ import {
133
123
  clearServerCache,
134
124
  commandBelongsToServer,
135
125
  connectToServer,
136
- countToolCalls,
137
126
  createAbortController,
138
127
  createCombinedAbortSignal,
139
128
  createModelSwitchBreadcrumbs,
@@ -149,21 +138,17 @@ import {
149
138
  exports_loadAgentsDir,
150
139
  exports_proactive,
151
140
  exports_prompt1 as exports_prompt,
152
- exports_snipCompact,
153
- exports_snipProjection,
154
141
  extractReadFilesFromMessages,
155
142
  fetchToolsForClient,
156
143
  fileHistoryCanRestore,
157
144
  fileHistoryEnabled,
158
145
  fileHistoryGetDiffStats,
159
- fileHistoryMakeSnapshot,
160
146
  fileHistoryRewind,
161
147
  filterMcpServersByPolicy,
162
148
  filterToolsByDenyRules,
163
149
  filterToolsByServer,
164
150
  finalizePendingAsyncHooks,
165
151
  findUnresolvedToolUse,
166
- flushSessionStorage,
167
152
  formatDescriptionWithSource,
168
153
  fromArray,
169
154
  getAllMcpConfigs,
@@ -179,17 +164,11 @@ import {
179
164
  getPluginZipCachePath,
180
165
  getRemoteSessionUrl,
181
166
  getRunningTasks,
182
- getScratchpadDir,
183
- getSlashCommandToolSkills,
184
- getSystemContext,
185
- getSystemPrompt,
186
- getUserContext,
187
167
  getZipCacheKnownMarketplacesPath,
188
168
  getZipCacheMarketplacesDir,
189
169
  getZipCachePluginsDir,
190
170
  gracefulShutdown,
191
171
  gracefulShutdownSync,
192
- handleOrphanedPermission,
193
172
  hasCommandsInQueue,
194
173
  hasPermissionsToUseTool,
195
174
  headlessProfilerCheckpoint,
@@ -197,7 +176,6 @@ import {
197
176
  hydrateFromCCRv2InternalEvents,
198
177
  hydrateRemoteSession,
199
178
  init_AsyncHookRegistry,
200
- init_Shell,
201
179
  init_SyntheticOutputTool,
202
180
  init_Tool,
203
181
  init_abortController,
@@ -206,26 +184,21 @@ import {
206
184
  init_auth1 as init_auth3,
207
185
  init_bridgeStatusUtil,
208
186
  init_changeDetector,
209
- init_claude,
210
187
  init_claudeAiLimits,
211
188
  init_client,
212
189
  init_combinedAbortSignal,
213
190
  init_commandLifecycle,
214
191
  init_commands1 as init_commands,
215
- init_config as init_config2,
192
+ init_config,
216
193
  init_constants,
217
194
  init_constants1 as init_constants2,
218
- init_context,
219
195
  init_conversationRecovery,
220
196
  init_coordinatorMode,
221
- init_cost_tracker,
222
197
  init_effort,
223
198
  init_elicitationHandler,
224
- init_errors as init_errors2,
225
199
  init_extractMemories,
226
200
  init_fileHistory,
227
201
  init_filesApi,
228
- init_filesystem,
229
202
  init_forkedAgent,
230
203
  init_framework,
231
204
  init_generators,
@@ -233,14 +206,11 @@ import {
233
206
  init_grove,
234
207
  init_headlessProfiler,
235
208
  init_hookEvents,
236
- init_hookHelpers,
237
209
  init_hooks1 as init_hooks,
238
210
  init_ids,
239
- init_last,
240
211
  init_loadAgentsDir,
241
212
  init_logging,
242
213
  init_marketplaceManager,
243
- init_memdir,
244
214
  init_messageQueueManager,
245
215
  init_messages1 as init_messages,
246
216
  init_modelOptions,
@@ -262,8 +232,6 @@ import {
262
232
  init_prompt5 as init_prompt6,
263
233
  init_prompt9 as init_prompt7,
264
234
  init_promptSuggestion,
265
- init_prompts1 as init_prompts,
266
- init_query,
267
235
  init_queryHelpers,
268
236
  init_queryProfiler,
269
237
  init_reject,
@@ -273,10 +241,7 @@ import {
273
241
  init_sessionStart,
274
242
  init_sessionStorage,
275
243
  init_shellToolUtils,
276
- init_snipCompact,
277
- init_snipProjection,
278
244
  init_stopTask,
279
- init_systemPromptType,
280
245
  init_teammateMailbox,
281
246
  init_thinking,
282
247
  init_tools1 as init_tools,
@@ -295,15 +260,11 @@ import {
295
260
  isPluginZipCacheEnabled,
296
261
  isPolicyAllowed,
297
262
  isQualifiedForGrove,
298
- isResultSuccessful,
299
- isScratchpadEnabled,
300
263
  isShutdownApproved,
301
264
  isShuttingDown,
302
- last_default,
303
265
  loadAllPluginsCacheOnly,
304
266
  loadConversationForResume,
305
267
  loadKnownMarketplacesConfigSafe,
306
- loadMemoryPrompt,
307
268
  logHeadlessProfilerTurn,
308
269
  logQueryProfileReport,
309
270
  logSuggestionOutcome,
@@ -312,20 +273,16 @@ import {
312
273
  modelSupportsAdaptiveThinking,
313
274
  modelSupportsEffort,
314
275
  modelSupportsMaxEffort,
315
- normalizeMessage,
316
276
  notifyCommandLifecycle,
317
277
  parseAgentsFromJson,
318
278
  peek,
319
279
  performMCPOAuthFlow,
320
280
  processSessionStartHooks,
321
281
  processSetupHooks,
322
- query,
323
282
  readUnreadMessages,
324
283
  reconnectMcpServerImpl,
325
- recordTranscript,
326
284
  registerHookEventHandler,
327
285
  registerSeedMarketplaces,
328
- registerStructuredOutputEnforcement,
329
286
  reject_default,
330
287
  resetSessionFilePointer,
331
288
  resolveAppliedEffort,
@@ -337,14 +294,12 @@ import {
337
294
  saveAiGeneratedTitle,
338
295
  saveMode,
339
296
  setCommandLifecycleListener,
340
- setCwd,
341
297
  setInternalEventReader,
342
298
  setInternalEventWriter,
343
299
  setMcpServerEnabled,
344
300
  settingsChangeDetector,
345
301
  setupSdkMcpClients,
346
302
  setupVscodeSdkMcp,
347
- shouldEnableThinkingByDefault,
348
303
  startQueryProfile,
349
304
  statusListeners,
350
305
  stopTask,
@@ -354,71 +309,69 @@ import {
354
309
  transitionPermissionMode,
355
310
  tryGenerateSuggestion,
356
311
  uniqBy_default,
357
- updateUsage,
358
312
  validateUuid,
359
313
  waitForRemoteManagedSettingsToLoad
360
- } from "./chunk-4q5a5mjb.js";
314
+ } from "./chunk-mmc59v16.js";
315
+ import"./chunk-qe3qr56q.js";
361
316
  import {
362
317
  EMPTY_USAGE,
363
318
  getSessionIngressAuthToken,
364
319
  init_sessionIngressAuth
365
- } from "./chunk-t38536jf.js";
366
- import"./chunk-08a6n2pp.js";
320
+ } from "./chunk-75fdprgp.js";
321
+ import"./chunk-x0qzkte0.js";
367
322
  import"./chunk-et824jj8.js";
368
- import"./chunk-h6dqpbac.js";
369
- import"./chunk-qe3qr56q.js";
323
+ import"./chunk-43b84za2.js";
370
324
  import"./chunk-var1et7e.js";
371
325
  import {
372
326
  init_pluginIdentifier,
373
327
  parsePluginIdentifier
374
- } from "./chunk-kmcaa88h.js";
328
+ } from "./chunk-jjcks6sw.js";
329
+ import"./chunk-2gzv8nrw.js";
375
330
  import"./chunk-ehtwnxpg.js";
376
- import"./chunk-0xq2bfvv.js";
331
+ import"./chunk-z6gvvfmf.js";
377
332
  import {
378
333
  init_commitAttribution
379
- } from "./chunk-gfk81w5r.js";
334
+ } from "./chunk-5km8j211.js";
380
335
  import"./chunk-2f6hs25r.js";
381
336
  import {
382
337
  init_tasks,
383
338
  init_teamHelpers,
384
339
  removeTeammateFromTeamFile,
385
340
  unassignTeammateTasks
386
- } from "./chunk-62dx37pf.js";
387
- import"./chunk-2gzv8nrw.js";
388
- import"./chunk-cxf74p1t.js";
341
+ } from "./chunk-8833n19q.js";
342
+ import"./chunk-vjvstd86.js";
389
343
  import"./chunk-cgfdkzhb.js";
390
344
  import"./chunk-s9nr589x.js";
391
- import"./chunk-w65283w4.js";
345
+ import"./chunk-4169yf5x.js";
392
346
  import {
393
347
  READ_FILE_STATE_CACHE_SIZE,
394
- cloneFileStateCache,
395
348
  createFileStateCacheWithSizeLimit,
396
349
  init_fileStateCache,
397
350
  mergeFileStateCaches
398
- } from "./chunk-9r28w6ye.js";
399
- import"./chunk-ftajx4gw.js";
351
+ } from "./chunk-zttmdag3.js";
352
+ import"./chunk-5526qw2k.js";
400
353
  import {
401
354
  getBridgeAccessToken,
402
355
  getBridgeBaseUrl,
403
356
  init_bridgeConfig
404
- } from "./chunk-2crz81z3.js";
357
+ } from "./chunk-4f4jqsza.js";
405
358
  import"./chunk-m8v1x99r.js";
406
359
  import"./chunk-t0twk3e5.js";
407
360
  import"./chunk-ps49ymvj.js";
408
361
  import"./chunk-t4kcvmes.js";
409
- import"./chunk-mh8752jz.js";
362
+ import"./chunk-3fjgkntc.js";
410
363
  import"./chunk-5wb5ym2h.js";
411
- import"./chunk-8y1zs48n.js";
364
+ import"./chunk-9tgts6mc.js";
412
365
  import"./chunk-vpp13z80.js";
413
366
  import"./chunk-4jm600zv.js";
414
367
  import"./chunk-2dsqf7sp.js";
415
- import"./chunk-ztrgnar4.js";
368
+ import"./chunk-v3kfrhgg.js";
416
369
  import"./chunk-rkmwx1yz.js";
417
- import"./chunk-9gypgvd7.js";
370
+ import"./chunk-mhd4n6av.js";
418
371
  import"./chunk-ykr5qx9v.js";
419
- import"./chunk-s13m8efn.js";
420
- import"./chunk-nzchm0f2.js";
421
- import"./chunk-5scrgrwv.js";
372
+ import"./chunk-77dn0tk8.js";
373
+ import"./chunk-nt5vedsr.js";
374
+ import"./chunk-yatby2yh.js";
422
375
  import"./chunk-erxndz83.js";
423
376
  import"./chunk-j50zvssc.js";
424
377
  import"./chunk-wcxc5m91.js";
@@ -433,16 +386,13 @@ import {
433
386
  getDefaultMainLoopModel,
434
387
  getFastModeState,
435
388
  getFeatureValue_CACHED_MAY_BE_STALE,
436
- getGlobalConfig,
437
389
  getMainLoopModel,
438
390
  getMcpPrefix,
439
391
  getSettingsWithSources,
440
392
  getSettings_DEPRECATED,
441
- hasAutoMemPathOverride,
442
393
  init_auth,
443
394
  init_awsAuthStatusManager,
444
395
  init_betas1 as init_betas,
445
- init_config1 as init_config,
446
396
  init_fastMode,
447
397
  init_growthbook,
448
398
  init_mcpStringUtils,
@@ -464,7 +414,7 @@ import {
464
414
  modelSupportsAutoMode,
465
415
  parseUserSpecifiedModel,
466
416
  runWithWorkload
467
- } from "./chunk-zmpygkz6.js";
417
+ } from "./chunk-4581z0wr.js";
468
418
  import {
469
419
  init_json,
470
420
  safeParseJSON
@@ -472,7 +422,7 @@ import {
472
422
  import {
473
423
  expandPath,
474
424
  init_path
475
- } from "./chunk-8q4yg5pk.js";
425
+ } from "./chunk-2j4wdmkt.js";
476
426
  import"./chunk-j06y02aw.js";
477
427
  import {
478
428
  hasActiveInProcessTeammates,
@@ -483,12 +433,12 @@ import {
483
433
  uniq,
484
434
  waitForTeammatesToBecomeIdle
485
435
  } from "./chunk-zwarn9h7.js";
486
- import"./chunk-n35gnb9g.js";
436
+ import"./chunk-6kpbgc5w.js";
437
+ import"./chunk-7hmy36fh.js";
487
438
  import {
488
439
  init_lazySchema,
489
440
  lazySchema
490
441
  } from "./chunk-64c1avct.js";
491
- import"./chunk-6kpbgc5w.js";
492
442
  import {
493
443
  init_sleep,
494
444
  sleep
@@ -519,10 +469,7 @@ import"./chunk-v9smspw2.js";
519
469
  import"./chunk-v1kzp02e.js";
520
470
  import"./chunk-prgsmrmy.js";
521
471
  import"./chunk-crmjpsqe.js";
522
- import {
523
- init_strip_ansi,
524
- stripAnsi
525
- } from "./chunk-e4jqbn4d.js";
472
+ import"./chunk-e4jqbn4d.js";
526
473
  import"./chunk-vxnvzfnv.js";
527
474
  import"./chunk-ns3babbs.js";
528
475
  import {
@@ -545,7 +492,6 @@ import {
545
492
  init_cwd
546
493
  } from "./chunk-tv74hgw9.js";
547
494
  import {
548
- LOCAL_COMMAND_STDERR_TAG,
549
495
  LOCAL_COMMAND_STDOUT_TAG,
550
496
  TEAMMATE_MESSAGE_TAG,
551
497
  TICK_TAG,
@@ -587,10 +533,7 @@ import {
587
533
  getFlagSettingsInline,
588
534
  getInitJsonSchema,
589
535
  getMainThreadAgentType,
590
- getModelUsage,
591
536
  getSessionId,
592
- getTotalAPIDuration,
593
- getTotalCostUSD,
594
537
  init_state,
595
538
  isSessionPersistenceDisabled,
596
539
  registerHookCallbacks,
@@ -916,886 +859,6 @@ init_channelAllowlist();
916
859
  init_pluginIdentifier();
917
860
  init_uuid();
918
861
  init_generators();
919
-
920
- // src/QueryEngine.ts
921
- init_last();
922
- init_state();
923
- init_claude();
924
- init_logging();
925
- init_strip_ansi();
926
- init_commands();
927
- init_xml();
928
- init_cost_tracker();
929
- init_memdir();
930
- init_paths();
931
- init_query();
932
- init_errors2();
933
- init_Tool();
934
- init_SyntheticOutputTool();
935
- init_abortController();
936
- init_config();
937
- init_cwd();
938
- init_envUtils();
939
- init_fastMode();
940
- init_fileHistory();
941
- init_fileStateCache();
942
- init_headlessProfiler();
943
- init_hookHelpers();
944
- init_log();
945
- init_messages();
946
- init_model();
947
- init_pluginLoader();
948
- import { randomUUID } from "crypto";
949
-
950
- // src/utils/queryContext.ts
951
- init_prompts();
952
- init_context();
953
- init_abortController();
954
- init_model();
955
- init_systemPromptType();
956
- init_thinking();
957
- async function fetchSystemPromptParts({
958
- tools,
959
- mainLoopModel,
960
- additionalWorkingDirectories,
961
- mcpClients,
962
- customSystemPrompt
963
- }) {
964
- const [defaultSystemPrompt, userContext, systemContext] = await Promise.all([
965
- customSystemPrompt !== undefined ? Promise.resolve([]) : getSystemPrompt(tools, mainLoopModel, additionalWorkingDirectories, mcpClients),
966
- getUserContext(),
967
- customSystemPrompt !== undefined ? Promise.resolve({}) : getSystemContext()
968
- ]);
969
- return { defaultSystemPrompt, userContext, systemContext };
970
- }
971
- async function buildSideQuestionFallbackParams({
972
- tools,
973
- commands,
974
- mcpClients,
975
- messages,
976
- readFileState,
977
- getAppState,
978
- setAppState,
979
- customSystemPrompt,
980
- appendSystemPrompt,
981
- thinkingConfig,
982
- agents
983
- }) {
984
- const mainLoopModel = getMainLoopModel();
985
- const appState = getAppState();
986
- const { defaultSystemPrompt, userContext, systemContext } = await fetchSystemPromptParts({
987
- tools,
988
- mainLoopModel,
989
- additionalWorkingDirectories: Array.from(appState.toolPermissionContext.additionalWorkingDirectories.keys()),
990
- mcpClients,
991
- customSystemPrompt
992
- });
993
- const systemPrompt = asSystemPrompt([
994
- ...customSystemPrompt !== undefined ? [customSystemPrompt] : defaultSystemPrompt,
995
- ...appendSystemPrompt ? [appendSystemPrompt] : []
996
- ]);
997
- const last = messages.at(-1);
998
- const forkContextMessages = last?.type === "assistant" && last.message.stop_reason === null ? messages.slice(0, -1) : messages;
999
- const toolUseContext = {
1000
- options: {
1001
- commands,
1002
- debug: false,
1003
- mainLoopModel,
1004
- tools,
1005
- verbose: false,
1006
- thinkingConfig: thinkingConfig ?? (shouldEnableThinkingByDefault() !== false ? { type: "adaptive" } : { type: "disabled" }),
1007
- mcpClients,
1008
- mcpResources: {},
1009
- isNonInteractiveSession: true,
1010
- agentDefinitions: { activeAgents: agents, allAgents: [] },
1011
- customSystemPrompt,
1012
- appendSystemPrompt
1013
- },
1014
- abortController: createAbortController(),
1015
- readFileState,
1016
- getAppState,
1017
- setAppState,
1018
- messages: forkContextMessages,
1019
- setInProgressToolUseIDs: () => {},
1020
- setResponseLength: () => {},
1021
- updateFileHistoryState: () => {},
1022
- updateAttributionState: () => {}
1023
- };
1024
- return {
1025
- systemPrompt,
1026
- userContext,
1027
- systemContext,
1028
- toolUseContext,
1029
- forkContextMessages
1030
- };
1031
- }
1032
-
1033
- // src/QueryEngine.ts
1034
- init_Shell();
1035
- init_sessionStorage();
1036
- init_systemPromptType();
1037
- init_systemTheme();
1038
- init_thinking();
1039
- init_mappers();
1040
- init_filesystem();
1041
- init_queryHelpers();
1042
- var messageSelector = () => (init_MessageSelector(), __toCommonJS(exports_MessageSelector));
1043
- var getCoordinatorUserContext = (init_coordinatorMode(), __toCommonJS(exports_coordinatorMode)).getCoordinatorUserContext;
1044
- var snipModule = (init_snipCompact(), __toCommonJS(exports_snipCompact));
1045
- var snipProjection = (init_snipProjection(), __toCommonJS(exports_snipProjection));
1046
-
1047
- class QueryEngine {
1048
- config;
1049
- mutableMessages;
1050
- abortController;
1051
- permissionDenials;
1052
- totalUsage;
1053
- hasHandledOrphanedPermission = false;
1054
- readFileState;
1055
- discoveredSkillNames = new Set;
1056
- loadedNestedMemoryPaths = new Set;
1057
- constructor(config) {
1058
- this.config = config;
1059
- this.mutableMessages = config.initialMessages ?? [];
1060
- this.abortController = config.abortController ?? createAbortController();
1061
- this.permissionDenials = [];
1062
- this.readFileState = config.readFileCache;
1063
- this.totalUsage = EMPTY_USAGE;
1064
- }
1065
- async* submitMessage(prompt, options) {
1066
- const {
1067
- cwd,
1068
- commands,
1069
- tools,
1070
- mcpClients,
1071
- verbose = false,
1072
- thinkingConfig,
1073
- maxTurns,
1074
- maxBudgetUsd,
1075
- taskBudget,
1076
- canUseTool,
1077
- customSystemPrompt,
1078
- appendSystemPrompt,
1079
- userSpecifiedModel,
1080
- fallbackModel,
1081
- jsonSchema,
1082
- getAppState,
1083
- setAppState,
1084
- replayUserMessages = false,
1085
- includePartialMessages = false,
1086
- agents = [],
1087
- setSDKStatus,
1088
- orphanedPermission
1089
- } = this.config;
1090
- this.discoveredSkillNames.clear();
1091
- setCwd(cwd);
1092
- const persistSession = !isSessionPersistenceDisabled();
1093
- const startTime = Date.now();
1094
- const wrappedCanUseTool = async (tool, input, toolUseContext, assistantMessage, toolUseID, forceDecision) => {
1095
- const result2 = await canUseTool(tool, input, toolUseContext, assistantMessage, toolUseID, forceDecision);
1096
- if (result2.behavior !== "allow") {
1097
- this.permissionDenials.push({
1098
- type: "permission_denial",
1099
- tool_name: sdkCompatToolName(tool.name),
1100
- tool_use_id: toolUseID,
1101
- tool_input: input
1102
- });
1103
- }
1104
- return result2;
1105
- };
1106
- const initialAppState = getAppState();
1107
- const initialMainLoopModel = userSpecifiedModel ? parseUserSpecifiedModel(userSpecifiedModel) : getMainLoopModel();
1108
- const initialThinkingConfig = thinkingConfig ? thinkingConfig : shouldEnableThinkingByDefault() !== false ? { type: "adaptive" } : { type: "disabled" };
1109
- headlessProfilerCheckpoint("before_getSystemPrompt");
1110
- const customPrompt = typeof customSystemPrompt === "string" ? customSystemPrompt : undefined;
1111
- const {
1112
- defaultSystemPrompt,
1113
- userContext: baseUserContext,
1114
- systemContext
1115
- } = await fetchSystemPromptParts({
1116
- tools,
1117
- mainLoopModel: initialMainLoopModel,
1118
- additionalWorkingDirectories: Array.from(initialAppState.toolPermissionContext.additionalWorkingDirectories.keys()),
1119
- mcpClients,
1120
- customSystemPrompt: customPrompt
1121
- });
1122
- headlessProfilerCheckpoint("after_getSystemPrompt");
1123
- const userContext = {
1124
- ...baseUserContext,
1125
- ...getCoordinatorUserContext(mcpClients, isScratchpadEnabled() ? getScratchpadDir() : undefined)
1126
- };
1127
- const memoryMechanicsPrompt = customPrompt !== undefined && hasAutoMemPathOverride() ? await loadMemoryPrompt() : null;
1128
- const systemPrompt = asSystemPrompt([
1129
- ...customPrompt !== undefined ? [customPrompt] : defaultSystemPrompt,
1130
- ...memoryMechanicsPrompt ? [memoryMechanicsPrompt] : [],
1131
- ...appendSystemPrompt ? [appendSystemPrompt] : []
1132
- ]);
1133
- const hasStructuredOutputTool = tools.some((t) => toolMatchesName(t, SYNTHETIC_OUTPUT_TOOL_NAME));
1134
- if (jsonSchema && hasStructuredOutputTool) {
1135
- registerStructuredOutputEnforcement(setAppState, getSessionId());
1136
- }
1137
- let processUserInputContext = {
1138
- messages: this.mutableMessages,
1139
- setMessages: (fn) => {
1140
- this.mutableMessages = fn(this.mutableMessages);
1141
- },
1142
- onChangeAPIKey: () => {},
1143
- handleElicitation: this.config.handleElicitation,
1144
- options: {
1145
- commands,
1146
- debug: false,
1147
- tools,
1148
- verbose,
1149
- mainLoopModel: initialMainLoopModel,
1150
- thinkingConfig: initialThinkingConfig,
1151
- mcpClients,
1152
- mcpResources: {},
1153
- ideInstallationStatus: null,
1154
- isNonInteractiveSession: true,
1155
- customSystemPrompt,
1156
- appendSystemPrompt,
1157
- agentDefinitions: { activeAgents: agents, allAgents: [] },
1158
- theme: resolveThemeSetting(getGlobalConfig().theme),
1159
- maxBudgetUsd
1160
- },
1161
- getAppState,
1162
- setAppState,
1163
- abortController: this.abortController,
1164
- readFileState: this.readFileState,
1165
- nestedMemoryAttachmentTriggers: new Set,
1166
- loadedNestedMemoryPaths: this.loadedNestedMemoryPaths,
1167
- dynamicSkillDirTriggers: new Set,
1168
- discoveredSkillNames: this.discoveredSkillNames,
1169
- setInProgressToolUseIDs: () => {},
1170
- setResponseLength: () => {},
1171
- updateFileHistoryState: (updater) => {
1172
- setAppState((prev) => {
1173
- const updated = updater(prev.fileHistory);
1174
- if (updated === prev.fileHistory)
1175
- return prev;
1176
- return { ...prev, fileHistory: updated };
1177
- });
1178
- },
1179
- updateAttributionState: (updater) => {
1180
- setAppState((prev) => {
1181
- const updated = updater(prev.attribution);
1182
- if (updated === prev.attribution)
1183
- return prev;
1184
- return { ...prev, attribution: updated };
1185
- });
1186
- },
1187
- setSDKStatus
1188
- };
1189
- if (orphanedPermission && !this.hasHandledOrphanedPermission) {
1190
- this.hasHandledOrphanedPermission = true;
1191
- for await (const message of handleOrphanedPermission(orphanedPermission, tools, this.mutableMessages, processUserInputContext)) {
1192
- yield message;
1193
- }
1194
- }
1195
- const {
1196
- messages: messagesFromUserInput,
1197
- shouldQuery,
1198
- allowedTools,
1199
- model: modelFromUserInput,
1200
- resultText
1201
- } = await processUserInput({
1202
- input: prompt,
1203
- mode: "prompt",
1204
- setToolJSX: () => {},
1205
- context: {
1206
- ...processUserInputContext,
1207
- messages: this.mutableMessages
1208
- },
1209
- messages: this.mutableMessages,
1210
- uuid: options?.uuid,
1211
- isMeta: options?.isMeta,
1212
- querySource: "sdk"
1213
- });
1214
- this.mutableMessages.push(...messagesFromUserInput);
1215
- const messages = [...this.mutableMessages];
1216
- if (persistSession && messagesFromUserInput.length > 0) {
1217
- const transcriptPromise = recordTranscript(messages);
1218
- if (isBareMode()) {} else {
1219
- await transcriptPromise;
1220
- if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
1221
- await flushSessionStorage();
1222
- }
1223
- }
1224
- }
1225
- const replayableMessages = messagesFromUserInput.filter((msg) => msg.type === "user" && !msg.isMeta && !msg.toolUseResult && messageSelector().selectableUserMessagesFilter(msg) || msg.type === "system" && msg.subtype === "compact_boundary");
1226
- const messagesToAck = replayUserMessages ? replayableMessages : [];
1227
- setAppState((prev) => ({
1228
- ...prev,
1229
- toolPermissionContext: {
1230
- ...prev.toolPermissionContext,
1231
- alwaysAllowRules: {
1232
- ...prev.toolPermissionContext.alwaysAllowRules,
1233
- command: allowedTools
1234
- }
1235
- }
1236
- }));
1237
- const mainLoopModel = modelFromUserInput ?? initialMainLoopModel;
1238
- processUserInputContext = {
1239
- messages,
1240
- setMessages: () => {},
1241
- onChangeAPIKey: () => {},
1242
- handleElicitation: this.config.handleElicitation,
1243
- options: {
1244
- commands,
1245
- debug: false,
1246
- tools,
1247
- verbose,
1248
- mainLoopModel,
1249
- thinkingConfig: initialThinkingConfig,
1250
- mcpClients,
1251
- mcpResources: {},
1252
- ideInstallationStatus: null,
1253
- isNonInteractiveSession: true,
1254
- customSystemPrompt,
1255
- appendSystemPrompt,
1256
- theme: resolveThemeSetting(getGlobalConfig().theme),
1257
- agentDefinitions: { activeAgents: agents, allAgents: [] },
1258
- maxBudgetUsd
1259
- },
1260
- getAppState,
1261
- setAppState,
1262
- abortController: this.abortController,
1263
- readFileState: this.readFileState,
1264
- nestedMemoryAttachmentTriggers: new Set,
1265
- loadedNestedMemoryPaths: this.loadedNestedMemoryPaths,
1266
- dynamicSkillDirTriggers: new Set,
1267
- discoveredSkillNames: this.discoveredSkillNames,
1268
- setInProgressToolUseIDs: () => {},
1269
- setResponseLength: () => {},
1270
- updateFileHistoryState: processUserInputContext.updateFileHistoryState,
1271
- updateAttributionState: processUserInputContext.updateAttributionState,
1272
- setSDKStatus
1273
- };
1274
- headlessProfilerCheckpoint("before_skills_plugins");
1275
- const [skills, { enabled: enabledPlugins }] = await Promise.all([
1276
- getSlashCommandToolSkills(getCwd()),
1277
- loadAllPluginsCacheOnly()
1278
- ]);
1279
- headlessProfilerCheckpoint("after_skills_plugins");
1280
- yield buildSystemInitMessage({
1281
- tools,
1282
- mcpClients,
1283
- model: mainLoopModel,
1284
- permissionMode: initialAppState.toolPermissionContext.mode,
1285
- commands,
1286
- agents,
1287
- skills,
1288
- plugins: enabledPlugins,
1289
- fastMode: initialAppState.fastMode
1290
- });
1291
- headlessProfilerCheckpoint("system_message_yielded");
1292
- if (!shouldQuery) {
1293
- for (const msg of messagesFromUserInput) {
1294
- if (msg.type === "user" && typeof msg.message.content === "string" && (msg.message.content.includes(`<${LOCAL_COMMAND_STDOUT_TAG}>`) || msg.message.content.includes(`<${LOCAL_COMMAND_STDERR_TAG}>`) || msg.isCompactSummary)) {
1295
- yield {
1296
- type: "user",
1297
- message: {
1298
- ...msg.message,
1299
- content: stripAnsi(msg.message.content)
1300
- },
1301
- session_id: getSessionId(),
1302
- parent_tool_use_id: null,
1303
- uuid: msg.uuid,
1304
- timestamp: msg.timestamp,
1305
- isReplay: !msg.isCompactSummary,
1306
- isSynthetic: msg.isMeta || msg.isVisibleInTranscriptOnly
1307
- };
1308
- }
1309
- if (msg.type === "system" && msg.subtype === "local_command" && typeof msg.content === "string" && (msg.content.includes(`<${LOCAL_COMMAND_STDOUT_TAG}>`) || msg.content.includes(`<${LOCAL_COMMAND_STDERR_TAG}>`))) {
1310
- yield localCommandOutputToSDKAssistantMessage(msg.content, msg.uuid);
1311
- }
1312
- if (msg.type === "system" && msg.subtype === "compact_boundary") {
1313
- const compactMsg = msg;
1314
- yield {
1315
- type: "system",
1316
- subtype: "compact_boundary",
1317
- session_id: getSessionId(),
1318
- uuid: msg.uuid,
1319
- compact_metadata: toSDKCompactMetadata(compactMsg.compactMetadata)
1320
- };
1321
- }
1322
- }
1323
- if (persistSession) {
1324
- await recordTranscript(messages);
1325
- if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
1326
- await flushSessionStorage();
1327
- }
1328
- }
1329
- yield {
1330
- type: "result",
1331
- subtype: "success",
1332
- is_error: false,
1333
- duration_ms: Date.now() - startTime,
1334
- duration_api_ms: getTotalAPIDuration(),
1335
- num_turns: messages.length - 1,
1336
- result: resultText ?? "",
1337
- stop_reason: null,
1338
- session_id: getSessionId(),
1339
- total_cost_usd: getTotalCostUSD(),
1340
- usage: this.totalUsage,
1341
- modelUsage: getModelUsage(),
1342
- permission_denials: this.permissionDenials,
1343
- fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
1344
- uuid: randomUUID()
1345
- };
1346
- return;
1347
- }
1348
- if (fileHistoryEnabled() && persistSession) {
1349
- messagesFromUserInput.filter(messageSelector().selectableUserMessagesFilter).forEach((message) => {
1350
- fileHistoryMakeSnapshot((updater) => {
1351
- setAppState((prev) => ({
1352
- ...prev,
1353
- fileHistory: updater(prev.fileHistory)
1354
- }));
1355
- }, message.uuid);
1356
- });
1357
- }
1358
- let currentMessageUsage = EMPTY_USAGE;
1359
- let turnCount = 1;
1360
- let hasAcknowledgedInitialMessages = false;
1361
- let structuredOutputFromTool;
1362
- let lastStopReason = null;
1363
- const errorLogWatermark = getInMemoryErrors().at(-1);
1364
- const initialStructuredOutputCalls = jsonSchema ? countToolCalls(this.mutableMessages, SYNTHETIC_OUTPUT_TOOL_NAME) : 0;
1365
- for await (const message of query({
1366
- messages,
1367
- systemPrompt,
1368
- userContext,
1369
- systemContext,
1370
- canUseTool: wrappedCanUseTool,
1371
- toolUseContext: processUserInputContext,
1372
- fallbackModel,
1373
- querySource: "sdk",
1374
- maxTurns,
1375
- taskBudget
1376
- })) {
1377
- if (message.type === "assistant" || message.type === "user" || message.type === "system" && message.subtype === "compact_boundary") {
1378
- if (persistSession && message.type === "system" && message.subtype === "compact_boundary") {
1379
- const compactMsg = message;
1380
- const tailUuid = compactMsg.compactMetadata?.preservedSegment?.tailUuid;
1381
- if (tailUuid) {
1382
- const tailIdx = this.mutableMessages.findLastIndex((m) => m.uuid === tailUuid);
1383
- if (tailIdx !== -1) {
1384
- await recordTranscript(this.mutableMessages.slice(0, tailIdx + 1));
1385
- }
1386
- }
1387
- }
1388
- messages.push(message);
1389
- if (persistSession) {
1390
- if (message.type === "assistant") {
1391
- recordTranscript(messages);
1392
- } else {
1393
- await recordTranscript(messages);
1394
- }
1395
- }
1396
- if (!hasAcknowledgedInitialMessages && messagesToAck.length > 0) {
1397
- hasAcknowledgedInitialMessages = true;
1398
- for (const msgToAck of messagesToAck) {
1399
- if (msgToAck.type === "user") {
1400
- yield {
1401
- type: "user",
1402
- message: msgToAck.message,
1403
- session_id: getSessionId(),
1404
- parent_tool_use_id: null,
1405
- uuid: msgToAck.uuid,
1406
- timestamp: msgToAck.timestamp,
1407
- isReplay: true
1408
- };
1409
- }
1410
- }
1411
- }
1412
- }
1413
- if (message.type === "user") {
1414
- turnCount++;
1415
- }
1416
- switch (message.type) {
1417
- case "tombstone":
1418
- break;
1419
- case "assistant": {
1420
- const msg = message;
1421
- const stopReason = msg.message?.stop_reason;
1422
- if (stopReason != null) {
1423
- lastStopReason = stopReason;
1424
- }
1425
- this.mutableMessages.push(msg);
1426
- yield* normalizeMessage(msg);
1427
- break;
1428
- }
1429
- case "progress": {
1430
- const msg = message;
1431
- this.mutableMessages.push(msg);
1432
- if (persistSession) {
1433
- messages.push(msg);
1434
- recordTranscript(messages);
1435
- }
1436
- yield* normalizeMessage(msg);
1437
- break;
1438
- }
1439
- case "user": {
1440
- const msg = message;
1441
- this.mutableMessages.push(msg);
1442
- yield* normalizeMessage(msg);
1443
- break;
1444
- }
1445
- case "stream_event": {
1446
- const event = message.event;
1447
- if (event.type === "message_start") {
1448
- currentMessageUsage = EMPTY_USAGE;
1449
- const eventMessage = event.message;
1450
- currentMessageUsage = updateUsage(currentMessageUsage, eventMessage.usage);
1451
- }
1452
- if (event.type === "message_delta") {
1453
- currentMessageUsage = updateUsage(currentMessageUsage, event.usage);
1454
- const delta = event.delta;
1455
- if (delta.stop_reason != null) {
1456
- lastStopReason = delta.stop_reason;
1457
- }
1458
- }
1459
- if (event.type === "message_stop") {
1460
- this.totalUsage = accumulateUsage(this.totalUsage, currentMessageUsage);
1461
- }
1462
- if (includePartialMessages) {
1463
- yield {
1464
- type: "stream_event",
1465
- event,
1466
- session_id: getSessionId(),
1467
- parent_tool_use_id: null,
1468
- uuid: randomUUID()
1469
- };
1470
- }
1471
- break;
1472
- }
1473
- case "attachment": {
1474
- const msg = message;
1475
- this.mutableMessages.push(msg);
1476
- if (persistSession) {
1477
- messages.push(msg);
1478
- recordTranscript(messages);
1479
- }
1480
- const attachment = msg.attachment;
1481
- if (attachment.type === "structured_output") {
1482
- structuredOutputFromTool = attachment.data;
1483
- } else if (attachment.type === "max_turns_reached") {
1484
- if (persistSession) {
1485
- if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
1486
- await flushSessionStorage();
1487
- }
1488
- }
1489
- yield {
1490
- type: "result",
1491
- subtype: "error_max_turns",
1492
- duration_ms: Date.now() - startTime,
1493
- duration_api_ms: getTotalAPIDuration(),
1494
- is_error: true,
1495
- num_turns: attachment.turnCount,
1496
- stop_reason: lastStopReason,
1497
- session_id: getSessionId(),
1498
- total_cost_usd: getTotalCostUSD(),
1499
- usage: this.totalUsage,
1500
- modelUsage: getModelUsage(),
1501
- permission_denials: this.permissionDenials,
1502
- fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
1503
- uuid: randomUUID(),
1504
- errors: [
1505
- `Reached maximum number of turns (${attachment.maxTurns})`
1506
- ]
1507
- };
1508
- return;
1509
- } else if (replayUserMessages && attachment.type === "queued_command") {
1510
- yield {
1511
- type: "user",
1512
- message: {
1513
- role: "user",
1514
- content: attachment.prompt
1515
- },
1516
- session_id: getSessionId(),
1517
- parent_tool_use_id: null,
1518
- uuid: attachment.source_uuid || msg.uuid,
1519
- timestamp: msg.timestamp,
1520
- isReplay: true
1521
- };
1522
- }
1523
- break;
1524
- }
1525
- case "stream_request_start":
1526
- break;
1527
- case "system": {
1528
- const msg = message;
1529
- const snipResult = this.config.snipReplay?.(msg, this.mutableMessages);
1530
- if (snipResult !== undefined) {
1531
- if (snipResult.executed) {
1532
- this.mutableMessages.length = 0;
1533
- this.mutableMessages.push(...snipResult.messages);
1534
- }
1535
- break;
1536
- }
1537
- this.mutableMessages.push(msg);
1538
- if (msg.subtype === "compact_boundary" && msg.compactMetadata) {
1539
- const compactMsg = msg;
1540
- const mutableBoundaryIdx = this.mutableMessages.length - 1;
1541
- if (mutableBoundaryIdx > 0) {
1542
- this.mutableMessages.splice(0, mutableBoundaryIdx);
1543
- }
1544
- const localBoundaryIdx = messages.length - 1;
1545
- if (localBoundaryIdx > 0) {
1546
- messages.splice(0, localBoundaryIdx);
1547
- }
1548
- yield {
1549
- type: "system",
1550
- subtype: "compact_boundary",
1551
- session_id: getSessionId(),
1552
- uuid: msg.uuid,
1553
- compact_metadata: toSDKCompactMetadata(compactMsg.compactMetadata)
1554
- };
1555
- }
1556
- if (msg.subtype === "api_error") {
1557
- const apiErrorMsg = msg;
1558
- yield {
1559
- type: "system",
1560
- subtype: "api_retry",
1561
- attempt: apiErrorMsg.retryAttempt,
1562
- max_retries: apiErrorMsg.maxRetries,
1563
- retry_delay_ms: apiErrorMsg.retryInMs,
1564
- error_status: apiErrorMsg.error.status ?? null,
1565
- error: categorizeRetryableAPIError(apiErrorMsg.error),
1566
- session_id: getSessionId(),
1567
- uuid: msg.uuid
1568
- };
1569
- }
1570
- break;
1571
- }
1572
- case "tool_use_summary": {
1573
- const msg = message;
1574
- yield {
1575
- type: "tool_use_summary",
1576
- summary: msg.summary,
1577
- preceding_tool_use_ids: msg.precedingToolUseIds,
1578
- session_id: getSessionId(),
1579
- uuid: msg.uuid
1580
- };
1581
- break;
1582
- }
1583
- }
1584
- if (maxBudgetUsd !== undefined && getTotalCostUSD() >= maxBudgetUsd) {
1585
- if (persistSession) {
1586
- if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
1587
- await flushSessionStorage();
1588
- }
1589
- }
1590
- yield {
1591
- type: "result",
1592
- subtype: "error_max_budget_usd",
1593
- duration_ms: Date.now() - startTime,
1594
- duration_api_ms: getTotalAPIDuration(),
1595
- is_error: true,
1596
- num_turns: turnCount,
1597
- stop_reason: lastStopReason,
1598
- session_id: getSessionId(),
1599
- total_cost_usd: getTotalCostUSD(),
1600
- usage: this.totalUsage,
1601
- modelUsage: getModelUsage(),
1602
- permission_denials: this.permissionDenials,
1603
- fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
1604
- uuid: randomUUID(),
1605
- errors: [`Reached maximum budget ($${maxBudgetUsd})`]
1606
- };
1607
- return;
1608
- }
1609
- if (message.type === "user" && jsonSchema) {
1610
- const currentCalls = countToolCalls(this.mutableMessages, SYNTHETIC_OUTPUT_TOOL_NAME);
1611
- const callsThisQuery = currentCalls - initialStructuredOutputCalls;
1612
- const maxRetries = parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES || "5", 10);
1613
- if (callsThisQuery >= maxRetries) {
1614
- if (persistSession) {
1615
- if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
1616
- await flushSessionStorage();
1617
- }
1618
- }
1619
- yield {
1620
- type: "result",
1621
- subtype: "error_max_structured_output_retries",
1622
- duration_ms: Date.now() - startTime,
1623
- duration_api_ms: getTotalAPIDuration(),
1624
- is_error: true,
1625
- num_turns: turnCount,
1626
- stop_reason: lastStopReason,
1627
- session_id: getSessionId(),
1628
- total_cost_usd: getTotalCostUSD(),
1629
- usage: this.totalUsage,
1630
- modelUsage: getModelUsage(),
1631
- permission_denials: this.permissionDenials,
1632
- fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
1633
- uuid: randomUUID(),
1634
- errors: [
1635
- `Failed to provide valid structured output after ${maxRetries} attempts`
1636
- ]
1637
- };
1638
- return;
1639
- }
1640
- }
1641
- }
1642
- const result = messages.findLast((m) => m.type === "assistant" || m.type === "user");
1643
- const edeResultType = result?.type ?? "undefined";
1644
- const edeLastContentType = result?.type === "assistant" ? last_default(result.message.content)?.type ?? "none" : "n/a";
1645
- if (persistSession) {
1646
- if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
1647
- await flushSessionStorage();
1648
- }
1649
- }
1650
- if (!isResultSuccessful(result, lastStopReason)) {
1651
- yield {
1652
- type: "result",
1653
- subtype: "error_during_execution",
1654
- duration_ms: Date.now() - startTime,
1655
- duration_api_ms: getTotalAPIDuration(),
1656
- is_error: true,
1657
- num_turns: turnCount,
1658
- stop_reason: lastStopReason,
1659
- session_id: getSessionId(),
1660
- total_cost_usd: getTotalCostUSD(),
1661
- usage: this.totalUsage,
1662
- modelUsage: getModelUsage(),
1663
- permission_denials: this.permissionDenials,
1664
- fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
1665
- uuid: randomUUID(),
1666
- errors: (() => {
1667
- const all = getInMemoryErrors();
1668
- const start = errorLogWatermark ? all.lastIndexOf(errorLogWatermark) + 1 : 0;
1669
- return [
1670
- `[ede_diagnostic] result_type=${edeResultType} last_content_type=${edeLastContentType} stop_reason=${lastStopReason}`,
1671
- ...all.slice(start).map((_) => _.error)
1672
- ];
1673
- })()
1674
- };
1675
- return;
1676
- }
1677
- let textResult = "";
1678
- let isApiError = false;
1679
- if (result.type === "assistant") {
1680
- const lastContent = last_default(result.message.content);
1681
- if (lastContent?.type === "text" && !SYNTHETIC_MESSAGES.has(lastContent.text)) {
1682
- textResult = lastContent.text;
1683
- }
1684
- isApiError = Boolean(result.isApiErrorMessage);
1685
- }
1686
- yield {
1687
- type: "result",
1688
- subtype: "success",
1689
- is_error: isApiError,
1690
- duration_ms: Date.now() - startTime,
1691
- duration_api_ms: getTotalAPIDuration(),
1692
- num_turns: turnCount,
1693
- result: textResult,
1694
- stop_reason: lastStopReason,
1695
- session_id: getSessionId(),
1696
- total_cost_usd: getTotalCostUSD(),
1697
- usage: this.totalUsage,
1698
- modelUsage: getModelUsage(),
1699
- permission_denials: this.permissionDenials,
1700
- structured_output: structuredOutputFromTool,
1701
- fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
1702
- uuid: randomUUID()
1703
- };
1704
- }
1705
- interrupt() {
1706
- this.abortController.abort();
1707
- }
1708
- getMessages() {
1709
- return this.mutableMessages;
1710
- }
1711
- getReadFileState() {
1712
- return this.readFileState;
1713
- }
1714
- getSessionId() {
1715
- return getSessionId();
1716
- }
1717
- setModel(model) {
1718
- this.config.userSpecifiedModel = model;
1719
- }
1720
- }
1721
- async function* ask({
1722
- commands,
1723
- prompt,
1724
- promptUuid,
1725
- isMeta,
1726
- cwd,
1727
- tools,
1728
- mcpClients,
1729
- verbose = false,
1730
- thinkingConfig,
1731
- maxTurns,
1732
- maxBudgetUsd,
1733
- taskBudget,
1734
- canUseTool,
1735
- mutableMessages = [],
1736
- getReadFileCache,
1737
- setReadFileCache,
1738
- customSystemPrompt,
1739
- appendSystemPrompt,
1740
- userSpecifiedModel,
1741
- fallbackModel,
1742
- jsonSchema,
1743
- getAppState,
1744
- setAppState,
1745
- abortController,
1746
- replayUserMessages = false,
1747
- includePartialMessages = false,
1748
- handleElicitation,
1749
- agents = [],
1750
- setSDKStatus,
1751
- orphanedPermission
1752
- }) {
1753
- const engine = new QueryEngine({
1754
- cwd,
1755
- tools,
1756
- commands,
1757
- mcpClients,
1758
- agents: agents ?? [],
1759
- canUseTool,
1760
- getAppState,
1761
- setAppState,
1762
- initialMessages: mutableMessages,
1763
- readFileCache: cloneFileStateCache(getReadFileCache()),
1764
- customSystemPrompt,
1765
- appendSystemPrompt,
1766
- userSpecifiedModel,
1767
- fallbackModel,
1768
- thinkingConfig,
1769
- maxTurns,
1770
- maxBudgetUsd,
1771
- taskBudget,
1772
- jsonSchema,
1773
- verbose,
1774
- handleElicitation,
1775
- replayUserMessages,
1776
- includePartialMessages,
1777
- setSDKStatus,
1778
- abortController,
1779
- orphanedPermission,
1780
- ...{
1781
- snipReplay: (yielded, store) => {
1782
- if (!snipProjection.isSnipBoundaryMessage(yielded))
1783
- return;
1784
- return snipModule.snipCompactIfNeeded(store, { force: true });
1785
- }
1786
- }
1787
- });
1788
- try {
1789
- yield* engine.submitMessage(prompt, {
1790
- uuid: promptUuid,
1791
- isMeta
1792
- });
1793
- } finally {
1794
- setReadFileCache(engine.getReadFileState());
1795
- }
1796
- }
1797
-
1798
- // src/cli/print.ts
1799
862
  init_fileStateCache();
1800
863
  init_path();
1801
864
  init_queryHelpers();
@@ -1867,7 +930,7 @@ init_debug();
1867
930
  init_envUtils();
1868
931
  init_lazySchema();
1869
932
  init_bridgeConfig();
1870
- import { randomUUID as randomUUID2 } from "crypto";
933
+ import { randomUUID } from "crypto";
1871
934
  import { mkdir, writeFile } from "fs/promises";
1872
935
  import { basename, join } from "path";
1873
936
  var DOWNLOAD_TIMEOUT_MS = 30000;
@@ -1918,7 +981,7 @@ async function resolveOne(att) {
1918
981
  return;
1919
982
  }
1920
983
  const safeName = sanitizeFileName(att.file_name);
1921
- const prefix = (att.file_uuid.slice(0, 8) || randomUUID2().slice(0, 8)).replace(/[^a-zA-Z0-9_-]/g, "_");
984
+ const prefix = (att.file_uuid.slice(0, 8) || randomUUID().slice(0, 8)).replace(/[^a-zA-Z0-9_-]/g, "_");
1922
985
  const dir = uploadsDir();
1923
986
  const outPath = join(dir, `${prefix}-${safeName}`);
1924
987
  try {
@@ -1994,11 +1057,11 @@ init_SyntheticOutputTool();
1994
1057
 
1995
1058
  // src/utils/sessionUrl.ts
1996
1059
  init_uuid();
1997
- import { randomUUID as randomUUID3 } from "crypto";
1060
+ import { randomUUID as randomUUID2 } from "crypto";
1998
1061
  function parseSessionIdentifier(resumeIdentifier) {
1999
1062
  if (resumeIdentifier.toLowerCase().endsWith(".jsonl")) {
2000
1063
  return {
2001
- sessionId: randomUUID3(),
1064
+ sessionId: randomUUID2(),
2002
1065
  ingressUrl: null,
2003
1066
  isUrl: false,
2004
1067
  jsonlFile: resumeIdentifier,
@@ -2017,7 +1080,7 @@ function parseSessionIdentifier(resumeIdentifier) {
2017
1080
  try {
2018
1081
  const url = new URL(resumeIdentifier);
2019
1082
  return {
2020
- sessionId: randomUUID3(),
1083
+ sessionId: randomUUID2(),
2021
1084
  ingressUrl: url.href,
2022
1085
  isUrl: true,
2023
1086
  jsonlFile: null,
@@ -2031,7 +1094,7 @@ function parseSessionIdentifier(resumeIdentifier) {
2031
1094
  init_sessionStorage();
2032
1095
  init_commitAttribution();
2033
1096
  init_client();
2034
- init_config2();
1097
+ init_config();
2035
1098
  init_auth2();
2036
1099
  init_elicitationHandler();
2037
1100
  init_hooks();
@@ -2039,7 +1102,7 @@ init_types();
2039
1102
  init_mcpStringUtils();
2040
1103
  init_utils();
2041
1104
  init_vscodeSdkMcp();
2042
- init_config2();
1105
+ init_config();
2043
1106
  init_grove();
2044
1107
  init_mappers();
2045
1108
  init_messages();
@@ -2055,7 +1118,7 @@ init_modelStrings();
2055
1118
  init_state();
2056
1119
  init_workloadContext();
2057
1120
  init_fileHistory();
2058
- import { randomUUID as randomUUID4 } from "crypto";
1121
+ import { randomUUID as randomUUID3 } from "crypto";
2059
1122
  init_sandbox_adapter();
2060
1123
  init_headlessProfiler();
2061
1124
  init_queryProfiler();
@@ -2372,7 +1435,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
2372
1435
  hook_id: event.hookId,
2373
1436
  hook_name: event.hookName,
2374
1437
  hook_event: event.hookEvent,
2375
- uuid: randomUUID4(),
1438
+ uuid: randomUUID3(),
2376
1439
  session_id: getSessionId()
2377
1440
  };
2378
1441
  case "progress":
@@ -2385,7 +1448,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
2385
1448
  stdout: event.stdout,
2386
1449
  stderr: event.stderr,
2387
1450
  output: event.output,
2388
- uuid: randomUUID4(),
1451
+ uuid: randomUUID3(),
2389
1452
  session_id: getSessionId()
2390
1453
  };
2391
1454
  case "response":
@@ -2400,7 +1463,7 @@ Error: sandbox required but unavailable: ${sandboxUnavailableReason}
2400
1463
  stderr: event.stderr,
2401
1464
  exit_code: event.exitCode,
2402
1465
  outcome: event.outcome,
2403
- uuid: randomUUID4(),
1466
+ uuid: randomUUID3(),
2404
1467
  session_id: getSessionId()
2405
1468
  };
2406
1469
  }
@@ -2599,7 +1662,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
2599
1662
  subtype: "status",
2600
1663
  status: null,
2601
1664
  permissionMode: newMode,
2602
- uuid: randomUUID4(),
1665
+ uuid: randomUUID3(),
2603
1666
  session_id: getSessionId()
2604
1667
  });
2605
1668
  }
@@ -2620,7 +1683,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
2620
1683
  isAuthenticating: status.isAuthenticating,
2621
1684
  output: status.output,
2622
1685
  error: status.error,
2623
- uuid: randomUUID4(),
1686
+ uuid: randomUUID3(),
2624
1687
  session_id: getSessionId()
2625
1688
  });
2626
1689
  });
@@ -2631,7 +1694,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
2631
1694
  output.enqueue({
2632
1695
  type: "rate_limit_event",
2633
1696
  rate_limit_info: rateLimitInfo,
2634
- uuid: randomUUID4(),
1697
+ uuid: randomUUID3(),
2635
1698
  session_id: getSessionId()
2636
1699
  });
2637
1700
  }
@@ -2647,7 +1710,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
2647
1710
  enqueue({
2648
1711
  mode: "prompt",
2649
1712
  value: turnInterruptionState.message.message.content,
2650
- uuid: randomUUID4()
1713
+ uuid: randomUUID3()
2651
1714
  });
2652
1715
  }
2653
1716
  const modelOptions = getModelOptions();
@@ -2742,7 +1805,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
2742
1805
  subtype: "elicitation_complete",
2743
1806
  mcp_server_name: serverName,
2744
1807
  elicitation_id: elicitationId,
2745
- uuid: randomUUID4(),
1808
+ uuid: randomUUID3(),
2746
1809
  session_id: getSessionId()
2747
1810
  });
2748
1811
  });
@@ -2988,7 +2051,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
2988
2051
  enqueue({
2989
2052
  mode: "prompt",
2990
2053
  value: tickContent,
2991
- uuid: randomUUID4(),
2054
+ uuid: randomUUID3(),
2992
2055
  priority: "later",
2993
2056
  isMeta: true
2994
2057
  });
@@ -3027,7 +2090,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
3027
2090
  }
3028
2091
  pluginInstallPromise = null;
3029
2092
  await refreshPluginState();
3030
- const { setupPluginHookHotReload } = await import("./chunk-ms9225af.js");
2093
+ const { setupPluginHookHotReload } = await import("./chunk-etg0he8j.js");
3031
2094
  setupPluginHookHotReload();
3032
2095
  }
3033
2096
  const isMainThread = (cmd) => cmd.agentId === undefined;
@@ -3112,7 +2175,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
3112
2175
  duration_ms: durationMsMatch ? parseInt(durationMsMatch[1], 10) : 0
3113
2176
  } : undefined,
3114
2177
  session_id: getSessionId(),
3115
- uuid: randomUUID4()
2178
+ uuid: randomUUID3()
3116
2179
  });
3117
2180
  }
3118
2181
  }
@@ -3186,7 +2249,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
3186
2249
  subtype: "status",
3187
2250
  status,
3188
2251
  session_id: getSessionId(),
3189
- uuid: randomUUID4()
2252
+ uuid: randomUUID3()
3190
2253
  });
3191
2254
  }
3192
2255
  })) {
@@ -3234,7 +2297,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
3234
2297
  const suggestionMsg = {
3235
2298
  type: "prompt_suggestion",
3236
2299
  suggestion: result.suggestion,
3237
- uuid: randomUUID4(),
2300
+ uuid: randomUUID3(),
3238
2301
  session_id: getSessionId()
3239
2302
  };
3240
2303
  const lastEmittedEntry = {
@@ -3324,7 +2387,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
3324
2387
  usage: EMPTY_USAGE,
3325
2388
  modelUsage: {},
3326
2389
  permission_denials: [],
3327
- uuid: randomUUID4(),
2390
+ uuid: randomUUID3(),
3328
2391
  errors: [
3329
2392
  errorMessage(error),
3330
2393
  ...getInMemoryErrors().map((_) => _.error)
@@ -3413,7 +2476,7 @@ ${m.text}
3413
2476
  enqueue({
3414
2477
  mode: "prompt",
3415
2478
  value: formatted,
3416
- uuid: randomUUID4()
2479
+ uuid: randomUUID3()
3417
2480
  });
3418
2481
  run();
3419
2482
  return;
@@ -3424,7 +2487,7 @@ ${m.text}
3424
2487
  enqueue({
3425
2488
  mode: "prompt",
3426
2489
  value: SHUTDOWN_TEAM_PROMPT,
3427
- uuid: randomUUID4()
2490
+ uuid: randomUUID3()
3428
2491
  });
3429
2492
  run();
3430
2493
  return;
@@ -3448,7 +2511,7 @@ ${m.text}
3448
2511
  enqueue({
3449
2512
  mode: "prompt",
3450
2513
  value: SHUTDOWN_TEAM_PROMPT,
3451
- uuid: randomUUID4()
2514
+ uuid: randomUUID3()
3452
2515
  });
3453
2516
  run();
3454
2517
  } else {
@@ -3475,7 +2538,7 @@ ${m.text}
3475
2538
  enqueue({
3476
2539
  mode: "prompt",
3477
2540
  value: prompt,
3478
- uuid: randomUUID4(),
2541
+ uuid: randomUUID3(),
3479
2542
  priority: "later",
3480
2543
  isMeta: true,
3481
2544
  workload: WORKLOAD_CRON
@@ -4184,7 +3247,7 @@ ${m.text}
4184
3247
  } else {
4185
3248
  let bridgeFailureDetail;
4186
3249
  try {
4187
- const { initReplBridge } = await import("./chunk-m2rx2dtd.js");
3250
+ const { initReplBridge } = await import("./chunk-jz86pz25.js");
4188
3251
  const handle = await initReplBridge({
4189
3252
  onInboundMessage(msg2) {
4190
3253
  const fields = extractInboundMessageFields(msg2);
@@ -4232,7 +3295,7 @@ ${m.text}
4232
3295
  subtype: "bridge_state",
4233
3296
  state,
4234
3297
  detail,
4235
- uuid: randomUUID4(),
3298
+ uuid: randomUUID3(),
4236
3299
  session_id: getSessionId()
4237
3300
  });
4238
3301
  },
@@ -4542,7 +3605,7 @@ async function handleInitializeRequest(request, requestId, initialized, output,
4542
3605
  isAuthenticating: status.isAuthenticating,
4543
3606
  output: status.output,
4544
3607
  error: status.error,
4545
- uuid: randomUUID4(),
3608
+ uuid: randomUUID3(),
4546
3609
  session_id: getSessionId()
4547
3610
  });
4548
3611
  }
@@ -4730,7 +3793,7 @@ function emitLoadError(message, outputFormat) {
4730
3793
  usage: EMPTY_USAGE,
4731
3794
  modelUsage: {},
4732
3795
  permission_denials: [],
4733
- uuid: randomUUID4(),
3796
+ uuid: randomUUID3(),
4734
3797
  errors: [message]
4735
3798
  };
4736
3799
  process.stdout.write(jsonStringify(errorResult) + `
@@ -4813,7 +3876,7 @@ async function loadInitialMessages(setAppState, options) {
4813
3876
  processMessagesForTeleportResume,
4814
3877
  teleportResumeCodeSession,
4815
3878
  validateGitState
4816
- } = await import("./chunk-z66q1nam.js");
3879
+ } = await import("./chunk-0rbezx7s.js");
4817
3880
  await validateGitState();
4818
3881
  const teleportResult = await teleportResumeCodeSession(options.teleport);
4819
3882
  const { branchError } = await checkOutTeleportedSessionBranch(teleportResult.branch);