@costrict/csc 4.1.0 → 4.1.2

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 (413) hide show
  1. package/dist/{chunk-jj0pqphf.js → chunk-03g34taj.js} +55 -52
  2. package/dist/{chunk-srntgfa4.js → chunk-04h1dzn8.js} +58 -55
  3. package/dist/{chunk-bnqe1rhv.js → chunk-04js9982.js} +14 -14
  4. package/dist/{chunk-a40pqd86.js → chunk-0cm9fcaq.js} +4 -4
  5. package/dist/{chunk-3710m54v.js → chunk-0d8p649e.js} +205 -1297
  6. package/dist/{chunk-q4z98yeq.js → chunk-0ftbdtb6.js} +57909 -57909
  7. package/dist/{chunk-x1xw4k8y.js → chunk-0kv76cch.js} +69 -66
  8. package/dist/{chunk-5fmdr8kf.js → chunk-0q8601fc.js} +56 -53
  9. package/dist/{chunk-99ch3v87.js → chunk-0s2qjxt0.js} +2 -2
  10. package/dist/{chunk-wvexwzsv.js → chunk-0vjhwg78.js} +4 -4
  11. package/dist/{chunk-n20s9kza.js → chunk-0wfby4jk.js} +55 -52
  12. package/dist/{chunk-qsq0dead.js → chunk-0wzfz235.js} +55 -52
  13. package/dist/{chunk-jkkca78b.js → chunk-0z3swktk.js} +58 -55
  14. package/dist/{chunk-b50c6d9d.js → chunk-0zwtzj7s.js} +4 -4
  15. package/dist/{chunk-j4smny6q.js → chunk-12b1dsca.js} +3 -3
  16. package/dist/{chunk-xstgv88m.js → chunk-172aq1cm.js} +3 -3
  17. package/dist/{chunk-4cve1vrz.js → chunk-1928vvnf.js} +16 -16
  18. package/dist/{chunk-18vnrzf5.js → chunk-1gta3pqg.js} +26 -1390
  19. package/dist/{chunk-jkb9g66a.js → chunk-1hr30g9j.js} +56 -53
  20. package/dist/{chunk-qkewrphe.js → chunk-1ta87008.js} +13 -13
  21. package/dist/{chunk-c110nsx0.js → chunk-1tsg5bqp.js} +7 -7
  22. package/dist/{chunk-9ey1xvcm.js → chunk-1xdybmyp.js} +2 -2
  23. package/dist/{chunk-zdkvcpbe.js → chunk-1xqh8b38.js} +2 -2
  24. package/dist/{chunk-pb9tbzx4.js → chunk-1z6393pz.js} +55 -52
  25. package/dist/{chunk-rq1rj0fm.js → chunk-20rdctr8.js} +59 -56
  26. package/dist/{chunk-n99mdb05.js → chunk-2278qvvz.js} +82 -69
  27. package/dist/{chunk-1r3w86w2.js → chunk-27rca2qk.js} +14 -14
  28. package/dist/{chunk-0yw7zdrk.js → chunk-28p3x5mq.js} +58 -55
  29. package/dist/{chunk-cdcg7rv7.js → chunk-29n8fs0h.js} +3 -3
  30. package/dist/{chunk-eemwbs1k.js → chunk-2bahqsy8.js} +5 -5
  31. package/dist/{chunk-vmnb4fe2.js → chunk-2d4az1sb.js} +1051 -213
  32. package/dist/{chunk-bbm8cs3b.js → chunk-2dtsff0m.js} +2 -2
  33. package/dist/{chunk-epb6vn7a.js → chunk-2dvsb5m8.js} +3 -3
  34. package/dist/{chunk-hh9e110e.js → chunk-2ea63hn5.js} +55 -52
  35. package/dist/{chunk-2wzw1ch2.js → chunk-2heyngx7.js} +55 -52
  36. package/dist/{chunk-exy61tq9.js → chunk-2n4jnkr3.js} +5 -5
  37. package/dist/{chunk-04fesxxb.js → chunk-2npy5n4d.js} +3 -3
  38. package/dist/chunk-2yz7ej7r.js +215 -0
  39. package/dist/{chunk-6dszbr2m.js → chunk-347n8wrb.js} +56 -53
  40. package/dist/{chunk-ac8h9vfx.js → chunk-365z3p8q.js} +4 -4
  41. package/dist/{chunk-2bjxdx6v.js → chunk-3ax3g4ky.js} +5 -5
  42. package/dist/{chunk-6tgdp97d.js → chunk-3c22f5y8.js} +4 -4
  43. package/dist/{chunk-y8h1t9ak.js → chunk-3ed5qycn.js} +59 -56
  44. package/dist/{chunk-2afnxgdd.js → chunk-3hw6pcqt.js} +12 -12
  45. package/dist/chunk-3j0f3yyd.js +20 -0
  46. package/dist/{chunk-yc2nybgd.js → chunk-3keyh8d3.js} +2 -2
  47. package/dist/{chunk-hegr0s7q.js → chunk-3n8prx9k.js} +3 -3
  48. package/dist/{chunk-8fvbvp8b.js → chunk-3tnabt1t.js} +2 -2
  49. package/dist/{chunk-0jehknrf.js → chunk-3ydfy1vc.js} +2 -2
  50. package/dist/{chunk-246ewz3k.js → chunk-41ncbfk7.js} +3 -3
  51. package/dist/{chunk-9qdc1dr7.js → chunk-45ynv6r6.js} +2 -2
  52. package/dist/chunk-46sfycpp.js +125 -0
  53. package/dist/{chunk-a1mp5wrb.js → chunk-496449vy.js} +2 -2
  54. package/dist/{chunk-a8w0ptwp.js → chunk-49z79885.js} +3 -3
  55. package/dist/{chunk-25j8nzw3.js → chunk-4c8mdzm1.js} +4 -4
  56. package/dist/{chunk-frafv5eb.js → chunk-4f56n8y8.js} +4 -4
  57. package/dist/{chunk-1mft5mam.js → chunk-4ffz1d36.js} +4 -4
  58. package/dist/{chunk-9jkv01k5.js → chunk-4hgk89n9.js} +59 -56
  59. package/dist/{chunk-g2z79a35.js → chunk-4k4kn7h2.js} +18 -18
  60. package/dist/{chunk-vf5aqnmh.js → chunk-4ks3c21q.js} +64 -61
  61. package/dist/{chunk-bazg62tk.js → chunk-4v3p8phf.js} +15 -15
  62. package/dist/chunk-4vzg1cn7.js +264 -0
  63. package/dist/{chunk-ex5da5zw.js → chunk-4xp653hr.js} +55 -52
  64. package/dist/{chunk-szhqm62n.js → chunk-4zvptd40.js} +60 -56
  65. package/dist/{chunk-70ygvt3c.js → chunk-503675yy.js} +2 -2
  66. package/dist/{chunk-cpmwecza.js → chunk-52d0caw3.js} +58 -55
  67. package/dist/{chunk-x0vsajns.js → chunk-56speggn.js} +3 -3
  68. package/dist/{chunk-94zksc1x.js → chunk-58jcwxyh.js} +14 -14
  69. package/dist/{chunk-ff33xk7c.js → chunk-5bd0sf0q.js} +2 -2
  70. package/dist/chunk-5cxetff3.js +443 -0
  71. package/dist/{chunk-10k5cmhr.js → chunk-5dm3xwms.js} +6 -6
  72. package/dist/{chunk-kb3arncw.js → chunk-5e4sk6wr.js} +3 -3
  73. package/dist/{chunk-azj0n2d5.js → chunk-5fny1a0a.js} +48 -17
  74. package/dist/{chunk-vavwasjv.js → chunk-5hn85d4q.js} +58 -55
  75. package/dist/{chunk-h8mre2wt.js → chunk-5p3bwhcw.js} +5 -5
  76. package/dist/{chunk-sgmscys1.js → chunk-5r57a99p.js} +15 -15
  77. package/dist/{chunk-9t6bcs6h.js → chunk-5thf5z45.js} +136 -44
  78. package/dist/chunk-5vbtjcd2.js +624 -0
  79. package/dist/{chunk-16mcxht8.js → chunk-5w9qcjjt.js} +61 -58
  80. package/dist/{chunk-wvevgh1a.js → chunk-5xj3z42h.js} +5 -5
  81. package/dist/{chunk-r3ve8thc.js → chunk-62r8rxkw.js} +4 -4
  82. package/dist/chunk-64wm5777.js +85 -0
  83. package/dist/{chunk-mht29n4v.js → chunk-6a32d602.js} +55 -52
  84. package/dist/{chunk-007h648h.js → chunk-6aevda19.js} +2 -2
  85. package/dist/{chunk-445bwfcz.js → chunk-6bb0gyhh.js} +55 -52
  86. package/dist/{chunk-72jyr3w9.js → chunk-6d9njm1w.js} +2 -2
  87. package/dist/{chunk-7fxmzq5j.js → chunk-6fbvxhan.js} +3 -3
  88. package/dist/{chunk-d988v6vq.js → chunk-6kddkcqk.js} +57 -54
  89. package/dist/{chunk-ejds7a1j.js → chunk-6sytfk68.js} +5 -5
  90. package/dist/{chunk-7z7d0s4n.js → chunk-6ypvw68g.js} +55 -52
  91. package/dist/{chunk-cga8jcd5.js → chunk-6zkxtny0.js} +4 -4
  92. package/dist/{chunk-k7mg4se1.js → chunk-6zn0szv5.js} +19 -17
  93. package/dist/{chunk-yqb19vg0.js → chunk-71053xes.js} +14 -14
  94. package/dist/chunk-758qmraw.js +66 -0
  95. package/dist/{chunk-41rte42b.js → chunk-76g1m8sa.js} +16 -4
  96. package/dist/{chunk-t7d66zgt.js → chunk-7b1ze28c.js} +55 -52
  97. package/dist/{chunk-a3m8brwc.js → chunk-7bq6az8b.js} +3 -3
  98. package/dist/{chunk-p5zfk1p0.js → chunk-7ckqn3c3.js} +55 -52
  99. package/dist/chunk-7d5gzxsx.js +145 -0
  100. package/dist/{chunk-wwcagza5.js → chunk-7gyjd00q.js} +3 -3
  101. package/dist/{chunk-weq1878z.js → chunk-7hnmt967.js} +84 -80
  102. package/dist/{chunk-07bx2jcz.js → chunk-7jbeh3g8.js} +3 -3
  103. package/dist/{chunk-nk4avpbc.js → chunk-7k0h27s8.js} +7 -7
  104. package/dist/{chunk-zyjnx7p3.js → chunk-7myptjaa.js} +5 -5
  105. package/dist/{chunk-gj458fct.js → chunk-7yq22pd2.js} +57 -54
  106. package/dist/{chunk-jzngaehg.js → chunk-7zxvjs3d.js} +2 -2
  107. package/dist/{chunk-1yw96d3f.js → chunk-83v18n96.js} +14 -14
  108. package/dist/{chunk-cehe5fzp.js → chunk-84a79s9g.js} +124 -149
  109. package/dist/{chunk-188vmn2q.js → chunk-86n03xsk.js} +60 -57
  110. package/dist/{chunk-yrx21nzs.js → chunk-87ddk39d.js} +6 -6
  111. package/dist/{chunk-91pgjs9c.js → chunk-89jrgnx3.js} +15 -15
  112. package/dist/{chunk-0g5nbhfx.js → chunk-8dehkx39.js} +5 -5
  113. package/dist/{chunk-r5m7dsya.js → chunk-8fm77brm.js} +59 -56
  114. package/dist/{chunk-65q352pt.js → chunk-8fqa9v4h.js} +55 -52
  115. package/dist/{chunk-kr7tq75r.js → chunk-8pqe4w62.js} +62 -59
  116. package/dist/{chunk-bnma4wvz.js → chunk-8qp0ytjr.js} +2 -2
  117. package/dist/{chunk-3bz9rf07.js → chunk-8v8n8gxv.js} +3 -3
  118. package/dist/{chunk-nq3atbmt.js → chunk-94jqjx3g.js} +59 -56
  119. package/dist/chunk-9663bsk0.js +18 -0
  120. package/dist/{chunk-k927esxr.js → chunk-96gwphgv.js} +3 -3
  121. package/dist/{chunk-22gbyh19.js → chunk-9bf696cj.js} +95 -87
  122. package/dist/{chunk-50dqzjnc.js → chunk-9cw6etxe.js} +56 -53
  123. package/dist/{chunk-r7a5cqdw.js → chunk-9dwdn2sk.js} +7 -7
  124. package/dist/{chunk-w5hj47pg.js → chunk-9ggwn844.js} +55 -68
  125. package/dist/{chunk-3wdtayab.js → chunk-9gxdrrd5.js} +55 -52
  126. package/dist/{chunk-91n8b2bh.js → chunk-9q952pw0.js} +2 -2
  127. package/dist/{chunk-rh4c6hqb.js → chunk-9qgzdk8y.js} +7 -7
  128. package/dist/{chunk-308mgh4v.js → chunk-9qj9t1g4.js} +2 -2
  129. package/dist/{chunk-fepvmnye.js → chunk-9sr5cheh.js} +55 -52
  130. package/dist/{chunk-4ksc1s3d.js → chunk-9vvffdb6.js} +64 -61
  131. package/dist/chunk-a18ypbnr.js +151 -0
  132. package/dist/{chunk-agp8g4vs.js → chunk-a80y3b1p.js} +3 -3
  133. package/dist/{chunk-82e5ecfq.js → chunk-a96dsyhm.js} +59 -56
  134. package/dist/{chunk-pgjmgh51.js → chunk-a97kj439.js} +2 -2
  135. package/dist/chunk-aggcq5pt.js +16 -0
  136. package/dist/{chunk-42m1b4hy.js → chunk-am5zfwnf.js} +19 -19
  137. package/dist/{chunk-dz9y4ynp.js → chunk-b21j3y4h.js} +2 -2
  138. package/dist/{chunk-k85dxf7e.js → chunk-b52sketm.js} +55 -52
  139. package/dist/{chunk-nda7wdyd.js → chunk-b7fcydvv.js} +18 -18
  140. package/dist/{chunk-tfy2cfmx.js → chunk-bb9h35x7.js} +55 -52
  141. package/dist/{chunk-8yvwvs92.js → chunk-bbpnmz87.js} +2 -2
  142. package/dist/chunk-bcfd2zw7.js +23 -0
  143. package/dist/chunk-bdy3869e.js +35 -0
  144. package/dist/{chunk-6qjny6s9.js → chunk-be8pcep0.js} +2 -2
  145. package/dist/{chunk-gb253fe4.js → chunk-bgpftrxc.js} +56 -53
  146. package/dist/{chunk-1psvq5k9.js → chunk-bh4k9q9y.js} +4 -4
  147. package/dist/{chunk-1ht0vtnv.js → chunk-bjc8f709.js} +62 -59
  148. package/dist/{chunk-3xn43gdg.js → chunk-bm5370d5.js} +14 -14
  149. package/dist/{chunk-g14bjgw2.js → chunk-br1qf4bc.js} +12 -21
  150. package/dist/{chunk-wmxdjz06.js → chunk-bxmc7435.js} +7 -7
  151. package/dist/chunk-c36xznt7.js +1045 -0
  152. package/dist/{chunk-3153jw2k.js → chunk-c3z2f4aq.js} +58 -55
  153. package/dist/chunk-cchv4yn8.js +214 -0
  154. package/dist/{chunk-j4rqvdds.js → chunk-cewbt8ah.js} +2 -2
  155. package/dist/{chunk-txcczr8d.js → chunk-cfeakba6.js} +55 -52
  156. package/dist/{chunk-b0rzqvdk.js → chunk-ckh1zt0n.js} +65 -62
  157. package/dist/{chunk-xcm658wm.js → chunk-ckq5d8ev.js} +3 -3
  158. package/dist/chunk-cnfzmqr8.js +115 -0
  159. package/dist/chunk-crchz5q8.js +16 -0
  160. package/dist/{chunk-nynqcpbc.js → chunk-cwpxrn2d.js} +17 -17
  161. package/dist/chunk-cy223s48.js +881 -0
  162. package/dist/{chunk-7btb0pt0.js → chunk-cydd546q.js} +57 -53
  163. package/dist/{chunk-vwppfk3m.js → chunk-cz5ycdta.js} +3 -3
  164. package/dist/{chunk-mkqj6971.js → chunk-da7f9a81.js} +105 -29
  165. package/dist/{chunk-6w9vbmda.js → chunk-dfzfxt1y.js} +7 -7
  166. package/dist/{chunk-qwn30dmv.js → chunk-dj6y2sr8.js} +3 -3
  167. package/dist/{chunk-cbhwxy49.js → chunk-djbawqmw.js} +55 -52
  168. package/dist/{chunk-n0qw1yqs.js → chunk-dpb1kvb9.js} +56 -53
  169. package/dist/{chunk-gr3hsybk.js → chunk-dt5c48mh.js} +2 -2
  170. package/dist/{chunk-sffjkpkr.js → chunk-e1m95nec.js} +6 -6
  171. package/dist/{chunk-gy5e77gm.js → chunk-e26hypm4.js} +56 -53
  172. package/dist/{chunk-8z65azad.js → chunk-e5kn4hwp.js} +56 -53
  173. package/dist/{chunk-750k6p99.js → chunk-e6dq8apj.js} +55 -52
  174. package/dist/{chunk-afjvd592.js → chunk-e6p5x2p4.js} +4 -4
  175. package/dist/{chunk-4bwmnypz.js → chunk-eb6x30zz.js} +57 -54
  176. package/dist/{chunk-mcmhgv5a.js → chunk-ebfv6acv.js} +12 -12
  177. package/dist/{chunk-zgt8wev2.js → chunk-egkwv0bp.js} +2 -2
  178. package/dist/{chunk-7e6cm3rj.js → chunk-ennzq1s5.js} +14 -4
  179. package/dist/{chunk-4am10fzg.js → chunk-envqyd27.js} +59 -55
  180. package/dist/{chunk-d9c2bj73.js → chunk-epprxdgg.js} +2 -2
  181. package/dist/{chunk-2nrg59n8.js → chunk-et42fzf1.js} +22 -22
  182. package/dist/{chunk-h0rbjg6x.js → chunk-f2mhrmww.js} +10 -3
  183. package/dist/{chunk-ywmprz18.js → chunk-fb5ehysd.js} +57 -54
  184. package/dist/chunk-fbtp7vga.js +37 -0
  185. package/dist/{chunk-d2148dsd.js → chunk-fgna18nd.js} +6 -6
  186. package/dist/{chunk-wzheh2yr.js → chunk-fknjgxt4.js} +56 -53
  187. package/dist/{chunk-y1jcd7xx.js → chunk-fpb43g1s.js} +6 -6
  188. package/dist/{chunk-d24kfzcv.js → chunk-ftfz2eh3.js} +2 -2
  189. package/dist/{chunk-3j8vq1pf.js → chunk-fv94gm4h.js} +56 -53
  190. package/dist/{chunk-fjqp3q7c.js → chunk-fx7pr1g4.js} +13 -13
  191. package/dist/{chunk-ryqepdpz.js → chunk-g0axk7cx.js} +56 -53
  192. package/dist/chunk-g6d9avms.js +205 -0
  193. package/dist/{chunk-xjfqctzs.js → chunk-g9caj6wj.js} +66 -63
  194. package/dist/{chunk-nfbw6f7k.js → chunk-gbekxw41.js} +56 -53
  195. package/dist/{chunk-ahq40vpt.js → chunk-gcpc6b2z.js} +2 -2
  196. package/dist/{chunk-98174mf4.js → chunk-gfycetpg.js} +5 -5
  197. package/dist/{chunk-sjjq8xdb.js → chunk-gn0ja3k5.js} +5 -5
  198. package/dist/{chunk-j2zvdmqh.js → chunk-gt9gwwdh.js} +5 -5
  199. package/dist/{chunk-cf8d6pz4.js → chunk-gz0nj0mm.js} +55 -52
  200. package/dist/{chunk-msr65xs2.js → chunk-gz6pze8f.js} +57 -54
  201. package/dist/{chunk-7m8k6pa3.js → chunk-h1frxdrg.js} +56 -54
  202. package/dist/{chunk-eac7ypee.js → chunk-h93ve2g2.js} +14 -14
  203. package/dist/{chunk-vee2y2a3.js → chunk-h9mr8ey4.js} +13 -13
  204. package/dist/{chunk-59bwmnpt.js → chunk-hd8ydnzq.js} +15 -15
  205. package/dist/{chunk-kgcmddnw.js → chunk-hebz2z6z.js} +58 -55
  206. package/dist/chunk-hgxb4qn5.js +390 -0
  207. package/dist/{chunk-00hg5r38.js → chunk-hh6kgtq5.js} +3 -3
  208. package/dist/{chunk-hd9nkrx3.js → chunk-hhcx2jjn.js} +3 -3
  209. package/dist/{chunk-6x5h6cqf.js → chunk-hjp1yckp.js} +56 -53
  210. package/dist/{chunk-bqbxmdjy.js → chunk-hjxz7a04.js} +58 -55
  211. package/dist/{chunk-0v69sn62.js → chunk-hkkz8rde.js} +55 -52
  212. package/dist/{chunk-677p38pg.js → chunk-hnms0snx.js} +2 -2
  213. package/dist/{chunk-y15fkqed.js → chunk-hq4jd1fy.js} +23 -23
  214. package/dist/{chunk-hknjwtbv.js → chunk-hthfhdty.js} +15 -15
  215. package/dist/{chunk-xkavy09t.js → chunk-hy5vd50e.js} +3 -3
  216. package/dist/{chunk-86nrce87.js → chunk-hyztfnyq.js} +468 -226
  217. package/dist/{chunk-45m4a7v2.js → chunk-j5rnevxw.js} +62 -59
  218. package/dist/{chunk-26g6w0ah.js → chunk-j74ctwq9.js} +3 -3
  219. package/dist/{chunk-nt0qt25w.js → chunk-jcdv05ym.js} +33 -5
  220. package/dist/{chunk-bdjevwn2.js → chunk-jd5xs374.js} +55 -52
  221. package/dist/{chunk-rz56zge4.js → chunk-jgbz49jh.js} +6 -4
  222. package/dist/{chunk-7hsedj2m.js → chunk-jhdtyhk5.js} +57 -54
  223. package/dist/{chunk-e40wen38.js → chunk-jkbkp0ek.js} +14 -14
  224. package/dist/{chunk-kf6gt482.js → chunk-jkyn6ge9.js} +5 -5
  225. package/dist/{chunk-nb02zd8m.js → chunk-jn7qa13m.js} +3 -3
  226. package/dist/{chunk-4ah5x35c.js → chunk-jt7ea6rq.js} +55 -52
  227. package/dist/{chunk-827qm1sh.js → chunk-jt7wch8z.js} +2 -2
  228. package/dist/{chunk-v4vcp64e.js → chunk-jv7tn7yh.js} +55 -52
  229. package/dist/chunk-jx80x2sn.js +267 -0
  230. package/dist/{chunk-03fdnx3e.js → chunk-jy13c47g.js} +5 -5
  231. package/dist/{chunk-dkazyend.js → chunk-k11m1rfc.js} +57 -54
  232. package/dist/{chunk-z2yjcarh.js → chunk-k3mghke5.js} +57 -86
  233. package/dist/{chunk-a0dd5hkn.js → chunk-k5rrrd0q.js} +78 -75
  234. package/dist/{chunk-2wbwn8g8.js → chunk-kbbjfeb8.js} +2 -2
  235. package/dist/chunk-kcz5b7xv.js +73 -0
  236. package/dist/{chunk-173gkvba.js → chunk-khnxj5vx.js} +3 -3
  237. package/dist/{chunk-cgqv2grs.js → chunk-kkwym2b7.js} +5 -5
  238. package/dist/{chunk-hvve83a7.js → chunk-kn345s2x.js} +2 -2
  239. package/dist/{chunk-x07xwqrj.js → chunk-kpqx95pr.js} +2 -2
  240. package/dist/{chunk-qgbfcm47.js → chunk-kszphewb.js} +63 -54
  241. package/dist/{chunk-h9j4zz8p.js → chunk-kxn6mzy3.js} +4 -4
  242. package/dist/{chunk-bjgz0wdj.js → chunk-m0zzdgkt.js} +31 -26
  243. package/dist/{chunk-xpvj19fq.js → chunk-m7qa1fqb.js} +3 -3
  244. package/dist/{chunk-ffg51hwt.js → chunk-mdm5cbxy.js} +55 -52
  245. package/dist/chunk-mnqvtfd5.js +78 -0
  246. package/dist/{chunk-429gckc3.js → chunk-mp5km99q.js} +20 -20
  247. package/dist/{chunk-psbm5jsc.js → chunk-mpxcgg5f.js} +6 -6
  248. package/dist/{chunk-a5615tp4.js → chunk-mqr18cwx.js} +4 -4
  249. package/dist/chunk-n014czx3.js +18 -0
  250. package/dist/{chunk-wtcd14r5.js → chunk-n40kbp9f.js} +55 -52
  251. package/dist/{chunk-z3qy0rgg.js → chunk-n51s6m60.js} +14 -14
  252. package/dist/{chunk-0rr38kc5.js → chunk-n87c314c.js} +56 -53
  253. package/dist/{chunk-qrzeq3x3.js → chunk-nevf0mb9.js} +15 -15
  254. package/dist/{chunk-fe3f357e.js → chunk-nkeknzb2.js} +4 -4
  255. package/dist/{chunk-xcvezw4b.js → chunk-nkgq6a5q.js} +28 -28
  256. package/dist/{chunk-3208ghtw.js → chunk-nmj9qx2x.js} +65 -62
  257. package/dist/{chunk-26bfvj72.js → chunk-nmyfe9j9.js} +57 -54
  258. package/dist/{chunk-fz2zjx1x.js → chunk-nmzy0qjn.js} +7 -7
  259. package/dist/{chunk-gdajxwh7.js → chunk-np05dg07.js} +55 -52
  260. package/dist/{chunk-w51sng2s.js → chunk-npgyhaqc.js} +2 -2
  261. package/dist/{chunk-chfh2dha.js → chunk-nr2skyv7.js} +56 -53
  262. package/dist/{chunk-5wrrjqyd.js → chunk-nv5rddp1.js} +55 -52
  263. package/dist/{chunk-7aeww2z6.js → chunk-p10xajeq.js} +69 -66
  264. package/dist/{chunk-2kajewxj.js → chunk-p1wxbhgj.js} +4 -4
  265. package/dist/{chunk-q65zt8zd.js → chunk-p6fhtt1h.js} +4 -4
  266. package/dist/{chunk-5w18hvcs.js → chunk-p8d1q69a.js} +55 -52
  267. package/dist/{chunk-rrcsw70h.js → chunk-pbmy8ktp.js} +7 -7
  268. package/dist/{chunk-wvp9qznk.js → chunk-pqrb30bj.js} +2 -2
  269. package/dist/{chunk-etd086w1.js → chunk-pr321r8d.js} +3 -3
  270. package/dist/{chunk-t4f85b5b.js → chunk-psq9gtg7.js} +2 -2
  271. package/dist/{chunk-wt40qpf8.js → chunk-ptermrp1.js} +60 -57
  272. package/dist/{chunk-ybpn8zcq.js → chunk-pyfrphvc.js} +57 -54
  273. package/dist/{chunk-vajyw4ea.js → chunk-pzb2zc4x.js} +6 -6
  274. package/dist/{chunk-9p4wsdjj.js → chunk-q0w614e1.js} +3 -3
  275. package/dist/{chunk-x8khmg37.js → chunk-q110twdj.js} +59 -116
  276. package/dist/{chunk-v3ynnwf5.js → chunk-q72dtjqy.js} +2 -2
  277. package/dist/{chunk-73zyqp47.js → chunk-q90bcq6v.js} +59 -56
  278. package/dist/{chunk-cmk5fvhp.js → chunk-qavfmmqd.js} +6 -6
  279. package/dist/{chunk-fsr3wqt8.js → chunk-qjx52q61.js} +2 -2
  280. package/dist/{chunk-fw4y0f76.js → chunk-qk2tvn8y.js} +56 -53
  281. package/dist/{chunk-2d9752es.js → chunk-qm3k6vez.js} +13 -13
  282. package/dist/{chunk-h2q4v2te.js → chunk-qmp50hjb.js} +19 -19
  283. package/dist/{chunk-tvnzqcya.js → chunk-qnztz65r.js} +56 -53
  284. package/dist/{chunk-0c1d11gp.js → chunk-qpatv1ep.js} +13 -13
  285. package/dist/{chunk-dsdbya1y.js → chunk-qwtfyr6d.js} +2 -2
  286. package/dist/{chunk-nz9rqw9y.js → chunk-qxp3d963.js} +2 -2
  287. package/dist/{chunk-xq92sh7h.js → chunk-qzp51m93.js} +3 -3
  288. package/dist/{chunk-gmyt1kr3.js → chunk-r3fadmd6.js} +5 -5
  289. package/dist/{chunk-sgw20vr8.js → chunk-r4mec6w5.js} +3 -3
  290. package/dist/chunk-r6g3xx75.js +415 -0
  291. package/dist/{chunk-3d8wynhd.js → chunk-r8ywba1h.js} +14 -14
  292. package/dist/{chunk-pc761fjv.js → chunk-r974358t.js} +13 -13
  293. package/dist/{chunk-s996ghdk.js → chunk-r9qnxgqt.js} +5 -5
  294. package/dist/{chunk-vyc908t4.js → chunk-rasdgp8g.js} +4 -4
  295. package/dist/{chunk-z4et0c5h.js → chunk-rbr0tsrz.js} +55 -52
  296. package/dist/{chunk-qak319wf.js → chunk-re5p7q2e.js} +4 -4
  297. package/dist/{chunk-ndfk4pk7.js → chunk-rfvzhq5x.js} +55 -52
  298. package/dist/{chunk-bqxeky5x.js → chunk-rfxctace.js} +3 -4
  299. package/dist/chunk-rhqffqzf.js +189 -0
  300. package/dist/{chunk-56qq2p9r.js → chunk-rnjtkqzg.js} +4 -4
  301. package/dist/{chunk-ws77frz2.js → chunk-rqa3fz1t.js} +55 -52
  302. package/dist/{chunk-ss1c88v5.js → chunk-rtgff67y.js} +63 -60
  303. package/dist/{chunk-2vvwrqnf.js → chunk-rw1070pc.js} +4 -4
  304. package/dist/{chunk-cxkxps51.js → chunk-rzrm7j9x.js} +2 -2
  305. package/dist/{chunk-bat87bmz.js → chunk-s262tfgm.js} +3 -3
  306. package/dist/{chunk-mj4zph9q.js → chunk-s4pjm9jw.js} +55 -52
  307. package/dist/chunk-s5pnejsn.js +216 -0
  308. package/dist/{chunk-6fp3tvak.js → chunk-sczmmmvj.js} +2 -2
  309. package/dist/{chunk-pynkknss.js → chunk-sd2g0s0k.js} +9 -9
  310. package/dist/{chunk-rnsws47e.js → chunk-sg5nsm4p.js} +3 -3
  311. package/dist/{chunk-c5sm4sc3.js → chunk-stqsfa68.js} +3 -3
  312. package/dist/{chunk-pxmfaad7.js → chunk-svb5eqfz.js} +14 -14
  313. package/dist/{chunk-5tbfphgg.js → chunk-swr65v0j.js} +10 -10
  314. package/dist/{chunk-4gkqm4bn.js → chunk-swtk97hy.js} +14 -14
  315. package/dist/{chunk-rrbsm1d2.js → chunk-sx4gbak5.js} +56 -53
  316. package/dist/{chunk-4n3kmsaj.js → chunk-t12d6tby.js} +3 -3
  317. package/dist/{chunk-w9dy1w2w.js → chunk-t20f5mnk.js} +14 -14
  318. package/dist/{chunk-rkwfpq4m.js → chunk-t408adb9.js} +56 -53
  319. package/dist/{chunk-gz1jqh8a.js → chunk-t7434h4s.js} +55 -52
  320. package/dist/{chunk-dve0wwbm.js → chunk-t7y6mg54.js} +13 -13
  321. package/dist/{chunk-tdpx7hh3.js → chunk-tdkwcv57.js} +4 -4
  322. package/dist/{chunk-crpj1nw0.js → chunk-tfew976a.js} +55 -52
  323. package/dist/{chunk-n9d1qnp6.js → chunk-thzmxfnt.js} +2 -2
  324. package/dist/{chunk-vh81ygd3.js → chunk-tmedrj3f.js} +4 -4
  325. package/dist/{chunk-j9q7p2m5.js → chunk-tmscbs2k.js} +4 -4
  326. package/dist/chunk-tnk7s4ed.js +22 -0
  327. package/dist/{chunk-h9c871q9.js → chunk-tnqjynvy.js} +14 -14
  328. package/dist/{chunk-2hevw9te.js → chunk-tq32b105.js} +3 -3
  329. package/dist/{chunk-gzpsa71f.js → chunk-tr448vwb.js} +3 -3
  330. package/dist/{chunk-xdfcfm69.js → chunk-tr4hszme.js} +3 -3
  331. package/dist/{chunk-5nzjxkj9.js → chunk-traxf72w.js} +2 -2
  332. package/dist/{chunk-xs5ncg1b.js → chunk-ttzyw0y7.js} +17 -17
  333. package/dist/{chunk-997z9was.js → chunk-tw0b366n.js} +55 -52
  334. package/dist/{chunk-w2z0zq63.js → chunk-txync4kd.js} +7 -7
  335. package/dist/chunk-v060k07j.js +416 -0
  336. package/dist/chunk-v1rkrwwv.js +146 -0
  337. package/dist/{chunk-t15y7qj2.js → chunk-v21ssxkp.js} +2 -2
  338. package/dist/{chunk-dn3k7jx0.js → chunk-v2vzfj4h.js} +55 -52
  339. package/dist/{chunk-f6xc2rtk.js → chunk-v4h7dscd.js} +27 -249
  340. package/dist/{chunk-vn0y1222.js → chunk-v522k1r4.js} +70 -67
  341. package/dist/{chunk-b1akqr40.js → chunk-v9b2rh8h.js} +58 -55
  342. package/dist/{chunk-g8e4wwak.js → chunk-vacje5g9.js} +4 -4
  343. package/dist/{chunk-x36cer09.js → chunk-vetj2j2n.js} +60 -57
  344. package/dist/{chunk-354nk8fp.js → chunk-vpn54vqg.js} +6 -6
  345. package/dist/{chunk-xytm9792.js → chunk-vqhgs52z.js} +7 -7
  346. package/dist/{chunk-0yyajtmg.js → chunk-vtnm80k9.js} +13 -13
  347. package/dist/{chunk-0q17nthv.js → chunk-vvk6wx6b.js} +14 -14
  348. package/dist/{chunk-k4r2smrc.js → chunk-vym5zrn6.js} +4944 -2380
  349. package/dist/{chunk-9ej0hnae.js → chunk-vzxtxv4a.js} +56 -53
  350. package/dist/{chunk-pydt2a2n.js → chunk-w3wdqhv0.js} +62 -59
  351. package/dist/{chunk-esmecavs.js → chunk-w59jkye4.js} +56 -53
  352. package/dist/{chunk-r86f5rq0.js → chunk-w60fa5cj.js} +65 -62
  353. package/dist/{chunk-rnr60956.js → chunk-w8xchcwf.js} +3 -3
  354. package/dist/{chunk-f0a3t1s8.js → chunk-w9fptpp9.js} +64 -61
  355. package/dist/{chunk-4pc3744p.js → chunk-wa7g3yv7.js} +13 -13
  356. package/dist/{chunk-appan6jz.js → chunk-wdn3pb9r.js} +3 -3
  357. package/dist/{chunk-ta3mpea5.js → chunk-wqk03hpc.js} +55 -52
  358. package/dist/{chunk-6hywp0n9.js → chunk-wvs8wv8t.js} +2 -2
  359. package/dist/{chunk-nb32etb5.js → chunk-wwfe7gg7.js} +58 -55
  360. package/dist/{chunk-nmaxmbg9.js → chunk-wz18c465.js} +4 -4
  361. package/dist/{chunk-9gy4amsa.js → chunk-wz34c685.js} +15 -15
  362. package/dist/{chunk-5tg67tyt.js → chunk-wzzaxwej.js} +2 -2
  363. package/dist/chunk-x1wk407b.js +516 -0
  364. package/dist/{chunk-jysm93mk.js → chunk-x2taqvwd.js} +5 -5
  365. package/dist/{chunk-4n33zjr2.js → chunk-x41dz9y9.js} +2 -2
  366. package/dist/chunk-x48x54hx.js +3942 -0
  367. package/dist/{chunk-fapmq0mf.js → chunk-x6cjkxqe.js} +5 -5
  368. package/dist/{chunk-37va52e9.js → chunk-x89sscn0.js} +2 -2
  369. package/dist/chunk-x9qqj8wc.js +153 -0
  370. package/dist/{chunk-wt541mkc.js → chunk-xa9xpah3.js} +3041 -2505
  371. package/dist/{chunk-644422j5.js → chunk-xcxcysx3.js} +2 -2
  372. package/dist/{chunk-qemwdcf4.js → chunk-xftqvncz.js} +9 -46
  373. package/dist/{chunk-zhmz5pc1.js → chunk-xhnmweqe.js} +86 -61
  374. package/dist/{chunk-jvnjg83j.js → chunk-xm6t6khx.js} +56 -53
  375. package/dist/chunk-xt65mfby.js +1395 -0
  376. package/dist/{chunk-e59fmxpj.js → chunk-xvmtyz8q.js} +2 -2
  377. package/dist/{chunk-55cx3c4n.js → chunk-xxfz08mf.js} +55 -52
  378. package/dist/{chunk-9zd21fw9.js → chunk-y061xbn9.js} +5 -5
  379. package/dist/{chunk-1tc6spqh.js → chunk-y0z468z2.js} +56 -53
  380. package/dist/{chunk-8x3wqyv3.js → chunk-y3cshvgb.js} +2 -2
  381. package/dist/{chunk-jakgz278.js → chunk-y6ce2s1q.js} +59 -55
  382. package/dist/chunk-y9bpc4a6.js +97 -0
  383. package/dist/{chunk-8c4wbrma.js → chunk-y9mnawak.js} +4 -4
  384. package/dist/{chunk-4zbc59gv.js → chunk-ycdbp5q4.js} +55 -52
  385. package/dist/{chunk-q6vrrdxm.js → chunk-ycsh7pst.js} +13 -13
  386. package/dist/{chunk-00c1cny7.js → chunk-yedzdc0a.js} +14 -8
  387. package/dist/{chunk-f0613fz6.js → chunk-yrr4d26k.js} +56 -53
  388. package/dist/{chunk-0mmyn5gx.js → chunk-yt5gwdg5.js} +7 -60
  389. package/dist/{chunk-bdd27pgp.js → chunk-yteefw26.js} +55 -52
  390. package/dist/{chunk-m0hg4ry7.js → chunk-yvjzex9w.js} +6 -82
  391. package/dist/{chunk-5n19f2r9.js → chunk-z124zj20.js} +4 -4
  392. package/dist/{chunk-sa5fj0d3.js → chunk-z92c7wdq.js} +4 -4
  393. package/dist/{chunk-pa6m6zh8.js → chunk-zb7ctc11.js} +55 -52
  394. package/dist/{chunk-tx6c6zpp.js → chunk-zc2mfxy0.js} +58 -55
  395. package/dist/{chunk-yh935z65.js → chunk-zdsqreyq.js} +3 -3
  396. package/dist/chunk-zf5btqc3.js +54 -0
  397. package/dist/{chunk-s6afn83n.js → chunk-zfwgjjde.js} +2 -2
  398. package/dist/{chunk-35se2h9e.js → chunk-zgvyn6yk.js} +55 -52
  399. package/dist/{chunk-hryyyanp.js → chunk-zmj9sehj.js} +56 -53
  400. package/dist/{chunk-cv2hk4fq.js → chunk-zr750mg3.js} +93 -56
  401. package/dist/{chunk-z1b4600y.js → chunk-zshw91dr.js} +5 -5
  402. package/dist/{chunk-m2epey0s.js → chunk-zyhpq0w1.js} +17 -5
  403. package/dist/{chunk-arnzwvcj.js → chunk-zzac564h.js} +15 -15
  404. package/dist/cli.js +94 -28
  405. package/dist/services/rawDump/batchWorker.js +3 -3
  406. package/package.json +1 -1
  407. package/dist/chunk-0paqc2yw.js +0 -18
  408. package/dist/chunk-2s9sfj9h.js +0 -99
  409. package/dist/chunk-76xcw4kg.js +0 -138
  410. package/dist/chunk-7bdscsqe.js +0 -197
  411. package/dist/chunk-pppfybd8.js +0 -183
  412. package/dist/chunk-q2pkj7sp.js +0 -18
  413. package/dist/chunk-zbn3eb68.js +0 -57
@@ -0,0 +1,624 @@
1
+ // @bun
2
+ import {
3
+ attachNdjsonFramer,
4
+ init_ndjsonFramer
5
+ } from "./chunk-758qmraw.js";
6
+ import {
7
+ init_log,
8
+ logError
9
+ } from "./chunk-vtcqe66h.js";
10
+ import {
11
+ errorMessage,
12
+ init_cleanupRegistry,
13
+ init_debug,
14
+ init_errors,
15
+ init_slowOperations,
16
+ jsonParse,
17
+ jsonStringify,
18
+ logForDebugging,
19
+ registerCleanup
20
+ } from "./chunk-dea6k409.js";
21
+ import {
22
+ getClaudeConfigHomeDir,
23
+ init_envUtils
24
+ } from "./chunk-hxhwzgnn.js";
25
+ import {
26
+ __esm,
27
+ __require
28
+ } from "./chunk-qp2qdcda.js";
29
+
30
+ // src/utils/udsResponseReader.ts
31
+ import { StringDecoder } from "string_decoder";
32
+ function getChunkBytes(chunk) {
33
+ return typeof chunk === "string" ? Buffer.byteLength(chunk, "utf8") : chunk.byteLength;
34
+ }
35
+ function parseResponseLine(line) {
36
+ try {
37
+ return jsonParse(line);
38
+ } catch {
39
+ throw new Error("Invalid UDS response frame");
40
+ }
41
+ }
42
+ function attachUdsResponseReader(socket, options) {
43
+ let buffer = "";
44
+ let bufferBytes = 0;
45
+ let settled = false;
46
+ const decoder = new StringDecoder("utf8");
47
+ function cleanupListeners() {
48
+ socket.off("data", onData);
49
+ socket.off("error", onError);
50
+ socket.off("end", onEnd);
51
+ socket.off("close", onClose);
52
+ }
53
+ function finish(error) {
54
+ if (settled)
55
+ return;
56
+ settled = true;
57
+ buffer = "";
58
+ bufferBytes = 0;
59
+ cleanupListeners();
60
+ if (error) {
61
+ socket.destroy();
62
+ } else {
63
+ socket.end();
64
+ }
65
+ options.onSettled(error);
66
+ }
67
+ function onData(chunk) {
68
+ const decoded = decoder.write(chunk);
69
+ const decodedBytes = Buffer.byteLength(decoded, "utf8");
70
+ if (bufferBytes + decodedBytes > options.maxFrameBytes) {
71
+ finish(new Error("UDS response frame exceeded size limit"));
72
+ return;
73
+ }
74
+ buffer += decoded;
75
+ bufferBytes += decodedBytes;
76
+ let newlineIndex = buffer.indexOf(`
77
+ `);
78
+ while (newlineIndex !== -1) {
79
+ const line = buffer.slice(0, newlineIndex);
80
+ const consumed = buffer.slice(0, newlineIndex + 1);
81
+ buffer = buffer.slice(newlineIndex + 1);
82
+ bufferBytes -= Buffer.byteLength(consumed, "utf8");
83
+ if (!line.trim()) {
84
+ newlineIndex = buffer.indexOf(`
85
+ `);
86
+ continue;
87
+ }
88
+ let response;
89
+ try {
90
+ response = parseResponseLine(line);
91
+ } catch (error) {
92
+ finish(error instanceof Error ? error : new Error(errorMessage(error)));
93
+ return;
94
+ }
95
+ if (response.type === "response" || options.acceptPong === true && response.type === "pong") {
96
+ finish();
97
+ return;
98
+ }
99
+ if (response.type === "error") {
100
+ finish(new Error(response.data ?? "UDS receiver rejected message"));
101
+ return;
102
+ }
103
+ newlineIndex = buffer.indexOf(`
104
+ `);
105
+ }
106
+ }
107
+ function onError(error) {
108
+ finish(options.formatSocketError?.(error) ?? (error instanceof Error ? error : new Error(errorMessage(error))));
109
+ }
110
+ function onEnd() {
111
+ finish(new Error("UDS socket ended before response"));
112
+ }
113
+ function onClose(hadError) {
114
+ if (hadError)
115
+ return;
116
+ finish(new Error("UDS socket closed before response"));
117
+ }
118
+ socket.on("data", onData);
119
+ socket.on("error", onError);
120
+ socket.on("end", onEnd);
121
+ socket.on("close", onClose);
122
+ }
123
+ var init_udsResponseReader = __esm(() => {
124
+ init_errors();
125
+ init_slowOperations();
126
+ });
127
+
128
+ // src/utils/udsMessaging.ts
129
+ import { createHash, randomBytes, timingSafeEqual } from "crypto";
130
+ import { createServer } from "net";
131
+ import {
132
+ chmod,
133
+ lstat,
134
+ mkdir,
135
+ open,
136
+ readFile,
137
+ rename,
138
+ unlink
139
+ } from "fs/promises";
140
+ import { dirname, join } from "path";
141
+ import { tmpdir } from "os";
142
+ function getDefaultUdsSocketPath() {
143
+ if (defaultSocketPath)
144
+ return defaultSocketPath;
145
+ const nonce = randomBytes(4).toString("hex");
146
+ if (process.platform === "win32") {
147
+ defaultSocketPath = `\\\\.\\pipe\\claude-code-${process.pid}-${nonce}`;
148
+ return defaultSocketPath;
149
+ }
150
+ defaultSocketPath = join(tmpdir(), `cc-${process.pid}-${nonce}.sock`);
151
+ return defaultSocketPath;
152
+ }
153
+ function getUdsMessagingSocketPath() {
154
+ return socketPath ?? undefined;
155
+ }
156
+ function formatUdsAddress(socket) {
157
+ return `uds:${socket}`;
158
+ }
159
+ function parseUdsTarget(target) {
160
+ if (target.includes("#token=")) {
161
+ throw new Error("UDS target must not include an inline auth token; use the ListPeers address");
162
+ }
163
+ return { socketPath: target };
164
+ }
165
+ function getCapabilityDir() {
166
+ return join(getClaudeConfigHomeDir(), "messaging-capabilities");
167
+ }
168
+ function getCapabilityPath(socket) {
169
+ const digest = createHash("sha256").update(socket).digest("hex");
170
+ return join(getCapabilityDir(), `${digest}.json`);
171
+ }
172
+ function isNotFound(error) {
173
+ return typeof error === "object" && error !== null && error.code === "ENOENT";
174
+ }
175
+ async function assertPrivateCapabilityDir(dir) {
176
+ let stat;
177
+ try {
178
+ stat = await lstat(dir);
179
+ } catch (error) {
180
+ if (!isNotFound(error))
181
+ throw error;
182
+ await mkdir(dir, { recursive: true, mode: 448 });
183
+ stat = await lstat(dir);
184
+ }
185
+ assertPrivateDirectory(stat, dir, "capability directory");
186
+ await chmod(dir, 448);
187
+ }
188
+ function assertPrivateDirectory(stat, dir, label) {
189
+ if (!stat.isDirectory() || stat.isSymbolicLink()) {
190
+ throw new Error(`[udsMessaging] ${label} is not a private directory: ${dir}`);
191
+ }
192
+ if (process.platform !== "win32") {
193
+ const broadMode = Number(stat.mode) & 63;
194
+ if (broadMode !== 0) {
195
+ throw new Error(`[udsMessaging] ${label} permissions are too broad: ${dir}`);
196
+ }
197
+ if (typeof process.getuid === "function" && Number(stat.uid) !== process.getuid()) {
198
+ throw new Error(`[udsMessaging] ${label} owner does not match current user: ${dir}`);
199
+ }
200
+ }
201
+ }
202
+ async function writePrivateFileExclusive(path, content) {
203
+ const handle = await open(path, "wx", 384);
204
+ try {
205
+ await handle.writeFile(content, "utf-8");
206
+ } finally {
207
+ await handle.close();
208
+ }
209
+ await chmod(path, 384);
210
+ }
211
+ async function ensureSocketParent(path) {
212
+ const dir = dirname(path);
213
+ try {
214
+ const stat = await lstat(dir);
215
+ if (!stat.isDirectory() || stat.isSymbolicLink()) {
216
+ throw new Error(`[udsMessaging] socket parent is not a directory: ${dir}`);
217
+ }
218
+ assertPrivateDirectory(stat, dir, "socket parent");
219
+ return;
220
+ } catch (error) {
221
+ if (!isNotFound(error))
222
+ throw error;
223
+ }
224
+ await mkdir(dir, { recursive: true, mode: 448 });
225
+ await chmod(dir, 448);
226
+ }
227
+ async function writeCapabilityFile(socket, token) {
228
+ const dir = getCapabilityDir();
229
+ await assertPrivateCapabilityDir(dir);
230
+ const target = getCapabilityPath(socket);
231
+ const temp = `${target}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
232
+ try {
233
+ await writePrivateFileExclusive(temp, jsonStringify({ socketPath: socket, authToken: token }));
234
+ await rename(temp, target);
235
+ } catch (error) {
236
+ try {
237
+ await unlink(temp);
238
+ } catch {}
239
+ throw error;
240
+ }
241
+ capabilityFilePath = target;
242
+ }
243
+ async function readUdsCapabilityToken(socket) {
244
+ try {
245
+ const parsed = jsonParse(await readFile(getCapabilityPath(socket), "utf-8"));
246
+ if (parsed.socketPath === socket && typeof parsed.authToken === "string") {
247
+ return parsed.authToken;
248
+ }
249
+ } catch {}
250
+ return;
251
+ }
252
+ function setOnEnqueue(cb) {
253
+ onEnqueueCb = cb;
254
+ }
255
+ function drainInbox() {
256
+ const pending = inbox.splice(0, inbox.length);
257
+ inboxBytes = 0;
258
+ for (const entry of pending) {
259
+ entry.status = "processed";
260
+ }
261
+ return pending;
262
+ }
263
+ function getMessageBytes(message) {
264
+ return Buffer.byteLength(jsonStringify(message), "utf8");
265
+ }
266
+ function enqueueInboxEntry(entry) {
267
+ const entryBytes = getMessageBytes(entry.message);
268
+ if (entryBytes > MAX_UDS_FRAME_BYTES || inbox.length >= MAX_UDS_INBOX_ENTRIES || inboxBytes + entryBytes > MAX_UDS_INBOX_BYTES) {
269
+ logError(new Error(`[udsMessaging] inbox full (${inbox.length}/${MAX_UDS_INBOX_ENTRIES}, ${inboxBytes}/${MAX_UDS_INBOX_BYTES} bytes); dropping message type=${entry.message.type}`));
270
+ return false;
271
+ }
272
+ inbox.push(entry);
273
+ inboxBytes += entryBytes;
274
+ return true;
275
+ }
276
+ function ensureAuthToken() {
277
+ if (!authToken) {
278
+ authToken = randomBytes(32).toString("hex");
279
+ }
280
+ return authToken;
281
+ }
282
+ function getMessageAuthToken(message) {
283
+ const token = message.meta?.authToken;
284
+ return typeof token === "string" ? token : undefined;
285
+ }
286
+ function isAuthorizedMessage(message) {
287
+ const provided = getMessageAuthToken(message);
288
+ if (!provided || !authToken)
289
+ return false;
290
+ const providedBuffer = Buffer.from(provided, "utf8");
291
+ const expectedBuffer = Buffer.from(authToken, "utf8");
292
+ if (providedBuffer.length !== expectedBuffer.length)
293
+ return false;
294
+ return timingSafeEqual(providedBuffer, expectedBuffer);
295
+ }
296
+ function writeSocketMessage(socket, message) {
297
+ if (socket.destroyed)
298
+ return;
299
+ socket.write(jsonStringify(message) + `
300
+ `);
301
+ }
302
+ function writeSocketMessageAndDestroy(socket, message) {
303
+ if (socket.destroyed)
304
+ return;
305
+ socket.write(jsonStringify(message) + `
306
+ `, () => {
307
+ if (!socket.destroyed)
308
+ socket.destroy();
309
+ });
310
+ }
311
+ function writeSocketErrorAndDestroy(socket, data) {
312
+ writeSocketMessageAndDestroy(socket, {
313
+ type: "error",
314
+ data,
315
+ ts: new Date().toISOString()
316
+ });
317
+ }
318
+ function unrefTimer(timer) {
319
+ const maybeUnref = timer.unref;
320
+ if (typeof maybeUnref === "function") {
321
+ maybeUnref.call(timer);
322
+ }
323
+ }
324
+ async function closeServer(serverToClose) {
325
+ await new Promise((resolve) => {
326
+ serverToClose.close(() => resolve());
327
+ });
328
+ }
329
+ async function removeSocketPath(path) {
330
+ if (process.platform === "win32")
331
+ return;
332
+ try {
333
+ await unlink(path);
334
+ } catch {}
335
+ }
336
+ function stripAuthToken(message) {
337
+ const { authToken: _authToken, ...metaWithoutAuth } = message.meta ?? {};
338
+ return {
339
+ ...message,
340
+ meta: Object.keys(metaWithoutAuth).length > 0 ? metaWithoutAuth : undefined
341
+ };
342
+ }
343
+ function withRequestAuthToken(message, token) {
344
+ return {
345
+ ...message,
346
+ meta: {
347
+ ...message.meta,
348
+ authToken: token
349
+ }
350
+ };
351
+ }
352
+ async function startUdsMessaging(path, opts) {
353
+ if (server) {
354
+ logForDebugging("[udsMessaging] server already running, skipping start");
355
+ return;
356
+ }
357
+ if (process.platform !== "win32") {
358
+ await ensureSocketParent(path);
359
+ }
360
+ if (process.platform !== "win32") {
361
+ try {
362
+ await unlink(path);
363
+ } catch {}
364
+ }
365
+ const token = ensureAuthToken();
366
+ let startedServer = null;
367
+ let exportedSocketEnv = false;
368
+ try {
369
+ await new Promise((resolve, reject) => {
370
+ const srv = createServer((socket) => {
371
+ if (clients.size >= MAX_UDS_CLIENTS) {
372
+ logForDebugging(`[udsMessaging] rejected client: ${clients.size}/${MAX_UDS_CLIENTS} clients already connected`);
373
+ socket.destroy();
374
+ return;
375
+ }
376
+ clients.add(socket);
377
+ logForDebugging(`[udsMessaging] client connected (total: ${clients.size})`);
378
+ let authenticated = false;
379
+ let closing = false;
380
+ const closeWithError = (data) => {
381
+ if (closing || socket.destroyed)
382
+ return;
383
+ closing = true;
384
+ socket.pause();
385
+ writeSocketErrorAndDestroy(socket, data);
386
+ };
387
+ const authTimer = setTimeout(() => {
388
+ if (authenticated || socket.destroyed)
389
+ return;
390
+ logForDebugging("[udsMessaging] closing unauthenticated idle client");
391
+ closeWithError("authentication timeout");
392
+ }, UDS_AUTH_TIMEOUT_MS);
393
+ unrefTimer(authTimer);
394
+ socket.setTimeout(UDS_IDLE_TIMEOUT_MS, () => {
395
+ logForDebugging("[udsMessaging] closing idle client");
396
+ closeWithError("idle timeout");
397
+ });
398
+ attachNdjsonFramer(socket, (msg) => {
399
+ if (!isAuthorizedMessage(msg)) {
400
+ logForDebugging(`[udsMessaging] rejected unauthenticated message type=${msg.type}`);
401
+ closeWithError("unauthorized");
402
+ return;
403
+ }
404
+ if (!authenticated) {
405
+ authenticated = true;
406
+ clearTimeout(authTimer);
407
+ }
408
+ if (msg.type === "ping") {
409
+ writeSocketMessage(socket, {
410
+ type: "pong",
411
+ from: socketPath ?? undefined,
412
+ ts: new Date().toISOString()
413
+ });
414
+ return;
415
+ }
416
+ const sanitizedMessage = stripAuthToken(msg);
417
+ const entry = {
418
+ id: `uds-${nextId++}`,
419
+ message: sanitizedMessage,
420
+ receivedAt: Date.now(),
421
+ status: "pending"
422
+ };
423
+ if (!enqueueInboxEntry(entry)) {
424
+ closeWithError("inbox full");
425
+ return;
426
+ }
427
+ logForDebugging(`[udsMessaging] enqueued message type=${msg.type} from=${msg.from ?? "unknown"}`);
428
+ writeSocketMessage(socket, {
429
+ type: "response",
430
+ data: "ok",
431
+ ts: new Date().toISOString(),
432
+ meta: { id: entry.id }
433
+ });
434
+ onEnqueueCb?.();
435
+ }, (text) => jsonParse(text), {
436
+ maxFrameBytes: MAX_UDS_FRAME_BYTES,
437
+ onFrameError: (error) => {
438
+ logForDebugging(`[udsMessaging] ${error.message}`);
439
+ closeWithError(error.message);
440
+ },
441
+ onInvalidFrame: (error) => {
442
+ logForDebugging(`[udsMessaging] invalid client frame: ${errorMessage(error)}`);
443
+ closeWithError("invalid frame");
444
+ },
445
+ destroyOnFrameError: false
446
+ });
447
+ socket.on("close", () => {
448
+ clearTimeout(authTimer);
449
+ clients.delete(socket);
450
+ });
451
+ socket.on("error", (err) => {
452
+ clearTimeout(authTimer);
453
+ clients.delete(socket);
454
+ logForDebugging(`[udsMessaging] client error: ${errorMessage(err)}`);
455
+ });
456
+ });
457
+ const rejectBeforeListen = (error) => {
458
+ reject(error);
459
+ };
460
+ const logRuntimeError = (error) => {
461
+ logForDebugging(`[udsMessaging] server error on ${path}${opts?.isExplicit ? " (explicit)" : ""}: ${errorMessage(error)}`);
462
+ };
463
+ srv.once("error", rejectBeforeListen);
464
+ srv.listen(path, () => {
465
+ (async () => {
466
+ try {
467
+ if (process.platform !== "win32") {
468
+ try {
469
+ await chmod(path, 384);
470
+ } catch (err) {
471
+ if (!(err instanceof Error && err.code === "ENOENT")) {
472
+ throw err;
473
+ }
474
+ logForDebugging(`[udsMessaging] chmod skipped: socket file not yet visible at ${path}`);
475
+ }
476
+ }
477
+ srv.off("error", rejectBeforeListen);
478
+ srv.on("error", logRuntimeError);
479
+ server = srv;
480
+ startedServer = srv;
481
+ resolve();
482
+ } catch (error) {
483
+ srv.off("error", rejectBeforeListen);
484
+ const closeError = error instanceof Error ? error : new Error(errorMessage(error));
485
+ let rejected = false;
486
+ const rejectOnce = () => {
487
+ if (rejected)
488
+ return;
489
+ rejected = true;
490
+ reject(closeError);
491
+ };
492
+ const fallback = setTimeout(rejectOnce, 1000);
493
+ unrefTimer(fallback);
494
+ srv.close(() => {
495
+ clearTimeout(fallback);
496
+ rejectOnce();
497
+ });
498
+ }
499
+ })();
500
+ });
501
+ });
502
+ await writeCapabilityFile(path, token);
503
+ socketPath = path;
504
+ process.env.CLAUDE_CODE_MESSAGING_SOCKET = path;
505
+ exportedSocketEnv = true;
506
+ logForDebugging(`[udsMessaging] server listening on ${path}${opts?.isExplicit ? " (explicit)" : ""}`);
507
+ } catch (error) {
508
+ if (capabilityFilePath) {
509
+ try {
510
+ await unlink(capabilityFilePath);
511
+ } catch {}
512
+ capabilityFilePath = null;
513
+ }
514
+ if (startedServer) {
515
+ await closeServer(startedServer);
516
+ }
517
+ if (server === startedServer) {
518
+ server = null;
519
+ }
520
+ await removeSocketPath(path);
521
+ if (exportedSocketEnv) {
522
+ delete process.env.CLAUDE_CODE_MESSAGING_SOCKET;
523
+ }
524
+ socketPath = null;
525
+ defaultSocketPath = null;
526
+ authToken = null;
527
+ throw error;
528
+ }
529
+ registerCleanup(async () => {
530
+ await stopUdsMessaging();
531
+ });
532
+ }
533
+ async function stopUdsMessaging() {
534
+ defaultSocketPath = null;
535
+ if (!server)
536
+ return;
537
+ for (const socket of clients) {
538
+ socket.destroy();
539
+ }
540
+ clients.clear();
541
+ await new Promise((resolve) => {
542
+ server.close(() => resolve());
543
+ });
544
+ server = null;
545
+ inbox.length = 0;
546
+ inboxBytes = 0;
547
+ onEnqueueCb = null;
548
+ if (socketPath) {
549
+ await removeSocketPath(socketPath);
550
+ delete process.env.CLAUDE_CODE_MESSAGING_SOCKET;
551
+ logForDebugging(`[udsMessaging] server stopped, socket removed: ${socketPath}`);
552
+ socketPath = null;
553
+ authToken = null;
554
+ }
555
+ if (capabilityFilePath) {
556
+ try {
557
+ await unlink(capabilityFilePath);
558
+ } catch {}
559
+ capabilityFilePath = null;
560
+ }
561
+ }
562
+ async function sendUdsMessage(targetSocketPath, message, opts = {}) {
563
+ const { createConnection } = await import("net");
564
+ const token = opts.authToken ?? authToken;
565
+ if (!token) {
566
+ throw new Error("Cannot send UDS message without auth token");
567
+ }
568
+ const outbound = withRequestAuthToken({
569
+ ...message,
570
+ from: message.from ?? socketPath ?? undefined,
571
+ ts: message.ts ?? new Date().toISOString()
572
+ }, token);
573
+ return new Promise((resolve, reject) => {
574
+ let settled = false;
575
+ let conn;
576
+ const finish = (error) => {
577
+ if (settled)
578
+ return;
579
+ settled = true;
580
+ if (error) {
581
+ conn.destroy(error);
582
+ reject(error);
583
+ } else {
584
+ conn.end();
585
+ resolve();
586
+ }
587
+ };
588
+ conn = createConnection(targetSocketPath, () => {
589
+ conn.write(jsonStringify(outbound) + `
590
+ `, (err) => {
591
+ if (err)
592
+ finish(err);
593
+ });
594
+ });
595
+ attachUdsResponseReader(conn, {
596
+ maxFrameBytes: MAX_UDS_FRAME_BYTES,
597
+ acceptPong: true,
598
+ onSettled: finish
599
+ });
600
+ conn.setTimeout(5000, () => {
601
+ finish(new Error("Connection timed out"));
602
+ });
603
+ });
604
+ }
605
+ var server = null, socketPath = null, onEnqueueCb = null, clients, inbox, nextId = 1, defaultSocketPath = null, authToken = null, capabilityFilePath = null, inboxBytes = 0, MAX_UDS_INBOX_ENTRIES = 1000, MAX_UDS_FRAME_BYTES, MAX_UDS_INBOX_BYTES, MAX_UDS_CLIENTS = 128, UDS_AUTH_TIMEOUT_MS = 2000, UDS_IDLE_TIMEOUT_MS = 30000;
606
+ var init_udsMessaging = __esm(() => {
607
+ init_cleanupRegistry();
608
+ init_debug();
609
+ init_errors();
610
+ init_envUtils();
611
+ init_ndjsonFramer();
612
+ init_udsResponseReader();
613
+ init_log();
614
+ init_slowOperations();
615
+ clients = new Set;
616
+ inbox = [];
617
+ MAX_UDS_FRAME_BYTES = 64 * 1024;
618
+ MAX_UDS_INBOX_BYTES = 2 * 1024 * 1024;
619
+ });
620
+
621
+ export { getChunkBytes, attachUdsResponseReader, init_udsResponseReader, MAX_UDS_INBOX_ENTRIES, MAX_UDS_FRAME_BYTES, MAX_UDS_INBOX_BYTES, MAX_UDS_CLIENTS, UDS_AUTH_TIMEOUT_MS, UDS_IDLE_TIMEOUT_MS, getDefaultUdsSocketPath, getUdsMessagingSocketPath, formatUdsAddress, parseUdsTarget, readUdsCapabilityToken, setOnEnqueue, drainInbox, startUdsMessaging, stopUdsMessaging, sendUdsMessage, init_udsMessaging };
622
+
623
+ //# debugId=0BFF4D376E7CE64E64756E2164756E21
624
+ //# sourceMappingURL=chunk-5vbtjcd2.js.map