@unieai/code 0.0.9 → 0.0.11

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 (486) hide show
  1. package/README.en.md +67 -160
  2. package/README.md +53 -146
  3. package/dist/chunks/App-s5ex5j86.js +2 -0
  4. package/dist/chunks/ApproveApiKey-b4z6h2gn.js +2 -0
  5. package/dist/chunks/{assistant-yvtpv5sv.js → AssistantSessionChooser-g1vsya6h.js} +1 -1
  6. package/dist/chunks/BypassPermissionsModeDialog-jbg97eja.js +2 -0
  7. package/dist/chunks/ClaudeInChromeOnboarding-qa0pvwfw.js +2 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-gqmed78y.js +2 -0
  9. package/dist/chunks/ConsoleOAuthFlow-yh72vs8j.js +2 -0
  10. package/dist/chunks/{DiffDialog-v8smgzpd.js → DiffDialog-t6vvtbb2.js} +1 -1
  11. package/dist/chunks/Doctor-k08ggw2j.js +2 -0
  12. package/dist/chunks/Grove-tkkskg8n.js +2 -0
  13. package/dist/chunks/ITermBackend-73waaahf.js +2 -0
  14. package/dist/chunks/{InProcessTransport-57c2w5v4.js → InProcessTransport-qwjgb17j.js} +1 -1
  15. package/dist/chunks/InvalidConfigDialog-zmqw3fj1.js +2 -0
  16. package/dist/chunks/InvalidSettingsDialog-tnd5hymg.js +2 -0
  17. package/dist/chunks/Onboarding-p0tq6pgz.js +2 -0
  18. package/dist/chunks/REPL-hjjz80kq.js +2 -0
  19. package/dist/chunks/ResumeConversation-krn9hqb1.js +2 -0
  20. package/dist/chunks/{SnapshotUpdateDialog-5yvfnp0q.js → SnapshotUpdateDialog-raq029pd.js} +1 -1
  21. package/dist/chunks/TeleportProgress-vyy2k3bv.js +2 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-ff0h2cnq.js +2 -0
  23. package/dist/chunks/TeleportResumeWrapper-esjykret.js +2 -0
  24. package/dist/chunks/{TmuxBackend-j665sv6f.js → TmuxBackend-14kmnkcb.js} +1 -1
  25. package/dist/chunks/ToolSearchTool-w4t61c7d.js +2 -0
  26. package/dist/chunks/TrustDialog-7fvaze2x.js +2 -0
  27. package/dist/chunks/TungstenTool-rv96z549.js +2 -0
  28. package/dist/chunks/add-dir-kqw72mky.js +2 -0
  29. package/dist/chunks/agents-3exybgtb.js +4 -0
  30. package/dist/chunks/{agents-e7x38q37.js → agents-z66twpqr.js} +1 -1
  31. package/dist/chunks/ant-claude-for-chrome-mcp-712xg07f.js +2 -0
  32. package/dist/chunks/api-z8svc3xt.js +2 -0
  33. package/dist/chunks/asciicast-vzd7qjbb.js +2 -0
  34. package/dist/chunks/{AssistantSessionChooser-0r5zamt1.js → assistant-ftzr3mjp.js} +1 -1
  35. package/dist/chunks/auth-gbyfq0g2.js +2 -0
  36. package/dist/chunks/auth-wk077awh.js +2 -0
  37. package/dist/chunks/backgroundHousekeeping-m8gthtkh.js +2 -0
  38. package/dist/chunks/branch-1d0b8590.js +5 -0
  39. package/dist/chunks/{bridgePointer-9q6wh2ct.js → bridgePointer-vhd47np6.js} +1 -1
  40. package/dist/chunks/btw-s3r5jhyd.js +2 -0
  41. package/dist/chunks/buddy-xzm5npk8.js +2 -0
  42. package/dist/chunks/{cachedMicrocompact-thnhx1zt.js → cachedMicrocompact-6j3zxr4g.js} +1 -1
  43. package/dist/chunks/caches-fbggdeq7.js +2 -0
  44. package/dist/chunks/chrome-mdyx0s5j.js +2 -0
  45. package/dist/chunks/{chromeNativeHost-nnjkj164.js → chromeNativeHost-8wc6wcr6.js} +1 -1
  46. package/dist/chunks/{claudeDesktop-nsangyk5.js → claudeDesktop-p5bfxmvz.js} +1 -1
  47. package/dist/chunks/{cleanup-mv462dsh.js → cleanup-q46nbce1.js} +1 -1
  48. package/dist/chunks/clear-fwad6zxy.js +2 -0
  49. package/dist/chunks/{cli-sbp2221d.js → cli-0dc8sd37.js} +2 -2
  50. package/dist/chunks/{cli-3xhqacdd.js → cli-0qt9btbe.js} +2 -2
  51. package/dist/chunks/{cli-4j5yyvek.js → cli-0w4wc1z0.js} +2 -2
  52. package/dist/chunks/{cli-r6hm1q63.js → cli-15sqp3mq.js} +2 -2
  53. package/dist/chunks/{cli-45ftgn85.js → cli-15w3eaed.js} +1 -1
  54. package/dist/chunks/{cli-b7wx1479.js → cli-19ncan36.js} +1 -1
  55. package/dist/chunks/{cli-hx28w3cq.js → cli-1jp3rm7n.js} +1 -1
  56. package/dist/chunks/{cli-90b87f45.js → cli-1n8he7s8.js} +2 -2
  57. package/dist/chunks/{cli-bthzmdgv.js → cli-1ny2386w.js} +2 -2
  58. package/dist/chunks/{cli-vq899n8p.js → cli-27mzrnr8.js} +1 -1
  59. package/dist/chunks/{cli-gnjff7md.js → cli-2rw44zfx.js} +2 -2
  60. package/dist/chunks/{cli-7gpep1x5.js → cli-2rwjx3w0.js} +1 -1
  61. package/dist/chunks/{cli-jqppy97b.js → cli-2wd8eaac.js} +2 -2
  62. package/dist/chunks/{cli-3hwpymrd.js → cli-350pymj4.js} +2 -2
  63. package/dist/chunks/{cli-w754xmyv.js → cli-3ac555qw.js} +2 -2
  64. package/dist/chunks/{cli-8kyjh67j.js → cli-3gwqrmcd.js} +1 -1
  65. package/dist/chunks/{cli-msr9n6da.js → cli-3m8n808e.js} +2 -2
  66. package/dist/chunks/{cli-ptv3h2tx.js → cli-42kma5r3.js} +1 -1
  67. package/dist/chunks/{cli-r9p0g894.js → cli-49m97nbg.js} +2 -2
  68. package/dist/chunks/{cli-bkxwwj81.js → cli-4a4bb1kf.js} +1 -1
  69. package/dist/chunks/{cli-3bxtq5dc.js → cli-4ewb3q42.js} +2 -2
  70. package/dist/chunks/{cli-v3mf1g0z.js → cli-4mvvtchx.js} +2 -2
  71. package/dist/chunks/{cli-r2p5bkx5.js → cli-4nejhkd0.js} +2 -2
  72. package/dist/chunks/{cli-dx46fn1w.js → cli-51720d82.js} +2 -2
  73. package/dist/chunks/cli-55jdp9ky.js +3 -0
  74. package/dist/chunks/{cli-6vwdnz9p.js → cli-55ntywtj.js} +1 -1
  75. package/dist/chunks/{cli-pz8vxqw0.js → cli-57yrpnaq.js} +2 -2
  76. package/dist/chunks/{cli-59ysj9y4.js → cli-5dt9yjha.js} +2 -2
  77. package/dist/chunks/{cli-e37w9dxm.js → cli-5f0w3fy6.js} +1 -1
  78. package/dist/chunks/{cli-z9jm4xjn.js → cli-5vsnhp97.js} +2 -2
  79. package/dist/chunks/{cli-x758qvv7.js → cli-61x73ksv.js} +1 -1
  80. package/dist/chunks/{cli-ye3qk73s.js → cli-66jj9zj3.js} +1 -1
  81. package/dist/chunks/{cli-zac1afnb.js → cli-6bxfdgv1.js} +1 -1
  82. package/dist/chunks/{cli-md1h6sbv.js → cli-6pdpyz1a.js} +1 -1
  83. package/dist/chunks/{cli-mejr8b5m.js → cli-6yprtw88.js} +2 -2
  84. package/dist/chunks/{cli-qs0v3mf6.js → cli-73jf8hyz.js} +2 -2
  85. package/dist/chunks/{cli-948we41z.js → cli-749tdaqc.js} +2 -2
  86. package/dist/chunks/{cli-vxxkrd5y.js → cli-764c4bsm.js} +2 -2
  87. package/dist/chunks/cli-78apjp3t.js +3 -0
  88. package/dist/chunks/{cli-k0jpcxwa.js → cli-7c99j0pt.js} +2 -2
  89. package/dist/chunks/{cli-by5b2216.js → cli-89x414pj.js} +2 -2
  90. package/dist/chunks/{cli-fqb71hy3.js → cli-8dmy2s42.js} +1 -1
  91. package/dist/chunks/cli-8hxz2qs6.js +3 -0
  92. package/dist/chunks/cli-8mk2zg4a.js +4 -0
  93. package/dist/chunks/{cli-29gcax34.js → cli-8qd16mt4.js} +2 -2
  94. package/dist/chunks/cli-95wg48h9.js +3 -0
  95. package/dist/chunks/{cli-wz9r5s81.js → cli-99mqr54v.js} +2 -2
  96. package/dist/chunks/{cli-8qk46mt3.js → cli-9aq7vxaq.js} +1 -1
  97. package/dist/chunks/{cli-zcpjf07m.js → cli-9z9r2set.js} +2 -2
  98. package/dist/chunks/{cli-2wvsym16.js → cli-a52ra30v.js} +1 -1
  99. package/dist/chunks/{cli-s6qk3rbv.js → cli-akcxtvv9.js} +2 -2
  100. package/dist/chunks/{cli-h3kcprht.js → cli-bmk0rb5v.js} +2 -2
  101. package/dist/chunks/{cli-pmzht94n.js → cli-br6zjh6x.js} +2 -2
  102. package/dist/chunks/{cli-z8hqtyjg.js → cli-c22wpdk4.js} +1 -1
  103. package/dist/chunks/{cli-zbt28krs.js → cli-c60c9qvm.js} +1 -1
  104. package/dist/chunks/{cli-3357rxva.js → cli-cqkne34j.js} +2 -2
  105. package/dist/chunks/{cli-0s65jzgr.js → cli-cwbxhdt1.js} +1 -1
  106. package/dist/chunks/{cli-xsap3gxj.js → cli-d0hzw78c.js} +1 -1
  107. package/dist/chunks/{cli-0b4dmvvw.js → cli-d53fhs6v.js} +2 -2
  108. package/dist/chunks/{cli-extf4h54.js → cli-dbdqrqmt.js} +1 -1
  109. package/dist/chunks/{cli-yf3sh3aw.js → cli-de1hwp88.js} +1 -1
  110. package/dist/chunks/cli-edkqs0ge.js +3 -0
  111. package/dist/chunks/{cli-dsnjsvqs.js → cli-er7z496e.js} +2 -2
  112. package/dist/chunks/{cli-atpfeg28.js → cli-eyw3czmn.js} +2 -2
  113. package/dist/chunks/{cli-tyxvdf66.js → cli-ezs5sney.js} +2 -2
  114. package/dist/chunks/{cli-tn47e131.js → cli-f63fdj4w.js} +2 -2
  115. package/dist/chunks/cli-fakdskp6.js +3 -0
  116. package/dist/chunks/{cli-nj726gac.js → cli-fdya77ch.js} +3 -3
  117. package/dist/chunks/{cli-b1dptek2.js → cli-fghyxar5.js} +2 -2
  118. package/dist/chunks/{cli-g1spmn9n.js → cli-fm14mg07.js} +1 -1
  119. package/dist/chunks/{cli-cr1hvkmz.js → cli-fs7yttfp.js} +2 -2
  120. package/dist/chunks/{cli-rcvta3zk.js → cli-fwrj8ybs.js} +2 -2
  121. package/dist/chunks/{cli-v77avvvk.js → cli-g4n9das2.js} +1 -1
  122. package/dist/chunks/{cli-cbdrqqf2.js → cli-g5wq5ptg.js} +2 -2
  123. package/dist/chunks/{cli-yrk194b9.js → cli-gq5fve62.js} +1 -1
  124. package/dist/chunks/{cli-nykt265k.js → cli-grxvgq2n.js} +1 -1
  125. package/dist/chunks/{cli-ffjjv4j8.js → cli-gtm212j6.js} +2 -2
  126. package/dist/chunks/{cli-skq9ktf8.js → cli-gxgdnjfn.js} +1 -1
  127. package/dist/chunks/{cli-x5z5m6y7.js → cli-h120wpk2.js} +1 -1
  128. package/dist/chunks/{cli-58t6a5n6.js → cli-h4a90xbh.js} +1 -1
  129. package/dist/chunks/cli-h4dspaac.js +3 -0
  130. package/dist/chunks/{cli-a98b285v.js → cli-hke6r0q8.js} +2 -2
  131. package/dist/chunks/{cli-jxwm52wg.js → cli-hzr2zraz.js} +1 -1
  132. package/dist/chunks/{cli-x4a9geyz.js → cli-j08dmxw5.js} +1 -1
  133. package/dist/chunks/{cli-jvs98a70.js → cli-ja540nr7.js} +1 -1
  134. package/dist/chunks/{cli-dr1ph0pp.js → cli-jegyadmb.js} +2 -2
  135. package/dist/chunks/{cli-xjx11p6m.js → cli-jgn9jprh.js} +2 -2
  136. package/dist/chunks/{cli-n3m134cf.js → cli-jj93qmmc.js} +2 -2
  137. package/dist/chunks/{cli-kje3t5yg.js → cli-jkj867t1.js} +3 -3
  138. package/dist/chunks/{cli-6he3kpeb.js → cli-k2nh5cby.js} +2 -2
  139. package/dist/chunks/{cli-3je4vtx7.js → cli-k4v08k8t.js} +2 -2
  140. package/dist/chunks/{cli-c2pn6csk.js → cli-khs3sj9k.js} +1 -1
  141. package/dist/chunks/{cli-shz2e0q5.js → cli-kq16afrr.js} +2 -2
  142. package/dist/chunks/{cli-2zh6c5xz.js → cli-kqv5b8zh.js} +1 -1
  143. package/dist/chunks/{cli-k8fd74g6.js → cli-m0z3rmf0.js} +2 -2
  144. package/dist/chunks/{cli-a72n4ej7.js → cli-m12smc5e.js} +1 -1
  145. package/dist/chunks/{cli-15zbq52w.js → cli-m8fq163z.js} +1 -1
  146. package/dist/chunks/{cli-1215h20m.js → cli-mb1qrqw1.js} +2 -2
  147. package/dist/chunks/{cli-50wh7ttg.js → cli-mbp8f3f3.js} +2 -2
  148. package/dist/chunks/{cli-5pb6kdxn.js → cli-me4e2p3e.js} +595 -595
  149. package/dist/chunks/{cli-vz1j9n38.js → cli-mj03488e.js} +2 -2
  150. package/dist/chunks/{cli-6dcra6rs.js → cli-ms5j6fff.js} +2 -2
  151. package/dist/chunks/{cli-0v6qg4zv.js → cli-msgx4pnp.js} +2 -2
  152. package/dist/chunks/cli-msmzt4c3.js +130 -0
  153. package/dist/chunks/{cli-h5yfk29j.js → cli-msw0vv86.js} +2 -2
  154. package/dist/chunks/{cli-ewts4g0p.js → cli-mzcsnm06.js} +2 -2
  155. package/dist/chunks/{cli-wr4k6ngg.js → cli-n5s5fnyj.js} +2 -2
  156. package/dist/chunks/{cli-ygq3fy9g.js → cli-ns0aaggm.js} +1 -1
  157. package/dist/chunks/{cli-1a2nss2m.js → cli-nvnj7r73.js} +1 -1
  158. package/dist/chunks/{cli-hpzy0mat.js → cli-p0vh69b9.js} +2 -2
  159. package/dist/chunks/{cli-zf7yzkn6.js → cli-p2cqnrnp.js} +2 -2
  160. package/dist/chunks/{cli-px7jhzgq.js → cli-pbc8sk2d.js} +2 -2
  161. package/dist/chunks/{cli-29078yxj.js → cli-pgg33dhw.js} +2 -2
  162. package/dist/chunks/cli-przq3zk6.js +3 -0
  163. package/dist/chunks/{cli-q9fn82b1.js → cli-q0156x0d.js} +2 -2
  164. package/dist/chunks/{cli-zdy5bccv.js → cli-q46epwyh.js} +1 -1
  165. package/dist/chunks/{cli-v8w48y51.js → cli-qaxvg7gv.js} +1 -1
  166. package/dist/chunks/{cli-ytj910yt.js → cli-qm684n63.js} +1 -1
  167. package/dist/chunks/{cli-2qec7gn4.js → cli-r3etpht1.js} +1 -1
  168. package/dist/chunks/{cli-amy2yafd.js → cli-r83ttew2.js} +2 -2
  169. package/dist/chunks/{cli-22zbzzap.js → cli-r9db9mqv.js} +1 -1
  170. package/dist/chunks/{cli-3q7meftn.js → cli-rjerv816.js} +2 -2
  171. package/dist/chunks/{cli-mx6xk0dw.js → cli-rvad3yhg.js} +2 -2
  172. package/dist/chunks/{cli-wfqsfwa2.js → cli-rxb5q8zw.js} +2 -2
  173. package/dist/chunks/{cli-7cn4gwqc.js → cli-s160fqyz.js} +2 -2
  174. package/dist/chunks/{cli-v2hg35qk.js → cli-s6vr7213.js} +2 -2
  175. package/dist/chunks/{cli-49dqgzsg.js → cli-s9fhtgmz.js} +2 -2
  176. package/dist/chunks/{cli-tezq577c.js → cli-scaqq0v9.js} +2 -2
  177. package/dist/chunks/{cli-15tr7ade.js → cli-sh9w2tbd.js} +1 -1
  178. package/dist/chunks/{cli-zd2e6bq1.js → cli-sycqd3xe.js} +4 -4
  179. package/dist/chunks/{cli-d06qr5p3.js → cli-t4j047cx.js} +2 -2
  180. package/dist/chunks/{cli-s5epnnj5.js → cli-t9jht3kb.js} +2 -2
  181. package/dist/chunks/{cli-bd1ryrzd.js → cli-tckzkegq.js} +1 -1
  182. package/dist/chunks/{cli-p2gt60aj.js → cli-tfv2qcgf.js} +1 -1
  183. package/dist/chunks/{cli-1qszxdan.js → cli-tq5z9qv3.js} +2 -2
  184. package/dist/chunks/{cli-wthnf2t5.js → cli-tt9a4124.js} +1 -1
  185. package/dist/chunks/{cli-8v5ajztt.js → cli-tyqh91zq.js} +1 -1
  186. package/dist/chunks/cli-v943fd6a.js +3 -0
  187. package/dist/chunks/{cli-wn4ywgbv.js → cli-v9f860t5.js} +2 -2
  188. package/dist/chunks/{cli-qc7zfabw.js → cli-vkvmhjha.js} +2 -2
  189. package/dist/chunks/{cli-6b6e5zj9.js → cli-vkzp66cm.js} +2 -2
  190. package/dist/chunks/{cli-6qhwqfwp.js → cli-vwg0v35a.js} +2 -2
  191. package/dist/chunks/{cli-x514vyva.js → cli-w1d8n9g3.js} +1 -1
  192. package/dist/chunks/cli-w52yvzkn.js +3 -0
  193. package/dist/chunks/{cli-et2cj5dc.js → cli-wbe1p8n2.js} +2 -2
  194. package/dist/chunks/{cli-5mdbbvnv.js → cli-wm8qb6j3.js} +1 -1
  195. package/dist/chunks/{cli-1tq57kq0.js → cli-wn2srq2e.js} +1 -1
  196. package/dist/chunks/{cli-088ac95n.js → cli-wt2bfbn0.js} +2 -2
  197. package/dist/chunks/{cli-jmypsed1.js → cli-x70v8rsj.js} +2 -2
  198. package/dist/chunks/{cli-5wh173wa.js → cli-x8xgga1a.js} +3 -3
  199. package/dist/chunks/{cli-2vc9kv40.js → cli-xfsqvp8r.js} +2 -2
  200. package/dist/chunks/{cli-6xmbrh42.js → cli-xmgm2573.js} +2 -2
  201. package/dist/chunks/{cli-d58ptbve.js → cli-xpa1neza.js} +2 -2
  202. package/dist/chunks/{cli-6bxmycm6.js → cli-yqbvprz7.js} +1 -1
  203. package/dist/chunks/{cli-bz32070f.js → cli-yrwenjxs.js} +1 -1
  204. package/dist/chunks/{cli-3p0mfsqg.js → cli-z5e72gsd.js} +1 -1
  205. package/dist/chunks/{cli-z2jpyr57.js → cli-zev50xap.js} +1 -1
  206. package/dist/chunks/{cli-mjz85907.js → cli-zjbzak9n.js} +1 -1
  207. package/dist/chunks/{cli-h2dynmt7.js → cli-zjfya500.js} +1 -1
  208. package/dist/chunks/{cli-60mdvk6q.js → cli-zp8s7q5w.js} +1 -1
  209. package/dist/chunks/{cli-znz72ctn.js → cli-zpcncwrv.js} +1 -1
  210. package/dist/chunks/{cli-ew59cmn3.js → cli-zxdnz6vp.js} +1 -1
  211. package/dist/chunks/client-dkpgx025.js +2 -0
  212. package/dist/chunks/color-zrm6r755.js +2 -0
  213. package/dist/chunks/commitAttribution-3y6pessz.js +2 -0
  214. package/dist/chunks/common-0bee37at.js +2 -0
  215. package/dist/chunks/compact-zmvj1pk0.js +4 -0
  216. package/dist/chunks/config-gj0gbg5g.js +2 -0
  217. package/dist/chunks/config-hbq35b68.js +2 -0
  218. package/dist/chunks/context-h1qc69rg.js +2 -0
  219. package/dist/chunks/context-noninteractive-7wbe6qvd.js +2 -0
  220. package/dist/chunks/conversation-fwnfp0p5.js +2 -0
  221. package/dist/chunks/{copy-bpypgpy8.js → copy-76r9v46d.js} +1 -1
  222. package/dist/chunks/cost-56r5xxqy.js +5 -0
  223. package/dist/chunks/createSession-m5y8fjy4.js +2 -0
  224. package/dist/chunks/desktop-z3jqgnw7.js +2 -0
  225. package/dist/chunks/detectRepository-w6wawmmg.js +2 -0
  226. package/dist/chunks/detection-1yb2c7hh.js +2 -0
  227. package/dist/chunks/{devtools-mt3vnaw3.js → devtools-10ba48t9.js} +1 -1
  228. package/dist/chunks/{diff-bcdc10jv.js → diff-05xxjeqc.js} +1 -1
  229. package/dist/chunks/doctor-hgwjdraj.js +2 -0
  230. package/dist/chunks/earlyInput-navj6cdn.js +2 -0
  231. package/dist/chunks/effort-a190c878.js +9 -0
  232. package/dist/chunks/executor-s42mdmqs.js +2 -0
  233. package/dist/chunks/exit-kyrjy6hb.js +2 -0
  234. package/dist/chunks/export-ct4sty4d.js +3 -0
  235. package/dist/chunks/extra-usage-noninteractive-byts9mme.js +2 -0
  236. package/dist/chunks/extra-usage-xh1mkrca.js +2 -0
  237. package/dist/chunks/fast-g4aa49jf.js +2 -0
  238. package/dist/chunks/feedback-m5r66qd5.js +2 -0
  239. package/dist/chunks/{files-fx3xz1bj.js → files-qrrrkjke.js} +1 -1
  240. package/dist/chunks/firstPartyEventLogger-mthxtmgc.js +2 -0
  241. package/dist/chunks/gates-yhakv4vb.js +2 -0
  242. package/dist/chunks/git-c39vd9dm.js +2 -0
  243. package/dist/chunks/goal-24dr7fwz.js +2 -0
  244. package/dist/chunks/growthbook-f7ag30hy.js +2 -0
  245. package/dist/chunks/heapdump-16gnh3zm.js +7 -0
  246. package/dist/chunks/help-rgcakcxe.js +2 -0
  247. package/dist/chunks/hooks-8dh43zmv.js +2 -0
  248. package/dist/chunks/{hooks-7kspbr6v.js → hooks-c7fqwas5.js} +1 -1
  249. package/dist/chunks/{ide-5bsqkr23.js → ide-q83qr9cn.js} +1 -1
  250. package/dist/chunks/index-v875zpde.js +2 -0
  251. package/dist/chunks/initReplBridge-zfwxgpsm.js +2 -0
  252. package/dist/chunks/ink-vkxsn90v.js +2 -0
  253. package/dist/chunks/{insights-z9edzgf1.js → insights-4fwap4e5.js} +1 -1
  254. package/dist/chunks/install-7nxzmgp5.js +2 -0
  255. package/dist/chunks/{install-github-app-918fh4r2.js → install-github-app-djzea7r4.js} +1 -1
  256. package/dist/chunks/install-slack-app-3rde0k08.js +2 -0
  257. package/dist/chunks/{instrumentation-b8ysw74t.js → instrumentation-223qqr23.js} +1 -1
  258. package/dist/chunks/keybindings-6t5f69wx.js +3 -0
  259. package/dist/chunks/loadAgentsDir-f8shfnw3.js +2 -0
  260. package/dist/chunks/loadPluginHooks-mdwjrjtp.js +2 -0
  261. package/dist/chunks/login-34j3xdr9.js +2 -0
  262. package/dist/chunks/logout-yew8mymc.js +2 -0
  263. package/dist/chunks/{main-sqrzjvg9.js → main-0b8hyp8h.js} +79 -79
  264. package/dist/chunks/mcp-9enw5a8j.js +2 -0
  265. package/dist/chunks/mcp-fn4yrf5y.js +3 -0
  266. package/dist/chunks/{mcp-dqh1vtvf.js → mcp-yymqpmv6.js} +3 -3
  267. package/dist/chunks/mcpServer-60jg9v58.js +2 -0
  268. package/dist/chunks/mcpServer-85gt8ypc.js +2 -0
  269. package/dist/chunks/memory-kam5z1cw.js +4 -0
  270. package/dist/chunks/{mobile-9m41g9bp.js → mobile-7zsgawnb.js} +1 -1
  271. package/dist/chunks/model-03987182.js +2 -0
  272. package/dist/chunks/model-wbxx5kcd.js +3 -0
  273. package/dist/chunks/{oauth-98khjrd8.js → oauth-y0p2y1w5.js} +1 -1
  274. package/dist/chunks/{output-style-1h6b2zf8.js → output-style-x148mzhn.js} +1 -1
  275. package/dist/chunks/parser-4y4b0e6b.js +2 -0
  276. package/dist/chunks/passes-jrmjk5zk.js +2 -0
  277. package/dist/chunks/permissions-karmgb0m.js +4 -0
  278. package/dist/chunks/plan-w0beh9bh.js +2 -0
  279. package/dist/chunks/plugin-6nwptn3s.js +2 -0
  280. package/dist/chunks/pluginStartupCheck-0nzv1ae9.js +2 -0
  281. package/dist/chunks/{plugins-pe89pa7p.js → plugins-vvf897b4.js} +2 -2
  282. package/dist/chunks/{preauthorizedConfig-g0aq6f03.js → preauthorizedConfig-p02f23jb.js} +1 -1
  283. package/dist/chunks/{print-cjjnhg9d.js → print-krwpbp2j.js} +4 -4
  284. package/dist/chunks/privacy-settings-m0mfykh0.js +2 -0
  285. package/dist/chunks/process-26nny2p0.js +2 -0
  286. package/dist/chunks/processBashCommand-8fqgv2ec.js +2 -0
  287. package/dist/chunks/{processSlashCommand-6d8rnm8v.js → processSlashCommand-q32wy80b.js} +1 -1
  288. package/dist/chunks/prompt-gw1e1gef.js +2 -0
  289. package/dist/chunks/prompt-xgw2hxrc.js +2 -0
  290. package/dist/chunks/provider-prompt-s26vatcw.js +2 -0
  291. package/dist/chunks/rate-limit-options-rd4rjfv5.js +2 -0
  292. package/dist/chunks/registry-fp7x9ekd.js +2 -0
  293. package/dist/chunks/release-notes-76y1r2s1.js +6 -0
  294. package/dist/chunks/reload-plugins-z0fepkva.js +3 -0
  295. package/dist/chunks/remote-env-nn9ngr99.js +2 -0
  296. package/dist/chunks/remoteBridgeCore-cg7qd8m4.js +2 -0
  297. package/dist/chunks/rename-fdjzyjar.js +2 -0
  298. package/dist/chunks/resume-4rvj8jbz.js +3 -0
  299. package/dist/chunks/{rewind-cpv2pwfx.js → rewind-r4g5njsg.js} +1 -1
  300. package/dist/chunks/sandbox-adapter-craea9vm.js +2 -0
  301. package/dist/chunks/sandbox-toggle-620bkz9q.js +2 -0
  302. package/dist/chunks/session-5vm1vwv1.js +3 -0
  303. package/dist/chunks/sessionFileAccessHooks-5jbvwabj.js +2 -0
  304. package/dist/chunks/sessionStorage-ffkhmn5q.js +2 -0
  305. package/dist/chunks/settings-s2bcajs6.js +2 -0
  306. package/dist/chunks/setup-fwcttwbm.js +2 -0
  307. package/dist/chunks/setup-pf09nfsj.js +7 -0
  308. package/dist/chunks/{setup-mecsw2ye.js → setup-vegs56f5.js} +1 -1
  309. package/dist/chunks/sinks-wd4ccgbf.js +2 -0
  310. package/dist/chunks/skills-evga8f7n.js +2 -0
  311. package/dist/chunks/startupProfiler-x5zbs2j7.js +2 -0
  312. package/dist/chunks/state-qpmfrvsv.js +2 -0
  313. package/dist/chunks/{stats-3v0r4e1v.js → stats-mgqf6r7c.js} +1 -1
  314. package/dist/chunks/status-78yks3jw.js +2 -0
  315. package/dist/chunks/stickers-bdp8w2gr.js +2 -0
  316. package/dist/chunks/subprocessEnv-s797f06r.js +2 -0
  317. package/dist/chunks/{systemPromptSections-htbs443y.js → systemPromptSections-07y2z2wn.js} +1 -1
  318. package/dist/chunks/tag-gd73kstd.js +12 -0
  319. package/dist/chunks/tasks-63qaca0z.js +2 -0
  320. package/dist/chunks/{teamHelpers-dddedf19.js → teamHelpers-8ykc4bxa.js} +1 -1
  321. package/dist/chunks/teammateModeSnapshot-ae9r29dy.js +2 -0
  322. package/dist/chunks/teleport-es58k4xz.js +2 -0
  323. package/dist/chunks/terminalSetup-gyh5z5e2.js +2 -0
  324. package/dist/chunks/theme-qrhbaht6.js +2 -0
  325. package/dist/chunks/thinkback-5bs7ezv5.js +2 -0
  326. package/dist/chunks/thinkback-play-1dy160y5.js +2 -0
  327. package/dist/chunks/toolSearch-6cv284b7.js +2 -0
  328. package/dist/chunks/trustedDevice-77ketbgg.js +2 -0
  329. package/dist/chunks/{ultrareviewCommand-jtmh2xb1.js → ultrareviewCommand-j23bjbf8.js} +1 -1
  330. package/dist/chunks/{update-mkzzbt54.js → update-w8wdxh3m.js} +1 -1
  331. package/dist/chunks/upgrade-nft7c1yk.js +2 -0
  332. package/dist/chunks/{upstreamproxy-hbbvxzb5.js → upstreamproxy-x405ef9p.js} +1 -1
  333. package/dist/chunks/usage-s5qgc615.js +2 -0
  334. package/dist/chunks/util-1geb93kp.js +2 -0
  335. package/dist/chunks/utils-6sb44pg8.js +2 -0
  336. package/dist/chunks/vim-kq91w44a.js +2 -0
  337. package/dist/chunks/worktree-0af6b1mt.js +2 -0
  338. package/dist/chunks/worktreeModeEnabled-ea6wb7aj.js +2 -0
  339. package/dist/cli.js +1 -1
  340. package/package.json +4 -1
  341. package/preload.ts +1 -1
  342. package/dist/chunks/App-skattzvx.js +0 -2
  343. package/dist/chunks/ApproveApiKey-1zk1g80v.js +0 -2
  344. package/dist/chunks/BypassPermissionsModeDialog-4bd5a65d.js +0 -2
  345. package/dist/chunks/ClaudeInChromeOnboarding-jrj410t2.js +0 -2
  346. package/dist/chunks/ClaudeMdExternalIncludesDialog-2bn5pwwr.js +0 -2
  347. package/dist/chunks/ConsoleOAuthFlow-8hn6958t.js +0 -2
  348. package/dist/chunks/Doctor-w0eqwfzb.js +0 -2
  349. package/dist/chunks/Grove-ygg0z9mr.js +0 -2
  350. package/dist/chunks/ITermBackend-ht0ds6se.js +0 -2
  351. package/dist/chunks/InvalidConfigDialog-h2jkde64.js +0 -2
  352. package/dist/chunks/InvalidSettingsDialog-3p7ehs0t.js +0 -2
  353. package/dist/chunks/Onboarding-np5yfyy1.js +0 -2
  354. package/dist/chunks/REPL-8811fta4.js +0 -2
  355. package/dist/chunks/ResumeConversation-d03pbgnw.js +0 -2
  356. package/dist/chunks/TeleportProgress-ghjbbh9h.js +0 -2
  357. package/dist/chunks/TeleportRepoMismatchDialog-hhcyekar.js +0 -2
  358. package/dist/chunks/TeleportResumeWrapper-66e7dnk5.js +0 -2
  359. package/dist/chunks/ToolSearchTool-dgwhh0gd.js +0 -2
  360. package/dist/chunks/TrustDialog-w9tj4t8r.js +0 -2
  361. package/dist/chunks/TungstenTool-7k2gt6pa.js +0 -2
  362. package/dist/chunks/add-dir-pg1rb88e.js +0 -2
  363. package/dist/chunks/agents-mcbqv3h3.js +0 -4
  364. package/dist/chunks/ant-claude-for-chrome-mcp-c765s2bt.js +0 -2
  365. package/dist/chunks/api-qvdz0vdp.js +0 -2
  366. package/dist/chunks/asciicast-ygqjzj6w.js +0 -2
  367. package/dist/chunks/auth-gkfrn4ga.js +0 -2
  368. package/dist/chunks/auth-y1hqesm6.js +0 -2
  369. package/dist/chunks/backgroundHousekeeping-wk8ne1wg.js +0 -2
  370. package/dist/chunks/branch-yre4hh7s.js +0 -5
  371. package/dist/chunks/btw-091q02sh.js +0 -2
  372. package/dist/chunks/buddy-5xd2vjhm.js +0 -2
  373. package/dist/chunks/caches-g4cc992y.js +0 -2
  374. package/dist/chunks/chrome-rd8crze6.js +0 -2
  375. package/dist/chunks/clear-25jzke5j.js +0 -2
  376. package/dist/chunks/cli-6hvqmebc.js +0 -3
  377. package/dist/chunks/cli-9hskw92e.js +0 -130
  378. package/dist/chunks/cli-avcnnw0n.js +0 -3
  379. package/dist/chunks/cli-e9pafjv1.js +0 -4
  380. package/dist/chunks/cli-gyp5wyzg.js +0 -3
  381. package/dist/chunks/cli-jbbxj53h.js +0 -3
  382. package/dist/chunks/cli-pbp5hza0.js +0 -3
  383. package/dist/chunks/cli-tzaj50bd.js +0 -3
  384. package/dist/chunks/cli-xzsc9n84.js +0 -3
  385. package/dist/chunks/cli-yv1znypb.js +0 -3
  386. package/dist/chunks/client-037bm52v.js +0 -2
  387. package/dist/chunks/color-ceqfke15.js +0 -2
  388. package/dist/chunks/commitAttribution-3ewwca68.js +0 -2
  389. package/dist/chunks/common-jn8w5r1w.js +0 -2
  390. package/dist/chunks/compact-631qpkbp.js +0 -4
  391. package/dist/chunks/config-6em7qq45.js +0 -2
  392. package/dist/chunks/config-h2e5ra49.js +0 -2
  393. package/dist/chunks/context-31c3znwn.js +0 -2
  394. package/dist/chunks/context-noninteractive-q418vz0p.js +0 -2
  395. package/dist/chunks/conversation-yz22h1cb.js +0 -2
  396. package/dist/chunks/cost-8rr9expn.js +0 -5
  397. package/dist/chunks/createSession-jratqxvc.js +0 -2
  398. package/dist/chunks/desktop-zq22ksq3.js +0 -2
  399. package/dist/chunks/detectRepository-djxyq37h.js +0 -2
  400. package/dist/chunks/detection-b18r43da.js +0 -2
  401. package/dist/chunks/doctor-cs43t62h.js +0 -2
  402. package/dist/chunks/earlyInput-361tx72y.js +0 -2
  403. package/dist/chunks/effort-qw83nert.js +0 -9
  404. package/dist/chunks/executor-rvxyyheh.js +0 -2
  405. package/dist/chunks/exit-kynz824m.js +0 -2
  406. package/dist/chunks/export-95j3srp6.js +0 -3
  407. package/dist/chunks/extra-usage-hxyp53v5.js +0 -2
  408. package/dist/chunks/extra-usage-noninteractive-53w28t1j.js +0 -2
  409. package/dist/chunks/fast-ec1hxnv7.js +0 -2
  410. package/dist/chunks/feedback-qtsk3t9f.js +0 -2
  411. package/dist/chunks/firstPartyEventLogger-4yfx731e.js +0 -2
  412. package/dist/chunks/gates-85t459a0.js +0 -2
  413. package/dist/chunks/git-e0mvprv8.js +0 -2
  414. package/dist/chunks/goal-ywc7exvv.js +0 -2
  415. package/dist/chunks/growthbook-ykj8089v.js +0 -2
  416. package/dist/chunks/heapdump-w6a13cfe.js +0 -7
  417. package/dist/chunks/help-enq1htxe.js +0 -2
  418. package/dist/chunks/hooks-wxm384wn.js +0 -2
  419. package/dist/chunks/initReplBridge-acrf7hyb.js +0 -2
  420. package/dist/chunks/ink-9vrw9yhe.js +0 -2
  421. package/dist/chunks/install-c8gv4wfg.js +0 -2
  422. package/dist/chunks/install-slack-app-1aqgxsb6.js +0 -2
  423. package/dist/chunks/keybindings-v92d2xht.js +0 -3
  424. package/dist/chunks/loadAgentsDir-k53rdwbr.js +0 -2
  425. package/dist/chunks/loadPluginHooks-rmzgs29p.js +0 -2
  426. package/dist/chunks/login-j9bz1g34.js +0 -2
  427. package/dist/chunks/logout-58wm6hsc.js +0 -2
  428. package/dist/chunks/mcp-z3j236hk.js +0 -3
  429. package/dist/chunks/mcp-zryxxcaz.js +0 -2
  430. package/dist/chunks/mcpServer-b2m7ewct.js +0 -2
  431. package/dist/chunks/mcpServer-xpq096r4.js +0 -2
  432. package/dist/chunks/memory-5tvqvktk.js +0 -4
  433. package/dist/chunks/model-cta1svwb.js +0 -3
  434. package/dist/chunks/model-d96jkka7.js +0 -2
  435. package/dist/chunks/parser-jpf6bfmz.js +0 -2
  436. package/dist/chunks/passes-reh6ja9j.js +0 -2
  437. package/dist/chunks/permissions-xgydmrq2.js +0 -4
  438. package/dist/chunks/plan-z4k8zj56.js +0 -2
  439. package/dist/chunks/plugin-0tztmcsg.js +0 -2
  440. package/dist/chunks/pluginStartupCheck-vxmkvt40.js +0 -2
  441. package/dist/chunks/privacy-settings-zbrc40a1.js +0 -2
  442. package/dist/chunks/process-msr26xa0.js +0 -2
  443. package/dist/chunks/processBashCommand-hnhy8brr.js +0 -2
  444. package/dist/chunks/prompt-cfaneybz.js +0 -2
  445. package/dist/chunks/prompt-wg6hfj0k.js +0 -2
  446. package/dist/chunks/provider-prompt-c8wew66t.js +0 -2
  447. package/dist/chunks/rate-limit-options-fyjqpxp3.js +0 -2
  448. package/dist/chunks/registry-ht9aazng.js +0 -2
  449. package/dist/chunks/release-notes-5v16zb9c.js +0 -6
  450. package/dist/chunks/reload-plugins-apyma8vs.js +0 -3
  451. package/dist/chunks/remote-env-p6ym55w6.js +0 -2
  452. package/dist/chunks/remoteBridgeCore-0v9x8112.js +0 -2
  453. package/dist/chunks/rename-j9rc9dwj.js +0 -2
  454. package/dist/chunks/resume-tbr3mkch.js +0 -3
  455. package/dist/chunks/sandbox-adapter-qh943bs4.js +0 -2
  456. package/dist/chunks/sandbox-toggle-1f70ejwk.js +0 -2
  457. package/dist/chunks/session-42zhjgd2.js +0 -3
  458. package/dist/chunks/sessionFileAccessHooks-1nh915er.js +0 -2
  459. package/dist/chunks/sessionStorage-j5m0nf55.js +0 -2
  460. package/dist/chunks/settings-c709knqg.js +0 -2
  461. package/dist/chunks/setup-0n2p20yw.js +0 -7
  462. package/dist/chunks/setup-2hqyyxff.js +0 -2
  463. package/dist/chunks/sinks-q6etaenz.js +0 -2
  464. package/dist/chunks/skills-xads3027.js +0 -2
  465. package/dist/chunks/startupProfiler-4wmjq0yd.js +0 -2
  466. package/dist/chunks/state-edaz98bj.js +0 -2
  467. package/dist/chunks/status-9rtty0ee.js +0 -2
  468. package/dist/chunks/stickers-m73qwecp.js +0 -2
  469. package/dist/chunks/subprocessEnv-rass28aq.js +0 -2
  470. package/dist/chunks/tag-vj93fgp6.js +0 -12
  471. package/dist/chunks/tasks-avbqta2s.js +0 -2
  472. package/dist/chunks/teammateModeSnapshot-32yfa4hf.js +0 -2
  473. package/dist/chunks/teleport-jw6w0rn4.js +0 -2
  474. package/dist/chunks/terminalSetup-ppt6v9xf.js +0 -2
  475. package/dist/chunks/theme-2csrfbca.js +0 -2
  476. package/dist/chunks/thinkback-2ahfejyt.js +0 -2
  477. package/dist/chunks/thinkback-play-kffa7rdp.js +0 -2
  478. package/dist/chunks/toolSearch-ptrcr8ec.js +0 -2
  479. package/dist/chunks/trustedDevice-xvtp79f1.js +0 -2
  480. package/dist/chunks/upgrade-c4argpvv.js +0 -2
  481. package/dist/chunks/usage-w30yajzy.js +0 -2
  482. package/dist/chunks/util-zkawe0w0.js +0 -2
  483. package/dist/chunks/utils-v86tf27x.js +0 -2
  484. package/dist/chunks/vim-3stm1kbg.js +0 -2
  485. package/dist/chunks/worktree-pbeayfjp.js +0 -2
  486. package/dist/chunks/worktreeModeEnabled-ysks760x.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Uf as x,Vf as HJ}from"./cli-s160fqyz.js";import{Wf as $,Xf as IJ}from"./cli-15sqp3mq.js";import{Hk as D,Ik as FJ,RE as l,VE as UJ,Yj as S,Zj as j,Zs as i,_j as ZJ,_s as NJ,ll as g,ml as zJ,pB as u,sq as c,uq as KJ,vB as QJ,yK as a,zK as TJ}from"./cli-me4e2p3e.js";import"./cli-s9fhtgmz.js";import"./cli-vkzp66cm.js";import"./cli-t4j047cx.js";import"./cli-49m97nbg.js";import"./cli-r83ttew2.js";import"./cli-xfsqvp8r.js";import"./cli-5vsnhp97.js";import"./cli-d0hzw78c.js";import"./cli-8qd16mt4.js";import"./cli-95wg48h9.js";import"./cli-3m8n808e.js";import"./cli-764c4bsm.js";import"./cli-g5wq5ptg.js";import"./cli-6yprtw88.js";import"./cli-eyw3czmn.js";import"./cli-2rw44zfx.js";import{EO as E,FO as YJ,XO as m,ZO as GJ}from"./cli-akcxtvv9.js";import{DQ as W,FQ as k,fR as XJ}from"./cli-x8xgga1a.js";import"./cli-99mqr54v.js";import"./cli-v9f860t5.js";import"./cli-scaqq0v9.js";import"./cli-msgx4pnp.js";import"./cli-5dt9yjha.js";import"./cli-8hxz2qs6.js";import"./cli-d53fhs6v.js";import"./cli-wt2bfbn0.js";import"./cli-br6zjh6x.js";import"./cli-ms5j6fff.js";import"./cli-6pdpyz1a.js";import"./cli-fwrj8ybs.js";import"./cli-p2cqnrnp.js";import"./cli-gtm212j6.js";import"./cli-0qt9btbe.js";import"./cli-jegyadmb.js";import{LU as e,Q3 as JJ,u3 as C,xU as f,yU as p}from"./cli-msmzt4c3.js";import"./cli-msw0vv86.js";import"./cli-s6vr7213.js";import"./cli-fghyxar5.js";import"./cli-1ny2386w.js";import"./cli-fakdskp6.js";import"./cli-mb1qrqw1.js";import"./cli-f63fdj4w.js";import"./cli-k4v08k8t.js";import"./cli-pgg33dhw.js";import"./cli-w52yvzkn.js";import"./cli-51720d82.js";import"./cli-ezs5sney.js";import"./cli-n5s5fnyj.js";import"./cli-fdya77ch.js";import"./cli-mzcsnm06.js";import"./cli-p0vh69b9.js";import"./cli-rvad3yhg.js";import"./cli-4ewb3q42.js";import"./cli-xmgm2573.js";import"./cli-fs7yttfp.js";import"./cli-t9jht3kb.js";import"./cli-350pymj4.js";import"./cli-rxb5q8zw.js";import"./cli-jj93qmmc.js";import"./cli-kq16afrr.js";import"./cli-xpa1neza.js";import"./cli-rjerv816.js";import{X9 as R,b_ as t}from"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import{fda as s}from"./cli-w1d8n9g3.js";import{c as WJ}from"react/compiler-runtime";import{useEffect as kJ,useRef as AJ,useState as V}from"react";import{useInterval as bJ}from"usehooks-ts";import{jsxDEV as F}from"react/jsx-dev-runtime";function LJ(X){let J=WJ(25),{question:Z,context:G,onDone:K}=X,[z,n]=V(null),[N,_]=V(null),[P,r]=V(0),T=AJ(null),{rows:o}=m(E()),A;if(J[0]===Symbol.for("react.memo_cache_sentinel"))A=()=>r(qJ),J[0]=A;else A=J[0];bJ(A,z||N?null:80);let b;if(J[1]!==K)b=function(Y){if(Y.key==="escape"||Y.key==="return"||Y.key===" "||Y.ctrl&&(Y.key==="c"||Y.key==="d")){Y.preventDefault(),K(void 0,{display:"skip"});return}if(Y.key==="up"||Y.ctrl&&Y.key==="p")Y.preventDefault(),T.current?.scrollBy(-d);if(Y.key==="down"||Y.ctrl&&Y.key==="n")Y.preventDefault(),T.current?.scrollBy(d)},J[1]=K,J[2]=b;else b=J[2];let h=b,v,w;if(J[3]!==G||J[4]!==Z)v=()=>{let B=g();return async function(){try{let y=await MJ(G),M=await x({question:Z,cacheSafeParams:y});if(!B.signal.aborted)if(M.response)n(M.response);else _("No response received")}catch(y){let M=y;if(!B.signal.aborted)_(R(M)||"Failed to get response")}}(),()=>{B.abort()}},w=[Z,G],J[3]=G,J[4]=Z,J[5]=v,J[6]=w;else v=J[5],w=J[6];kJ(v,w);let O=Math.max(5,o-vJ-wJ),L;if(J[7]===Symbol.for("react.memo_cache_sentinel"))L=F(k,{color:"warning",bold:!0,children:["/btw"," "]},void 0,!0,void 0,this),J[7]=L;else L=J[7];let Q;if(J[8]!==Z)Q=F(W,{children:[L,F(k,{dimColor:!0,children:Z},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J[8]=Z,J[9]=Q;else Q=J[9];let U;if(J[10]!==N||J[11]!==P||J[12]!==z)U=F($,{ref:T,flexDirection:"column",flexGrow:1,children:N?F(k,{color:"error",children:N},void 0,!1,void 0,this):z?F(c,{children:z},void 0,!1,void 0,this):F(W,{children:[F(i,{frame:P,messageColor:"warning"},void 0,!1,void 0,this),F(k,{color:"warning",children:"Answering..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),J[10]=N,J[11]=P,J[12]=z,J[13]=U;else U=J[13];let I;if(J[14]!==O||J[15]!==U)I=F(W,{marginTop:1,marginLeft:2,maxHeight:O,children:U},void 0,!1,void 0,this),J[14]=O,J[15]=U,J[16]=I;else I=J[16];let H;if(J[17]!==N||J[18]!==z)H=(z||N)&&F(W,{marginTop:1,children:F(k,{dimColor:!0,children:[f,"/",p," to scroll \xB7 Space, Enter, or Escape to dismiss"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),J[17]=N,J[18]=z,J[19]=H;else H=J[19];let q;if(J[20]!==h||J[21]!==Q||J[22]!==I||J[23]!==H)q=F(W,{flexDirection:"column",paddingLeft:2,marginTop:1,tabIndex:0,autoFocus:!0,onKeyDown:h,children:[Q,I,H]},void 0,!0,void 0,this),J[20]=h,J[21]=Q,J[22]=I,J[23]=H,J[24]=q;else q=J[24];return q}function qJ(X){return X+1}function BJ(X){let J=X.at(-1);if(J?.type==="assistant"&&J.message.stop_reason===null)return X.slice(0,-1);return X}async function MJ(X){let J=l(BJ(X.messages)),Z=u();if(Z)return{systemPrompt:Z.systemPrompt,userContext:Z.userContext,systemContext:Z.systemContext,toolUseContext:X,forkContextMessages:J};let[G,K,z]=await Promise.all([a(X.options.tools,X.options.mainLoopModel,[],X.options.mcpClients),j(),S()]);return{systemPrompt:D(G),userContext:K,systemContext:z,toolUseContext:X,forkContextMessages:J}}async function $J(X,J,Z){let G=Z?.trim();if(!G)return X("Usage: /btw <your question>",{display:"system"}),null;return C((K)=>({...K,btwUseCount:K.btwUseCount+1})),F(LJ,{question:G,context:J,onDone:X},void 0,!1,void 0,this)}var vJ=5,wJ=6,d=3;var PJ=s(()=>{KJ();NJ();e();TJ();GJ();ZJ();YJ();IJ();XJ();zJ();JJ();t();QJ();UJ();HJ();FJ()});PJ();export{$J as call};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$a as l,Ya as G}from"./cli-nvnj7r73.js";import{CN as h,DN as K,EN as L,FN as S,GN as w,HN as I,IN as _,JN as f,KN as b}from"./cli-3m8n808e.js";import{DQ as Z,FQ as F,fR as R}from"./cli-x8xgga1a.js";import"./cli-99mqr54v.js";import"./cli-v9f860t5.js";import{Q3 as g,u3 as H}from"./cli-msmzt4c3.js";import"./cli-msw0vv86.js";import"./cli-s6vr7213.js";import"./cli-fghyxar5.js";import"./cli-1ny2386w.js";import"./cli-fakdskp6.js";import"./cli-mb1qrqw1.js";import"./cli-f63fdj4w.js";import"./cli-k4v08k8t.js";import"./cli-pgg33dhw.js";import"./cli-w52yvzkn.js";import"./cli-51720d82.js";import"./cli-ezs5sney.js";import"./cli-fdya77ch.js";import"./cli-mzcsnm06.js";import"./cli-p0vh69b9.js";import"./cli-rvad3yhg.js";import"./cli-4ewb3q42.js";import"./cli-xmgm2573.js";import"./cli-t9jht3kb.js";import"./cli-350pymj4.js";import"./cli-rxb5q8zw.js";import"./cli-jj93qmmc.js";import"./cli-kq16afrr.js";import"./cli-xpa1neza.js";import"./cli-rjerv816.js";import"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import{fda as A}from"./cli-w1d8n9g3.js";import*as y from"react";import{jsxDEV as q}from"react/jsx-dev-runtime";function d({onDone:P,args:N,setAppState:U}){let $=N.trim().toLowerCase(),J=f(),O=(z)=>{if(z.key==="q"||z.key==="Enter")z.preventDefault(),P()};if(y.useEffect(()=>{if($==="mute"){H((z)=>({...z,companionMuted:!0})),P(`${J?.name??"Companion"} is now muted.`,{display:"system"});return}if($==="unmute"){H((z)=>({...z,companionMuted:!1})),P(`${J?.name??"Companion"} says hello!`,{display:"system"});return}if($==="pet"){if(!J){P("You need to hatch a companion first! Use /buddy hatch",{display:"system"});return}U((z)=>({...z,companionPetAt:Date.now()})),P(`You pet ${J.name}! \u2665`,{display:"system"});return}if($==="hatch"){if(J){P(`You already have ${J.name}! Use /buddy info to see them.`,{display:"system"});return}let z=`hatch:${Date.now()}:${Math.random().toString(36).slice(2)}`,{bones:Q}=I(z),X=["Bright","Cozy","Swift","Calm","Wise","Bold","Fuzzy","Lucky","Snappy","Quirky"],M=["Spark","Pixel","Ember","Glitch","Byte","Flux","Drift","Blip","Quip","Zap"],W=X[Math.floor(Math.random()*X.length)],u=M[Math.floor(Math.random()*M.length)],Y=`${W} ${u}`,C={name:Y,personality:`A ${Q.rarity} ${Q.species} who loves debugging and hanging out.`,hatchedAt:Date.now(),appearanceSeed:z};H((v)=>({...v,companion:C})),P(`\u2728 You hatched ${Y} the ${Q.rarity} ${Q.species}! Say hello!`,{display:"system"});return}if($==="release"){if(!J){P("No companion to release.",{display:"system"});return}let z=J.name;H((Q)=>{let X={...Q};return delete X.companion,X}),P(`Goodbye, ${z}! You'll be missed.`,{display:"system"});return}},[]),!J){let{bones:z}=w(_()),Q=G(z,0),X=L[z.rarity];return q(Z,{flexDirection:"column",paddingX:1,paddingY:1,autoFocus:!0,onKeyDown:O,tabIndex:0,children:[q(F,{bold:!0,children:"You haven't hatched a companion yet!"},void 0,!1,void 0,this),q(F,{dimColor:!0,children:"Here's a preview of yours:"},void 0,!1,void 0,this),q(Z,{flexDirection:"column",marginY:1,children:[Q.map((M,W)=>q(F,{color:X,children:M},W,!1,void 0,this)),q(F,{italic:!0,dimColor:!0,children:["A ",z.rarity," ",z.species," ",K[z.rarity]]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q(F,{children:["Run ",q(F,{bold:!0,children:"/buddy hatch"},void 0,!1,void 0,this)," to bring them to life!"]},void 0,!0,void 0,this),q(F,{dimColor:!0,children:["Or type ",q(F,{bold:!0,children:"q"},void 0,!1,void 0,this)," to dismiss."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}let B=G(J,0),k=L[J.rarity];return q(Z,{flexDirection:"column",paddingX:1,paddingY:1,autoFocus:!0,onKeyDown:O,tabIndex:0,children:[q(Z,{flexDirection:"row",gap:2,children:[q(Z,{flexDirection:"column",children:[B.map((z,Q)=>q(F,{color:k,children:z},Q,!1,void 0,this)),q(F,{italic:!0,bold:!0,color:k,children:J.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q(Z,{flexDirection:"column",justifyContent:"center",children:[q(F,{children:[q(F,{bold:!0,children:"Species:"},void 0,!1,void 0,this)," ",q(F,{color:k,children:J.species},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q(F,{children:[q(F,{bold:!0,children:"Rarity:"},void 0,!1,void 0,this)," ",q(F,{color:k,children:[J.rarity," ",K[J.rarity]]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J.shiny&&q(F,{color:"warning",children:"\u2726 Shiny!"},void 0,!1,void 0,this),q(F,{dimColor:!0,children:"\u2500".repeat(20)},void 0,!1,void 0,this),q(F,{bold:!0,children:"Stats:"},void 0,!1,void 0,this),h.map((z)=>q(F,{children:[q(F,{dimColor:!0,children:[z,":"]},void 0,!0,void 0,this)," ",q(F,{color:k,children:J.stats[z]},void 0,!1,void 0,this)]},z,!0,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q(F,{dimColor:!0,children:"\u2500".repeat(40)},void 0,!1,void 0,this),q(F,{dimColor:!0,children:"/buddy pet \xB7 /buddy mute \xB7 /buddy unmute \xB7 /buddy release"},void 0,!1,void 0,this),q(F,{dimColor:!0,children:"Press q or Enter to dismiss"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var j=async(P,N,U="")=>{return q(d,{onDone:P,args:U,setAppState:N.setAppState},void 0,!1,void 0,this)};var V=A(()=>{R();b();l();S();g()});V();export{j as call};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{bda as q}from"./cli-x514vyva.js";var j=function(){},k,c,I,w=!0,z,A,B,C,D,E,F,G;var v=q(()=>{k={get(m,i){if(i==="__esModule")return!0;if(i==="default")return new Proxy(j,k);if(i===Symbol.toPrimitive)return()=>{return};if(i===Symbol.iterator)return function*(){};if(i===Symbol.asyncIterator)return async function*(){};if(i==="then")return;return new Proxy(j,k)},apply(){return new Proxy(j,k)},construct(){return new Proxy(j,k)}},c=new Proxy(j,k),I=c,z=c,A=c,B=c,C=c,D=c,E=c,F=c,G=c});v();export{E as resetCachedMCState,D as markToolsSentToAPI,B as isModelSupportedForCacheEditing,A as isCachedMicrocompactEnabled,G as getCoordinatorUserContext,C as getCachedMCConfig,I as default,z as createCachedMCState,F as checkProtectedNamespace,w as __stubMissing};
2
+ import{fda as q}from"./cli-w1d8n9g3.js";var j=function(){},k,c,I,w=!0,z,A,B,C,D,E,F,G;var v=q(()=>{k={get(m,i){if(i==="__esModule")return!0;if(i==="default")return new Proxy(j,k);if(i===Symbol.toPrimitive)return()=>{return};if(i===Symbol.iterator)return function*(){};if(i===Symbol.asyncIterator)return async function*(){};if(i==="then")return;return new Proxy(j,k)},apply(){return new Proxy(j,k)},construct(){return new Proxy(j,k)}},c=new Proxy(j,k),I=c,z=c,A=c,B=c,C=c,D=c,E=c,F=c,G=c});v();export{E as resetCachedMCState,D as markToolsSentToAPI,B as isModelSupportedForCacheEditing,A as isCachedMicrocompactEnabled,G as getCoordinatorUserContext,C as getCachedMCConfig,I as default,z as createCachedMCState,F as checkProtectedNamespace,w as __stubMissing};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{yf as a,zf as b}from"./cli-edkqs0ge.js";import"./cli-vkvmhjha.js";import"./cli-4mvvtchx.js";import"./cli-me4e2p3e.js";import"./cli-s9fhtgmz.js";import"./cli-vkzp66cm.js";import"./cli-t4j047cx.js";import"./cli-49m97nbg.js";import"./cli-r83ttew2.js";import"./cli-xfsqvp8r.js";import"./cli-5vsnhp97.js";import"./cli-d0hzw78c.js";import"./cli-8qd16mt4.js";import"./cli-95wg48h9.js";import"./cli-3m8n808e.js";import"./cli-764c4bsm.js";import"./cli-g5wq5ptg.js";import"./cli-6yprtw88.js";import"./cli-eyw3czmn.js";import"./cli-2rw44zfx.js";import"./cli-akcxtvv9.js";import"./cli-x8xgga1a.js";import"./cli-99mqr54v.js";import"./cli-v9f860t5.js";import"./cli-scaqq0v9.js";import"./cli-msgx4pnp.js";import"./cli-5dt9yjha.js";import"./cli-8hxz2qs6.js";import"./cli-d53fhs6v.js";import"./cli-wt2bfbn0.js";import"./cli-br6zjh6x.js";import"./cli-ms5j6fff.js";import"./cli-6pdpyz1a.js";import"./cli-fwrj8ybs.js";import"./cli-p2cqnrnp.js";import"./cli-gtm212j6.js";import"./cli-0qt9btbe.js";import"./cli-jegyadmb.js";import"./cli-msmzt4c3.js";import"./cli-msw0vv86.js";import"./cli-s6vr7213.js";import"./cli-fghyxar5.js";import"./cli-1ny2386w.js";import"./cli-fakdskp6.js";import"./cli-mb1qrqw1.js";import"./cli-f63fdj4w.js";import"./cli-k4v08k8t.js";import"./cli-pgg33dhw.js";import"./cli-w52yvzkn.js";import"./cli-51720d82.js";import"./cli-ezs5sney.js";import"./cli-n5s5fnyj.js";import"./cli-fdya77ch.js";import"./cli-mzcsnm06.js";import"./cli-p0vh69b9.js";import"./cli-rvad3yhg.js";import"./cli-4ewb3q42.js";import"./cli-xmgm2573.js";import"./cli-fs7yttfp.js";import"./cli-t9jht3kb.js";import"./cli-350pymj4.js";import"./cli-rxb5q8zw.js";import"./cli-jj93qmmc.js";import"./cli-kq16afrr.js";import"./cli-xpa1neza.js";import"./cli-rjerv816.js";import"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import"./cli-w1d8n9g3.js";b();export{a as clearSessionCaches};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{db as E,eb as Wz}from"./cli-4nejhkd0.js";import"./cli-tckzkegq.js";import{AF as Jz,DF as Uz,Ep as zz,Fp as Nz}from"./cli-me4e2p3e.js";import"./cli-s9fhtgmz.js";import"./cli-vkzp66cm.js";import"./cli-t4j047cx.js";import"./cli-49m97nbg.js";import"./cli-r83ttew2.js";import{YL as t,ZL as Mz}from"./cli-xfsqvp8r.js";import"./cli-5vsnhp97.js";import"./cli-d0hzw78c.js";import{ZM as s,dN as e,hN as Oz}from"./cli-8qd16mt4.js";import"./cli-95wg48h9.js";import"./cli-3m8n808e.js";import"./cli-764c4bsm.js";import"./cli-g5wq5ptg.js";import"./cli-6yprtw88.js";import"./cli-eyw3czmn.js";import"./cli-2rw44zfx.js";import"./cli-akcxtvv9.js";import{DQ as x,FQ as Q,fR as Fz}from"./cli-x8xgga1a.js";import"./cli-99mqr54v.js";import"./cli-v9f860t5.js";import"./cli-scaqq0v9.js";import"./cli-msgx4pnp.js";import"./cli-5dt9yjha.js";import"./cli-8hxz2qs6.js";import"./cli-d53fhs6v.js";import"./cli-wt2bfbn0.js";import"./cli-br6zjh6x.js";import"./cli-ms5j6fff.js";import"./cli-6pdpyz1a.js";import"./cli-fwrj8ybs.js";import"./cli-p2cqnrnp.js";import"./cli-gtm212j6.js";import"./cli-0qt9btbe.js";import"./cli-jegyadmb.js";import{F1 as Pz,Q3 as Tz,g1 as $,u3 as i,x3 as n}from"./cli-msmzt4c3.js";import"./cli-msw0vv86.js";import"./cli-s6vr7213.js";import"./cli-fghyxar5.js";import"./cli-1ny2386w.js";import"./cli-fakdskp6.js";import"./cli-mb1qrqw1.js";import"./cli-f63fdj4w.js";import{B5 as l,C5 as Gz}from"./cli-k4v08k8t.js";import"./cli-pgg33dhw.js";import"./cli-w52yvzkn.js";import"./cli-51720d82.js";import"./cli-ezs5sney.js";import"./cli-n5s5fnyj.js";import"./cli-fdya77ch.js";import"./cli-mzcsnm06.js";import"./cli-p0vh69b9.js";import"./cli-rvad3yhg.js";import"./cli-4ewb3q42.js";import"./cli-xmgm2573.js";import"./cli-fs7yttfp.js";import"./cli-t9jht3kb.js";import"./cli-350pymj4.js";import"./cli-rxb5q8zw.js";import{q9 as o,s9 as vz}from"./cli-jj93qmmc.js";import"./cli-kq16afrr.js";import"./cli-xpa1neza.js";import"./cli-rjerv816.js";import"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import{S_ as Zz}from"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import{fda as Yz}from"./cli-w1d8n9g3.js";import{c as gz}from"react/compiler-runtime";import{useState as C}from"react";import{jsxDEV as J,Fragment as D}from"react/jsx-dev-runtime";function Rz(X){let z=gz(41),{onDone:g,isExtensionInstalled:p,configEnabled:I,isClaudeAISubscriber:k,isWSL:q}=X,f=Jz(Az),[S,_]=C(0),[T,Qz]=C(I??!1),[j,a]=C(!1),[P,Xz]=C(p),K;if(z[0]===Symbol.for("react.memo_cache_sentinel"))K=!1,z[0]=K;else K=z[0];let b=K,R;if(z[1]!==f)R=f.find(hz),z[1]=f,z[2]=R;else R=z[2];let c=R?.type==="connected",w;if(z[3]===Symbol.for("react.memo_cache_sentinel"))w=function(Z){if(b)l(Z);else e(Z)},z[3]=w;else w=z[3];let V=w,B;if(z[4]!==T)B=function(Z){z:switch(Z){case"install-extension":{_(Lz),a(!0),V(kz);break z}case"reconnect":{_(Bz),E().then((Y)=>{if(Xz(Y),Y)a(!1)}),V(Kz);break z}case"manage-permissions":{_(wz),V(qz);break z}case"toggle-default":{let Y=!T;i((W)=>({...W,claudeInChromeDefaultEnabled:Y})),Qz(Y)}}},z[4]=T,z[5]=B;else B=z[5];let d=B,v;if(z[6]!==T||z[7]!==P){v=[];let G=P?"":" (requires extension)";if(!P&&!b){let y;if(z[9]===Symbol.for("react.memo_cache_sentinel"))y={label:"Install Chrome extension",value:"install-extension"},z[9]=y;else y=z[9];v.push(y)}let Z;if(z[10]===Symbol.for("react.memo_cache_sentinel"))Z=J(Q,{children:"Manage permissions"},void 0,!1,void 0,this),z[10]=Z;else Z=z[10];let Y;if(z[11]!==G)Y={label:J(D,{children:[Z,J(Q,{dimColor:!0,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this),value:"manage-permissions"},z[11]=G,z[12]=Y;else Y=z[12];let W;if(z[13]===Symbol.for("react.memo_cache_sentinel"))W=J(Q,{children:"Reconnect extension"},void 0,!1,void 0,this),z[13]=W;else W=z[13];let H;if(z[14]!==G)H={label:J(D,{children:[W,J(Q,{dimColor:!0,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this),value:"reconnect"},z[14]=G,z[15]=H;else H=z[15];let u=`Enabled by default: ${T?"Yes":"No"}`,m;if(z[16]!==u)m={label:u,value:"toggle-default"},z[16]=u,z[17]=m;else m=z[17];v.push(Y,H,m),z[6]=T,z[7]=P,z[8]=v}else v=z[8];let r=q||!k,F;if(z[18]!==g)F=()=>g(),z[18]=g,z[19]=F;else F=z[19];let L;if(z[20]===Symbol.for("react.memo_cache_sentinel"))L=J(Q,{children:"Claude in Chrome works with the Chrome extension to let you control your browser directly from Claude Code. Navigate websites, fill forms, capture screenshots, record GIFs, and debug with console logs and network requests."},void 0,!1,void 0,this),z[20]=L;else L=z[20];let O;if(z[21]!==q)O=q&&J(Q,{color:"error",children:"Claude in Chrome is not supported in WSL at this time."},void 0,!1,void 0,this),z[21]=q,z[22]=O;else O=z[22];let M;if(z[23]!==k)M=!k&&J(Q,{color:"error",children:"Claude in Chrome requires a claude.ai subscription."},void 0,!1,void 0,this),z[23]=k,z[24]=M;else M=z[24];let N;if(z[25]!==d||z[26]!==c||z[27]!==r||z[28]!==P||z[29]!==v||z[30]!==S||z[31]!==j)N=!r&&J(D,{children:[!b&&J(x,{flexDirection:"column",children:[J(Q,{children:["Status:"," ",c?J(Q,{color:"success",children:"Enabled"},void 0,!1,void 0,this):J(Q,{color:"inactive",children:"Disabled"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J(Q,{children:["Extension:"," ",P?J(Q,{color:"success",children:"Installed"},void 0,!1,void 0,this):J(Q,{color:"warning",children:"Not detected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J(zz,{options:v,onChange:d,hideIndexes:!0},S,!1,void 0,this),j&&J(Q,{color:"warning",children:["Once installed, select ",'"Reconnect extension"'," to connect."]},void 0,!0,void 0,this),J(Q,{children:[J(Q,{dimColor:!0,children:"Usage: "},void 0,!1,void 0,this),J(Q,{children:"claude --chrome"},void 0,!1,void 0,this),J(Q,{dimColor:!0,children:" or "},void 0,!1,void 0,this),J(Q,{children:"claude --no-chrome"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J(Q,{dimColor:!0,children:"Site-level permissions are inherited from the Chrome extension. Manage permissions in the Chrome extension settings to control which sites Claude can browse, click, and type on."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z[25]=d,z[26]=c,z[27]=r,z[28]=P,z[29]=v,z[30]=S,z[31]=j,z[32]=N;else N=z[32];let h;if(z[33]===Symbol.for("react.memo_cache_sentinel"))h=J(Q,{dimColor:!0,children:"Learn more: https://code.claude.com/docs/en/chrome"},void 0,!1,void 0,this),z[33]=h;else h=z[33];let U;if(z[34]!==O||z[35]!==M||z[36]!==N)U=J(x,{flexDirection:"column",gap:1,children:[L,O,M,N,h]},void 0,!0,void 0,this),z[34]=O,z[35]=M,z[36]=N,z[37]=U;else U=z[37];let A;if(z[38]!==U||z[39]!==F)A=J(t,{title:"Claude in Chrome (Beta)",onCancel:F,color:"chromeYellow",children:U},void 0,!1,void 0,this),z[38]=U,z[39]=F,z[40]=A;else A=z[40];return A}function wz(X){return X+1}function Bz(X){return X+1}function Lz(X){return X+1}function hz(X){return X.name===s}function Az(X){return X.mcp.clients}var kz="https://claude.ai/chrome",qz="https://clau.de/chrome/permissions",Kz="https://clau.de/chrome/reconnect",xz=async function(X){let z=await E(),g=n(),p=$(),I=o.isWslEnvironment();return J(Rz,{onDone:X,isExtensionInstalled:z,configEnabled:g.claudeInChromeDefaultEnabled,isClaudeAISubscriber:p,isWSL:I},void 0,!1,void 0,this)};var Hz=Yz(()=>{Nz();Mz();Fz();Uz();Pz();Gz();Oz();Wz();Tz();vz();Zz()});Hz();export{xz as call};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{KN as w,LN as _,NN as u}from"./cli-29gcax34.js";import{I5 as A,J5 as D}from"./cli-avcnnw0n.js";import"./cli-1215h20m.js";import"./cli-hpzy0mat.js";import"./cli-3bxtq5dc.js";import"./cli-6xmbrh42.js";import"./cli-mx6xk0dw.js";import"./cli-wfqsfwa2.js";import"./cli-d58ptbve.js";import"./cli-3q7meftn.js";import{$9 as Y,a_ as Z,d_ as E}from"./cli-a98b285v.js";import"./cli-jmypsed1.js";import"./cli-1qszxdan.js";import"./cli-w754xmyv.js";import"./cli-x514vyva.js";D();E();u();import{appendFile as I,chmod as z,mkdir as y,readdir as G,rmdir as p,stat as M,unlink as P}from"fs/promises";import{createServer as j}from"net";import{homedir as S,platform as X}from"os";import{join as v}from"path";import{z as L}from"zod";var k="1.0.0",O=1048576,R=process.env.USER_TYPE==="ant"?v(S(),".claude","debug","chrome-native-host.txt"):void 0;function T(x,...K){if(R){let Q=new Date().toISOString(),U=K.length>0?" "+Y(K):"",W=`[${Q}] [Claude Chrome Native Host] ${x}${U}
2
+ import{eN as w,fN as _,hN as u}from"./cli-8qd16mt4.js";import{$4 as A,a5 as D}from"./cli-fakdskp6.js";import"./cli-mb1qrqw1.js";import"./cli-p0vh69b9.js";import"./cli-rvad3yhg.js";import"./cli-4ewb3q42.js";import"./cli-xmgm2573.js";import"./cli-rxb5q8zw.js";import"./cli-xpa1neza.js";import"./cli-rjerv816.js";import{d_ as Y,e_ as Z,h_ as E}from"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import"./cli-w1d8n9g3.js";D();E();u();import{appendFile as I,chmod as z,mkdir as y,readdir as G,rmdir as p,stat as M,unlink as P}from"fs/promises";import{createServer as j}from"net";import{homedir as S,platform as X}from"os";import{join as v}from"path";import{z as L}from"zod";var k="1.0.0",O=1048576,R=process.env.USER_TYPE==="ant"?v(S(),".claude","debug","chrome-native-host.txt"):void 0;function T(x,...K){if(R){let Q=new Date().toISOString(),U=K.length>0?" "+Y(K):"",W=`[${Q}] [Claude Chrome Native Host] ${x}${U}
3
3
  `;I(R,W).catch(()=>{})}console.error(`[Claude Chrome Native Host] ${x}`,...K)}function b(x){let K=Buffer.from(x,"utf-8"),Q=Buffer.alloc(4);Q.writeUInt32LE(K.length,0),process.stdout.write(Q),process.stdout.write(K)}async function g(){T("Initializing...");let x=new B,K=new C;await x.start();while(!0){let Q=await K.read();if(Q===null)break;await x.handleMessage(Q)}await x.stop()}var f=A(()=>L.object({type:L.string()}).passthrough());class B{mcpClients=new Map;nextClientId=1;server=null;running=!1;socketPath=null;async start(){if(this.running)return;if(this.socketPath=_(),X()!=="win32"){let x=w();try{if(!(await M(x)).isDirectory())await P(x)}catch{}await y(x,{recursive:!0,mode:448}),await z(x,448).catch(()=>{});try{let K=await G(x);for(let Q of K){if(!Q.endsWith(".sock"))continue;let U=parseInt(Q.replace(".sock",""),10);if(isNaN(U))continue;try{process.kill(U,0)}catch{await P(v(x,Q)).catch(()=>{}),T(`Removed stale socket for PID ${U}`)}}}catch{}}if(T(`Creating socket listener: ${this.socketPath}`),this.server=j((x)=>this.handleMcpClient(x)),await new Promise((x,K)=>{this.server.listen(this.socketPath,()=>{T("Socket server listening for connections"),this.running=!0,x()}),this.server.on("error",(Q)=>{T("Socket server error:",Q),K(Q)})}),X()!=="win32")try{await z(this.socketPath,384),T("Socket permissions set to 0600")}catch(x){T("Failed to set socket permissions:",x)}}async stop(){if(!this.running)return;for(let[,x]of this.mcpClients)x.socket.destroy();if(this.mcpClients.clear(),this.server)await new Promise((x)=>{this.server.close(()=>x())}),this.server=null;if(X()!=="win32"&&this.socketPath){try{await P(this.socketPath),T("Cleaned up socket file")}catch{}try{let x=w();if((await G(x)).length===0)await p(x),T("Removed empty socket directory")}catch{}}this.running=!1}async isRunning(){return this.running}async getClientCount(){return this.mcpClients.size}async handleMessage(x){let K;try{K=Z(x)}catch(W){T("Invalid JSON from Chrome:",W.message),b(Y({type:"error",error:"Invalid message format"}));return}let Q=f().safeParse(K);if(!Q.success){T("Invalid message from Chrome:",Q.error.message),b(Y({type:"error",error:"Invalid message format"}));return}let U=Q.data;switch(T(`Handling Chrome message type: ${U.type}`),U.type){case"ping":T("Responding to ping"),b(Y({type:"pong",timestamp:Date.now()}));break;case"get_status":b(Y({type:"status_response",native_host_version:k}));break;case"tool_response":{if(this.mcpClients.size>0){T(`Forwarding tool response to ${this.mcpClients.size} MCP clients`);let{type:W,...V}=U,$=Buffer.from(Y(V),"utf-8"),H=Buffer.alloc(4);H.writeUInt32LE($.length,0);let J=Buffer.concat([H,$]);for(let[q,F]of this.mcpClients)try{F.socket.write(J)}catch(N){T(`Failed to send to MCP client ${q}:`,N)}}break}case"notification":{if(this.mcpClients.size>0){T(`Forwarding notification to ${this.mcpClients.size} MCP clients`);let{type:W,...V}=U,$=Buffer.from(Y(V),"utf-8"),H=Buffer.alloc(4);H.writeUInt32LE($.length,0);let J=Buffer.concat([H,$]);for(let[q,F]of this.mcpClients)try{F.socket.write(J)}catch(N){T(`Failed to send notification to MCP client ${q}:`,N)}}break}default:T(`Unknown message type: ${U.type}`),b(Y({type:"error",error:`Unknown message type: ${U.type}`}))}}handleMcpClient(x){let K=this.nextClientId++,Q={id:K,socket:x,buffer:Buffer.alloc(0)};this.mcpClients.set(K,Q),T(`MCP client ${K} connected. Total clients: ${this.mcpClients.size}`),b(Y({type:"mcp_connected"})),x.on("data",(U)=>{Q.buffer=Buffer.concat([Q.buffer,U]);while(Q.buffer.length>=4){let W=Q.buffer.readUInt32LE(0);if(W===0||W>O){T(`Invalid message length from MCP client ${K}: ${W}`),x.destroy();return}if(Q.buffer.length<4+W)break;let V=Q.buffer.slice(4,4+W);Q.buffer=Q.buffer.slice(4+W);try{let $=Z(V.toString("utf-8"));T(`Forwarding tool request from MCP client ${K}: ${$.method}`),b(Y({type:"tool_request",method:$.method,params:$.params}))}catch($){T(`Failed to parse tool request from MCP client ${K}:`,$)}}}),x.on("error",(U)=>{T(`MCP client ${K} error: ${U}`)}),x.on("close",()=>{T(`MCP client ${K} disconnected. Remaining clients: ${this.mcpClients.size-1}`),this.mcpClients.delete(K),b(Y({type:"mcp_disconnected"}))})}}class C{buffer=Buffer.alloc(0);pendingResolve=null;closed=!1;constructor(){process.stdin.on("data",(x)=>{this.buffer=Buffer.concat([this.buffer,x]),this.tryProcessMessage()}),process.stdin.on("end",()=>{if(this.closed=!0,this.pendingResolve)this.pendingResolve(null),this.pendingResolve=null}),process.stdin.on("error",()=>{if(this.closed=!0,this.pendingResolve)this.pendingResolve(null),this.pendingResolve=null})}tryProcessMessage(){if(!this.pendingResolve)return;if(this.buffer.length<4)return;let x=this.buffer.readUInt32LE(0);if(x===0||x>O){T(`Invalid message length: ${x}`),this.pendingResolve(null),this.pendingResolve=null;return}if(this.buffer.length<4+x)return;let K=this.buffer.subarray(4,4+x);this.buffer=this.buffer.subarray(4+x);let Q=K.toString("utf-8");this.pendingResolve(Q),this.pendingResolve=null}async read(){if(this.closed)return null;if(this.buffer.length>=4){let x=this.buffer.readUInt32LE(0);if(x>0&&x<=O&&this.buffer.length>=4+x){let K=this.buffer.subarray(4,4+x);return this.buffer=this.buffer.subarray(4+x),K.toString("utf-8")}}return new Promise((x)=>{this.pendingResolve=x,this.tryProcessMessage()})}}export{b as sendChromeMessage,g as runChromeNativeHost};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{h4 as k,m4 as A,o4 as x,r4 as H}from"./cli-h5yfk29j.js";import"./cli-avcnnw0n.js";import{K5 as W,L5 as X,P5 as N}from"./cli-1215h20m.js";import"./cli-ewts4g0p.js";import{B8 as J,w8 as V}from"./cli-3bxtq5dc.js";import"./cli-6xmbrh42.js";import{U9 as b,Z9 as y}from"./cli-a98b285v.js";import"./cli-jmypsed1.js";import"./cli-1qszxdan.js";import"./cli-w754xmyv.js";import"./cli-x514vyva.js";H();y();A();J();N();import{readdir as L,readFile as U,stat as Z}from"fs/promises";import{homedir as _}from"os";import{join as $}from"path";async function F(){let B=X();if(!W.includes(B))throw Error(`Unsupported platform: ${B} - Claude Desktop integration only works on macOS and WSL.`);if(B==="macos")return $(_(),"Library","Application Support","Claude","claude_desktop_config.json");let K=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(K){let q=`/mnt/c${K.replace(/^[A-Z]:/,"")}/AppData/Roaming/Claude/claude_desktop_config.json`;try{return await Z(q),q}catch{}}try{try{let q=await L("/mnt/c/Users",{withFileTypes:!0});for(let z of q){if(z.name==="Public"||z.name==="Default"||z.name==="Default User"||z.name==="All Users")continue;let I=$("/mnt/c/Users",z.name,"AppData","Roaming","Claude","claude_desktop_config.json");try{return await Z(I),I}catch{}}}catch{}}catch(G){V(G)}throw Error("Could not find Claude Desktop config file in Windows. Make sure Claude Desktop is installed on Windows.")}async function h(){if(!W.includes(X()))throw Error("Unsupported platform - Claude Desktop integration only works on macOS and WSL.");try{let B=await F(),K;try{K=await U(B,{encoding:"utf8"})}catch(I){if(b(I)==="ENOENT")return{};throw I}let G=k(K);if(!G||typeof G!=="object")return{};let q=G.mcpServers;if(!q||typeof q!=="object")return{};let z={};for(let[I,Q]of Object.entries(q)){if(!Q||typeof Q!=="object")continue;let Y=x().safeParse(Q);if(Y.success)z[I]=Y.data}return z}catch(B){return V(B),{}}}export{h as readClaudeDesktopMcpServers,F as getClaudeDesktopConfigPath};
2
+ import{T3 as k,Y3 as A,_3 as x,b4 as H}from"./cli-msw0vv86.js";import"./cli-fakdskp6.js";import{b5 as W,c5 as X,g5 as N}from"./cli-mb1qrqw1.js";import"./cli-mzcsnm06.js";import{E8 as V,J8 as J}from"./cli-4ewb3q42.js";import"./cli-xmgm2573.js";import{Y9 as b,b_ as y}from"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import"./cli-w1d8n9g3.js";H();y();A();J();N();import{readdir as L,readFile as U,stat as Z}from"fs/promises";import{homedir as _}from"os";import{join as $}from"path";async function F(){let B=X();if(!W.includes(B))throw Error(`Unsupported platform: ${B} - Claude Desktop integration only works on macOS and WSL.`);if(B==="macos")return $(_(),"Library","Application Support","Claude","claude_desktop_config.json");let K=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(K){let q=`/mnt/c${K.replace(/^[A-Z]:/,"")}/AppData/Roaming/Claude/claude_desktop_config.json`;try{return await Z(q),q}catch{}}try{try{let q=await L("/mnt/c/Users",{withFileTypes:!0});for(let z of q){if(z.name==="Public"||z.name==="Default"||z.name==="Default User"||z.name==="All Users")continue;let I=$("/mnt/c/Users",z.name,"AppData","Roaming","Claude","claude_desktop_config.json");try{return await Z(I),I}catch{}}}catch{}}catch(G){V(G)}throw Error("Could not find Claude Desktop config file in Windows. Make sure Claude Desktop is installed on Windows.")}async function h(){if(!W.includes(X()))throw Error("Unsupported platform - Claude Desktop integration only works on macOS and WSL.");try{let B=await F(),K;try{K=await U(B,{encoding:"utf8"})}catch(I){if(b(I)==="ENOENT")return{};throw I}let G=k(K);if(!G||typeof G!=="object")return{};let q=G.mcpServers;if(!q||typeof q!=="object")return{};let z={};for(let[I,Q]of Object.entries(q)){if(!Q||typeof Q!=="object")continue;let Y=x().safeParse(Q);if(Y.success)z[I]=Y.data}return z}catch(B){return V(B),{}}}export{h as readClaudeDesktopMcpServers,F as getClaudeDesktopConfigPath};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{AR as B,CR as G,DR as V,FR as J,GR as X}from"./cli-0v6qg4zv.js";import{T9 as R,Z9 as Q,r_ as W,u_ as S}from"./cli-a98b285v.js";import"./cli-jmypsed1.js";import"./cli-1qszxdan.js";import"./cli-w754xmyv.js";import{bda as m,cda as N}from"./cli-x514vyva.js";function q(){let P,w;return{promise:new Promise((n,a)=>{P=n,w=a}),resolve:P,reject:w}}var z=()=>{};async function E(P){let T=P.getAppState().computerUseMcpState?.hiddenDuringTurn;if(T&&T.size>0){let{unhideComputerUseApps:n}=await import("./executor-rvxyyheh.js"),a=n([...T]).catch((f)=>W(`[Computer Use MCP] auto-unhide failed: ${R(f)}`)),l=q(),K=setTimeout(l.resolve,Y);await Promise.race([a,l.promise]).finally(()=>clearTimeout(K)),P.setAppState((f)=>f.computerUseMcpState?.hiddenDuringTurn===void 0?f:{...f,computerUseMcpState:{...f.computerUseMcpState,hiddenDuringTurn:void 0}})}if(!B())return;try{J()}catch(n){W(`[Computer Use MCP] unregisterEscHotkey failed: ${R(n)}`)}if(await G())P.sendOSNotification?.({message:"Claude is done using your computer",notificationType:"computer_use_exit"})}var Y=5000;var Z=m(()=>{S();Q();z();V();X()});Z();export{E as cleanupComputerUseAfterTurn};
2
+ import{AR as V,CR as J,DR as X,xR as B,zR as G}from"./cli-msgx4pnp.js";import{X9 as R,b_ as Q,v_ as W,y_ as S}from"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import{fda as m,gda as N}from"./cli-w1d8n9g3.js";function q(){let P,w;return{promise:new Promise((n,a)=>{P=n,w=a}),resolve:P,reject:w}}var z=()=>{};async function E(P){let T=P.getAppState().computerUseMcpState?.hiddenDuringTurn;if(T&&T.size>0){let{unhideComputerUseApps:n}=await import("./executor-s42mdmqs.js"),a=n([...T]).catch((f)=>W(`[Computer Use MCP] auto-unhide failed: ${R(f)}`)),l=q(),K=setTimeout(l.resolve,Y);await Promise.race([a,l.promise]).finally(()=>clearTimeout(K)),P.setAppState((f)=>f.computerUseMcpState?.hiddenDuringTurn===void 0?f:{...f,computerUseMcpState:{...f.computerUseMcpState,hiddenDuringTurn:void 0}})}if(!B())return;try{J()}catch(n){W(`[Computer Use MCP] unregisterEscHotkey failed: ${R(n)}`)}if(await G())P.sendOSNotification?.({message:"Claude is done using your computer",notificationType:"computer_use_exit"})}var Y=5000;var Z=m(()=>{S();Q();z();V();X()});Z();export{E as cleanupComputerUseAfterTurn};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wf as a,xf as l}from"./cli-v943fd6a.js";import"./cli-edkqs0ge.js";import"./cli-vkvmhjha.js";import"./cli-4mvvtchx.js";import"./cli-me4e2p3e.js";import"./cli-s9fhtgmz.js";import"./cli-vkzp66cm.js";import"./cli-t4j047cx.js";import"./cli-49m97nbg.js";import"./cli-r83ttew2.js";import"./cli-xfsqvp8r.js";import"./cli-5vsnhp97.js";import"./cli-d0hzw78c.js";import"./cli-8qd16mt4.js";import"./cli-95wg48h9.js";import"./cli-3m8n808e.js";import"./cli-764c4bsm.js";import"./cli-g5wq5ptg.js";import"./cli-6yprtw88.js";import"./cli-eyw3czmn.js";import"./cli-2rw44zfx.js";import"./cli-akcxtvv9.js";import"./cli-x8xgga1a.js";import"./cli-99mqr54v.js";import"./cli-v9f860t5.js";import"./cli-scaqq0v9.js";import"./cli-msgx4pnp.js";import"./cli-5dt9yjha.js";import"./cli-8hxz2qs6.js";import"./cli-d53fhs6v.js";import"./cli-wt2bfbn0.js";import"./cli-br6zjh6x.js";import"./cli-ms5j6fff.js";import"./cli-6pdpyz1a.js";import"./cli-fwrj8ybs.js";import"./cli-p2cqnrnp.js";import"./cli-gtm212j6.js";import"./cli-0qt9btbe.js";import"./cli-jegyadmb.js";import"./cli-msmzt4c3.js";import"./cli-msw0vv86.js";import"./cli-s6vr7213.js";import"./cli-fghyxar5.js";import"./cli-1ny2386w.js";import"./cli-fakdskp6.js";import"./cli-mb1qrqw1.js";import"./cli-f63fdj4w.js";import"./cli-k4v08k8t.js";import"./cli-pgg33dhw.js";import"./cli-w52yvzkn.js";import"./cli-51720d82.js";import"./cli-ezs5sney.js";import"./cli-n5s5fnyj.js";import"./cli-fdya77ch.js";import"./cli-mzcsnm06.js";import"./cli-p0vh69b9.js";import"./cli-rvad3yhg.js";import"./cli-4ewb3q42.js";import"./cli-xmgm2573.js";import"./cli-fs7yttfp.js";import"./cli-t9jht3kb.js";import"./cli-350pymj4.js";import"./cli-rxb5q8zw.js";import"./cli-jj93qmmc.js";import"./cli-kq16afrr.js";import"./cli-xpa1neza.js";import"./cli-rjerv816.js";import"./cli-hke6r0q8.js";import"./cli-x70v8rsj.js";import"./cli-tq5z9qv3.js";import"./cli-3ac555qw.js";import{fda as t}from"./cli-w1d8n9g3.js";var n=async(e,o)=>{return await a(o),{type:"text",value:""}};var m=t(()=>{l()});m();export{n as call};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{sd as Z,td as _,ud as $,xd as O}from"./cli-by5b2216.js";import{Ed as Y,Jd as x}from"./cli-zdy5bccv.js";import{CD as V,hD as U,mD as W,rD as S,sD as X}from"./cli-5pb6kdxn.js";import{T9 as Q,Z9 as C,r_ as R,u_ as K}from"./cli-a98b285v.js";x();K();C();V();S();O();function b(G,J,L){let H=new Set(J.plugins.map((z)=>z.name)),A=`@${L}`,q=[];for(let z of Object.keys(G.plugins)){if(!z.endsWith(A))continue;let h=z.slice(0,-A.length);if(!H.has(h))q.push(z)}return q}async function F(){await Z();let G=X(),J=_(),L=await U(),H=[];for(let A of Object.keys(L))try{let q=await W(A);if(!q.forceRemoveDeletedPlugins)continue;let z=b(G,q,A);for(let h of z){if(h in J)continue;let T=G.plugins[h]??[];if(!T.some((B)=>B.scope==="user"||B.scope==="project"||B.scope==="local"))continue;for(let B of T){let{scope:E}=B;if(E!=="user"&&E!=="project"&&E!=="local")continue;try{await Y(h,E)}catch(v){R(`Failed to auto-uninstall delisted plugin ${h} from ${E}: ${Q(v)}`,{level:"error"})}}await $(h),H.push(h)}}catch(q){R(`Failed to check for delisted plugins in "${A}": ${Q(q)}`,{level:"warn"})}return H}
3
- export{F as ya};
2
+ import{od as Z,pd as _,qd as $,td as O}from"./cli-89x414pj.js";import{Ed as Y,Jd as x}from"./cli-q46epwyh.js";import{eD as U,jD as W,oD as S,pD as X,zD as V}from"./cli-me4e2p3e.js";import{X9 as Q,b_ as C,v_ as R,y_ as K}from"./cli-hke6r0q8.js";x();K();C();V();S();O();function b(G,J,L){let H=new Set(J.plugins.map((z)=>z.name)),A=`@${L}`,q=[];for(let z of Object.keys(G.plugins)){if(!z.endsWith(A))continue;let h=z.slice(0,-A.length);if(!H.has(h))q.push(z)}return q}async function F(){await Z();let G=X(),J=_(),L=await U(),H=[];for(let A of Object.keys(L))try{let q=await W(A);if(!q.forceRemoveDeletedPlugins)continue;let z=b(G,q,A);for(let h of z){if(h in J)continue;let T=G.plugins[h]??[];if(!T.some((B)=>B.scope==="user"||B.scope==="project"||B.scope==="local"))continue;for(let B of T){let{scope:E}=B;if(E!=="user"&&E!=="project"&&E!=="local")continue;try{await Y(h,E)}catch(v){R(`Failed to auto-uninstall delisted plugin ${h} from ${E}: ${Q(v)}`,{level:"error"})}}await $(h),H.push(h)}}catch(q){R(`Failed to check for delisted plugins in "${A}": ${Q(q)}`,{level:"warn"})}return H}
3
+ export{F as qa};
@@ -1,8 +1,8 @@
1
1
  // @bun
2
- import{bda as B}from"./cli-x514vyva.js";function Kj(j,Q){return Math.floor((j-1)/Q)+1}function Wj(j,Q,V){return Kj(j,V)*Kj(Q,V)}function Pj(j,Q,V){let{pxPerToken:Z,maxTargetPx:$,maxTargetTokens:J}=V;if(j<=$&&Q<=$&&Wj(j,Q,Z)<=J)return[j,Q];if(Q>j){let[Y,W]=Pj(Q,j,V);return[W,Y]}let z=j/Q,U=j,X=1;for(;;){if(X+1===U)return[X,Math.max(Math.round(X/z),1)];let Y=Math.floor((X+U)/2),W=Math.max(Math.round(Y/z),1);if(Y<=$&&Wj(Y,W,Z)<=J)X=Y;else U=Y}}var nj;var Oj=B(()=>{nj={pxPerToken:28,maxTargetPx:1568,maxTargetTokens:1568}});function s(j,Q,V){let Z=ij[Q],$=V&&V.length>0?` Available applications on this machine: ${V.join(", ")}.`:"",J={type:"array",items:{type:"number"},minItems:2,maxItems:2,description:`(x, y): ${Z.x}`},z={type:"string",description:'Modifier keys to hold during the click (e.g. "shift", "ctrl+shift"). Supports the same syntax as the key tool.'},U=j.screenshotFiltering==="native"?"Take a screenshot of the primary display. Applications not in the session allowlist are excluded at the compositor level \u2014 only granted apps and the desktop are visible.":"Take a screenshot of the primary display. On this platform, screenshots are NOT filtered \u2014 all open windows are visible. Input actions targeting apps not in the session allowlist are rejected.";return[{name:"request_access",description:"Request user permission to control a set of applications for this session. Must be called before any other tool in this server. The user sees a single dialog listing all requested apps and either allows the whole set or denies it. Call this again mid-session to add more apps; previously granted apps remain granted. Returns the granted apps, denied apps, and screenshot filtering capability.",inputSchema:{type:"object",properties:{apps:{type:"array",items:{type:"string"},description:'Application display names (e.g. "Slack", "Calendar") or bundle identifiers (e.g. "com.tinyspeck.slackmacgap"). Display names are resolved case-insensitively against installed apps.'+$},reason:{type:"string",description:"One-sentence explanation shown to the user in the approval dialog. Explain the task, not the mechanism."},clipboardRead:{type:"boolean",description:"Also request permission to read the user's clipboard (separate checkbox in the dialog)."},clipboardWrite:{type:"boolean",description:"Also request permission to write the user's clipboard. When granted, multi-line `type` calls use the clipboard fast path."},systemKeyCombos:{type:"boolean",description:"Also request permission to send system-level key combos (quit app, switch app, lock screen). Without this, those specific combos are blocked."}},required:["apps","reason"]}},{name:"screenshot",description:U+" Returns an error if the allowlist is empty. The returned image is what subsequent click coordinates are relative to.",inputSchema:{type:"object",properties:{save_to_disk:{type:"boolean",description:"Save the image to disk so it can be attached to a message for the user. Returns the saved path in the tool result. Only set this when you intend to share the image \u2014 screenshots you're just looking at don't need saving."}},required:[]}},{name:"zoom",description:"Take a higher-resolution screenshot of a specific region of the last full-screen screenshot. Use this liberally to inspect small text, button labels, or fine UI details that are hard to read in the downsampled full-screen image. IMPORTANT: Coordinates in subsequent click calls always refer to the full-screen screenshot, never the zoomed image. This tool is read-only for inspecting detail.",inputSchema:{type:"object",properties:{region:{type:"array",items:{type:"integer"},minItems:4,maxItems:4,description:"(x0, y0, x1, y1): Rectangle to zoom into, in the coordinate space of the most recent full-screen screenshot. x0,y0 = top-left, x1,y1 = bottom-right."},save_to_disk:{type:"boolean",description:"Save the image to disk so it can be attached to a message for the user. Returns the saved path in the tool result. Only set this when you intend to share the image."}},required:["region"]}},{name:"left_click",description:"Left-click at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"double_click",description:"Double-click at the given coordinates. Selects a word in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"triple_click",description:"Triple-click at the given coordinates. Selects a line in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"right_click",description:"Right-click at the given coordinates. Opens a context menu in most applications. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"middle_click",description:"Middle-click (scroll-wheel click) at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"type",description:"Type text into whatever currently has keyboard focus. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Newlines are supported. For keyboard shortcuts use `key` instead.",inputSchema:{type:"object",properties:{text:{type:"string",description:"Text to type."}},required:["text"]}},{name:"key",description:'Press a key or key combination (e.g. "return", "escape", "cmd+a", "ctrl+shift+tab"). The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. '+"System-level combos (quit app, switch app, lock screen) require the `systemKeyCombos` grant \u2014 without it they return an error. All other combos work.",inputSchema:{type:"object",properties:{text:{type:"string",description:'Modifiers joined with "+", e.g. "cmd+shift+a".'},repeat:{type:"integer",minimum:1,maximum:100,description:"Number of times to repeat the key press. Default is 1."}},required:["text"]}},{name:"scroll",description:"Scroll at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,scroll_direction:{type:"string",enum:["up","down","left","right"],description:"Direction to scroll."},scroll_amount:{type:"integer",minimum:0,maximum:100,description:"Number of scroll ticks."}},required:["coordinate","scroll_direction","scroll_amount"]}},{name:"left_click_drag",description:"Press, move to target, and release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:{...J,description:`(x, y) end point: ${Z.x}`},start_coordinate:{...J,description:`(x, y) start point. If omitted, drags from the current cursor position. ${Z.x}`}},required:["coordinate"]}},{name:"mouse_move",description:"Move the mouse cursor without clicking. Useful for triggering hover states. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J},required:["coordinate"]}},{name:"open_application",description:"Bring an application to the front, launching it if necessary. The target application must already be in the session allowlist \u2014 call request_access first.",inputSchema:{type:"object",properties:{app:{type:"string",description:'Display name (e.g. "Slack") or bundle identifier (e.g. "com.tinyspeck.slackmacgap").'}},required:["app"]}},{name:"switch_display",description:"Switch which monitor subsequent screenshots capture. Use this when the application you need is on a different monitor than the one shown. The screenshot tool tells you which monitor it captured and lists "+"other attached monitors by name \u2014 pass one of those names here. "+'After switching, call screenshot to see the new monitor. Pass "auto" to return to automatic monitor selection.',inputSchema:{type:"object",properties:{display:{type:"string",description:'Monitor name from the screenshot note (e.g. "Built-in Retina Display", "LG UltraFine"), or "auto" to re-enable automatic selection.'}},required:["display"]}},{name:"list_granted_applications",description:"List the applications currently in the session allowlist, plus the active grant flags and coordinate mode. No side effects.",inputSchema:{type:"object",properties:{},required:[]}},{name:"read_clipboard",description:"Read the current clipboard contents as text. Requires the `clipboardRead` grant.",inputSchema:{type:"object",properties:{},required:[]}},{name:"write_clipboard",description:"Write text to the clipboard. Requires the `clipboardWrite` grant.",inputSchema:{type:"object",properties:{text:{type:"string"}},required:["text"]}},{name:"wait",description:"Wait for a specified duration.",inputSchema:{type:"object",properties:{duration:{type:"number",description:"Duration in seconds (0\u2013100)."}},required:["duration"]}},{name:"cursor_position",description:"Get the current mouse cursor position. Returns image-pixel coordinates relative to the most recent screenshot, or logical points if no screenshot has been taken.",inputSchema:{type:"object",properties:{},required:[]}},{name:"hold_key",description:"Press and hold a key or key combination for the specified duration, then release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. System-level combos require the `systemKeyCombos` grant.",inputSchema:{type:"object",properties:{text:{type:"string",description:'Key or chord to hold, e.g. "space", "shift+down".'},duration:{type:"number",description:"Duration in seconds (0\u2013100)."}},required:["text","duration"]}},{name:"left_mouse_down",description:"Press the left mouse button at the current cursor position and leave it held. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Use mouse_move first to position the cursor. Call left_mouse_up to release. Errors if the button is already held.",inputSchema:{type:"object",properties:{},required:[]}},{name:"left_mouse_up",description:"Release the left mouse button at the current cursor position. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Pairs with left_mouse_down. Safe to call even if the button is not currently held.",inputSchema:{type:"object",properties:{},required:[]}},{name:"computer_batch",description:"Execute a sequence of actions in ONE tool call. Each individual tool call requires a model\u2192API round trip (seconds); "+"batching a predictable sequence eliminates all but one. Use this whenever you can predict the outcome of several actions ahead \u2014 "+`e.g. click a field, type into it, press Return. Actions execute sequentially and stop on the first error. ${"The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing."} The frontmost check runs before EACH action inside the batch \u2014 if an action opens a non-allowed app, the next action's gate fires and the batch stops there. `+"Mid-batch screenshot actions are allowed for inspection but coordinates in subsequent clicks always refer to the PRE-BATCH full-screen screenshot.",inputSchema:{type:"object",properties:{actions:{type:"array",minItems:1,items:fj,description:'List of actions. Example: [{"action":"left_click","coordinate":[100,200]},{"action":"type","text":"hello"},{"action":"key","text":"Return"}]'}},required:["actions"]}},...j.teachMode?oj(Z,$):[]]}function oj(j,Q){let V={explanation:{type:"string",description:"Tooltip body text. Explain what the user is looking at and why it matters. "+"This is the ONLY place the user sees your words \u2014 be complete but concise."},next_preview:{type:"string",description:`One line describing exactly what will happen when the user clicks Next. Example: "Next: I'll click Create Bucket and type the name." Shown below the explanation in a smaller font.`},anchor:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:`(x, y) \u2014 where the tooltip arrow points. ${j.x} Omit to center the tooltip with no arrow (for general-context steps).`},actions:{type:"array",items:fj,description:"Actions to execute when the user clicks Next. Same item schema as computer_batch.actions. Empty array is valid for purely explanatory steps. Actions run sequentially and stop on first error."}};return[{name:"request_teach_access",description:'Request permission to guide the user through a task step-by-step with on-screen tooltips. Use this INSTEAD OF request_access when the user wants to LEARN how to do something (phrases like "teach me", "walk me through", "show me how", "help me learn"). On approval the main Claude window hides and a fullscreen tooltip overlay appears. You then call teach_step repeatedly; each call shows one tooltip and waits for the user to click Next. Same app-allowlist semantics as request_access, but no clipboard/system-key flags. Teach mode ends automatically when your turn ends.',inputSchema:{type:"object",properties:{apps:{type:"array",items:{type:"string"},description:'Application display names (e.g. "Slack", "Calendar") or bundle identifiers. Resolved case-insensitively against installed apps.'+Q},reason:{type:"string",description:'What you will be teaching. Shown in the approval dialog as "Claude wants to guide you through {reason}". Keep it short and task-focused.'}},required:["apps","reason"]}},{name:"teach_step",description:"Show one guided-tour tooltip and wait for the user to click Next. On Next, execute the actions, "+"take a fresh screenshot, and return both \u2014 you do NOT need a separate screenshot call between steps. "+"The returned image shows the state after your actions ran; anchor the next teach_step against it. "+"IMPORTANT \u2014 the user only sees the tooltip during teach mode. Put ALL narration in `explanation`. "+"Text you emit outside teach_step calls is NOT visible until teach mode ends. "+"Pack as many actions as possible into each step's `actions` array \u2014 the user waits through "+"the whole round trip between clicks, so one step that fills a form beats five steps that fill one field each. "+"Returns {exited:true} if the user clicks Exit \u2014 do not call teach_step again after that. "+"Take an initial screenshot before your FIRST teach_step to anchor it.",inputSchema:{type:"object",properties:V,required:["explanation","next_preview","actions"]}},{name:"teach_batch",description:"Queue multiple teach steps in one tool call. Parallels computer_batch: "+"N steps \u2192 one model\u2194API round trip instead of N. Each step still shows a tooltip "+"and waits for the user's Next click, but YOU aren't waiting for a round trip between steps. "+"You can call teach_batch multiple times in one tour \u2014 treat each batch as one predictable "+"SEGMENT (typically: all the steps on one page). The returned screenshot shows the state after the batch's final actions; anchor the NEXT teach_batch against it. WITHIN a batch, all anchors and click coordinates refer to the PRE-BATCH screenshot "+"(same invariant as computer_batch) \u2014 for steps 2+ in a batch, either omit anchor "+"(centered tooltip) or target elements you know won't have moved. "+"Good pattern: batch 5 tooltips on page A (last step navigates) \u2192 read returned screenshot \u2192 "+"batch 3 tooltips on page B \u2192 done. "+"Returns {exited:true, stepsCompleted:N} if the user clicks Exit \u2014 do NOT call again after that; "+"{stepsCompleted, stepFailed, ...} if an action errors mid-batch; otherwise {stepsCompleted, results:[...]} plus a final screenshot. Fall back to individual teach_step calls when you need to react to each intermediate screenshot.",inputSchema:{type:"object",properties:{steps:{type:"array",minItems:1,items:{type:"object",properties:V,required:["explanation","next_preview","actions"]},description:"Ordered steps. Validated upfront \u2014 a typo in step 5 errors before any tooltip shows."}},required:["steps"]}}]}var ij,fj;var t=B(()=>{ij={pixels:{x:"Horizontal pixel position read directly from the most recent screenshot image, measured from the left edge. The server handles all scaling.",y:"Vertical pixel position read directly from the most recent screenshot image, measured from the top edge. The server handles all scaling."},normalized_0_100:{x:"Horizontal position as a percentage of screen width, 0.0\u2013100.0 (0 = left edge, 100 = right edge).",y:"Vertical position as a percentage of screen height, 0.0\u2013100.0 (0 = top edge, 100 = bottom edge)."}},fj={type:"object",properties:{action:{type:"string",enum:["key","type","mouse_move","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","hold_key","screenshot","cursor_position","left_mouse_down","left_mouse_up","wait"],description:"The action to perform."},coordinate:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"(x, y) for click/mouse_move/scroll/left_click_drag end point."},start_coordinate:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"(x, y) drag start \u2014 left_click_drag only. Omit to drag from current cursor."},text:{type:"string",description:"For type: the text. For key/hold_key: the chord string. For click/scroll: modifier keys to hold."},scroll_direction:{type:"string",enum:["up","down","left","right"]},scroll_amount:{type:"integer",minimum:0,maximum:100},duration:{type:"number",description:"Seconds (0\u2013100). For hold_key/wait."},repeat:{type:"integer",minimum:1,maximum:100,description:"For key: repeat count."}},required:["action"]}});function Cj(j){if(j==="browser"||j==="trading")return"read";if(j==="terminal")return"click";return"full"}function x(j,Q){if(j&&aj.has(j))return!0;let V=Q.toLowerCase();for(let Z of rj)if(V.includes(Z))return!0;return!1}function Mj(j){if(dj.has(j))return"browser";if(sj.has(j))return"terminal";if(tj.has(j))return"trading";return null}function Hj(j){let Q=j.toLowerCase();for(let V of VV)if(Q.includes(V))return"trading";for(let V of ej)if(Q.includes(V))return"browser";for(let V of jV)if(Q.includes(V))return"terminal";return null}function G(j,Q){if(j){let V=Mj(j);if(V)return V}return Hj(Q)}function v(j,Q){return Cj(G(j,Q))}var dj,sj,tj,aj,rj,ej,jV,VV;var a=B(()=>{dj=new Set(["com.apple.Safari","com.apple.SafariTechnologyPreview","com.google.Chrome","com.google.Chrome.beta","com.google.Chrome.dev","com.google.Chrome.canary","com.microsoft.edgemac","com.microsoft.edgemac.Beta","com.microsoft.edgemac.Dev","com.microsoft.edgemac.Canary","org.mozilla.firefox","org.mozilla.firefoxdeveloperedition","org.mozilla.nightly","org.chromium.Chromium","com.brave.Browser","com.brave.Browser.beta","com.brave.Browser.nightly","com.operasoftware.Opera","com.operasoftware.OperaGX","com.operasoftware.OperaDeveloper","com.vivaldi.Vivaldi","company.thebrowser.Browser","company.thebrowser.dia","org.torproject.torbrowser","com.duckduckgo.macos.browser","ru.yandex.desktop.yandex-browser","ai.perplexity.comet","com.sigmaos.sigmaos.macos","com.kagi.kagimacOS"]),sj=new Set(["com.apple.Terminal","com.googlecode.iterm2","dev.warp.Warp-Stable","dev.warp.Warp-Beta","com.github.wez.wezterm","org.alacritty","io.alacritty","net.kovidgoyal.kitty","co.zeit.hyper","com.mitchellh.ghostty","org.tabby","com.termius-dmg.mac","com.microsoft.VSCode","com.microsoft.VSCodeInsiders","com.vscodium","com.todesktop.230313mzl4w4u92","com.exafunction.windsurf","dev.zed.Zed","dev.zed.Zed-Preview","com.jetbrains.intellij","com.jetbrains.intellij.ce","com.jetbrains.pycharm","com.jetbrains.pycharm.ce","com.jetbrains.WebStorm","com.jetbrains.CLion","com.jetbrains.goland","com.jetbrains.rubymine","com.jetbrains.PhpStorm","com.jetbrains.datagrip","com.jetbrains.rider","com.jetbrains.AppCode","com.jetbrains.rustrover","com.jetbrains.fleet","com.google.android.studio","com.axosoft.gitkraken","com.sublimetext.4","com.sublimetext.3","org.vim.MacVim","com.neovim.neovim","org.gnu.Emacs","com.apple.dt.Xcode","org.eclipse.platform.ide","org.netbeans.ide","com.microsoft.visual-studio","com.apple.ScriptEditor2","com.apple.Automator","com.apple.shortcuts"]),tj=new Set(["com.webull.desktop.v1","com.webull.trade.mac.v1","com.tastytrade.desktop","com.tradingview.tradingviewapp.desktop","com.fidelity.activetrader","com.fmr.activetrader","com.install4j.5889-6375-8446-2021","com.binance.BinanceDesktop","com.electron.exodus","org.pythonmac.unspecified.Electrum","com.ledger.live","io.trezor.TrezorSuite"]),aj=new Set(["com.apple.TV","com.apple.Music","com.apple.iBooksX","com.apple.podcasts","com.spotify.client","com.amazon.music","com.tidal.desktop","com.deezer.deezer-desktop","com.pandora.desktop","com.electron.pocket-casts","au.com.shiftyjelly.PocketCasts","tv.plex.desktop","tv.plex.htpc","tv.plex.plexamp","com.amazon.aiv.AIVApp","net.kovidgoyal.calibre","com.amazon.Kindle","com.amazon.Lassen","com.kobo.desktop.Kobo"]),rj=["netflix","disney+","hulu","prime video","apple tv","peacock","paramount+","tubi","crunchyroll","vudu","kindle","apple books","kobo","play books","calibre","libby","readium","audible","libro.fm","speechify","spotify","apple music","amazon music","youtube music","tidal","deezer","pandora","pocket casts","naver","reddit","sony music","vegas pro","pitchfork","economist","nytimes"];ej=["safari","chrome","firefox","microsoft edge","brave","opera","vivaldi","chromium","arc browser","tor browser","duckduckgo","yandex","orion browser","comet","sigmaos","dia browser"],jV=["terminal","iterm","wezterm","alacritty","kitty","ghostty","tabby","termius","script editor","automator","powershell","cmd.exe","command prompt","git bash","conemu","cmder","visual studio code","visual studio","vscode","vs code","vscodium","cursor","windsurf","intellij","pycharm","webstorm","clion","goland","rubymine","phpstorm","datagrip","rider","appcode","rustrover","fleet","android studio","sublime text","macvim","neovim","emacs","xcode","eclipse","netbeans"],VV=["bloomberg","ameritrade","thinkorswim","schwab","fidelity","e*trade","interactive brokers","trader workstation","tradestation","webull","robinhood","tastytrade","ninjatrader","tradingview","moomoo","tradezero","prorealtime","plus500","saxotrader","oanda","metatrader","forex.com","avaoptions","ctrader","jforex","iq option","olymp trade","binomo","pocket option","raceoption","expertoption","quotex","naga","morgan stanley","ubs neo","eikon","coinbase","kraken","binance","okx","bybit","phemex","stormgain","crypto.com","electrum","ledger live","trezor","guarda","atomic wallet","bitpay","bisq","koinly","cointracker","blockfi","stripe cli","decentraland","axie infinity","gods unchained"]});function JV(j){let Q=j.toLowerCase().split("+").map((J)=>J.trim()).filter(Boolean),V=[],Z=[];for(let J of Q){let z=QV[J];if(z!==void 0)V.push(z);else Z.push(J)}let $=[...new Set(V)];return $.sort((J,z)=>qj.indexOf(J)-qj.indexOf(z)),{mods:$,keys:Z}}function b(j,Q){let V=Q==="darwin"?ZV:$V,{mods:Z,keys:$}=JV(j),J=Z.length>0?Z.join("+")+"+":"";if($.length===0)return V.has(Z.join("+"));for(let z of $)if(V.has(J+z))return!0;return!1}var QV,qj,ZV,$V;var r=B(()=>{QV={meta:"meta",super:"meta",command:"meta",cmd:"meta",windows:"meta",win:"meta",ctrl:"ctrl",control:"ctrl",lctrl:"ctrl",lcontrol:"ctrl",rctrl:"ctrl",rcontrol:"ctrl",shift:"shift",lshift:"shift",rshift:"shift",alt:"alt",option:"alt"},qj=["ctrl","alt","shift","meta"],ZV=new Set(["meta+q","shift+meta+q","alt+meta+escape","meta+tab","meta+space","ctrl+meta+q"]),$V=new Set(["ctrl+alt+delete","alt+f4","alt+tab","meta+l","meta+d"])});function zV(j,Q,V,Z,$){if(!j||!Q)return null;let J=Math.max(0,Math.min(100,V)),z=Math.max(0,Math.min(100,Z)),U=Math.round(J/100*j),X=Math.round(z/100*Q),Y=Math.floor($/2),W=Math.max(0,U-Y),F=Math.max(0,X-Y),P=Math.min($,j-W),C=Math.min($,Q-F);if(P<=0||C<=0)return null;return{x:W,y:F,width:P,height:C}}function Lj(j,Q,V,Z,$,J=9){let z=zV(V.width,V.height,Z,$,J);if(!z)return!1;let U=j(Q.base64,z),X=j(V.base64,z);if(!U||!X)return!1;return U.equals(X)}async function e(j,Q,V,Z,$,J,z=9){if(!Q)return{valid:!0,skipped:!0};try{let U=await $();if(!U)return{valid:!0,skipped:!0};if(Lj(j,Q,U,V,Z,z))return{valid:!0,skipped:!1};return{valid:!1,skipped:!1,warning:"Screen content at the target location changed since the last screenshot. Take a new screenshot before clicking."}}catch(U){return J.debug("[pixelCompare] validation error, skipping",U),{valid:!0,skipped:!0}}}var jj=()=>{};function XV(j){if(_j.has(j))return"shell";if(Ej.has(j))return"filesystem";if(Aj.has(j))return"system_settings";return null}var _j,Ej,Aj,Vj;var Qj=B(()=>{_j=new Set(["com.apple.Terminal","com.googlecode.iterm2","com.microsoft.VSCode","dev.warp.Warp-Stable","com.github.wez.wezterm","io.alacritty","net.kovidgoyal.kitty","com.jetbrains.intellij","com.jetbrains.pycharm"]),Ej=new Set(["com.apple.finder"]),Aj=new Set(["com.apple.systempreferences"]),Vj=new Set([..._j,...Ej,...Aj])});import{randomUUID as c}from"crypto";function K(j,Q){return{content:[{type:"text",text:j}],isError:!0,telemetry:Q?{error_kind:Q}:void 0}}function L(j){return{content:[{type:"text",text:j}]}}function q(j,Q){return{content:[{type:"text",text:JSON.stringify(j)}],telemetry:Q}}function UV(j){if(typeof j==="object"&&j!==null)return j;return{}}function T(j,Q){let V=j[Q];if(typeof V!=="string")return Error(`"${Q}" must be a string.`);return V}function g(j,Q="coordinate"){let V=j[Q];if(V===void 0)return Error(`${Q} is required`);if(!Array.isArray(V)||V.length!==2)return Error(`${Q} must be an array of length 2`);let[Z,$]=V;if(typeof Z!=="number"||typeof $!=="number"||Z<0||$<0)return Error(`${Q} must be a tuple of non-negative numbers`);return[Z,$]}function S(j,Q,V,Z,$,J){if(V==="normalized_0_100")return{x:Math.round(j/100*Z.width)+Z.originX,y:Math.round(Q/100*Z.height)+Z.originY};if($)return{x:Math.round(j*($.displayWidth/$.width))+$.originX,y:Math.round(Q*($.displayHeight/$.height))+$.originY};return J.warn("[computer-use] pixels-mode coordinate received with no prior screenshot; falling back to /scaleFactor. Click may be off if downsample is active."),{x:Math.round(j/Z.scaleFactor)+Z.originX,y:Math.round(Q/Z.scaleFactor)+Z.originY}}function YV(j,Q,V,Z){if(V==="normalized_0_100")return{xPct:j,yPct:Q};if(!Z)return{xPct:0,yPct:0};return{xPct:j/Z.width*100,yPct:Q/Z.height*100}}function Rj(j,Q){let V=j??"full";if(Q==="mouse_position")return!0;if(Q==="keyboard"||Q==="mouse_full")return V==="full";return V==="click"||V==="full"}async function l(j,Q,V){let Z=Q.getClipboardStash?.();if(!V){if(Z===void 0)return;try{await j.executor.writeClipboard(Z),Q.onClipboardStashChanged?.(void 0)}catch{}return}if(Z===void 0)try{let $=await j.executor.readClipboard();Q.onClipboardStashChanged?.($)}catch{Q.onClipboardStashChanged?.("")}try{await j.executor.writeClipboard("")}catch{}}async function D(j,Q,V,Z){if(V.hideBeforeAction){let X=await j.executor.prepareForAction(Q.allowedApps.map((Y)=>Y.bundleId),Q.selectedDisplayId);if(X.length>0)Q.onAppsHidden?.(X)}let $=await j.executor.getFrontmostApp(),J=new Map(Q.allowedApps.map((X)=>[X.bundleId,X.tier])),z=$?J.get($.bundleId):void 0;if(V.clipboardGuard)await l(j,Q,z==="click");if(!$)return null;let{hostBundleId:U}=j.executor.capabilities;if(z!==void 0){if(Rj(z,Z))return null;if(z==="read"){let X=G($.bundleId,$.displayName)==="browser";return K(`"${$.displayName}" is granted at tier "read" \u2014 `+"visible in screenshots only, no clicks or typing."+(X?" Use the Claude-in-Chrome MCP for browser interaction (tools named `mcp__Claude_in_Chrome__*`; load via ToolSearch if deferred).":" No interaction is permitted; ask the user to take any actions in this app themselves.")+I,"tier_insufficient")}if(Z==="keyboard")return K(`"${$.displayName}" is granted at tier "click" \u2014 `+`typing, key presses, and paste require tier "full". The keys would go to this app's text fields or integrated terminal. To type into a different app, click it first to bring it forward. For shell commands, use the Bash tool.`+I,"tier_insufficient");return K(`"${$.displayName}" is granted at tier "click" \u2014 `+'right-click, middle-click, and clicks with modifier keys require tier "full". Right-click opens a context menu with Paste/Cut, and modifier chords fire as keystrokes before the click. Plain left_click is allowed here.'+I,"tier_insufficient")}if($.bundleId===Bj)return null;if($.bundleId===U){if(Z!=="keyboard")return null;return K("Claude's own window still has keyboard focus. This should not happen after the pre-action defocus. Click on the target application first.","state_conflict")}return K(`"${$.displayName}" is not in the allowed applications and is `+"currently in front. Take a new screenshot \u2014 it may have appeared "+"since your last one.","app_not_granted")}async function y(j,Q,V,Z,$,J){let z=await j.executor.appUnderPoint(Z,$);if(!z)return null;if(z.bundleId===Bj)return null;let U=new Map(Q.allowedApps.map((W)=>[W.bundleId,W.tier]));if(!U.has(z.bundleId))return K(`Click at these coordinates would land on "${z.displayName}", which is not in the allowed applications. Take a fresh screenshot to see the current window layout.`,"app_not_granted");let X=U.get(z.bundleId);if(V.clipboardGuard&&X==="click")await l(j,Q,!0);if(Rj(X,J))return null;if(J==="mouse_full"&&X==="click")return K(`Click at these coordinates would land on "${z.displayName}", `+'which is granted at tier "click" \u2014 right-click, middle-click, and '+'clicks with modifier keys require tier "full" (they can Paste via the context menu or fire modifier-chord keystrokes). Plain left_click is allowed here.'+I,"tier_insufficient");let Y=G(z.bundleId,z.displayName)==="browser";return K(`Click at these coordinates would land on "${z.displayName}", which is granted at tier "read" (screenshots only, no interaction). `+(Y?"Use the Claude-in-Chrome MCP for browser interaction.":"Ask the user to take any actions in this app themselves.")+I,"tier_insufficient")}function u(j){let Q=j.endsWith("==")?2:j.endsWith("=")?1:0;return Math.floor(j.length*3/4)-Q}async function FV(j,Q,V,Z){let $=await j.screenshot({allowedBundleIds:Q,displayId:Z});if(u($.base64)<Tj)V.warn(`[computer-use] screenshot implausibly small (${u($.base64)} bytes decoded), retrying once`),$=await j.screenshot({allowedBundleIds:Q,displayId:Z});return $}function WV(j){try{let Q=Intl.Segmenter;if(typeof Q==="function"){let V=new Q(void 0,{granularity:"grapheme"});return Array.from(V.segment(j),(Z)=>Z.segment)}}catch{}return Array.from(j)}function n(j){return new Promise((Q)=>setTimeout(Q,j))}function Dj(j){return j.split("+").map((Q)=>Q.trim()).filter(Boolean)}function zj(){_=!1,R=!1}async function h(j){if(!_)return;await j.executor.mouseUp(),_=!1,R=!1}function i(j){return j==="request_access"||j==="list_granted_applications"}function Zj(j){return PV.test(j)&&!j.includes(" ")}function OV(j,Q,V){let Z=new Map,$=new Map;for(let J of Q)$.set(J.bundleId,J),Z.set(J.displayName.toLowerCase(),J);return j.map((J)=>{let z;if(Zj(J))z=$.get(J);if(!z)z=Z.get(J.toLowerCase());let U=z?.bundleId,X=U??(Zj(J)?J:void 0);return{requestedName:J,resolved:z,isSentinel:U?Vj.has(U):!1,alreadyGranted:U?V.has(U):!1,proposedTier:v(X,z?.displayName??J)}})}async function fV(j,Q,V,Z){if(!V.onPermissionRequest)return K("This session was not wired with a permission handler. Computer control is not available here.","feature_unavailable");if(V.getTeachModeActive?.())return K("Cannot request additional permissions during teach mode \u2014 the permission dialog would be hidden. End teach mode (finish the tour or let the turn complete), then call request_access, then start a new tour.","teach_mode_conflict");let $=T(Q,"reason");if($ instanceof Error)return K($.message,"bad_args");if(Z){let H={requestId:c(),reason:$,apps:[],requestedFlags:{},screenshotFiltering:j.executor.capabilities.screenshotFiltering,tccState:Z};await V.onPermissionRequest(H);let w=await j.ensureOsPermissions();if(w.granted)return K("macOS Accessibility and Screen Recording are now both granted. "+"Call request_access again immediately \u2014 the next call will show "+"the app selection list.");let d=[];if(!w.accessibility)d.push("Accessibility");if(!w.screenRecording)d.push("Screen Recording");return K(`macOS ${d.join(" and ")} permission(s) not yet granted. The permission panel has been shown. Once the user grants the missing permission(s), call request_access again.`,"tcc_not_granted")}let J=Q.apps;if(!Array.isArray(J)||!J.every((H)=>typeof H==="string"))return K('"apps" must be an array of strings.',"bad_args");let z=J,U={};if(typeof Q.clipboardRead==="boolean")U.clipboardRead=Q.clipboardRead;if(typeof Q.clipboardWrite==="boolean")U.clipboardWrite=Q.clipboardWrite;if(typeof Q.systemKeyCombos==="boolean")U.systemKeyCombos=Q.systemKeyCombos;let{needDialog:X,skipDialogGrants:Y,willHide:W,tieredApps:F,userDenied:P,policyDenied:C}=await wj(j,z,V.allowedApps,new Set(V.userDeniedBundleIds),V.selectedDisplayId),O=[],M=[],A=V.grantFlags;if(X.length>0||Object.keys(U).length>0){let H={requestId:c(),reason:$,apps:X,requestedFlags:U,screenshotFiltering:j.executor.capabilities.screenshotFiltering,...W.length>0&&{willHide:W,autoUnhideEnabled:j.getAutoUnhideEnabled()}},w=await V.onPermissionRequest(H);O=w.granted,M=w.denied,A=w.flags}let k=[...Y,...O],N=new Set(k.map((H)=>H.bundleId)),f=F.filter((H)=>N.has(H.bundleId)),E=[];try{E=await CV(j,k)}catch(H){j.logger.warn(`[computer-use] buildWindowLocations failed: ${String(H)}`)}return q({granted:k,denied:M,...C.length>0&&{policyDenied:{apps:C,guidance:Jj(C)}},...P.length>0&&{userDenied:{apps:P,guidance:$j(P)}},...f.length>0&&{tierGuidance:Gj(f)},screenshotFiltering:j.executor.capabilities.screenshotFiltering,...E.length>0?{windowLocations:E}:{}},{granted_count:O.length,denied_count:M.length,...Ij(f)})}async function CV(j,Q){if(Q.length===0)return[];let V=await j.executor.listDisplays();if(V.length<=1)return[];let Z=Q.map((X)=>X.bundleId),$=await j.executor.findWindowDisplays(Z),J=new Map(V.map((X)=>[X.displayId,X])),z=new Map($.map((X)=>[X.bundleId,X.displayIds])),U=[];for(let X of Q){let Y=z.get(X.bundleId);if(!Y||Y.length===0)continue;U.push({bundleId:X.bundleId,displayName:X.displayName,displays:Y.map((W)=>{let F=J.get(W);return{id:W,label:F?.label,isPrimary:F?.isPrimary}})})}return U}async function wj(j,Q,V,Z,$){let J=new Set(V.map((f)=>f.bundleId)),z=await j.executor.listInstalledApps(),U=OV(Q,z,J),X=[],Y=[];for(let f of U){let E=f.resolved?.displayName??f.requestedName;if(x(f.resolved?.bundleId,E))X.push({requestedName:f.requestedName,displayName:E});else Y.push(f)}let W=[],F=[];for(let f of Y)if(f.resolved&&Z.has(f.resolved.bundleId))W.push({requestedName:f.requestedName,displayName:f.resolved.displayName});else F.push(f);let P=[];for(let f of F){if(f.proposedTier==="full"||!f.resolved)continue;P.push({bundleId:f.resolved.bundleId,displayName:f.resolved.displayName,tier:f.proposedTier})}let C=F.filter((f)=>f.alreadyGranted),O=F.filter((f)=>!f.alreadyGranted);for(let f of O){if(!f.resolved)continue;try{f.resolved.iconDataUrl=await j.executor.getAppIcon(f.resolved.path)}catch{}}let M=Date.now(),A=C.filter((f)=>f.resolved).map((f)=>{return V.find((H)=>H.bundleId===f.resolved.bundleId)??{bundleId:f.resolved.bundleId,displayName:f.resolved.displayName,grantedAt:M,tier:f.proposedTier}}),k=[...V.map((f)=>f.bundleId),...F.filter((f)=>f.resolved).map((f)=>f.resolved.bundleId)],N=await j.executor.previewHideSet(k,$);return{needDialog:O,skipDialogGrants:A,willHide:N,tieredApps:P,userDenied:W,policyDenied:X}}function Gj(j){let Q=j.filter((J)=>J.tier==="read"&&G(J.bundleId,J.displayName)==="browser"),V=j.filter((J)=>J.tier==="read"&&G(J.bundleId,J.displayName)!=="browser"),Z=j.filter((J)=>J.tier==="click"),$=[];if(Q.length>0){let J=Q.map((z)=>`"${z.displayName}"`).join(", ");$.push(`${J} ${Q.length===1?"is a browser":"are browsers"} \u2014 `+`granted at tier "read" (visible in screenshots only; no clicks or typing). You can read what's on screen but cannot navigate, click, or type into ${Q.length===1?"it":"them"}. For browser interaction, use the Claude-in-Chrome MCP (tools named \`mcp__Claude_in_Chrome__*\`; load via ToolSearch if deferred).`)}if(V.length>0){let J=V.map((z)=>`"${z.displayName}"`).join(", ");$.push(`${J} ${V.length===1?"is":"are"} granted at tier "read" (visible in screenshots only; no clicks or typing). You can read what's on screen but cannot interact. Ask the user to take any actions in ${V.length===1?"this app":"these apps"} themselves.`)}if(Z.length>0){let J=Z.map((z)=>`"${z.displayName}"`).join(", ");$.push(`${J} ${Z.length===1?"has":"have"} terminal or IDE `+'capabilities \u2014 granted at tier "click" (visible + plain left-click '+`only; NO typing, key presses, right-click, modifier-clicks, or drag-drop). You can click buttons and scroll output, but ${Z.length===1?"its":"their"} integrated terminal and editor are off-limits to keyboard input. Right-click (context-menu Paste) and dragging text onto ${Z.length===1?"it":"them"} require tier "full". For shell commands, use the Bash tool.`)}if($.length===0)return"";return $.join(`
2
+ import{fda as B}from"./cli-w1d8n9g3.js";function Kj(j,Q){return Math.floor((j-1)/Q)+1}function Wj(j,Q,V){return Kj(j,V)*Kj(Q,V)}function Pj(j,Q,V){let{pxPerToken:Z,maxTargetPx:$,maxTargetTokens:J}=V;if(j<=$&&Q<=$&&Wj(j,Q,Z)<=J)return[j,Q];if(Q>j){let[Y,W]=Pj(Q,j,V);return[W,Y]}let z=j/Q,U=j,X=1;for(;;){if(X+1===U)return[X,Math.max(Math.round(X/z),1)];let Y=Math.floor((X+U)/2),W=Math.max(Math.round(Y/z),1);if(Y<=$&&Wj(Y,W,Z)<=J)X=Y;else U=Y}}var nj;var Oj=B(()=>{nj={pxPerToken:28,maxTargetPx:1568,maxTargetTokens:1568}});function s(j,Q,V){let Z=ij[Q],$=V&&V.length>0?` Available applications on this machine: ${V.join(", ")}.`:"",J={type:"array",items:{type:"number"},minItems:2,maxItems:2,description:`(x, y): ${Z.x}`},z={type:"string",description:'Modifier keys to hold during the click (e.g. "shift", "ctrl+shift"). Supports the same syntax as the key tool.'},U=j.screenshotFiltering==="native"?"Take a screenshot of the primary display. Applications not in the session allowlist are excluded at the compositor level \u2014 only granted apps and the desktop are visible.":"Take a screenshot of the primary display. On this platform, screenshots are NOT filtered \u2014 all open windows are visible. Input actions targeting apps not in the session allowlist are rejected.";return[{name:"request_access",description:"Request user permission to control a set of applications for this session. Must be called before any other tool in this server. The user sees a single dialog listing all requested apps and either allows the whole set or denies it. Call this again mid-session to add more apps; previously granted apps remain granted. Returns the granted apps, denied apps, and screenshot filtering capability.",inputSchema:{type:"object",properties:{apps:{type:"array",items:{type:"string"},description:'Application display names (e.g. "Slack", "Calendar") or bundle identifiers (e.g. "com.tinyspeck.slackmacgap"). Display names are resolved case-insensitively against installed apps.'+$},reason:{type:"string",description:"One-sentence explanation shown to the user in the approval dialog. Explain the task, not the mechanism."},clipboardRead:{type:"boolean",description:"Also request permission to read the user's clipboard (separate checkbox in the dialog)."},clipboardWrite:{type:"boolean",description:"Also request permission to write the user's clipboard. When granted, multi-line `type` calls use the clipboard fast path."},systemKeyCombos:{type:"boolean",description:"Also request permission to send system-level key combos (quit app, switch app, lock screen). Without this, those specific combos are blocked."}},required:["apps","reason"]}},{name:"screenshot",description:U+" Returns an error if the allowlist is empty. The returned image is what subsequent click coordinates are relative to.",inputSchema:{type:"object",properties:{save_to_disk:{type:"boolean",description:"Save the image to disk so it can be attached to a message for the user. Returns the saved path in the tool result. Only set this when you intend to share the image \u2014 screenshots you're just looking at don't need saving."}},required:[]}},{name:"zoom",description:"Take a higher-resolution screenshot of a specific region of the last full-screen screenshot. Use this liberally to inspect small text, button labels, or fine UI details that are hard to read in the downsampled full-screen image. IMPORTANT: Coordinates in subsequent click calls always refer to the full-screen screenshot, never the zoomed image. This tool is read-only for inspecting detail.",inputSchema:{type:"object",properties:{region:{type:"array",items:{type:"integer"},minItems:4,maxItems:4,description:"(x0, y0, x1, y1): Rectangle to zoom into, in the coordinate space of the most recent full-screen screenshot. x0,y0 = top-left, x1,y1 = bottom-right."},save_to_disk:{type:"boolean",description:"Save the image to disk so it can be attached to a message for the user. Returns the saved path in the tool result. Only set this when you intend to share the image."}},required:["region"]}},{name:"left_click",description:"Left-click at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"double_click",description:"Double-click at the given coordinates. Selects a word in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"triple_click",description:"Triple-click at the given coordinates. Selects a line in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"right_click",description:"Right-click at the given coordinates. Opens a context menu in most applications. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"middle_click",description:"Middle-click (scroll-wheel click) at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,text:z},required:["coordinate"]}},{name:"type",description:"Type text into whatever currently has keyboard focus. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Newlines are supported. For keyboard shortcuts use `key` instead.",inputSchema:{type:"object",properties:{text:{type:"string",description:"Text to type."}},required:["text"]}},{name:"key",description:'Press a key or key combination (e.g. "return", "escape", "cmd+a", "ctrl+shift+tab"). The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. '+"System-level combos (quit app, switch app, lock screen) require the `systemKeyCombos` grant \u2014 without it they return an error. All other combos work.",inputSchema:{type:"object",properties:{text:{type:"string",description:'Modifiers joined with "+", e.g. "cmd+shift+a".'},repeat:{type:"integer",minimum:1,maximum:100,description:"Number of times to repeat the key press. Default is 1."}},required:["text"]}},{name:"scroll",description:"Scroll at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J,scroll_direction:{type:"string",enum:["up","down","left","right"],description:"Direction to scroll."},scroll_amount:{type:"integer",minimum:0,maximum:100,description:"Number of scroll ticks."}},required:["coordinate","scroll_direction","scroll_amount"]}},{name:"left_click_drag",description:"Press, move to target, and release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:{...J,description:`(x, y) end point: ${Z.x}`},start_coordinate:{...J,description:`(x, y) start point. If omitted, drags from the current cursor position. ${Z.x}`}},required:["coordinate"]}},{name:"mouse_move",description:"Move the mouse cursor without clicking. Useful for triggering hover states. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.",inputSchema:{type:"object",properties:{coordinate:J},required:["coordinate"]}},{name:"open_application",description:"Bring an application to the front, launching it if necessary. The target application must already be in the session allowlist \u2014 call request_access first.",inputSchema:{type:"object",properties:{app:{type:"string",description:'Display name (e.g. "Slack") or bundle identifier (e.g. "com.tinyspeck.slackmacgap").'}},required:["app"]}},{name:"switch_display",description:"Switch which monitor subsequent screenshots capture. Use this when the application you need is on a different monitor than the one shown. The screenshot tool tells you which monitor it captured and lists "+"other attached monitors by name \u2014 pass one of those names here. "+'After switching, call screenshot to see the new monitor. Pass "auto" to return to automatic monitor selection.',inputSchema:{type:"object",properties:{display:{type:"string",description:'Monitor name from the screenshot note (e.g. "Built-in Retina Display", "LG UltraFine"), or "auto" to re-enable automatic selection.'}},required:["display"]}},{name:"list_granted_applications",description:"List the applications currently in the session allowlist, plus the active grant flags and coordinate mode. No side effects.",inputSchema:{type:"object",properties:{},required:[]}},{name:"read_clipboard",description:"Read the current clipboard contents as text. Requires the `clipboardRead` grant.",inputSchema:{type:"object",properties:{},required:[]}},{name:"write_clipboard",description:"Write text to the clipboard. Requires the `clipboardWrite` grant.",inputSchema:{type:"object",properties:{text:{type:"string"}},required:["text"]}},{name:"wait",description:"Wait for a specified duration.",inputSchema:{type:"object",properties:{duration:{type:"number",description:"Duration in seconds (0\u2013100)."}},required:["duration"]}},{name:"cursor_position",description:"Get the current mouse cursor position. Returns image-pixel coordinates relative to the most recent screenshot, or logical points if no screenshot has been taken.",inputSchema:{type:"object",properties:{},required:[]}},{name:"hold_key",description:"Press and hold a key or key combination for the specified duration, then release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. System-level combos require the `systemKeyCombos` grant.",inputSchema:{type:"object",properties:{text:{type:"string",description:'Key or chord to hold, e.g. "space", "shift+down".'},duration:{type:"number",description:"Duration in seconds (0\u2013100)."}},required:["text","duration"]}},{name:"left_mouse_down",description:"Press the left mouse button at the current cursor position and leave it held. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Use mouse_move first to position the cursor. Call left_mouse_up to release. Errors if the button is already held.",inputSchema:{type:"object",properties:{},required:[]}},{name:"left_mouse_up",description:"Release the left mouse button at the current cursor position. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Pairs with left_mouse_down. Safe to call even if the button is not currently held.",inputSchema:{type:"object",properties:{},required:[]}},{name:"computer_batch",description:"Execute a sequence of actions in ONE tool call. Each individual tool call requires a model\u2192API round trip (seconds); "+"batching a predictable sequence eliminates all but one. Use this whenever you can predict the outcome of several actions ahead \u2014 "+`e.g. click a field, type into it, press Return. Actions execute sequentially and stop on the first error. ${"The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing."} The frontmost check runs before EACH action inside the batch \u2014 if an action opens a non-allowed app, the next action's gate fires and the batch stops there. `+"Mid-batch screenshot actions are allowed for inspection but coordinates in subsequent clicks always refer to the PRE-BATCH full-screen screenshot.",inputSchema:{type:"object",properties:{actions:{type:"array",minItems:1,items:fj,description:'List of actions. Example: [{"action":"left_click","coordinate":[100,200]},{"action":"type","text":"hello"},{"action":"key","text":"Return"}]'}},required:["actions"]}},...j.teachMode?oj(Z,$):[]]}function oj(j,Q){let V={explanation:{type:"string",description:"Tooltip body text. Explain what the user is looking at and why it matters. "+"This is the ONLY place the user sees your words \u2014 be complete but concise."},next_preview:{type:"string",description:`One line describing exactly what will happen when the user clicks Next. Example: "Next: I'll click Create Bucket and type the name." Shown below the explanation in a smaller font.`},anchor:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:`(x, y) \u2014 where the tooltip arrow points. ${j.x} Omit to center the tooltip with no arrow (for general-context steps).`},actions:{type:"array",items:fj,description:"Actions to execute when the user clicks Next. Same item schema as computer_batch.actions. Empty array is valid for purely explanatory steps. Actions run sequentially and stop on first error."}};return[{name:"request_teach_access",description:'Request permission to guide the user through a task step-by-step with on-screen tooltips. Use this INSTEAD OF request_access when the user wants to LEARN how to do something (phrases like "teach me", "walk me through", "show me how", "help me learn"). On approval the main Claude window hides and a fullscreen tooltip overlay appears. You then call teach_step repeatedly; each call shows one tooltip and waits for the user to click Next. Same app-allowlist semantics as request_access, but no clipboard/system-key flags. Teach mode ends automatically when your turn ends.',inputSchema:{type:"object",properties:{apps:{type:"array",items:{type:"string"},description:'Application display names (e.g. "Slack", "Calendar") or bundle identifiers. Resolved case-insensitively against installed apps.'+Q},reason:{type:"string",description:'What you will be teaching. Shown in the approval dialog as "Claude wants to guide you through {reason}". Keep it short and task-focused.'}},required:["apps","reason"]}},{name:"teach_step",description:"Show one guided-tour tooltip and wait for the user to click Next. On Next, execute the actions, "+"take a fresh screenshot, and return both \u2014 you do NOT need a separate screenshot call between steps. "+"The returned image shows the state after your actions ran; anchor the next teach_step against it. "+"IMPORTANT \u2014 the user only sees the tooltip during teach mode. Put ALL narration in `explanation`. "+"Text you emit outside teach_step calls is NOT visible until teach mode ends. "+"Pack as many actions as possible into each step's `actions` array \u2014 the user waits through "+"the whole round trip between clicks, so one step that fills a form beats five steps that fill one field each. "+"Returns {exited:true} if the user clicks Exit \u2014 do not call teach_step again after that. "+"Take an initial screenshot before your FIRST teach_step to anchor it.",inputSchema:{type:"object",properties:V,required:["explanation","next_preview","actions"]}},{name:"teach_batch",description:"Queue multiple teach steps in one tool call. Parallels computer_batch: "+"N steps \u2192 one model\u2194API round trip instead of N. Each step still shows a tooltip "+"and waits for the user's Next click, but YOU aren't waiting for a round trip between steps. "+"You can call teach_batch multiple times in one tour \u2014 treat each batch as one predictable "+"SEGMENT (typically: all the steps on one page). The returned screenshot shows the state after the batch's final actions; anchor the NEXT teach_batch against it. WITHIN a batch, all anchors and click coordinates refer to the PRE-BATCH screenshot "+"(same invariant as computer_batch) \u2014 for steps 2+ in a batch, either omit anchor "+"(centered tooltip) or target elements you know won't have moved. "+"Good pattern: batch 5 tooltips on page A (last step navigates) \u2192 read returned screenshot \u2192 "+"batch 3 tooltips on page B \u2192 done. "+"Returns {exited:true, stepsCompleted:N} if the user clicks Exit \u2014 do NOT call again after that; "+"{stepsCompleted, stepFailed, ...} if an action errors mid-batch; otherwise {stepsCompleted, results:[...]} plus a final screenshot. Fall back to individual teach_step calls when you need to react to each intermediate screenshot.",inputSchema:{type:"object",properties:{steps:{type:"array",minItems:1,items:{type:"object",properties:V,required:["explanation","next_preview","actions"]},description:"Ordered steps. Validated upfront \u2014 a typo in step 5 errors before any tooltip shows."}},required:["steps"]}}]}var ij,fj;var t=B(()=>{ij={pixels:{x:"Horizontal pixel position read directly from the most recent screenshot image, measured from the left edge. The server handles all scaling.",y:"Vertical pixel position read directly from the most recent screenshot image, measured from the top edge. The server handles all scaling."},normalized_0_100:{x:"Horizontal position as a percentage of screen width, 0.0\u2013100.0 (0 = left edge, 100 = right edge).",y:"Vertical position as a percentage of screen height, 0.0\u2013100.0 (0 = top edge, 100 = bottom edge)."}},fj={type:"object",properties:{action:{type:"string",enum:["key","type","mouse_move","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","hold_key","screenshot","cursor_position","left_mouse_down","left_mouse_up","wait"],description:"The action to perform."},coordinate:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"(x, y) for click/mouse_move/scroll/left_click_drag end point."},start_coordinate:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"(x, y) drag start \u2014 left_click_drag only. Omit to drag from current cursor."},text:{type:"string",description:"For type: the text. For key/hold_key: the chord string. For click/scroll: modifier keys to hold."},scroll_direction:{type:"string",enum:["up","down","left","right"]},scroll_amount:{type:"integer",minimum:0,maximum:100},duration:{type:"number",description:"Seconds (0\u2013100). For hold_key/wait."},repeat:{type:"integer",minimum:1,maximum:100,description:"For key: repeat count."}},required:["action"]}});function Cj(j){if(j==="browser"||j==="trading")return"read";if(j==="terminal")return"click";return"full"}function x(j,Q){if(j&&aj.has(j))return!0;let V=Q.toLowerCase();for(let Z of rj)if(V.includes(Z))return!0;return!1}function Mj(j){if(dj.has(j))return"browser";if(sj.has(j))return"terminal";if(tj.has(j))return"trading";return null}function Hj(j){let Q=j.toLowerCase();for(let V of VV)if(Q.includes(V))return"trading";for(let V of ej)if(Q.includes(V))return"browser";for(let V of jV)if(Q.includes(V))return"terminal";return null}function G(j,Q){if(j){let V=Mj(j);if(V)return V}return Hj(Q)}function v(j,Q){return Cj(G(j,Q))}var dj,sj,tj,aj,rj,ej,jV,VV;var a=B(()=>{dj=new Set(["com.apple.Safari","com.apple.SafariTechnologyPreview","com.google.Chrome","com.google.Chrome.beta","com.google.Chrome.dev","com.google.Chrome.canary","com.microsoft.edgemac","com.microsoft.edgemac.Beta","com.microsoft.edgemac.Dev","com.microsoft.edgemac.Canary","org.mozilla.firefox","org.mozilla.firefoxdeveloperedition","org.mozilla.nightly","org.chromium.Chromium","com.brave.Browser","com.brave.Browser.beta","com.brave.Browser.nightly","com.operasoftware.Opera","com.operasoftware.OperaGX","com.operasoftware.OperaDeveloper","com.vivaldi.Vivaldi","company.thebrowser.Browser","company.thebrowser.dia","org.torproject.torbrowser","com.duckduckgo.macos.browser","ru.yandex.desktop.yandex-browser","ai.perplexity.comet","com.sigmaos.sigmaos.macos","com.kagi.kagimacOS"]),sj=new Set(["com.apple.Terminal","com.googlecode.iterm2","dev.warp.Warp-Stable","dev.warp.Warp-Beta","com.github.wez.wezterm","org.alacritty","io.alacritty","net.kovidgoyal.kitty","co.zeit.hyper","com.mitchellh.ghostty","org.tabby","com.termius-dmg.mac","com.microsoft.VSCode","com.microsoft.VSCodeInsiders","com.vscodium","com.todesktop.230313mzl4w4u92","com.exafunction.windsurf","dev.zed.Zed","dev.zed.Zed-Preview","com.jetbrains.intellij","com.jetbrains.intellij.ce","com.jetbrains.pycharm","com.jetbrains.pycharm.ce","com.jetbrains.WebStorm","com.jetbrains.CLion","com.jetbrains.goland","com.jetbrains.rubymine","com.jetbrains.PhpStorm","com.jetbrains.datagrip","com.jetbrains.rider","com.jetbrains.AppCode","com.jetbrains.rustrover","com.jetbrains.fleet","com.google.android.studio","com.axosoft.gitkraken","com.sublimetext.4","com.sublimetext.3","org.vim.MacVim","com.neovim.neovim","org.gnu.Emacs","com.apple.dt.Xcode","org.eclipse.platform.ide","org.netbeans.ide","com.microsoft.visual-studio","com.apple.ScriptEditor2","com.apple.Automator","com.apple.shortcuts"]),tj=new Set(["com.webull.desktop.v1","com.webull.trade.mac.v1","com.tastytrade.desktop","com.tradingview.tradingviewapp.desktop","com.fidelity.activetrader","com.fmr.activetrader","com.install4j.5889-6375-8446-2021","com.binance.BinanceDesktop","com.electron.exodus","org.pythonmac.unspecified.Electrum","com.ledger.live","io.trezor.TrezorSuite"]),aj=new Set(["com.apple.TV","com.apple.Music","com.apple.iBooksX","com.apple.podcasts","com.spotify.client","com.amazon.music","com.tidal.desktop","com.deezer.deezer-desktop","com.pandora.desktop","com.electron.pocket-casts","au.com.shiftyjelly.PocketCasts","tv.plex.desktop","tv.plex.htpc","tv.plex.plexamp","com.amazon.aiv.AIVApp","net.kovidgoyal.calibre","com.amazon.Kindle","com.amazon.Lassen","com.kobo.desktop.Kobo"]),rj=["netflix","disney+","hulu","prime video","apple tv","peacock","paramount+","tubi","crunchyroll","vudu","kindle","apple books","kobo","play books","calibre","libby","readium","audible","libro.fm","speechify","spotify","apple music","amazon music","youtube music","tidal","deezer","pandora","pocket casts","naver","reddit","sony music","vegas pro","pitchfork","economist","nytimes"];ej=["safari","chrome","firefox","microsoft edge","brave","opera","vivaldi","chromium","arc browser","tor browser","duckduckgo","yandex","orion browser","comet","sigmaos","dia browser"],jV=["terminal","iterm","wezterm","alacritty","kitty","ghostty","tabby","termius","script editor","automator","powershell","cmd.exe","command prompt","git bash","conemu","cmder","visual studio code","visual studio","vscode","vs code","vscodium","cursor","windsurf","intellij","pycharm","webstorm","clion","goland","rubymine","phpstorm","datagrip","rider","appcode","rustrover","fleet","android studio","sublime text","macvim","neovim","emacs","xcode","eclipse","netbeans"],VV=["bloomberg","ameritrade","thinkorswim","schwab","fidelity","e*trade","interactive brokers","trader workstation","tradestation","webull","robinhood","tastytrade","ninjatrader","tradingview","moomoo","tradezero","prorealtime","plus500","saxotrader","oanda","metatrader","forex.com","avaoptions","ctrader","jforex","iq option","olymp trade","binomo","pocket option","raceoption","expertoption","quotex","naga","morgan stanley","ubs neo","eikon","coinbase","kraken","binance","okx","bybit","phemex","stormgain","crypto.com","electrum","ledger live","trezor","guarda","atomic wallet","bitpay","bisq","koinly","cointracker","blockfi","stripe cli","decentraland","axie infinity","gods unchained"]});function JV(j){let Q=j.toLowerCase().split("+").map((J)=>J.trim()).filter(Boolean),V=[],Z=[];for(let J of Q){let z=QV[J];if(z!==void 0)V.push(z);else Z.push(J)}let $=[...new Set(V)];return $.sort((J,z)=>qj.indexOf(J)-qj.indexOf(z)),{mods:$,keys:Z}}function b(j,Q){let V=Q==="darwin"?ZV:$V,{mods:Z,keys:$}=JV(j),J=Z.length>0?Z.join("+")+"+":"";if($.length===0)return V.has(Z.join("+"));for(let z of $)if(V.has(J+z))return!0;return!1}var QV,qj,ZV,$V;var r=B(()=>{QV={meta:"meta",super:"meta",command:"meta",cmd:"meta",windows:"meta",win:"meta",ctrl:"ctrl",control:"ctrl",lctrl:"ctrl",lcontrol:"ctrl",rctrl:"ctrl",rcontrol:"ctrl",shift:"shift",lshift:"shift",rshift:"shift",alt:"alt",option:"alt"},qj=["ctrl","alt","shift","meta"],ZV=new Set(["meta+q","shift+meta+q","alt+meta+escape","meta+tab","meta+space","ctrl+meta+q"]),$V=new Set(["ctrl+alt+delete","alt+f4","alt+tab","meta+l","meta+d"])});function zV(j,Q,V,Z,$){if(!j||!Q)return null;let J=Math.max(0,Math.min(100,V)),z=Math.max(0,Math.min(100,Z)),U=Math.round(J/100*j),X=Math.round(z/100*Q),Y=Math.floor($/2),W=Math.max(0,U-Y),F=Math.max(0,X-Y),P=Math.min($,j-W),C=Math.min($,Q-F);if(P<=0||C<=0)return null;return{x:W,y:F,width:P,height:C}}function Lj(j,Q,V,Z,$,J=9){let z=zV(V.width,V.height,Z,$,J);if(!z)return!1;let U=j(Q.base64,z),X=j(V.base64,z);if(!U||!X)return!1;return U.equals(X)}async function e(j,Q,V,Z,$,J,z=9){if(!Q)return{valid:!0,skipped:!0};try{let U=await $();if(!U)return{valid:!0,skipped:!0};if(Lj(j,Q,U,V,Z,z))return{valid:!0,skipped:!1};return{valid:!1,skipped:!1,warning:"Screen content at the target location changed since the last screenshot. Take a new screenshot before clicking."}}catch(U){return J.debug("[pixelCompare] validation error, skipping",U),{valid:!0,skipped:!0}}}var jj=()=>{};function XV(j){if(_j.has(j))return"shell";if(Ej.has(j))return"filesystem";if(Aj.has(j))return"system_settings";return null}var _j,Ej,Aj,Vj;var Qj=B(()=>{_j=new Set(["com.apple.Terminal","com.googlecode.iterm2","com.microsoft.VSCode","dev.warp.Warp-Stable","com.github.wez.wezterm","io.alacritty","net.kovidgoyal.kitty","com.jetbrains.intellij","com.jetbrains.pycharm"]),Ej=new Set(["com.apple.finder"]),Aj=new Set(["com.apple.systempreferences"]),Vj=new Set([..._j,...Ej,...Aj])});import{randomUUID as c}from"crypto";function K(j,Q){return{content:[{type:"text",text:j}],isError:!0,telemetry:Q?{error_kind:Q}:void 0}}function L(j){return{content:[{type:"text",text:j}]}}function q(j,Q){return{content:[{type:"text",text:JSON.stringify(j)}],telemetry:Q}}function UV(j){if(typeof j==="object"&&j!==null)return j;return{}}function T(j,Q){let V=j[Q];if(typeof V!=="string")return Error(`"${Q}" must be a string.`);return V}function g(j,Q="coordinate"){let V=j[Q];if(V===void 0)return Error(`${Q} is required`);if(!Array.isArray(V)||V.length!==2)return Error(`${Q} must be an array of length 2`);let[Z,$]=V;if(typeof Z!=="number"||typeof $!=="number"||Z<0||$<0)return Error(`${Q} must be a tuple of non-negative numbers`);return[Z,$]}function S(j,Q,V,Z,$,J){if(V==="normalized_0_100")return{x:Math.round(j/100*Z.width)+Z.originX,y:Math.round(Q/100*Z.height)+Z.originY};if($)return{x:Math.round(j*($.displayWidth/$.width))+$.originX,y:Math.round(Q*($.displayHeight/$.height))+$.originY};return J.warn("[computer-use] pixels-mode coordinate received with no prior screenshot; falling back to /scaleFactor. Click may be off if downsample is active."),{x:Math.round(j/Z.scaleFactor)+Z.originX,y:Math.round(Q/Z.scaleFactor)+Z.originY}}function YV(j,Q,V,Z){if(V==="normalized_0_100")return{xPct:j,yPct:Q};if(!Z)return{xPct:0,yPct:0};return{xPct:j/Z.width*100,yPct:Q/Z.height*100}}function Rj(j,Q){let V=j??"full";if(Q==="mouse_position")return!0;if(Q==="keyboard"||Q==="mouse_full")return V==="full";return V==="click"||V==="full"}async function l(j,Q,V){let Z=Q.getClipboardStash?.();if(!V){if(Z===void 0)return;try{await j.executor.writeClipboard(Z),Q.onClipboardStashChanged?.(void 0)}catch{}return}if(Z===void 0)try{let $=await j.executor.readClipboard();Q.onClipboardStashChanged?.($)}catch{Q.onClipboardStashChanged?.("")}try{await j.executor.writeClipboard("")}catch{}}async function D(j,Q,V,Z){if(V.hideBeforeAction){let X=await j.executor.prepareForAction(Q.allowedApps.map((Y)=>Y.bundleId),Q.selectedDisplayId);if(X.length>0)Q.onAppsHidden?.(X)}let $=await j.executor.getFrontmostApp(),J=new Map(Q.allowedApps.map((X)=>[X.bundleId,X.tier])),z=$?J.get($.bundleId):void 0;if(V.clipboardGuard)await l(j,Q,z==="click");if(!$)return null;let{hostBundleId:U}=j.executor.capabilities;if(z!==void 0){if(Rj(z,Z))return null;if(z==="read"){let X=G($.bundleId,$.displayName)==="browser";return K(`"${$.displayName}" is granted at tier "read" \u2014 `+"visible in screenshots only, no clicks or typing."+(X?" Use the Claude-in-Chrome MCP for browser interaction (tools named `mcp__Claude_in_Chrome__*`; load via ToolSearch if deferred).":" No interaction is permitted; ask the user to take any actions in this app themselves.")+I,"tier_insufficient")}if(Z==="keyboard")return K(`"${$.displayName}" is granted at tier "click" \u2014 `+`typing, key presses, and paste require tier "full". The keys would go to this app's text fields or integrated terminal. To type into a different app, click it first to bring it forward. For shell commands, use the Bash tool.`+I,"tier_insufficient");return K(`"${$.displayName}" is granted at tier "click" \u2014 `+'right-click, middle-click, and clicks with modifier keys require tier "full". Right-click opens a context menu with Paste/Cut, and modifier chords fire as keystrokes before the click. Plain left_click is allowed here.'+I,"tier_insufficient")}if($.bundleId===Bj)return null;if($.bundleId===U){if(Z!=="keyboard")return null;return K("Claude's own window still has keyboard focus. This should not happen after the pre-action defocus. Click on the target application first.","state_conflict")}return K(`"${$.displayName}" is not in the allowed applications and is `+"currently in front. Take a new screenshot \u2014 it may have appeared "+"since your last one.","app_not_granted")}async function y(j,Q,V,Z,$,J){let z=await j.executor.appUnderPoint(Z,$);if(!z)return null;if(z.bundleId===Bj)return null;let U=new Map(Q.allowedApps.map((W)=>[W.bundleId,W.tier]));if(!U.has(z.bundleId))return K(`Click at these coordinates would land on "${z.displayName}", which is not in the allowed applications. Take a fresh screenshot to see the current window layout.`,"app_not_granted");let X=U.get(z.bundleId);if(V.clipboardGuard&&X==="click")await l(j,Q,!0);if(Rj(X,J))return null;if(J==="mouse_full"&&X==="click")return K(`Click at these coordinates would land on "${z.displayName}", `+'which is granted at tier "click" \u2014 right-click, middle-click, and '+'clicks with modifier keys require tier "full" (they can Paste via the context menu or fire modifier-chord keystrokes). Plain left_click is allowed here.'+I,"tier_insufficient");let Y=G(z.bundleId,z.displayName)==="browser";return K(`Click at these coordinates would land on "${z.displayName}", which is granted at tier "read" (screenshots only, no interaction). `+(Y?"Use the Claude-in-Chrome MCP for browser interaction.":"Ask the user to take any actions in this app themselves.")+I,"tier_insufficient")}function u(j){let Q=j.endsWith("==")?2:j.endsWith("=")?1:0;return Math.floor(j.length*3/4)-Q}async function FV(j,Q,V,Z){let $=await j.screenshot({allowedBundleIds:Q,displayId:Z});if(u($.base64)<Tj)V.warn(`[computer-use] screenshot implausibly small (${u($.base64)} bytes decoded), retrying once`),$=await j.screenshot({allowedBundleIds:Q,displayId:Z});return $}function WV(j){try{let Q=Intl.Segmenter;if(typeof Q==="function"){let V=new Q(void 0,{granularity:"grapheme"});return Array.from(V.segment(j),(Z)=>Z.segment)}}catch{}return Array.from(j)}function n(j){return new Promise((Q)=>setTimeout(Q,j))}function Dj(j){return j.split("+").map((Q)=>Q.trim()).filter(Boolean)}function zj(){_=!1,R=!1}async function h(j){if(!_)return;await j.executor.mouseUp(),_=!1,R=!1}function i(j){return j==="request_access"||j==="list_granted_applications"}function Zj(j){return PV.test(j)&&!j.includes(" ")}function OV(j,Q,V){let Z=new Map,$=new Map;for(let J of Q)$.set(J.bundleId,J),Z.set(J.displayName.toLowerCase(),J);return j.map((J)=>{let z;if(Zj(J))z=$.get(J);if(!z)z=Z.get(J.toLowerCase());let U=z?.bundleId,X=U??(Zj(J)?J:void 0);return{requestedName:J,resolved:z,isSentinel:U?Vj.has(U):!1,alreadyGranted:U?V.has(U):!1,proposedTier:v(X,z?.displayName??J)}})}async function fV(j,Q,V,Z){if(!V.onPermissionRequest)return K("This session was not wired with a permission handler. Computer control is not available here.","feature_unavailable");if(V.getTeachModeActive?.())return K("Cannot request additional permissions during teach mode \u2014 the permission dialog would be hidden. End teach mode (finish the tour or let the turn complete), then call request_access, then start a new tour.","teach_mode_conflict");let $=T(Q,"reason");if($ instanceof Error)return K($.message,"bad_args");if(Z){let H={requestId:c(),reason:$,apps:[],requestedFlags:{},screenshotFiltering:j.executor.capabilities.screenshotFiltering,tccState:Z};await V.onPermissionRequest(H);let w=await j.ensureOsPermissions();if(w.granted)return K("macOS Accessibility and Screen Recording are now both granted. "+"Call request_access again immediately \u2014 the next call will show "+"the app selection list.");let d=[];if(!w.accessibility)d.push("Accessibility");if(!w.screenRecording)d.push("Screen Recording");return K(`macOS ${d.join(" and ")} permission(s) not yet granted. The permission panel has been shown. Once the user grants the missing permission(s), call request_access again.`,"tcc_not_granted")}let J=Q.apps;if(!Array.isArray(J)||!J.every((H)=>typeof H==="string"))return K('"apps" must be an array of strings.',"bad_args");let z=J,U={};if(typeof Q.clipboardRead==="boolean")U.clipboardRead=Q.clipboardRead;if(typeof Q.clipboardWrite==="boolean")U.clipboardWrite=Q.clipboardWrite;if(typeof Q.systemKeyCombos==="boolean")U.systemKeyCombos=Q.systemKeyCombos;let{needDialog:X,skipDialogGrants:Y,willHide:W,tieredApps:F,userDenied:P,policyDenied:C}=await wj(j,z,V.allowedApps,new Set(V.userDeniedBundleIds),V.selectedDisplayId),O=[],M=[],A=V.grantFlags;if(X.length>0||Object.keys(U).length>0){let H={requestId:c(),reason:$,apps:X,requestedFlags:U,screenshotFiltering:j.executor.capabilities.screenshotFiltering,...W.length>0&&{willHide:W,autoUnhideEnabled:j.getAutoUnhideEnabled()}},w=await V.onPermissionRequest(H);O=w.granted,M=w.denied,A=w.flags}let k=[...Y,...O],N=new Set(k.map((H)=>H.bundleId)),f=F.filter((H)=>N.has(H.bundleId)),E=[];try{E=await CV(j,k)}catch(H){j.logger.warn(`[computer-use] buildWindowLocations failed: ${String(H)}`)}return q({granted:k,denied:M,...C.length>0&&{policyDenied:{apps:C,guidance:Jj(C)}},...P.length>0&&{userDenied:{apps:P,guidance:$j(P)}},...f.length>0&&{tierGuidance:Gj(f)},screenshotFiltering:j.executor.capabilities.screenshotFiltering,...E.length>0?{windowLocations:E}:{}},{granted_count:O.length,denied_count:M.length,...Ij(f)})}async function CV(j,Q){if(Q.length===0)return[];let V=await j.executor.listDisplays();if(V.length<=1)return[];let Z=Q.map((X)=>X.bundleId),$=await j.executor.findWindowDisplays(Z),J=new Map(V.map((X)=>[X.displayId,X])),z=new Map($.map((X)=>[X.bundleId,X.displayIds])),U=[];for(let X of Q){let Y=z.get(X.bundleId);if(!Y||Y.length===0)continue;U.push({bundleId:X.bundleId,displayName:X.displayName,displays:Y.map((W)=>{let F=J.get(W);return{id:W,label:F?.label,isPrimary:F?.isPrimary}})})}return U}async function wj(j,Q,V,Z,$){let J=new Set(V.map((f)=>f.bundleId)),z=await j.executor.listInstalledApps(),U=OV(Q,z,J),X=[],Y=[];for(let f of U){let E=f.resolved?.displayName??f.requestedName;if(x(f.resolved?.bundleId,E))X.push({requestedName:f.requestedName,displayName:E});else Y.push(f)}let W=[],F=[];for(let f of Y)if(f.resolved&&Z.has(f.resolved.bundleId))W.push({requestedName:f.requestedName,displayName:f.resolved.displayName});else F.push(f);let P=[];for(let f of F){if(f.proposedTier==="full"||!f.resolved)continue;P.push({bundleId:f.resolved.bundleId,displayName:f.resolved.displayName,tier:f.proposedTier})}let C=F.filter((f)=>f.alreadyGranted),O=F.filter((f)=>!f.alreadyGranted);for(let f of O){if(!f.resolved)continue;try{f.resolved.iconDataUrl=await j.executor.getAppIcon(f.resolved.path)}catch{}}let M=Date.now(),A=C.filter((f)=>f.resolved).map((f)=>{return V.find((H)=>H.bundleId===f.resolved.bundleId)??{bundleId:f.resolved.bundleId,displayName:f.resolved.displayName,grantedAt:M,tier:f.proposedTier}}),k=[...V.map((f)=>f.bundleId),...F.filter((f)=>f.resolved).map((f)=>f.resolved.bundleId)],N=await j.executor.previewHideSet(k,$);return{needDialog:O,skipDialogGrants:A,willHide:N,tieredApps:P,userDenied:W,policyDenied:X}}function Gj(j){let Q=j.filter((J)=>J.tier==="read"&&G(J.bundleId,J.displayName)==="browser"),V=j.filter((J)=>J.tier==="read"&&G(J.bundleId,J.displayName)!=="browser"),Z=j.filter((J)=>J.tier==="click"),$=[];if(Q.length>0){let J=Q.map((z)=>`"${z.displayName}"`).join(", ");$.push(`${J} ${Q.length===1?"is a browser":"are browsers"} \u2014 `+`granted at tier "read" (visible in screenshots only; no clicks or typing). You can read what's on screen but cannot navigate, click, or type into ${Q.length===1?"it":"them"}. For browser interaction, use the Claude-in-Chrome MCP (tools named \`mcp__Claude_in_Chrome__*\`; load via ToolSearch if deferred).`)}if(V.length>0){let J=V.map((z)=>`"${z.displayName}"`).join(", ");$.push(`${J} ${V.length===1?"is":"are"} granted at tier "read" (visible in screenshots only; no clicks or typing). You can read what's on screen but cannot interact. Ask the user to take any actions in ${V.length===1?"this app":"these apps"} themselves.`)}if(Z.length>0){let J=Z.map((z)=>`"${z.displayName}"`).join(", ");$.push(`${J} ${Z.length===1?"has":"have"} terminal or IDE `+'capabilities \u2014 granted at tier "click" (visible + plain left-click '+`only; NO typing, key presses, right-click, modifier-clicks, or drag-drop). You can click buttons and scroll output, but ${Z.length===1?"its":"their"} integrated terminal and editor are off-limits to keyboard input. Right-click (context-menu Paste) and dragging text onto ${Z.length===1?"it":"them"} require tier "full". For shell commands, use the Bash tool.`)}if($.length===0)return"";return $.join(`
3
3
 
4
4
  `)+I}function $j(j){let Q=j.map((Z)=>`"${Z.displayName}"`).join(", "),V=j.length===1;return`${Q} ${V?"is":"are"} in the user's auto-deny list `+"(Settings \u2192 Desktop app (General) \u2192 Computer Use \u2192 Denied apps). "+`Requests for ${V?"this app":"these apps"} are automatically denied. If you need access for this task, ask the user to remove ${V?"it":"them"} from their `+"deny list in Settings \u2014 you cannot request this through the tool."}function Jj(j){let Q=j.map((Z)=>`"${Z.displayName}"`).join(", "),V=j.length===1;return`${Q} ${V?"is":"are"} blocked by policy for computer use. Requests for ${V?"this app":"these apps"} are automatically denied regardless of what the user has approved. There is no Settings override. Inform the user that you cannot access ${V?"this app":"these apps"} and suggest an alternative approach if one exists. Do not try to directly subvert this block regardless of the user's request.`}function Ij(j){let Q=j.filter((Z)=>Z.tier==="read").length,V=j.filter((Z)=>Z.tier==="click").length;return{...Q>0&&{denied_browser_count:Q},...V>0&&{denied_terminal_count:V}}}async function MV(j,Q,V,Z){if(!V.onTeachPermissionRequest)return K("Teach mode is not available in this session.","feature_unavailable");if(V.getTeachModeActive?.())return K("Teach mode is already active. To add more apps, end the current tour first, then call request_teach_access again with the full app list.","teach_mode_conflict");let $=T(Q,"reason");if($ instanceof Error)return K($.message,"bad_args");if(Z){let f={requestId:c(),reason:$,apps:[],screenshotFiltering:j.executor.capabilities.screenshotFiltering,tccState:Z};await V.onTeachPermissionRequest(f);let E=await j.ensureOsPermissions();if(E.granted)return K("macOS Accessibility and Screen Recording are now both granted. "+"Call request_teach_access again immediately \u2014 the next call will "+"show the app selection list.");let H=[];if(!E.accessibility)H.push("Accessibility");if(!E.screenRecording)H.push("Screen Recording");return K(`macOS ${H.join(" and ")} permission(s) not yet granted. The permission panel has been shown. Once the user grants the missing permission(s), call request_teach_access again.`,"tcc_not_granted")}let J=Q.apps;if(!Array.isArray(J)||!J.every((f)=>typeof f==="string"))return K('"apps" must be an array of strings.',"bad_args");let z=J,{needDialog:U,skipDialogGrants:X,willHide:Y,tieredApps:W,userDenied:F,policyDenied:P}=await wj(j,z,V.allowedApps,new Set(V.userDeniedBundleIds),V.selectedDisplayId);if(U.length===0&&X.length===0)return q({granted:[],denied:[],...P.length>0&&{policyDenied:{apps:P,guidance:Jj(P)}},...F.length>0&&{userDenied:{apps:F,guidance:$j(F)}},teachModeActive:!1,screenshotFiltering:j.executor.capabilities.screenshotFiltering},{granted_count:0,denied_count:0});let C={requestId:c(),reason:$,apps:U,screenshotFiltering:j.executor.capabilities.screenshotFiltering,...Y.length>0&&{willHide:Y,autoUnhideEnabled:j.getAutoUnhideEnabled()}},O=await V.onTeachPermissionRequest(C),M=[...X,...O.granted],A=O.userConsented===!0&&M.length>0;if(A)V.onTeachModeActivated?.();let k=new Set(M.map((f)=>f.bundleId)),N=W.filter((f)=>k.has(f.bundleId));return q({granted:M,denied:O.denied,...P.length>0&&{policyDenied:{apps:P,guidance:Jj(P)}},...F.length>0&&{userDenied:{apps:F,guidance:$j(F)}},...N.length>0&&{tierGuidance:Gj(N)},teachModeActive:A,screenshotFiltering:j.executor.capabilities.screenshotFiltering},{granted_count:O.granted.length,denied_count:O.denied.length,...Ij(N)})}async function yj(j,Q,V,Z){let $=T(j,"explanation");if($ instanceof Error)return Error(`${Z}: ${$.message}`);let J=T(j,"next_preview");if(J instanceof Error)return Error(`${Z}: ${J.message}`);let z=j.actions;if(!Array.isArray(z))return Error(`${Z}: "actions" must be an array (empty is allowed).`);for(let[X,Y]of z.entries()){if(typeof Y!=="object"||Y===null)return Error(`${Z}: actions[${X}] must be an object`);let W=Y.action;if(typeof W!=="string")return Error(`${Z}: actions[${X}].action must be a string`);if(!p.has(W))return Error(`${Z}: actions[${X}].action="${W}" is not allowed. Allowed: ${[...p].join(", ")}.`)}let U;if(j.anchor!==void 0){let X=j.anchor;if(!Array.isArray(X)||X.length!==2||typeof X[0]!=="number"||typeof X[1]!=="number"||!Number.isFinite(X[0])||!Number.isFinite(X[1]))return Error(`${Z}: "anchor" must be a [x, y] number tuple or omitted.`);let Y=await Q.executor.getDisplaySize(V.selectedDisplayId);U=S(X[0],X[1],V.coordinateMode,Y,V.lastScreenshot,Q.logger)}return{explanation:$,nextPreview:J,anchorLogical:U,actions:z}}async function Sj(j,Q,V,Z){if((await V.onTeachStep({explanation:j.explanation,nextPreview:j.nextPreview,anchorLogical:j.anchorLogical})).action==="exit")return await h(Q),{kind:"exit"};if(V.onTeachWorking?.(),j.actions.length===0)return{kind:"ok",results:[]};if(Z.hideBeforeAction){let U=await Q.executor.prepareForAction(V.allowedApps.map((X)=>X.bundleId),V.selectedDisplayId);if(U.length>0)V.onAppsHidden?.(U)}let J={...Z,hideBeforeAction:!1,pixelValidation:!1,autoTargetDisplay:!1},z=[];for(let[U,X]of j.actions.entries()){if(V.isAborted?.())return await h(Q),{kind:"exit"};if(U>0)await n(10);let Y=X.action,{screenshot:W,...F}=await Xj(Y,X,Q,V,J),P=hj(F),C={action:Y,ok:!F.isError,output:P};if(z.push(C),F.isError)return await h(Q),{kind:"action_error",executed:z.length-1,failed:C,remaining:j.actions.length-z.length,telemetry:F.telemetry}}return{kind:"ok",results:z}}async function xj(j,Q,V,Z){let $=await mj(Q,V,Z);if($.isError)return q(j);return{content:[{type:"text",text:JSON.stringify(j)},...$.content],screenshot:$.screenshot}}async function HV(j,Q,V,Z){if(!V.onTeachStep)return K("Teach mode is not active. Call request_teach_access first.","teach_mode_not_active");let $=await yj(Q,j,V,"teach_step");if($ instanceof Error)return K($.message,"bad_args");let J=await Sj($,j,V,Z);if(J.kind==="exit")return q({exited:!0});if(J.kind==="action_error")return q({executed:J.executed,failed:J.failed,remaining:J.remaining},J.telemetry);if($.actions.length===0)return q({executed:0,results:[]});return xj({executed:J.results.length,results:J.results},j,V,Z)}async function qV(j,Q,V,Z){if(!V.onTeachStep)return K("Teach mode is not active. Call request_teach_access first.","teach_mode_not_active");let $=Q.steps;if(!Array.isArray($)||$.length<1)return K('"steps" must be a non-empty array.',"bad_args");let J=[];for(let[Y,W]of $.entries()){if(typeof W!=="object"||W===null)return K(`steps[${Y}] must be an object`,"bad_args");let F=await yj(W,j,V,`steps[${Y}]`);if(F instanceof Error)return K(F.message,"bad_args");J.push(F)}let z=[];for(let[Y,W]of J.entries()){let F=await Sj(W,j,V,Z);if(F.kind==="exit")return q({exited:!0,stepsCompleted:Y});if(F.kind==="action_error")return q({stepsCompleted:Y,stepFailed:Y,executed:F.executed,failed:F.failed,remaining:F.remaining,results:z},F.telemetry);z.push(F.results)}let U=J.some((Y)=>Y.actions.length>0),X={stepsCompleted:J.length,results:z};if(!U)return q(X);return xj(X,j,V,Z)}async function kj(j,Q){if(Q.length===0)return;let V=await j.executor.listRunningApps(),Z=new Map(V.map((U)=>[U.bundleId,U.displayName])),$=Q.map((U)=>Z.get(U)??U),J=$.map((U)=>`"${U}"`).join(", "),z=$.length===1;return`${J} ${z?"was":"were"} open and got hidden before this screenshot (not in the session allowlist). If a previous action was meant to open ${z?"it":"one of them"}, that's why you don't see it \u2014 call `+`request_access to add ${z?"it":"them"} to the allowlist.`}function bj(j){let Q=[...j].sort(($,J)=>$.displayId-J.displayId),V=new Map,Z=new Map;for(let $ of Q){let J=$.label??`display ${$.displayId}`,z=(V.get(J)??0)+1;V.set(J,z),Z.set($.displayId,z===1?J:`${J} (${z})`)}return Z}async function Nj(j,Q,V,Z){let $;try{$=await j.executor.listDisplays()}catch(F){j.logger.warn(`[computer-use] listDisplays failed: ${String(F)}`);return}if($.length<2)return;let J=bj($),z=(F)=>J.get(F)??`display ${F}`,U=z(Q),X=$.filter((F)=>F.displayId!==Q).map((F)=>z(F.displayId)),Y=Z?" Use switch_display to capture a different monitor.":"",W=X.length>0?` Other attached monitors: ${X.map((F)=>`"${F}"`).join(", ")}.`+Y:"";if(V===void 0||V===0)return`This screenshot was taken on monitor "${U}".`+W;if(V!==Q){let F=z(V);return`This screenshot was taken on monitor "${U}", which is different from your previous screenshot (taken on "${F}").`+W}return}async function mj(j,Q,V){if(Q.allowedApps.length===0)return K("No applications are granted for this session. Call request_access first.","allowlist_empty");if(V.autoTargetDisplay){let X=Q.allowedApps.map((k)=>k.bundleId),Y=X.slice().sort().join(","),W=Y!==Q.displayResolvedForApps,F=!Q.displayPinnedByModel&&W,P=await j.executor.resolvePrepareCapture({allowedBundleIds:X,preferredDisplayId:Q.selectedDisplayId,autoResolve:F,doHide:V.hideBeforeAction});if(P.captureError===void 0&&u(P.base64)<Tj)j.logger.warn(`[computer-use] resolvePrepareCapture result implausibly small (${u(P.base64)} bytes decoded) \u2014 possible transient display state`);if(P.displayId!==Q.selectedDisplayId)j.logger.debug(`[computer-use] resolver: preferred=${Q.selectedDisplayId} resolved=${P.displayId}`),Q.onResolvedDisplayUpdated?.(P.displayId);if(F)Q.onDisplayResolvedForApps?.(Y);let C=[];if(Q.lastScreenshot!==void 0)C=P.hidden;if(P.hidden.length>0)Q.onAppsHidden?.(P.hidden);if(P.captureError!==void 0)return K(P.captureError,"capture_failed");let O=await kj(j,C),M={base64:P.base64,width:P.width,height:P.height,displayWidth:P.displayWidth,displayHeight:P.displayHeight,displayId:P.displayId,originX:P.originX,originY:P.originY},A=await Nj(j,M.displayId,Q.lastScreenshot?.displayId,Q.onDisplayPinned!==void 0);return{content:[...A?[{type:"text",text:A}]:[],...O?[{type:"text",text:O}]:[],{type:"image",data:M.base64,mimeType:"image/jpeg"}],screenshot:M}}let Z=[];if(V.hideBeforeAction){let X=await j.executor.prepareForAction(Q.allowedApps.map((Y)=>Y.bundleId),Q.selectedDisplayId);if(Q.lastScreenshot!==void 0)Z=X;if(X.length>0)Q.onAppsHidden?.(X)}let $=Q.allowedApps.map((X)=>X.bundleId),J=await FV(j.executor,$,j.logger,Q.selectedDisplayId),z=await kj(j,Z),U=await Nj(j,J.displayId,Q.lastScreenshot?.displayId,Q.onDisplayPinned!==void 0);return{content:[...U?[{type:"text",text:U}]:[],...z?[{type:"text",text:z}]:[],{type:"image",data:J.base64,mimeType:"image/jpeg"}],screenshot:J}}async function LV(j,Q,V){let Z=Q.region;if(!Array.isArray(Z)||Z.length!==4)return K("region must be an array of length 4: [x0, y0, x1, y1]","bad_args");let[$,J,z,U]=Z;if(![$,J,z,U].every((O)=>typeof O==="number"&&O>=0))return K("region values must be non-negative numbers","bad_args");if(z<=$)return K("region x1 must be greater than x0","bad_args");if(U<=J)return K("region y1 must be greater than y0","bad_args");let X=V.lastScreenshot;if(!X)return K("take a screenshot before zooming (region coords are relative to it)","state_conflict");if(z>X.width||U>X.height)return K(`region exceeds screenshot bounds (${X.width}\xD7${X.height})`,"bad_args");let Y=X.displayWidth/X.width,W=X.displayHeight/X.height,F={x:$*Y,y:J*W,w:(z-$)*Y,h:(U-J)*W},P=V.allowedApps.map((O)=>O.bundleId);return{content:[{type:"image",data:(await j.executor.zoom(F,P,X.displayId)).base64,mimeType:"image/jpeg"}]}}async function m(j,Q,V,Z,$,J){if(_)await j.executor.mouseUp(),_=!1,R=!1;let z=g(Q);if(z instanceof Error)return K(z.message,"bad_args");let[U,X]=z,Y;if(Q.text!==void 0){if(typeof Q.text!=="string")return K("text must be a string","bad_args");if(b(Q.text,j.executor.capabilities.platform)&&!V.grantFlags.systemKeyCombos)return K(`The modifier chord "${Q.text}" would fire a system shortcut. Request the systemKeyCombos grant flag via request_access, or use only modifier keys (shift, ctrl, alt, cmd) in the text parameter.`,"grant_flag_required");Y=Dj(Q.text)}let W=$!=="left"||Y!==void 0&&Y.length>0?"mouse_full":"mouse",F=await D(j,V,Z,W);if(F)return F;let P=await j.executor.getDisplaySize(V.selectedDisplayId);if(Z.pixelValidation){let{xPct:A,yPct:k}=YV(U,X,V.coordinateMode,V.lastScreenshot),N=await e(j.cropRawPatch,V.lastScreenshot,A,k,async()=>{let f=V.allowedApps.map((E)=>E.bundleId);try{return await j.executor.screenshot({allowedBundleIds:f,displayId:V.lastScreenshot?.displayId})}catch{return null}},j.logger);if(!N.valid&&N.warning)return L(N.warning)}let{x:C,y:O}=S(U,X,V.coordinateMode,P,V.lastScreenshot,j.logger),M=await y(j,V,Z,C,O,W);if(M)return M;return await j.executor.click(C,O,$,J,Y),L("Clicked.")}async function _V(j,Q,V,Z){let $=T(Q,"text");if($ instanceof Error)return K($.message,"bad_args");let J=await D(j,V,Z,"keyboard");if(J)return J;let z=/[^\r\n\t]/u.test($),U=/[^\u0000-\u007f]/u.test($);if(($.includes(`
5
5
  `)||j.executor.capabilities.platform==="darwin"&&z||j.executor.capabilities.platform==="win32"&&U)&&V.grantFlags.clipboardWrite&&Z.clipboardPasteMultiline)return await j.executor.type($,{viaClipboard:!0}),L("Typed (via clipboard).");let Y=WV($);for(let[W,F]of Y.entries()){if(V.isAborted?.())return K(`Typing aborted after ${W} of ${Y.length} graphemes (user interrupt).`);if(await n(KV),F===`
6
6
  `||F==="\r"||F===`\r
7
7
  `)await j.executor.key("return");else if(F==="\t")await j.executor.key("tab");else await j.executor.type(F,{viaClipboard:!1})}return L(`Typed ${Y.length} grapheme(s).`)}async function EV(j,Q,V,Z){let $=T(Q,"text");if($ instanceof Error)return K("text is required","bad_args");let J;if(Q.repeat!==void 0){if(typeof Q.repeat!=="number"||!Number.isInteger(Q.repeat)||Q.repeat<1)return K("repeat must be a positive integer","bad_args");if(Q.repeat>100)return K("repeat exceeds maximum of 100","bad_args");J=Q.repeat}if(b($,j.executor.capabilities.platform)&&!V.grantFlags.systemKeyCombos)return K(`"${$}" is a system-level shortcut. Request the \`systemKeyCombos\` grant via request_access to use it.`,"grant_flag_required");let z=await D(j,V,Z,"keyboard");if(z)return z;return await j.executor.key($,J),L("Key pressed.")}async function AV(j,Q,V,Z){let $=g(Q);if($ instanceof Error)return K($.message,"bad_args");let[J,z]=$,U=Q.scroll_direction;if(U!=="up"&&U!=="down"&&U!=="left"&&U!=="right")return K("scroll_direction must be 'up', 'down', 'left', or 'right'","bad_args");let X=Q.scroll_amount;if(typeof X!=="number"||!Number.isInteger(X)||X<0)return K("scroll_amount must be a non-negative int","bad_args");if(X>100)return K("scroll_amount exceeds maximum of 100","bad_args");let Y=U==="left"?-X:U==="right"?X:0,W=U==="up"?-X:U==="down"?X:0,F=await D(j,V,Z,"mouse");if(F)return F;let P=await j.executor.getDisplaySize(V.selectedDisplayId),{x:C,y:O}=S(J,z,V.coordinateMode,P,V.lastScreenshot,j.logger),M=await y(j,V,Z,C,O,_?"mouse_full":"mouse");if(M)return M;if(_)R=!0;return await j.executor.scroll(C,O,Y,W),L("Scrolled.")}async function kV(j,Q,V,Z){if(_)await j.executor.mouseUp(),_=!1,R=!1;let $=g(Q,"coordinate");if($ instanceof Error)return K($.message,"bad_args");let J=$,z;if(Q.start_coordinate!==void 0){let O=g(Q,"start_coordinate");if(O instanceof Error)return K(O.message,"bad_args");z=O}let U=await D(j,V,Z,"mouse");if(U)return U;let X=await j.executor.getDisplaySize(V.selectedDisplayId),Y=z===void 0?void 0:S(z[0],z[1],V.coordinateMode,X,V.lastScreenshot,j.logger),W=S(J[0],J[1],V.coordinateMode,X,V.lastScreenshot,j.logger),F=Y??await j.executor.getCursorPosition(),P=await y(j,V,Z,F.x,F.y,"mouse");if(P)return P;let C=await y(j,V,Z,W.x,W.y,"mouse_full");if(C)return C;return await j.executor.drag(Y,W),L("Dragged.")}async function NV(j,Q,V,Z){let $=g(Q);if($ instanceof Error)return K($.message,"bad_args");let[J,z]=$,X=await D(j,V,Z,_?"mouse":"mouse_position");if(X)return X;let Y=await j.executor.getDisplaySize(V.selectedDisplayId),{x:W,y:F}=S(J,z,V.coordinateMode,Y,V.lastScreenshot,j.logger);if(_){let P=await y(j,V,Z,W,F,"mouse_full");if(P)return P}if(await j.executor.moveMouse(W,F),_)R=!0;return L("Moved.")}async function BV(j,Q,V){let Z=T(Q,"app");if(Z instanceof Error)return K(Z.message,"bad_args");let $=new Set(V.allowedApps.map((z)=>z.bundleId)),J;if(Zj(Z)&&$.has(Z))J=Z;else J=V.allowedApps.find((U)=>U.displayName.toLowerCase()===Z.toLowerCase())?.bundleId;if(!J||!$.has(J))return K(`"${Z}" is not granted for this session. Call request_access first.`,"app_not_granted");if(await j.executor.openApp(J),V.onDisplayPinned!==void 0){let z=1;try{z=(await j.executor.listDisplays()).length}catch{}if(z>=2)return L(`Opened "${Z}". If it isn't visible in the next screenshot, it may `+"have opened on a different monitor \u2014 use switch_display to check.")}return L(`Opened "${Z}".`)}async function RV(j,Q,V){let Z=T(Q,"display");if(Z instanceof Error)return K(Z.message,"bad_args");if(!V.onDisplayPinned)return K("Display switching is not available in this session.","feature_unavailable");if(Z.toLowerCase()==="auto")return V.onDisplayPinned(void 0),L("Returned to automatic monitor selection. Call screenshot to continue.");let $;try{$=await j.executor.listDisplays()}catch(X){return K(`Failed to enumerate displays: ${String(X)}`,"display_error")}if($.length<2)return K("Only one monitor is connected. There is nothing to switch to.","bad_args");let J=bj($),z=Z.toLowerCase(),U=$.find((X)=>J.get(X.displayId)?.toLowerCase()===z);if(!U){let X=$.map((Y)=>`"${J.get(Y.displayId)}"`).join(", ");return K(`No monitor named "${Z}" is connected. Available monitors: ${X}.`,"bad_args")}return V.onDisplayPinned(U.displayId),L(`Switched to monitor "${J.get(U.displayId)}". Call screenshot to see it.`)}function TV(j){return q({allowedApps:j.allowedApps,grantFlags:j.grantFlags})}async function DV(j,Q,V){if(!Q.grantFlags.clipboardRead)return K("Clipboard read is not granted. Request `clipboardRead` via request_access.","grant_flag_required");if(V.clipboardGuard){let $=await j.executor.getFrontmostApp(),J=new Map(Q.allowedApps.map((U)=>[U.bundleId,U.tier])),z=$?J.get($.bundleId):void 0;await l(j,Q,z==="click")}let Z=await j.executor.readClipboard();return q({text:Z})}async function wV(j,Q,V,Z){if(!V.grantFlags.clipboardWrite)return K("Clipboard write is not granted. Request `clipboardWrite` via request_access.","grant_flag_required");let $=T(Q,"text");if($ instanceof Error)return K($.message,"bad_args");if(Z.clipboardGuard){let J=await j.executor.getFrontmostApp(),z=new Map(V.allowedApps.map((X)=>[X.bundleId,X.tier])),U=J?z.get(J.bundleId):void 0;if(J&&U==="click")return K(`"${J.displayName}" is a tier-"click" app and currently frontmost. write_clipboard is blocked because the next action `+"would clear the clipboard anyway \u2014 a UI Paste button in this "+'app cannot be used to inject text. Bring a tier-"full" app forward before writing to the clipboard.'+I,"tier_insufficient");await l(j,V,U==="click")}return await j.executor.writeClipboard($),L("Clipboard written.")}async function GV(j){let Q=j.duration;if(typeof Q!=="number"||!Number.isFinite(Q))return K("duration must be a number","bad_args");if(Q<0)return K("duration must be non-negative","bad_args");if(Q>100)return K("duration is too long. Duration is in seconds.","bad_args");return await n(Q*1000),L(`Waited ${Q}s.`)}async function IV(j,Q){let V=await j.executor.getCursorPosition(),Z=Q.lastScreenshot;if(Z){let $=V.x-Z.originX,J=V.y-Z.originY;if($<0||$>Z.displayWidth||J<0||J>Z.displayHeight)return q({x:V.x,y:V.y,coordinateSpace:"logical_points",note:"cursor is on a different monitor than your last screenshot; take a fresh screenshot"});let z=Math.round($*(Z.width/Z.displayWidth)),U=Math.round(J*(Z.height/Z.displayHeight));return q({x:z,y:U,coordinateSpace:"image_pixels"})}return q({x:V.x,y:V.y,coordinateSpace:"logical_points",note:"take a screenshot first for image-pixel coordinates"})}async function yV(j,Q,V,Z){let $=T(Q,"text");if($ instanceof Error)return K($.message,"bad_args");let J=Q.duration;if(typeof J!=="number"||!Number.isFinite(J))return K("duration must be a number","bad_args");if(J<0)return K("duration must be non-negative","bad_args");if(J>100)return K("duration is too long. Duration is in seconds.","bad_args");if(b($,j.executor.capabilities.platform)&&!V.grantFlags.systemKeyCombos)return K(`"${$}" is a system-level shortcut. Request the \`systemKeyCombos\` grant via request_access to use it.`,"grant_flag_required");let z=await D(j,V,Z,"keyboard");if(z)return z;let U=Dj($);return await j.executor.holdKey(U,J*1000),L("Key held.")}async function SV(j,Q,V){if(_)return K("mouse button already held, call left_mouse_up first","state_conflict");let Z=await D(j,Q,V,"mouse");if(Z)return Z;let $=await j.executor.getCursorPosition(),J=await y(j,Q,V,$.x,$.y,"mouse");if(J)return J;return await j.executor.mouseDown(),_=!0,R=!1,L("Mouse button pressed.")}async function xV(j,Q,V){let Z=async(U)=>{return await j.executor.mouseUp(),_=!1,R=!1,U},$=await D(j,Q,V,"mouse");if($)return Z($);let J=await j.executor.getCursorPosition(),z=await y(j,Q,V,J.x,J.y,R?"mouse_full":"mouse");if(z)return Z(z);return await j.executor.mouseUp(),_=!1,R=!1,L("Mouse button released.")}async function bV(j,Q,V,Z){let $=Q.actions;if(!Array.isArray($)||$.length===0)return K("actions must be a non-empty array","bad_args");for(let[U,X]of $.entries()){if(typeof X!=="object"||X===null)return K(`actions[${U}] must be an object`,"bad_args");let Y=X.action;if(typeof Y!=="string")return K(`actions[${U}].action must be a string`,"bad_args");if(!p.has(Y))return K(`actions[${U}].action="${Y}" is not allowed in a batch. Allowed: ${[...p].join(", ")}.`,"bad_args")}if(Z.hideBeforeAction){let U=await j.executor.prepareForAction(V.allowedApps.map((X)=>X.bundleId),V.selectedDisplayId);if(U.length>0)V.onAppsHidden?.(U)}let J={...Z,hideBeforeAction:!1,pixelValidation:!1,autoTargetDisplay:!1},z=[];for(let[U,X]of $.entries()){if(V.isAborted?.())return await h(j),K(`Batch aborted after ${z.length} of ${$.length} actions (user interrupt).`);if(U>0)await n(10);let Y=X,W=Y.action,{screenshot:F,...P}=await Xj(W,Y,j,V,J),C=hj(P),O={action:W,ok:!P.isError,output:C};if(z.push(O),P.isError)return await h(j),q({completed:z.slice(0,-1),failed:O,remaining:$.length-z.length},P.telemetry)}return q({completed:z})}function hj(j){let Q=j.content[0];return Q&&Q.type==="text"?Q.text:""}async function Xj(j,Q,V,Z,$){switch(j){case"screenshot":return mj(V,Z,$);case"zoom":return LV(V,Q,Z);case"left_click":return m(V,Q,Z,$,"left",1);case"double_click":return m(V,Q,Z,$,"left",2);case"triple_click":return m(V,Q,Z,$,"left",3);case"right_click":return m(V,Q,Z,$,"right",1);case"middle_click":return m(V,Q,Z,$,"middle",1);case"type":return _V(V,Q,Z,$);case"key":return EV(V,Q,Z,$);case"scroll":return AV(V,Q,Z,$);case"left_click_drag":return kV(V,Q,Z,$);case"mouse_move":return NV(V,Q,Z,$);case"wait":return GV(Q);case"cursor_position":return IV(V,Z);case"hold_key":return yV(V,Q,Z,$);case"left_mouse_down":return SV(V,Z,$);case"left_mouse_up":return xV(V,Z,$);case"open_application":return BV(V,Q,Z);case"switch_display":return RV(V,Q,Z);case"list_granted_applications":return TV(Z);case"read_clipboard":return DV(V,Z,$);case"write_clipboard":return wV(V,Q,Z,$);case"computer_batch":return bV(V,Q,Z,$);default:return K(`Unknown tool "${j}".`,"bad_args")}}async function Uj(j,Q,V,Z){let{logger:$,serverName:J}=j,z=new Set(Z.userDeniedBundleIds),U=Z.allowedApps.some((O)=>O.tier===void 0||z.has(O.bundleId)||x(O.bundleId,O.displayName))?{...Z,allowedApps:Z.allowedApps.filter((O)=>!z.has(O.bundleId)).filter((O)=>!x(O.bundleId,O.displayName)).map((O)=>O.tier!==void 0?O:{...O,tier:v(O.bundleId,O.displayName)})}:Z;if(j.isDisabled())return K("Computer control is disabled in Settings. Enable it and try again.","other");let X=await j.ensureOsPermissions(),Y;if(!X.granted){if(Q!=="request_access"&&Q!=="request_teach_access")return K("Accessibility and Screen Recording permissions are required. Call request_access to show the permission panel.","tcc_not_granted");Y={accessibility:X.accessibility,screenRecording:X.screenRecording}}let W=i(Q),F=U.checkCuLock?.();if(F){if(F.holder!==void 0&&!F.isSelf)return K("Another Claude session is currently using the computer. Wait for the user to acknowledge it is finished (stop button in the Claude window), or find a non-computer-use approach if one is readily apparent.","cu_lock_held");if(F.holder===void 0&&!W)U.acquireCuLock?.(),zj()}let P=j.getSubGates(),C=UV(V);$.silly(`[${J}] tool=${Q} args=${JSON.stringify(C).slice(0,200)}`);try{if(Q==="request_access")return await fV(j,C,U,Y);if(Q==="request_teach_access")return await MV(j,C,U,Y);if(Q==="teach_step")return await HV(j,C,U,P);if(Q==="teach_batch")return await qV(j,C,U,P);return await Xj(Q,C,j,U,P)}catch(O){let M=O instanceof Error?O.message:String(O);return $.error(`[${J}] tool=${Q} threw: ${M}`,O),K(`Tool "${Q}" failed: ${M}`,"executor_threw")}}var Bj="com.apple.finder",I,Tj=1024,KV=8,_=!1,R=!1,PV,p;var Yj=B(()=>{a();r();jj();Qj();I=" Do not attempt to work around this restriction \u2014 never use AppleScript, "+"System Events, shell commands, or any other method to send clicks or keystrokes to this app.";PV=/^[A-Za-z0-9][\w.-]*\.[A-Za-z0-9][\w.-]*$/;p=new Set(["key","type","mouse_move","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","hold_key","screenshot","cursor_position","left_mouse_down","left_mouse_up","wait"])});var o;var Fj=B(()=>{o={clipboardRead:!1,clipboardWrite:!1,systemKeyCombos:!1}});import{Server as mV}from"@modelcontextprotocol/sdk/server/index.js";import{CallToolRequestSchema as gj,ListToolsRequestSchema as hV}from"@modelcontextprotocol/sdk/types.js";function cj(j,Q,V){let Z=new Set(j.map((U)=>U.bundleId)),$=[...j,...V.granted.filter((U)=>!Z.has(U.bundleId))],J=Object.fromEntries(Object.entries(V.flags).filter(([,U])=>U===!0)),z={...o,...Q,...J};return{apps:$,flags:z}}function uj(j,Q,V){let{logger:Z,serverName:$}=j,J,z=V.onPermissionRequest?async(X,Y)=>{let W=await V.onPermissionRequest(X,Y),{apps:F,flags:P}=cj(V.getAllowedApps(),V.getGrantFlags(),W);return Z.debug(`[${$}] permission result: granted=${W.granted.length} denied=${W.denied.length}`),V.onAllowedAppsChanged?.(F,P),W}:void 0,U=V.onTeachPermissionRequest?async(X,Y)=>{let W=await V.onTeachPermissionRequest(X,Y);Z.debug(`[${$}] teach permission result: granted=${W.granted.length} denied=${W.denied.length}`);let{apps:F}=cj(V.getAllowedApps(),V.getGrantFlags(),W);return V.onAllowedAppsChanged?.(F,{...o,...V.getGrantFlags()}),W}:void 0;return async(X,Y)=>{if(V.checkCuLock){let C=await V.checkCuLock();if(C.holder!==void 0&&!C.isSelf)return{content:[{type:"text",text:V.formatLockHeldMessage?.(C.holder)??vj}],isError:!0,telemetry:{error_kind:"cu_lock_held"}};if(C.holder===void 0&&!i(X)){await V.acquireCuLock?.();let O=await V.checkCuLock();if(O.holder!==void 0&&!O.isSelf)return{content:[{type:"text",text:V.formatLockHeldMessage?.(O.holder)??vj}],isError:!0,telemetry:{error_kind:"cu_lock_held"}};zj()}}let W=J?void 0:V.getLastScreenshotDims?.(),F=new AbortController,P={allowedApps:[...V.getAllowedApps()],grantFlags:V.getGrantFlags(),userDeniedBundleIds:V.getUserDeniedBundleIds(),coordinateMode:Q,selectedDisplayId:V.getSelectedDisplayId(),displayPinnedByModel:V.getDisplayPinnedByModel?.(),displayResolvedForApps:V.getDisplayResolvedForApps?.(),lastScreenshot:J??(W?{...W,base64:""}:void 0),onPermissionRequest:z?(C)=>z(C,F.signal):void 0,onTeachPermissionRequest:U?(C)=>U(C,F.signal):void 0,onAppsHidden:V.onAppsHidden,getClipboardStash:V.getClipboardStash,onClipboardStashChanged:V.onClipboardStashChanged,onResolvedDisplayUpdated:V.onResolvedDisplayUpdated,onDisplayPinned:V.onDisplayPinned,onDisplayResolvedForApps:V.onDisplayResolvedForApps,onTeachModeActivated:V.onTeachModeActivated,onTeachStep:V.onTeachStep,onTeachWorking:V.onTeachWorking,getTeachModeActive:V.getTeachModeActive,checkCuLock:void 0,acquireCuLock:void 0,isAborted:V.isAborted};Z.debug(`[${$}] tool=${X} allowedApps=${P.allowedApps.length} coordMode=${Q}`);try{let C=await Uj(j,X,Y,P);if(C.screenshot){J=C.screenshot;let{base64:O,...M}=C.screenshot;Z.debug(`[${$}] screenshot dims: ${JSON.stringify(M)}`),V.onScreenshotCaptured?.(M)}return C}finally{F.abort()}}}function gV(j,Q,V){let{serverName:Z,logger:$}=j,J=new mV({name:Z,version:"0.1.3"},{capabilities:{tools:{},logging:{}}}),z=s(j.executor.capabilities,Q);if(J.setRequestHandler(hV,async()=>j.isDisabled()?{tools:[]}:{tools:z}),V){let U=uj(j,Q,V);return J.setRequestHandler(gj,async(X)=>{let{screenshot:Y,telemetry:W,...F}=await U(X.params.name,X.params.arguments??{});return F}),J}return J.setRequestHandler(gj,async(U)=>{return $.warn(`[${Z}] tool call "${U.params.name}" reached the stub handler \u2014 no session context bound. Per-session state unavailable.`),{content:[{type:"text",text:"This computer-use server instance is not wired to a session. Per-session app permissions are not available on this code path."}],isError:!0}}),J}var vj="Another Claude session is currently using the computer. Wait for that session to finish, or find a non-computer-use approach.";var pj=B(()=>{Yj();t();Fj()});var lj=()=>{};var vV=B(()=>{Fj();Qj();a();r();lj();Oj();Yj();pj();t();jj()});
8
- export{o as JS,Fj as KS,XV as LS,Qj as MS,nj as NS,Pj as OS,s as PS,uj as QS,gV as RS,vV as SS};
8
+ export{o as MS,Fj as NS,XV as OS,Qj as PS,nj as QS,Pj as RS,s as SS,uj as TS,gV as US,vV as VS};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ep as D,Oq as i,Pq as E,Qq as C,Sq as a,Tq as s,Vq as Jq,dr as Qq}from"./cli-5pb6kdxn.js";import{$L as j,VL as f,WL as t,ZL as d,_L as qq,aM as zq}from"./cli-2vc9kv40.js";import{GQ as F,IQ as U,MQ as I,ZQ as V,iR as e}from"./cli-5wh173wa.js";import{U8 as w,V8 as o}from"./cli-s5epnnj5.js";import{bda as $}from"./cli-x514vyva.js";import{c as v}from"react/compiler-runtime";import Uq,{useEffect as Xq,useState as r}from"react";import{jsxDEV as z,Fragment as x}from"react/jsx-dev-runtime";function Zq(){let J=v(9),q;if(J[0]===Symbol.for("react.memo_cache_sentinel"))q=z(U,{children:["An update to our Consumer Terms and Privacy Policy will take effect on"," ",z(U,{bold:!0,children:"October 8, 2025"},void 0,!1,void 0,this),". You can accept the updated terms today."]},void 0,!0,void 0,this),J[0]=q;else q=J[0];let W;if(J[1]===Symbol.for("react.memo_cache_sentinel"))W=z(U,{children:"What's changing?"},void 0,!1,void 0,this),J[1]=W;else W=J[1];let X,Y;if(J[2]===Symbol.for("react.memo_cache_sentinel"))X=z(U,{children:"\xB7 "},void 0,!1,void 0,this),Y=z(U,{bold:!0,children:"You can help improve Claude "},void 0,!1,void 0,this),J[2]=X,J[3]=Y;else X=J[2],Y=J[3];let M;if(J[4]===Symbol.for("react.memo_cache_sentinel"))M=z(F,{paddingLeft:1,children:z(U,{children:[X,Y,z(U,{children:["\u2014 Allow the use of your chats and coding sessions to train and improve Anthropic AI models. Change anytime in your Privacy Settings (",z(I,{url:"https://claude.ai/settings/data-privacy-controls"},void 0,!1,void 0,this),")."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),J[4]=M;else M=J[4];let O;if(J[5]===Symbol.for("react.memo_cache_sentinel"))O=z(F,{flexDirection:"column",children:[W,M,z(F,{paddingLeft:1,children:z(U,{children:[z(U,{children:"\xB7 "},void 0,!1,void 0,this),z(U,{bold:!0,children:"Updates to data retention "},void 0,!1,void 0,this),z(U,{children:"\u2014 To help us improve our AI models and safety protections, we're extending data retention to 5 years."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J[5]=O;else O=J[5];let Q;if(J[6]===Symbol.for("react.memo_cache_sentinel"))Q=z(I,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"},void 0,!1,void 0,this),J[6]=Q;else Q=J[6];let A;if(J[7]===Symbol.for("react.memo_cache_sentinel"))A=z(I,{url:"https://anthropic.com/legal/terms"},void 0,!1,void 0,this),J[7]=A;else A=J[7];let N;if(J[8]===Symbol.for("react.memo_cache_sentinel"))N=z(x,{children:[q,O,z(U,{children:["Learn more (",Q,") or read the updated Consumer Terms (",A,") and Privacy Policy (",z(I,{url:"https://anthropic.com/legal/privacy"},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J[8]=N;else N=J[8];return N}function Mq(){let J=v(7),q;if(J[0]===Symbol.for("react.memo_cache_sentinel"))q=z(U,{children:"We've updated our Consumer Terms and Privacy Policy."},void 0,!1,void 0,this),J[0]=q;else q=J[0];let W;if(J[1]===Symbol.for("react.memo_cache_sentinel"))W=z(U,{children:"What's changing?"},void 0,!1,void 0,this),J[1]=W;else W=J[1];let X;if(J[2]===Symbol.for("react.memo_cache_sentinel"))X=z(F,{flexDirection:"column",children:[z(U,{bold:!0,children:"Help improve Claude"},void 0,!1,void 0,this),z(U,{children:"Allow the use of your chats and coding sessions to train and improve Anthropic AI models. You can change this anytime in Privacy Settings"},void 0,!1,void 0,this),z(I,{url:"https://claude.ai/settings/data-privacy-controls"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J[2]=X;else X=J[2];let Y;if(J[3]===Symbol.for("react.memo_cache_sentinel"))Y=z(F,{flexDirection:"column",gap:1,children:[W,X,z(F,{flexDirection:"column",children:[z(U,{bold:!0,children:"How this affects data retention"},void 0,!1,void 0,this),z(U,{children:"Turning ON the improve Claude setting extends data retention from 30 days to 5 years. Turning it OFF keeps the default 30-day data retention. Delete data anytime."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J[3]=Y;else Y=J[3];let M;if(J[4]===Symbol.for("react.memo_cache_sentinel"))M=z(I,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"},void 0,!1,void 0,this),J[4]=M;else M=J[4];let O;if(J[5]===Symbol.for("react.memo_cache_sentinel"))O=z(I,{url:"https://anthropic.com/legal/terms"},void 0,!1,void 0,this),J[5]=O;else O=J[5];let Q;if(J[6]===Symbol.for("react.memo_cache_sentinel"))Q=z(x,{children:[q,Y,z(U,{children:["Learn more (",M,") or read the updated Consumer Terms (",O,") and Privacy Policy (",z(I,{url:"https://anthropic.com/legal/privacy"},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J[6]=Q;else Q=J[6];return Q}function kq(J){let q=v(34),{showIfAlreadyViewed:W,location:X,onDone:Y}=J,[M,O]=r(null),[Q,A]=r(null),N,K;if(q[0]!==X||q[1]!==Y||q[2]!==W)N=()=>{(async function(){let[n,u]=await Promise.all([i(),a()]),l=u.success?u.data:null;A(l);let g=s(n,u,W);if(O(g),!g){Y("skip_rendering");return}E(),w("tengu_grove_policy_viewed",{location:X,dismissable:l?.notice_is_grace_period})})()},K=[W,X,Y],q[0]=X,q[1]=Y,q[2]=W,q[3]=N,q[4]=K;else N=q[3],K=q[4];if(Xq(N,K),M===null)return null;if(!M)return null;let H;if(q[5]!==Q?.notice_is_grace_period||q[6]!==Y)H=async function(c){q:switch(c){case"accept_opt_in":{await C(!0),w("tengu_grove_policy_submitted",{state:!0,dismissable:Q?.notice_is_grace_period});break q}case"accept_opt_out":{await C(!1),w("tengu_grove_policy_submitted",{state:!1,dismissable:Q?.notice_is_grace_period});break q}case"defer":{w("tengu_grove_policy_dismissed",{state:!0});break q}case"escape":w("tengu_grove_policy_escaped",{})}Y(c)},q[5]=Q?.notice_is_grace_period,q[6]=Y,q[7]=H;else H=q[7];let P=H,L;if(q[8]!==Q?.domain_excluded)L=Q?.domain_excluded?[{label:"Accept terms \xB7 Help improve Claude: OFF (for emails with your domain)",value:"accept_opt_out"}]:[{label:"Accept terms \xB7 Help improve Claude: ON",value:"accept_opt_in"},{label:"Accept terms \xB7 Help improve Claude: OFF",value:"accept_opt_out"}],q[8]=Q?.domain_excluded,q[9]=L;else L=q[9];let R=L,G;if(q[10]!==Q?.notice_is_grace_period||q[11]!==P)G=function(){if(Q?.notice_is_grace_period){P("defer");return}P("escape")},q[10]=Q?.notice_is_grace_period,q[11]=P,q[12]=G;else G=q[12];let Z=G,k;if(q[13]!==Q?.notice_is_grace_period)k=z(F,{flexDirection:"column",gap:1,flexGrow:1,children:Q?.notice_is_grace_period?z(Zq,{},void 0,!1,void 0,this):z(Mq,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[13]=Q?.notice_is_grace_period,q[14]=k;else k=q[14];let _;if(q[15]===Symbol.for("react.memo_cache_sentinel"))_=z(F,{flexShrink:0,children:z(U,{color:"professionalBlue",children:Yq},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[15]=_;else _=q[15];let B;if(q[16]!==k)B=z(F,{flexDirection:"row",children:[k,_]},void 0,!0,void 0,this),q[16]=k,q[17]=B;else B=q[17];let T;if(q[18]===Symbol.for("react.memo_cache_sentinel"))T=z(F,{flexDirection:"column",children:[z(U,{bold:!0,children:"Please select how you'd like to continue"},void 0,!1,void 0,this),z(U,{children:"Your choice takes effect immediately upon confirmation."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[18]=T;else T=q[18];let b;if(q[19]!==Q?.notice_is_grace_period)b=Q?.notice_is_grace_period?[{label:"Not now",value:"defer"}]:[],q[19]=Q?.notice_is_grace_period,q[20]=b;else b=q[20];let m;if(q[21]!==R||q[22]!==b)m=[...R,...b],q[21]=R,q[22]=b,q[23]=m;else m=q[23];let p;if(q[24]!==P)p=(h)=>P(h),q[24]=P,q[25]=p;else p=q[25];let y;if(q[26]!==Z||q[27]!==m||q[28]!==p)y=z(F,{flexDirection:"column",gap:1,children:[T,z(D,{options:m,onChange:p,onCancel:Z},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[26]=Z,q[27]=m,q[28]=p,q[29]=y;else y=q[29];let S;if(q[30]!==Z||q[31]!==y||q[32]!==B)S=z(j,{title:"Updates to Consumer Terms and Policies",color:"professionalBlue",onCancel:Z,inputGuide:Wq,children:[B,y]},void 0,!0,void 0,this),q[30]=Z,q[31]=y,q[32]=B,q[33]=S;else S=q[33];return S}function Wq(J){return J.pending?z(U,{children:["Press ",J.keyName," again to exit"]},void 0,!0,void 0,this):z(d,{children:[z(f,{shortcut:"Enter",action:"confirm"},void 0,!1,void 0,this),z(f,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function _q(J){let q=v(17),{settings:W,domainExcluded:X,onDone:Y}=J,[M,O]=r(W.grove_enabled),Q;if(q[0]===Symbol.for("react.memo_cache_sentinel"))Q=[],q[0]=Q;else Q=q[0];Uq.useEffect(Fq,Q);let A;if(q[1]!==X||q[2]!==M)A=async(Z,k)=>{if(!X&&(k.tab||k.return||Z===" ")){let _=!M;O(_),await C(_)}},q[1]=X,q[2]=M,q[3]=A;else A=q[3];V(A);let N;if(q[4]===Symbol.for("react.memo_cache_sentinel"))N=z(U,{color:"error",children:"false"},void 0,!1,void 0,this),q[4]=N;else N=q[4];let K=N;if(X){let Z;if(q[5]===Symbol.for("react.memo_cache_sentinel"))Z=z(U,{color:"error",children:"false (for emails with your domain)"},void 0,!1,void 0,this),q[5]=Z;else Z=q[5];K=Z}else if(M){let Z;if(q[6]===Symbol.for("react.memo_cache_sentinel"))Z=z(U,{color:"success",children:"true"},void 0,!1,void 0,this),q[6]=Z;else Z=q[6];K=Z}let H;if(q[7]!==X)H=(Z)=>Z.pending?z(U,{children:["Press ",Z.keyName," again to exit"]},void 0,!0,void 0,this):X?z(f,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this):z(d,{children:[z(f,{shortcut:"Enter/Tab/Space",action:"toggle"},void 0,!1,void 0,this),z(f,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[7]=X,q[8]=H;else H=q[8];let P;if(q[9]===Symbol.for("react.memo_cache_sentinel"))P=z(U,{children:["Review and manage your privacy settings at"," ",z(I,{url:"https://claude.ai/settings/data-privacy-controls"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[9]=P;else P=q[9];let L;if(q[10]===Symbol.for("react.memo_cache_sentinel"))L=z(F,{width:44,children:z(U,{bold:!0,children:"Help improve Claude"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[10]=L;else L=q[10];let R;if(q[11]!==K)R=z(F,{children:[L,z(F,{children:K},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[11]=K,q[12]=R;else R=q[12];let G;if(q[13]!==Y||q[14]!==H||q[15]!==R)G=z(j,{title:"Data Privacy",color:"professionalBlue",onCancel:Y,inputGuide:H,children:[P,R]},void 0,!0,void 0,this),q[13]=Y,q[14]=H,q[15]=R,q[16]=G;else G=q[16];return G}function Fq(){w("tengu_grove_privacy_settings_viewed",{})}var Yq=` _____________
2
+ import{Ep as D,Oq as i,Pq as E,Qq as C,Sq as a,Tq as s,Vq as Jq,dr as Qq}from"./cli-me4e2p3e.js";import{SL as f,TL as t,WL as d,XL as qq,YL as j,ZL as zq}from"./cli-xfsqvp8r.js";import{DQ as F,FQ as U,JQ as I,WQ as V,fR as e}from"./cli-x8xgga1a.js";import{Y8 as w,Z8 as o}from"./cli-t9jht3kb.js";import{fda as $}from"./cli-w1d8n9g3.js";import{c as v}from"react/compiler-runtime";import Uq,{useEffect as Xq,useState as r}from"react";import{jsxDEV as z,Fragment as x}from"react/jsx-dev-runtime";function Zq(){let J=v(9),q;if(J[0]===Symbol.for("react.memo_cache_sentinel"))q=z(U,{children:["An update to our Consumer Terms and Privacy Policy will take effect on"," ",z(U,{bold:!0,children:"October 8, 2025"},void 0,!1,void 0,this),". You can accept the updated terms today."]},void 0,!0,void 0,this),J[0]=q;else q=J[0];let W;if(J[1]===Symbol.for("react.memo_cache_sentinel"))W=z(U,{children:"What's changing?"},void 0,!1,void 0,this),J[1]=W;else W=J[1];let X,Y;if(J[2]===Symbol.for("react.memo_cache_sentinel"))X=z(U,{children:"\xB7 "},void 0,!1,void 0,this),Y=z(U,{bold:!0,children:"You can help improve Claude "},void 0,!1,void 0,this),J[2]=X,J[3]=Y;else X=J[2],Y=J[3];let M;if(J[4]===Symbol.for("react.memo_cache_sentinel"))M=z(F,{paddingLeft:1,children:z(U,{children:[X,Y,z(U,{children:["\u2014 Allow the use of your chats and coding sessions to train and improve Anthropic AI models. Change anytime in your Privacy Settings (",z(I,{url:"https://claude.ai/settings/data-privacy-controls"},void 0,!1,void 0,this),")."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),J[4]=M;else M=J[4];let O;if(J[5]===Symbol.for("react.memo_cache_sentinel"))O=z(F,{flexDirection:"column",children:[W,M,z(F,{paddingLeft:1,children:z(U,{children:[z(U,{children:"\xB7 "},void 0,!1,void 0,this),z(U,{bold:!0,children:"Updates to data retention "},void 0,!1,void 0,this),z(U,{children:"\u2014 To help us improve our AI models and safety protections, we're extending data retention to 5 years."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J[5]=O;else O=J[5];let Q;if(J[6]===Symbol.for("react.memo_cache_sentinel"))Q=z(I,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"},void 0,!1,void 0,this),J[6]=Q;else Q=J[6];let A;if(J[7]===Symbol.for("react.memo_cache_sentinel"))A=z(I,{url:"https://anthropic.com/legal/terms"},void 0,!1,void 0,this),J[7]=A;else A=J[7];let N;if(J[8]===Symbol.for("react.memo_cache_sentinel"))N=z(x,{children:[q,O,z(U,{children:["Learn more (",Q,") or read the updated Consumer Terms (",A,") and Privacy Policy (",z(I,{url:"https://anthropic.com/legal/privacy"},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J[8]=N;else N=J[8];return N}function Mq(){let J=v(7),q;if(J[0]===Symbol.for("react.memo_cache_sentinel"))q=z(U,{children:"We've updated our Consumer Terms and Privacy Policy."},void 0,!1,void 0,this),J[0]=q;else q=J[0];let W;if(J[1]===Symbol.for("react.memo_cache_sentinel"))W=z(U,{children:"What's changing?"},void 0,!1,void 0,this),J[1]=W;else W=J[1];let X;if(J[2]===Symbol.for("react.memo_cache_sentinel"))X=z(F,{flexDirection:"column",children:[z(U,{bold:!0,children:"Help improve Claude"},void 0,!1,void 0,this),z(U,{children:"Allow the use of your chats and coding sessions to train and improve Anthropic AI models. You can change this anytime in Privacy Settings"},void 0,!1,void 0,this),z(I,{url:"https://claude.ai/settings/data-privacy-controls"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J[2]=X;else X=J[2];let Y;if(J[3]===Symbol.for("react.memo_cache_sentinel"))Y=z(F,{flexDirection:"column",gap:1,children:[W,X,z(F,{flexDirection:"column",children:[z(U,{bold:!0,children:"How this affects data retention"},void 0,!1,void 0,this),z(U,{children:"Turning ON the improve Claude setting extends data retention from 30 days to 5 years. Turning it OFF keeps the default 30-day data retention. Delete data anytime."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J[3]=Y;else Y=J[3];let M;if(J[4]===Symbol.for("react.memo_cache_sentinel"))M=z(I,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"},void 0,!1,void 0,this),J[4]=M;else M=J[4];let O;if(J[5]===Symbol.for("react.memo_cache_sentinel"))O=z(I,{url:"https://anthropic.com/legal/terms"},void 0,!1,void 0,this),J[5]=O;else O=J[5];let Q;if(J[6]===Symbol.for("react.memo_cache_sentinel"))Q=z(x,{children:[q,Y,z(U,{children:["Learn more (",M,") or read the updated Consumer Terms (",O,") and Privacy Policy (",z(I,{url:"https://anthropic.com/legal/privacy"},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J[6]=Q;else Q=J[6];return Q}function kq(J){let q=v(34),{showIfAlreadyViewed:W,location:X,onDone:Y}=J,[M,O]=r(null),[Q,A]=r(null),N,K;if(q[0]!==X||q[1]!==Y||q[2]!==W)N=()=>{(async function(){let[n,u]=await Promise.all([i(),a()]),l=u.success?u.data:null;A(l);let g=s(n,u,W);if(O(g),!g){Y("skip_rendering");return}E(),w("tengu_grove_policy_viewed",{location:X,dismissable:l?.notice_is_grace_period})})()},K=[W,X,Y],q[0]=X,q[1]=Y,q[2]=W,q[3]=N,q[4]=K;else N=q[3],K=q[4];if(Xq(N,K),M===null)return null;if(!M)return null;let H;if(q[5]!==Q?.notice_is_grace_period||q[6]!==Y)H=async function(c){q:switch(c){case"accept_opt_in":{await C(!0),w("tengu_grove_policy_submitted",{state:!0,dismissable:Q?.notice_is_grace_period});break q}case"accept_opt_out":{await C(!1),w("tengu_grove_policy_submitted",{state:!1,dismissable:Q?.notice_is_grace_period});break q}case"defer":{w("tengu_grove_policy_dismissed",{state:!0});break q}case"escape":w("tengu_grove_policy_escaped",{})}Y(c)},q[5]=Q?.notice_is_grace_period,q[6]=Y,q[7]=H;else H=q[7];let P=H,L;if(q[8]!==Q?.domain_excluded)L=Q?.domain_excluded?[{label:"Accept terms \xB7 Help improve Claude: OFF (for emails with your domain)",value:"accept_opt_out"}]:[{label:"Accept terms \xB7 Help improve Claude: ON",value:"accept_opt_in"},{label:"Accept terms \xB7 Help improve Claude: OFF",value:"accept_opt_out"}],q[8]=Q?.domain_excluded,q[9]=L;else L=q[9];let R=L,G;if(q[10]!==Q?.notice_is_grace_period||q[11]!==P)G=function(){if(Q?.notice_is_grace_period){P("defer");return}P("escape")},q[10]=Q?.notice_is_grace_period,q[11]=P,q[12]=G;else G=q[12];let Z=G,k;if(q[13]!==Q?.notice_is_grace_period)k=z(F,{flexDirection:"column",gap:1,flexGrow:1,children:Q?.notice_is_grace_period?z(Zq,{},void 0,!1,void 0,this):z(Mq,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[13]=Q?.notice_is_grace_period,q[14]=k;else k=q[14];let _;if(q[15]===Symbol.for("react.memo_cache_sentinel"))_=z(F,{flexShrink:0,children:z(U,{color:"professionalBlue",children:Yq},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[15]=_;else _=q[15];let B;if(q[16]!==k)B=z(F,{flexDirection:"row",children:[k,_]},void 0,!0,void 0,this),q[16]=k,q[17]=B;else B=q[17];let T;if(q[18]===Symbol.for("react.memo_cache_sentinel"))T=z(F,{flexDirection:"column",children:[z(U,{bold:!0,children:"Please select how you'd like to continue"},void 0,!1,void 0,this),z(U,{children:"Your choice takes effect immediately upon confirmation."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[18]=T;else T=q[18];let b;if(q[19]!==Q?.notice_is_grace_period)b=Q?.notice_is_grace_period?[{label:"Not now",value:"defer"}]:[],q[19]=Q?.notice_is_grace_period,q[20]=b;else b=q[20];let m;if(q[21]!==R||q[22]!==b)m=[...R,...b],q[21]=R,q[22]=b,q[23]=m;else m=q[23];let p;if(q[24]!==P)p=(h)=>P(h),q[24]=P,q[25]=p;else p=q[25];let y;if(q[26]!==Z||q[27]!==m||q[28]!==p)y=z(F,{flexDirection:"column",gap:1,children:[T,z(D,{options:m,onChange:p,onCancel:Z},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[26]=Z,q[27]=m,q[28]=p,q[29]=y;else y=q[29];let S;if(q[30]!==Z||q[31]!==y||q[32]!==B)S=z(j,{title:"Updates to Consumer Terms and Policies",color:"professionalBlue",onCancel:Z,inputGuide:Wq,children:[B,y]},void 0,!0,void 0,this),q[30]=Z,q[31]=y,q[32]=B,q[33]=S;else S=q[33];return S}function Wq(J){return J.pending?z(U,{children:["Press ",J.keyName," again to exit"]},void 0,!0,void 0,this):z(d,{children:[z(f,{shortcut:"Enter",action:"confirm"},void 0,!1,void 0,this),z(f,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function _q(J){let q=v(17),{settings:W,domainExcluded:X,onDone:Y}=J,[M,O]=r(W.grove_enabled),Q;if(q[0]===Symbol.for("react.memo_cache_sentinel"))Q=[],q[0]=Q;else Q=q[0];Uq.useEffect(Fq,Q);let A;if(q[1]!==X||q[2]!==M)A=async(Z,k)=>{if(!X&&(k.tab||k.return||Z===" ")){let _=!M;O(_),await C(_)}},q[1]=X,q[2]=M,q[3]=A;else A=q[3];V(A);let N;if(q[4]===Symbol.for("react.memo_cache_sentinel"))N=z(U,{color:"error",children:"false"},void 0,!1,void 0,this),q[4]=N;else N=q[4];let K=N;if(X){let Z;if(q[5]===Symbol.for("react.memo_cache_sentinel"))Z=z(U,{color:"error",children:"false (for emails with your domain)"},void 0,!1,void 0,this),q[5]=Z;else Z=q[5];K=Z}else if(M){let Z;if(q[6]===Symbol.for("react.memo_cache_sentinel"))Z=z(U,{color:"success",children:"true"},void 0,!1,void 0,this),q[6]=Z;else Z=q[6];K=Z}let H;if(q[7]!==X)H=(Z)=>Z.pending?z(U,{children:["Press ",Z.keyName," again to exit"]},void 0,!0,void 0,this):X?z(f,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this):z(d,{children:[z(f,{shortcut:"Enter/Tab/Space",action:"toggle"},void 0,!1,void 0,this),z(f,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[7]=X,q[8]=H;else H=q[8];let P;if(q[9]===Symbol.for("react.memo_cache_sentinel"))P=z(U,{children:["Review and manage your privacy settings at"," ",z(I,{url:"https://claude.ai/settings/data-privacy-controls"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[9]=P;else P=q[9];let L;if(q[10]===Symbol.for("react.memo_cache_sentinel"))L=z(F,{width:44,children:z(U,{bold:!0,children:"Help improve Claude"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[10]=L;else L=q[10];let R;if(q[11]!==K)R=z(F,{children:[L,z(F,{children:K},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[11]=K,q[12]=R;else R=q[12];let G;if(q[13]!==Y||q[14]!==H||q[15]!==R)G=z(j,{title:"Data Privacy",color:"professionalBlue",onCancel:Y,inputGuide:H,children:[P,R]},void 0,!0,void 0,this),q[13]=Y,q[14]=H,q[15]=R,q[16]=G;else G=q[16];return G}function Fq(){w("tengu_grove_privacy_settings_viewed",{})}var Yq=` _____________
3
3
  | \\ \\
4
4
  | NEW TERMS \\__\\
5
5
  | |
@@ -10,4 +10,4 @@ import{Ep as D,Oq as i,Pq as E,Qq as C,Sq as a,Tq as s,Vq as Jq,dr as Qq}from"./
10
10
  | ---------- |
11
11
  | |
12
12
  |______________|`;var Nq=$(()=>{o();e();Jq();Qq();qq();zq();t()});
13
- export{kq as Db,_q as Eb,Nq as Fb};
13
+ export{kq as Gb,_q as Hb,Nq as Ib};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{IP as j,JP as z,KP as u,MP as T,NP as Y,mQ as e,nQ as S}from"./cli-5wh173wa.js";import{Zca as v,gaa as p}from"./cli-w754xmyv.js";import{bda as t}from"./cli-x514vyva.js";import{useImperativeHandle as H,useRef as w,useState as D}from"react";import{jsxDEV as M}from"react/jsx-dev-runtime";function J({children:k,ref:h,stickyScroll:n,...r}){let q=w(null),[,a]=D(0),P=w(new Set),K=w(!1),o=()=>{for(let _ of P.current)_()};function O(_){if(p(),j(_),T(),o(),K.current)return;K.current=!0,queueMicrotask(()=>{K.current=!1,z(_)})}return H(h,()=>({scrollTo(_){let $=q.current;if(!$)return;$.stickyScroll=!1,$.pendingScrollDelta=void 0,$.scrollAnchor=void 0,$.scrollTop=Math.max(0,Math.floor(_)),O($)},scrollToElement(_,$=0){let f=q.current;if(!f)return;f.stickyScroll=!1,f.pendingScrollDelta=void 0,f.scrollAnchor={el:_,offset:$},O(f)},scrollBy(_){let $=q.current;if(!$)return;$.stickyScroll=!1,$.scrollAnchor=void 0,$.pendingScrollDelta=($.pendingScrollDelta??0)+Math.floor(_),O($)},scrollToBottom(){let _=q.current;if(!_)return;_.pendingScrollDelta=void 0,_.stickyScroll=!0,j(_),o(),a(($)=>$+1)},getScrollTop(){return q.current?.scrollTop??0},getPendingDelta(){return q.current?.pendingScrollDelta??0},getScrollHeight(){return q.current?.scrollHeight??0},getFreshScrollHeight(){return q.current?.childNodes[0]?.yogaNode?.getComputedHeight()??q.current?.scrollHeight??0},getViewportHeight(){return q.current?.scrollViewportHeight??0},getViewportTop(){return q.current?.scrollViewportTop??0},isSticky(){let _=q.current;if(!_)return!1;return _.stickyScroll??Boolean(_.attributes.stickyScroll)},subscribe(_){return P.current.add(_),()=>P.current.delete(_)},setClampBounds(_,$){let f=q.current;if(!f)return;f.scrollClampMin=_,f.scrollClampMax=$}}),[]),M("ink-box",{ref:(_)=>{if(q.current=_,_)_.scrollTop??=0},style:{flexWrap:"nowrap",flexDirection:r.flexDirection??"row",flexGrow:r.flexGrow??0,flexShrink:r.flexShrink??1,...r,overflowX:"scroll",overflowY:"scroll"},...n?{stickyScroll:!0}:{},children:M(e,{flexDirection:"column",flexGrow:1,flexShrink:0,width:"100%",children:k},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var d;var X=t(()=>{v();u();Y();S();d=J});
3
- export{d as Tf,X as Uf};
2
+ import{FP as j,GP as z,HP as u,JP as T,KP as Y,jQ as e,kQ as S}from"./cli-x8xgga1a.js";import{bda as v,kaa as p}from"./cli-3ac555qw.js";import{fda as t}from"./cli-w1d8n9g3.js";import{useImperativeHandle as H,useRef as w,useState as D}from"react";import{jsxDEV as M}from"react/jsx-dev-runtime";function J({children:k,ref:h,stickyScroll:n,...r}){let q=w(null),[,a]=D(0),P=w(new Set),K=w(!1),o=()=>{for(let _ of P.current)_()};function O(_){if(p(),j(_),T(),o(),K.current)return;K.current=!0,queueMicrotask(()=>{K.current=!1,z(_)})}return H(h,()=>({scrollTo(_){let $=q.current;if(!$)return;$.stickyScroll=!1,$.pendingScrollDelta=void 0,$.scrollAnchor=void 0,$.scrollTop=Math.max(0,Math.floor(_)),O($)},scrollToElement(_,$=0){let f=q.current;if(!f)return;f.stickyScroll=!1,f.pendingScrollDelta=void 0,f.scrollAnchor={el:_,offset:$},O(f)},scrollBy(_){let $=q.current;if(!$)return;$.stickyScroll=!1,$.scrollAnchor=void 0,$.pendingScrollDelta=($.pendingScrollDelta??0)+Math.floor(_),O($)},scrollToBottom(){let _=q.current;if(!_)return;_.pendingScrollDelta=void 0,_.stickyScroll=!0,j(_),o(),a(($)=>$+1)},getScrollTop(){return q.current?.scrollTop??0},getPendingDelta(){return q.current?.pendingScrollDelta??0},getScrollHeight(){return q.current?.scrollHeight??0},getFreshScrollHeight(){return q.current?.childNodes[0]?.yogaNode?.getComputedHeight()??q.current?.scrollHeight??0},getViewportHeight(){return q.current?.scrollViewportHeight??0},getViewportTop(){return q.current?.scrollViewportTop??0},isSticky(){let _=q.current;if(!_)return!1;return _.stickyScroll??Boolean(_.attributes.stickyScroll)},subscribe(_){return P.current.add(_),()=>P.current.delete(_)},setClampBounds(_,$){let f=q.current;if(!f)return;f.scrollClampMin=_,f.scrollClampMax=$}}),[]),M("ink-box",{ref:(_)=>{if(q.current=_,_)_.scrollTop??=0},style:{flexWrap:"nowrap",flexDirection:r.flexDirection??"row",flexGrow:r.flexGrow??0,flexShrink:r.flexShrink??1,...r,overflowX:"scroll",overflowY:"scroll"},...n?{stickyScroll:!0}:{},children:M(e,{flexDirection:"column",flexGrow:1,flexShrink:0,width:"100%",children:k},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var d;var X=t(()=>{v();u();Y();S();d=J});
3
+ export{d as Wf,X as Xf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Ep as H,dr as G}from"./cli-5pb6kdxn.js";import{$L as M,aM as u}from"./cli-2vc9kv40.js";import{IQ as $,iR as e}from"./cli-5wh173wa.js";import{K3 as Y,e4 as T}from"./cli-9hskw92e.js";e();T();G();u();import{c as X}from"react/compiler-runtime";import{jsxDEV as f}from"react/jsx-dev-runtime";function R(m){let q=X(17),{customApiKeyTruncated:_,onDone:O}=m,r;if(q[0]!==_||q[1]!==O)r=function(W){q:switch(W){case"yes":{Y((P)=>({...P,customApiKeyResponses:{...P.customApiKeyResponses,approved:[...P.customApiKeyResponses?.approved??[],_]}})),O(!0);break q}case"no":Y((P)=>({...P,customApiKeyResponses:{...P.customApiKeyResponses,rejected:[...P.customApiKeyResponses?.rejected??[],_]}})),O(!1)}},q[0]=_,q[1]=O,q[2]=r;else r=q[2];let K=r,w;if(q[3]!==K)w=()=>K("no"),q[3]=K,q[4]=w;else w=q[4];let j;if(q[5]===Symbol.for("react.memo_cache_sentinel"))j=f($,{bold:!0,children:"ANTHROPIC_API_KEY"},void 0,!1,void 0,this),q[5]=j;else j=q[5];let p;if(q[6]!==_)p=f($,{children:[j,f($,{children:[": sk-ant-...",_]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q[6]=_,q[7]=p;else p=q[7];let h;if(q[8]===Symbol.for("react.memo_cache_sentinel"))h=f($,{children:"Do you want to use this API key?"},void 0,!1,void 0,this),q[8]=h;else h=q[8];let v;if(q[9]===Symbol.for("react.memo_cache_sentinel"))v={label:"Yes",value:"yes"},q[9]=v;else v=q[9];let o;if(q[10]===Symbol.for("react.memo_cache_sentinel"))o=[v,{label:f($,{children:["No (",f($,{bold:!0,children:"recommended"},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this),value:"no"}],q[10]=o;else o=q[10];let z;if(q[11]!==K)z=f(H,{defaultValue:"no",defaultFocusValue:"no",options:o,onChange:(k)=>K(k),onCancel:()=>K("no")},void 0,!1,void 0,this),q[11]=K,q[12]=z;else z=q[12];let a;if(q[13]!==w||q[14]!==p||q[15]!==z)a=f(M,{title:"Detected a custom API key in your environment",color:"warning",onCancel:w,children:[p,h,z]},void 0,!0,void 0,this),q[13]=w,q[14]=p,q[15]=z,q[16]=a;else a=q[16];return a}
2
+ import{Ep as H,dr as G}from"./cli-me4e2p3e.js";import{YL as M,ZL as u}from"./cli-xfsqvp8r.js";import{FQ as $,fR as e}from"./cli-x8xgga1a.js";import{Q3 as T,u3 as Y}from"./cli-msmzt4c3.js";e();T();G();u();import{c as X}from"react/compiler-runtime";import{jsxDEV as f}from"react/jsx-dev-runtime";function R(m){let q=X(17),{customApiKeyTruncated:_,onDone:O}=m,r;if(q[0]!==_||q[1]!==O)r=function(W){q:switch(W){case"yes":{Y((P)=>({...P,customApiKeyResponses:{...P.customApiKeyResponses,approved:[...P.customApiKeyResponses?.approved??[],_]}})),O(!0);break q}case"no":Y((P)=>({...P,customApiKeyResponses:{...P.customApiKeyResponses,rejected:[...P.customApiKeyResponses?.rejected??[],_]}})),O(!1)}},q[0]=_,q[1]=O,q[2]=r;else r=q[2];let K=r,w;if(q[3]!==K)w=()=>K("no"),q[3]=K,q[4]=w;else w=q[4];let j;if(q[5]===Symbol.for("react.memo_cache_sentinel"))j=f($,{bold:!0,children:"ANTHROPIC_API_KEY"},void 0,!1,void 0,this),q[5]=j;else j=q[5];let p;if(q[6]!==_)p=f($,{children:[j,f($,{children:[": sk-ant-...",_]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q[6]=_,q[7]=p;else p=q[7];let h;if(q[8]===Symbol.for("react.memo_cache_sentinel"))h=f($,{children:"Do you want to use this API key?"},void 0,!1,void 0,this),q[8]=h;else h=q[8];let v;if(q[9]===Symbol.for("react.memo_cache_sentinel"))v={label:"Yes",value:"yes"},q[9]=v;else v=q[9];let o;if(q[10]===Symbol.for("react.memo_cache_sentinel"))o=[v,{label:f($,{children:["No (",f($,{bold:!0,children:"recommended"},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this),value:"no"}],q[10]=o;else o=q[10];let z;if(q[11]!==K)z=f(H,{defaultValue:"no",defaultFocusValue:"no",options:o,onChange:(k)=>K(k),onCancel:()=>K("no")},void 0,!1,void 0,this),q[11]=K,q[12]=z;else z=q[12];let a;if(q[13]!==w||q[14]!==p||q[15]!==z)a=f(M,{title:"Detected a custom API key in your environment",color:"warning",onCancel:w,children:[p,h,z]},void 0,!0,void 0,this),q[13]=w,q[14]=p,q[15]=z,q[16]=a;else a=q[16];return a}
3
3
  export{R as H};