@claudiolabs/claudin 0.5.7

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/LICENSE +207 -0
  2. package/README.md +91 -0
  3. package/bin/claudin +152 -0
  4. package/dist/chunks/AgentTool-0.5.7-0krqsszm.mjs +1 -0
  5. package/dist/chunks/App-0.5.7-k8c6xsbz.mjs +1 -0
  6. package/dist/chunks/ApproveApiKey-0.5.7-djmd358f.mjs +1 -0
  7. package/dist/chunks/AssistantSessionChooser-0.5.7-40f5p134.mjs +1 -0
  8. package/dist/chunks/AutoModeOptInDialog-0.5.7-dgpfkf7n.mjs +1 -0
  9. package/dist/chunks/BypassPermissionsModeDialog-0.5.7-m2n3zekg.mjs +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.7-8p2b9258.mjs +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-0.5.7-e11rkgsy.mjs +1 -0
  12. package/dist/chunks/DiffDialog-0.5.7-df3q0dyx.mjs +3 -0
  13. package/dist/chunks/Doctor-0.5.7-996gqph8.mjs +1 -0
  14. package/dist/chunks/Grove-0.5.7-7xphv8qp.mjs +1 -0
  15. package/dist/chunks/ITermBackend-0.5.7-rv5t26my.mjs +1 -0
  16. package/dist/chunks/InvalidConfigDialog-0.5.7-76awdeqe.mjs +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-0.5.7-d59ky2sv.mjs +1 -0
  18. package/dist/chunks/MigrationDialog-0.5.7-nkkcryn5.mjs +1 -0
  19. package/dist/chunks/Onboarding-0.5.7-v3jtvbkn.mjs +1 -0
  20. package/dist/chunks/ProviderManager-0.5.7-92navbez.mjs +1 -0
  21. package/dist/chunks/REPL-0.5.7-6zag11mg.mjs +1 -0
  22. package/dist/chunks/ResumeConversation-0.5.7-hpgm4f1s.mjs +1 -0
  23. package/dist/chunks/SnapshotUpdateDialog-0.5.7-xrverbhp.mjs +1 -0
  24. package/dist/chunks/TeleportProgress-0.5.7-xn5z7dt4.mjs +1 -0
  25. package/dist/chunks/TeleportRepoMismatchDialog-0.5.7-s29rrsak.mjs +1 -0
  26. package/dist/chunks/TeleportResumeWrapper-0.5.7-3r5mn1za.mjs +1 -0
  27. package/dist/chunks/TmuxBackend-0.5.7-k3c0537z.mjs +9 -0
  28. package/dist/chunks/ToolSearchTool-0.5.7-mybq3qz5.mjs +1 -0
  29. package/dist/chunks/TrustDialog-0.5.7-r4dhznyf.mjs +1 -0
  30. package/dist/chunks/activeProvider-0.5.7-8emdm8j8.mjs +1 -0
  31. package/dist/chunks/add-dir-0.5.7-jwaavdc7.mjs +1 -0
  32. package/dist/chunks/agents-0.5.7-e7dajmrs.mjs +110 -0
  33. package/dist/chunks/agents-0.5.7-q2vtj7pt.mjs +3 -0
  34. package/dist/chunks/api-0.5.7-j8bn129y.mjs +1 -0
  35. package/dist/chunks/asciicast-0.5.7-rp1h8swq.mjs +1 -0
  36. package/dist/chunks/assistant-0.5.7-sfk22b3z.mjs +1 -0
  37. package/dist/chunks/auth-0.5.7-ez3n1qpx.mjs +1 -0
  38. package/dist/chunks/auth-0.5.7-khssh83t.mjs +1 -0
  39. package/dist/chunks/autoMode-0.5.7-ezn856pd.mjs +48 -0
  40. package/dist/chunks/autoUpdater-0.5.7-dkw2aw1e.mjs +1 -0
  41. package/dist/chunks/backgroundHousekeeping-0.5.7-9ejvx75r.mjs +1 -0
  42. package/dist/chunks/branch-0.5.7-cjbtbwg1.mjs +4 -0
  43. package/dist/chunks/bridgePointer-0.5.7-5z0vqchx.mjs +1 -0
  44. package/dist/chunks/btw-0.5.7-p3kbd1wf.mjs +1 -0
  45. package/dist/chunks/buddy-0.5.7-pa55rfb4.mjs +3 -0
  46. package/dist/chunks/cacache-0.5.7-anq54jwq.mjs +1 -0
  47. package/dist/chunks/cache-probe-0.5.7-6j5hzxc4.mjs +21 -0
  48. package/dist/chunks/cacheStats-0.5.7-e1byp2n2.mjs +4 -0
  49. package/dist/chunks/caches-0.5.7-w8n6wxaj.mjs +1 -0
  50. package/dist/chunks/claudeDesktop-0.5.7-5kkyx4pz.mjs +1 -0
  51. package/dist/chunks/claudemd-0.5.7-jb7byep9.mjs +1 -0
  52. package/dist/chunks/clear-0.5.7-tkh04z2c.mjs +1 -0
  53. package/dist/chunks/clearTerminal-0.5.7-mbqev32s.mjs +1 -0
  54. package/dist/chunks/cli-0.5.7-023jpnwm.mjs +2 -0
  55. package/dist/chunks/cli-0.5.7-08mn1pmc.mjs +5 -0
  56. package/dist/chunks/cli-0.5.7-0bv1xcbe.mjs +21 -0
  57. package/dist/chunks/cli-0.5.7-0df5m6td.mjs +2 -0
  58. package/dist/chunks/cli-0.5.7-0rvzfmhb.mjs +2 -0
  59. package/dist/chunks/cli-0.5.7-0s7wtvbz.mjs +2 -0
  60. package/dist/chunks/cli-0.5.7-1fmgwk5c.mjs +2 -0
  61. package/dist/chunks/cli-0.5.7-1kmeaqmc.mjs +2 -0
  62. package/dist/chunks/cli-0.5.7-20cz322w.mjs +2 -0
  63. package/dist/chunks/cli-0.5.7-23hg3t0h.mjs +2 -0
  64. package/dist/chunks/cli-0.5.7-258ytmbr.mjs +2 -0
  65. package/dist/chunks/cli-0.5.7-26pwg6gg.mjs +2 -0
  66. package/dist/chunks/cli-0.5.7-2h4rgwc9.mjs +2 -0
  67. package/dist/chunks/cli-0.5.7-2qxsy7jq.mjs +12 -0
  68. package/dist/chunks/cli-0.5.7-2tnvc3ka.mjs +2 -0
  69. package/dist/chunks/cli-0.5.7-2xm61gkr.mjs +5 -0
  70. package/dist/chunks/cli-0.5.7-2ytftsg5.mjs +2 -0
  71. package/dist/chunks/cli-0.5.7-31969syr.mjs +2 -0
  72. package/dist/chunks/cli-0.5.7-31hdc2nc.mjs +2 -0
  73. package/dist/chunks/cli-0.5.7-35yf0b84.mjs +2 -0
  74. package/dist/chunks/cli-0.5.7-3jrq7w6x.mjs +2 -0
  75. package/dist/chunks/cli-0.5.7-3xssm25z.mjs +2 -0
  76. package/dist/chunks/cli-0.5.7-469r2a5r.mjs +193 -0
  77. package/dist/chunks/cli-0.5.7-4eg4pktt.mjs +2 -0
  78. package/dist/chunks/cli-0.5.7-4gmpny6k.mjs +133 -0
  79. package/dist/chunks/cli-0.5.7-4zv4np07.mjs +2 -0
  80. package/dist/chunks/cli-0.5.7-500c5b8m.mjs +4 -0
  81. package/dist/chunks/cli-0.5.7-52mwnwy6.mjs +58 -0
  82. package/dist/chunks/cli-0.5.7-55zn2cct.mjs +4 -0
  83. package/dist/chunks/cli-0.5.7-5736yt36.mjs +2 -0
  84. package/dist/chunks/cli-0.5.7-5aghfr8k.mjs +3 -0
  85. package/dist/chunks/cli-0.5.7-5by4fby4.mjs +2 -0
  86. package/dist/chunks/cli-0.5.7-5e5xfeq6.mjs +2 -0
  87. package/dist/chunks/cli-0.5.7-5jaayymr.mjs +17 -0
  88. package/dist/chunks/cli-0.5.7-5jms2g5g.mjs +2 -0
  89. package/dist/chunks/cli-0.5.7-5kv9dgvn.mjs +2 -0
  90. package/dist/chunks/cli-0.5.7-5mrw857q.mjs +4 -0
  91. package/dist/chunks/cli-0.5.7-5q6tfz39.mjs +2 -0
  92. package/dist/chunks/cli-0.5.7-650e2qk4.mjs +18 -0
  93. package/dist/chunks/cli-0.5.7-67xxeffj.mjs +2 -0
  94. package/dist/chunks/cli-0.5.7-6d26vvaa.mjs +2 -0
  95. package/dist/chunks/cli-0.5.7-6g3w68ks.mjs +2 -0
  96. package/dist/chunks/cli-0.5.7-6gfay8ap.mjs +2 -0
  97. package/dist/chunks/cli-0.5.7-6gkpb0vw.mjs +2 -0
  98. package/dist/chunks/cli-0.5.7-6pssgqdn.mjs +2 -0
  99. package/dist/chunks/cli-0.5.7-6thqe6p4.mjs +3 -0
  100. package/dist/chunks/cli-0.5.7-73er78b7.mjs +15 -0
  101. package/dist/chunks/cli-0.5.7-7a9gq9ff.mjs +2 -0
  102. package/dist/chunks/cli-0.5.7-7hm7dxyp.mjs +2 -0
  103. package/dist/chunks/cli-0.5.7-7k456xwn.mjs +3 -0
  104. package/dist/chunks/cli-0.5.7-7mmyazqh.mjs +34 -0
  105. package/dist/chunks/cli-0.5.7-7rgsmfw7.mjs +3 -0
  106. package/dist/chunks/cli-0.5.7-7wyhqw17.mjs +2 -0
  107. package/dist/chunks/cli-0.5.7-82x8qaxx.mjs +2 -0
  108. package/dist/chunks/cli-0.5.7-89fcvfy0.mjs +2 -0
  109. package/dist/chunks/cli-0.5.7-8ac9d7r6.mjs +2 -0
  110. package/dist/chunks/cli-0.5.7-8ap24w7a.mjs +2 -0
  111. package/dist/chunks/cli-0.5.7-8e61g5bq.mjs +10 -0
  112. package/dist/chunks/cli-0.5.7-8sbq2qed.mjs +2 -0
  113. package/dist/chunks/cli-0.5.7-8sqyymdb.mjs +2 -0
  114. package/dist/chunks/cli-0.5.7-8ychjqct.mjs +16 -0
  115. package/dist/chunks/cli-0.5.7-93eaxn9a.mjs +2 -0
  116. package/dist/chunks/cli-0.5.7-93k1z52y.mjs +2 -0
  117. package/dist/chunks/cli-0.5.7-9acdh8nc.mjs +2 -0
  118. package/dist/chunks/cli-0.5.7-9jck3vts.mjs +15 -0
  119. package/dist/chunks/cli-0.5.7-9rbmn26q.mjs +24 -0
  120. package/dist/chunks/cli-0.5.7-9sysdak3.mjs +2 -0
  121. package/dist/chunks/cli-0.5.7-9ysat94v.mjs +2 -0
  122. package/dist/chunks/cli-0.5.7-9z55nm22.mjs +3 -0
  123. package/dist/chunks/cli-0.5.7-9zwbnq8g.mjs +2 -0
  124. package/dist/chunks/cli-0.5.7-a47hzz3r.mjs +2 -0
  125. package/dist/chunks/cli-0.5.7-aq7a3646.mjs +2 -0
  126. package/dist/chunks/cli-0.5.7-ayjrdmrk.mjs +2 -0
  127. package/dist/chunks/cli-0.5.7-b51h487f.mjs +2 -0
  128. package/dist/chunks/cli-0.5.7-bkptgahs.mjs +4 -0
  129. package/dist/chunks/cli-0.5.7-bnapjxz4.mjs +2 -0
  130. package/dist/chunks/cli-0.5.7-bzrvdrq4.mjs +2 -0
  131. package/dist/chunks/cli-0.5.7-c1mv1399.mjs +2 -0
  132. package/dist/chunks/cli-0.5.7-c9dtw94k.mjs +2 -0
  133. package/dist/chunks/cli-0.5.7-cakvh73p.mjs +2 -0
  134. package/dist/chunks/cli-0.5.7-d19d4v07.mjs +2 -0
  135. package/dist/chunks/cli-0.5.7-d4gtv7f7.mjs +2 -0
  136. package/dist/chunks/cli-0.5.7-de90yre1.mjs +2 -0
  137. package/dist/chunks/cli-0.5.7-dntg9qbj.mjs +133 -0
  138. package/dist/chunks/cli-0.5.7-dp3z7wkh.mjs +2 -0
  139. package/dist/chunks/cli-0.5.7-dr7n1fyv.mjs +20 -0
  140. package/dist/chunks/cli-0.5.7-e8eqdfnf.mjs +2 -0
  141. package/dist/chunks/cli-0.5.7-eer6xagb.mjs +2 -0
  142. package/dist/chunks/cli-0.5.7-esx85d2g.mjs +2 -0
  143. package/dist/chunks/cli-0.5.7-eyemfxtz.mjs +2 -0
  144. package/dist/chunks/cli-0.5.7-fx3gesdm.mjs +2 -0
  145. package/dist/chunks/cli-0.5.7-g2dd5t6j.mjs +2 -0
  146. package/dist/chunks/cli-0.5.7-g4n7dg2d.mjs +9 -0
  147. package/dist/chunks/cli-0.5.7-g7k0r0ea.mjs +5 -0
  148. package/dist/chunks/cli-0.5.7-g8dqk0se.mjs +2 -0
  149. package/dist/chunks/cli-0.5.7-gcnk0vke.mjs +6 -0
  150. package/dist/chunks/cli-0.5.7-gnq8vh0c.mjs +2 -0
  151. package/dist/chunks/cli-0.5.7-gy4csxb5.mjs +2 -0
  152. package/dist/chunks/cli-0.5.7-h9v4tqbs.mjs +24 -0
  153. package/dist/chunks/cli-0.5.7-hdcnw5y4.mjs +2 -0
  154. package/dist/chunks/cli-0.5.7-hhre0h51.mjs +2 -0
  155. package/dist/chunks/cli-0.5.7-hp25yk8y.mjs +2 -0
  156. package/dist/chunks/cli-0.5.7-hq4wbper.mjs +11 -0
  157. package/dist/chunks/cli-0.5.7-hw11qa05.mjs +3 -0
  158. package/dist/chunks/cli-0.5.7-hw3pyj8g.mjs +2 -0
  159. package/dist/chunks/cli-0.5.7-j7h72bgz.mjs +2 -0
  160. package/dist/chunks/cli-0.5.7-j8q5bja8.mjs +2 -0
  161. package/dist/chunks/cli-0.5.7-jf3f8gen.mjs +2 -0
  162. package/dist/chunks/cli-0.5.7-jga8kgpr.mjs +2 -0
  163. package/dist/chunks/cli-0.5.7-jptzskw1.mjs +2 -0
  164. package/dist/chunks/cli-0.5.7-jw2te6th.mjs +2 -0
  165. package/dist/chunks/cli-0.5.7-k11mzgcb.mjs +2 -0
  166. package/dist/chunks/cli-0.5.7-kctf48t4.mjs +7 -0
  167. package/dist/chunks/cli-0.5.7-knkzkqbw.mjs +2 -0
  168. package/dist/chunks/cli-0.5.7-kp9pg4sr.mjs +2 -0
  169. package/dist/chunks/cli-0.5.7-kvazvrra.mjs +2 -0
  170. package/dist/chunks/cli-0.5.7-ky5khwx2.mjs +2 -0
  171. package/dist/chunks/cli-0.5.7-m0841vt9.mjs +2 -0
  172. package/dist/chunks/cli-0.5.7-m4ekdyhj.mjs +2 -0
  173. package/dist/chunks/cli-0.5.7-m4wwfa6q.mjs +2 -0
  174. package/dist/chunks/cli-0.5.7-m5q27x96.mjs +2 -0
  175. package/dist/chunks/cli-0.5.7-m82d23hf.mjs +2 -0
  176. package/dist/chunks/cli-0.5.7-mdcw5fyw.mjs +4 -0
  177. package/dist/chunks/cli-0.5.7-mz4njeb9.mjs +39 -0
  178. package/dist/chunks/cli-0.5.7-mzfr99sc.mjs +67 -0
  179. package/dist/chunks/cli-0.5.7-p381d4sx.mjs +3 -0
  180. package/dist/chunks/cli-0.5.7-p4mv49ab.mjs +25 -0
  181. package/dist/chunks/cli-0.5.7-pse9qff7.mjs +2 -0
  182. package/dist/chunks/cli-0.5.7-pzjz115k.mjs +2 -0
  183. package/dist/chunks/cli-0.5.7-q0pq4367.mjs +9 -0
  184. package/dist/chunks/cli-0.5.7-q2e6xpch.mjs +5281 -0
  185. package/dist/chunks/cli-0.5.7-q6sgd9ng.mjs +12 -0
  186. package/dist/chunks/cli-0.5.7-q8v8naf8.mjs +2 -0
  187. package/dist/chunks/cli-0.5.7-qdcp748z.mjs +2 -0
  188. package/dist/chunks/cli-0.5.7-qdqrgv1q.mjs +2 -0
  189. package/dist/chunks/cli-0.5.7-qk0n5hqa.mjs +9 -0
  190. package/dist/chunks/cli-0.5.7-r4cdt1b9.mjs +50 -0
  191. package/dist/chunks/cli-0.5.7-ra5kv4tw.mjs +2 -0
  192. package/dist/chunks/cli-0.5.7-rb75eq83.mjs +2 -0
  193. package/dist/chunks/cli-0.5.7-rggstqv6.mjs +2 -0
  194. package/dist/chunks/cli-0.5.7-rr1yd8f3.mjs +4 -0
  195. package/dist/chunks/cli-0.5.7-rzts2ke3.mjs +2 -0
  196. package/dist/chunks/cli-0.5.7-s09knvta.mjs +3 -0
  197. package/dist/chunks/cli-0.5.7-s5nd54ga.mjs +3 -0
  198. package/dist/chunks/cli-0.5.7-sb3fjts4.mjs +2 -0
  199. package/dist/chunks/cli-0.5.7-sjd6g3n6.mjs +15 -0
  200. package/dist/chunks/cli-0.5.7-sjx0wm99.mjs +2 -0
  201. package/dist/chunks/cli-0.5.7-skfm51ta.mjs +44 -0
  202. package/dist/chunks/cli-0.5.7-sx7pr75m.mjs +2 -0
  203. package/dist/chunks/cli-0.5.7-t6mtpr04.mjs +2 -0
  204. package/dist/chunks/cli-0.5.7-t8z48kc2.mjs +4 -0
  205. package/dist/chunks/cli-0.5.7-tbga87q3.mjs +2 -0
  206. package/dist/chunks/cli-0.5.7-tc3vm4ra.mjs +2 -0
  207. package/dist/chunks/cli-0.5.7-tgq7dtyz.mjs +2 -0
  208. package/dist/chunks/cli-0.5.7-tpjjm1z2.mjs +45 -0
  209. package/dist/chunks/cli-0.5.7-tqn2ged5.mjs +2 -0
  210. package/dist/chunks/cli-0.5.7-twqt7rxq.mjs +6 -0
  211. package/dist/chunks/cli-0.5.7-vgc7nzef.mjs +2 -0
  212. package/dist/chunks/cli-0.5.7-vk8p3n59.mjs +2 -0
  213. package/dist/chunks/cli-0.5.7-vn5aht50.mjs +2 -0
  214. package/dist/chunks/cli-0.5.7-vvrg78m6.mjs +2 -0
  215. package/dist/chunks/cli-0.5.7-vy4r02pg.mjs +4 -0
  216. package/dist/chunks/cli-0.5.7-vyxaeh82.mjs +2 -0
  217. package/dist/chunks/cli-0.5.7-w024nwsf.mjs +2 -0
  218. package/dist/chunks/cli-0.5.7-w16wj21h.mjs +2 -0
  219. package/dist/chunks/cli-0.5.7-w1bf9y93.mjs +3 -0
  220. package/dist/chunks/cli-0.5.7-w2fb8g6y.mjs +2 -0
  221. package/dist/chunks/cli-0.5.7-w50j12vv.mjs +2 -0
  222. package/dist/chunks/cli-0.5.7-w6nex68w.mjs +2 -0
  223. package/dist/chunks/cli-0.5.7-wz2cbwxt.mjs +4 -0
  224. package/dist/chunks/cli-0.5.7-x0n9mq65.mjs +2 -0
  225. package/dist/chunks/cli-0.5.7-x1azmh1g.mjs +2 -0
  226. package/dist/chunks/cli-0.5.7-x1w96j6d.mjs +59 -0
  227. package/dist/chunks/cli-0.5.7-x7dabprd.mjs +2 -0
  228. package/dist/chunks/cli-0.5.7-x8t1aeey.mjs +2 -0
  229. package/dist/chunks/cli-0.5.7-xepvraxn.mjs +2 -0
  230. package/dist/chunks/cli-0.5.7-xn6deh04.mjs +6 -0
  231. package/dist/chunks/cli-0.5.7-y2vc4xb6.mjs +12 -0
  232. package/dist/chunks/cli-0.5.7-y3pa8ttm.mjs +2 -0
  233. package/dist/chunks/cli-0.5.7-yaywev87.mjs +2 -0
  234. package/dist/chunks/cli-0.5.7-ycj2xr53.mjs +3 -0
  235. package/dist/chunks/cli-0.5.7-yzncgfs4.mjs +18 -0
  236. package/dist/chunks/cli-0.5.7-z1n09m4p.mjs +2 -0
  237. package/dist/chunks/cli-0.5.7-z97pranc.mjs +2 -0
  238. package/dist/chunks/cli-0.5.7-za19q18c.mjs +2 -0
  239. package/dist/chunks/cli-0.5.7-zb8ztx8p.mjs +2 -0
  240. package/dist/chunks/cli-0.5.7-zkw2fx86.mjs +2 -0
  241. package/dist/chunks/client-0.5.7-bqw74z29.mjs +1 -0
  242. package/dist/chunks/color-0.5.7-v1s3bvcj.mjs +1 -0
  243. package/dist/chunks/compact-0.5.7-7kxsprp5.mjs +3 -0
  244. package/dist/chunks/config-0.5.7-e41nnxnm.mjs +1 -0
  245. package/dist/chunks/config-0.5.7-q40ykcbb.mjs +1 -0
  246. package/dist/chunks/context-0.5.7-qvcehmj5.mjs +1 -0
  247. package/dist/chunks/context-noninteractive-0.5.7-02tkje0w.mjs +1 -0
  248. package/dist/chunks/conversation-0.5.7-h7r20gzw.mjs +1 -0
  249. package/dist/chunks/copy-0.5.7-p3xxq9b3.mjs +9 -0
  250. package/dist/chunks/cost-0.5.7-s3rzm0vd.mjs +1 -0
  251. package/dist/chunks/createSSHSession-0.5.7-s9fc5f1h.mjs +1 -0
  252. package/dist/chunks/createSession-0.5.7-4e64teqm.mjs +1 -0
  253. package/dist/chunks/debug-0.5.7-v8bqkmzm.mjs +1 -0
  254. package/dist/chunks/desktop-0.5.7-tna0yskx.mjs +1 -0
  255. package/dist/chunks/detectRepository-0.5.7-3dy7yz89.mjs +1 -0
  256. package/dist/chunks/detection-0.5.7-39zsjy8t.mjs +1 -0
  257. package/dist/chunks/diff-0.5.7-9ywmnxmx.mjs +1 -0
  258. package/dist/chunks/doctor-0.5.7-ty5zxpem.mjs +1 -0
  259. package/dist/chunks/doctorDiagnostic-0.5.7-g458bh9g.mjs +1 -0
  260. package/dist/chunks/earlyInput-0.5.7-x73yj3dn.mjs +1 -0
  261. package/dist/chunks/effort-0.5.7-h76k43fj.mjs +10 -0
  262. package/dist/chunks/envUtils-0.5.7-w1t7akfc.mjs +1 -0
  263. package/dist/chunks/environmentSelection-0.5.7-5dsnr0sv.mjs +1 -0
  264. package/dist/chunks/environments-0.5.7-pqh2gnjb.mjs +1 -0
  265. package/dist/chunks/errors-0.5.7-pa0hz043.mjs +1 -0
  266. package/dist/chunks/exampleCommands-0.5.7-3dtjxdad.mjs +1 -0
  267. package/dist/chunks/exit-0.5.7-0wrw77gk.mjs +1 -0
  268. package/dist/chunks/export-0.5.7-zw9rbf4j.mjs +2 -0
  269. package/dist/chunks/extra-usage-0.5.7-rfya84j0.mjs +1 -0
  270. package/dist/chunks/extra-usage-noninteractive-0.5.7-a1b9ndnm.mjs +1 -0
  271. package/dist/chunks/fast-0.5.7-2p6srbep.mjs +1 -0
  272. package/dist/chunks/feedback-0.5.7-181z18rn.mjs +14 -0
  273. package/dist/chunks/firstPartyEventLogger-0.5.7-xndd9dd0.mjs +1 -0
  274. package/dist/chunks/git-0.5.7-7gyptyxn.mjs +1 -0
  275. package/dist/chunks/githubModelsCredentials-0.5.7-9zhn44n6.mjs +1 -0
  276. package/dist/chunks/growthbook-0.5.7-1mynkk8j.mjs +1 -0
  277. package/dist/chunks/headless-0.5.7-9f87m6f5.mjs +2 -0
  278. package/dist/chunks/heapdump-0.5.7-ns6mqawv.mjs +6 -0
  279. package/dist/chunks/help-0.5.7-px56h6fs.mjs +1 -0
  280. package/dist/chunks/hookChains-0.5.7-1a6qvexe.mjs +3 -0
  281. package/dist/chunks/hooks-0.5.7-azm2m6rs.mjs +79 -0
  282. package/dist/chunks/hooks-0.5.7-fyp8e3f5.mjs +1 -0
  283. package/dist/chunks/ide-0.5.7-v9hbn8cp.mjs +3 -0
  284. package/dist/chunks/image-processor-napi-0.5.7-e41p58ef.mjs +1 -0
  285. package/dist/chunks/index-0.5.7-0tncgnn3.mjs +1 -0
  286. package/dist/chunks/index-0.5.7-30mrmtkn.mjs +1 -0
  287. package/dist/chunks/index-0.5.7-62s7cp1b.mjs +1 -0
  288. package/dist/chunks/index-0.5.7-69akvbm4.mjs +1 -0
  289. package/dist/chunks/index-0.5.7-6y6f5cws.mjs +1 -0
  290. package/dist/chunks/index-0.5.7-7w3agvzm.mjs +10 -0
  291. package/dist/chunks/index-0.5.7-8jwymzr6.mjs +1 -0
  292. package/dist/chunks/index-0.5.7-8m53gyr6.mjs +9 -0
  293. package/dist/chunks/index-0.5.7-ct6jw15p.mjs +2 -0
  294. package/dist/chunks/index-0.5.7-dr470b86.mjs +1 -0
  295. package/dist/chunks/index-0.5.7-e4rvp0fn.mjs +1 -0
  296. package/dist/chunks/index-0.5.7-fkw6rn8z.mjs +1 -0
  297. package/dist/chunks/index-0.5.7-h1xjcbtb.mjs +1 -0
  298. package/dist/chunks/index-0.5.7-ma3xmxv3.mjs +2 -0
  299. package/dist/chunks/index-0.5.7-qn7zmh31.mjs +9 -0
  300. package/dist/chunks/index-0.5.7-rd44m0e6.mjs +30 -0
  301. package/dist/chunks/index-0.5.7-te1s21zz.mjs +5 -0
  302. package/dist/chunks/index-0.5.7-vm9zmzmr.mjs +1 -0
  303. package/dist/chunks/index-0.5.7-wpffxvtn.mjs +1 -0
  304. package/dist/chunks/index-0.5.7-wwfn7x53.mjs +1 -0
  305. package/dist/chunks/index-0.5.7-ybcvbcjt.mjs +1 -0
  306. package/dist/chunks/index-0.5.7-yw3tp60c.mjs +1 -0
  307. package/dist/chunks/initReplBridge-0.5.7-xpy8ap8n.mjs +1 -0
  308. package/dist/chunks/ink-0.5.7-dwmx157s.mjs +1 -0
  309. package/dist/chunks/insights-0.5.7-5fpd27dr.mjs +870 -0
  310. package/dist/chunks/install-0.5.7-6sc73ew8.mjs +1 -0
  311. package/dist/chunks/install-github-app-0.5.7-jcyktynf.mjs +149 -0
  312. package/dist/chunks/install-slack-app-0.5.7-mk4a14ww.mjs +1 -0
  313. package/dist/chunks/instrumentation-0.5.7-116w6tf4.mjs +1 -0
  314. package/dist/chunks/interactiveHelpers-0.5.7-zbfkwcsb.mjs +1 -0
  315. package/dist/chunks/keybindings-0.5.7-k2s0bryc.mjs +2 -0
  316. package/dist/chunks/knowledge-0.5.7-55b2ckth.mjs +2 -0
  317. package/dist/chunks/latestVersionCache-0.5.7-k9pyxzrk.mjs +1 -0
  318. package/dist/chunks/loadAgentsDir-0.5.7-9bmbg04z.mjs +1 -0
  319. package/dist/chunks/loadPluginHooks-0.5.7-bcdwwerp.mjs +1 -0
  320. package/dist/chunks/loadPluginHooks-0.5.7-mdt3yvfc.mjs +1 -0
  321. package/dist/chunks/log-0.5.7-wcft0eyv.mjs +1 -0
  322. package/dist/chunks/main-0.5.7-9sxhszx9.mjs +1236 -0
  323. package/dist/chunks/managedEnv-0.5.7-k4gyyt60.mjs +1 -0
  324. package/dist/chunks/mcp-0.5.7-9z74evcf.mjs +1 -0
  325. package/dist/chunks/mcp-0.5.7-djz3mjw4.mjs +4 -0
  326. package/dist/chunks/mcp-0.5.7-n62qd49c.mjs +17 -0
  327. package/dist/chunks/mcpb-0.5.7-bqt73vjr.mjs +1 -0
  328. package/dist/chunks/memory-0.5.7-chxjrvf2.mjs +3 -0
  329. package/dist/chunks/mobile-0.5.7-y0cn32br.mjs +2 -0
  330. package/dist/chunks/model-0.5.7-7mt2xn7w.mjs +1 -0
  331. package/dist/chunks/model-0.5.7-fdhr0cwa.mjs +2 -0
  332. package/dist/chunks/oauth-0.5.7-xf0qbv6v.mjs +1 -0
  333. package/dist/chunks/openaiShim-0.5.7-0cejk3sb.mjs +14 -0
  334. package/dist/chunks/output-style-0.5.7-t5qc5jxe.mjs +1 -0
  335. package/dist/chunks/package-APBHZ5F3-0.5.7-7bp8s9sg.mjs +1 -0
  336. package/dist/chunks/parseConnectUrl-0.5.7-903apk0t.mjs +1 -0
  337. package/dist/chunks/parser-0.5.7-jnq01hth.mjs +1 -0
  338. package/dist/chunks/passes-0.5.7-nk3fgxyh.mjs +1 -0
  339. package/dist/chunks/permissions-0.5.7-q7whkp76.mjs +3 -0
  340. package/dist/chunks/plan-0.5.7-w5hgy3s7.mjs +1 -0
  341. package/dist/chunks/plist-0.5.7-jwz5qjtz.mjs +1 -0
  342. package/dist/chunks/plugin-0.5.7-x7xcey6d.mjs +29 -0
  343. package/dist/chunks/pluginStartupCheck-0.5.7-gy2e0dge.mjs +1 -0
  344. package/dist/chunks/plugins-0.5.7-2ehzph1a.mjs +9 -0
  345. package/dist/chunks/print-0.5.7-mjx6j0dk.mjs +57 -0
  346. package/dist/chunks/privacy-settings-0.5.7-rkmc34t8.mjs +1 -0
  347. package/dist/chunks/process-0.5.7-8c0qwpv6.mjs +1 -0
  348. package/dist/chunks/processBashCommand-0.5.7-czwzjsj9.mjs +1 -0
  349. package/dist/chunks/processSlashCommand-0.5.7-512rz16m.mjs +9 -0
  350. package/dist/chunks/prompt-0.5.7-r8ewyzer.mjs +1 -0
  351. package/dist/chunks/prompt-0.5.7-z98k679g.mjs +1 -0
  352. package/dist/chunks/prompts-0.5.7-g8mh8as5.mjs +1 -0
  353. package/dist/chunks/protocolHandler-0.5.7-p86as7s6.mjs +13 -0
  354. package/dist/chunks/provider-0.5.7-x4t1g0nh.mjs +2 -0
  355. package/dist/chunks/providerProfiles-0.5.7-dz70g8ys.mjs +1 -0
  356. package/dist/chunks/rate-limit-options-0.5.7-n282sweb.mjs +1 -0
  357. package/dist/chunks/registry-0.5.7-h8q8eay6.mjs +1 -0
  358. package/dist/chunks/release-notes-0.5.7-2h20frk0.mjs +5 -0
  359. package/dist/chunks/reload-plugins-0.5.7-z50apk74.mjs +2 -0
  360. package/dist/chunks/remote-env-0.5.7-08abe77m.mjs +1 -0
  361. package/dist/chunks/remoteBridgeCore-0.5.7-jdasqn18.mjs +1 -0
  362. package/dist/chunks/remoteSession-0.5.7-nq05jhdv.mjs +1 -0
  363. package/dist/chunks/rename-0.5.7-812j1w4d.mjs +1 -0
  364. package/dist/chunks/replBridgeHandle-0.5.7-aa3cp3ea.mjs +1 -0
  365. package/dist/chunks/resume-0.5.7-weq0rn3m.mjs +2 -0
  366. package/dist/chunks/rewind-0.5.7-y54y78kx.mjs +1 -0
  367. package/dist/chunks/sandbox-adapter-0.5.7-tb5qenm4.mjs +1 -0
  368. package/dist/chunks/sandbox-toggle-0.5.7-nxcpekeq.mjs +1 -0
  369. package/dist/chunks/session-0.5.7-ky2s0856.mjs +2 -0
  370. package/dist/chunks/sessionDiscovery-0.5.7-wr82xcxs.mjs +1 -0
  371. package/dist/chunks/sessionFileAccessHooks-0.5.7-0j8f4we0.mjs +1 -0
  372. package/dist/chunks/sessionStorage-0.5.7-qghsxmr2.mjs +1 -0
  373. package/dist/chunks/settings-0.5.7-xa4hccmb.mjs +1 -0
  374. package/dist/chunks/setup-0.5.7-s4yfpbyd.mjs +5 -0
  375. package/dist/chunks/sinks-0.5.7-feq030bq.mjs +1 -0
  376. package/dist/chunks/skills-0.5.7-h2r9d209.mjs +1 -0
  377. package/dist/chunks/startupProfiler-0.5.7-f44bsnqn.mjs +1 -0
  378. package/dist/chunks/startupUpdateCheck-0.5.7-7ff14fag.mjs +1 -0
  379. package/dist/chunks/state-0.5.7-cwk8b4cx.mjs +1 -0
  380. package/dist/chunks/stats-0.5.7-wd077xj7.mjs +6 -0
  381. package/dist/chunks/status-0.5.7-5qy7pnk9.mjs +1 -0
  382. package/dist/chunks/stickers-0.5.7-7s145w6d.mjs +1 -0
  383. package/dist/chunks/subprocessEnv-0.5.7-5dv3w3xn.mjs +1 -0
  384. package/dist/chunks/tasks-0.5.7-q79z0h3e.mjs +1 -0
  385. package/dist/chunks/teamHelpers-0.5.7-b8qf5f0d.mjs +1 -0
  386. package/dist/chunks/teammateModeSnapshot-0.5.7-kvmjwag8.mjs +1 -0
  387. package/dist/chunks/teleport-0.5.7-x740q45r.mjs +1 -0
  388. package/dist/chunks/terminalSetup-0.5.7-z8ytqt6q.mjs +1 -0
  389. package/dist/chunks/theme-0.5.7-9asaqpc9.mjs +1 -0
  390. package/dist/chunks/thinkback-0.5.7-6bzqdm8h.mjs +1 -0
  391. package/dist/chunks/thinkback-play-0.5.7-5m54zaez.mjs +1 -0
  392. package/dist/chunks/toolPool-0.5.7-5rd6jp71.mjs +1 -0
  393. package/dist/chunks/toolSearch-0.5.7-wgqasfmq.mjs +1 -0
  394. package/dist/chunks/trustedDevice-0.5.7-5qbzragc.mjs +1 -0
  395. package/dist/chunks/turndown.cjs-0.5.7-3fjybn8j.mjs +69 -0
  396. package/dist/chunks/ultrareviewCommand-0.5.7-98p7mn4r.mjs +4 -0
  397. package/dist/chunks/update-0.5.7-2jgnt5gj.mjs +86 -0
  398. package/dist/chunks/upgrade-0.5.7-1fa84f4g.mjs +1 -0
  399. package/dist/chunks/upstreamproxy-0.5.7-1p7vn612.mjs +14 -0
  400. package/dist/chunks/url-handler-napi-0.5.7-312p1719.mjs +1 -0
  401. package/dist/chunks/usage-0.5.7-qrsabcka.mjs +1 -0
  402. package/dist/chunks/util-0.5.7-tpzcah5j.mjs +1 -0
  403. package/dist/chunks/utils-0.5.7-8a2ekyr5.mjs +1 -0
  404. package/dist/chunks/vim-0.5.7-w4e8vpjf.mjs +1 -0
  405. package/dist/chunks/watcher-0.5.7-cj50b60x.mjs +1 -0
  406. package/dist/chunks/wiki-0.5.7-ccjdtg8v.mjs +132 -0
  407. package/dist/chunks/worktree-0.5.7-g8wrf9zf.mjs +1 -0
  408. package/dist/chunks/worktreeModeEnabled-0.5.7-w4jdaq8p.mjs +1 -0
  409. package/dist/chunks/wrapper-0.5.7-8k82xd0n.mjs +7 -0
  410. package/dist/claudin-vscode.vsix +0 -0
  411. package/dist/cli.mjs +7 -0
  412. package/package.json +141 -0
  413. package/scripts/v8cache-gc.mjs +84 -0
@@ -0,0 +1,24 @@
1
+ import{Xa as LY}from"./cli-0.5.7-x1azmh1g.mjs";import{Bd as HY,Ed as lQ}from"./cli-0.5.7-2ytftsg5.mjs";import{ah as kY,bh as zW}from"./cli-0.5.7-m4ekdyhj.mjs";import{$L as AW,AN as wZ,Av as p0,Bv as u0,Cv as m0,DP as NY,Dv as c0,Ev as g0,Fv as d0,GP as BY,Gv as l0,HD as M0,Hv as a0,ID as a9,Iv as WQ,Jn as J9,Kn as SW,Ln as H9,Lr as s0,MK as JY,ML as uY,Mn as N9,Mr as fQ,Mx as SY,Nn as FZ,Nr as VY,OK as dQ,On as eZ,Or as mQ,Pn as B9,Pr as fY,Px as BW,Qn as WZ,Rn as Z0,Sn as L9,Tn as z9,UH as U9,UM as s,Un as iY,VL as mY,Vt as F0,WH as E9,XL as cY,YA as KY,Yt as l9,ZA as cQ,_H as y9,_M as gY,_q as $0,br as j0,cr as TZ,eN as dY,fI as lW,fN as SZ,gk as UZ,gr as d9,hi as XZ,iB as GY,jB as gQ,jN as hZ,jk as EZ,kB as IY,kF as b0,kH as yY,ki as w0,kk as o0,lF as n9,mB as HW,mo as nZ,nH as XW,no as qY,on as O9,oo as $Z,oy as hY,pi as RY,pn as dW,po as DY,qB as i,qP as lY,qy as LW,rv as R0,sB as vW,sv as kZ,tv as f0,tz as xY,uv as S0,uz as qW,vv as h0,wv as k0,wy as MY,xv as xZ,xy as bY,yv as pZ,yy as JW,yz as pY,zP as aY,zv as x0,zz as DW}from"./cli-0.5.7-q2e6xpch.mjs";import{OR as eY,SR as bW}from"./cli-0.5.7-h9v4tqbs.mjs";import{AT as c9,zT as y0}from"./cli-0.5.7-yaywev87.mjs";import{AU as u9,NU as U0,OU as E0,PU as m9,VU as P0,WU as g9,zU as O0}from"./cli-0.5.7-7a9gq9ff.mjs";import{KW as p,MW as F,pX as p9,rV as x9}from"./cli-0.5.7-x1w96j6d.mjs";import{OY as a,PY as E,QY as M,RY as V0}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as k9}from"./cli-0.5.7-8sbq2qed.mjs";import{B3 as WW,E2 as EY,Y0 as UY,a1 as QW}from"./cli-0.5.7-8ychjqct.mjs";import{B6 as e,C_ as gW,J6 as v0,K$ as OY,K6 as vZ,L6 as f9,M7 as mW,S8 as cW,T$ as YW,V8 as tY,_8 as MW,k6 as XY,m6 as uQ,n7 as A9,r8 as CZ,s6 as D0,t8 as S9,v6 as R9,v_ as w9,w8 as _9}from"./cli-0.5.7-469r2a5r.mjs";import{Gca as Y,Hca as k,Ica as KZ,Jca as q,Kca as OZ}from"./cli-0.5.7-mzfr99sc.mjs";import{Vca as A0,bda as _0,fda as h9}from"./cli-0.5.7-5mrw857q.mjs";import{Ada as ZW,xda as _Y,yda as wY}from"./cli-0.5.7-0s7wtvbz.mjs";import{Lda as nY,Wda as OW}from"./cli-0.5.7-35yf0b84.mjs";import{Cea as T9,Zda as AY,_da as eQ,aea as IZ,dea as J0,eea as H0,fea as N0,gea as B0,jea as L0,kea as z0,wea as q0}from"./cli-0.5.7-sjx0wm99.mjs";import{Nea as d,Pea as _Z}from"./cli-0.5.7-26pwg6gg.mjs";import{Pfa as b,Sfa as GZ,cfa as sY,efa as FW,sfa as ZZ,tfa as QY,xfa as PZ}from"./cli-0.5.7-twqt7rxq.mjs";import{Ufa as WY,Yfa as pQ}from"./cli-0.5.7-pse9qff7.mjs";import{Gga as v9,Hga as oZ,Nga as gZ,yga as YY}from"./cli-0.5.7-skfm51ta.mjs";import{Gja as vY,Yka as V9,Zka as zZ,_ka as K9,ala as G9,fma as FY,ima as HZ,ria as JZ,xia as Y0,yia as oY}from"./cli-0.5.7-hp25yk8y.mjs";import{Vma as G0,Yma as fZ,Zma as AZ,_ma as aZ}from"./cli-0.5.7-258ytmbr.mjs";var YQ={};fZ(YQ,{selectableUserMessagesFilter:()=>T0,messagesAfterAreOnlySynthetic:()=>ZQ,MessageSelector:()=>r9});import{randomUUID as i9}from"crypto";import*as QZ from"path";function I0(Q){return Q.type==="text"}function RZ(Q){return Q==="summarize"||Q==="summarize_up_to"}function r9({messages:Q,onPreRestore:Z,onRestoreMessage:W,onRestoreCode:X,onSummarize:V,onClose:J,preselectedMessage:K}){let H=F0((U)=>U.fileHistory),[B,z]=I.useState(void 0),G=$0(),L=I.useMemo(i9,[]),w=I.useMemo(()=>[...Q.filter(T0),{...s({content:""}),uuid:L}],[Q,L]),[v,_]=I.useState(w.length-1),P=Math.max(0,Math.min(v-Math.floor(bZ/2),w.length-bZ)),C=w.length>1,[D,$]=I.useState(K),[y,T]=I.useState(void 0);I.useEffect(()=>{if(!K||!G)return;let U=!1;return TZ(H,K.uuid).then((f)=>{if(!U)T(f)}),()=>{U=!0}},[K,G,H]);let[O,j]=I.useState(!1),[l,n]=I.useState(null),[S,m]=I.useState("both"),[g,x]=I.useState(""),[A,N]=I.useState("");function R(U){let f=U?[{value:"both",label:"Restore code and conversation"},{value:"conversation",label:"Restore conversation"},{value:"code",label:"Restore code"}]:[{value:"conversation",label:"Restore conversation"}],u={type:"input",placeholder:"add context (optional)",initialValue:"",allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:": "};return f.push({value:"summarize",label:"Summarize from here",...u,onChange:x}),f.push({value:"nevermind",label:"Never mind"}),f}I.useEffect(()=>{d("tengu_message_selector_opened",{})},[]);async function h(U){Z(),j(!0);try{await W(U),j(!1),J()}catch(f){e(f),j(!1),z(`Failed to restore the conversation:
2
+ ${f}`)}}async function r(U){let f=Q.indexOf(U),u=Q.length-1-f;if(d("tengu_message_selector_selected",{index_from_end:u,message_type:U.type,is_current_prompt:!1}),!Q.includes(U)){J();return}if(!G){await h(U);return}let c=await TZ(H,U.uuid);$(U),T(c)}async function t(U){if(d("tengu_message_selector_restore_option_selected",{option:U}),!D){z("Message not found.");return}if(U==="nevermind"){if(K)J();else $(void 0);return}if(RZ(U)){Z(),j(!0),n(U),z(void 0);try{let c=U==="summarize_up_to"?"up_to":"from",YZ=(c==="up_to"?A:g).trim()||void 0;await V(D,YZ,c),j(!1),n(null),$(void 0),J()}catch(c){e(c),j(!1),n(null),$(void 0),z(`Failed to summarize:
3
+ ${c}`)}return}Z(),j(!0),z(void 0);let f=null,u=null;if(U==="code"||U==="both")try{await X(D)}catch(c){f=c,e(f)}if(U==="conversation"||U==="both")try{await W(D)}catch(c){u=c,e(u)}if(j(!1),$(void 0),u&&f)z(`Failed to restore the conversation and code:
4
+ ${u}
5
+ ${f}`);else if(u)z(`Failed to restore the conversation:
6
+ ${u}`);else if(f)z(`Failed to restore the code:
7
+ ${f}`);else J()}let Q0=y0(),$9=I.useCallback(()=>{if(D&&!K){$(void 0);return}d("tengu_message_selector_cancelled",{}),J()},[J,D,K]),j9=I.useCallback(()=>_((U)=>Math.max(0,U-1)),[]),F9=I.useCallback(()=>_((U)=>Math.min(w.length-1,U+1)),[w.length]),M9=I.useCallback(()=>_(0),[]),b9=I.useCallback(()=>_(w.length-1),[w.length]),I9=I.useCallback(()=>{let U=w[v];if(U)r(U)},[w,v,r]);U0("confirm:no",$9,{context:"Confirmation",isActive:!D}),E0({"messageSelector:up":j9,"messageSelector:down":F9,"messageSelector:top":M9,"messageSelector:bottom":b9,"messageSelector:select":I9},{context:"MessageSelector",isActive:!O&&!B&&!D&&C});let[W0,X0]=I.useState({});I.useEffect(()=>{async function U(){if(!G)return;Promise.all(w.map(async(f,u)=>{if(f.uuid!==L){let c=j0(H,f.uuid),YZ=w.at(u+1),DZ=c?e9(Q,f.uuid,YZ?.uuid!==L?YZ?.uuid:void 0):void 0;if(DZ!==void 0)X0((o)=>({...o,[u]:DZ}));else X0((o)=>({...o,[u]:void 0}))}}))}U()},[w,Q,L,H,G]);let qZ=G&&y?.filesChanged&&y.filesChanged.length>0,C9=!B&&!D&&!K&&C;return M(p,{flexDirection:"column",width:"100%",children:[E(P0,{color:"suggestion"}),M(p,{flexDirection:"column",marginX:1,gap:1,children:[E(F,{bold:!0,color:"suggestion",children:"Rewind"}),B&&E(a,{children:M(F,{color:"error",children:["Error: ",B]})}),!C&&E(a,{children:E(F,{children:"Nothing to rewind to yet."})}),!B&&D&&C&&M(a,{children:[M(F,{children:["Confirm you want to restore"," ",!y&&"the conversation ","to the point before you sent this message:"]}),M(p,{flexDirection:"column",paddingLeft:1,borderStyle:"single",borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[E(K0,{userMessage:D,color:"text",isCurrent:!1}),M(F,{dimColor:!0,children:["(",_0(new Date(D.timestamp)),")"]})]}),E(s9,{selectedRestoreOption:S,canRestoreCode:!!qZ,diffStatsForRestore:y}),O&&RZ(l)?M(p,{flexDirection:"row",gap:1,children:[E(b0,{}),E(F,{children:"Summarizing…"})]}):E(M0,{isDisabled:O,options:R(!!qZ),defaultFocusValue:qZ?"both":"conversation",onFocus:(U)=>m(U),onChange:(U)=>t(U),onCancel:()=>K?J():$(void 0)}),qZ&&E(p,{marginBottom:1,children:M(F,{dimColor:!0,children:[vZ.warning," Rewinding does not affect files edited manually or via bash."]})})]}),C9&&M(a,{children:[G?E(F,{children:"Restore the code and/or conversation to the point before…"}):E(F,{children:"Restore and fork the conversation to the point before…"}),E(p,{width:"100%",flexDirection:"column",children:w.slice(P,P+bZ).map((U,f)=>{let u=P+f,c=u===v,YZ=U.uuid===L,DZ=u in W0,o=W0[u],MZ=o?.filesChanged&&o.filesChanged.length;return M(p,{height:G?3:2,overflow:"hidden",width:"100%",flexDirection:"row",children:[E(p,{width:2,minWidth:2,children:c?M(F,{color:"permission",bold:!0,children:[vZ.pointer," "]}):E(F,{children:" "})}),M(p,{flexDirection:"column",children:[E(p,{flexShrink:1,height:1,overflow:"hidden",children:E(K0,{userMessage:U,color:c?"suggestion":void 0,isCurrent:YZ,paddingRight:10})}),G&&DZ&&E(p,{height:1,flexDirection:"row",children:o?E(a,{children:E(F,{dimColor:!c,color:"inactive",children:MZ?M(a,{children:[MZ===1&&o.filesChanged[0]?`${QZ.basename(o.filesChanged[0])} `:`${MZ} files changed `,E(C0,{diffStats:o})]}):E(a,{children:"No code changes"})})}):M(F,{dimColor:!0,color:"warning",children:[vZ.warning," No code restore"]})})]})]},U.uuid)})})]}),!D&&E(F,{dimColor:!0,italic:!0,children:Q0.pending?M(a,{children:["Press ",Q0.keyName," again to exit"]}):M(a,{children:[!B&&C&&"Enter to continue · ","Esc to exit"]})})]})]})}function o9(Q){switch(Q){case"summarize":return"Messages after this point will be summarized.";case"summarize_up_to":return"Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.";case"both":case"conversation":return"The conversation will be forked.";case"code":case"nevermind":return"The conversation will be unchanged."}}function s9(Q){let Z=VZ.c(11),{selectedRestoreOption:W,canRestoreCode:X,diffStatsForRestore:V}=Q,J=X&&(W==="both"||W==="code"),K;if(Z[0]!==W)K=o9(W),Z[0]=W,Z[1]=K;else K=Z[1];let H;if(Z[2]!==K)H=E(F,{dimColor:!0,children:K}),Z[2]=K,Z[3]=H;else H=Z[3];let B;if(Z[4]!==V||Z[5]!==W||Z[6]!==J)B=!RZ(W)&&(J?E(t9,{diffStatsForRestore:V}):E(F,{dimColor:!0,children:"The code will be unchanged."})),Z[4]=V,Z[5]=W,Z[6]=J,Z[7]=B;else B=Z[7];let z;if(Z[8]!==H||Z[9]!==B)z=M(p,{flexDirection:"column",children:[H,B]}),Z[8]=H,Z[9]=B,Z[10]=z;else z=Z[10];return z}function t9(Q){let Z=VZ.c(14),{diffStatsForRestore:W}=Q;if(W===void 0)return;if(!W.filesChanged||!W.filesChanged[0]){let H;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))H=E(F,{dimColor:!0,children:"The code has not changed (nothing will be restored)."}),Z[0]=H;else H=Z[0];return H}let X=W.filesChanged.length,V;if(X===1){let H;if(Z[1]!==W.filesChanged[0])H=QZ.basename(W.filesChanged[0]||""),Z[1]=W.filesChanged[0],Z[2]=H;else H=Z[2];V=H}else if(X===2){let H;if(Z[3]!==W.filesChanged[0])H=QZ.basename(W.filesChanged[0]||""),Z[3]=W.filesChanged[0],Z[4]=H;else H=Z[4];let B=H,z;if(Z[5]!==W.filesChanged[1])z=QZ.basename(W.filesChanged[1]||""),Z[5]=W.filesChanged[1],Z[6]=z;else z=Z[6];V=`${B} and ${z}`}else{let H;if(Z[7]!==W.filesChanged[0])H=QZ.basename(W.filesChanged[0]||""),Z[7]=W.filesChanged[0],Z[8]=H;else H=Z[8];V=`${H} and ${W.filesChanged.length-1} other files`}let J;if(Z[9]!==W)J=E(C0,{diffStats:W}),Z[9]=W,Z[10]=J;else J=Z[10];let K;if(Z[11]!==V||Z[12]!==J)K=E(a,{children:M(F,{dimColor:!0,children:["The code will be restored"," ",J," in ",V,"."]})}),Z[11]=V,Z[12]=J,Z[13]=K;else K=Z[13];return K}function C0(Q){let Z=VZ.c(7),{diffStats:W}=Q;if(!W||!W.filesChanged)return;let X;if(Z[0]!==W.insertions)X=M(F,{color:"diffAddedWord",children:["+",W.insertions," "]}),Z[0]=W.insertions,Z[1]=X;else X=Z[1];let V;if(Z[2]!==W.deletions)V=M(F,{color:"diffRemovedWord",children:["-",W.deletions]}),Z[2]=W.deletions,Z[3]=V;else V=Z[3];let J;if(Z[4]!==X||Z[5]!==V)J=M(a,{children:[X,V]}),Z[4]=X,Z[5]=V,Z[6]=J;else J=Z[6];return J}function K0(Q){let Z=VZ.c(31),{userMessage:W,color:X,dimColor:V,isCurrent:J,paddingRight:K}=Q,{columns:H}=O0();if(J){let T;if(Z[0]!==X||Z[1]!==V)T=E(p,{width:"100%",children:E(F,{italic:!0,color:X,dimColor:V,children:"(current)"})}),Z[0]=X,Z[1]=V,Z[2]=T;else T=Z[2];return T}let B=W.message.content,z=typeof B==="string"?null:B[B.length-1],G,L,w,v,_,P,C,D;if(Z[3]!==X||Z[4]!==H||Z[5]!==B||Z[6]!==V||Z[7]!==z||Z[8]!==K){D=Symbol.for("react.early_return_sentinel");Z:{let T=typeof B==="string"?B.trim():z&&I0(z)?z.text.trim():"(no prompt)",O=D0(T);if(w0(O)){let j;if(Z[17]!==X||Z[18]!==V)j=E(p,{flexDirection:"row",width:"100%",children:E(F,{italic:!0,color:X,dimColor:V,children:"((empty message))"})}),Z[17]=X,Z[18]=V,Z[19]=j;else j=Z[19];D=j;break Z}if(O.includes("<bash-input>")){let j=XZ(O,"bash-input");if(j){let l;if(Z[20]===Symbol.for("react.memo_cache_sentinel"))l=E(F,{color:"bashBorder",children:"!"}),Z[20]=l;else l=Z[20];D=M(p,{flexDirection:"row",width:"100%",children:[l,M(F,{color:X,dimColor:V,children:[" ",j]})]});break Z}}if(O.includes(`<${IZ}>`)){let j=XZ(O,IZ),l=XZ(O,"command-args"),n=XZ(O,"skill-format")==="true";if(j)if(n){D=E(p,{flexDirection:"row",width:"100%",children:M(F,{color:X,dimColor:V,children:["Skill(",j,")"]})});break Z}else{D=E(p,{flexDirection:"row",width:"100%",children:M(F,{color:X,dimColor:V,children:["/",j," ",l]})});break Z}}L=p,P="row",C="100%",G=F,w=X,v=V,_=K?A0(O,H-K,!0):O.slice(0,500).split(`
8
+ `).slice(0,4).join(`
9
+ `)}Z[3]=X,Z[4]=H,Z[5]=B,Z[6]=V,Z[7]=z,Z[8]=K,Z[9]=G,Z[10]=L,Z[11]=w,Z[12]=v,Z[13]=_,Z[14]=P,Z[15]=C,Z[16]=D}else G=Z[9],L=Z[10],w=Z[11],v=Z[12],_=Z[13],P=Z[14],C=Z[15],D=Z[16];if(D!==Symbol.for("react.early_return_sentinel"))return D;let $;if(Z[21]!==G||Z[22]!==w||Z[23]!==v||Z[24]!==_)$=E(G,{color:w,dimColor:v,children:_}),Z[21]=G,Z[22]=w,Z[23]=v,Z[24]=_,Z[25]=$;else $=Z[25];let y;if(Z[26]!==L||Z[27]!==P||Z[28]!==C||Z[29]!==$)y=E(L,{flexDirection:P,width:C,children:$}),Z[26]=L,Z[27]=P,Z[28]=C,Z[29]=$,Z[30]=y;else y=Z[30];return y}function e9(Q,Z,W){let X=Q.findIndex((B)=>B.uuid===Z);if(X===-1)return;let V=W?Q.findIndex((B)=>B.uuid===W):Q.length;if(V===-1)V=Q.length;let J=[],K=0,H=0;for(let B=X+1;B<V;B++){let z=Q[B];if(!z||!hZ(z))continue;let G=z.toolUseResult;if(!G||!G.filePath||!G.structuredPatch)continue;if(!J.includes(G.filePath))J.push(G.filePath);try{if("type"in G&&G.type==="create")K+=G.content.split(/\r?\n/).length;else for(let L of G.structuredPatch){let w=CZ(L.lines,(_)=>_.startsWith("+")),v=CZ(L.lines,(_)=>_.startsWith("-"));K+=w,H+=v}}catch{continue}}return{filesChanged:J,insertions:K,deletions:H}}function T0(Q){if(Q.type!=="user")return!1;if(Array.isArray(Q.message.content)&&Q.message.content[0]?.type==="tool_result")return!1;if(SZ(Q))return!1;if(Q.isMeta)return!1;if(Q.isCompactSummary||Q.isVisibleInTranscriptOnly)return!1;let Z=Q.message.content,W=typeof Z==="string"?null:Z[Z.length-1],X=typeof Z==="string"?Z.trim():W&&I0(W)?W.text.trim():"";if(X.indexOf(`<${N0}>`)!==-1||X.indexOf(`<${B0}>`)!==-1||X.indexOf(`<${J0}>`)!==-1||X.indexOf(`<${H0}>`)!==-1||X.indexOf(`<${z0}>`)!==-1||X.indexOf(`<${L0}>`)!==-1||X.indexOf(`<${q0}`)!==-1)return!1;return!0}function ZQ(Q,Z){for(let W=Z+1;W<Q.length;W++){let X=Q[W];if(!X)continue;if(SZ(X))continue;if(hZ(X))continue;if(X.type==="progress")continue;if(X.type==="system")continue;if(X.type==="attachment")continue;if(X.type==="user"&&X.isMeta)continue;if(X.type==="assistant"){let V=X.message.content;if(Array.isArray(V)){if(V.some((K)=>K.type==="text"&&K.text.trim()||K.type==="tool_use"))return!1}continue}if(X.type==="user")return!1}return!0}var VZ,I,bZ=7;var QQ=AZ(()=>{f9();_Z();l9();d9();v0();c9();p9();m9();R9();wZ();a9();n9();u9();T9();S9();h9();g9();V0();VZ=G0(x9(),1),I=G0(k9(),1)});var $W={};fZ($W,{getCronJitterConfig:()=>PW});function PW(){let Q=nY("tengu_kairos_cron_config",WZ,UW),Z=yW().safeParse(Q);return Z.success?Z.data:WZ}var UW=60000,iZ=1800000,EW=2592000000,yW;var jW=AZ(()=>{KZ();OW();iY();OZ();yW=q(()=>Y.object({recurringFrac:Y.number().min(0).max(1),recurringCapMs:Y.number().int().min(0).max(iZ),oneShotMaxMs:Y.number().int().min(0).max(iZ),oneShotFloorMs:Y.number().int().min(0).max(iZ),oneShotMinuteMod:Y.number().int().min(1).max(60),recurringMaxAgeMs:Y.number().int().min(0).max(EW).default(WZ.recurringMaxAgeMs)}).refine((Q)=>Q.oneShotFloorMs<=Q.oneShotMaxMs))});import{mkdir as IW,readFile as CW,unlink as Z9,writeFile as sZ}from"fs/promises";import{dirname as TW,join as Y9}from"path";function BZ(Q){return Y9(Q??oY(),RW)}async function Q9(Q){let Z;try{Z=await CW(BZ(Q),"utf8")}catch{return}let W=fW().safeParse(tY(Z,!1));return W.success?W.data:void 0}async function rY(Q,Z){let W=BZ(Z),X=ZZ(Q);try{return await sZ(W,X,{flag:"wx"}),!0}catch(V){let J=oZ(V);if(J==="EEXIST")return!1;if(J==="ENOENT"){await IW(TW(W),{recursive:!0});try{return await sZ(W,X,{flag:"wx"}),!0}catch(K){if(oZ(K)==="EEXIST")return!1;throw K}}throw V}}function rZ(Q){jZ?.(),jZ=sY(async()=>{await LZ(Q)})}async function tZ(Q){let Z=Q?.dir,W=Q?.lockIdentity??JZ(),X={sessionId:W,pid:process.pid,acquiredAt:Date.now()};if(await rY(X,Z))return NZ=void 0,rZ(Q),b(`[ScheduledTasks] acquired scheduler lock (PID ${process.pid})`),!0;let V=await Q9(Z);if(V?.sessionId===W){if(V.pid!==process.pid)await sZ(BZ(Z),ZZ(X)),rZ(Q);return!0}if(V&&eY(V.pid)){if(NZ!==V.sessionId)NZ=V.sessionId,b(`[ScheduledTasks] scheduler lock held by session ${V.sessionId} (PID ${V.pid})`);return!1}if(V)b(`[ScheduledTasks] recovering stale scheduler lock from PID ${V.pid}`);if(await Z9(BZ(Z)).catch(()=>{}),await rY(X,Z))return NZ=void 0,rZ(Q),!0;return!1}async function LZ(Q){jZ?.(),jZ=void 0,NZ=void 0;let Z=Q?.dir,W=Q?.lockIdentity??JZ(),X=await Q9(Z);if(!X||X.sessionId!==W)return;try{await Z9(BZ(Z)),b("[ScheduledTasks] released scheduler lock")}catch{}}var RW,fW,jZ,NZ;var W9=AZ(()=>{KZ();HZ();FW();GZ();gZ();bW();MW();OZ();PZ();RW=Y9(".claudin","scheduled_tasks.lock"),fW=q(()=>Y.object({sessionId:Y.string(),pid:Y.number(),acquiredAt:Y.number()}))});var pW={};fZ(pW,{isRecurringTaskAged:()=>q9,createCronScheduler:()=>xW,buildMissedTaskNotification:()=>D9});function q9(Q,Z,W){if(W===0)return!1;return Boolean(Q.recurring&&!Q.permanent&&Z-Q.createdAt>=W)}function xW(Q){let{onFire:Z,isLoading:W,assistantMode:X=!1,onFireTask:V,onMissed:J,dir:K,lockIdentity:H,getJitterConfig:B,isKilled:z,filter:G}=Q,L=K||H?{dir:K,lockIdentity:H}:void 0,w=[],v=new Map,_=new Set,P=new Set,C=null,D=null,$=null,y=null,T=!1,O=!1;async function j(S){let m=await N9(K);if(T)return;if(w=m,!S)return;let g=Date.now(),x=z9(m,g).filter((A)=>!A.recurring&&!_.has(A.id)&&(!G||G(A)));if(x.length>0){for(let A of x)_.add(A.id),v.set(A.id,1/0);if(d("tengu_scheduled_task_missed",{count:x.length,taskIds:x.map((A)=>A.id).join(",")}),J)J(x);else Z(D9(x));eZ(x.map((A)=>A.id),K).catch((A)=>b(`[ScheduledTasks] failed to remove missed tasks: ${A}`)),b(`[ScheduledTasks] surfaced ${x.length} missed one-shot task(s)`)}}function l(){if(z?.())return;if(W()&&!X)return;let S=Date.now(),m=new Set,g=[],x=B?.()??WZ;function A(N,R){if(G&&!G(N))return;if(m.add(N.id),P.has(N.id))return;let h=v.get(N.id);if(h===void 0)h=N.recurring?Z0(N.cron,N.lastFiredAt??N.createdAt,N.id,x)??1/0:L9(N.cron,N.createdAt,N.id,x)??1/0,v.set(N.id,h),b(`[ScheduledTasks] scheduled ${N.id} for ${h===1/0?"never":new Date(h).toISOString()}`);if(S<h)return;if(b(`[ScheduledTasks] firing ${N.id}${N.recurring?" (recurring)":""}`),d("tengu_scheduled_task_fire",{recurring:N.recurring??!1,taskId:N.id}),V)V(N);else Z(N.prompt);let r=q9(N,S,x.recurringMaxAgeMs);if(r){let t=Math.floor((S-N.createdAt)/1000/60/60);b(`[ScheduledTasks] recurring task ${N.id} aged out (${t}h since creation), deleting after final fire`),d("tengu_scheduled_task_expired",{taskId:N.id,ageHours:t})}if(N.recurring&&!r){let t=Z0(N.cron,S,N.id,x)??1/0;if(v.set(N.id,t),!R)g.push(N.id)}else if(R)G9([N.id]),v.delete(N.id);else P.add(N.id),eZ([N.id],K).catch((t)=>b(`[ScheduledTasks] failed to remove task ${N.id}: ${t}`)).finally(()=>P.delete(N.id)),v.delete(N.id)}if(O){for(let N of w)A(N,!1);if(g.length>0){for(let N of g)P.add(N);B9(g,S,K).catch((N)=>b(`[ScheduledTasks] failed to persist lastFiredAt: ${N}`)).finally(()=>{for(let N of g)P.delete(N)})}}if(K===void 0)for(let N of K9())A(N,!0);if(m.size===0){v.clear();return}for(let N of v.keys())if(!m.has(N))v.delete(N)}async function n(){if(T)return;if(C)clearInterval(C),C=null;let{default:S}=await import("./index-0.5.7-vm9zmzmr.mjs");if(T)return;if(O=await tZ(L).catch(()=>!1),T){if(O)O=!1,LZ(L);return}if(!O)$=setInterval(()=>{tZ(L).then((g)=>{if(T){if(g)LZ(L);return}if(g){if(O=!0,$)clearInterval($),$=null}}).catch((g)=>b(String(g),{level:"error"}))},kW),$.unref?.();j(!0);let m=H9(K);y=S.watch(m,{persistent:!1,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:hW},ignorePermissionErrors:!0}),y.on("add",()=>void j(!1)),y.on("change",()=>void j(!1)),y.on("unlink",()=>{if(!T)w=[],v.clear()}),D=setInterval(l,X9),D.unref?.()}return{start(){if(T=!1,K!==void 0){b(`[ScheduledTasks] scheduler start() — dir=${K}, hasTasks=${FZ(K)}`),n();return}if(b(`[ScheduledTasks] scheduler start() — enabled=${zZ()}, hasTasks=${FZ()}`),!zZ()&&(X||FZ()))V9(!0);if(zZ()){n();return}C=setInterval((S)=>{if(zZ())S()},X9,n),C.unref?.()},stop(){if(T=!0,C)clearInterval(C),C=null;if(D)clearInterval(D),D=null;if($)clearInterval($),$=null;if(y?.close(),y=null,O)O=!1,LZ(L)},getNextFireTime(){let S=1/0;for(let m of v.values())if(m<S)S=m;return S===1/0?null:S}}}function D9(Q){let Z=Q.length>1,W=`The following one-shot scheduled task${Z?"s were":" was"} missed while Claude was not running. ${Z?"They have":"It has"} already been removed from .claudin/scheduled_tasks.json.
10
+
11
+ Do NOT execute ${Z?"these prompts":"this prompt"} yet. First use the AskUserQuestion tool to ask whether to run ${Z?"each one":"it"} now. Only execute if the user confirms.`,X=Q.map((V)=>{let J=`[${J9(V.cron)}, created ${new Date(V.createdAt).toLocaleString()}]`,K=(V.prompt.match(/`+/g)??[]).reduce((B,z)=>Math.max(B,z.length),0),H="`".repeat(Math.max(3,K+1));return`${J}
12
+ ${H}
13
+ ${V.prompt}
14
+ ${H}`});return`${W}
15
+
16
+ ${X.join(`
17
+
18
+ `)}`}var X9=1000,hW=300,kW=5000;var uW=AZ(()=>{HZ();_Z();SW();iY();W9();GZ()});import{randomUUID as cZ}from"crypto";KZ();OZ();WQ();var XQ=q(()=>Y.unknown()),VQ=q(()=>Y.object({matcher:Y.string().optional(),hookCallbackIds:Y.array(Y.string()),timeout:Y.number().optional()}).describe("Configuration for matching and routing hook callbacks.")),KQ=q(()=>Y.object({subtype:Y.literal("initialize"),hooks:Y.record(h0(),Y.array(VQ())).optional(),sdkMcpServers:Y.array(Y.string()).optional(),jsonSchema:Y.record(Y.string(),Y.unknown()).optional(),systemPrompt:Y.string().optional(),appendSystemPrompt:Y.string().optional(),agents:Y.record(Y.string(),u0()).optional(),promptSuggestions:Y.boolean().optional(),agentProgressSummaries:Y.boolean().optional()}).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration.")),A6=q(()=>Y.object({commands:Y.array(xZ()),agents:Y.array(pZ()),output_style:Y.string(),available_output_styles:Y.array(Y.string()),models:Y.array(x0()),account:p0(),pid:Y.number().optional().describe("@internal CLI process PID for tmux socket isolation"),fast_mode_state:a0().optional()}).describe("Response from session initialization with available commands, models, and account info.")),GQ=q(()=>Y.object({subtype:Y.literal("interrupt")}).describe("Interrupts the currently running conversation turn.")),JQ=q(()=>Y.object({subtype:Y.literal("can_use_tool"),tool_name:Y.string(),input:Y.record(Y.string(),Y.unknown()),permission_suggestions:Y.array(f0()).optional(),blocked_path:Y.string().optional(),decision_reason:Y.string().optional(),title:Y.string().optional(),display_name:Y.string().optional(),tool_use_id:Y.string(),agent_id:Y.string().optional(),description:Y.string().optional()}).describe("Requests permission to use a tool with the given input.")),HQ=q(()=>Y.object({subtype:Y.literal("set_permission_mode"),mode:S0(),ultraplan:Y.boolean().optional().describe("@internal CCR ultraplan session marker.")}).describe("Sets the permission mode for tool execution handling.")),NQ=q(()=>Y.object({subtype:Y.literal("set_model"),model:Y.string().optional()}).describe("Sets the model to use for subsequent conversation turns.")),BQ=q(()=>Y.object({subtype:Y.literal("set_max_thinking_tokens"),max_thinking_tokens:Y.number().nullable()}).describe("Sets the maximum number of thinking tokens for extended thinking.")),LQ=q(()=>Y.object({subtype:Y.literal("mcp_status")}).describe("Requests the current status of all MCP server connections.")),_6=q(()=>Y.object({mcpServers:Y.array(kZ())}).describe("Response containing the current status of all MCP server connections.")),zQ=q(()=>Y.object({subtype:Y.literal("get_context_usage")}).describe("Requests a breakdown of current context window usage by category.")),qQ=q(()=>Y.object({name:Y.string(),tokens:Y.number(),color:Y.string(),isDeferred:Y.boolean().optional()})),DQ=q(()=>Y.object({color:Y.string(),isFilled:Y.boolean(),categoryName:Y.string(),tokens:Y.number(),percentage:Y.number(),squareFullness:Y.number()})),w6=q(()=>Y.object({categories:Y.array(qQ()),totalTokens:Y.number(),maxTokens:Y.number(),rawMaxTokens:Y.number(),percentage:Y.number(),gridRows:Y.array(Y.array(DQ())),model:Y.string(),memoryFiles:Y.array(Y.object({path:Y.string(),type:Y.string(),tokens:Y.number()})),mcpTools:Y.array(Y.object({name:Y.string(),serverName:Y.string(),tokens:Y.number(),isLoaded:Y.boolean().optional()})),deferredBuiltinTools:Y.array(Y.object({name:Y.string(),tokens:Y.number(),isLoaded:Y.boolean()})).optional(),systemTools:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),systemPromptSections:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),agents:Y.array(Y.object({agentType:Y.string(),source:Y.string(),tokens:Y.number()})),slashCommands:Y.object({totalCommands:Y.number(),includedCommands:Y.number(),tokens:Y.number()}).optional(),skills:Y.object({totalSkills:Y.number(),includedSkills:Y.number(),tokens:Y.number(),skillFrontmatter:Y.array(Y.object({name:Y.string(),source:Y.string(),tokens:Y.number()}))}).optional(),autoCompactThreshold:Y.number().optional(),isAutoCompactEnabled:Y.boolean(),messageBreakdown:Y.object({toolCallTokens:Y.number(),toolResultTokens:Y.number(),attachmentTokens:Y.number(),assistantMessageTokens:Y.number(),userMessageTokens:Y.number(),toolCallsByType:Y.array(Y.object({name:Y.string(),callTokens:Y.number(),resultTokens:Y.number()})),attachmentsByType:Y.array(Y.object({name:Y.string(),tokens:Y.number()}))}).optional(),apiUsage:Y.object({input_tokens:Y.number(),output_tokens:Y.number(),cache_creation_input_tokens:Y.number(),cache_read_input_tokens:Y.number()}).nullable()}).describe("Breakdown of current context window usage by category (system prompt, tools, messages, etc.).")),vQ=q(()=>Y.object({subtype:Y.literal("rewind_files"),user_message_id:Y.string(),dry_run:Y.boolean().optional()}).describe("Rewinds file changes made since a specific user message.")),O6=q(()=>Y.object({canRewind:Y.boolean(),error:Y.string().optional(),filesChanged:Y.array(Y.string()).optional(),insertions:Y.number().optional(),deletions:Y.number().optional()}).describe("Result of a rewindFiles operation.")),AQ=q(()=>Y.object({subtype:Y.literal("cancel_async_message"),message_uuid:Y.string()}).describe("Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.")),U6=q(()=>Y.object({cancelled:Y.boolean()}).describe("Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).")),_Q=q(()=>Y.object({subtype:Y.literal("seed_read_state"),path:Y.string(),mtime:Y.number()}).describe("Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.")),wQ=q(()=>Y.object({subtype:Y.literal("hook_callback"),callback_id:Y.string(),input:k0(),tool_use_id:Y.string().optional()}).describe("Delivers a hook callback with its input data.")),OQ=q(()=>Y.object({subtype:Y.literal("mcp_message"),server_name:Y.string(),message:XQ()}).describe("Sends a JSON-RPC message to a specific MCP server.")),UQ=q(()=>Y.object({subtype:Y.literal("mcp_set_servers"),servers:Y.record(Y.string(),R0())}).describe("Replaces the set of dynamically managed MCP servers.")),E6=q(()=>Y.object({added:Y.array(Y.string()),removed:Y.array(Y.string()),errors:Y.record(Y.string(),Y.string())}).describe("Result of replacing the set of dynamically managed MCP servers.")),EQ=q(()=>Y.object({subtype:Y.literal("reload_plugins")}).describe("Reloads plugins from disk and returns the refreshed session components.")),y6=q(()=>Y.object({commands:Y.array(xZ()),agents:Y.array(pZ()),plugins:Y.array(Y.object({name:Y.string(),path:Y.string(),source:Y.string().optional()})),mcpServers:Y.array(kZ()),error_count:Y.number()}).describe("Refreshed commands, agents, plugins, and MCP server status after reload.")),yQ=q(()=>Y.object({subtype:Y.literal("mcp_reconnect"),serverName:Y.string()}).describe("Reconnects a disconnected or failed MCP server.")),PQ=q(()=>Y.object({subtype:Y.literal("mcp_toggle"),serverName:Y.string(),enabled:Y.boolean()}).describe("Enables or disables an MCP server.")),$Q=q(()=>Y.object({subtype:Y.literal("stop_task"),task_id:Y.string()}).describe("Stops a running task.")),jQ=q(()=>Y.object({subtype:Y.literal("apply_flag_settings"),settings:Y.record(Y.string(),Y.unknown())}).describe("Merges the provided settings into the flag settings layer, updating the active configuration.")),FQ=q(()=>Y.object({subtype:Y.literal("get_settings")}).describe("Returns the effective merged settings and the raw per-source settings.")),P6=q(()=>Y.object({effective:Y.record(Y.string(),Y.unknown()),sources:Y.array(Y.object({source:Y.enum(["userSettings","projectSettings","localSettings","flagSettings","policySettings"]),settings:Y.record(Y.string(),Y.unknown())})).describe("Ordered low-to-high priority — later entries override earlier ones."),applied:Y.object({model:Y.string(),effort:Y.enum(["low","medium","high","max"]).nullable()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe("Effective merged settings plus raw per-source settings in merge order.")),MQ=q(()=>Y.object({subtype:Y.literal("elicitation"),mcp_server_name:Y.string(),message:Y.string(),mode:Y.enum(["form","url"]).optional(),url:Y.string().optional(),elicitation_id:Y.string().optional(),requested_schema:Y.record(Y.string(),Y.unknown()).optional()}).describe("Requests the SDK consumer to handle an MCP elicitation (user input request).")),n0=q(()=>Y.object({action:Y.enum(["accept","decline","cancel"]),content:Y.record(Y.string(),Y.unknown()).optional()}).describe("Response from the SDK consumer for an elicitation request.")),bQ=q(()=>Y.union([GQ(),JQ(),KQ(),HQ(),NQ(),BQ(),LQ(),zQ(),wQ(),OQ(),vQ(),AQ(),_Q(),UQ(),EQ(),yQ(),PQ(),$Q(),jQ(),FQ(),MQ()])),uZ=q(()=>Y.object({type:Y.literal("control_request"),request_id:Y.string(),request:bQ()})),IQ=q(()=>Y.object({subtype:Y.literal("success"),request_id:Y.string(),response:Y.record(Y.string(),Y.unknown()).optional()})),CQ=q(()=>Y.object({subtype:Y.literal("error"),request_id:Y.string(),error:Y.string(),pending_permission_requests:Y.array(Y.lazy(()=>uZ())).optional()})),i0=q(()=>Y.object({type:Y.literal("control_response"),response:Y.union([IQ(),CQ()])})),TQ=q(()=>Y.object({type:Y.literal("control_cancel_request"),request_id:Y.string()}).describe("Cancels a currently open control request.")),r0=q(()=>Y.object({type:Y.literal("keep_alive")}).describe("Keep-alive message to maintain WebSocket connection.")),RQ=q(()=>Y.object({type:Y.literal("update_environment_variables"),variables:Y.record(Y.string(),Y.string())}).describe("Updates environment variables at runtime.")),$6=q(()=>Y.union([l0(),c0(),g0(),d0(),i0(),uZ(),TQ(),r0()])),j6=q(()=>Y.union([m0(),uZ(),i0(),r0(),RQ()]));mQ();GZ();uQ();gZ();KZ();GZ();OZ();o0();fQ();var R6=q(()=>k.object({tool_name:k.string().describe("The name of the tool requesting permission"),input:k.record(k.string(),k.unknown()).describe("The input for the tool"),tool_use_id:k.string().optional().describe("The unique tool use request ID")})),t0=q(()=>k.enum(["user_temporary","user_permanent","user_reject"]).optional().catch(void 0)),SQ=q(()=>k.object({behavior:k.literal("allow"),updatedInput:k.record(k.string(),k.unknown()),updatedPermissions:k.array(s0()).optional().catch((Q)=>{b(`Malformed updatedPermissions from SDK host ignored: ${Q.error.issues[0]?.message??"unknown"}`,{level:"warn"});return}),toolUseID:k.string().optional(),decisionClassification:t0()})),hQ=q(()=>k.object({behavior:k.literal("deny"),message:k.string(),interrupt:k.boolean().optional(),toolUseID:k.string().optional(),decisionClassification:t0()})),mZ=q(()=>k.union([SQ(),hQ()]));function yZ(Q,Z,W,X){let V={type:"permissionPromptTool",permissionPromptToolName:Z.name,toolResult:Q};if(Q.behavior==="allow"){let J=Q.updatedPermissions;if(J)X.setAppState((H)=>({...H,toolPermissionContext:UZ(H.toolPermissionContext,J)})),EZ(J);let K=Object.keys(Q.updatedInput).length>0?Q.updatedInput:W;return{...Q,updatedInput:K,decisionReason:V}}else if(Q.behavior==="deny"&&Q.interrupt)b(`SDK permission prompt deny+interrupt: tool=${Z.name} message=${Q.message}`),X.abortController.abort();return{...Q,decisionReason:V}}dQ();pQ();PZ();KZ();cQ();BY();o0();lQ();PZ();gQ();PZ();var kQ=/\u2028|\u2029/g;function xQ(Q){return Q.replace(kQ,(Z)=>Z==="\u2028"?"\\u2028":"\\u2029")}function e0(Q){return xQ(ZZ(Q))}var aQ="SandboxNetworkAccess";function nQ(Q){if(!Q)return;if(Q.type==="classifier")return Q.reason;switch(Q.type){case"rule":case"mode":case"subcommandResults":case"permissionPromptTool":return;case"hook":case"asyncAgent":case"sandboxOverride":case"workingDir":case"safetyCheck":case"other":return Q.reason}}function iQ(Q,Z,W,X){let V;try{V=Q.getActivityDescription?.(Z)??Q.getToolUseSummary?.(Z)??Q.userFacingName(Z)}catch{V=Q.name}return{tool_name:Q.name,action_description:V,tool_use_id:W,request_id:X,input:Z}}var rQ=1000;class oQ{input;replayUserMessages;structuredInput;pendingRequests=new Map;restoredWorkerState=Promise.resolve(null);inputClosed=!1;unexpectedResponseCallback;resolvedToolUseIds=new Set;prependedLines=[];onControlRequestSent;onControlRequestResolved;outbound=new GY;constructor(Q,Z){this.input=Q;this.replayUserMessages=Z;this.input=Q,this.structuredInput=this.read()}trackResolvedToolUseId(Q){if(Q.request.subtype==="can_use_tool"){if(this.resolvedToolUseIds.add(Q.request.tool_use_id),this.resolvedToolUseIds.size>rQ){let Z=this.resolvedToolUseIds.values().next().value;if(Z!==void 0)this.resolvedToolUseIds.delete(Z)}}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(Q){this.prependedLines.push(ZZ({type:"user",session_id:"",message:{role:"user",content:Q},parent_tool_use_id:null})+`
19
+ `)}async*read(){let Q="",Z=async function*(){for(;;){if(this.prependedLines.length>0)Q=this.prependedLines.join("")+Q,this.prependedLines=[];let W=Q.indexOf(`
20
+ `);if(W===-1)break;let X=Q.slice(0,W);Q=Q.slice(W+1);let V=await this.processLine(X);if(V)XY("info","cli_stdin_message_parsed",{type:V.type}),yield V}}.bind(this);yield*Z();for await(let W of this.input)Q+=W,yield*Z();if(Q){let W=await this.processLine(Q);if(W)yield W}this.inputClosed=!0;for(let W of this.pendingRequests.values())W.reject(Error("Tool permission stream closed before response received"))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map((Q)=>Q.request).filter((Q)=>Q.request.subtype==="can_use_tool")}setUnexpectedResponseCallback(Q){this.unexpectedResponseCallback=Q}injectControlResponse(Q){let Z=Q.response?.request_id;if(!Z)return;let W=this.pendingRequests.get(Z);if(!W)return;if(this.trackResolvedToolUseId(W.request),this.pendingRequests.delete(Z),this.write({type:"control_cancel_request",request_id:Z}),Q.response.subtype==="error")W.reject(Error(Q.response.error));else{let X=Q.response.response;if(W.schema)try{W.resolve(W.schema.parse(X))}catch(V){W.reject(V)}else W.resolve({})}}setOnControlRequestSent(Q){this.onControlRequestSent=Q}setOnControlRequestResolved(Q){this.onControlRequestResolved=Q}async processLine(Q){if(!Q)return;try{let Z=LY(QY(Q));if(Z.type==="keep_alive")return;if(Z.type==="update_environment_variables"){let W=Object.keys(Z.variables);for(let[X,V]of Object.entries(Z.variables))process.env[X]=V;b(`[structuredIO] applied update_environment_variables: ${W.join(", ")}`);return}if(Z.type==="control_response"){let W="uuid"in Z&&typeof Z.uuid==="string"?Z.uuid:void 0;if(W)KY(W,"completed");let X=this.pendingRequests.get(Z.response.request_id);if(!X){let K=(Z.response.subtype==="success"?Z.response.response:void 0)?.toolUseID;if(typeof K==="string"&&this.resolvedToolUseIds.has(K)){b(`Ignoring duplicate control_response for already-resolved toolUseID=${K} request_id=${Z.response.request_id}`);return}if(this.unexpectedResponseCallback)await this.unexpectedResponseCallback(Z);return}if(this.trackResolvedToolUseId(X.request),this.pendingRequests.delete(Z.response.request_id),X.request.request.subtype==="can_use_tool"&&this.onControlRequestResolved)this.onControlRequestResolved(Z.response.request_id);if(Z.response.subtype==="error"){X.reject(Error(Z.response.error));return}let V=Z.response.response;if(X.schema)try{X.resolve(X.schema.parse(V))}catch(J){X.reject(J)}else X.resolve({});if(this.replayUserMessages)return Z;return}if(Z.type!=="user"&&Z.type!=="control_request"&&Z.type!=="assistant"&&Z.type!=="system"){b(`Ignoring unknown message type: ${Z.type}`,{level:"warn"});return}if(Z.type==="control_request"){if(!Z.request)ZY("Error: Missing request on control_request");return Z}if(Z.type==="assistant"||Z.type==="system")return Z;if(Z.message.role!=="user")ZY(`Error: Expected message role 'user', got '${Z.message.role}'`);return Z}catch(Z){console.error(`Error parsing streaming input line: ${Q}: ${Z}`),process.exit(1)}}async write(Q){WY(e0(Q)+`
21
+ `)}async sendRequest(Q,Z,W,X=cZ()){let V={type:"control_request",request_id:X,request:Q};if(this.inputClosed)throw Error("Stream closed");if(W?.aborted)throw Error("Request aborted");if(this.outbound.enqueue(V),Q.subtype==="can_use_tool"&&this.onControlRequestSent)this.onControlRequestSent(V);let J=()=>{this.outbound.enqueue({type:"control_cancel_request",request_id:X});let K=this.pendingRequests.get(X);if(K)this.trackResolvedToolUseId(K.request),K.reject(new YY)};if(W)W.addEventListener("abort",J,{once:!0});try{return await new Promise((K,H)=>{this.pendingRequests.set(X,{request:{type:"control_request",request_id:X,request:Q},resolve:(B)=>{K(B)},reject:H,schema:Z})})}finally{if(W)W.removeEventListener("abort",J);this.pendingRequests.delete(X)}}createCanUseTool(Q){return async(Z,W,X,V,J,K)=>{let H=K??await JY(Z,W,X,V,J);if(H.behavior==="allow"||H.behavior==="deny")return H;let B=new AbortController,z=X.abortController.signal,G=()=>B.abort();z.addEventListener("abort",G,{once:!0});try{let L=sQ(Z.name,J,W,X,H.suggestions).then((P)=>({source:"hook",decision:P})),w=cZ();Q?.(iQ(Z,W,J,w));let v=this.sendRequest({subtype:"can_use_tool",tool_name:Z.name,input:W,permission_suggestions:H.suggestions,blocked_path:H.blockedPath,decision_reason:nQ(H.decisionReason),tool_use_id:J,agent_id:X.agentId},mZ(),B.signal,w).then((P)=>({source:"sdk",result:P})),_=await Promise.race([L,v]);if(_.source==="hook"){if(_.decision)return v.catch(()=>{}),B.abort(),_.decision;let P=await v;return yZ(P.result,Z,W,X)}return yZ(_.result,Z,W,X)}catch(L){return yZ({behavior:"deny",message:`Tool permission request failed: ${L}`,toolUseID:J},Z,W,X)}finally{if(this.getPendingPermissionRequests().length===0)HY("running");z.removeEventListener("abort",G)}}}createHookCallback(Q,Z){return{type:"callback",timeout:Z,callback:async(W,X,V)=>{try{return await this.sendRequest({subtype:"hook_callback",callback_id:Q,input:W,tool_use_id:X||void 0},VY(),V)}catch(J){return console.error(`Error in hook callback ${Q}:`,J),{}}}}}async handleElicitation(Q,Z,W,X,V,J,K){try{return await this.sendRequest({subtype:"elicitation",mcp_server_name:Q,message:Z,mode:V,url:J,elicitation_id:K,requested_schema:W},n0(),X)}catch{return{action:"cancel"}}}createSandboxAskCallback(){return async(Q)=>{try{return(await this.sendRequest({subtype:"can_use_tool",tool_name:aQ,input:{host:Q.host},tool_use_id:cZ(),description:`Allow network connection to ${Q.host}?`},mZ())).behavior==="allow"}catch{return!1}}}async sendMcpMessage(Q,Z){return(await this.sendRequest({subtype:"mcp_message",server_name:Q,message:Z},Y.object({mcp_response:Y.any()}))).mcp_response}}function ZY(Q){console.error(Q),process.exit(1)}async function sQ(Q,Z,W,X,V){let K=X.getAppState().toolPermissionContext.mode,H=NY(Q,Z,W,X,K,V,X.abortController.signal);for await(let B of H)if(B.permissionRequestResult&&(B.permissionRequestResult.behavior==="allow"||B.permissionRequestResult.behavior==="deny")){let z=B.permissionRequestResult;if(z.behavior==="allow"){let G=z.updatedInput||W,L=z.updatedPermissions??[];if(L.length>0){EZ(L);let w=X.getAppState(),v=UZ(w.toolPermissionContext,L);X.setAppState((_)=>{if(_.toolPermissionContext===v)return _;return{..._,toolPermissionContext:v}})}return{behavior:"allow",updatedInput:G,userModified:!1,decisionReason:{type:"hook",hookName:"PermissionRequest"}}}else return{behavior:"deny",message:z.message||"Permission denied by PermissionRequest hook",decisionReason:{type:"hook",hookName:"PermissionRequest"}}}return}DY();function XX(Q){if(Q.type!=="user")return;let Z=Q.message?.content;if(!Z)return;if(Array.isArray(Z)&&Z.length===0)return;let W="uuid"in Q&&typeof Q.uuid==="string"?Q.uuid:void 0;return{content:Array.isArray(Z)?tQ(Z):Z,uuid:W}}function tQ(Q){if(!Q.some(zY))return Q;return Q.map((Z)=>{if(!zY(Z))return Z;let W=Z.source,X=typeof W.mediaType==="string"&&W.mediaType?W.mediaType:qY(Z.source.data);return{...Z,source:{type:"base64",media_type:X,data:Z.source.data}}})}function zY(Q){if(Q.type!=="image"||Q.source?.type!=="base64")return!1;return!Q.source.media_type}HZ();XW();ZW();WW();eQ();QW();YW();import{randomUUID as VW}from"crypto";function KW(Q){return Q===_Y?wY:Q}function qX(Q){let W=OY()?.outputStyle??yY,X={type:"system",subtype:"init",cwd:AY(),session_id:JZ(),tools:Q.tools.map((V)=>KW(V.name)),mcp_servers:Q.mcpClients.map((V)=>({name:V.name,status:V.type})),model:Q.model,permissionMode:Q.permissionMode,slash_commands:Q.commands.filter((V)=>V.userInvocable!==!1).map((V)=>V.name),apiKeySource:EY().source,betas:vY(),claude_code_version:"99.0.0",output_style:W,agents:Q.agents.map((V)=>V.agentType),skills:Q.skills.filter((V)=>V.userInvocable!==!1).map((V)=>V.name),plugins:Q.plugins.map((V)=>({name:V.name,path:V.path,source:V.source})),uuid:VW()};return X.fast_mode_state=UY(Q.model,Q.fastMode),X}var PY={"`":"`",'"':'"',"<":">","{":"}","[":"]","(":")","'":"'"};function GW(Q,Z){if(!new RegExp(Z,"i").test(Q))return[];if(Q.startsWith("/"))return[];let X=[],V=null,J=0,K=(G)=>!!G&&/[\p{L}\p{N}_]/u.test(G);for(let G=0;G<Q.length;G++){let L=Q[G];if(V){if(V==="["&&L==="["){J=G;continue}if(L!==PY[V])continue;if(V==="'"&&K(Q[G+1]))continue;X.push({start:J,end:G+1}),V=null}else if(L==="<"&&G+1<Q.length&&/[a-zA-Z/]/.test(Q[G+1])||L==="'"&&!K(Q[G-1])||L!=="<"&&L!=="'"&&L in PY)V=L,J=G}let H=[],B=new RegExp(`\\b${Z}\\b`,"gi"),z=Q.matchAll(B);for(let G of z){if(G.index===void 0)continue;let L=G.index,w=L+G[0].length;if(X.some((P)=>L>=P.start&&L<P.end))continue;let v=Q[L-1],_=Q[w];if(v==="/"||v==="\\"||v==="-")continue;if(_==="/"||_==="\\"||_==="-"||_==="?")continue;if(_==="."&&K(Q[w+1]))continue;H.push({word:G[0],start:L,end:w})}return H}function vX(Q){return GW(Q,"ultrareview")}_Z();wZ();AW();qW();DW();LW();BY();DY();BW();wZ();vW();zW();import{randomUUID as _W}from"crypto";HZ();_Z();wZ();JW();HW();import{randomUUID as NW}from"crypto";function $Y(Q){let Z=Q.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(Z)}function jY(Q){let Z=Q.toLowerCase().trim();if(Z==="continue")return!0;return/\b(keep going|go on)\b/.test(Z)}function CY(Q,Z,W,X,V,J,K){let H=NW();FY(H);let B=typeof Q==="string"?Q:Q.find((v)=>v.type==="text")?.text||"";IY(B);let z=typeof Q==="string"?Q:Q.findLast((v)=>v.type==="text")?.text||"";if(z)bY("user_prompt",{prompt_length:String(z.length),prompt:MY(z),"prompt.id":H});let G=$Y(B),L=jY(B);if(d("tengu_input_prompt",{is_negative:G,is_keep_going:L}),Z.length>0){let v=typeof Q==="string"?Q.trim()?[{type:"text",text:Q}]:[]:Q;return{messages:[s({content:[...v,...Z],uuid:V,imagePasteIds:W.length>0?W:void 0,permissionMode:J,isMeta:K||void 0}),...X],shouldQuery:!0}}return{messages:[s({content:Q,uuid:V,permissionMode:J,isMeta:K||void 0}),...X],shouldQuery:!0}}async function dX({input:Q,preExpansionInput:Z,mode:W,setToolJSX:X,context:V,pastedContents:J,ideSelection:K,messages:H,setUserInputOnProcessing:B,uuid:z,isAlreadyProcessing:G,querySource:L,canUseTool:w,skipSlashCommands:v,bridgeOrigin:_,isMeta:P,skipAttachments:C}){let D=typeof Q==="string"?Q:null;if(W==="prompt"&&D!==null&&!P)B?.(D);i("query_process_user_input_base_start");let $=V.getAppState(),y=await wW(Q,W,X,V,J,K,H,z,G,L,w,$.toolPermissionContext.mode,v,_,P,C,Z);if(i("query_process_user_input_base_end"),!y.shouldQuery)return y;i("query_hooks_start");let T=RY(Q)||"";for await(let O of aY(T,$.toolPermissionContext.mode,V,V.requestPrompt)){if(O.message?.type==="progress")continue;if(O.blockingError){let j=lY(O.blockingError);return{messages:[gY(`${j}
22
+
23
+ Original prompt: ${Q}`,"warning")],shouldQuery:!1,allowedTools:y.allowedTools}}if(O.preventContinuation){let j=O.stopReason?`Operation stopped by hook: ${O.stopReason}`:"Operation stopped by hook";return y.messages.push(s({content:j})),y.shouldQuery=!1,y}if(O.additionalContexts&&O.additionalContexts.length>0)y.messages.push(fY({type:"hook_additional_context",content:O.additionalContexts.map(TY),hookName:"UserPromptSubmit",toolUseID:`hook-${_W()}`,hookEvent:"UserPromptSubmit"}));if(O.message)switch(O.message.attachment.type){case"hook_success":if(!O.message.attachment.content)break;y.messages.push({...O.message,attachment:{...O.message.attachment,content:TY(O.message.attachment.content)}});break;default:y.messages.push(O.message);break}}return i("query_hooks_end"),y}var dZ=1e4;function TY(Q){if(Q.length>dZ)return`${Q.substring(0,dZ)}… [output truncated - exceeded ${dZ} characters]`;return Q}async function wW(Q,Z,W,X,V,J,K,H,B,z,G,L,w,v,_,P,C){let D=null,$=[],y=[],T=Q;if(typeof Q==="string")D=Q;else if(Q.length>0){i("query_image_processing_start");let A=[];for(let R of Q)if(R.type==="image"){let h=await nZ(R);if(h.dimensions){let r=$Z(h.dimensions);if(r)y.push(r)}A.push(h.block)}else A.push(R);T=A,i("query_image_processing_end");let N=A[A.length-1];if(N?.type==="text")D=N.text,$=A.slice(0,-1);else $=A}if(D===null&&Z!=="prompt")throw Error(`Mode: ${Z} requires a string input.`);let O=V?Object.values(V).filter(xY):[],j=O.map((A)=>A.id),l=V?await SY(V):new Map;i("query_pasted_image_processing_start");let n=await Promise.all(O.map(async(A)=>{let N={type:"image",source:{type:"base64",media_type:A.mediaType||"image/png",data:A.content}};return d("tengu_pasted_image_resize_attempt",{original_size_bytes:A.content.length}),{resized:await nZ(N),originalDimensions:A.dimensions,sourcePath:A.sourcePath??l.get(A.id)}})),S=[];for(let{resized:A,originalDimensions:N,sourcePath:R}of n){if(A.dimensions){let h=$Z(A.dimensions,R);if(h)y.push(h)}else if(N){let h=$Z(N,R);if(h)y.push(h)}else if(R)y.push(`[Image source: ${R}]`);S.push(A.block)}i("query_pasted_image_processing_end");let m=w;if(v&&D!==null&&D.startsWith("/")){let A=kY(D),N=A?cY(A.commandName,X.options.commands):void 0;if(N)if(mY(N))m=!1;else{let R=`/${uY(N)} isn't available over Remote Control.`;return{messages:[s({content:D,uuid:H}),dY(`<local-command-stdout>${R}</local-command-stdout>`)],shouldQuery:!1,resultText:R}}}let g=!P&&D!==null&&(Z!=="prompt"||m||!D.startsWith("/"));i("query_attachment_loading_start");let x=g?await hY(pY(D,X,J??null,[],K,z)):[];if(i("query_attachment_loading_end"),D!==null&&Z==="bash"){let{processBashCommand:A}=await import("./processBashCommand-0.5.7-czwzjsj9.mjs");return lZ(await A(D,$,x,X,W),y)}if(D!==null&&!m&&D.startsWith("/")){let{processSlashCommand:A}=await import("./processSlashCommand-0.5.7-512rz16m.mjs"),N=await A(D,$,S,x,X,W,H,B,G);return lZ(N,y)}if(D!==null&&Z==="prompt"){let A=D.trim(),N=x.find((R)=>R.attachment.type==="agent_mention");if(N){let R=`@agent-${N.attachment.agentType}`,h=A===R,r=A.startsWith(R)&&!h;d("tengu_subagent_at_mention",{is_subagent_only:h,is_prefix:r})}}return lZ(CY(T,S,j,x,H,L,_),y)}function lZ(Q,Z){if(Z.length>0)Q.messages.push(s({content:Z.map((W)=>({type:"text",text:W})),isMeta:!0}));return Q}dW();HZ();GZ();gZ();cW();mW();v0();lW();gW();import{isAbsolute as aW,resolve as nW}from"path";function iW(Q,Z,W){let X=[],V=[],J=[];for(let[K,H]of Object.entries(Q)){let B=Z[K],z=P9(H.source,W?.projectRoot);if(!B)X.push(K);else if(H.sourceIsFallback)J.push(K);else if(!O9(z,B.source))V.push({name:K,declaredSource:z,materializedSource:B.source});else J.push(K)}return{missing:X,sourceChanged:V,upToDate:J}}async function PV(Q){let Z=U9();if(Object.keys(Z).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let W;try{W=await E9()}catch(G){e(G),W={}}let X=iW(Z,W,{projectRoot:Y0()}),V=[...X.missing.map((G)=>({name:G,source:P9(Z[G].source),action:"install"})),...X.sourceChanged.map(({name:G,declaredSource:L})=>({name:G,source:L,action:"update"}))],J=[],K=[];for(let G of V){if(Q?.skip?.(G.name,G.source)){J.push(G.name);continue}if(G.action==="update"&&w9(G.source)&&!await _9(G.source.path)){b(`[reconcile] '${G.name}' declared path does not exist; keeping materialized entry`),J.push(G.name);continue}K.push(G)}if(K.length===0)return{installed:[],updated:[],failed:[],upToDate:X.upToDate,skipped:J};b(`[reconcile] ${K.length} marketplace(s): ${K.map((G)=>`${G.name}(${G.action})`).join(", ")}`);let H=[],B=[],z=[];for(let G=0;G<K.length;G++){let{name:L,source:w,action:v}=K[G];Q?.onProgress?.({type:"installing",name:L,action:v,index:G+1,total:K.length});try{let _=await y9(w);if(v==="install")H.push(L);else B.push(L);Q?.onProgress?.({type:"installed",name:L,alreadyMaterialized:_.alreadyMaterialized})}catch(_){let P=v9(_);z.push({name:L,error:P}),Q?.onProgress?.({type:"failed",name:L,error:P}),e(_)}}return{installed:H,updated:B,failed:z,upToDate:X.upToDate,skipped:J}}function P9(Q,Z){if((Q.source==="directory"||Q.source==="file")&&!aW(Q.path)){let W=Z??Y0(),X=A9(W);return{...Q,path:nW(X??W,Q.path)}}return Q}
24
+ export{XX as ja,KW as ka,qX as la,r9 as ma,T0 as na,ZQ as oa,YQ as pa,QQ as qa,vX as ra,dX as sa,mZ as ta,yZ as ua,e0 as va,oQ as wa,iW as xa,PV as ya,PW as za,$W as Aa,jW as Ba,xW as Ca,pW as Da,uW as Ea};
@@ -0,0 +1,2 @@
1
+ import{St as o,Tt as n}from"./cli-0.5.7-q2e6xpch.mjs";import{Zma as e}from"./cli-0.5.7-258ytmbr.mjs";function i(m){t.setState(()=>[...m])}var t,r=()=>t.getState(),d;var s=e(()=>{n();t=o([]),d=t.subscribe});
2
+ export{r as tc,d as uc,i as vc,s as wc};
@@ -0,0 +1,2 @@
1
+ import{Wb as K,Xb as Y}from"./cli-0.5.7-6gkpb0vw.mjs";import{$n as H,ao as U,go as V,ho as W,jJ as J,rJ as X,sn as G,tn as B}from"./cli-0.5.7-q2e6xpch.mjs";import{Wma as q,Zma as v}from"./cli-0.5.7-258ytmbr.mjs";function P(h){return x.some((g)=>h.endsWith(g))}function C(h){return h.filter((g)=>H.has(g.name)||P(g.name))}function A(h,g,E){let[Q,Z]=K(G([...h,...g],"name"),J),k=($,j)=>$.name.localeCompare(j.name),w=[...Z.sort(k),...Q.sort(k)];if(z){if(z.isCoordinatorMode())return C(w)}return w}var x,z;var D=v(()=>{Y();B();U();X();x=["subscribe_pr_activity","unsubscribe_pr_activity"];z=(W(),q(V))});
2
+ export{P as Sb,C as Tb,A as Ub,D as Vb};
@@ -0,0 +1,3 @@
1
+ import{sda as L,wda as O}from"./cli-0.5.7-c9dtw94k.mjs";import{Zma as N}from"./cli-0.5.7-258ytmbr.mjs";function S(){if(!process.stdin.isTTY||D||process.argv.includes("-p")||process.argv.includes("--print"))return;D=!0,z="";try{process.stdin.setEncoding("utf8"),process.stdin.setRawMode(!0),process.stdin.ref(),F=()=>{let q=process.stdin.read();while(q!==null){if(typeof q==="string")P(q);q=process.stdin.read()}},process.stdin.on("readable",F)}catch{D=!1}}function P(q){let w=0;while(w<q.length){let K=q[w],A=K.charCodeAt(0);if(A===3){J(),process.exit(130);return}if(A===4){J();return}if(A===127||A===8){if(z.length>0){let M=L(z);z=z.slice(0,-(M.length||1))}w++;continue}if(A===27){w++;while(w<q.length&&!(q.charCodeAt(w)>=64&&q.charCodeAt(w)<=126))w++;if(w<q.length)w++;continue}if(A<32&&A!==9&&A!==10&&A!==13){w++;continue}if(A===13){z+=`
2
+ `,w++;continue}z+=K,w++}}function J(){if(!D)return;if(D=!1,F)process.stdin.removeListener("readable",F),F=null}function T(){J();let q=z.trim();return z="",q}function U(){return z.trim().length>0}function V(q){z=q}function W(){return D}var z="",D=!1,F=null;var Q=N(()=>{O()});
3
+ export{S as qX,J as rX,T as sX,U as tX,V as uX,W as vX,Q as wX};
@@ -0,0 +1,2 @@
1
+ import{HD as A,JD as O,dm as M,em as G}from"./cli-0.5.7-q2e6xpch.mjs";import{KW as w,MW as d,QW as v,pX as W,rV as U}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as a,QY as i,RY as S}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as N}from"./cli-0.5.7-8sbq2qed.mjs";import{Naa as I,_aa as P}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as h,Pea as L}from"./cli-0.5.7-26pwg6gg.mjs";import{Vma as b,Zma as B}from"./cli-0.5.7-258ytmbr.mjs";function V(t){let e=T.c(18),{onDone:g,isStandaloneDialog:D,externalIncludes:r}=t,s;if(e[0]===Symbol.for("react.memo_cache_sentinel"))s=[],e[0]=s;else s=e[0];k.default.useEffect(q,s);let c;if(e[1]!==g)c=(E)=>{if(E==="no")h("tengu_claude_md_external_includes_dialog_declined",{}),I($);else h("tengu_claude_md_external_includes_dialog_accepted",{}),I(Y);g()},e[1]=g,e[2]=c;else c=e[2];let l=c,u;if(e[3]!==l)u=()=>{l("no")},e[3]=l,e[4]=u;else u=e[4];let y=u,C=!D,x=!D,m;if(e[5]===Symbol.for("react.memo_cache_sentinel"))m=a(d,{children:"This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories."}),e[5]=m;else m=e[5];let o;if(e[6]!==r)o=r&&r.length>0&&i(w,{flexDirection:"column",children:[a(d,{dimColor:!0,children:"External imports:"}),r.map(R)]}),e[6]=r,e[7]=o;else o=e[7];let p;if(e[8]===Symbol.for("react.memo_cache_sentinel"))p=i(d,{dimColor:!0,children:["Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks"," ",a(v,{url:"https://code.claude.com/docs/en/security"})," "]}),e[8]=p;else p=e[8];let f;if(e[9]===Symbol.for("react.memo_cache_sentinel"))f=[{label:"Yes, allow external imports",value:"yes"},{label:"No, disable external imports",value:"no"}],e[9]=f;else f=e[9];let n;if(e[10]!==l)n=a(A,{options:f,onChange:(E)=>l(E)}),e[10]=l,e[11]=n;else n=e[11];let _;if(e[12]!==y||e[13]!==n||e[14]!==C||e[15]!==x||e[16]!==o)_=i(M,{title:"Allow external CLAUDE.md file imports?",color:"warning",onCancel:y,hideBorder:C,hideInputGuide:x,children:[m,o,p,n]}),e[12]=y,e[13]=n,e[14]=C,e[15]=x,e[16]=o,e[17]=_;else _=e[17];return _}function R(t,e){return i(d,{dimColor:!0,children:[" ",t.path]},e)}function Y(t){return{...t,hasClaudeMdExternalIncludesApproved:!0,hasClaudeMdExternalIncludesWarningShown:!0}}function $(t){return{...t,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!0}}function q(){h("tengu_claude_md_includes_dialog_shown",{})}var T,k;var z=B(()=>{L();W();P();O();G();S();T=b(U(),1),k=b(N(),1)});
2
+ export{V as Nf,z as Of};
@@ -0,0 +1,2 @@
1
+ import{jb as c}from"./cli-0.5.7-3xssm25z.mjs";import{kb as S}from"./cli-0.5.7-rzts2ke3.mjs";import{lc as P,pc as Vq}from"./cli-0.5.7-d4gtv7f7.mjs";import{tc as I,uc as v,vc as $,wc as Wq}from"./cli-0.5.7-9sysdak3.mjs";import{Fs as L,GI as f,Gs as qq,JI as Tq,LC as M,MC as Jq,Ms as h,Os as Bq,Vt as A,Wt as _,Xm as C,Yt as Gq,Zm as r,Zr as N,_r as e,oH as E,pH as Qq}from"./cli-0.5.7-q2e6xpch.mjs";import{SY as s}from"./cli-0.5.7-8sbq2qed.mjs";import{B6 as D,J6 as n,k6 as y,m6 as o,r8 as w,t8 as t}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as F,Pea as a}from"./cli-0.5.7-26pwg6gg.mjs";import{Pfa as j,Sfa as l}from"./cli-0.5.7-twqt7rxq.mjs";import{Fga as x,Nga as d}from"./cli-0.5.7-skfm51ta.mjs";import{Vma as p}from"./cli-0.5.7-258ytmbr.mjs";Jq();a();Bq();Gq();Wq();t();l();o();d();n();e();Qq();var V=p(s(),1);qq();r();Vq();Tq();function Lq({enabled:W=!0}={}){let b=V.useSyncExternalStore(v,I,I),H=_(),O=A((J)=>J.plugins.needsRefresh),{addNotification:z}=M(),R=V.useCallback(async()=>{try{let{enabled:J,disabled:T,errors:Q}=await f();await c();let X=P();if(Object.keys(X).length>0)z({key:"plugin-delisted-flagged",text:"Plugins flagged. Check /plugins",color:"warning",priority:"high"});let Y=[],Z=[];try{Y=await E(),$(Y)}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-commands",error:`Failed to load plugin commands: ${B}`}),$([])}try{Z=await N()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-agents",error:`Failed to load plugin agents: ${B}`})}try{await S()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-hooks",error:`Failed to load plugin hooks: ${B}`})}let u=(await Promise.all(J.map(async(q)=>{if(q.mcpServers)return Object.keys(q.mcpServers).length;let B=await C(q,Q);if(B)q.mcpServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0),m=(await Promise.all(J.map(async(q)=>{if(q.lspServers)return Object.keys(q.lspServers).length;let B=await L(q,Q);if(B)q.lspServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0);h(),H((q)=>{let B=q.plugins.errors.filter((G)=>G.source==="lsp-manager"||G.source.startsWith("plugin:")),K=new Set(Q.map((G)=>G.type==="generic-error"?`generic-error:${G.source}:${G.error}`:`${G.type}:${G.source}`)),U=[...B.filter((G)=>{let i=G.type==="generic-error"?`generic-error:${G.source}:${G.error}`:`${G.type}:${G.source}`;return!K.has(i)}),...Q];return{...q,plugins:{...q.plugins,enabled:J,disabled:T,commands:[],errors:U}}}),j(`Loaded plugins - Enabled: ${J.length}, Disabled: ${T.length}, Commands: ${Y.length}, Agents: ${Z.length}, Errors: ${Q.length}`);let g=J.reduce((q,B)=>{if(!B.hooksConfig)return q;return q+Object.values(B.hooksConfig).reduce((K,k)=>K+(k?.reduce((U,G)=>U+G.hooks.length,0)??0),0)},0);return{enabled_count:J.length,disabled_count:T.length,inline_count:w(J,(q)=>q.source.endsWith("@inline")),marketplace_count:w(J,(q)=>!q.source.endsWith("@inline")),error_count:Q.length,skill_count:Y.length,agent_count:Z.length,hook_count:g,mcp_count:u,lsp_count:m}}catch(J){let T=x(J);return D(T),j(`Error loading plugins: ${J}`),$([]),H((Q)=>{let X=Q.plugins.errors.filter((Z)=>Z.source==="lsp-manager"||Z.source.startsWith("plugin:")),Y={type:"generic-error",source:"plugin-system",error:T.message};return{...Q,plugins:{...Q.plugins,enabled:[],disabled:[],commands:[],errors:[...X,Y]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[H,z]);return V.useEffect(()=>{if(!W)return;R().then((J)=>{let{ant_enabled_names:T,...Q}=J,X={...Q,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};F("tengu_plugins_loaded",{...X,...T!==void 0&&{enabled_names:T}}),y("info","tengu_plugins_loaded",X)})},[R,W]),V.useEffect(()=>{if(W)return;$([])},[W]),V.useEffect(()=>{if(!W||!O)return;z({key:"plugin-reload-pending",text:"Plugins changed. Run /reload-plugins to activate.",color:"suggestion",priority:"low"})},[W,O,z]),W?b:[]}
2
+ export{Lq as ib};
@@ -0,0 +1,2 @@
1
+ import{Yma as x,Zma as z}from"./cli-0.5.7-258ytmbr.mjs";var H={};x(H,{toInfraSessionId:()=>G,toCompatSessionId:()=>F,setCseShimGate:()=>A});function A(j){q=j}function F(j){if(!j.startsWith("cse_"))return j;if(q&&!q())return j;return"session_"+j.slice(4)}function G(j){if(!j.startsWith("session_"))return j;return"cse_"+j.slice(8)}var q;var J=()=>{};
2
+ export{A as VT,F as WT,G as XT,H as YT,J as ZT};
@@ -0,0 +1,2 @@
1
+ import{Zma as b}from"./cli-0.5.7-258ytmbr.mjs";var j="Remote Control is only available with claude.ai subscriptions. Please use `/login` to sign in with your claude.ai account.",k="Remote Control disconnected.";var g=()=>{};
2
+ export{j as Nd,k as Od,g as Pd};
@@ -0,0 +1,2 @@
1
+ import{Xa as Y}from"./cli-0.5.7-x1azmh1g.mjs";import{eQ as N,fQ as C}from"./cli-0.5.7-w16wj21h.mjs";import{t6 as L,v6 as j}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as A,Pea as w}from"./cli-0.5.7-26pwg6gg.mjs";import{Pfa as W,Sfa as E,tfa as G,xfa as K}from"./cli-0.5.7-twqt7rxq.mjs";import{Gga as B,Nga as k}from"./cli-0.5.7-skfm51ta.mjs";w();C();import{randomUUID as O}from"crypto";E();j();k();K();function T(f){return f!==null&&typeof f==="object"&&"type"in f&&typeof f.type==="string"}function P(f){return f!==null&&typeof f==="object"&&"type"in f&&f.type==="control_response"&&"response"in f}function S(f){return f!==null&&typeof f==="object"&&"type"in f&&f.type==="control_request"&&"request_id"in f&&"request"in f}function v(f){if((f.type==="user"||f.type==="assistant")&&f.isVirtual)return!1;return f.type==="user"||f.type==="assistant"||f.type==="system"&&f.subtype==="local_command"}function q(f){if(f.type!=="user"||f.isMeta||f.toolUseResult||f.isCompactSummary)return;if(f.origin&&f.origin.kind!=="human")return;let X=f.message.content,Q;if(typeof X==="string")Q=X;else for(let Z of X)if(Z.type==="text"){Q=Z.text;break}if(!Q)return;return L(Q)||void 0}function p(f,X,Q,$,Z,z){try{let H=Y(G(f));if(P(H)){W("[bridge:repl] Ingress message type=control_response"),Z?.(H);return}if(S(H)){W(`[bridge:repl] Inbound control_request subtype=${H.request.subtype}`),z?.(H);return}if(!T(H))return;let J="uuid"in H&&typeof H.uuid==="string"?H.uuid:void 0;if(J&&X.has(J)){W(`[bridge:repl] Ignoring echo: type=${H.type} uuid=${J}`);return}if(J&&Q.has(J)){W(`[bridge:repl] Ignoring re-delivered inbound: type=${H.type} uuid=${J}`);return}if(W(`[bridge:repl] Ingress message type=${H.type}${J?` uuid=${J}`:""}`),H.type==="user"){if(J)Q.add(J);A("tengu_bridge_message_received",{is_repl:!0}),$?.(H)}else W(`[bridge:repl] Ignoring non-user inbound message: type=${H.type}`)}catch(H){W(`[bridge:repl] Failed to parse ingress message: ${B(H)}`)}}var y="This session is outbound-only. Enable Remote Control locally to allow inbound control.";function g(f,X){let{transport:Q,sessionId:$,outboundOnly:Z,onInterrupt:z,onSetModel:H,onSetMaxThinkingTokens:J,onSetPermissionMode:h}=X;if(!Q){W("[bridge:repl] Cannot respond to control_request: transport not configured");return}let V;if(Z&&f.request.subtype!=="initialize"){V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:y}};let x={...V,session_id:$};Q.write(x),W(`[bridge:repl] Rejected ${f.request.subtype} (outbound-only) request_id=${f.request_id}`);return}switch(f.request.subtype){case"initialize":V={type:"control_response",response:{subtype:"success",request_id:f.request_id,response:{commands:[],output_style:"normal",available_output_styles:["normal"],models:[],account:{},pid:process.pid}}};break;case"set_model":H?.(f.request.model),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;case"set_max_thinking_tokens":J?.(f.request.max_thinking_tokens),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;case"set_permission_mode":{let x=h?.(f.request.mode)??{ok:!1,error:"set_permission_mode is not supported in this context (onSetPermissionMode callback not registered)"};if(x.ok)V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};else V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:x.error}};break}case"interrupt":z?.(),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;default:V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:`REPL bridge does not handle control_request subtype: ${f.request.subtype}`}}}let _={...V,session_id:$};Q.write(_),W(`[bridge:repl] Sent control_response for ${f.request.subtype} request_id=${f.request_id} result=${V.response.subtype}`)}function d(f){return{type:"result",subtype:"success",duration_ms:0,duration_api_ms:0,is_error:!1,num_turns:0,result:"",stop_reason:null,total_cost_usd:0,usage:{...N},modelUsage:{},permission_denials:[],session_id:f,uuid:O()}}class R{capacity;ring;set=new Set;writeIdx=0;constructor(f){this.capacity=f,this.ring=Array(f)}add(f){if(this.set.has(f))return;let X=this.ring[this.writeIdx];if(X!==void 0)this.set.delete(X);this.ring[this.writeIdx]=f,this.set.add(f),this.writeIdx=(this.writeIdx+1)%this.capacity}has(f){return this.set.has(f)}clear(){this.set.clear(),this.ring.fill(void 0),this.writeIdx=0}}
2
+ export{v as Ra,q as Sa,p as Ta,g as Ua,d as Va,R as Wa};
@@ -0,0 +1,4 @@
1
+ import{Hf as d,If as TG}from"./cli-0.5.7-6thqe6p4.mjs";import{Wf as BG,Yf as kk}from"./cli-0.5.7-6gfay8ap.mjs";import{jh as IG,lh as KG,mh as oG}from"./cli-0.5.7-d19d4v07.mjs";import{At as cG,HD as _,Hp as ZG,ID as VG,LO as wG,MD as m,ND as DG,OH as j,PH as aG,Rp as yG,Wn as XG,XH as PG,Yp as rG,_n as gG,_q as E,eP as zk,fI as eG,gr as sG,im as e,km as GG,mI as UG,mm as kG,pk as a,pm as qG,qI as Gk,qm as zG,rm as JG,sk as iG,tm as QG,uO as jG,zm as lG,zt as Y}from"./cli-0.5.7-q2e6xpch.mjs";import{WR as WG,XR as tG}from"./cli-0.5.7-h9v4tqbs.mjs";import{CT as FG,DT as HG,ET as YG,IT as qk}from"./cli-0.5.7-yaywev87.mjs";import{OT as RG,UT as nG}from"./cli-0.5.7-7mmyazqh.mjs";import{IW as Z,JW as dG,KW as D,MW as u,pX as LG,rV as SG}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as P,QY as x,RY as v}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as MG}from"./cli-0.5.7-8sbq2qed.mjs";import{B3 as mG,R1 as _G,i3 as L,r1 as n,s1 as t}from"./cli-0.5.7-8ychjqct.mjs";import{X3 as o,Y3 as uG}from"./cli-0.5.7-xn6deh04.mjs";import{E$ as c,Eaa as F,F7 as s,Haa as z,J$ as V,K$ as A,M7 as hG,O7 as H,P7 as pG,T$ as xG,_aa as T,w9 as X,y9 as $G}from"./cli-0.5.7-469r2a5r.mjs";import{Kda as K,Vda as h,Wda as p}from"./cli-0.5.7-35yf0b84.mjs";import{Nea as $,Pea as bG}from"./cli-0.5.7-26pwg6gg.mjs";import{Pfa as r,Sfa as fG}from"./cli-0.5.7-twqt7rxq.mjs";import{Vma as f}from"./cli-0.5.7-258ytmbr.mjs";LG();p();bG();T();VG();TG();DG();v();var i=f(SG(),1),M=f(MG(),1),CG={enable_shortcut_tip:!1,enable_startup_dialog:!1};function C(){return h("tengu_desktop_upsell",CG)}function AG(){return process.platform==="darwin"||process.platform==="win32"&&process.arch==="x64"}function Bk(){if(!AG())return!1;if(!C().enable_startup_dialog)return!1;let G=z();if(G.desktopUpsellDismissed)return!1;if((G.desktopUpsellSeenCount??0)>=3)return!1;return!0}function Fk(G){let k=i.c(14),{onDone:q}=G,[J,I]=M.useState(!1),y;if(k[0]===Symbol.for("react.memo_cache_sentinel"))y=[],k[0]=y;else y=k[0];if(M.useEffect(vG,y),J){let B;if(k[1]!==q)B=P(d,{onDone:()=>q()}),k[1]=q,k[2]=B;else B=k[2];return B}let U;if(k[3]!==q)U=function(OG){switch(OG){case"try":{I(!0);return}case"never":{F(EG),q();return}case"not-now":{q();return}}},k[3]=q,k[4]=U;else U=k[4];let Q=U,R;if(k[5]===Symbol.for("react.memo_cache_sentinel"))R={label:"Open in Claude Code Desktop",value:"try"},k[5]=R;else R=k[5];let w;if(k[6]===Symbol.for("react.memo_cache_sentinel"))w={label:"Not now",value:"not-now"},k[6]=w;else w=k[6];let N;if(k[7]===Symbol.for("react.memo_cache_sentinel"))N=[R,w,{label:"Don't ask again",value:"never"}],k[7]=N;else N=k[7];let NG=N,O;if(k[8]===Symbol.for("react.memo_cache_sentinel"))O=P(D,{marginBottom:1,children:P(u,{children:"Same Claude Code with visual diffs, live app preview, parallel sessions, and more."})}),k[8]=O;else O=k[8];let W;if(k[9]!==Q)W=()=>Q("not-now"),k[9]=Q,k[10]=W;else W=k[10];let b;if(k[11]!==Q||k[12]!==W)b=P(m,{title:"Try Claude Code Desktop",children:x(D,{flexDirection:"column",paddingX:2,paddingY:1,children:[O,P(_,{options:NG,onChange:Q,onCancel:W})]})}),k[11]=Q,k[12]=W,k[13]=b;else b=k[13];return b}function EG(G){if(G.desktopUpsellDismissed)return G;return{...G,desktopUpsellDismissed:!0}}function vG(){let G=(z().desktopUpsellSeenCount??0)+1;F((k)=>{if((k.desktopUpsellSeenCount??0)>=G)return k;return{...k,desktopUpsellSeenCount:G}}),$("tengu_desktop_upsell_shown",{seen_count:G})}T();function wk(G){let k=z().numStartups;F((q)=>{let J=q.tipsHistory??{};if(J[G]===k)return q;return{...q,tipsHistory:{...J,[G]:k}}})}function l(G){let k=z(),q=k.tipsHistory?.[G];if(!q)return 1/0;return k.numStartups-q}uG();fG();sG();xG();nG();dG();kk();cG();gG();mG();tG();T();rG();$G();iG();hG();lG();_G();pG();Gk();eG();aG();zk();p();oG();qk();var S;async function Jk(){if(S!==void 0)return S;let G=await PG();return S=j in G,S}async function g(G,k,q){if(!await Jk())return!1;if(UG(`${G}@${j}`))return!1;let{bashTools:J}=k??{};if(q.cli&&J?.size){if(q.cli.some((I)=>J.has(I)))return!0}if(q.filePath&&k?.readFileState){if(a(k.readFileState).some((y)=>q.filePath.test(y)))return!0}return!1}var Qk=[{id:"new-user-warmup",content:async()=>"Start with small features or bug fixes, tell Claude to propose a plan, and verify its suggested edits",cooldownSessions:3,async isRelevant(){return z().numStartups<10}},{id:"plan-mode-for-complex-tasks",content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${Y("chat:cycleMode","Chat","shift+tab")} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let G=z();return(G.lastPlanModeUse?(Date.now()-G.lastPlanModeUse)/86400000:1/0)>7}},{id:"default-permission-mode-config",content:async()=>"Use /config to change your default permission mode (including Plan Mode)",cooldownSessions:10,isRelevant:async()=>{try{let G=z(),k=A(),q=Boolean(G.lastPlanModeUse),J=Boolean(k?.permissions?.defaultMode);return q&&!J}catch(G){return r(`Failed to check default-permission-mode-config tip relevance: ${G}`,{level:"warn"}),!1}}},{id:"git-worktrees",content:async()=>"Use git worktrees to run multiple Claude sessions in parallel.",cooldownSessions:10,isRelevant:async()=>{try{let G=z();return await s()<=1&&G.numStartups>50}catch(G){return!1}}},{id:"bash-output-filter-token-saving",content:async()=>"Bash output filter is active — redundant command output is trimmed before reaching the model, reducing token usage. Disable in /config.",cooldownSessions:20,async isRelevant(){let G=z();return G.numStartups>5&&G.bashOutputFilterEnabled!==!1}},{id:"color-when-multi-clauding",content:async()=>"Running multiple Claude sessions? Use /color and /rename to tell them apart at a glance.",cooldownSessions:10,isRelevant:async()=>{if(jG())return!1;return await WG()>=2}},{id:"terminal-setup",content:async()=>X.terminal==="Apple_Terminal"?"Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more":"Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more",cooldownSessions:10,async isRelevant(){let G=z();if(X.terminal==="Apple_Terminal")return!G.optionAsMetaKeyInstalled;return!G.shiftEnterKeyBindingInstalled}},{id:"shift-enter",content:async()=>X.terminal==="Apple_Terminal"?"Press Option+Enter to send a multi-line message":"Press Shift+Enter to send a multi-line message",cooldownSessions:10,async isRelevant(){let G=z();return Boolean((X.terminal==="Apple_Terminal"?G.optionAsMetaKeyInstalled:G.shiftEnterKeyBindingInstalled)&&G.numStartups>3)}},{id:"shift-enter-setup",content:async()=>X.terminal==="Apple_Terminal"?"Run /terminal-setup to enable Option+Enter for new lines":"Run /terminal-setup to enable Shift+Enter for new lines",cooldownSessions:10,async isRelevant(){if(!RG())return!1;let G=z();return!(X.terminal==="Apple_Terminal"?G.optionAsMetaKeyInstalled:G.shiftEnterKeyBindingInstalled)}},{id:"memory-command",content:async()=>"Use /memory to view and manage Claude memory",cooldownSessions:15,async isRelevant(){return z().memoryUsageCount<=0}},{id:"theme-command",content:async()=>"Use /theme to change the color theme",cooldownSessions:20,isRelevant:async()=>!0},{id:"colorterm-truecolor",content:async()=>"Try setting environment variable COLORTERM=truecolor for richer colors",cooldownSessions:30,isRelevant:async()=>!process.env.COLORTERM&&o.level<3},{id:"powershell-tool-env",content:async()=>"Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)",cooldownSessions:10,isRelevant:async()=>H()==="windows"&&process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL===void 0},{id:"status-line",content:async()=>"Use /statusline to set up a custom status line that will display beneath the input box",cooldownSessions:25,isRelevant:async()=>A().statusLine===void 0},{id:"prompt-queue",content:async()=>"Hit Enter to queue up additional messages while Claude is working.",cooldownSessions:5,async isRelevant(){return z().promptQueueUseCount<=3}},{id:"enter-to-steer-in-relatime",content:async()=>"Send messages to Claude while it works to steer Claude in real-time",cooldownSessions:20,isRelevant:async()=>!0},{id:"todo-list",content:async()=>"Ask Claude to create a todo list when working on complex tasks to track progress and remain on track",cooldownSessions:20,isRelevant:async()=>!0},{id:"vscode-command-install",content:async()=>`Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${X.terminal==="vscode"?"code":X.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!e())return!1;if(H()!=="macos")return!1;switch(X.terminal){case"vscode":return!await JG();case"cursor":return!await qG();case"windsurf":return!await zG();default:return!1}}},{id:"ide-upsell-external-terminal",content:async()=>"Connect Claude to your IDE · /ide",cooldownSessions:4,async isRelevant(){if(GG())return!1;if((await kG()).length!==0)return!1;return(await QG()).length>0}},{id:"install-github-app",content:async()=>"Run /install-github-app to tag @claude right from your Github issues and PRs",cooldownSessions:10,isRelevant:async()=>!z().githubActionSetupCount},{id:"install-slack-app",content:async()=>"Run /install-slack-app to use Claude in Slack",cooldownSessions:10,isRelevant:async()=>!z().slackAppInstallCount},{id:"permissions",content:async()=>"Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools",cooldownSessions:10,async isRelevant(){return z().numStartups>10}},{id:"drag-and-drop-images",content:async()=>"Did you know you can drag and drop image files into your terminal?",cooldownSessions:10,isRelevant:async()=>!X.isSSH()},{id:"paste-images-mac",content:async()=>"Paste images into Claude Code using control+v (not cmd+v!)",cooldownSessions:10,isRelevant:async()=>H()==="macos"},{id:"double-esc",content:async()=>"Double-tap esc to rewind the conversation to a previous point in time",cooldownSessions:10,isRelevant:async()=>!E()},{id:"double-esc-code-restore",content:async()=>"Double-tap esc to rewind the code and/or conversation to a previous point in time",cooldownSessions:10,isRelevant:async()=>E()},{id:"continue",content:async()=>"Run claude --continue or claude --resume to resume a conversation",cooldownSessions:10,isRelevant:async()=>!0},{id:"rename-conversation",content:async()=>"Name your conversations with /rename to find them easily in /resume later",cooldownSessions:15,isRelevant:async()=>wG()&&z().numStartups>10},{id:"custom-commands",content:async()=>"Create skills by adding .md files to .claudin/skills/ in your project or ~/.claudin/skills/ for skills that work in any project",cooldownSessions:15,async isRelevant(){return z().numStartups>10}},{id:"shift-tab",content:async()=>`Hit ${Y("chat:cycleMode","Chat","shift+tab")} to cycle between default mode, auto-accept edit mode, and plan mode`,cooldownSessions:10,isRelevant:async()=>!0},{id:"image-paste",content:async()=>`Use ${Y("chat:imagePaste","Chat","ctrl+v")} to paste images from your clipboard`,cooldownSessions:20,isRelevant:async()=>!0},{id:"custom-agents",content:async()=>"Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer",cooldownSessions:15,async isRelevant(){return z().numStartups>5}},{id:"agent-flag",content:async()=>"Use --agent <agent_name> to directly start a conversation with a subagent",cooldownSessions:15,async isRelevant(){return z().numStartups>5}},{id:"desktop-app",content:async()=>"Run Claude Code locally or remotely using the Claude desktop app: clau.de/desktop",cooldownSessions:15,isRelevant:async()=>H()!=="linux"},{id:"desktop-shortcut",content:async(G)=>{return`Continue your session in Claude Code Desktop with ${Z("suggestion",G.theme)("/desktop")}`},cooldownSessions:15,isRelevant:async()=>{if(!C().enable_shortcut_tip)return!1;return process.platform==="darwin"||process.platform==="win32"&&process.arch==="x64"}},{id:"web-app",content:async()=>"Run tasks in the cloud while you keep coding locally · clau.de/web",cooldownSessions:15,isRelevant:async()=>!0},{id:"mobile-app",content:async()=>"/mobile to use Claude Code from the Claude app on your phone",cooldownSessions:15,isRelevant:async()=>!0},{id:"opusplan-mode-reminder",content:async()=>`Your default model setting is Opus Plan Mode. Press ${Y("chat:cycleMode","Chat","shift+tab")} twice to activate Plan Mode and plan with Claude Opus.`,cooldownSessions:2,async isRelevant(){let G=z(),q=n()==="opusplan",J=G.lastPlanModeUse?(Date.now()-G.lastPlanModeUse)/86400000:1/0;return q&&J>3}},{id:"frontend-design-plugin",content:async(G)=>{return`Working with HTML/CSS? Install the frontend-design plugin:
2
+ ${Z("suggestion",G.theme)(`/plugin install frontend-design@${j}`)}`},cooldownSessions:3,isRelevant:async(G)=>g("frontend-design",G,{filePath:/\.(html|css|htm)$/i})},{id:"vercel-plugin",content:async(G)=>{return`Working with Vercel? Install the vercel plugin:
3
+ ${Z("suggestion",G.theme)(`/plugin install vercel@${j}`)}`},cooldownSessions:3,isRelevant:async(G)=>g("vercel",G,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:["vercel"]})},{id:"effort-high-nudge",content:async(G)=>{let q=Z("suggestion",G.theme)("/effort high");return K("tengu_tide_elm","off")==="copy_b"?`Use ${q} for better one-shot answers. Claude thinks it through first.`:`Working on something tricky? ${q} gives better first answers`},cooldownSessions:3,isRelevant:async()=>{if(!L())return!1;if(!ZG(t()))return!1;if(c("policySettings")?.effortLevel!==void 0)return!1;if(yG()!==void 0)return!1;let G=V().effortLevel;if(G==="high"||G==="max")return!1;return K("tengu_tide_elm","off")!=="off"}},{id:"subagent-fanout-nudge",content:async(G)=>{let k=Z("suggestion",G.theme);return K("tengu_tern_alloy","off")==="copy_b"?`For big tasks, tell Claude to ${k("use subagents")}. They work in parallel and keep your main thread clean.`:`Say ${k('"fan out subagents"')} and Claude sends a team. Each one digs deep so nothing gets missed.`},cooldownSessions:3,isRelevant:async()=>{if(!L())return!1;return K("tengu_tern_alloy","off")!=="off"}},{id:"loop-command-nudge",content:async(G)=>{let k=Z("suggestion",G.theme);return K("tengu_timber_lark","off")==="copy_b"?`Use ${k("/loop 5m check the deploy")} to run any prompt on a schedule. Set it and forget it.`:`${k("/loop")} runs any prompt on a recurring schedule. Great for monitoring deploys, babysitting PRs, or polling status.`},cooldownSessions:3,isRelevant:async()=>{if(!L())return!1;if(!XG())return!1;return K("tengu_timber_lark","off")!=="off"}},{id:"guest-passes",content:async(G)=>{let k=Z("claude",G.theme),q=YG();return q?`Share Claude Code and earn ${k(HG(q))} of extra usage · ${k("/passes")}`:`You have free guest passes to share · ${k("/passes")}`},cooldownSessions:3,isRelevant:async()=>{if(z().hasVisitedPasses)return!1;let{eligible:k}=FG();return k}},{id:"overage-credit",content:async(G)=>{let k=Z("claude",G.theme),q=IG(),J=q?KG(q):null;if(!J)return"";return`${k(`${J} in extra usage, on us`)} · third-party apps · ${k("/extra-usage")}`},cooldownSessions:3,isRelevant:async()=>BG()},{id:"feedback-command",content:async()=>"Use /feedback to help us improve!",cooldownSessions:15,async isRelevant(){return z().numStartups>5}}],Xk=[];function Zk(){let k=V().spinnerTipsOverride;if(!k?.tips?.length)return[];return k.tips.map((q,J)=>({id:`custom-tip-${J}`,content:async()=>q,cooldownSessions:0,isRelevant:async()=>!0}))}async function nk(G){let q=V().spinnerTipsOverride,J=Zk();if(q?.excludeDefault&&J.length>0)return J;let I=[...Qk,...Xk],y=await Promise.all(I.map((Q)=>Q.isRelevant(G)));return[...I.filter((Q,R)=>y[R]).filter((Q)=>l(Q.id)>=Q.cooldownSessions),...J]}function ak(G,k=process.argv){for(let q=0;q<k.length;q++){let J=k[q];if(J?.startsWith(`${G}=`))return J.slice(G.length+1);if(J===G&&q+1<k.length)return k[q+1]}return}
4
+ export{wk as Ya,l as Za,Bk as _a,Fk as $a,nk as ab,ak as bb};
@@ -0,0 +1,2 @@
1
+ import{D5 as _,E5 as w,z5 as Z}from"./cli-0.5.7-0df5m6td.mjs";import{Eaa as W,Haa as V,M7 as T,S8 as D,_aa as j,a7 as Y,b7 as U,m7 as $,w8 as k}from"./cli-0.5.7-469r2a5r.mjs";import{Pfa as N,Sfa as M}from"./cli-0.5.7-twqt7rxq.mjs";import{ima as O,xia as X}from"./cli-0.5.7-hp25yk8y.mjs";O();j();M();w();D();U();T();import{realpath as v}from"fs/promises";async function b(){try{let q=await Z();if(!q){N("Not in a GitHub repository, skipping path mapping update");return}let A=X(),z=$(A)??A,B;try{B=(await v(z)).normalize("NFC")}catch{B=z}let J=q.toLowerCase(),L=V().githubRepoPaths?.[J]??[];if(L[0]===B){N(`Path ${B} already tracked for repo ${J}`);return}let E=L.filter((S)=>S!==B),H=[B,...E];W((S)=>({...S,githubRepoPaths:{...S.githubRepoPaths,[J]:H}})),N(`Added ${B} to tracked paths for repo ${J}`)}catch(q){N(`Error updating repo path mapping: ${q}`)}}function y(q){let A=V(),I=q.toLowerCase();return A.githubRepoPaths?.[I]??[]}async function P(q){let A=await Promise.all(q.map(k));return q.filter((I,z)=>A[z])}async function d(q,A){try{let I=await Y(q);if(!I)return!1;let z=_(I);if(!z)return!1;return z.toLowerCase()===A.toLowerCase()}catch{return!1}}function c(q,A){let I=V(),z=q.toLowerCase(),B=I.githubRepoPaths?.[z]??[],J=B.filter((L)=>L!==A);if(J.length===B.length)return;let Q={...I.githubRepoPaths};if(J.length===0)delete Q[z];else Q[z]=J;W((L)=>({...L,githubRepoPaths:Q})),N(`Removed ${A} from tracked paths for repo ${z}`)}
2
+ export{b as _,y as $,P as aa,d as ba,c as ca};
@@ -0,0 +1,2 @@
1
+ import{Zma as P}from"./cli-0.5.7-258ytmbr.mjs";import{homedir as Q}from"os";import{join as F}from"path";function J(q){return{env:q?.env??process.env,home:q?.homedir??process.env.HOME??Q()}}function k(q){let{env:x,home:B}=J(q);return x.XDG_STATE_HOME??F(B,".local","state")}function w(q){let{env:x,home:B}=J(q);return x.XDG_CACHE_HOME??F(B,".cache")}function H(q){let{env:x,home:B}=J(q);return x.XDG_DATA_HOME??F(B,".local","share")}function g(q){let{home:x}=J(q);return F(x,".local","bin")}var V=()=>{};function W(q){let x=q,B="",C=0,K=10;while(x!==B&&C<K)B=x,x=x.normalize("NFKC"),x=x.replace(/[\p{Cf}\p{Co}\p{Cn}]/gu,""),x=x.replace(/[\u200B-\u200F]/g,"").replace(/[\u202A-\u202E]/g,"").replace(/[\u2066-\u2069]/g,"").replace(/[\uFEFF]/g,"").replace(/[\uE000-\uF8FF]/g,""),C++;if(C>=K)throw Error(`Unicode sanitization reached maximum iterations (${K}) for input: ${q.slice(0,100)}`);return x}function L(q){if(typeof q==="string")return W(q);if(Array.isArray(q))return q.map(L);if(q!==null&&typeof q==="object"){let x={};for(let[B,C]of Object.entries(q))x[L(B)]=L(C);return x}return q}var Y=()=>{};
2
+ export{k as yQ,w as zQ,H as AQ,g as BQ,V as CQ,W as DQ,L as EQ,Y as FQ};
@@ -0,0 +1,2 @@
1
+ import{MW as t,pX as f,rV as s}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as n,QY as c,RY as r}from"./cli-0.5.7-vgc7nzef.mjs";import{Vma as m,Zma as l}from"./cli-0.5.7-258ytmbr.mjs";function T(){let o=i.c(1),e;if(o[0]===Symbol.for("react.memo_cache_sentinel"))e=c(t,{color:"permission",children:["Press ",n(t,{bold:!0,children:"Enter"})," to continue…"]}),o[0]=e;else e=o[0];return e}var i;var p=l(()=>{f();r();i=m(s(),1)});
2
+ export{T as lf,p as mf};
@@ -0,0 +1,2 @@
1
+ import{Zma as H}from"./cli-0.5.7-258ytmbr.mjs";function F(){if(!A)A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return A}function K(b){if(!b)return"";return F().segment(b)[Symbol.iterator]().next().value?.segment??""}function M(b){if(!b)return"";let j="";for(let{segment:q}of F().segment(b))j=q;return j}function N(){if(!B)B=new Intl.Segmenter(void 0,{granularity:"word"});return B}function O(b,j){let q=`${b}:${j}`,z=E.get(q);if(!z)z=new Intl.RelativeTimeFormat("en",{style:b,numeric:j}),E.set(q,z);return z}function P(){if(!D)D=Intl.DateTimeFormat().resolvedOptions().timeZone;return D}var A=null,B=null,E,D=null;var J=H(()=>{E=new Map});
2
+ export{F as qda,K as rda,M as sda,N as tda,O as uda,P as vda,J as wda};
@@ -0,0 +1,2 @@
1
+ import{Zma as C}from"./cli-0.5.7-258ytmbr.mjs";function F(m,q){switch(q.type){case"set_local_jsx":{if(q.generation<m.generation)return m;return{state:{...q.payload,isLocalJSXCommand:!0},generation:m.generation+1,hasLocalJSXActive:!0}}case"clear_local_jsx":return{state:null,generation:m.generation+1,hasLocalJSXActive:!1};case"set_regular":{if(m.hasLocalJSXActive)return m;return{...m,state:q.payload}}case"set_null":{if(m.hasLocalJSXActive)return m;if(m.state===null)return m;return{...m,state:null}}}}var D;var G=C(()=>{D={state:null,generation:0,hasLocalJSXActive:!1}});function L(m){return B=m,()=>{if(B===m)B=null}}function M(m){let q=F(z,m);if(q===z)return;z=q,B?.(q.state)}function N(){return z.generation}var z,B=null;var H=C(()=>{G();z=D});
2
+ export{L as Yg,M as Zg,N as _g,H as $g};
@@ -0,0 +1,2 @@
1
+ import{lZ as m}from"./cli-0.5.7-m5q27x96.mjs";import{B3 as $,j3 as K}from"./cli-0.5.7-8ychjqct.mjs";import{Eaa as Q,Haa as J,J6 as X,_aa as Z,x6 as W}from"./cli-0.5.7-469r2a5r.mjs";import{Mea as Y}from"./cli-0.5.7-xepvraxn.mjs";import{Zma as V}from"./cli-0.5.7-258ytmbr.mjs";function y(){let z=K()?.organizationUuid;if(!z)return null;let B=J().overageCreditGrantCache?.[z];if(!B)return null;if(Date.now()-B.timestamp>q)return null;return B.info}function G(){let z=K()?.organizationUuid;if(!z)return;let B=J().overageCreditGrantCache;if(!B||!(z in B))return;Q((N)=>{let P={...N.overageCreditGrantCache};return delete P[z],{...N,overageCreditGrantCache:P}})}function U(z){if(z.amount_minor_units==null||!z.currency)return null;if(z.currency.toUpperCase()==="USD"){let B=z.amount_minor_units/100;return Number.isInteger(B)?`$${B}`:`$${B.toFixed(2)}`}return null}var q=3600000;var w=V(()=>{Y();$();Z();X();W();m()});
2
+ export{y as jh,G as kh,U as lh,w as mh};
@@ -0,0 +1,2 @@
1
+ import{Mm as Z,Rm as G}from"./cli-0.5.7-q2e6xpch.mjs";import{B6 as X,J6 as R}from"./cli-0.5.7-469r2a5r.mjs";import{Bfa as C,Ffa as M,Pfa as U,Sfa as O,sfa as v,tfa as B,xfa as A}from"./cli-0.5.7-twqt7rxq.mjs";import{Zma as b}from"./cli-0.5.7-258ytmbr.mjs";import{randomBytes as L}from"crypto";import{readFile as N,rename as S,unlink as T,writeFile as _}from"fs/promises";import{join as E}from"path";function Y(){return E(Z(),j)}function k(q){let x=B(q);if(typeof x!=="object"||x===null||!("plugins"in x)||typeof x.plugins!=="object"||x.plugins===null)return{};let z=x.plugins,J={};for(let[Q,K]of Object.entries(z))if(K&&typeof K==="object"&&"flaggedAt"in K&&typeof K.flaggedAt==="string"){let $={flaggedAt:K.flaggedAt};if("seenAt"in K&&typeof K.seenAt==="string")$.seenAt=K.seenAt;J[Q]=$}return J}async function V(){try{let q=await N(Y(),{encoding:"utf-8"});return k(q)}catch{return{}}}async function W(q){let x=Y(),z=`${x}.${L(8).toString("hex")}.tmp`;try{await C().mkdir(Z());let J=v({plugins:q},null,2);await _(z,J,{encoding:"utf-8",mode:384}),await S(z,x),H=q}catch(J){X(J);try{await T(z)}catch{}}}async function o(){let q=await V(),x=Date.now(),z=!1;for(let[J,Q]of Object.entries(q))if(Q.seenAt&&x-new Date(Q.seenAt).getTime()>=f)delete q[J],z=!0;if(H=q,z)await W(q)}function c(){return H??{}}async function p(q){if(H===null)H=await V();let x={...H,[q]:{flaggedAt:new Date().toISOString()}};await W(x),U(`Flagged plugin: ${q}`)}async function d(q){if(H===null)H=await V();let x=new Date().toISOString(),z=!1,J={...H};for(let Q of q){let K=J[Q];if(K&&!K.seenAt)J[Q]={...K,seenAt:x},z=!0}if(z)await W(J)}async function g(q){if(H===null)H=await V();if(!(q in H))return;let{[q]:x,...z}=H;H=z,await W(z)}var j="flagged-plugins.json",f=172800000,H=null;var w=b(()=>{O();M();R();A();G()});
2
+ export{o as kc,c as lc,p as mc,d as nc,g as oc,w as pc};
@@ -0,0 +1,2 @@
1
+ function e(){return null}function i(){}function o(){return[]}async function t(){}async function n(){}function r(){}
2
+ export{e as ob,i as pb,o as qb,t as rb,n as sb,r as tb};