claude-code-best 2.5.0 → 2.6.5

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 (614) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-BYyM_V0q.js +1 -0
  2. package/dist/chunks/App-BboadKdn.js +1 -0
  3. package/dist/chunks/ApproveApiKey-BLp4742y.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DiEe4eui.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-B88DM0Oq.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-ByraVuXh.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-BDvmz12S.js +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-B6XNhFqq.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-B4ocUjev.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-BNhlq7_K.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-BvaB9b0y.js +1 -0
  12. package/dist/chunks/DesktopHandoff-S-w4bs5T.js +1 -0
  13. package/dist/chunks/DevChannelsDialog-BljR0X9X.js +1 -0
  14. package/dist/chunks/Dialog-DYFGqyDs.js +1 -0
  15. package/dist/chunks/DiffDialog-BhQ2QaLW.js +3 -0
  16. package/dist/chunks/Doctor-BXb0qv6n.js +3 -0
  17. package/dist/chunks/Doctor-C5DYPEGl.js +1 -0
  18. package/dist/chunks/ExitFlow-CSBDxw9H.js +2 -0
  19. package/dist/chunks/Feedback-DwHzc4UT.js +2 -0
  20. package/dist/chunks/Grove-DSXRnXKv.js +11 -0
  21. package/dist/chunks/Grove-DnTo982-.js +1 -0
  22. package/dist/chunks/HybridTransport-CuT3KI5e.js +4 -0
  23. package/dist/chunks/ITermBackend-mokGZVH_.js +1 -0
  24. package/dist/chunks/InProcessTransport-DB52dh4f.js +1 -0
  25. package/dist/chunks/InvalidConfigDialog-Bi4RKYlk.js +1 -0
  26. package/dist/chunks/InvalidSettingsDialog-0zKo4-so.js +1 -0
  27. package/dist/chunks/ListItem-OFARanN7.js +1 -0
  28. package/dist/chunks/MCPConnectionManager-DYGoS1Ht.js +1 -0
  29. package/dist/chunks/McpParsingWarnings-EzgsOoHw.js +1 -0
  30. package/dist/chunks/MessageSelector-DTmUuEKJ.js +3 -0
  31. package/dist/chunks/Messages-DWiKTx5o.js +11 -0
  32. package/dist/chunks/Onboarding-odmthwzz.js +1 -0
  33. package/dist/chunks/OverageCreditUpsell-Cpk_5Lv0.js +1 -0
  34. package/dist/chunks/PermissionDialog-5MlJf7ew.js +1 -0
  35. package/dist/chunks/PluginSettings-eYcWehI8.js +17 -0
  36. package/dist/chunks/PressEnterToContinue-BdA9zDGs.js +1 -0
  37. package/dist/chunks/PromptInputFooterSuggestions-DrrkNOuS.js +1 -0
  38. package/dist/chunks/PromptInputHelpMenu-DMsF4D6d.js +1 -0
  39. package/dist/chunks/QueryEngine-C_KZts4y.js +1 -0
  40. package/dist/chunks/REPL-C6YR0VKU.js +1 -0
  41. package/dist/chunks/REPL-DzHz-LOY.js +97 -0
  42. package/dist/chunks/RemoteCallout-CnpCWRPk.js +1 -0
  43. package/dist/chunks/RemoteSessionManager-OWg_Yccq.js +2 -0
  44. package/dist/chunks/ResumeConversation-BktSnsCm.js +1 -0
  45. package/dist/chunks/SSETransport-BpnapvlK.js +4 -0
  46. package/dist/chunks/SearchBox-DfOmUoaI.js +1 -0
  47. package/dist/chunks/SearchExtraToolsTool-CqFD8vVS.js +1 -0
  48. package/dist/chunks/SentryErrorBoundary-BUirJRWU.js +1 -0
  49. package/dist/chunks/SentryErrorBoundary-C-NlfQZw.js +2 -0
  50. package/dist/chunks/Settings-vfFvcweR.js +2 -0
  51. package/dist/chunks/TeleportProgress-CYXay2ZL.js +1 -0
  52. package/dist/chunks/TeleportRepoMismatchDialog-_zbZTvcJ.js +1 -0
  53. package/dist/chunks/TeleportResumeWrapper-DiHQeZIM.js +1 -0
  54. package/dist/chunks/ThemePicker-BRh027fA.js +1 -0
  55. package/dist/chunks/TmuxBackend-BaX2U7iZ.js +9 -0
  56. package/dist/chunks/TrustDialog-CVbzrv6g.js +1 -0
  57. package/dist/chunks/TungstenTool-C5IqKVr0.js +1 -0
  58. package/dist/chunks/TungstenTool-V-Bwqlx3.js +1 -0
  59. package/dist/chunks/ValidationErrorsList-CdCUgfIl.js +2 -0
  60. package/dist/chunks/WelcomeV2-DCXcYd2x.js +1 -0
  61. package/dist/chunks/WindowsTerminalBackend-BE9NX5IH.js +2 -0
  62. package/dist/chunks/add-dir-ldGd3Ppz.js +1 -0
  63. package/dist/chunks/agentDisplay-CVnAeURF.js +1 -0
  64. package/dist/chunks/agents-C08NzRZx.js +2 -0
  65. package/dist/chunks/agents-DH5fmbVw.js +103 -0
  66. package/dist/chunks/ajv-B_OpU_Uh.js +8 -0
  67. package/dist/chunks/analytics-DqMQntaB.js +1 -0
  68. package/dist/chunks/ant-DJren1Aa.js +1 -0
  69. package/dist/chunks/api-6tcwJlf_.js +1 -0
  70. package/dist/chunks/api-CGOR_Xfl.js +1 -0
  71. package/dist/chunks/asciicast-aoKFhc7C.js +1 -0
  72. package/dist/chunks/asciicast-o5Zg4dJt.js +4 -0
  73. package/dist/chunks/assistant-BlzrMSkM.js +1 -0
  74. package/dist/chunks/assistant-CwbhlCM-.js +1 -0
  75. package/dist/chunks/assistant-aWkDcurV.js +1 -0
  76. package/dist/chunks/attributionHooks-PygdohOh.js +1 -0
  77. package/dist/chunks/attributionTrailer-BpvhXgRP.js +1 -0
  78. package/dist/chunks/auth-CSB2RDKF.js +1 -0
  79. package/dist/chunks/auth-GxZhOvQ1.js +1 -0
  80. package/dist/chunks/autoMode-CWvZs1jO.js +45 -0
  81. package/dist/chunks/autoModeDenials-Cp6VFdsm.js +1 -0
  82. package/dist/chunks/autonomy-BkVcSMCZ.js +19 -0
  83. package/dist/chunks/autonomy-DK42aJYt.js +1 -0
  84. package/dist/chunks/autonomyPanel-Cn4IhXgE.js +1 -0
  85. package/dist/chunks/axios-DLnc2dVy.js +1 -0
  86. package/dist/chunks/axios-DhfaybwJ.js +12 -0
  87. package/dist/chunks/backgroundHousekeeping-BIZTAYho.js +17 -0
  88. package/dist/chunks/backgroundHousekeeping-Csh58CxV.js +1 -0
  89. package/dist/chunks/banner-CVXH2xts.js +2 -0
  90. package/dist/chunks/base64-js-DIVSFswY.js +1 -0
  91. package/dist/chunks/bedrockClient-qi1-JCOK.js +15 -0
  92. package/dist/chunks/bg-DK0E4ZtW.js +9 -0
  93. package/dist/chunks/bg-Dbh5z3Y8.js +1 -0
  94. package/dist/chunks/branch-juox_fko.js +3 -0
  95. package/dist/chunks/break-cache-ByJ7U2Ts.js +8 -0
  96. package/dist/chunks/bridge-DudsCZkh.js +2 -0
  97. package/dist/chunks/bridgeConfig-D4tpc568.js +1 -0
  98. package/dist/chunks/bridgeConfig-lRZfQqmA.js +1 -0
  99. package/dist/chunks/bridgeEnabled-B8_c_Ppq.js +1 -0
  100. package/dist/chunks/bridgeEnabled-D2IykaHE.js +1 -0
  101. package/dist/chunks/bridgeMain-C5RDihlX.js +68 -0
  102. package/dist/chunks/bridgeMain-D7_lg2iJ.js +1 -0
  103. package/dist/chunks/bridgeMessaging-CqNURC4-.js +1 -0
  104. package/dist/chunks/bridgePointer-FvAMj3re.js +1 -0
  105. package/dist/chunks/browser-fLRXxIsQ.js +1 -0
  106. package/dist/chunks/btw-DKlE3Dea.js +1 -0
  107. package/dist/chunks/buddy-DQYgHR63.js +3 -0
  108. package/dist/chunks/bundledMode-kSQejuY4.js +1 -0
  109. package/dist/chunks/bypassPermissionsKillswitch-Bof-UtM-.js +1 -0
  110. package/dist/chunks/caches-B5QZDncQ.js +3 -0
  111. package/dist/chunks/caches-dGk7xsDu.js +1 -0
  112. package/dist/chunks/capacityWake-BXlUpptF.js +1 -0
  113. package/dist/chunks/ccrClient-BaWg4E9-.js +1 -0
  114. package/dist/chunks/ccshareResume-DWLjTF22.js +1 -0
  115. package/dist/chunks/changeDetector-DoLfg8a6.js +1 -0
  116. package/dist/chunks/channelNotification-B7A-9DIl.js +1 -0
  117. package/dist/chunks/channelNotification-DDErroWn.js +1 -0
  118. package/dist/chunks/chokidar-BcI3rIKm.js +1 -0
  119. package/dist/chunks/chokidar-SzksMqYp.js +1 -0
  120. package/dist/chunks/chrome-jMAks7-w.js +1 -0
  121. package/dist/chunks/chromeNativeHost-4U39yLtd.js +1 -0
  122. package/dist/chunks/chunk-DR8-3Aex.js +1 -0
  123. package/dist/chunks/classPrivateFieldSet2-EAQNhHs8.js +1 -0
  124. package/dist/chunks/claudeDesktop-D0S1eq1F.js +1 -0
  125. package/dist/chunks/cleanup-Bg_gFgcj.js +1 -0
  126. package/dist/chunks/clear-OudnCGa7.js +1 -0
  127. package/dist/chunks/cliLaunch-BQa48gsr.js +1 -0
  128. package/dist/chunks/client-CPn1wQyc.js +7 -0
  129. package/dist/chunks/client-DxDmXXTh.js +1 -0
  130. package/dist/chunks/client-_sjL0I7A.js +35 -0
  131. package/dist/chunks/color-DG_R5-hl.js +1 -0
  132. package/dist/chunks/color-convert-ULbeSgNC.js +1 -0
  133. package/dist/chunks/commands-BWIOEBPs.js +1 -0
  134. package/dist/chunks/commitAttribution-BA4fcbHf.js +1 -0
  135. package/dist/chunks/commitAttribution-C22a3OCi.js +2 -0
  136. package/dist/chunks/common-B379wT22.js +1 -0
  137. package/dist/chunks/common-B_BC3eMY.js +1 -0
  138. package/dist/chunks/common-CMCv4N_v.js +1 -0
  139. package/dist/chunks/compact-BWvnb4or.js +3 -0
  140. package/dist/chunks/companion-Bkn2lSLj.js +1 -0
  141. package/dist/chunks/completionCache-DHfUBBMH.js +1 -0
  142. package/dist/chunks/completionCache-DORrtxkS.js +4 -0
  143. package/dist/chunks/computerUseLock-BjoDJH2h.js +1 -0
  144. package/dist/chunks/config-BvpTbJ5p.js +1 -0
  145. package/dist/chunks/config-D-dzD6n-.js +1 -0
  146. package/dist/chunks/connectHeadless-CwsFt-Mh.js +1 -0
  147. package/dist/chunks/constants-41VpZw2G.js +1 -0
  148. package/dist/chunks/context-DzNahdyP.js +1 -0
  149. package/dist/chunks/context-noninteractive-CM1-lUSe.js +1 -0
  150. package/dist/chunks/context-noninteractive-yiyJriiw.js +54 -0
  151. package/dist/chunks/controlMessageCompat-BJhFiS7u.js +1 -0
  152. package/dist/chunks/conversation-DKlz47xf.js +1 -0
  153. package/dist/chunks/conversation-cUxdb8MN.js +1 -0
  154. package/dist/chunks/copy-9k9JPRqW.js +7 -0
  155. package/dist/chunks/createSSHSession-BZf-Loo5.js +6 -0
  156. package/dist/chunks/createSession-BuJcoBAj.js +1 -0
  157. package/dist/chunks/createSession-kiTHYXSL.js +1 -0
  158. package/dist/chunks/cron-DiW7eIPP.js +1 -0
  159. package/dist/chunks/cronJitterConfig-CYP7yrQu.js +6 -0
  160. package/dist/chunks/crossProjectResume-BJisir9Z.js +40 -0
  161. package/dist/chunks/cwd--iizewsn.js +1 -0
  162. package/dist/chunks/cwd-BgpSJxd7.js +1 -0
  163. package/dist/chunks/daemon-VYRit6Aq.js +2 -0
  164. package/dist/chunks/dangerousBackend-BU_PHGR2.js +1 -0
  165. package/dist/chunks/datadog-Bg-zL-i7.js +1 -0
  166. package/dist/chunks/datadog-CVeFkaQu.js +1 -0
  167. package/dist/chunks/debug-DM5ezCBS.js +1 -0
  168. package/dist/chunks/debug-UI3T040K.js +5 -0
  169. package/dist/chunks/debugUtils-BBMFODKH.js +1 -0
  170. package/dist/chunks/defineProperty-80gRi2ZW.js +1 -0
  171. package/dist/chunks/desktop-DpaStjc-.js +1 -0
  172. package/dist/chunks/detached-D300jlhj.js +5 -0
  173. package/dist/chunks/detect-libc-DNuQfUvI.js +1 -0
  174. package/dist/chunks/detectRepository-CBk3S2zv.js +1 -0
  175. package/dist/chunks/detectRepository-DCTvg4p0.js +1 -0
  176. package/dist/chunks/detection-CQsNad64.js +1 -0
  177. package/dist/chunks/detection-DJ-vTbBf.js +1 -0
  178. package/dist/chunks/diff-N_VSBo3Z.js +1 -0
  179. package/dist/chunks/directoryCompletion-DP_4B1GL.js +1 -0
  180. package/dist/chunks/dist-CanSxOZ1.js +5 -0
  181. package/dist/chunks/dist-Cg1a1Exw.js +29 -0
  182. package/dist/chunks/dist-Q7YNoZ0H.js +20 -0
  183. package/dist/chunks/dist-es-4z5T3Jzm.js +1 -0
  184. package/dist/chunks/dist-es-B2jg52tM2.js +1 -0
  185. package/dist/chunks/dist-es-B6OXHQ1S.js +1 -0
  186. package/dist/chunks/dist-es-B8NEy5hc.js +1 -0
  187. package/dist/chunks/dist-es-BVGppqE4.js +1 -0
  188. package/dist/chunks/dist-es-Bcw5GZko.js +1 -0
  189. package/dist/chunks/dist-es-BoIJpncb.js +9 -0
  190. package/dist/chunks/dist-es-Bu_Fshi1.js +1 -0
  191. package/dist/chunks/dist-es-C-1vn4OP2.js +1 -0
  192. package/dist/chunks/dist-es-C41b_0B5.js +1 -0
  193. package/dist/chunks/dist-es-CCZYybbG2.js +1 -0
  194. package/dist/chunks/dist-es-CLK1mey-.js +1 -0
  195. package/dist/chunks/dist-es-CQz2aNf72.js +1 -0
  196. package/dist/chunks/dist-es-CSfI8B8l.js +1 -0
  197. package/dist/chunks/dist-es-CUZBYppo.js +1 -0
  198. package/dist/chunks/dist-es-CZkzHpjF.js +1 -0
  199. package/dist/chunks/dist-es-Cbf0_D8d.js +5 -0
  200. package/dist/chunks/dist-es-ChHe-SVL.js +1 -0
  201. package/dist/chunks/dist-es-ClYOf0My.js +1 -0
  202. package/dist/chunks/dist-es-D-kJbj4A2.js +1 -0
  203. package/dist/chunks/dist-es-D1LN6CJd.js +1 -0
  204. package/dist/chunks/dist-es-DC1sC3ph.js +1 -0
  205. package/dist/chunks/dist-es-DGn8uOwQ2.js +1 -0
  206. package/dist/chunks/dist-es-DK5fTeKM2.js +1 -0
  207. package/dist/chunks/dist-es-DN7otr6F.js +1 -0
  208. package/dist/chunks/dist-es-DPM0mPK5.js +1 -0
  209. package/dist/chunks/dist-es-DqZAh3nG.js +1 -0
  210. package/dist/chunks/dist-es-DuAZyxJ02.js +5 -0
  211. package/dist/chunks/dist-es-HVQrM0oE.js +1 -0
  212. package/dist/chunks/dist-es-OVleIB54.js +1 -0
  213. package/dist/chunks/dist-es-UAs0rdXg.js +1 -0
  214. package/dist/chunks/dist-es-WvMMuHmx2.js +1 -0
  215. package/dist/chunks/dist-es-fjXft-jH.js +1 -0
  216. package/dist/chunks/dist-es-hdN_ShpZ.js +3 -0
  217. package/dist/chunks/dist-es-neiUvMJb.js +1 -0
  218. package/dist/chunks/dist-es-yMYpDtui2.js +1 -0
  219. package/dist/chunks/dist-es-zjcbuB72.js +1 -0
  220. package/dist/chunks/distRoot-CcxmnzqQ.js +1 -0
  221. package/dist/chunks/doctor-CUWjbh1X.js +1 -0
  222. package/dist/chunks/earlyInput-JGJo1zcC.js +1 -0
  223. package/dist/chunks/earlyInput-tRkbxFv2.js +2 -0
  224. package/dist/chunks/effort-loH1TUvE.js +9 -0
  225. package/dist/chunks/entry-D58E-E6Y.js +14 -0
  226. package/dist/chunks/env-chR0gV31.js +1 -0
  227. package/dist/chunks/envLessBridgeConfig-CT8sdmFu.js +1 -0
  228. package/dist/chunks/envLessBridgeConfig-SPEr9oqO.js +1 -0
  229. package/dist/chunks/envUtils-BWeoiL4Y.js +1 -0
  230. package/dist/chunks/escHotkey-Cyz0yyh1.js +259 -0
  231. package/dist/chunks/esm--xjzB1hI.js +1 -0
  232. package/dist/chunks/esm-B2HIF0XY.js +1 -0
  233. package/dist/chunks/esm-BGQPWnJy.js +1 -0
  234. package/dist/chunks/esm-C-1qL9Mn.js +1 -0
  235. package/dist/chunks/esm-C3jcs1DH.js +1 -0
  236. package/dist/chunks/esm-C97WL9nC.js +1 -0
  237. package/dist/chunks/esm-CIL-SKM8.js +1 -0
  238. package/dist/chunks/esm-CJlBxjtx.js +1 -0
  239. package/dist/chunks/esm-CsGLyWmS.js +56 -0
  240. package/dist/chunks/esm-DQHmDm-H.js +1 -0
  241. package/dist/chunks/esm-DcdOXSzi.js +1 -0
  242. package/dist/chunks/esm-DhNYgGTV.js +1 -0
  243. package/dist/chunks/esm-DxPW7qPs.js +1 -0
  244. package/dist/chunks/esm-FBUWr3vI.js +1 -0
  245. package/dist/chunks/esm-QgL6y---.js +10 -0
  246. package/dist/chunks/esm-v0kPjgVS.js +1 -0
  247. package/dist/chunks/esm-vIn-YV_h.js +1 -0
  248. package/dist/chunks/event-streams-BV7ngMXu.js +1 -0
  249. package/dist/chunks/eventLoopStallDetector-Dnh1fc31.js +1 -0
  250. package/dist/chunks/execAsync-BkA6ogic.js +1 -0
  251. package/dist/chunks/execFileNoThrow-CuQN1sz8.js +1 -0
  252. package/dist/chunks/execSyncWrapper-C2XQnFVo.js +1 -0
  253. package/dist/chunks/execa-CGue6Z3n.js +34 -0
  254. package/dist/chunks/executor-4EeD8GNm.js +1561 -0
  255. package/dist/chunks/executor-BHEuNh5F.js +1 -0
  256. package/dist/chunks/exit-D-tuPpbx.js +1 -0
  257. package/dist/chunks/exit-_obETqBv.js +2 -0
  258. package/dist/chunks/export-BIZ_SPXJ.js +2 -0
  259. package/dist/chunks/exportRenderer-CWPSMaqM.js +1 -0
  260. package/dist/chunks/extra-usage-CCMwIa85.js +1 -0
  261. package/dist/chunks/extra-usage-core-BNW4VT7o.js +1 -0
  262. package/dist/chunks/extra-usage-noninteractive-B_WjXO1E.js +1 -0
  263. package/dist/chunks/extra-usage-rdJ7ecEb.js +1 -0
  264. package/dist/chunks/extraUsage-CNMMTNJi.js +1 -0
  265. package/dist/chunks/extractMemories-BrvZVsmM.js +1 -0
  266. package/dist/chunks/fast-CG1v3fRr.js +1 -0
  267. package/dist/chunks/fast-CLKKsx2H.js +1 -0
  268. package/dist/chunks/featureCheck-Cm0YNDXO.js +1 -0
  269. package/dist/chunks/featureCheck-p7OeCYzj.js +1 -0
  270. package/dist/chunks/feedback-CG4mS_-B.js +1 -0
  271. package/dist/chunks/figures-gfT9mM8P.js +1 -0
  272. package/dist/chunks/fileStateCache-C7-TxF8G.js +1 -0
  273. package/dist/chunks/files-DYvAZGxp.js +2 -0
  274. package/dist/chunks/firstPartyEventLogger-Y_jAnHoR.js +1 -0
  275. package/dist/chunks/flushGate-COPcye5f.js +1 -0
  276. package/dist/chunks/foundry-sdk-BFN5VDFQ.js +1 -0
  277. package/dist/chunks/fpsMetrics-DeezdcwV.js +1 -0
  278. package/dist/chunks/fuse-Ch_OAlm3.js +1 -0
  279. package/dist/chunks/gates-CSHuXnUx.js +1 -0
  280. package/dist/chunks/gates-CSKxLmMJ.js +1 -0
  281. package/dist/chunks/gemini-B3uSLiNp.js +1 -0
  282. package/dist/chunks/generateRecap-D7rG3jIm.js +1 -0
  283. package/dist/chunks/generateSessionName-zbqanivg.js +1 -0
  284. package/dist/chunks/genericProcessUtils-BGvcwuPt.js +23 -0
  285. package/dist/chunks/getMachineId-bsd-BMtYGBUL.js +1 -0
  286. package/dist/chunks/getMachineId-darwin-CiLdFH7z.js +2 -0
  287. package/dist/chunks/getMachineId-linux-Cr27rIeY.js +1 -0
  288. package/dist/chunks/getMachineId-unsupported-ceiBLwAN.js +1 -0
  289. package/dist/chunks/getMachineId-win-DFTmsQHq.js +1 -0
  290. package/dist/chunks/git-CN3qtTb_.js +6 -0
  291. package/dist/chunks/git-D23Mzu_K.js +1 -0
  292. package/dist/chunks/githubRepoPathMapping-B04nEUDG.js +1 -0
  293. package/dist/chunks/graceful-fs-Cgc0rjGF.js +2 -0
  294. package/dist/chunks/grok-CDOpos8E.js +1 -0
  295. package/dist/chunks/growthbook-C_EY78Sn.js +1 -0
  296. package/dist/chunks/hash-BRmOQc3c.js +1 -0
  297. package/dist/chunks/heapdump-CpmhJ55b.js +5 -0
  298. package/dist/chunks/help-EHn2neTv.js +1 -0
  299. package/dist/chunks/hooks-BFdX17Za.js +1 -0
  300. package/dist/chunks/hooks-BV6HqbU4.js +79 -0
  301. package/dist/chunks/hostAdapter-_SmFAVNf.js +1 -0
  302. package/dist/chunks/hostGuard-zim_4F9V.js +1 -0
  303. package/dist/chunks/httpAuthSchemes-Wq4XWeLL.js +13 -0
  304. package/dist/chunks/ide-DkN0KdTR.js +2 -0
  305. package/dist/chunks/inboundAttachments-BVUunfAX.js +1 -0
  306. package/dist/chunks/inboundAttachments-DnGQw7Pf.js +1 -0
  307. package/dist/chunks/index.min-BJnb9GQI.js +1 -0
  308. package/dist/chunks/initReplBridge-tPRGPBq7.js +1 -0
  309. package/dist/chunks/insights-Bs9kJDG6.js +822 -0
  310. package/dist/chunks/install-CFX_ph9z.js +1 -0
  311. package/dist/chunks/install-github-app-CvRjY1Wi.js +147 -0
  312. package/dist/chunks/install-slack-app-DjhnVSe0.js +1 -0
  313. package/dist/chunks/instinctParser-DHMa8xa0.js +1 -0
  314. package/dist/chunks/instrumentation-c5zlOWom.js +12 -0
  315. package/dist/chunks/intl-Pse97ORk.js +1 -0
  316. package/dist/chunks/isObject-DaxDnPKm.js +1 -0
  317. package/dist/chunks/isSymbol-Dp3irZaY.js +1 -0
  318. package/dist/chunks/job-3QwLq609.js +2 -0
  319. package/dist/chunks/json-bigint-OxRwRvup.js +8 -0
  320. package/dist/chunks/jsx-runtime-D-D469L8.js +1 -0
  321. package/dist/chunks/jws-2vqRyZtR.js +3 -0
  322. package/dist/chunks/jwtUtils-CpXwh_du.js +1 -0
  323. package/dist/chunks/keybindings-7mDm3UKD.js +2 -0
  324. package/dist/chunks/lang-DyyjY20G.js +1 -0
  325. package/dist/chunks/language-CPRGmY8Q.js +1 -0
  326. package/dist/chunks/language-Cf6bMI4N.js +1 -0
  327. package/dist/chunks/launchAgentsPlatform-CpsMsTqQ.js +1 -0
  328. package/dist/chunks/launchAutofixPr-D9h6YAZY.js +2 -0
  329. package/dist/chunks/launchCommand-Du91jxMC.js +1 -0
  330. package/dist/chunks/launchLocalMemory-DlYQcEQJ.js +3 -0
  331. package/dist/chunks/launchLocalVault-CP0AyPjj.js +3 -0
  332. package/dist/chunks/launchMemoryStores-BHoDFkJ5.js +1 -0
  333. package/dist/chunks/launchOnboarding-CFTNXcnc.js +8 -0
  334. package/dist/chunks/launchSchedule-5KQr6x_A.js +1 -0
  335. package/dist/chunks/launchSkillStore-D0yGuE68.js +1 -0
  336. package/dist/chunks/launchTeleport-DRKnXOwY.js +3 -0
  337. package/dist/chunks/launchVault-XA-zAswX.js +1 -0
  338. package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
  339. package/dist/chunks/lib-B4Q0Nrpb.js +14 -0
  340. package/dist/chunks/lib-Ca3QWJjN.js +2 -0
  341. package/dist/chunks/lib-inCisXen.js +8 -0
  342. package/dist/chunks/loadAgentsDir-DCyiY0MN.js +1 -0
  343. package/dist/chunks/loadAgentsDir-DI1a76pd.js +4601 -0
  344. package/dist/chunks/loadPluginHooks-C0Ei-0E2.js +1 -0
  345. package/dist/chunks/loadSso-sDs471GC.js +1 -0
  346. package/dist/chunks/localSearch-CDOJNc_E.js +1 -0
  347. package/dist/chunks/localSearch-MBx7KzC2.js +1 -0
  348. package/dist/chunks/lockfile-DBwdlC3K.js +1 -0
  349. package/dist/chunks/log-CzsijfHZ.js +1 -0
  350. package/dist/chunks/login-D8UKKaud.js +1 -0
  351. package/dist/chunks/login-nwTOoyxv.js +1 -0
  352. package/dist/chunks/logoV2Utils-DDUoPClc.js +1 -0
  353. package/dist/chunks/logout-B0BjqlGi.js +1 -0
  354. package/dist/chunks/magicDocs-CmUlOWjI.js +57 -0
  355. package/dist/chunks/main-C6be1KFk.js +31 -0
  356. package/dist/chunks/main-CeG_nUsC.js +1108 -0
  357. package/dist/chunks/mappers-CJ8IO1o1.js +1 -0
  358. package/dist/chunks/mcp-CanCqnch.js +2 -0
  359. package/dist/chunks/mcp-Dq0kxZFx.js +6 -0
  360. package/dist/chunks/mcp-zbxZM9BP.js +1 -0
  361. package/dist/chunks/mcpServer-DPHQVYdC.js +1 -0
  362. package/dist/chunks/mcpServer-lIneUZ5p.js +1 -0
  363. package/dist/chunks/memoize-DNnuA2aU.js +1 -0
  364. package/dist/chunks/memoize-DxwLawI2.js +1 -0
  365. package/dist/chunks/memory-BcWBkKV8.js +1 -0
  366. package/dist/chunks/mobile-umu5P0cM.js +2 -0
  367. package/dist/chunks/modalContext-CmSKRyea.js +1 -0
  368. package/dist/chunks/model-DJLzVvcF.js +1 -0
  369. package/dist/chunks/model-H3rtl6eR.js +1 -0
  370. package/dist/chunks/normalization-Cox8C0dP.js +1 -0
  371. package/dist/chunks/oauth-CdZEzMww.js +1 -0
  372. package/dist/chunks/oauth-CmensepG.js +1 -0
  373. package/dist/chunks/observationStore-tvkldXUo.js +4 -0
  374. package/dist/chunks/onChangeAppState-Dxbl8fvk.js +1 -0
  375. package/dist/chunks/open-CDditBQ-.js +1 -0
  376. package/dist/chunks/openai-DkYK4THc.js +10 -0
  377. package/dist/chunks/openaiShared-D5lOejS1.js +16 -0
  378. package/dist/chunks/output-style-XDb9-2Kk.js +1 -0
  379. package/dist/chunks/overageCreditGrant-DLKadMYU.js +1 -0
  380. package/dist/chunks/p-map-9Ud1LOrJ.js +1 -0
  381. package/dist/chunks/p-map-D7WEmnBE.js +1 -0
  382. package/dist/chunks/package-BhL7chzt.js +1 -0
  383. package/dist/chunks/panel-ByW1omJn.js +1 -0
  384. package/dist/chunks/panel-Bz_8td5D.js +1 -0
  385. package/dist/chunks/parseConnectUrl-BS6i9JPo.js +1 -0
  386. package/dist/chunks/parser-CmngCwjB.js +1 -0
  387. package/dist/chunks/parser-SWIZo39J.js +1 -0
  388. package/dist/chunks/passes-BIfuerjL.js +1 -0
  389. package/dist/chunks/path-C4kbwvSH.js +1 -0
  390. package/dist/chunks/paths-BBvuDQl9.js +39 -0
  391. package/dist/chunks/permissions-DXLfdE7b.js +1 -0
  392. package/dist/chunks/permissions-Ps_D01ZB.js +1 -0
  393. package/dist/chunks/permissions-S2EvIRKj.js +3 -0
  394. package/dist/chunks/pipeTransport-DVoIA1uN.js +1 -0
  395. package/dist/chunks/plan--lnWxB3Q.js +1 -0
  396. package/dist/chunks/platform-CuyedWpe.js +2 -0
  397. package/dist/chunks/plist-BO4ZqMZc.js +6 -0
  398. package/dist/chunks/plugin-DWLyrLw4.js +1 -0
  399. package/dist/chunks/pluginAutoupdate-CGXIWBrb.js +1 -0
  400. package/dist/chunks/pluginBlocklist-DJrMdzT0.js +1 -0
  401. package/dist/chunks/pluginCliCommands-C08q9dHk.js +1 -0
  402. package/dist/chunks/pluginFlagging-Dggxke70.js +1 -0
  403. package/dist/chunks/pluginOperations-CNCImIe8.js +2 -0
  404. package/dist/chunks/pluginStartupCheck-BW2fjg2P.js +1 -0
  405. package/dist/chunks/pluginStartupCheck-DpxQPXJE.js +1 -0
  406. package/dist/chunks/plugins-DQ3CRWWO.js +4 -0
  407. package/dist/chunks/policyLimits-BotYrS-v.js +1 -0
  408. package/dist/chunks/pollConfig-DAQ-ives.js +1 -0
  409. package/dist/chunks/poller-Ds0Y6Cir.js +1 -0
  410. package/dist/chunks/poor-DqfrQT61.js +1 -0
  411. package/dist/chunks/poorMode-DEAe3hiK.js +1 -0
  412. package/dist/chunks/poorMode-DzYT47KW.js +1 -0
  413. package/dist/chunks/postCommitAttribution-Ehmwzzuq.js +1 -0
  414. package/dist/chunks/print-GGVp62vj.js +39 -0
  415. package/dist/chunks/privacy-settings-agwqjYJo.js +1 -0
  416. package/dist/chunks/process-CWupreF6.js +1 -0
  417. package/dist/chunks/process-DMKLUQIO.js +1 -0
  418. package/dist/chunks/processBashCommand-DHHN8Ca4.js +1 -0
  419. package/dist/chunks/processSlashCommand-COtIO6Jy.js +6 -0
  420. package/dist/chunks/projectContext-0fpRKUeH.js +1 -0
  421. package/dist/chunks/projectContext-eXMSfgdZ.js +1 -0
  422. package/dist/chunks/prompt-4tea6NJQ.js +54 -0
  423. package/dist/chunks/prompt-CO160cIr.js +1 -0
  424. package/dist/chunks/prompt-CjFAtm3w.js +222 -0
  425. package/dist/chunks/prompt-GY9hlRvI.js +1 -0
  426. package/dist/chunks/promptEditor-EgosPsy-.js +4 -0
  427. package/dist/chunks/protocolHandler-mtPUT9U0.js +13 -0
  428. package/dist/chunks/protocols-CAyQOlkr.js +7 -0
  429. package/dist/chunks/proxy-CfZp-wce.js +99 -0
  430. package/dist/chunks/rate-limit-options-C6SFOHue.js +1 -0
  431. package/dist/chunks/rcDebugLog-CPKZCtR8.js +11 -0
  432. package/dist/chunks/referral-DeDr9zAE.js +1 -0
  433. package/dist/chunks/refresh-D7pdoY_X.js +1 -0
  434. package/dist/chunks/registerProtocol-BZBH8Zgl.js +36 -0
  435. package/dist/chunks/registry-Dz6AbiYP.js +1 -0
  436. package/dist/chunks/release-notes-DiUNOrg9.js +4 -0
  437. package/dist/chunks/releaseNotes-CnhQit0y.js +2 -0
  438. package/dist/chunks/reload-plugins-Dx52GcaG.js +1 -0
  439. package/dist/chunks/remote-env-B67Oo3sI.js +1 -0
  440. package/dist/chunks/remoteBridgeCore-BzSUgPbt.js +1 -0
  441. package/dist/chunks/remoteControlServer-L8smP7Zu.js +3 -0
  442. package/dist/chunks/rename-C4PauyTZ.js +1 -0
  443. package/dist/chunks/renderOptions-BiyC2rj1.js +1 -0
  444. package/dist/chunks/resume-CrSn26xq.js +2 -0
  445. package/dist/chunks/rewind-CXplHgh_.js +1 -0
  446. package/dist/chunks/rollback-DbSpxmJE.js +11 -0
  447. package/dist/chunks/runtimeObserver-YNy3mIb7.js +1 -0
  448. package/dist/chunks/runtimeObserver-nAhH4Wca.js +10 -0
  449. package/dist/chunks/sandbox-adapter-CzwHes1i.js +1 -0
  450. package/dist/chunks/sandbox-toggle-BYqbcI5d.js +1 -0
  451. package/dist/chunks/sanitization-CYp-9DbE.js +1 -0
  452. package/dist/chunks/satisfies-BaHgd_ie.js +1 -0
  453. package/dist/chunks/schemas-BGAvj1T4.js +40 -0
  454. package/dist/chunks/sdk-DEtgRZvI.js +1 -0
  455. package/dist/chunks/sdkHeapDumpMonitor--fevrC5z.js +1 -0
  456. package/dist/chunks/searchExtraTools-CcpdCO6l.js +1 -0
  457. package/dist/chunks/semver-Cq33BYay.js +1 -0
  458. package/dist/chunks/semver-Tw0AFar5.js +1 -0
  459. package/dist/chunks/sentry-BNVxoVLS.js +13 -0
  460. package/dist/chunks/server-C5XZSlto.js +1 -0
  461. package/dist/chunks/server-DzOdtq8A.js +1 -0
  462. package/dist/chunks/serverBanner-WlSYP-f8.js +1 -0
  463. package/dist/chunks/serverLog-DtsUvDiY.js +1 -0
  464. package/dist/chunks/session-BuEmHrqM.js +2 -0
  465. package/dist/chunks/sessionDataUploader-Ctjo1bgR.js +1 -0
  466. package/dist/chunks/sessionDiscovery-Mcsfa0g-.js +1 -0
  467. package/dist/chunks/sessionFileAccessHooks-qnNiGMnE.js +1 -0
  468. package/dist/chunks/sessionManager-Dw72ZUTg.js +1 -0
  469. package/dist/chunks/sessionMemory-CMahwDdW.js +1 -0
  470. package/dist/chunks/sessionMemory-pFSn4HSN.js +1 -0
  471. package/dist/chunks/sessionMemoryUtils-Du5jUl7M.js +1 -0
  472. package/dist/chunks/sessionObserver-DG2zQgfi.js +20 -0
  473. package/dist/chunks/sessionObserver-Je868MC9.js +1 -0
  474. package/dist/chunks/sessionStorage-D3FhAADV.js +1 -0
  475. package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +3 -0
  476. package/dist/chunks/sessionTitle-zUVSAHO7.js +14 -0
  477. package/dist/chunks/sessionTracing-DoRJ4nSa.js +11 -0
  478. package/dist/chunks/settingsSync-B9bz77E1.js +1 -0
  479. package/dist/chunks/setup-B1JbPepL.js +9 -0
  480. package/dist/chunks/setup-CCOLlRtP.js +1 -0
  481. package/dist/chunks/setup-DWkSjA49.js +2 -0
  482. package/dist/chunks/shadowedRuleDetection-BBR3uEgx.js +1 -0
  483. package/dist/chunks/shellQuote-DgjT8KBA.js +1 -0
  484. package/dist/chunks/sideQuestion-DHW5rgKz.js +20 -0
  485. package/dist/chunks/signin-QEeYpJZw.js +1 -0
  486. package/dist/chunks/sink-DxDOsLa2.js +1 -0
  487. package/dist/chunks/sink-cQOgsnw3.js +1 -0
  488. package/dist/chunks/sinks-BrrTUxkC.js +2 -0
  489. package/dist/chunks/sinks-Djiz_5-Z.js +1 -0
  490. package/dist/chunks/skill-learning-C0nOKZfg.js +5 -0
  491. package/dist/chunks/skillChangeDetector-D8C-uQSQ.js +1 -0
  492. package/dist/chunks/skillGapStore-Czi5jKjJ.js +1 -0
  493. package/dist/chunks/skillGapStore-_YuJP5KI.js +5 -0
  494. package/dist/chunks/skillGenerator-kbaRbpqJ.js +8 -0
  495. package/dist/chunks/skillLearning-3KWrBczS.js +1 -0
  496. package/dist/chunks/skillLearning-DBbdGbk-.js +1 -0
  497. package/dist/chunks/skillPanel-BxDvlPzd.js +28 -0
  498. package/dist/chunks/skillSearchPanel-D-MX6Qgt.js +21 -0
  499. package/dist/chunks/skills-NpEgFkFZ.js +1 -0
  500. package/dist/chunks/slashCommandParsing-Cari0pNg.js +1 -0
  501. package/dist/chunks/sleep-8Eb9j_Ly.js +1 -0
  502. package/dist/chunks/sprites-DD4eIkN7.js +1 -0
  503. package/dist/chunks/src-BIPP3_mo.js +26 -0
  504. package/dist/chunks/src-BJz1KAd_.js +6 -0
  505. package/dist/chunks/src-BRAdBA8A.js +1 -0
  506. package/dist/chunks/src-BRC_BuUP.js +1 -0
  507. package/dist/chunks/src-BaB-bpCj.js +5 -0
  508. package/dist/chunks/src-BlLavFUS.js +7 -0
  509. package/dist/chunks/src-C5yhFG0C.js +19 -0
  510. package/dist/chunks/src-CI_jaaBj.js +2 -0
  511. package/dist/chunks/src-CRsA-Z4y.js +1 -0
  512. package/dist/chunks/src-CYLfL70h.js +1 -0
  513. package/dist/chunks/src-DJXCzwyJ.js +1 -0
  514. package/dist/chunks/src-DJXKJavk.js +1 -0
  515. package/dist/chunks/src-Di342QoJ.js +53 -0
  516. package/dist/chunks/src-DsMd9Q9e.js +2 -0
  517. package/dist/chunks/src-DzH9IdOo.js +1 -0
  518. package/dist/chunks/src-hdbPEvzO.js +9 -0
  519. package/dist/chunks/src-poaoYkuc.js +1 -0
  520. package/dist/chunks/src-x7u_sB6m.js +1 -0
  521. package/dist/chunks/sso-oidc-BX1MlBX0.js +1 -0
  522. package/dist/chunks/startupProfiler-DnXZaX4A.js +3 -0
  523. package/dist/chunks/startupProfiler-SOE--nM9.js +1 -0
  524. package/dist/chunks/state-B2GIOsTB.js +1 -0
  525. package/dist/chunks/state-Ce1HlR-H.js +1 -0
  526. package/dist/chunks/state-sIHsFpDu.js +1 -0
  527. package/dist/chunks/staticRender-Br64h1E1.js +1 -0
  528. package/dist/chunks/stats-xL3NHwhp.js +1 -0
  529. package/dist/chunks/status-B5E70xRv.js +1 -0
  530. package/dist/chunks/statusNoticeHelpers-DcssRhLw.js +1 -0
  531. package/dist/chunks/stdio-BEEzuxaZ.js +1 -0
  532. package/dist/chunks/stdio-D4cT86R0.js +3 -0
  533. package/dist/chunks/stickers-2K05wjSp.js +1 -0
  534. package/dist/chunks/store-DhI7Lcan.js +1 -0
  535. package/dist/chunks/sts-BDFJ-6QE.js +1 -0
  536. package/dist/chunks/subprocessEnv-CggQWZCx.js +1 -0
  537. package/dist/chunks/subprocessEnv-DV6q6o6w.js +1 -0
  538. package/dist/chunks/supports-color-lkzOMQ6u.js +1 -0
  539. package/dist/chunks/systemPromptSections-BcN_XBTx.js +1 -0
  540. package/dist/chunks/systemPromptSections-DB93ZNWP.js +1 -0
  541. package/dist/chunks/systemTheme-dDbitcxB.js +1 -0
  542. package/dist/chunks/tag-BELr-qIa.js +11 -0
  543. package/dist/chunks/tasks-CrdWcSt-.js +1 -0
  544. package/dist/chunks/teamHelpers--3ZyNDlv.js +1 -0
  545. package/dist/chunks/teamHelpers-CUAiXng3.js +1 -0
  546. package/dist/chunks/teammate-DMYOtLTK.js +1 -0
  547. package/dist/chunks/teammateModeSnapshot-C6EWhR0X.js +1 -0
  548. package/dist/chunks/teammateModeSnapshot-DOQMTKbQ.js +1 -0
  549. package/dist/chunks/teleport-LXFOan9C.js +1 -0
  550. package/dist/chunks/templateJobs-8IY2Cgig.js +12 -0
  551. package/dist/chunks/terminalSetup-C4psrmpb.js +1 -0
  552. package/dist/chunks/terminalSetup-Lyg4NbGA.js +33 -0
  553. package/dist/chunks/theme-B8GNnJ_q.js +1 -0
  554. package/dist/chunks/thinkback-DPXwEK3B.js +1 -0
  555. package/dist/chunks/thinkback-DZW3Mcx_.js +1 -0
  556. package/dist/chunks/thinkback-play-BMOE-ceh.js +1 -0
  557. package/dist/chunks/tmux-CvbhsfwG.js +1 -0
  558. package/dist/chunks/toolEventObserver-D0TSHm01.js +1 -0
  559. package/dist/chunks/toolEventObserver-DzLd0MSn.js +1 -0
  560. package/dist/chunks/toolPool-DVOfpjDz.js +1 -0
  561. package/dist/chunks/toolPool-Dq-Vtvrj.js +1 -0
  562. package/dist/chunks/trustedDevice-1iTu4LEm.js +1 -0
  563. package/dist/chunks/trustedDevice-BvYYXfd8.js +1 -0
  564. package/dist/chunks/tui-BVc2q4Xv.js +6 -0
  565. package/dist/chunks/turndown.es-Bv06VjMb.js +69 -0
  566. package/dist/chunks/types-CQ1wrnQ0.js +1 -0
  567. package/dist/chunks/types-Csi32ZXh.js +17 -0
  568. package/dist/chunks/types-RJTEOuIt.js +3 -0
  569. package/dist/chunks/udsClient-BvG_Jip0.js +1 -0
  570. package/dist/chunks/ultrareviewCommand-BTXAN2wP.js +3 -0
  571. package/dist/chunks/undercover-C_44e3oN.js +1 -0
  572. package/dist/chunks/undercover-DvvnEmsX.js +31 -0
  573. package/dist/chunks/up-D-U4wUCe.js +12 -0
  574. package/dist/chunks/updateCCB-C-qfLi0j.js +11 -0
  575. package/dist/chunks/upgrade-CGXa5Dwy.js +1 -0
  576. package/dist/chunks/upgrade-DTBZSxwv.js +1 -0
  577. package/dist/chunks/upload-BF8tf_Eo.js +1 -0
  578. package/dist/chunks/upstreamproxy-DcLeL2XX.js +11 -0
  579. package/dist/chunks/usage-BRYRRgNt.js +1 -0
  580. package/dist/chunks/usage-DvSTXEYY.js +1 -0
  581. package/dist/chunks/useKeybinding-FsOnjW6T.js +1 -0
  582. package/dist/chunks/useMainLoopModel-CwvuTRXn.js +1 -0
  583. package/dist/chunks/useManagePlugins-GmnI9K53.js +1 -0
  584. package/dist/chunks/useMergedTools-Dah5KDMi.js +1 -0
  585. package/dist/chunks/useSearchInput-BV_azHiA.js +1 -0
  586. package/dist/chunks/useSettingsErrors-C-j_Zt7g.js +1 -0
  587. package/dist/chunks/useVoice-DR69NLxp.js +1 -0
  588. package/dist/chunks/util-BpyJ4Bom.js +1 -0
  589. package/dist/chunks/utils-CrZcpypC.js +1 -0
  590. package/dist/chunks/v4-f1i_CNUT.js +1 -0
  591. package/dist/chunks/validatePlugin-vptAYuYu.js +1 -0
  592. package/dist/chunks/vertex-sdk-CSGw3fvU.js +9 -0
  593. package/dist/chunks/vim-DvOw8dfR.js +1 -0
  594. package/dist/chunks/voice-B3BZs53f.js +2 -0
  595. package/dist/chunks/voice-DXiiy8HX.js +8 -0
  596. package/dist/chunks/voiceModeEnabled-DA76xN1Q.js +1 -0
  597. package/dist/chunks/voiceModeEnabled-DIveLYGb.js +1 -0
  598. package/dist/chunks/voiceStreamSTT-_w1VjIOs.js +1 -0
  599. package/dist/chunks/voiceStreamSTT-hpzWd_zl.js +1 -0
  600. package/dist/chunks/which-DqSAIvp2.js +1 -0
  601. package/dist/chunks/windowsPaths-C9CigqoF.js +1 -0
  602. package/dist/chunks/windowsPaths-swxCp7bX.js +2 -0
  603. package/dist/chunks/workSecret-mS2OrpxF.js +1 -0
  604. package/dist/chunks/workerRegistry-2_MZVih1.js +1 -0
  605. package/dist/chunks/worktree-CCuDwRmS.js +1 -0
  606. package/dist/chunks/worktreeModeEnabled-Db6b_Iy_.js +1 -0
  607. package/dist/chunks/worktreeModeEnabled-THQb19xR.js +1 -0
  608. package/dist/chunks/wrapper-BSK0MCQH.js +1 -0
  609. package/dist/chunks/wrapper-D5qL1aQL.js +6 -0
  610. package/dist/chunks/xdg-CBxMmQux.js +1 -0
  611. package/dist/chunks/xml-Dx--sNE1.js +1 -0
  612. package/dist/chunks/zod-DT6hytkp.js +1 -0
  613. package/dist/cli.js +1 -10978
  614. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,f as r,t as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{$t as o,Da as s,S as c,Zt as l,_ as u,ka as d,on as f,tn as p}from"./paths-BBvuDQl9.js";import{n as m,r as h}from"./analytics-DqMQntaB.js";import{Dx as g,Ig as _,Lg as v,Ox as y,Rg as b,da as x,fa as S,zg as C}from"./loadAgentsDir-DI1a76pd.js";import{n as w,t as T}from"./extra-usage-CCMwIa85.js";import{n as E,t as D}from"./upgrade-DTBZSxwv.js";function O({onDone:e,context:t}){let[n,i]=(0,A.useState)(null),a=v(),c=p(),d=o(),f=l()?.hasExtraUsageEnabled===!0,m=c===`max`&&d===`default_claude_max_20x`,_=c===`team`||c===`enterprise`,y=u(`tengu_jade_anvil_4`,!1),x=(0,A.useMemo)(()=>{let e=[];if(b.isEnabled()){let t=s(),n=_&&!t,r=a.overageDisabledReason===`out_of_credits`||a.overageDisabledReason===`org_level_disabled_until`||a.overageDisabledReason===`org_service_zero_credit_limit`;if(!(n&&r)){let t=a.overageStatus===`rejected`||a.overageStatus===`allowed_warning`,r;r=n?t?`Request more`:`Request extra usage`:f?`Add funds to continue with extra usage`:`Switch to extra usage`,e.push({label:r,value:`extra-usage`})}}!m&&!_&&S.isEnabled()&&e.push({label:`Upgrade your plan`,value:`upgrade`});let t={label:`Stop and wait for limit to reset`,value:`cancel`};return y?[...e,t]:[t,...e]},[y,m,_,f,a.overageStatus,a.overageDisabledReason]);function C(){h(`tengu_rate_limit_options_menu_cancel`,{}),e(void 0,{display:`skip`})}function w(n){n===`upgrade`?(h(`tengu_rate_limit_options_menu_select_upgrade`,{}),D(e,t).then(e=>{e&&i(e)})):n===`extra-usage`?(h(`tengu_rate_limit_options_menu_select_extra_usage`,{}),T(e,t).then(e=>{e&&i(e)})):n===`cancel`&&C()}return n||(0,j.jsx)(r,{title:`What do you want to do?`,onCancel:C,color:`suggestion`,children:(0,j.jsx)(g,{options:x,onChange:w,visibleOptionCount:x.length})})}async function k(e,t){return(0,j.jsx)(O,{onDone:e,context:t})}var A,j;e((()=>{A=t(n(),1),y(),i(),c(),m(),_(),f(),d(),w(),C(),x(),E(),j=a()}))();export{k as call};
@@ -0,0 +1,11 @@
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{Ct as i,U as a,br as o,cn as s,wt as c}from"./state-sIHsFpDu.js";import{ea as l,na as u,ra as d,ta as f}from"./paths-BBvuDQl9.js";import{L as p,V as m,X as h,Y as g,d as _,h as ee,p as te,s as ne}from"./debug-UI3T040K.js";import{F as v,P as re}from"./git-CN3qtTb_.js";import{join as ie}from"node:path";import{appendFileSync as ae,existsSync as oe,mkdirSync as se}from"node:fs";import{homedir as ce}from"node:os";import{randomUUID as y}from"crypto";var le=e((()=>{})),ue,de=e((()=>{ue={input_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0,output_tokens:0,server_tool_use:{web_search_requests:0,web_fetch_requests:0},service_tier:`standard`,cache_creation:{ephemeral_1h_input_tokens:0,ephemeral_5m_input_tokens:0},inference_geo:``,iterations:[],speed:`standard`}})),fe=e((()=>{}));function pe(e){return e}var me=e((()=>{})),he=e((()=>{le(),de(),fe(),me()}));function ge(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function _e(e){if(process.env.OPENAI_MODEL)return process.env.OPENAI_MODEL;let t=e.replace(/\[1m\]$/,``),n=ge(t);if(n){let e=`OPENAI_DEFAULT_${n.toUpperCase()}_MODEL`,t=process.env[e];if(t)return t;let r=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i}return ve[t]??t}var ve,ye=e((()=>{ve={"claude-sonnet-4-20250514":`gpt-4o`,"claude-sonnet-4-5-20250929":`gpt-4o`,"claude-sonnet-4-6":`gpt-4o`,"claude-opus-4-20250514":`o3`,"claude-opus-4-1-20250805":`o3`,"claude-opus-4-5-20251101":`o3`,"claude-opus-4-6":`o3`,"claude-haiku-4-5-20251001":`gpt-4o-mini`,"claude-3-5-haiku-20241022":`gpt-4o-mini`,"claude-3-7-sonnet-20250219":`gpt-4o`,"claude-3-5-sonnet-20241022":`gpt-4o`}}));function be(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function xe(){let e=process.env.GROK_MODEL_MAP;if(!e)return null;try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return t}catch{}return null}function Se(e){if(process.env.GROK_MODEL)return process.env.GROK_MODEL;let t=e.replace(/\[1m\]$/,``),n=be(t),r=xe();if(r&&n&&r[n])return r[n];if(n){let e=`GROK_DEFAULT_${n.toUpperCase()}_MODEL`,t=process.env[e];if(t)return t;let r=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i}return b[t]?b[t]:n&&x[n]?x[n]:t}var b,x,Ce=e((()=>{b={"claude-sonnet-4-20250514":`grok-3-mini-fast`,"claude-sonnet-4-5-20250929":`grok-3-mini-fast`,"claude-sonnet-4-6":`grok-3-mini-fast`,"claude-opus-4-20250514":`grok-4.20-reasoning`,"claude-opus-4-1-20250805":`grok-4.20-reasoning`,"claude-opus-4-5-20251101":`grok-4.20-reasoning`,"claude-opus-4-6":`grok-4.20-reasoning`,"claude-haiku-4-5-20251001":`grok-3-mini-fast`,"claude-3-5-haiku-20241022":`grok-3-mini-fast`,"claude-3-7-sonnet-20250219":`grok-3-mini-fast`,"claude-3-5-sonnet-20241022":`grok-3-mini-fast`},x={opus:`grok-4.20-reasoning`,sonnet:`grok-3-mini-fast`,haiku:`grok-3-mini-fast`}}));function we(e){return/haiku/i.test(e)?`haiku`:/opus/i.test(e)?`opus`:/sonnet/i.test(e)?`sonnet`:null}function Te(e){if(process.env.GEMINI_MODEL)return process.env.GEMINI_MODEL;let t=e.replace(/\[1m\]$/i,``),n=we(t);if(!n)return t;let r=`GEMINI_DEFAULT_${n.toUpperCase()}_MODEL`,i=process.env[r];if(i)return i;let a=`ANTHROPIC_DEFAULT_${n.toUpperCase()}_MODEL`,o=process.env[a];if(o)return o;throw Error(`Gemini provider requires GEMINI_MODEL or ${r} (or ${a} for backward compatibility) to be configured.`)}var Ee=e((()=>{})),S,De=e((()=>{S=`_geminiThoughtSignature`}));function C(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Oe(e,t){let n=[],r=new Map;for(let t of e){if(t.type===`assistant`){let e=Me(t);e.parts.length>0&&n.push(e);let i=t.message.content;if(Array.isArray(i))for(let e of i)typeof e!=`string`&&e.type===`tool_use`&&r.set(e.id,e.name);continue}if(t.type===`user`){let e=Ae(t,r);e.parts.length>0&&n.push(e)}}let i=ke(t);return{contents:n,...i?{systemInstruction:{parts:[{text:i}]}}:{}}}function ke(e){return!e||e.length===0?``:e.filter(Boolean).join(`
2
+
3
+ `)}function Ae(e,t){let n=e.message.content;return typeof n==`string`?{role:`user`,parts:w(n)}:Array.isArray(n)?{role:`user`,parts:n.flatMap(e=>je(e,t))}:{role:`user`,parts:[]}}function je(e,t){if(typeof e==`string`)return w(e);if(e.type===`text`)return w(e.text);if(e.type===`tool_result`){let n=e;return[{functionResponse:{name:t.get(n.tool_use_id)??n.tool_use_id,response:Fe(n)}}]}if(e.type===`image`){let t=e.source;if(t?.type===`base64`&&typeof t.data==`string`)return[{inlineData:{mimeType:t.media_type||`image/png`,data:t.data}}];if(t?.type===`url`&&typeof t.url==`string`)return w(`[image: ${t.url}]`)}return[]}function Me(e){let t=e.message.content;if(typeof t==`string`)return{role:`model`,parts:w(t)};if(!Array.isArray(t))return{role:`model`,parts:[]};let n=[];for(let e of t){if(typeof e==`string`){n.push(...w(e));continue}if(e.type===`text`){n.push(...w(e.text,T(e)));continue}if(e.type===`thinking`){let t=Ne(e.thinking,e.signature);t&&n.push(t);continue}if(e.type===`tool_use`){let t=e;n.push({functionCall:{name:t.name,args:Pe(t.input)},...T(e)&&{thoughtSignature:T(e)}})}}return{role:`model`,parts:n}}function w(e,t){return typeof e!=`string`||e.length===0?[]:[{text:e,...t&&{thoughtSignature:t}}]}function Ne(e,t){if(!(typeof e!=`string`||e.length===0))return{text:e,thought:!0,...t&&{thoughtSignature:t}}}function Pe(e){if(typeof e==`string`){let t=C(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:t===null?{}:{value:t}}return e&&typeof e==`object`&&!Array.isArray(e)?e:e===void 0?{}:{value:e}}function Fe(e){let t=Ie(e.content);return t&&typeof t==`object`&&!Array.isArray(t)?e.is_error?{...t,is_error:!0}:t:{result:t,...e.is_error?{is_error:!0}:{}}}function Ie(e){if(typeof e==`string`)return C(e)??e;if(Array.isArray(e)){let t=e.map(e=>typeof e==`string`?e:e&&typeof e==`object`&&`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
4
+ `);return C(t)??t}return e??``}function T(e){let t=e[S];return typeof t==`string`&&t.length>0?t:void 0}var Le=e((()=>{De()}));function Re(e){if(typeof e==`string`)return D.has(e)?e:void 0;if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`&&D.has(e)),n=Array.from(new Set(t));return n.length===0?void 0:n.length===1?n[0]:n}}function ze(e){if(e===null)return`null`;if(Array.isArray(e))return`array`;if(typeof e==`string`)return`string`;if(typeof e==`boolean`)return`boolean`;if(typeof e==`number`)return Number.isInteger(e)?`integer`:`number`;if(typeof e==`object`)return`object`}function Be(e){let t=e.map(ze).filter(e=>e!==void 0),n=Array.from(new Set(t));if(n.length!==0)return n.length===1?n[0]:n}function Ve(e){return e===void 0?[`null`]:Array.isArray(e)?e.includes(`null`)?e:[...e,`null`]:e===`null`?e:[e,`null`]}function He(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=Object.entries(e).map(([e,t])=>[e,E(t)]).filter(([,e])=>Object.keys(e).length>0);if(t.length!==0)return Object.fromEntries(t)}function Ue(e){if(!Array.isArray(e))return;let t=e.map(e=>E(e)).filter(e=>Object.keys(e).length>0);return t.length>0?t:void 0}function E(e){if(!e||typeof e!=`object`||Array.isArray(e))return{};let t=e,n={},r=Re(t.type);t.const===void 0?Array.isArray(t.enum)&&t.enum.length>0&&(n.enum=t.enum,r=r??Be(t.enum)):(n.enum=[t.const],r=r??ze(t.const)),r||(t.properties&&typeof t.properties==`object`?r=`object`:(t.items!==void 0||t.prefixItems!==void 0)&&(r=`array`)),t.nullable===!0&&(r=Ve(r)),r&&(n.type=r),typeof t.title==`string`&&(n.title=t.title),typeof t.description==`string`&&(n.description=t.description),typeof t.format==`string`&&(n.format=t.format),typeof t.pattern==`string`&&(n.pattern=t.pattern),typeof t.minimum==`number`?n.minimum=t.minimum:typeof t.exclusiveMinimum==`number`&&(n.minimum=t.exclusiveMinimum),typeof t.maximum==`number`?n.maximum=t.maximum:typeof t.exclusiveMaximum==`number`&&(n.maximum=t.exclusiveMaximum),typeof t.minItems==`number`&&(n.minItems=t.minItems),typeof t.maxItems==`number`&&(n.maxItems=t.maxItems),typeof t.minLength==`number`&&(n.minLength=t.minLength),typeof t.maxLength==`number`&&(n.maxLength=t.maxLength),typeof t.minProperties==`number`&&(n.minProperties=t.minProperties),typeof t.maxProperties==`number`&&(n.maxProperties=t.maxProperties);let i=He(t.properties);if(i&&(n.properties=i,n.propertyOrdering=Object.keys(i)),Array.isArray(t.required)){let e=t.required.filter(e=>typeof e==`string`);e.length>0&&(n.required=e)}if(typeof t.additionalProperties==`boolean`)n.additionalProperties=t.additionalProperties;else{let e=E(t.additionalProperties);Object.keys(e).length>0&&(n.additionalProperties=e)}let a=E(t.items);Object.keys(a).length>0&&(n.items=a);let o=Ue(t.prefixItems);o&&(n.prefixItems=o);let s=Ue(t.anyOf??t.oneOf);return s&&(n.anyOf=s),n}function We(e){let t=E(e);return Object.keys(t).length>0?t:{type:`object`,properties:{}}}function Ge(e){let t=e.filter(e=>{let t=e.type;return e.type===`custom`||!(`type`in e)||t!==`server`}).map(e=>{let t=e;return{name:t.name||``,description:t.description||``,parametersJsonSchema:We(t.input_schema??{type:`object`,properties:{}})}});return t.length>0?[{functionDeclarations:t}]:[]}function Ke(e){if(!e||typeof e!=`object`)return;let t=e;switch(t.type){case`auto`:return{mode:`AUTO`};case`any`:return{mode:`ANY`};case`tool`:return{mode:`ANY`,allowedFunctionNames:typeof t.name==`string`?[t.name]:void 0};default:return}}var D,qe=e((()=>{D=new Set([`string`,`number`,`integer`,`boolean`,`object`,`array`,`null`])}));async function*Je(e,t){let n=`msg_${y().replace(/-/g,``).slice(0,24)}`,r=!1,i=!1,a=0,o=null,s=!1,c,l=0,u=0,d=0;for await(let i of e){let e=i.usageMetadata;e&&(l=e.promptTokenCount??l,u=(e.candidatesTokenCount??0)+(e.thoughtsTokenCount??0),d=e.cachedContentTokenCount??d),r||(r=!0,yield{type:`message_start`,message:{id:n,type:`message`,role:`assistant`,content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:l,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:d}}});let f=i.candidates?.[0],p=f?.content?.parts??[];for(let e of p){if(e.functionCall){o&&(yield{type:`content_block_stop`,index:o.index},o=null),s=!0;let t=a++;yield{type:`content_block_start`,index:t,content_block:{type:`tool_use`,id:`toolu_${y().replace(/-/g,``).slice(0,24)}`,name:e.functionCall.name||``,input:{}}},e.thoughtSignature&&(yield{type:`content_block_delta`,index:t,delta:{type:`signature_delta`,signature:e.thoughtSignature}}),e.functionCall.args&&Object.keys(e.functionCall.args).length>0&&(yield{type:`content_block_delta`,index:t,delta:{type:`input_json_delta`,partial_json:JSON.stringify(e.functionCall.args)}}),yield{type:`content_block_stop`,index:t};continue}let t=Ye(e);if(t){(!o||o.type!==t)&&(o&&(yield{type:`content_block_stop`,index:o.index}),o={index:a++,type:t},yield{type:`content_block_start`,index:o.index,content_block:t===`thinking`?{type:`thinking`,thinking:``,signature:``}:{type:`text`,text:``}}),e.text&&(yield{type:`content_block_delta`,index:o.index,delta:t===`thinking`?{type:`thinking_delta`,thinking:e.text}:{type:`text_delta`,text:e.text}}),e.thoughtSignature&&(yield{type:`content_block_delta`,index:o.index,delta:{type:`signature_delta`,signature:e.thoughtSignature}});continue}e.thoughtSignature&&o&&(yield{type:`content_block_delta`,index:o.index,delta:{type:`signature_delta`,signature:e.thoughtSignature}})}f?.finishReason&&(c=f.finishReason)}r&&(o&&(yield{type:`content_block_stop`,index:o.index}),i||(yield{type:`message_delta`,delta:{stop_reason:Xe(c,s),stop_sequence:null},usage:{input_tokens:l,output_tokens:u,cache_creation_input_tokens:0,cache_read_input_tokens:d}},yield{type:`message_stop`},i=!0))}function Ye(e){return typeof e.text==`string`?e.thought?`thinking`:`text`:null}function Xe(e,t){switch(e){case`MAX_TOKENS`:return`max_tokens`;default:return t?`tool_use`:`end_turn`}}var Ze=e((()=>{}));function O(e){if(!e||typeof e!=`object`)return null;let t=e,n=0;for(;t&&n<5;){if(t instanceof Error&&`code`in t&&typeof t.code==`string`){let e=t.code,n=rt.has(e);return{code:e,message:t.message,isSSLError:n}}if(t instanceof Error&&`cause`in t&&t.cause!==t)t=t.cause,n++;else break}return null}function Qe(e){let t=O(e);return t?.isSSLError?`SSL certificate error (${t.code}). If you are behind a corporate proxy or TLS-intercepting firewall, set NODE_EXTRA_CA_CERTS to your CA bundle path, or ask IT to allowlist *.anthropic.com. Run /doctor for details.`:null}function k(e){if(e.includes(`<!DOCTYPE html`)||e.includes(`<html`)){let t=e.match(/<title>([^<]+)<\/title>/);return t&&t[1]?t[1].trim():``}return e}function $e(e){let t=e.message;return t?k(t):``}function et(e){return typeof e==`object`&&!!e&&`error`in e&&typeof e.error==`object`&&e.error!==null}function tt(e){if(!et(e))return null;let t=e.error,n=t?.error?.message;if(typeof n==`string`&&n.length>0){let e=k(n);if(e.length>0)return e}let r=t?.message;if(typeof r==`string`&&r.length>0){let e=k(r);if(e.length>0)return e}return null}function nt(e){let t=O(e);if(t){let{code:e,isSSLError:n}=t;if(e===`ETIMEDOUT`)return`Request timed out. Check your internet connection and proxy settings`;if(n)switch(e){case`UNABLE_TO_VERIFY_LEAF_SIGNATURE`:case`UNABLE_TO_GET_ISSUER_CERT`:case`UNABLE_TO_GET_ISSUER_CERT_LOCALLY`:return`Unable to connect to API: SSL certificate verification failed. Check your proxy or corporate SSL certificates`;case`CERT_HAS_EXPIRED`:return`Unable to connect to API: SSL certificate has expired`;case`CERT_REVOKED`:return`Unable to connect to API: SSL certificate has been revoked`;case`DEPTH_ZERO_SELF_SIGNED_CERT`:case`SELF_SIGNED_CERT_IN_CHAIN`:return`Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates`;case`ERR_TLS_CERT_ALTNAME_INVALID`:case`HOSTNAME_MISMATCH`:return`Unable to connect to API: SSL certificate hostname mismatch`;case`CERT_NOT_YET_VALID`:return`Unable to connect to API: SSL certificate is not yet valid`;default:return`Unable to connect to API: SSL error (${e})`}}if(e.message===`Connection error.`)return t?.code?`Unable to connect to API (${t.code})`:`Unable to connect to API. Check your internet connection`;if(!e.message)return tt(e)??`API error (status ${e.status??`unknown`})`;let n=$e(e);return n!==e.message&&n.length>0?n:e.message}var rt,it=e((()=>{rt=new Set([`UNABLE_TO_VERIFY_LEAF_SIGNATURE`,`UNABLE_TO_GET_ISSUER_CERT`,`UNABLE_TO_GET_ISSUER_CERT_LOCALLY`,`CERT_SIGNATURE_FAILURE`,`CERT_NOT_YET_VALID`,`CERT_HAS_EXPIRED`,`CERT_REVOKED`,`CERT_REJECTED`,`CERT_UNTRUSTED`,`DEPTH_ZERO_SELF_SIGNED_CERT`,`SELF_SIGNED_CERT_IN_CHAIN`,`CERT_CHAIN_TOO_LONG`,`PATH_LENGTH_EXCEEDED`,`ERR_TLS_CERT_ALTNAME_INVALID`,`HOSTNAME_MISMATCH`,`ERR_TLS_HANDSHAKE_TIMEOUT`,`ERR_SSL_WRONG_VERSION_NUMBER`,`ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC`])}));function at(e,t,n){let r=[],i=ot(t);i&&r.push({role:`system`,content:i});for(let t of e)switch(t.type){case`user`:r.push(...st(t));break;case`assistant`:r.push(...lt(t));break;default:break}return r}function ot(e){return!e||e.length===0?``:e.filter(Boolean).join(`
5
+
6
+ `)}function st(e){let t=[],n=e.message.content;if(typeof n==`string`)t.push({role:`user`,content:n});else if(Array.isArray(n)){let e=[],r=[],i=[];for(let t of n)if(typeof t==`string`)e.push(t);else if(t.type===`text`)e.push(t.text);else if(t.type===`tool_result`)r.push(t);else if(t.type===`image`){let e=ut(t);e&&i.push(e)}for(let e of r)t.push(ct(e));if(i.length>0){let n=[];e.length>0&&n.push({type:`text`,text:e.join(`
7
+ `)}),n.push(...i),t.push({role:`user`,content:n})}else e.length>0&&t.push({role:`user`,content:e.join(`
8
+ `)})}return t}function ct(e){let t;return t=typeof e.content==`string`?e.content:Array.isArray(e.content)?e.content.map(e=>typeof e==`string`?e:`text`in e?e.text:``).filter(Boolean).join(`
9
+ `):``,{role:`tool`,tool_call_id:e.tool_use_id,content:t}}function lt(e){let t=e.message.content;if(typeof t==`string`)return[{role:`assistant`,content:t}];if(!Array.isArray(t))return[{role:`assistant`,content:``}];let n=[],r=[],i=[];for(let e of t)if(typeof e==`string`)n.push(e);else if(e.type===`text`)n.push(e.text);else if(e.type===`tool_use`){let t=e;r.push({id:t.id,type:`function`,function:{name:t.name,arguments:typeof t.input==`string`?t.input:JSON.stringify(t.input)}})}else if(e.type===`thinking`){let t=e.thinking;typeof t==`string`&&i.push(t)}return[{role:`assistant`,content:n.length>0?n.join(`
10
+ `):null,...r.length>0&&{tool_calls:r},...i.length>0&&{reasoning_content:i.join(`
11
+ `)}}]}function ut(e){let t=e.source;return t?t.type===`base64`&&typeof t.data==`string`?{type:`image_url`,image_url:{url:`data:${t.media_type||`image/png`};base64,${t.data}`}}:t.type===`url`&&typeof t.url==`string`?{type:`image_url`,image_url:{url:t.url}}:null:null}var dt=e((()=>{}));function ft(e){return e.filter(e=>{let t=e.type;return e.type===`custom`||!(`type`in e)||t!==`server`}).map(e=>{let t=e,n=t.name||``,r=t.description||``,i=t.input_schema;return{type:`function`,function:{name:n,description:r,parameters:A(i||{type:`object`,properties:{}})}}})}function A(e){if(!e||typeof e!=`object`)return e;let t={...e};`const`in t&&(t.enum=[t.const],delete t.const);for(let e of[`properties`,`definitions`,`$defs`,`patternProperties`]){let n=t[e];if(n&&typeof n==`object`){let r={};for(let[e,t]of Object.entries(n))r[e]=t&&typeof t==`object`?A(t):t;t[e]=r}}for(let e of[`items`,`additionalProperties`,`not`,`if`,`then`,`else`,`contains`,`propertyNames`]){let n=t[e];n&&typeof n==`object`&&!Array.isArray(n)&&(t[e]=A(n))}for(let e of[`anyOf`,`oneOf`,`allOf`]){let n=t[e];Array.isArray(n)&&(t[e]=n.map(e=>e&&typeof e==`object`?A(e):e))}return t}function pt(e){if(!e||typeof e!=`object`)return;let t=e;switch(t.type){case`auto`:return`auto`;case`any`:return`required`;case`tool`:return{type:`function`,function:{name:t.name}};default:return}}var mt=e((()=>{}));async function*ht(e,t){let n=`msg_${y().replace(/-/g,``).slice(0,24)}`,r=!1,i=-1,a=new Map,o=!1,s=!1,c=0,l=0,u=0,d=new Set,f=null,p=!1;for await(let m of e){let e=m.choices?.[0],h=e?.delta;if(m.usage){c=m.usage.prompt_tokens??c,l=m.usage.completion_tokens??l;let e=m.usage.prompt_tokens_details;e?.cached_tokens!=null&&(u=e.cached_tokens)}if(r||(r=!0,yield{type:`message_start`,message:{id:n,type:`message`,role:`assistant`,content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:c,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:u}}}),!h)continue;let g=h.reasoning_content;if(g!=null&&(o||(i++,o=!0,d.add(i),yield{type:`content_block_start`,index:i,content_block:{type:`thinking`,thinking:``,signature:``}}),g!==``&&(yield{type:`content_block_delta`,index:i,delta:{type:`thinking_delta`,thinking:g}})),h.content!=null&&h.content!==``&&(s||(o&&(yield{type:`content_block_stop`,index:i},d.delete(i),o=!1),i++,s=!0,d.add(i),yield{type:`content_block_start`,index:i,content_block:{type:`text`,text:``}}),yield{type:`content_block_delta`,index:i,delta:{type:`text_delta`,text:h.content}}),h.tool_calls)for(let e of h.tool_calls){let t=e.index;if(!a.has(t)){o&&(yield{type:`content_block_stop`,index:i},d.delete(i),o=!1),s&&(yield{type:`content_block_stop`,index:i},d.delete(i),s=!1),i++;let n=e.id||`toolu_${y().replace(/-/g,``).slice(0,24)}`,r=e.function?.name||``;a.set(t,{contentIndex:i,id:n,name:r,arguments:``}),d.add(i),yield{type:`content_block_start`,index:i,content_block:{type:`tool_use`,id:n,name:r,input:{}}}}let n=e.function?.arguments;n&&(a.get(t).arguments+=n,yield{type:`content_block_delta`,index:a.get(t).contentIndex,delta:{type:`input_json_delta`,partial_json:n}})}if(e?.finish_reason){o&&(yield{type:`content_block_stop`,index:i},d.delete(i),o=!1),s&&(yield{type:`content_block_stop`,index:i},d.delete(i),s=!1);for(let[,e]of a)d.has(e.contentIndex)&&(yield{type:`content_block_stop`,index:e.contentIndex},d.delete(e.contentIndex));f=e.finish_reason,p=a.size>0}}for(let e of d)yield{type:`content_block_stop`,index:e};f!==null&&(yield{type:`message_delta`,delta:{stop_reason:f===`length`?`max_tokens`:p?`tool_use`:gt(f),stop_sequence:null},usage:{input_tokens:c,output_tokens:l,cache_read_input_tokens:u,cache_creation_input_tokens:0}},yield{type:`message_stop`})}function gt(e){switch(e){case`stop`:return`end_turn`;case`tool_calls`:return`tool_use`;case`length`:return`max_tokens`;case`content_filter`:return`end_turn`;default:return`end_turn`}}var _t=e((()=>{})),vt=e((()=>{he(),ye(),Ce(),Ee(),Le(),qe(),Ze(),De(),it(),dt(),mt(),_t()}));function j(e){a()&&(M.length>=xt&&M.shift(),M.push(e))}function yt(){return M.length===0?[]:M.splice(0).map(e=>({...e,uuid:y(),session_id:i()}))}function bt(e,t,n){j({type:`system`,subtype:`task_notification`,task_id:e,tool_use_id:n?.toolUseId,status:t,output_file:n?.outputFile??``,summary:n?.summary??``,usage:n?.usage})}var xt,M,St=e((()=>{s(),xt=1e3,M=[]}));function Ct(){let e=c();if(e!==void 0)return e;let t=process.env.CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR;if(!t){let e=d(process.env.CLAUDE_SESSION_INGRESS_TOKEN_FILE??l,`session ingress token`);return o(e),e}let n=parseInt(t,10);if(Number.isNaN(n))return _(`CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR must be a valid file descriptor number, got: ${t}`,{level:`error`}),o(null),null;try{let e=te(),t=process.platform===`darwin`||process.platform===`freebsd`?`/dev/fd/${n}`:`/proc/self/fd/${n}`,r=e.readFileSync(t,{encoding:`utf8`}).trim();return r?(_(`Successfully read token from file descriptor ${n}`),o(r),u(l,r,`session ingress token`),r):(_(`File descriptor contained empty token`,{level:`error`}),o(null),null)}catch(e){_(`Failed to read token from file descriptor ${n}: ${p(e)}`,{level:`error`});let t=d(process.env.CLAUDE_SESSION_INGRESS_TOKEN_FILE??l,`session ingress token`);return o(t),t}}function wt(){return process.env.CLAUDE_CODE_SESSION_ACCESS_TOKEN||Ct()}function Tt(){let e=wt();if(!e)return{};if(e.startsWith(`sk-ant-sid`)){let t={Cookie:`sessionKey=${e}`},n=process.env.CLAUDE_CODE_ORGANIZATION_UUID;return n&&(t[`X-Organization-Uuid`]=n),t}return{Authorization:`Bearer ${e}`}}function Et(e){process.env.CLAUDE_CODE_SESSION_ACCESS_TOKEN=e}var Dt=e((()=>{s(),f(),ne(),m(),ee()})),Ot=t({activateProactive:()=>kt,deactivateProactive:()=>At,getActivationSource:()=>Rt,getNextTickAt:()=>Lt,isContextBlocked:()=>Ft,isProactiveActive:()=>P,isProactivePaused:()=>jt,pauseProactive:()=>Mt,resumeProactive:()=>Nt,setContextBlocked:()=>Pt,setNextTickAt:()=>It,shouldTick:()=>Bt,subscribeToProactiveChanges:()=>zt});function N(){for(let e of B)try{e()}catch{}}function P(){return F}function kt(e){F||(F=!0,I=!1,L=!1,z=e,N())}function At(){F&&(F=!1,I=!1,L=!1,R=null,z=void 0,N())}function jt(){return I}function Mt(){!F||I||(I=!0,R=null,N())}function Nt(){!F||!I||(I=!1,N())}function Pt(e){L!==e&&(L=e,e&&(R=null),N())}function Ft(){return L}function It(e){R=e,N()}function Lt(){return!F||I||L?null:R}function Rt(){return z}function zt(e){return B.add(e),()=>{B.delete(e)}}function Bt(){return F&&!I&&!L}var F,I,L,R,z,B,Vt=e((()=>{F=!1,I=!1,L=!1,R=null,B=new Set}));function Ht(e){H=e}function Ut(e,t){if(U=e,!e||!t?.replayCurrent)return;let n=Jt();Object.keys(n).length!==0&&e(n)}function Wt(e){$t=e}function Gt(e){return!e||e.enabled!==!0?null:{enabled:!0,phase:e.phase===`standby`||e.phase===`sleeping`?e.phase:null,next_tick_at:typeof e.next_tick_at==`number`?e.next_tick_at:null,sleep_until:typeof e.sleep_until==`number`?e.sleep_until:null}}function Kt(e){return JSON.stringify(e)}function qt(e){let t={...K};for(let n of Object.keys(e)){let r=e[n];if(r===void 0){delete t[n];continue}t[n]=r}K=t}function Jt(){let e={...K};return G?e.automation_state={...G}:`automation_state`in K&&(e.automation_state=K.automation_state??null),e}function Yt(){return en}function Xt(e,t){en=e,H?.(e,t),e===`requires_action`&&t?(W=!0,V({pending_action:t})):W&&(W=!1,V({pending_action:null})),e===`idle`&&V({task_summary:null}),e!==`idle`&&Zt(P()?{enabled:!0,phase:null,next_tick_at:null,sleep_until:null}:null),r(process.env.CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS)&&j({type:`system`,subtype:`session_state_changed`,state:e})}function V(e){qt(e),U?.(e)}function Zt(e){let t=Gt(e);Kt(t)!==Kt(G)&&(G=t,qt({automation_state:t}),U?.({automation_state:t}))}function Qt(e){$t?.(e)}var H,U,$t,W,en,G,K,tn=e((()=>{Vt(),n(),St(),H=null,U=null,$t=null,W=!1,en=`idle`,G=null,K={}}));function nn(){an(),Z=setInterval(()=>{v(`debug`,`session_keepalive_heartbeat`,{refcount:J}),r(process.env.CLAUDE_CODE_REMOTE_SEND_KEEPALIVES)&&q?.()},fn)}function rn(){an(),q!==null&&(Q=setTimeout(()=>{v(`info`,`session_idle_30s`),Q=null},fn))}function an(){Q!==null&&(clearTimeout(Q),Q=null)}function on(e){q=e,J>0&&Z===null&&nn()}function sn(){q=null,Z!==null&&(clearInterval(Z),Z=null),an()}function cn(){r(process.env.CLAUDE_CODE_REMOTE_SEND_KEEPALIVES)&&q?.()}function ln(){return q!==null}function un(e){J++,Y.set(e,(Y.get(e)??0)+1),J===1&&(X=Date.now(),q!==null&&Z===null&&nn()),pn||(pn=!0,h(async()=>{v(`info`,`session_activity_at_shutdown`,{refcount:J,active:Object.fromEntries(Y),oldest_activity_ms:J>0&&X!==null?Date.now()-X:null})}))}function dn(e){J>0&&J--;let t=(Y.get(e)??0)-1;t>0?Y.set(e,t):Y.delete(e),J===0&&Z!==null&&(clearInterval(Z),Z=null,rn())}var fn,q,J,Y,X,Z,Q,pn,mn=e((()=>{g(),re(),n(),fn=3e4,q=null,J=0,Y=new Map,X=null,Z=null,Q=null,pn=!1}));function hn(){let e=ie(ce(),`.claude`);oe(e)||se(e,{recursive:!0})}function gn(e){try{$||(hn(),ae(_n,`\n===== RC-DEBUG session ${new Date().toISOString()} =====\n`),$=!0),ae(_n,`[${new Date().toISOString().slice(11,23)}] ${e}\n`)}catch{}}var _n,$,vn=e((()=>{_n=ie(ce(),`.claude`,`rc-debug.log`),$=!1}));export{yt as A,nt as B,Ot as C,wt as D,Tt as E,ht as F,Oe as G,Je as H,pt as I,Se as J,S as K,ft as L,j as M,St as N,Dt as O,vt as P,at as R,jt as S,Bt as T,Ke as U,Qe as V,Ge as W,pe as X,_e as Y,ue as Z,Ut as _,on as a,Ft as b,dn as c,tn as d,Zt as f,Wt as g,Xt as h,ln as i,bt as j,Et as k,sn as l,V as m,gn as n,cn as o,Qt as p,Te as q,mn as r,un as s,vn as t,Yt as u,Ht as v,It as w,P as x,Vt as y,O as z};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{H as i,M as a,Rn as o,nt as s,t as c}from"./src-Di342QoJ.js";import{Ac as l,Pc as u,Sc as d,Zt as f,dn as p,on as m,tn as h}from"./paths-BBvuDQl9.js";import{d as g,s as _}from"./debug-UI3T040K.js";import{l as v,u as y}from"./oauth-CdZEzMww.js";import{d as b,f as x,o as S,s as C}from"./log-CzsijfHZ.js";import{a as w,l as T,o as E}from"./api-CGOR_Xfl.js";import{t as D}from"./useKeybinding-FsOnjW6T.js";var O=e((()=>{c()}));function k(e,t,n,r=!0){let{exit:o}=i(),[s,c]=(0,A.useState)({pending:!1,keyName:null}),l=(0,A.useMemo)(()=>n??o,[n,o]),u=a(e=>c({pending:e,keyName:`Ctrl-C`}),l),d=a(e=>c({pending:e,keyName:`Ctrl-D`}),l),f=(0,A.useCallback)(()=>{t?.()||u()},[u,t]),p=(0,A.useCallback)(()=>{d()},[d]);return e((0,A.useMemo)(()=>({"app:interrupt":f,"app:exit":p}),[f,p]),{context:`Global`,isActive:r}),s}var A,j=e((()=>{A=t(o(),1),c(),O()}));function M(e,t,n){return k(s,t,e,n)}var N=e((()=>{D(),j()}));async function P(e=`claude_code_guest_pass`){let{accessToken:t,orgUUID:r}=await T(),i={...w(t),"x-organization-uuid":r},a=`${v().BASE_API_URL}/api/oauth/organizations/${r}/referral/eligibility`;return(await n.get(a,{headers:i,params:{campaign:e},timeout:5e3})).data}async function F(e=`claude_code_guest_pass`){let{accessToken:t,orgUUID:r}=await T(),i={...w(t),"x-organization-uuid":r},a=`${v().BASE_API_URL}/api/oauth/organizations/${r}/referral/redemptions`;return(await n.get(a,{headers:i,params:{campaign:e},timeout:1e4})).data}function I(){return!!(f()?.organizationUuid&&p()&&h()===`max`)}function L(){if(!I())return{eligible:!1,needsRefresh:!1,hasCache:!1};let e=f()?.organizationUuid;if(!e)return{eligible:!1,needsRefresh:!1,hasCache:!1};let t=d().passesEligibilityCache?.[e];if(!t)return{eligible:!1,needsRefresh:!0,hasCache:!1};let{eligible:n,timestamp:r}=t;return{eligible:n,needsRefresh:Date.now()-r>W,hasCache:!0}}function R(e){let t=K[e.currency]??`${e.currency} `,n=e.amount_minor_units/100;return`${t}${n%1==0?n.toString():n.toFixed(2)}`}function z(){let e=f()?.organizationUuid;return e?d().passesEligibilityCache?.[e]?.referrer_reward??null:null}function B(){let e=f()?.organizationUuid;return e?d().passesEligibilityCache?.[e]?.remaining_passes??null:null}async function V(){if(G)return g(`Passes: Reusing in-flight eligibility fetch`),G;let e=f()?.organizationUuid;return e?(G=(async()=>{try{let t=await P(),n={...t,timestamp:Date.now()};return u(t=>({...t,passesEligibilityCache:{...t.passesEligibilityCache,[e]:n}})),g(`Passes eligibility cached for org ${e}: ${t.eligible}`),t}catch(e){return g(`Failed to fetch and cache passes eligibility`),C(e),null}finally{G=null}})(),G):null}async function H(){if(!I())return null;let e=f()?.organizationUuid;if(!e)return null;let t=d().passesEligibilityCache?.[e],n=Date.now();if(!t)return g(`Passes: No cache, fetching eligibility in background (command unavailable this session)`),V(),null;if(n-t.timestamp>W){g(`Passes: Cache stale, returning cached data and refreshing in background`),V();let{timestamp:e,...n}=t;return n}g(`Passes: Using fresh cached eligibility data`);let{timestamp:r,...i}=t;return i}async function U(){x()||H()}var W,G,K,q=e((()=>{r(),y(),m(),l(),_(),S(),b(),E(),W=1440*60*1e3,G=null,K={USD:`$`,EUR:`€`,GBP:`£`,BRL:`R$`,CAD:`CA$`,AUD:`A$`,NZD:`NZ$`,SGD:`S$`}}));export{z as a,U as c,O as d,H as i,N as l,F as n,B as o,R as r,q as s,L as t,M as u};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{L as r,V as i,d as a,s as o}from"./debug-UI3T040K.js";import{o as s,s as c}from"./log-CzsijfHZ.js";import{Cc as l,Cw as u,Ip as d,Ov as f,Pp as p,Sc as m,_h as h,bh as g,fs as _,hh as v,i as y,kv as b,lc as x,o as S,ps as C,uc as w,ww as T,yh as E}from"./loadAgentsDir-DI1a76pd.js";async function D(e){a(`refreshActivePlugins: clearing all plugin caches`),x(),p();let t=await C(),[i,o]=await Promise.all([m(),y(n())]),{enabled:s,disabled:l,errors:u}=t,[d,f]=await Promise.all([Promise.all(s.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await T(e,u);return t&&(e.mcpServers=t),t?Object.keys(t).length:0})),Promise.all(s.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await g(e,u);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))]),_=d.reduce((e,t)=>e+t,0),v=f.reduce((e,t)=>e+t,0);e(e=>({...e,plugins:{...e.plugins,enabled:s,disabled:l,commands:i,errors:O(e.plugins.errors,u),needsRefresh:!1},agentDefinitions:o,mcp:{...e.mcp,pluginReconnectKey:e.mcp.pluginReconnectKey+1}})),h();let S=!1;try{await b()}catch(e){S=!0,c(e),a(`refreshActivePlugins: loadPluginHooks failed: ${r(e)}`)}let w=s.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return a(`refreshActivePlugins: ${s.length} enabled, ${i.length} commands, ${o.allAgents.length} agents, ${w} hooks, ${_} MCP, ${v} LSP`),{enabled_count:s.length,disabled_count:l.length,command_count:i.length,agent_count:o.allAgents.length,hook_count:w,mcp_count:_,lsp_count:v,error_count:u.length+ +!!S,agentDefinitions:o,pluginCommands:i}}function O(e,t){let n=e.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r=new Set(t.map(k));return[...n.filter(e=>!r.has(k(e))),...t]}function k(e){return e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`}var A=e((()=>{t(),v(),S(),o(),i(),s(),w(),l(),f(),E(),u(),d(),_()}));export{D as n,A as t};
@@ -0,0 +1,36 @@
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{Ka as i,S as a,_ as o,oo as s}from"./paths-BBvuDQl9.js";import{R as c,V as l,d as u,s as d}from"./debug-UI3T040K.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./which-DqSAIvp2.js";import{r as g,t as _}from"./execFileNoThrow-CuQN1sz8.js";import{a as v,r as y,t as b}from"./xdg-CBxMmQux.js";import{n as x,t as S}from"./sanitization-CYp-9DbE.js";import*as C from"os";import*as w from"path";import{promises as T}from"fs";function E(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function D(e){let t=e.startsWith(`claude-cli://`)?e:e.startsWith(`claude-cli:`)?e.replace(`${O}:`,`${O}://`):null;if(!t)throw Error(`Invalid deep link: expected ${O}:// scheme, got "${e}"`);let n;try{n=new URL(t)}catch{throw Error(`Invalid deep link URL: "${e}"`)}if(n.hostname!==`open`)throw Error(`Unknown deep link action: "${n.hostname}"`);let r=n.searchParams.get(`cwd`)??void 0,i=n.searchParams.get(`repo`)??void 0,a=n.searchParams.get(`q`);if(r&&!r.startsWith(`/`)&&!/^[a-zA-Z]:[/\\]/.test(r))throw Error(`Invalid cwd in deep link: must be an absolute path, got "${r}"`);if(r&&E(r))throw Error(`Deep link cwd contains disallowed control characters`);if(r&&r.length>j)throw Error(`Deep link cwd exceeds ${j} characters (got ${r.length})`);if(i&&!k.test(i))throw Error(`Invalid repo in deep link: expected "owner/repo", got "${i}"`);let o;if(a&&a.trim().length>0){if(o=x(a.trim()),E(o))throw Error(`Deep link query contains disallowed control characters`);if(o.length>A)throw Error(`Deep link query exceeds ${A} characters (got ${o.length})`)}return{query:o,cwd:r,repo:i}}var O,k,A,j,M=e((()=>{S(),O=`claude-cli`,k=/^[\w.-]+\/[\w.-]+$/,A=5e3,j=4096})),N=t({MACOS_BUNDLE_ID:()=>W,ensureDeepLinkProtocolRegistered:()=>U,isProtocolHandlerCurrent:()=>H,registerProtocolHandler:()=>B});function P(){return w.join(y(),`applications`,K)}function F(e){return`Exec="${e}" --handle-uri %u`}function I(e){return`"${e}" --handle-uri "%1"`}async function L(e){let t=w.join(q,`Contents`);try{await T.rm(q,{recursive:!0})}catch(e){if(c(e)!==`ENOENT`)throw e}await T.mkdir(w.dirname(J),{recursive:!0});let n=`<?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleIdentifier</key>
6
+ <string>${W}</string>
7
+ <key>CFBundleName</key>
8
+ <string>${G}</string>
9
+ <key>CFBundleExecutable</key>
10
+ <string>claude</string>
11
+ <key>CFBundleVersion</key>
12
+ <string>1.0</string>
13
+ <key>CFBundlePackageType</key>
14
+ <string>APPL</string>
15
+ <key>LSBackgroundOnly</key>
16
+ <true/>
17
+ <key>CFBundleURLTypes</key>
18
+ <array>
19
+ <dict>
20
+ <key>CFBundleURLName</key>
21
+ <string>Claude Code Deep Link</string>
22
+ <key>CFBundleURLSchemes</key>
23
+ <array>
24
+ <string>${O}</string>
25
+ </array>
26
+ </dict>
27
+ </array>
28
+ </dict>
29
+ </plist>`;await T.writeFile(w.join(t,`Info.plist`),n),await T.symlink(e,J),await _(`/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister`,[`-R`,q],{useCwd:!1}),u(`Registered ${O}:// protocol handler at ${q}`)}async function R(e){await T.mkdir(w.dirname(P()),{recursive:!0});let t=`[Desktop Entry]
30
+ Name=${G}
31
+ Comment=Handle ${O}:// deep links for Claude Code
32
+ ${F(e)}
33
+ Type=Application
34
+ NoDisplay=true
35
+ MimeType=x-scheme-handler/${O};
36
+ `;await T.writeFile(P(),t);let n=await m(`xdg-mime`);if(n){let{code:e}=await _(n,[`default`,K,`x-scheme-handler/${O}`],{useCwd:!1});if(e!==0)throw Object.assign(Error(`xdg-mime exited with code ${e}`),{code:`XDG_MIME_FAILED`})}u(`Registered ${O}:// protocol handler at ${P()}`)}async function z(e){for(let t of[[`add`,Y,`/ve`,`/d`,`URL:${G}`,`/f`],[`add`,Y,`/v`,`URL Protocol`,`/d`,``,`/f`],[`add`,X,`/ve`,`/d`,I(e),`/f`]]){let{code:e}=await _(`reg`,t,{useCwd:!1});if(e!==0)throw Object.assign(Error(`reg add exited with code ${e}`),{code:`REG_FAILED`})}u(`Registered ${O}:// protocol handler in Windows registry`)}async function B(e){let t=e??await V();switch(process.platform){case`darwin`:await L(t);break;case`linux`:await R(t);break;case`win32`:await z(t);break;default:throw Error(`Unsupported platform: ${process.platform}`)}}async function V(){let e=process.platform===`win32`?`claude.exe`:`claude`,t=w.join(b(),e);try{return await T.realpath(t),t}catch{return process.execPath}}async function H(e){try{switch(process.platform){case`darwin`:return await T.readlink(J)===e;case`linux`:return(await T.readFile(P(),`utf8`)).includes(F(e));case`win32`:{let{stdout:t,code:n}=await _(`reg`,[`query`,X,`/ve`],{useCwd:!1});return n===0&&t.includes(I(e))}default:return!1}}catch{return!1}}async function U(){if(i().disableDeepLinkRegistration===`disable`||!o(`tengu_lodestone_enabled`,!1))return;let e=await V();if(await H(e))return;let t=w.join(n(),`.deep-link-register-failed`);try{let e=await T.stat(t);if(Date.now()-e.mtimeMs<Z)return}catch{}try{await B(e),p(`tengu_deep_link_registered`,{success:!0}),u(`Auto-registered claude-cli:// deep link protocol handler`),await T.rm(t,{force:!0}).catch(()=>{})}catch(e){let n=c(e);p(`tengu_deep_link_registered`,{success:!1,error_code:n}),u(`Failed to auto-register deep link protocol handler: ${e instanceof Error?e.message:String(e)}`,{level:`warn`}),(n===`EACCES`||n===`ENOSPC`)&&await T.writeFile(t,``).catch(()=>{})}}var W,G,K,q,J,Y,X,Z,Q=e((()=>{M(),a(),f(),d(),r(),l(),g(),s(),h(),v(),W=`com.anthropic.claude-code-url-handler`,G=`Claude Code URL Handler`,K=`claude-code-url-handler.desktop`,q=w.join(C.homedir(),`Applications`,`Claude Code URL Handler.app`),J=w.join(q,`Contents`,`MacOS`,`claude`),Y=`HKEY_CURRENT_USER\\Software\\Classes\\${O}`,X=`${Y}\\shell\\open\\command`,Z=1440*60*1e3}));export{D as a,M as i,Q as n,N as r,W as t};
@@ -0,0 +1 @@
1
+ import{Cd as e,Dd as t,Ed as n,Od as r,Sd as i,Td as a,_d as o,bd as s,gd as c,hd as l,md as u,vd as d,wd as f,xd as p,yd as m}from"./loadAgentsDir-DI1a76pd.js";i();export{u as detectAndGetBackend,l as ensureBackendsRegistered,c as getBackendByType,o as getCachedBackend,d as getCachedDetectionResult,m as getInProcessBackend,s as getResolvedTeammateMode,p as getTeammateExecutor,e as isInProcessEnabled,f as markInProcessFallback,a as registerITermBackend,n as registerTmuxBackend,t as registerWindowsTerminalBackend,r as resetBackendDetection};
@@ -0,0 +1,4 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{a as t,c as n,i as r,o as i,t as a}from"./releaseNotes-CnhQit0y.js";function o(e){return e.map(([e,t])=>`${`Version ${e}:`}\n${t.map(e=>`· ${e}`).join(`
2
+ `)}`).join(`
3
+
4
+ `)}async function s(){let e=[];try{let n=new Promise((e,t)=>{setTimeout(e=>e(Error(`Timeout`)),500,t)});await Promise.race([r(),n]),e=t(await i())}catch{}if(e.length>0)return{type:`text`,value:o(e)};let n=t(await i());return n.length>0?{type:`text`,value:o(n)}:{type:`text`,value:`See the full changelog at: ${a}`}}e((()=>{n()}))();export{s as call};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{t as r}from"./semver-Cq33BYay.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{U as o,cn as s}from"./state-sIHsFpDu.js";import{Ac as c,Pc as l,Sc as u}from"./paths-BBvuDQl9.js";import{K as d,V as f}from"./debug-UI3T040K.js";import{d as p,f as m,o as h,s as g}from"./log-CzsijfHZ.js";import{r as _,t as v}from"./semver-Tw0AFar5.js";import{dirname as y,join as b}from"path";import{mkdir as x,readFile as S,writeFile as C}from"fs/promises";function w(){return b(t(),`cache`,`changelog.md`)}async function T(){let e=u();if(!e.cachedChangelog)return;let t=w();try{await x(y(t),{recursive:!0}),await C(t,e.cachedChangelog,{encoding:`utf-8`,flag:`wx`})}catch{}l(({cachedChangelog:e,...t})=>t)}async function E(){if(o()||m())return;let e=await i.get(L);if(e.status===200){let t=e.data;if(t===R)return;let n=w();await x(y(n),{recursive:!0}),await C(n,t,{encoding:`utf-8`}),R=t;let r=Date.now();l(e=>({...e,changelogLastFetched:r}))}}async function D(){if(R!==null)return R;let e=w();try{let t=await S(e,`utf-8`);return R=t,t}catch{return R=``,``}}function O(){return R??``}function k(e){try{if(!e)return{};let t={},n=e.split(/^## /gm).slice(1);for(let e of n){let n=e.trim().split(`
2
+ `);if(n.length===0)continue;let r=n[0];if(!r)continue;let i=r.split(` - `)[0]?.trim()||``;if(!i)continue;let a=n.slice(1).filter(e=>e.trim().startsWith(`- `)).map(e=>e.trim().substring(2).trim()).filter(Boolean);a.length>0&&(t[i]=a)}return t}catch(e){return g(d(e)),{}}}function A(e,t,n=O()){try{let r=k(n),i=(0,P.coerce)(e),a=t?(0,P.coerce)(t):null;if(!a||i&&v(i.version,a.version))return Object.entries(r).filter(([e])=>!a||v(e,a.version)).sort(([e],[t])=>v(e,t)?-1:1).flatMap(([e,t])=>t).filter(Boolean).slice(0,F)}catch(e){return g(d(e)),[]}return[]}function j(e=O()){try{let t=k(e);return Object.keys(t).sort((e,t)=>v(e,t)?1:-1).map(e=>{let n=t[e];if(!n||n.length===0)return null;let r=n.filter(Boolean);return r.length===0?null:[e,r]}).filter(e=>e!==null)}catch(e){return g(d(e)),[]}}async function M(e,t=`2.6.5`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=await D();(e!==t||!n)&&E().catch(e=>g(d(e)));let r=A(t,e,n);return{hasReleaseNotes:r.length>0,releaseNotes:r}}function N(e,t=`2.6.5`){if(process.env.USER_TYPE===`ant`)return{hasReleaseNotes:!1,releaseNotes:[]};let n=A(t,e);return{hasReleaseNotes:n.length>0,releaseNotes:n}}var P,F,I,L,R,z=e((()=>{a(),P=r(),s(),c(),n(),f(),h(),p(),_(),F=5,I=`https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md`,L=`https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md`,R=null}));export{j as a,z as c,E as i,T as l,M as n,D as o,N as r,O as s,I as t,k as u};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{s as t}from"./envUtils-BWeoiL4Y.js";import{cn as n}from"./state-sIHsFpDu.js";import{Po as r,jo as i}from"./paths-BBvuDQl9.js";import{fA as a}from"./loadAgentsDir-DI1a76pd.js";import{t as o}from"./settingsSync-B9bz77E1.js";import{n as s,t as c}from"./refresh-D7pdoY_X.js";function l(e,t){return`${e} ${r(e,t)}`}var u;e((()=>{n(),o(),t(),c(),a(),i(),u=async(e,t)=>{let n=await s(t.setAppState),r=`Reloaded: ${[l(n.enabled_count,`plugin`),l(n.command_count,`skill`),l(n.agent_count,`agent`),l(n.hook_count,`hook`),l(n.mcp_count,`plugin MCP server`),l(n.lsp_count,`plugin LSP server`)].join(` · `)}`;return n.error_count>0&&(r+=`\n${l(n.error_count,`error`)} during load. Run /doctor for details.`),{type:`text`,value:r}}}))();export{u as call};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{In as i,Ln as a,Rn as o,b as s,f as c,g as l,h as u,l as d,t as f,tt as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{Qa as h,Ys as g,ec as _,lo as v,nc as y,no as b,oo as x}from"./paths-BBvuDQl9.js";import{K as S,V as C}from"./debug-UI3T040K.js";import{o as w,s as T}from"./log-CzsijfHZ.js";import{$T as E,Dx as D,JS as O,Ox as k,YS as A,eE as j}from"./loadAgentsDir-DI1a76pd.js";import{t as M}from"./useKeybinding-FsOnjW6T.js";async function N(){let e=await E();if(e.length===0)return{availableEnvironments:[],selectedEnvironment:null,selectedEnvironmentSource:null};let t=b()?.remote?.defaultEnvironmentId,n=e.find(e=>e.kind!==`bridge`)??e[0],r=null;if(t){let i=e.find(e=>e.environment_id===t);if(i){n=i;for(let e=g.length-1;e>=0;e--){let n=g[e];if(!(!n||n===`flagSettings`)&&h(n)?.remote?.defaultEnvironmentId===t){r=n;break}}}}return{availableEnvironments:e,selectedEnvironment:n,selectedEnvironmentSource:r}}var P=e((()=>{y(),x(),j()}));function F({onDone:e}){let[t,n]=(0,z.useState)(`loading`),[r,a]=(0,z.useState)([]),[o,l]=(0,z.useState)(null),[u,f]=(0,z.useState)(null),[p,m]=(0,z.useState)(null);(0,z.useEffect)(()=>{let e=!1;async function t(){try{let t=await N();if(e)return;a(t.availableEnvironments),l(t.selectedEnvironment),f(t.selectedEnvironmentSource),n(null)}catch(t){if(e)return;let r=S(t);T(r),m(r.message),n(null)}}return t(),()=>{e=!0}},[]);function h(t){if(t===`cancel`){e();return}n(`updating`);let a=r.find(e=>e.environment_id===t);if(!a){e(`Error: Selected environment not found`);return}v(`localSettings`,{remote:{defaultEnvironmentId:a.environment_id}}),e(`Set default remote environment to ${i.bold(a.name)} (${a.environment_id})`)}return t===`loading`?(0,B.jsx)(c,{title:V,onCancel:e,hideInputGuide:!0,children:(0,B.jsx)(d,{message:`Loading environments…`})}):p?(0,B.jsx)(c,{title:V,onCancel:e,children:(0,B.jsxs)(s,{color:`error`,children:[`Error: `,p]})}):o?r.length===1?(0,B.jsx)(L,{environment:o,onDone:e}):(0,B.jsx)(R,{environments:r,selectedEnvironment:o,selectedEnvironmentSource:u,loadingState:t,onSelect:h,onCancel:e}):(0,B.jsx)(c,{title:V,subtitle:H,onCancel:e,children:(0,B.jsx)(s,{children:`No remote environments available.`})})}function I({environment:e}){return(0,B.jsxs)(s,{children:[r.tick,` Using `,(0,B.jsx)(s,{bold:!0,children:e.name}),` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]})}function L({environment:e,onDone:t}){return p(`confirm:yes`,t,{context:`Confirmation`}),(0,B.jsx)(c,{title:V,subtitle:H,onCancel:t,children:(0,B.jsx)(I,{environment:e})})}function R({environments:e,selectedEnvironment:t,selectedEnvironmentSource:n,loadingState:r,onSelect:i,onCancel:a}){let o=n&&n!==`localSettings`?` (from ${_(n)} settings)`:``;return(0,B.jsxs)(c,{title:V,subtitle:(0,B.jsxs)(s,{children:[`Currently using: `,(0,B.jsx)(s,{bold:!0,children:t.name}),o]}),onCancel:a,hideInputGuide:!0,children:[(0,B.jsx)(s,{dimColor:!0,children:H}),r===`updating`?(0,B.jsx)(d,{message:`Updating…`}):(0,B.jsx)(D,{options:e.map(e=>({label:(0,B.jsxs)(s,{children:[e.name,` `,(0,B.jsxs)(s,{dimColor:!0,children:[`(`,e.environment_id,`)`]})]}),value:e.environment_id})),defaultValue:t.environment_id,onChange:i,onCancel:()=>i(`cancel`),layout:`compact-vertical`}),(0,B.jsx)(s,{dimColor:!0,children:(0,B.jsxs)(u,{children:[(0,B.jsx)(l,{shortcut:`Enter`,action:`select`}),(0,B.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})}var z,B,V,H,U=e((()=>{a(),n(),o(),z=t(o(),1),f(),M(),C(),w(),y(),x(),P(),A(),k(),B=m(),V=`Select Remote Environment`,H=`Configure environments at: https://claude.ai/code`}));async function W(e){return(0,G.jsx)(F,{onDone:e})}var G;e((()=>{o(),U(),G=m()}))();export{W as call};
@@ -0,0 +1 @@
1
+ import{d as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{E as i,L as a,V as o,X as s,Y as c,d as l,s as u,w as d}from"./debug-UI3T040K.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{F as m,P as h}from"./git-CN3qtTb_.js";import{n as g,t as _}from"./sleep-8Eb9j_Ly.js";import{_ as ee,d as v}from"./rcDebugLog-CPKZCtR8.js";import{c as y,d as b,i as x,o as S,s as C}from"./debugUtils-BBMFODKH.js";import{a as w,i as T}from"./trustedDevice-BvYYXfd8.js";import{a as E,r as D}from"./bridgeConfig-lRZfQqmA.js";import{t as te}from"./jwtUtils-CpXwh_du.js";import{t as O}from"./workSecret-mS2OrpxF.js";import{i as k,r as ne}from"./envLessBridgeConfig-SPEr9oqO.js";import{a as A,c as j,i as re,n as ie,o as M,r as ae,s as oe,t as N}from"./bridgeMessaging-CqNURC4-.js";import{r as P,t as se}from"./flushGate-COPcye5f.js";t(),f(),c(),h(),_(),y(),w(),v(),k(),r(),u(),o(),d(),S();var F=`2023-06-01`;function I(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":F}}async function ce(e,t,r,o,s){let c=`${e}/v1/code/sessions`,u;try{u=await n.post(c,{title:r,bridge:{},...s?.length?{tags:s}:{}},{headers:I(t),timeout:o,validateStatus:e=>e<500})}catch(e){return l(`[code-session] Session create request failed: ${a(e)}`),null}if(u.status!==200&&u.status!==201){let e=x(u.data);return l(`[code-session] Session create failed ${u.status}${e?`: ${e}`:``}`),null}let d=u.data;return!d||typeof d!=`object`||!(`session`in d)||!d.session||typeof d.session!=`object`||!(`id`in d.session)||typeof d.session.id!=`string`||!d.session.id.startsWith(`cse_`)?(l(`[code-session] No session.id (cse_*) in response: ${i(d).slice(0,200)}`),null):d.session.id}async function L(e,t,r,o,s){let c=`${t}/v1/code/sessions/${e}/bridge`,u=I(r);s&&(u[`X-Trusted-Device-Token`]=s);let d;try{d=await n.post(c,{},{headers:u,timeout:o,validateStatus:e=>e<500})}catch(e){return l(`[code-session] /bridge request failed: ${a(e)}`),null}if(d.status!==200){let e=x(d.data);return l(`[code-session] /bridge failed ${d.status}${e?`: ${e}`:``}`),null}let f=d.data;if(typeof f!=`object`||!f||!(`worker_jwt`in f)||typeof f.worker_jwt!=`string`||!(`expires_in`in f)||typeof f.expires_in!=`number`||!(`api_base_url`in f)||typeof f.api_base_url!=`string`||!(`worker_epoch`in f))return l(`[code-session] /bridge response malformed (need worker_jwt, expires_in, api_base_url, worker_epoch): ${i(f).slice(0,200)}`),null;let p=f.worker_epoch,m=typeof p==`string`?Number(p):p;return typeof m!=`number`||!Number.isFinite(m)||!Number.isSafeInteger(m)?(l(`[code-session] /bridge worker_epoch invalid: ${i(p)}`),null):{worker_jwt:f.worker_jwt,api_base_url:f.api_base_url,expires_in:f.expires_in,worker_epoch:m}}r(),S(),u(),o(),E();var R=`2023-06-01`;function z(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":R}}async function B(t){let{baseUrl:n,orgUUID:r,title:i,getAccessToken:o,onAuth401:c,toSDKMessages:u,initialHistoryCap:d,initialMessages:f,onInboundMessage:h,onUserMessage:g,onPermissionResponse:_,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,onStateChange:S,outboundOnly:w,tags:T}=t,E=await ne(),D=o();if(!D)return l(`[remote-bridge] No OAuth token`),null;let k=await V(()=>ce(n,D,i,E.http_timeout_ms,T),`createCodeSession`,E);if(!k)return S?.(`failed`,`Session creation failed — see debug log`),C(`v2_session_create_failed`,void 0,!0),null;let F=k;l(`[remote-bridge] Created session ${F}`),m(`info`,`bridge_repl_v2_session_created`);let I=await V(()=>H(F,n,D,E.http_timeout_ms),`fetchRemoteCredentials`,E);if(!I)return S?.(`failed`,`Remote credentials fetch failed — see debug log`),C(`v2_remote_creds_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null;l(`[remote-bridge] Fetched bridge credentials (expires_in=${I.expires_in}s)`);let L=O(I.api_base_url,F);l(`[remote-bridge] v2 session URL: ${L}`);let R;try{R=await P({sessionUrl:L,ingressToken:I.worker_jwt,sessionId:F,epoch:I.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,getAuthToken:()=>I.worker_jwt,outboundOnly:w})}catch(e){return l(`[remote-bridge] v2 transport setup failed: ${a(e)}`,{level:`error`}),S?.(`failed`,`Transport setup failed: ${a(e)}`),C(`v2_transport_setup_failed`,void 0,!0),U(F,n,D,r,E.http_timeout_ms),null}l(`[remote-bridge] v2 transport created (epoch=${I.worker_epoch})`),S?.(`ready`);let z=new N(E.uuid_dedup_buffer_size),B=new Set;if(f)for(let e of f)B.add(e.uuid),z.add(e.uuid);let le=new N(E.uuid_dedup_buffer_size),W=new se,G=!1,K=!1,q=!1,J=!g,Y=`initial`,X;function Z(e){K||p(`tengu_bridge_repl_connect_timeout`,{v2:!0,elapsed_ms:E.connect_timeout_ms,cause:e})}ee(e=>{K||R.reportMetadata(e)},{replayCurrent:!0});let Q=te({refreshBufferMs:E.token_refresh_buffer_ms,getAccessToken:async()=>{let e=o();return c&&await c(e??``),o()??e},onRefresh:(e,t)=>{(async()=>{if(q||K){l(`[remote-bridge] Recovery already in flight, skipping proactive refresh`);return}q=!0;try{let r=await V(()=>H(e,n,t,E.http_timeout_ms),`fetchRemoteCredentials (proactive)`,E);if(!r||K)return;await ue(r,`proactive_refresh`),l(`[remote-bridge] Transport rebuilt (proactive refresh)`)}catch(e){l(`[remote-bridge] Proactive refresh rebuild failed: ${a(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_proactive_refresh_failed`),K||S?.(`failed`,`Refresh failed: ${a(e)}`)}finally{q=!1}})()},label:`remote`});Q.scheduleFromExpiresIn(F,I.expires_in);function $(){R.setOnConnect(()=>{if(clearTimeout(X),l(`[remote-bridge] v2 transport connected`),m(`info`,`bridge_repl_v2_transport_connected`),p(`tengu_bridge_repl_ws_connected`,{v2:!0,cause:Y}),!G&&f&&f.length>0){G=!0;let e=R;pe(f).catch(e=>l(`[remote-bridge] flushHistory failed: ${e}`)).finally(()=>{R!==e||K||q||(fe(),S?.(`connected`))})}else W.active||S?.(`connected`)}),R.setOnData(e=>{ae(e,z,le,h,_?e=>{R.reportState(`running`),_(e)}:void 0,e=>re(e,{transport:R,sessionId:F,onInterrupt:v,onSetModel:y,onSetMaxThinkingTokens:b,onSetPermissionMode:x,outboundOnly:w}))}),R.setOnClose(e=>{if(clearTimeout(X),!K){if(l(`[remote-bridge] v2 transport closed (code=${e})`),p(`tengu_bridge_repl_ws_closed`,{code:e,v2:!0}),e===401&&!q){de();return}S?.(`failed`,`Transport closed (code ${e})`)}})}async function ue(e,t){Y=t,W.start();try{let t=R.getLastSequenceNum();if(R.close(),R=await P({sessionUrl:O(e.api_base_url,F),ingressToken:e.worker_jwt,sessionId:F,epoch:e.worker_epoch,heartbeatIntervalMs:E.heartbeat_interval_ms,heartbeatJitterFraction:E.heartbeat_jitter_fraction,initialSequenceNum:t,getAuthToken:()=>e.worker_jwt,outboundOnly:w}),K){R.close();return}$(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y),Q.scheduleFromExpiresIn(F,e.expires_in),fe()}finally{W.drop()}}async function de(){if(!q){q=!0,S?.(`reconnecting`,`JWT expired — refreshing`),l(`[remote-bridge] 401 on SSE — attempting JWT refresh`);try{let e=o();c&&await c(e??``);let t=o()??e;if(!t||K){K||S?.(`failed`,`JWT refresh failed: no OAuth token`);return}let r=await V(()=>H(F,n,t,E.http_timeout_ms),`fetchRemoteCredentials (recovery)`,E);if(!r||K){K||S?.(`failed`,`JWT refresh failed after 401`);return}G=!1,await ue(r,`auth_401_recovery`),l(`[remote-bridge] Transport rebuilt after 401`)}catch(e){l(`[remote-bridge] 401 recovery failed: ${a(e)}`,{level:`error`}),m(`error`,`bridge_repl_v2_jwt_refresh_failed`),K||S?.(`failed`,`JWT refresh failed: ${a(e)}`)}finally{q=!1}}}$(),f&&f.length>0&&W.start(),R.connect(),X=setTimeout(Z,E.connect_timeout_ms,Y);function fe(){let e=W.end();if(e.length===0)return;for(let t of e)z.add(t.uuid);let t=u(e).map(e=>({...e,session_id:F}));j(e)&&R.reportState(`running`),l(`[remote-bridge] Drained ${e.length} queued message(s) after flush`),R.writeBatch(t)}async function pe(e){let t=e.filter(A),n=d>0&&t.length>d?t.slice(-d):t;n.length<t.length&&l(`[remote-bridge] Capped initial flush: ${t.length} -> ${n.length} (cap=${d})`);let r=u(n).map(e=>({...e,session_id:F}));if(r.length===0)return;let i=t.at(-1);i&&oe(i)&&R.reportState(`running`),l(`[remote-bridge] Flushing ${r.length} history events`),await R.writeBatch(r)}async function me(){if(K)return;K=!0,Q.cancelAll(),clearTimeout(X),W.drop(),R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e);let t=o(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms);if(i===401&&c)try{await c(t??``),t=o(),i=await U(F,n,t,r,E.teardown_archive_timeout_ms)}catch(e){l(`[remote-bridge] Teardown 401 retry threw: ${a(e)}`,{level:`error`})}R.close();let s=i===`no_token`?`skipped_no_token`:i===`timeout`||i===`error`?`network_error`:i>=500?`server_5xx`:i>=400?`server_4xx`:`ok`;l(`[remote-bridge] Torn down (archive=${i})`),m(`info`,`bridge_repl_v2_teardown`),p(`tengu_bridge_repl_teardown`,{v2:!0,archive_status:s,archive_ok:typeof i==`number`&&i<400,archive_http_status:typeof i==`number`?i:void 0,archive_timeout:i===`timeout`,archive_no_token:i===`no_token`})}let he=s(me);return p(`tengu_bridge_repl_started`,{has_initial_messages:!!(f&&f.length>0),v2:!0,expires_in_s:I.expires_in,inProtectedNamespace:e()}),{bridgeSessionId:F,environmentId:``,sessionIngressUrl:I.api_base_url,writeMessages(e){let t=e.filter(e=>A(e)&&!B.has(e.uuid)&&!z.has(e.uuid));if(t.length===0)return;if(!J)for(let e of t){let t=ie(e);if(t!==void 0&&g?.(t,F)){J=!0;break}}if(W.enqueue(...t)){l(`[remote-bridge] Queued ${t.length} message(s) during flush`);return}for(let e of t)z.add(e.uuid);let n=u(t).map(e=>({...e,session_id:F}));j(t)&&R.reportState(`running`),l(`[remote-bridge] Sending ${t.length} message(s)`),R.writeBatch(n)},writeSdkMessages(e){let t=e.filter(e=>!e.uuid||!z.has(e.uuid));if(t.length===0)return;for(let e of t)e.uuid&&z.add(e.uuid);let n=t.map(e=>({...e,session_id:F}));R.writeBatch(n)},sendControlRequest(e){if(q){l(`[remote-bridge] Dropping control_request during 401 recovery: ${e.request_id}`);return}let t={...e,session_id:F};e.request?.subtype===`can_use_tool`&&R.reportState(`requires_action`),R.write(t),l(`[remote-bridge] Sent control_request request_id=${e.request_id}`)},sendControlResponse(e){if(q){l(`[remote-bridge] Dropping control_response during 401 recovery`);return}let t={...e,session_id:F};R.reportState(`running`),R.write(t),l(`[remote-bridge] Sent control_response`)},sendControlCancelRequest(e){if(q){l(`[remote-bridge] Dropping control_cancel_request during 401 recovery: ${e}`);return}let t={type:`control_cancel_request`,request_id:e,session_id:F};R.reportState(`running`),R.write(t),l(`[remote-bridge] Sent control_cancel_request request_id=${e}`)},sendResult(){if(q){l(`[remote-bridge] Dropping result during 401 recovery`);return}R.reportState(`idle`);let e={...M(F),session_id:F};R.write(e),l(`[remote-bridge] Sent result`)},async teardown(){he(),await me()}}}async function V(e,t,n){let r=n.init_retry_max_attempts;for(let i=1;i<=r;i++){let a=await e();if(a!==null)return a;if(i<r){let e=n.init_retry_base_delay_ms*2**(i-1),a=e*n.init_retry_jitter_fraction*(2*Math.random()-1),o=Math.min(e+a,n.init_retry_max_delay_ms);l(`[remote-bridge] ${t} failed (attempt ${i}/${r}), retrying in ${Math.round(o)}ms`),await g(o)}}return null}async function H(e,t,n,r){let i=await L(e,t,n,r,T());return i?D()?{...i,api_base_url:t}:i:null}async function U(e,t,r,i,o){if(!r)return`no_token`;let s=b(e);try{let e=await n.post(`${t}/v1/sessions/${s}/archive`,{},{headers:{...z(r),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":i},timeout:o,validateStatus:()=>!0});return l(`[remote-bridge] Archive ${s} status=${e.status}`),e.status}catch(e){return l(`[remote-bridge] Archive failed: ${a(e)}`),n.isAxiosError(e)&&e.code===`ECONNABORTED`?`timeout`:`error`}}export{B as initEnvLessBridgeCore};
@@ -0,0 +1,3 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,d as i,f as a,nt as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{L as u,V as d}from"./debug-UI3T040K.js";import{Mx as f,kx as p}from"./loadAgentsDir-DI1a76pd.js";import{t as m}from"./useKeybinding-FsOnjW6T.js";import{a as h,t as g}from"./bridgeConfig-lRZfQqmA.js";import{n as _,r as v}from"./bridgeEnabled-D2IykaHE.js";import{a as y,n as b}from"./types-RJTEOuIt.js";import{t as x}from"./Dialog-DYFGqyDs.js";import{t as S}from"./ListItem-OFARanN7.js";import{i as C,o as w,t as T}from"./cliLaunch-BQa48gsr.js";import{resolve as E}from"path";function D({onDone:e}){let[t,n]=(0,N.useState)(I),[r,i]=(0,N.useState)(null);return(0,N.useEffect)(()=>{if(F&&!F.killed){n(`running`);return}let t=!1;return(async()=>{let r=await k();if(!t){if(r){e(r,{display:`system`});return}n(`starting`);try{A(),t||(n(`running`),I=`running`,e(`Remote Control Server started. Use /remote-control-server to manage.`,{display:`system`}))}catch(r){if(!t){let t=u(r);n(`error`),i(t),I=`error`,e(`Remote Control Server failed to start: ${t}`,{display:`system`})}}}})(),()=>{t=!0}},[]),t===`running`&&F&&!F.killed?(0,P.jsx)(O,{onDone:e}):null}function O({onDone:e}){f(`remote-control-server-dialog`);let[t,n]=(0,N.useState)(2),s=L.slice(-5);function l(){j(),e(`Remote Control Server stopped.`,{display:`system`})}function d(){j();try{A(),e(`Remote Control Server restarted.`,{display:`system`})}catch(t){e(`Failed to restart: ${u(t)}`,{display:`system`})}}function p(){e(void 0,{display:`skip`})}return o({"select:next":()=>n(e=>(e+1)%3),"select:previous":()=>n(e=>(e-1+3)%3),"select:accept":()=>{t===0?l():t===1?d():p()}},{context:`Select`}),(0,P.jsx)(a,{title:`Remote Control Server`,onCancel:p,hideInputGuide:!0,children:(0,P.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,P.jsxs)(r,{children:[`Remote Control Server is`,` `,(0,P.jsx)(r,{bold:!0,color:`success`,children:`running`}),F?` (PID: ${F.pid})`:``]}),s.length>0&&(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(r,{dimColor:!0,children:`Recent logs:`}),s.map((e,t)=>(0,P.jsx)(r,{dimColor:!0,children:e},t))]}),(0,P.jsxs)(c,{flexDirection:`column`,children:[(0,P.jsx)(i,{isFocused:t===0,children:(0,P.jsx)(r,{children:`Stop server`})}),(0,P.jsx)(i,{isFocused:t===1,children:(0,P.jsx)(r,{children:`Restart server`})}),(0,P.jsx)(i,{isFocused:t===2,children:(0,P.jsx)(r,{children:`Continue`})})]}),(0,P.jsx)(r,{dimColor:!0,children:`Enter to select · Esc to continue`})]})})}async function k(){return await _()||(g()?null:b)}function A(){let e=E(`.`),t=w(T([`daemon`,`start`,`--dir=${e}`]),{cwd:e,stdio:[`ignore`,`pipe`,`pipe`],detached:!1});F=t,L=[],t.stdout?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
2
+ `);for(let e of t)L.push(e),L.length>R&&L.shift()}),t.stderr?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
3
+ `);for(let e of t)L.push(`[err] ${e}`),L.length>R&&L.shift()}),t.on(`exit`,(e,t)=>{F=null,I=`stopped`,L.push(`[daemon] exited (code=${e??`unknown`}, signal=${t})`)}),t.on(`error`,e=>{F=null,I=`error`,L.push(`[daemon] error: ${e.message}`)})}function j(){if(F&&!F.killed){F.kill(`SIGTERM`);let e=F.pid;setTimeout(()=>{try{e&&process.kill(e,0),F&&!F.killed&&F.kill(`SIGKILL`)}catch{}},1e4)}F=null,I=`stopped`}async function M(e,t,n){return(0,P.jsx)(D,{onDone:e})}var N,P,F,I,L,R;e((()=>{n(),N=t(n(),1),v(),h(),y(),x(),S(),p(),s(),m(),C(),d(),P=l(),F=null,I=`stopped`,L=[],R=50}))();export{M as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{f as r,l as i}from"./teammate-DMYOtLTK.js";import{Ar as a,Lo as o,Oo as s,Tr as c,_i as l,mi as u}from"./loadAgentsDir-DI1a76pd.js";import{a as d,i as f,r as p}from"./bridgeConfig-lRZfQqmA.js";import{n as m,t as h}from"./generateSessionName-zbqanivg.js";async function g(e,n,i){if(r())return e(`Cannot rename: This session is a swarm teammate. Teammate names are set by the team leader.`,{display:`system`}),null;let a;if(!i||i.trim()===``){let t=await h(s(n.messages),n.abortController.signal);if(!t)return e(`Could not generate a name: no conversation context yet. Usage: /rename <name>`,{display:`system`}),null;a=t}else a=i.trim();let o=t(),d=c();await l(o,a,d);let m=n.getAppState().replBridgeSessionId;if(m){let e=f();import(`./createSession-BuJcoBAj.js`).then(({updateBridgeSessionTitle:t})=>t(m,a,{baseUrl:p(),getAccessToken:e?()=>e:void 0}).catch(()=>{}))}return await u(o,a,d),n.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:a}})),e(`Session renamed to: ${a}`,{display:`system`}),null}e((()=>{n(),d(),o(),a(),i(),m()}))();export{g as call};
@@ -0,0 +1 @@
1
+ import{s as e,u as t}from"./envUtils-BWeoiL4Y.js";import{o as n,s as r}from"./log-CzsijfHZ.js";import{ReadStream as i}from"tty";import{openSync as a}from"fs";e(),n();var o=null;function s(){if(o!==null)return o;if(process.stdin.isTTY){o=void 0;return}if(t(process.env.CI)){o=void 0;return}if(process.argv.includes(`mcp`)){o=void 0;return}if(process.platform===`win32`){o=void 0;return}try{let e=new i(a(`/dev/tty`,`r`));return e.isTTY=!0,o=e,o}catch(e){r(e),o=void 0;return}}function c(e=!1){let t=s(),n={exitOnCtrlC:e};return t&&(n.stdin=t),n}export{c as t};
@@ -0,0 +1,2 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,Ln as o,Rn as s,b as c,t as l,tn as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Ct as p,cn as m,ot as h}from"./state-sIHsFpDu.js";import{o as g,s as _}from"./log-CzsijfHZ.js";import{Ar as v,Br as y,Gr as b,L_ as x,Lw as S,Mi as C,Mr as w,Ni as T,Pr as E,R_ as D,Rw as O,Si as k,Ur as A,_r as j,gy as M,my as N,wr as P,zw as F}from"./loadAgentsDir-DI1a76pd.js";import{n as I,r as L}from"./modalContext-CmSKRyea.js";import{a as R,i as z,n as B,o as V,r as H,t as U}from"./crossProjectResume-BJisir9Z.js";function W(e){switch(e.resultType){case`sessionNotFound`:return`Session ${a.bold(e.arg)} was not found. Run ${a.bold(`/resume`)} without arguments to browse all sessions.`;case`multipleMatches`:return`Found ${e.count} sessions matching ${a.bold(e.arg)}. Run ${a.bold(`/resume`)} to pick one from the list.`}}function G({message:e,args:t,onDone:n}){return J.useEffect(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,Y.jsxs)(d,{flexDirection:`column`,children:[(0,Y.jsxs)(c,{dimColor:!0,children:[r.pointer,` /resume `,t]}),(0,Y.jsx)(O,{children:(0,Y.jsx)(c,{children:e})})]})}function K({onDone:e,onResume:t}){let[n,r]=J.useState([]),[a,o]=J.useState([]),[s,l]=J.useState(!0),[f,m]=J.useState(!1),[g,_]=J.useState(!1),{rows:v}=i(),x=L(),S=J.useCallback(async(t,n)=>{l(!0);try{let i=q(t?await y():await b(n),p());if(i.length===0){e(`No conversations found to resume`);return}r(i)}catch{e(`Failed to load conversations`)}finally{l(!1)}},[e]);J.useEffect(()=>{async function e(){let e=await C(h());o(e),S(!1,e)}e()},[S]);let w=J.useCallback(()=>{let e=!g;_(e),S(e,a)},[g,S,a]);async function T(n){let r=D(P(n));if(!r){e(`Failed to resume conversation`);return}let i=E(n)?await A(n):n,o=U(i,g,a);if(o.isCrossProject){if(o.isSameRepoWorktree){m(!0),t(r,i,`slash_command_picker`);return}let n=await u(o.command);n&&process.stdout.write(n),e([``,`This conversation is from a different directory.`,``,`To resume, run:`,` ${o.command}`,``,`(Command copied to clipboard)`,``].join(`
2
+ `),{display:`user`});return}m(!0),t(r,i,`slash_command_picker`)}function O(){e(`Resume cancelled`,{display:`system`})}return s?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(N,{}),(0,Y.jsx)(c,{children:` Loading conversations…`})]}):f?(0,Y.jsxs)(d,{children:[(0,Y.jsx)(N,{}),(0,Y.jsx)(c,{children:` Resuming conversation…`})]}):(0,Y.jsx)(R,{logs:n,maxHeight:x?Math.floor(v/2):v-2,onCancel:O,onSelect:T,onLogsChanged:()=>S(g,a),showAllProjects:g,onToggleAllProjects:w,onAgenticSearch:H})}function q(e,t){return e.filter(e=>!e.isSidechain&&P(e)!==t)}var J,Y,X;e((()=>{o(),n(),J=t(s(),1),m(),V(),F(),M(),I(),S(),l(),z(),B(),T(),g(),v(),x(),Y=f(),X=async(e,t,n)=>{let r=async(n,r,i)=>{try{await t.resume?.(n,r,i),e(void 0,{display:`skip`})}catch(t){_(t),e(`Failed to resume: ${t.message}`)}},i=n?.trim();if(!i)return(0,Y.jsx)(K,{onDone:e,onResume:r},Date.now());let a=await b(await C(h()));if(a.length===0){let t=`No conversations found to resume.`;return(0,Y.jsx)(G,{message:t,args:i,onDone:()=>e(t)})}let o=D(i);if(o){let e=a.filter(e=>P(e)===o).sort((e,t)=>t.modified.getTime()-e.modified.getTime());if(e.length>0){let t=e[0];return r(o,E(t)?await A(t):t,`slash_command_session_id`),null}let t=await j(o);if(t)return r(o,t,`slash_command_session_id`),null}if(w()){let t=await k(i,{exact:!0});if(t.length===1){let e=t[0],n=P(e);if(n)return r(n,E(e)?await A(e):e,`slash_command_title`),null}if(t.length>1){let n=W({resultType:`multipleMatches`,arg:i,count:t.length});return(0,Y.jsx)(G,{message:n,args:i,onDone:()=>e(n)})}}let s=W({resultType:`sessionNotFound`,arg:i});return(0,Y.jsx)(G,{message:s,args:i,onDone:()=>e(s)})}}))();export{X as call,q as filterResumableSessions};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";async function t(e,t){return t.openMessageSelector&&t.openMessageSelector(),{type:`skip`}}e((()=>{}))();export{t as call};
@@ -0,0 +1,11 @@
1
+ async function e(e,t){if(t?.list){console.log(`Recent versions:`),console.log(` (version listing requires access to the release registry)`),console.log(" Use `claude update --list` for available versions.");return}if(t?.safe){if(console.log(`Safe rollback: would install the server-pinned safe version.`),t.dryRun){console.log(` (dry run — no changes made)`);return}console.log(` Safe version pinning requires access to the release API.`),console.log(` Contact oncall for the current safe version.`);return}if(!e){console.error(`Usage: claude rollback [target]
2
+
3
+ Options:
4
+ -l, --list List recent published versions
5
+ --dry-run Show what would be installed
6
+ --safe Roll back to server-pinned safe version
7
+
8
+ Examples:
9
+ claude rollback 2.1.880
10
+ claude rollback --list
11
+ claude rollback --safe`),process.exitCode=1;return}if(console.log(`Rolling back to version ${e}...`),t?.dryRun){console.log(` (dry run — would install ${e})`);return}let{spawnSync:n}=await import(`child_process`),r=n(`npm`,[`install`,`-g`,`@anthropic-ai/claude-code@${e}`],{stdio:`inherit`});r.status===0?console.log(`Rolled back to ${e} successfully.`):(console.error(`Rollback failed with exit code ${r.status}`),process.exitCode=r.status??1)}export{e as rollback};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./runtimeObserver-nAhH4Wca.js";t();export{o as RUNTIME_SESSION_ID,n as getRuntimeTurn,i as initSkillLearning,e as resetRuntimeLLMBookkeeping,r as resetRuntimeObserverForTest,a as runSkillLearningPostSampling};
@@ -0,0 +1,10 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{DD as r,OD as i,Xi as a,zi as o}from"./loadAgentsDir-DI1a76pd.js";import{r as s,t as c}from"./featureCheck-Cm0YNDXO.js";import{a as l,c as u,i as d,l as f,n as p,o as m,r as ee,s as te,u as ne}from"./instinctParser-DHMa8xa0.js";import{C as h,S as g,b as _,c as re,f as ie,i as ae,m as oe,o as v,r as se,u as y}from"./skillGenerator-kbaRbpqJ.js";import{a as ce,i as b,l as le,n as x,o as ue,t as de}from"./observationStore-tvkldXUo.js";import{a as fe,c as pe}from"./projectContext-eXMSfgdZ.js";import{d as me,i as he,l as ge,p as _e}from"./sessionObserver-DG2zQgfi.js";import{dirname as ve,join as S}from"node:path";import{existsSync as C}from"node:fs";import{randomBytes as ye}from"node:crypto";import{mkdir as w,readFile as be,readdir as T,rename as xe,unlink as Se,writeFile as E}from"node:fs/promises";function D(e,t){if(e.length===0)throw Error(`Cannot generate a command draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=g(t?.name??Ce(e)),i=Ee(e),a=t?.description??we(e),o=k(r,n,t),s=Te({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function O(e){await w(e.outputPath,{recursive:!0});let t=S(e.outputPath,`${e.name}.md`);return C(t)?t:(await E(t,e.content,`utf8`),o(),t)}function k(e,n,r){return r?.outputRoot?r.outputRoot:n===`project`?S(r?.cwd??process.cwd(),`.claude`,`commands`):r?.globalCommandsDir??S(t(),`commands`)}function Ce(e){return g([`learned`,...De(e,4)].join(`-`))||`learned-command`}function we(e){return(e[0]?.trigger??`Reuse the learned workflow`).replace(/\s+/g,` `).slice(0,120)}function Te(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`# /${t}`,``,`## When to use`,``,i.map(e=>`- ${e.trigger}`).join(`
2
+ `),``,`## Steps`,``,i.map(e=>`- ${e.action}`).join(`
3
+ `),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).join(`
4
+ `),``].join(`
5
+ `)}function Ee(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function De(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`run`,`use`,`prefer`,`avoid`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var A=e((()=>{n(),a(),_()}));function j(e,t){if(e.length===0)throw Error(`Cannot generate an agent draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=g(t?.name??Oe(e)),i=je(e),a=t?.description??ke(e),o=N(r,n,t),s=Ae({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function M(e){await w(e.outputPath,{recursive:!0});let t=S(e.outputPath,`${e.name}.md`);return C(t)?t:(await E(t,e.content,`utf8`),o(),t)}function N(e,n,r){return r?.outputRoot?r.outputRoot:n===`project`?S(r?.cwd??process.cwd(),`.claude`,`agents`):r?.globalAgentsDir??S(t(),`agents`)}function Oe(e){return g([`learned`,`agent`,...Me(e,4)].join(`-`))||`learned-agent`}function ke(e){return(e[0]?.trigger??`Run the learned multi-step workflow`).replace(/\s+/g,` `).slice(0,120)}function Ae(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`You are the ${t} learned agent.`,``,`## Triggers`,``,i.map(e=>`- ${e.trigger}`).join(`
6
+ `),``,`## Playbook`,``,i.map(e=>`- ${e.action}`).join(`
7
+ `),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).slice(0,20).join(`
8
+ `),``].join(`
9
+ `)}function je(e){return e.reduce((e,t)=>e+t.confidence,0)/e.length}function Me(e,t){let n=new Set([`when`,`with`,`this`,`that`,`user`,`asks`,`for`,`the`,`and`,`debug`,`investigate`,`research`]),r=[];for(let i of e)for(let e of`${i.trigger} ${i.action}`.toLowerCase().split(/[^a-z0-9]+/))if(e.length>2&&!n.has(e)&&!r.includes(e)&&r.push(e),r.length>=t)return r;return r}var P=e((()=>{n(),a(),_()}));function F(e){let t=new Map;for(let n of e){if(n.status!==`active`&&n.status!==`pending`)continue;let e=`${n.domain}:${Pe(n.trigger)}`,r=t.get(e)??[];r.push(n),t.set(e,r)}return Array.from(t.values()).filter(e=>e.length>=f().minClusterSize).map(e=>{let t=e.reduce((e,t)=>e+t.confidence,0)/e.length;return{target:I(e),trigger:e[0]?.trigger??`learned pattern`,domain:e[0]?.domain??`project`,instincts:e,averageConfidence:Number(t.toFixed(2))}}).sort((e,t)=>t.averageConfidence-e.averageConfidence)}function I(e){let t=Array.isArray(e)?e:e.instincts,n=t.map(e=>`${e.trigger} ${e.action}`).join(` `).toLowerCase();return/user asks|explicitly request|command|run /.test(n)?`command`:t.length>=4&&/(debug|investigate|research|multi-step)/.test(n)?`agent`:`skill`}function Ne(e,t){return F(e).filter(e=>e.target===`skill`&&h(e.instincts)).map(e=>ae(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function L(e,t){return F(e).filter(e=>e.target===`command`&&h(e.instincts)).map(e=>D(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function R(e,t){return F(e).filter(e=>e.target===`agent`&&h(e.instincts)).map(e=>j(e.instincts,{...t,scope:e.instincts[0]?.scope??`project`}))}function Pe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,` `).split(/\s+/).filter(Boolean).slice(0,6).join(` `)}var z=e((()=>{_(),v(),A(),P(),ne()}));function B(e){let t=x(e),n=e?.project;return(e?.scope??n?.scope??`project`)===`global`||!n||n.projectId===`global`?S(t,`global`,`instincts`,`personal`):S(t,`projects`,n.projectId,`instincts`,`personal`)}async function V(e,t){let n=m(e);await w(B(t),{recursive:!0});let r=He(n.id,t),i=`${r}.${ye(6).toString(`hex`)}.tmp`;return await E(i,u(n)),await xe(i,r),n}async function H(e){let t=B(e),n=[];try{n=await T(t)}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=[];for(let e of n.filter(e=>e.endsWith(`.json`))){let n=await be(S(t,e),`utf8`);r.push(te(n))}return r.sort((e,t)=>e.id.localeCompare(t.id))}function Fe(e,t){let n=U.then(()=>Ie(e,t));return U=n.catch(()=>{}),n}async function Ie(e,t){let n=await H(t),r=n.find(t=>t.id===e.id)??n.find(t=>t.trigger.toLowerCase()===e.trigger.toLowerCase()&&l(t,e)),i=new Date().toISOString();if(!r)return V(e,t);let a=l(r,e),o=a?-.1:ze(e.evidenceOutcome),s=p(r.confidence+o),c=Le(r.status,s,a);return V(m({...r,confidence:s,evidence:[...r.evidence,...e.evidence],evidenceOutcome:e.evidenceOutcome??r.evidenceOutcome,observationIds:[...r.observationIds??[],...e.observationIds??[]],updatedAt:i,status:c}),t)}function Le(e,t,n){return n&&t<.3?`conflict-hold`:e===`conflict-hold`&&t>=.5||e===`pending`&&t>=.8?`active`:e}async function Re(e){let t=await H(e),n=Date.now(),r=0;for(let i of t){if(i.status!==`pending`&&i.status!==`active`)continue;let t=Date.parse(i.updatedAt);if(Number.isNaN(t))continue;let a=Math.floor((n-t)/We);if(a<1)continue;let o=-Ue*a,s=p(i.confidence+o);s!==i.confidence&&(await V(m({...i,confidence:s,updatedAt:new Date(n).toISOString()}),e),r+=1)}return r}function ze(e){return e===`failure`?-.05:.05}async function Be(e,t){let n=await H(t);return await w(ve(e),{recursive:!0}),await E(e,`${JSON.stringify(n,null,2)}\n`),n}async function Ve(e,t){let n=await H(t),r=Date.now()-e*24*60*60*1e3,i=[];for(let e of n)e.status===`pending`&&Date.parse(e.updatedAt)<r&&(await Se(He(e.id,t)),i.push(e));return i}function He(e,t){return S(B(t),`${e}.json`)}var U,Ue,We,W=e((()=>{b(),d(),U=Promise.resolve(),Ue=.02,We=10080*60*1e3}));function Ge(e){if(G.add(e),G.size>Xe){let e=G.size-Ze,t=G.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;G.delete(e.value)}}}function Ke(e,t=2,n=.8){let r=new Map;for(let t of e){if(t.scope!==`project`)continue;let e=r.get(t.id)??[];e.push(t),r.set(t.id,e)}return Array.from(r.entries()).flatMap(([e,r])=>{let i=Array.from(new Set(r.map(e=>e.projectId).filter(Boolean))),a=r.reduce((e,t)=>e+t.confidence,0)/r.length;return i.length>=t&&a>=n?[{instinctId:e,projectIds:i,averageConfidence:Number(a.toFixed(2))}]:[]})}async function qe(e={}){let t=e.minProjects??2,n=e.minConfidence??.8,r=await Je(e.rootDir),i=Ke(r,t,n),a=[];for(let t of i){if(G.has(t.instinctId))continue;let n=r.find(e=>e.id===t.instinctId);n&&(await V({...n,scope:`global`,projectId:void 0,projectName:void 0,confidence:t.averageConfidence,updatedAt:new Date().toISOString()},{rootDir:e.rootDir,scope:`global`,project:Ye(e.rootDir)}),Ge(t.instinctId),a.push(t))}return a}async function Je(e){let t=S(x(e?{rootDir:e}:void 0),`projects`);if(!C(t))return[];let n=await T(t,{withFileTypes:!0}),r=[];for(let i of n){if(!i.isDirectory())continue;let n=await H({rootDir:e,project:{projectId:i.name,projectName:i.name,scope:`project`,source:`git_root`,cwd:t,storageDir:S(t,i.name)},scope:`project`});r.push(...n)}return r}function Ye(e){let t=x(e?{rootDir:e}:void 0);return{projectId:`global`,projectName:`Global`,scope:`global`,source:`global`,cwd:t,storageDir:S(t,`global`)}}var Xe,Ze,G,Qe=e((()=>{W(),b(),Xe=256,Ze=192,G=new Set}));function $e(){X=0,Z=0,Q.clear()}function et(){return J}function tt(){if(!q){q=!0;try{_e()}catch{}i(it),nt().catch(()=>{})}}async function nt(){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE)return;let e={project:pe(process.cwd())};await Promise.allSettled([Re(e),ce(e),Ve(30,e)])}function rt(e){try{let t=x();return e.startsWith(t)}catch{return!1}}async function it(e){if(!s()||process.env.CLAUDE_SKILL_LEARNING_DISABLE||!e.querySource?.startsWith(`repl_main_thread`)||e.toolUseContext.agentId)return;let t=process.cwd();if(rt(t))return;let n=pe(t),r={project:n};++J;let i=[];for(let t of st(e.messages,n))i.push(await de(t,r));let a=(await ue(r)).filter(e=>e.source===`tool-hook`&&e.sessionId===`runtime-session`&&typeof e.timestamp==`string`&&e.timestamp>Y);i.push(...a);for(let e of a)e.timestamp>Y&&(Y=e.timestamp);if(i.length===0)return;let o=Date.now(),{llm:c}=f(),l=i.length>=5&&X<c.maxCallsPerSession&&o-Z>=c.cooldownMs,u;if(l)X++,Z=o,u=await ge(i,{project:n});else{let{heuristicObserverBackend:e}=await import(`./sessionObserver-Je868MC9.js`),t=e.analyze(i,{project:n});u=Array.isArray(t)?t:await t}for(let e of u)await Fe(ee(e),r);await ot(r)}function at(){J=0,Y=``,$e()}async function ot(e){let n=await H(e),r=process.cwd(),i=[S(r,`.claude`,`skills`),S(t(),`skills`)],a=F(n).filter(e=>e.target===`skill`&&h(e.instincts));for(let e of a){let t=await se(e.instincts,{cwd:r,scope:e.instincts[0]?.scope??`project`},i);if(t.action===`append-evidence`)continue;let n=t.draft;C(S(n.outputPath,`SKILL.md`))||await re(ie(n,await y(`skill`,n,i)))}let o=L(n,{cwd:r});for(let e of o)(await y(`command`,e,[S(r,`.claude`,`commands`),S(t(),`commands`)])).length>0||await O(e);let s=R(n,{cwd:r});for(let e of s)(await y(`agent`,e,[S(r,`.claude`,`agents`),S(t(),`agents`)])).length>0||await M(e);await qe()}function st(e,t){let n=K,r={sessionId:n,projectId:t.projectId,projectName:t.projectName,cwd:t.cwd,timestamp:new Date().toISOString(),source:`hook`};return e.flatMap(e=>{let t=`${n}:${String(e.uuid)}`;if(Q.has(t))return[];if(Q.add(t),Q.size>dt){let e=Q.size-$,t=Q.values();for(let n=0;n<e;n++){let e=t.next();if(e.done)break;Q.delete(e.value)}}if(e.type===`user`){let t=ut(e.message?.content);if(t.length>0)return t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_complete`,toolName:e.toolName,toolOutput:e.output,outcome:e.isError?`failure`:`success`}));let n=ct(e.message?.content);return n.trim()?[{...r,id:crypto.randomUUID(),event:`user_message`,messageText:n}]:[]}if(e.type===`assistant`){let t=lt(e.message?.content),n=ct(e.message?.content);return[...t.map(e=>({...r,id:crypto.randomUUID(),event:`tool_start`,toolName:e.toolName,toolInput:e.input})),...n.trim()?[{...r,id:crypto.randomUUID(),event:`assistant_message`,messageText:n}]:[]]}return[]})}function ct(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
10
+ `):``}function lt(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_use`?[{toolName:String(t.name??`unknown_tool`),input:le(t.input)}]:[]}):[]}function ut(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_result`?[{toolName:String(t.name??t.tool_name??`unknown_tool`),output:le(t.content),isError:t.is_error===!0}]:[]}):[]}var K,q,J,Y,X,Z,Q,dt,$,ft=e((()=>{r(),ne(),c(),b(),fe(),he(),d(),me(),W(),oe(),z(),v(),_(),A(),P(),Qe(),n(),K=`runtime-session`,q=!1,J=0,Y=``,X=0,Z=0,Q=new Set,dt=1e3,$=500}));export{O as A,j as C,D,M as E,k as O,z as S,P as T,I as _,$e as a,L as b,qe as c,Be as d,W as f,Fe as g,V as h,ft as i,A as k,Ke as l,Ve as m,et as n,at as o,H as p,tt as r,it as s,K as t,Qe as u,F as v,N as w,Ne as x,R as y};
@@ -0,0 +1 @@
1
+ import{iA as e,tA as t}from"./loadAgentsDir-DI1a76pd.js";e();export{t as SandboxManager};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,T as r,b as i,i as a,n as o,nt as s,p as c,r as l,t as u,v as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,j as h}from"./state-sIHsFpDu.js";import{Za as g,no as _,oo as v}from"./paths-BBvuDQl9.js";import{i as y,o as b}from"./platform-CuyedWpe.js";import{Dx as x,Ox as S,iA as C,nA as w,sA as T,tA as E}from"./loadAgentsDir-DI1a76pd.js";import{t as D}from"./useKeybinding-FsOnjW6T.js";import{relative as O}from"path";function k(){let e=E.isSandboxingEnabled(),t=E.checkDependencies(),n=t.warnings.length>0?(0,A.jsx)(f,{marginTop:1,flexDirection:`column`,children:t.warnings.map((e,t)=>(0,A.jsx)(i,{dimColor:!0,children:e},t))}):null;if(!e)return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled`}),n]});let r=E.getFsReadConfig(),a=E.getFsWriteConfig(),o=E.getNetworkRestrictionConfig(),s=E.getAllowUnixSockets(),c=E.getExcludedCommands(),l=E.getLinuxGlobPatternWarnings();return(0,A.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,A.jsxs)(f,{flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Excluded Commands:`}),(0,A.jsx)(i,{dimColor:!0,children:c.length>0?c.join(`, `):`None`})]}),r.denyOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Read Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,r.denyOnly.join(`, `)]}),r.allowWithinDeny&&r.allowWithinDeny.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed within denied: `,r.allowWithinDeny.join(`, `)]})]}),a.allowOnly.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Filesystem Write Restrictions:`}),(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,a.allowOnly.join(`, `)]}),a.denyWithinAllow.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied within allowed: `,a.denyWithinAllow.join(`, `)]})]}),(o.allowedHosts&&o.allowedHosts.length>0||o.deniedHosts&&o.deniedHosts.length>0)&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsxs)(i,{bold:!0,color:`permission`,children:[`Network Restrictions`,T()?` (Managed)`:``,`:`]}),o.allowedHosts&&o.allowedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Allowed: `,o.allowedHosts.join(`, `)]}),o.deniedHosts&&o.deniedHosts.length>0&&(0,A.jsxs)(i,{dimColor:!0,children:[`Denied: `,o.deniedHosts.join(`, `)]})]}),s&&s.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`permission`,children:`Allowed Unix Sockets:`}),(0,A.jsx)(i,{dimColor:!0,children:s.join(`, `)})]}),l.length>0&&(0,A.jsxs)(f,{marginTop:1,flexDirection:`column`,children:[(0,A.jsx)(i,{bold:!0,color:`warning`,children:`⚠ Warning: Glob patterns not fully supported on Linux`}),(0,A.jsxs)(i,{dimColor:!0,children:[`The following patterns will be ignored: `,l.slice(0,3).join(`, `),l.length>3&&` (${l.length-3} more)`]})]}),n]})}var A,j=e((()=>{n(),u(),C(),A=p()}));function M({depCheck:e}){let t=y()===`macos`,n=e.errors.some(e=>e.includes(`ripgrep`)),r=e.errors.some(e=>e.includes(`bwrap`)),a=e.errors.some(e=>e.includes(`socat`)),o=e.warnings.length>0,s=e.errors.filter(e=>!e.includes(`ripgrep`)&&!e.includes(`bwrap`)&&!e.includes(`socat`));return(0,N.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[t&&(0,N.jsx)(f,{flexDirection:`column`,children:(0,N.jsxs)(i,{children:[`seatbelt: `,(0,N.jsx)(i,{color:`success`,children:`built-in (macOS)`})]})}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`ripgrep (rg): `,n?(0,N.jsx)(i,{color:`error`,children:`not found`}):(0,N.jsx)(i,{color:`success`,children:`found`})]}),n&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· `,t?`brew install ripgrep`:`apt install ripgrep`]})]}),!t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`bubblewrap (bwrap):`,` `,r?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),r&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install bubblewrap`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`socat: `,a?(0,N.jsx)(i,{color:`error`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`})]}),a&&(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· apt install socat`]})]}),(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{children:[`seccomp filter:`,` `,o?(0,N.jsx)(i,{color:`warning`,children:`not installed`}):(0,N.jsx)(i,{color:`success`,children:`installed`}),o&&(0,N.jsx)(i,{dimColor:!0,children:` (required to block unix domain sockets)`})]}),o&&(0,N.jsxs)(f,{flexDirection:`column`,children:[(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· npm install -g @anthropic-ai/sandbox-runtime`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`· or copy vendor/seccomp/* from sandbox-runtime and set`]}),(0,N.jsxs)(i,{dimColor:!0,children:[` `,`sandbox.seccomp.bpfPath and applyPath in settings.json`]})]})]})]}),s.map(e=>(0,N.jsx)(i,{color:`error`,children:e},e))]})}var N,P=e((()=>{n(),u(),b(),N=p()}));function F({onComplete:e}){let t=E.isSandboxingEnabled(),n=E.areSandboxSettingsLockedByPolicy(),r=E.areUnsandboxedCommandsAllowed();return t?n?(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(i,{color:`subtle`,children:`Override settings are managed by a higher-priority configuration and cannot be changed locally.`}),(0,L.jsx)(f,{marginTop:1,children:(0,L.jsxs)(i,{dimColor:!0,children:[`Current setting: `,r?`Allow unsandboxed fallback`:`Strict sandbox mode`]})})]}):(0,L.jsx)(I,{onComplete:e,currentMode:r?`open`:`closed`}):(0,L.jsx)(f,{flexDirection:`column`,paddingY:1,children:(0,L.jsx)(i,{color:`subtle`,children:`Sandbox is not enabled. Enable sandbox to configure override settings.`})})}function I({onComplete:e,currentMode:n}){let[o]=r(),{headerFocused:s,focusHeader:c}=a(),l=d(`success`,o)(`(current)`),u=[{label:n===`open`?`Allow unsandboxed fallback ${l}`:`Allow unsandboxed fallback`,value:`open`},{label:n===`closed`?`Strict sandbox mode ${l}`:`Strict sandbox mode`,value:`closed`}];async function p(t){let n=t;await E.setSandboxSettings({allowUnsandboxedCommands:n===`open`}),e(n===`open`?`✓ Unsandboxed fallback allowed - commands can run outside sandbox when necessary`:"✓ Strict sandbox mode - all commands must run in sandbox or be excluded via the `excludedCommands` option")}return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[(0,L.jsx)(f,{marginBottom:1,children:(0,L.jsx)(i,{bold:!0,children:`Configure Overrides:`})}),(0,L.jsx)(x,{options:u,onChange:p,onCancel:()=>e(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,L.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Allow unsandboxed fallback:`}),` `,`When a command fails due to sandbox restrictions, Claude can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions).`]}),(0,L.jsxs)(i,{dimColor:!0,children:[(0,L.jsx)(i,{bold:!0,dimColor:!0,children:`Strict sandbox mode:`}),` `,`All bash commands invoked by the model must run in the sandbox unless they are explicitly listed in excludedCommands.`]}),(0,L.jsxs)(i,{dimColor:!0,children:[`Learn more:`,` `,(0,L.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing#configure-sandboxing`,children:`code.claude.com/docs/en/sandboxing#configure-sandboxing`})]})]})]})}var L,R=e((()=>{n(),u(),C(),S(),L=p()}));function z({onComplete:e,depCheck:t}){let[n]=r(),i=E.isSandboxingEnabled(),a=E.isAutoAllowBashIfSandboxedEnabled(),u=t.warnings.length>0,f=_().sandbox?.network?.allowAllUnixSockets,p=u&&!f,m=i?a?`auto-allow`:`regular`:`disabled`,h=d(`success`,n)(`(current)`),g=[{label:m===`auto-allow`?`Sandbox BashTool, with auto-allow ${h}`:`Sandbox BashTool, with auto-allow`,value:`auto-allow`},{label:m===`regular`?`Sandbox BashTool, with regular permissions ${h}`:`Sandbox BashTool, with regular permissions`,value:`regular`},{label:m===`disabled`?`No Sandbox ${h}`:`No Sandbox`,value:`disabled`}];async function v(t){switch(t){case`auto-allow`:await E.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!0}),e(`✓ Sandbox enabled with auto-allow for bash commands`);break;case`regular`:await E.setSandboxSettings({enabled:!0,autoAllowBashIfSandboxed:!1}),e(`✓ Sandbox enabled with regular bash permissions`);break;case`disabled`:await E.setSandboxSettings({enabled:!1,autoAllowBashIfSandboxed:!1}),e(`○ Sandbox disabled`);break}}s({"confirm:no":()=>e(void 0,{display:`skip`})},{context:`Settings`});let y=(0,V.jsx)(o,{title:`Mode`,children:(0,V.jsx)(B,{showSocketWarning:p,options:g,onSelect:v,onComplete:e})},`mode`),b=(0,V.jsx)(o,{title:`Overrides`,children:(0,V.jsx)(F,{onComplete:e})},`overrides`),x=(0,V.jsx)(o,{title:`Config`,children:(0,V.jsx)(k,{})},`config`);return(0,V.jsx)(c,{color:`permission`,children:(0,V.jsx)(l,{title:`Sandbox:`,color:`permission`,defaultTab:`Mode`,children:t.errors.length>0?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[y,...u?[(0,V.jsx)(o,{title:`Dependencies`,children:(0,V.jsx)(M,{depCheck:t})},`dependencies`)]:[],b,x]})})}function B({showSocketWarning:e,options:n,onSelect:r,onComplete:o}){let{headerFocused:s,focusHeader:c}=a();return(0,V.jsxs)(f,{flexDirection:`column`,paddingY:1,children:[e&&(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{color:`warning`,children:`Cannot block unix domain sockets (see Dependencies tab)`})}),(0,V.jsx)(f,{marginBottom:1,children:(0,V.jsx)(i,{bold:!0,children:`Configure Mode:`})}),(0,V.jsx)(x,{options:n,onChange:r,onCancel:()=>o(void 0,{display:`skip`}),onUpFromFirstItem:c,isDisabled:s}),(0,V.jsxs)(f,{flexDirection:`column`,marginTop:1,gap:1,children:[(0,V.jsxs)(i,{dimColor:!0,children:[(0,V.jsx)(i,{bold:!0,dimColor:!0,children:`Auto-allow mode:`}),` `,`Commands will try to run in the sandbox automatically, and attempts to run outside of the sandbox fallback to regular permissions. Explicit ask/deny rules are always respected.`]}),(0,V.jsxs)(i,{dimColor:!0,children:[`Learn more: `,(0,V.jsx)(t,{url:`https://code.claude.com/docs/en/sandboxing`,children:`code.claude.com/docs/en/sandboxing`})]})]})]})}var V,H=e((()=>{n(),u(),D(),C(),v(),S(),j(),P(),R(),V=p()}));async function U(e,t,n){let r=_().theme||`light`,i=y();if(!E.isSupportedPlatform()){let t=i===`wsl`?`Error: Sandboxing requires WSL2. WSL1 is not supported.`:`Error: Sandboxing is currently only supported on macOS, Linux, and WSL2.`;return e(d(`error`,r)(t)),null}let a=E.checkDependencies();if(!E.isPlatformInEnabledList())return e(d(`error`,r)(`Error: Sandboxing is disabled for this platform (${i}) via the enabledPlatforms setting.`)),null;if(E.areSandboxSettingsLockedByPolicy())return e(d(`error`,r)(`Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.`)),null;let o=n?.trim()||``;if(!o)return(0,W.jsx)(z,{onComplete:e,depCheck:a});if(o){let t=o.split(` `)[0];if(t===`exclude`){let t=o.slice(8).trim();if(!t)return e(d(`error`,r)(`Error: Please provide a command pattern to exclude (e.g., /sandbox exclude "npm run test:*")`)),null;let n=t.replace(/^["']|["']$/g,``);w(n);let i=g(`localSettings`),a=i?O(h(),i):`.claude/settings.local.json`;return e(d(`success`,r)(`Added "${n}" to excluded commands in ${a}`)),null}else return e(d(`error`,r)(`Error: Unknown subcommand "${t}". Available subcommand: exclude`)),null}return null}var W;e((()=>{n(),m(),H(),u(),b(),C(),v(),W=p()}))();export{U as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";function t(e){let t=e,n=``,r=0;for(;t!==n&&r<10;)n=t,t=t.normalize(`NFKC`),t=t.replace(/[\p{Cf}\p{Co}\p{Cn}]/gu,``),t=t.replace(/[\u200B-\u200F]/g,``).replace(/[\u202A-\u202E]/g,``).replace(/[\u2066-\u2069]/g,``).replace(/[\uFEFF]/g,``).replace(/[\uE000-\uF8FF]/g,``),r++;if(r>=10)throw Error(`Unicode sanitization reached maximum iterations (10) for input: ${e.slice(0,100)}`);return t}function n(e){if(typeof e==`string`)return t(e);if(Array.isArray(e))return e.map(n);if(typeof e==`object`&&e){let t={};for(let[r,i]of Object.entries(e))t[n(r)]=n(i);return t}return e}var r=e((()=>{}));export{t as n,n as r,r as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-DR8-3Aex.js";var t=e(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),n=e(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),r=e(((e,r)=>{var{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=t(),s=n();e=r.exports={};var c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.safeSrc=[],f=e.t={},p=0,m=`[a-zA-Z0-9-]`,h=[[`\\s`,1],[`\\d`,o],[m,a]],g=e=>{for(let[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=g(t),i=p++;s(e,i,t),f[e]=i,u[i]=t,d[i]=r,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${m}*`),_(`MAINVERSION`,`(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${u[f.PRERELEASEIDENTIFIER]}(?:\\.${u[f.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${u[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[f.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${m}+`),_(`BUILD`,`(?:\\+(${u[f.BUILDIDENTIFIER]}(?:\\.${u[f.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${u[f.MAINVERSION]}${u[f.PRERELEASE]}?${u[f.BUILD]}?`),_(`FULL`,`^${u[f.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${u[f.MAINVERSIONLOOSE]}${u[f.PRERELEASELOOSE]}?${u[f.BUILD]}?`),_(`LOOSE`,`^${u[f.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${u[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${u[f.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:${u[f.PRERELEASE]})?${u[f.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:${u[f.PRERELEASELOOSE]})?${u[f.BUILD]}?)?)?`),_(`XRANGE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),_(`COERCE`,`${u[f.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,u[f.COERCEPLAIN]+`(?:${u[f.PRERELEASE]})?(?:${u[f.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,u[f.COERCE],!0),_(`COERCERTLFULL`,u[f.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${u[f.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${u[f.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${u[f.LONECARET]}${u[f.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${u[f.LONECARET]}${u[f.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${u[f.GTLT]}\\s*(${u[f.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]}|${u[f.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${u[f.XRANGEPLAIN]})\\s+-\\s+(${u[f.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${u[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[f.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),i=e(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),a=e(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),o=e(((e,o)=>{var s=n(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=t(),{safeRe:u,t:d}=r(),f=i(),{compareIdentifiers:p}=a();o.exports=class e{constructor(t,n){if(n=f(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);s(`SemVer`,t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?u[d.LOOSE]:u[d.FULL]);if(!r)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);r[4]?this.prerelease=r[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(s(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let e=this.prerelease[n],r=t.prerelease[n];if(s(`prerelease compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let e=this.build[n],r=t.build[n];if(s(`build compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?u[d.PRERELEASELOOSE]:u[d.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),p(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),s=e(((e,t)=>{var n=o();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),c=e(((e,t)=>{var n=o();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),l=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)>0})),u=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)<0})),d=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)===0})),f=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)!==0})),p=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)>=0})),m=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)<=0})),h=e(((e,t)=>{var n=d(),r=f(),i=l(),a=p(),o=u(),s=m();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),g=e(((e,t)=>{var n=o(),i=s(),{safeRe:a,t:c}=r();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?a[c.COERCEFULL]:a[c.COERCE]);else{let n=t.includePrerelease?a[c.COERCERTLFULL]:a[c.COERCERTL],i;for(;(i=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||i.index+i[0].length!==r.index+r[0].length)&&(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}if(r===null)return null;let o=r[2];return i(`${o}.${r[3]||`0`}.${r[4]||`0`}${t.includePrerelease&&r[5]?`-${r[5]}`:``}${t.includePrerelease&&r[6]?`+${r[6]}`:``}`,t)}})),_=e(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),v=e(((e,a)=>{var s=/\s+/g;a.exports=class e{constructor(t,n){if(n=l(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof u)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(s,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!S(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&C(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=c.get(t);if(n)return n;let r=this.options.loose,i=r?p[m.HYPHENRANGELOOSE]:p[m.HYPHENRANGE];e=e.replace(i,F(this.options.includePrerelease)),d(`hyphen replace`,e),e=e.replace(p[m.COMPARATORTRIM],h),d(`comparator trim`,e),e=e.replace(p[m.TILDETRIM],g),d(`tilde trim`,e),e=e.replace(p[m.CARETTRIM],v),d(`caret trim`,e);let a=e.split(` `).map(e=>T(e,this.options)).join(` `).split(/\s+/).map(e=>P(e,this.options));r&&(a=a.filter(e=>(d(`loose invalid filter`,e,this.options),!!e.match(p[m.COMPARATORLOOSE])))),d(`range list`,a);let o=new Map,s=a.map(e=>new u(e,this.options));for(let e of s){if(S(e))return[e];o.set(e.value,e)}o.size>1&&o.has(``)&&o.delete(``);let l=[...o.values()];return c.set(t,l),l}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>w(e,n)&&t.set.some(t=>w(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1}};var c=new(_()),l=i(),u=y(),d=n(),f=o(),{safeRe:p,t:m,comparatorTrimReplace:h,tildeTrimReplace:g,caretTrimReplace:v}=r(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=t(),S=e=>e.value===`<0.0.0-0`,C=e=>e.value===``,w=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},T=(e,t)=>(e=e.replace(p[m.BUILD],``),d(`comp`,e,t),e=k(e,t),d(`caret`,e),e=D(e,t),d(`tildes`,e),e=j(e,t),d(`xrange`,e),e=N(e,t),d(`stars`,e),e),E=e=>!e||e.toLowerCase()===`x`||e===`*`,D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(` `),O=(e,t)=>{let n=t.loose?p[m.TILDELOOSE]:p[m.TILDE];return e.replace(n,(t,n,r,i,a)=>{d(`tilde`,e,t,n,r,i,a);let o;return E(n)?o=``:E(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:E(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(d(`replaceTilde pr`,a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,d(`tilde return`,o),o})},k=(e,t)=>e.trim().split(/\s+/).map(e=>A(e,t)).join(` `),A=(e,t)=>{d(`caret`,e,t);let n=t.loose?p[m.CARETLOOSE]:p[m.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{d(`caret`,e,t,n,i,a,o);let s;return E(n)?s=``:E(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(d(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(d(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),d(`caret return`,s),s})},j=(e,t)=>(d(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>M(e,t)).join(` `)),M=(e,t)=>{e=e.trim();let n=t.loose?p[m.XRANGELOOSE]:p[m.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{d(`xRange`,e,n,r,i,a,o,s);let c=E(i),l=c||E(a),u=l||E(o),f=u;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),d(`xRange return`,n),n})},N=(e,t)=>(d(`replaceStars`,e,t),e.trim().replace(p[m.STAR],``)),P=(e,t)=>(d(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?m.GTE0PRE:m.GTE0],``)),F=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=E(r)?``:E(i)?`>=${r}.0.0${e?`-0`:``}`:E(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=E(l)?``:E(u)?`<${+l+1}.0.0-0`:E(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),I=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(d(e[n].semver),e[n].semver!==u.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),y=e(((e,t)=>{var a=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return a}constructor(t,n){if(n=s(n),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),d(`comparator`,t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===a?this.value=``:this.value=this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],n=e.match(t);if(!n)throw TypeError(`Invalid comparator: ${e}`);this.operator=n[1]===void 0?``:n[1],this.operator===`=`&&(this.operator=``),n[2]?this.semver=new f(n[2],this.options.loose):this.semver=a}toString(){return this.value}test(e){if(d(`Comparator.test`,e,this.options.loose),this.semver===a||e===a)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return u(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new p(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new p(this.value,n).test(t.semver):(n=s(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||u(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||u(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var s=i(),{safeRe:c,t:l}=r(),u=h(),d=n(),f=o(),p=v()})),b=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}}));export{t as _,h as a,f as c,l as d,c as f,r as g,a as h,g as i,d as l,o as m,y as n,m as o,s as p,v as r,p as s,b as t,u};