claude-code-zanii 2.8.4

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 (669) hide show
  1. package/README.md +146 -0
  2. package/dist/chunks/AddWorkspaceDirectory-y_rd6sRl.js +1 -0
  3. package/dist/chunks/App-DgWSavG1.js +1 -0
  4. package/dist/chunks/ApproveApiKey-CJKWha-a.js +1 -0
  5. package/dist/chunks/ApproveApiKey-DTs2ExZH.js +1 -0
  6. package/dist/chunks/AssistantSessionChooser-BAhVk4id.js +1 -0
  7. package/dist/chunks/BackgroundTasksDialog-XU_JPh7R.js +2 -0
  8. package/dist/chunks/BypassPermissionsModeDialog-DV0Pi7ys.js +1 -0
  9. package/dist/chunks/ClaudeInChromeOnboarding-6erm_8Fn.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-CjBvzB5s.js +1 -0
  11. package/dist/chunks/ClaudeMdExternalIncludesDialog-ts0XnWwl.js +1 -0
  12. package/dist/chunks/ConsoleOAuthFlow-DySPdSqQ.js +1 -0
  13. package/dist/chunks/CustomSelect-DqZxzBZP.js +1 -0
  14. package/dist/chunks/DesktopHandoff-5c90JK88.js +1 -0
  15. package/dist/chunks/DevChannelsDialog-DCMderzu.js +1 -0
  16. package/dist/chunks/Dialog-Dgg8bqcG.js +1 -0
  17. package/dist/chunks/DiffDialog-BU765aqh.js +6 -0
  18. package/dist/chunks/Doctor-B73iDB-d.js +3 -0
  19. package/dist/chunks/Doctor-CLZDdNRo.js +1 -0
  20. package/dist/chunks/ExitFlow-DBqn2mUf.js +2 -0
  21. package/dist/chunks/Feedback-D-JHabwi.js +2 -0
  22. package/dist/chunks/Grove-D-uQNMMo.js +11 -0
  23. package/dist/chunks/HybridTransport-B-G4QJcy.js +4 -0
  24. package/dist/chunks/ITermBackend-KP1vKsRN.js +1 -0
  25. package/dist/chunks/InProcessTransport-ByBEKxrQ.js +1 -0
  26. package/dist/chunks/InvalidConfigDialog-CMqiZ5nG.js +1 -0
  27. package/dist/chunks/InvalidSettingsDialog-CjPCKzVZ.js +1 -0
  28. package/dist/chunks/ListItem-B6MyhHvM.js +1 -0
  29. package/dist/chunks/MCPConnectionManager-BJ8PcYPe.js +1 -0
  30. package/dist/chunks/Message-DNxJ_tMS.js +1 -0
  31. package/dist/chunks/MessageSelector-D79Ug71B.js +3 -0
  32. package/dist/chunks/Messages-CtIbkB2M.js +11 -0
  33. package/dist/chunks/Onboarding-DVrgKrI9.js +1 -0
  34. package/dist/chunks/OverageCreditUpsell-D_td1ss4.js +1 -0
  35. package/dist/chunks/PermissionDialog-BCS22yEO.js +1 -0
  36. package/dist/chunks/PermissionDialog-C5O1fL53.js +1 -0
  37. package/dist/chunks/PermissionRequestTitle-CtlbBU9t.js +1 -0
  38. package/dist/chunks/PluginSettings-OPrg-_3N.js +17 -0
  39. package/dist/chunks/PressEnterToContinue-DmzxIgbZ.js +1 -0
  40. package/dist/chunks/PromptInputFooterSuggestions-CcsKj5DK.js +1 -0
  41. package/dist/chunks/PromptInputHelpMenu-JedFdsxU.js +1 -0
  42. package/dist/chunks/REPL-ByhyIRnf.js +1 -0
  43. package/dist/chunks/REPL-Clve-8zC.js +157 -0
  44. package/dist/chunks/RemoteCallout-BZcabEKb.js +1 -0
  45. package/dist/chunks/RemoteSessionManager-C2PIFDHt.js +1 -0
  46. package/dist/chunks/ResumeConversation-D3ZRTFcF.js +1 -0
  47. package/dist/chunks/SSETransport-DmZWnH0k.js +4 -0
  48. package/dist/chunks/SearchBox-DQg2Ph0V.js +1 -0
  49. package/dist/chunks/SearchExtraToolsTool-CLO4nt6N.js +1 -0
  50. package/dist/chunks/SentryErrorBoundary-BVfBaOOU.js +2 -0
  51. package/dist/chunks/SentryErrorBoundary-DIaVFad-.js +1 -0
  52. package/dist/chunks/Settings-rOCxQdS8.js +2 -0
  53. package/dist/chunks/TeleportProgress-CP8IY6bz.js +1 -0
  54. package/dist/chunks/TeleportRepoMismatchDialog-DMmHgBqo.js +1 -0
  55. package/dist/chunks/TeleportResumeWrapper-D5wEAW1-.js +1 -0
  56. package/dist/chunks/ThemePicker-Bgr7yOQB.js +1 -0
  57. package/dist/chunks/TmuxBackend-BzbtUtP1.js +9 -0
  58. package/dist/chunks/TrustDialog-BI5U3BQ0.js +1 -0
  59. package/dist/chunks/TungstenTool-CiQclNwj.js +1 -0
  60. package/dist/chunks/TungstenTool-kMqy-ifa.js +1 -0
  61. package/dist/chunks/ValidationErrorsList-DprGtB2w.js +2 -0
  62. package/dist/chunks/WelcomeV2-C4vfBnIy.js +1 -0
  63. package/dist/chunks/WindowsTerminalBackend-BSoezOCE.js +2 -0
  64. package/dist/chunks/add-dir-DpOmv6kv.js +1 -0
  65. package/dist/chunks/agentDisplay-DuYEwOwO.js +1 -0
  66. package/dist/chunks/agents-BlurXZrF.js +2 -0
  67. package/dist/chunks/agents-DhZf7ftU.js +103 -0
  68. package/dist/chunks/ajv-CDrSAj3O.js +8 -0
  69. package/dist/chunks/analytics-i6X1et4O.js +1 -0
  70. package/dist/chunks/ant-D9hd_iYy.js +1 -0
  71. package/dist/chunks/api-CoaOHwDQ.js +4 -0
  72. package/dist/chunks/api-DvyGR-L7.js +1 -0
  73. package/dist/chunks/api-YHYC4Zdk.js +1 -0
  74. package/dist/chunks/artifacts-BMAYdaqh.js +1 -0
  75. package/dist/chunks/asciicast-DpHRoebc.js +1 -0
  76. package/dist/chunks/asciicast-HG1EoAQe.js +4 -0
  77. package/dist/chunks/assistant-D4-qcNT1.js +1 -0
  78. package/dist/chunks/assistant-DO2ZmZn1.js +1 -0
  79. package/dist/chunks/assistant-Dd86NmJM.js +1 -0
  80. package/dist/chunks/attributionHooks-BUmHrLhB.js +1 -0
  81. package/dist/chunks/attributionTrailer-r2Pbpu2N.js +1 -0
  82. package/dist/chunks/auth-CF3BGNYT.js +1 -0
  83. package/dist/chunks/auth-DwWwG43F.js +1 -0
  84. package/dist/chunks/auth-V_Xk2iea.js +1 -0
  85. package/dist/chunks/autoMode-DUksX5_i.js +45 -0
  86. package/dist/chunks/autoModeDenials-0CPO-Jbu.js +1 -0
  87. package/dist/chunks/autonomy-C5mNhAdz.js +21 -0
  88. package/dist/chunks/autonomy-CLt1dWaC.js +1 -0
  89. package/dist/chunks/autonomyPanel-rioFnrQO.js +1 -0
  90. package/dist/chunks/axios-DPuSPBlH.js +1 -0
  91. package/dist/chunks/axios-Zh7qGPze.js +12 -0
  92. package/dist/chunks/backgroundHousekeeping-BGtfqu-J.js +1 -0
  93. package/dist/chunks/backgroundHousekeeping-BqKZEvy0.js +17 -0
  94. package/dist/chunks/banner-BGLr3KYQ.js +2 -0
  95. package/dist/chunks/base64-js-B1tFNiG0.js +1 -0
  96. package/dist/chunks/bedrockClient-BFzWuhQK.js +15 -0
  97. package/dist/chunks/bg-B-YgGwLj.js +9 -0
  98. package/dist/chunks/bg-IU4gG3jc.js +1 -0
  99. package/dist/chunks/branch-BWY5W7hf.js +3 -0
  100. package/dist/chunks/break-cache-CY-O23fJ.js +8 -0
  101. package/dist/chunks/bridge-CqWd70vK.js +2 -0
  102. package/dist/chunks/bridgeConfig-CWO8AmCY.js +1 -0
  103. package/dist/chunks/bridgeConfig-D38y9eXn.js +1 -0
  104. package/dist/chunks/bridgeConfig-EwUq__ct.js +1 -0
  105. package/dist/chunks/bridgeConfig-GYR-LUiu.js +1 -0
  106. package/dist/chunks/bridgeEnabled-DKqmLnKO.js +1 -0
  107. package/dist/chunks/bridgeEnabled-DZIGDtfY.js +1 -0
  108. package/dist/chunks/bridgeMain-CXVks2ND.js +1 -0
  109. package/dist/chunks/bridgeMain-D4nsECwJ.js +68 -0
  110. package/dist/chunks/bridgeMessaging-BUOZU_ba.js +1 -0
  111. package/dist/chunks/bridgePointer-BpzIEsD_.js +1 -0
  112. package/dist/chunks/browser-D1vC3BNd.js +1 -0
  113. package/dist/chunks/btw-CVXJwoXo.js +1 -0
  114. package/dist/chunks/buddy-BLcvL8lP.js +3 -0
  115. package/dist/chunks/bundledMode-DQNSSQbt.js +1 -0
  116. package/dist/chunks/caches-BrfvzKn5.js +1 -0
  117. package/dist/chunks/caches-CkSv3MfC.js +3 -0
  118. package/dist/chunks/capacityWake-BWCSatN6.js +1 -0
  119. package/dist/chunks/changeDetector-DEZU6tum.js +1 -0
  120. package/dist/chunks/changeDetector-Df7c6U3d.js +1 -0
  121. package/dist/chunks/channelAllowlist-BApjAS0V.js +1 -0
  122. package/dist/chunks/channelNotification-BjWwF85R.js +1 -0
  123. package/dist/chunks/channelNotification-D01YVwNj.js +1 -0
  124. package/dist/chunks/chokidar-DPwMBcWI.js +1 -0
  125. package/dist/chunks/chokidar-DkDXNCTz.js +1 -0
  126. package/dist/chunks/chrome-D7coxEOI.js +1 -0
  127. package/dist/chunks/chromeNativeHost-CPj9M_4-.js +1 -0
  128. package/dist/chunks/chunk-DR8-3Aex.js +1 -0
  129. package/dist/chunks/classPrivateFieldSet2-DZkxcFPS.js +1 -0
  130. package/dist/chunks/claudeAiLimitsHook-ATshVrOH.js +1 -0
  131. package/dist/chunks/claudeDesktop-PVa9tWsM.js +1 -0
  132. package/dist/chunks/cleanup-C-PGmKpV.js +1 -0
  133. package/dist/chunks/clear-CxGE9Ntr.js +1 -0
  134. package/dist/chunks/cliLaunch-CMXoY_LO.js +1 -0
  135. package/dist/chunks/client-BWED8Tbu.js +35 -0
  136. package/dist/chunks/client-CinDjeSq.js +7 -0
  137. package/dist/chunks/client-CpXGg9e0.js +1 -0
  138. package/dist/chunks/color-B3w_VQTn.js +1 -0
  139. package/dist/chunks/color-convert-BQZnVz_5.js +1 -0
  140. package/dist/chunks/commands-DFp48zwy.js +1 -0
  141. package/dist/chunks/commitAttribution-B0cXmbvv.js +2 -0
  142. package/dist/chunks/commitAttribution-DRSKRoH6.js +1 -0
  143. package/dist/chunks/common-BX7bn3hg.js +1 -0
  144. package/dist/chunks/common-Ce3LanTX.js +1 -0
  145. package/dist/chunks/common-DdLQuE2_.js +1 -0
  146. package/dist/chunks/common-HfKcqOYK.js +1 -0
  147. package/dist/chunks/compact-C8ljGMdo.js +3 -0
  148. package/dist/chunks/companion-mD1jw6xX.js +1 -0
  149. package/dist/chunks/completionCache-BqQXVTa9.js +1 -0
  150. package/dist/chunks/completionCache-BtP4vfAi.js +4 -0
  151. package/dist/chunks/computerUseLock-ADE_PhIK.js +1 -0
  152. package/dist/chunks/config-CmyaIIOY.js +1 -0
  153. package/dist/chunks/config-Rl1Y_Dtq.js +1 -0
  154. package/dist/chunks/connectHeadless-MFABhXpz.js +1 -0
  155. package/dist/chunks/constants-BM62Vf_X.js +1 -0
  156. package/dist/chunks/constants-BfXy-5cI.js +1 -0
  157. package/dist/chunks/context-BeiZkUNq.js +1 -0
  158. package/dist/chunks/context-noninteractive-CRdF3iv8.js +54 -0
  159. package/dist/chunks/controlMessageCompat-591iGHUK.js +1 -0
  160. package/dist/chunks/conversation-BoguXZEI.js +1 -0
  161. package/dist/chunks/conversation-yhs7tT-g.js +1 -0
  162. package/dist/chunks/copy-BpeUcqku.js +7 -0
  163. package/dist/chunks/createSSHSession-B3JOB4TE.js +6 -0
  164. package/dist/chunks/createSession-BJSnFBGt.js +1 -0
  165. package/dist/chunks/createSession-CnRHI3RU.js +1 -0
  166. package/dist/chunks/cron-iqTFGIos.js +1 -0
  167. package/dist/chunks/cronScheduler-zRXhgEEU.js +6 -0
  168. package/dist/chunks/cronTasks-CMJldfoP.js +2 -0
  169. package/dist/chunks/crossProjectResume-DxO6TX30.js +40 -0
  170. package/dist/chunks/cwd-B2guYBbl.js +1 -0
  171. package/dist/chunks/cwd-B5bbyUwz.js +1 -0
  172. package/dist/chunks/cwd-BXiaJzLh.js +1 -0
  173. package/dist/chunks/daemon-B3v4OoOu.js +2 -0
  174. package/dist/chunks/dangerousBackend-OmCzoW35.js +1 -0
  175. package/dist/chunks/datadog-3-Vvz0yz.js +1 -0
  176. package/dist/chunks/datadog-BQlp3bTs.js +1 -0
  177. package/dist/chunks/debug-BDBIipC1.js +2 -0
  178. package/dist/chunks/debug-C7tW7DFW.js +1 -0
  179. package/dist/chunks/debug-CjIaNjpK.js +5 -0
  180. package/dist/chunks/debugUtils-Dsg-UHeg.js +1 -0
  181. package/dist/chunks/defineProperty-CaCI0a5T.js +1 -0
  182. package/dist/chunks/desktop-C_SS0068.js +1 -0
  183. package/dist/chunks/detached-B7RNZeyl.js +5 -0
  184. package/dist/chunks/detect-libc-DFFGDzPC.js +1 -0
  185. package/dist/chunks/detectRepository-BnTCJAXR.js +1 -0
  186. package/dist/chunks/detectRepository-Gobn9eFt.js +1 -0
  187. package/dist/chunks/detection-CN_uLGU2.js +1 -0
  188. package/dist/chunks/detection-DW6grIlc.js +1 -0
  189. package/dist/chunks/diff-B8YmRG5T.js +1 -0
  190. package/dist/chunks/directoryCompletion-J560aATd.js +1 -0
  191. package/dist/chunks/dist-B1wOprSs.js +29 -0
  192. package/dist/chunks/dist-DZQOarNX.js +5 -0
  193. package/dist/chunks/dist-HZfkKiUF.js +20 -0
  194. package/dist/chunks/dist-es-4xyrZoNc2.js +1 -0
  195. package/dist/chunks/dist-es-6kjvVbJd.js +1 -0
  196. package/dist/chunks/dist-es-BJldFHbt.js +3 -0
  197. package/dist/chunks/dist-es-BM013UFT.js +1 -0
  198. package/dist/chunks/dist-es-BPPewn1A.js +1 -0
  199. package/dist/chunks/dist-es-BZGG3Hnm.js +1 -0
  200. package/dist/chunks/dist-es-BZjJL64k2.js +1 -0
  201. package/dist/chunks/dist-es-BctcPxLN.js +1 -0
  202. package/dist/chunks/dist-es-Bf2jR30y.js +1 -0
  203. package/dist/chunks/dist-es-BgLoR-hQ.js +1 -0
  204. package/dist/chunks/dist-es-BismPcTW.js +1 -0
  205. package/dist/chunks/dist-es-BrPzXmSP.js +1 -0
  206. package/dist/chunks/dist-es-Bu21Wvhs.js +1 -0
  207. package/dist/chunks/dist-es-BuWNNAXW.js +1 -0
  208. package/dist/chunks/dist-es-Bz11sFiK2.js +1 -0
  209. package/dist/chunks/dist-es-C5VplyPL2.js +5 -0
  210. package/dist/chunks/dist-es-C66BuLgn.js +1 -0
  211. package/dist/chunks/dist-es-CCIzgNln2.js +1 -0
  212. package/dist/chunks/dist-es-CLyx7Kge2.js +1 -0
  213. package/dist/chunks/dist-es-CUbatGdn.js +1 -0
  214. package/dist/chunks/dist-es-CYe_-TbD.js +1 -0
  215. package/dist/chunks/dist-es-C_IHUdzL.js +1 -0
  216. package/dist/chunks/dist-es-Ci_rKlMr.js +1 -0
  217. package/dist/chunks/dist-es-ClDZBAj7.js +1 -0
  218. package/dist/chunks/dist-es-Cp--qjOi.js +1 -0
  219. package/dist/chunks/dist-es-CzE4kW1L.js +9 -0
  220. package/dist/chunks/dist-es-DUg5w7-v.js +1 -0
  221. package/dist/chunks/dist-es-Dl0ZRczY.js +1 -0
  222. package/dist/chunks/dist-es-Do_155z5.js +1 -0
  223. package/dist/chunks/dist-es-DxIM0jd82.js +1 -0
  224. package/dist/chunks/dist-es-Fav2oBDs.js +1 -0
  225. package/dist/chunks/dist-es-TZjwPaGn.js +1 -0
  226. package/dist/chunks/dist-es-W22ud2el2.js +1 -0
  227. package/dist/chunks/dist-es-aU8-02YH.js +1 -0
  228. package/dist/chunks/dist-es-b3yZSGx82.js +1 -0
  229. package/dist/chunks/dist-es-dIP5JtXz.js +5 -0
  230. package/dist/chunks/dist-es-mQ4HvnYs2.js +1 -0
  231. package/dist/chunks/distRoot-CJaacAHy.js +1 -0
  232. package/dist/chunks/doctor-DLZPF4iY.js +1 -0
  233. package/dist/chunks/earlyInput-BTI1CSNt.js +2 -0
  234. package/dist/chunks/earlyInput-BwGtzhhP.js +1 -0
  235. package/dist/chunks/effort-BaHvpBWr.js +9 -0
  236. package/dist/chunks/entry-_e-lyRwv.js +14 -0
  237. package/dist/chunks/env-CesrOJJq.js +1 -0
  238. package/dist/chunks/envLessBridgeConfig-4oys0_9A.js +1 -0
  239. package/dist/chunks/envLessBridgeConfig-DJ1Sts3F.js +1 -0
  240. package/dist/chunks/envUtils-CFG7IQID.js +1 -0
  241. package/dist/chunks/errorLogSink-Ti4Suoz6.js +2 -0
  242. package/dist/chunks/escHotkey-CVn_80xM.js +259 -0
  243. package/dist/chunks/esm-BFnjHW38.js +1 -0
  244. package/dist/chunks/esm-BQg_LX3V.js +1 -0
  245. package/dist/chunks/esm-BtC6CMmM.js +1 -0
  246. package/dist/chunks/esm-BwzC0MQp.js +1 -0
  247. package/dist/chunks/esm-CFybeQ_Q.js +1 -0
  248. package/dist/chunks/esm-CK-5CT5X.js +1 -0
  249. package/dist/chunks/esm-CL1OwlZB.js +1 -0
  250. package/dist/chunks/esm-CMzgSTAl.js +1 -0
  251. package/dist/chunks/esm-CPE_H2Lx.js +1 -0
  252. package/dist/chunks/esm-CcWquv5a.js +10 -0
  253. package/dist/chunks/esm-CeNEpRZt.js +1 -0
  254. package/dist/chunks/esm-D7hykoRB.js +1 -0
  255. package/dist/chunks/esm-DUtcefEV.js +1 -0
  256. package/dist/chunks/esm-DhrUwJBp.js +1 -0
  257. package/dist/chunks/esm-Duu1fRQ8.js +1 -0
  258. package/dist/chunks/esm-Ght2BaU2.js +1 -0
  259. package/dist/chunks/esm-Q6Yz2GMx.js +56 -0
  260. package/dist/chunks/esm-WONEiurY.js +13 -0
  261. package/dist/chunks/event-streams-BumpU1aB.js +1 -0
  262. package/dist/chunks/eventLoopStallDetector-DxyFdg1h.js +1 -0
  263. package/dist/chunks/execAsync-ChKxDZ8C.js +1 -0
  264. package/dist/chunks/execFileNoThrow-DdmR1mBS.js +1 -0
  265. package/dist/chunks/execSyncWrapper-Ch4TNj8u.js +1 -0
  266. package/dist/chunks/execa-BMaINL7N.js +34 -0
  267. package/dist/chunks/executor-C7INr19-.js +1 -0
  268. package/dist/chunks/executor-Dnf3YYma.js +1604 -0
  269. package/dist/chunks/exit-BakzsOD0.js +1 -0
  270. package/dist/chunks/exit-CiDn2tN9.js +2 -0
  271. package/dist/chunks/export-b-6pqMqz.js +2 -0
  272. package/dist/chunks/exportRenderer-RxtEIyTm.js +1 -0
  273. package/dist/chunks/extra-usage-7EPJNjNW.js +1 -0
  274. package/dist/chunks/extra-usage-ChvuewCq.js +1 -0
  275. package/dist/chunks/extra-usage-core-BVhLtoDF.js +1 -0
  276. package/dist/chunks/extra-usage-noninteractive-_Njh6q-q.js +1 -0
  277. package/dist/chunks/extraUsage-qOBMQB6g.js +1 -0
  278. package/dist/chunks/extractMemories-CRBVNiG1.js +1 -0
  279. package/dist/chunks/fast-C4uw_g7o.js +1 -0
  280. package/dist/chunks/fast-CEaIzaPl.js +1 -0
  281. package/dist/chunks/featureCheck-B1GSTyhh.js +1 -0
  282. package/dist/chunks/featureCheck-DKigAPal.js +1 -0
  283. package/dist/chunks/feedback-Bf3TjjuD.js +1 -0
  284. package/dist/chunks/figures-fES5sASd.js +1 -0
  285. package/dist/chunks/fileStateCache-DAsLEZau.js +1 -0
  286. package/dist/chunks/files-B-m_4X8b.js +2 -0
  287. package/dist/chunks/findExecutable-D8vJrFnO.js +1 -0
  288. package/dist/chunks/firstPartyEventLogger-BtrGagNa.js +1 -0
  289. package/dist/chunks/flushGate-2zqab-Pp.js +1 -0
  290. package/dist/chunks/foundry-sdk-CtX8C0x3.js +1 -0
  291. package/dist/chunks/fpsMetrics-ts_jaF3g.js +1 -0
  292. package/dist/chunks/fuse-ivQ_eRwF.js +1 -0
  293. package/dist/chunks/gates-CmKoQ0O-.js +1 -0
  294. package/dist/chunks/gates-_wbPDQ3M.js +1 -0
  295. package/dist/chunks/gemini-DRx495gn.js +3 -0
  296. package/dist/chunks/generateRecap-Cv8gd_QF.js +1 -0
  297. package/dist/chunks/generateSessionName-Dpjg-u_x.js +1 -0
  298. package/dist/chunks/genericProcessUtils-BFJMxLqn.js +23 -0
  299. package/dist/chunks/getMachineId-bsd-C9pL9Ajr.js +1 -0
  300. package/dist/chunks/getMachineId-darwin-Ma4F9rJg.js +2 -0
  301. package/dist/chunks/getMachineId-linux-C0lXMqsj.js +1 -0
  302. package/dist/chunks/getMachineId-unsupported-ByHQTXat.js +1 -0
  303. package/dist/chunks/getMachineId-win-DZsXZmTz.js +1 -0
  304. package/dist/chunks/git-Bj8Ow4pJ.js +6 -0
  305. package/dist/chunks/git-Q_b4oZ17.js +1 -0
  306. package/dist/chunks/githubRepoPathMapping-DGivBX9h.js +1 -0
  307. package/dist/chunks/goal-BrHEJv8o.js +3 -0
  308. package/dist/chunks/goalStorage-CsuPOQbk.js +1 -0
  309. package/dist/chunks/graceful-fs-BuPWC-vB.js +2 -0
  310. package/dist/chunks/grok-CDkDDaY_.js +1 -0
  311. package/dist/chunks/growthbook-D3_Cr9n-.js +1 -0
  312. package/dist/chunks/growthbook-p4aJ_UMv.js +32 -0
  313. package/dist/chunks/hash-KW-tVnPp.js +1 -0
  314. package/dist/chunks/heapdump-CloylIZ9.js +5 -0
  315. package/dist/chunks/help-DpSJlHIc.js +1 -0
  316. package/dist/chunks/hooks-2pogt8nv.js +79 -0
  317. package/dist/chunks/hooks-BBODdwnE.js +1 -0
  318. package/dist/chunks/hostAdapter-B5KTUqhv.js +1 -0
  319. package/dist/chunks/hostGuard-DyWr2TwE.js +1 -0
  320. package/dist/chunks/httpAuthSchemes-CgPbtGos.js +13 -0
  321. package/dist/chunks/ide-CJEcfBZq.js +2 -0
  322. package/dist/chunks/inboundAttachments-RNpYpRTO.js +1 -0
  323. package/dist/chunks/index.min-DCDiLq-j.js +1 -0
  324. package/dist/chunks/initReplBridge-D2E6IM2B.js +1 -0
  325. package/dist/chunks/initReplBridge-p2uwDBPx.js +1 -0
  326. package/dist/chunks/insights-DnpZScKs.js +822 -0
  327. package/dist/chunks/install-D_vTxUlG.js +1 -0
  328. package/dist/chunks/install-github-app-BK8A7g3i.js +147 -0
  329. package/dist/chunks/install-slack-app-C47R9VoI.js +1 -0
  330. package/dist/chunks/instinctParser-DxKdI3JC.js +1 -0
  331. package/dist/chunks/instrumentation-DkdAJFrZ.js +12 -0
  332. package/dist/chunks/intl-Pse97ORk.js +1 -0
  333. package/dist/chunks/isObject-DaxDnPKm.js +1 -0
  334. package/dist/chunks/isSymbol-D7QeUnS5.js +1 -0
  335. package/dist/chunks/job-opl00C4l.js +2 -0
  336. package/dist/chunks/json-bigint-BRRVs1dv.js +8 -0
  337. package/dist/chunks/jsx-runtime-BTgGEFjL.js +1 -0
  338. package/dist/chunks/jws-B_ieuaZg.js +3 -0
  339. package/dist/chunks/jwtUtils-D-tJzoJY.js +1 -0
  340. package/dist/chunks/keybindings-mRf9VSe8.js +2 -0
  341. package/dist/chunks/lang-eH4EJErj.js +1 -0
  342. package/dist/chunks/language-DD9ar6RA.js +1 -0
  343. package/dist/chunks/language-EZLNdETg.js +1 -0
  344. package/dist/chunks/launchAgentsPlatform-Cq0_7-IM.js +1 -0
  345. package/dist/chunks/launchAutofixPr-Bw7aUHUs.js +18 -0
  346. package/dist/chunks/launchCommand-Bk1Fn-qZ.js +1 -0
  347. package/dist/chunks/launchLocalMemory-CLBCUgwd.js +3 -0
  348. package/dist/chunks/launchLocalVault-BfWJWrBg.js +3 -0
  349. package/dist/chunks/launchMemoryStores-DdnSVSDZ.js +1 -0
  350. package/dist/chunks/launchOnboarding-ziCEX3GI.js +8 -0
  351. package/dist/chunks/launchSchedule-G_c7sgmy.js +1 -0
  352. package/dist/chunks/launchSkillStore-Z1Kd7nCg.js +1 -0
  353. package/dist/chunks/launchTeleport-Dp9AFbPx.js +3 -0
  354. package/dist/chunks/launchVault-hwK-Ljek.js +1 -0
  355. package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
  356. package/dist/chunks/lib-BHRYgENJ.js +8 -0
  357. package/dist/chunks/lib-DRyNc7xD.js +2 -0
  358. package/dist/chunks/lib-Ddq71jM5.js +14 -0
  359. package/dist/chunks/loadAgentsDir-Bz0FfcVt.js +5620 -0
  360. package/dist/chunks/loadAgentsDir-CLM0ws7u.js +1 -0
  361. package/dist/chunks/loadPluginHooks-B5SIS2uo.js +1 -0
  362. package/dist/chunks/loadSso-RY87rrJO.js +1 -0
  363. package/dist/chunks/localSearch-BLF6PSv2.js +1 -0
  364. package/dist/chunks/localSearch-CTycGe3E.js +1 -0
  365. package/dist/chunks/localSearch-inDahM8I.js +1 -0
  366. package/dist/chunks/lockfile--gk1HDM6.js +1 -0
  367. package/dist/chunks/log-B-Nj3Yed.js +1 -0
  368. package/dist/chunks/log-DVv8YiNo.js +1 -0
  369. package/dist/chunks/login-BeLvLowc.js +1 -0
  370. package/dist/chunks/login-DUUOeNoz.js +1 -0
  371. package/dist/chunks/logoV2Utils-D5SpeZ3C.js +1 -0
  372. package/dist/chunks/logout-C2QuTBdS.js +1 -0
  373. package/dist/chunks/magicDocs-CUXKi-Wv.js +57 -0
  374. package/dist/chunks/main-CFhpWtpC.js +1420 -0
  375. package/dist/chunks/main-sboa5RKc.js +31 -0
  376. package/dist/chunks/mappers-DLkk0PZz.js +1 -0
  377. package/dist/chunks/mcp-C2f6IgAp.js +2 -0
  378. package/dist/chunks/mcp-Djui9m3_.js +6 -0
  379. package/dist/chunks/mcp-DvTSxrJ4.js +1 -0
  380. package/dist/chunks/mcpServer-DMA0bdFC.js +1 -0
  381. package/dist/chunks/mcpServer-DxEHfW2v.js +1 -0
  382. package/dist/chunks/memoize-Bg2dXTzV.js +1 -0
  383. package/dist/chunks/memoize-DNnuA2aU.js +1 -0
  384. package/dist/chunks/memory-B9io9Zcv.js +1 -0
  385. package/dist/chunks/mobile-CPnnvkQV.js +2 -0
  386. package/dist/chunks/modalContext-B1b0Gsro.js +1 -0
  387. package/dist/chunks/mode-BDgwh_Xb.js +2 -0
  388. package/dist/chunks/model-B6cpEh-s.js +1 -0
  389. package/dist/chunks/model-BcunOCC9.js +1 -0
  390. package/dist/chunks/modelOptions-CHUHQ9WG.js +1 -0
  391. package/dist/chunks/normalization-cjPqid31.js +1 -0
  392. package/dist/chunks/oauth-CnBLewrU.js +1 -0
  393. package/dist/chunks/oauth-DMPGYAoZ.js +1 -0
  394. package/dist/chunks/observationStore-DVBxrSdI.js +4 -0
  395. package/dist/chunks/onChangeAppState-M61XDN6V.js +1 -0
  396. package/dist/chunks/open-CsUNPSNx.js +1 -0
  397. package/dist/chunks/openai-BHvlYW3m.js +2 -0
  398. package/dist/chunks/output-style-BtKuBrs4.js +1 -0
  399. package/dist/chunks/outputStyles-hHuIBkRB.js +84 -0
  400. package/dist/chunks/overageCreditGrant-BLFT-rF3.js +1 -0
  401. package/dist/chunks/p-map-C-WNcN6g.js +1 -0
  402. package/dist/chunks/p-map-CQ2NythB.js +1 -0
  403. package/dist/chunks/package-9IAs5Qf0.js +1 -0
  404. package/dist/chunks/panel-27xLZI7c.js +1 -0
  405. package/dist/chunks/panel-NoDfShEZ.js +1 -0
  406. package/dist/chunks/panelCall-CEOWVNCM.js +1 -0
  407. package/dist/chunks/parseConnectUrl-CxU4IX9o.js +1 -0
  408. package/dist/chunks/parser-DGlAnaNj.js +1 -0
  409. package/dist/chunks/parser-DGoLe2RS.js +1 -0
  410. package/dist/chunks/passes-CExcqu66.js +1 -0
  411. package/dist/chunks/path-uaxlnhva.js +1 -0
  412. package/dist/chunks/permissions-B3PceQul.js +1 -0
  413. package/dist/chunks/permissions-DezIL2xF.js +3 -0
  414. package/dist/chunks/permissions-DnpI8Whh.js +1 -0
  415. package/dist/chunks/pipeTransport-CB_Wq_Kx.js +1 -0
  416. package/dist/chunks/plan-cfZBclh9.js +1 -0
  417. package/dist/chunks/platform-BXz_rgpy.js +2 -0
  418. package/dist/chunks/plist-DLGDWBD6.js +6 -0
  419. package/dist/chunks/plugin-CuhENLRs.js +1 -0
  420. package/dist/chunks/pluginAutoupdate-wTeOXfQe.js +1 -0
  421. package/dist/chunks/pluginBlocklist-D6pkKfXr.js +1 -0
  422. package/dist/chunks/pluginCliCommands-DqxdCwsq.js +1 -0
  423. package/dist/chunks/pluginFlagging-CjH48f-K.js +1 -0
  424. package/dist/chunks/pluginOperations-DMFYB3pK.js +2 -0
  425. package/dist/chunks/pluginStartupCheck-BW3_KfZz.js +1 -0
  426. package/dist/chunks/pluginStartupCheck-Cj2BMjVw.js +1 -0
  427. package/dist/chunks/plugins-CarsG2v8.js +4 -0
  428. package/dist/chunks/policyLimits-DFn1vHkN.js +1 -0
  429. package/dist/chunks/pollConfig-C8nODJY1.js +1 -0
  430. package/dist/chunks/poller-DXZJ-dUP.js +1 -0
  431. package/dist/chunks/poor-C7GQ4a5X.js +1 -0
  432. package/dist/chunks/poorMode-CBe0rfxB.js +1 -0
  433. package/dist/chunks/poorMode-CbZTudtw.js +1 -0
  434. package/dist/chunks/postCommitAttribution--vvAWIqD.js +1 -0
  435. package/dist/chunks/print-CwwtGSbK.js +114 -0
  436. package/dist/chunks/privacy-settings-Bz8cAVp5.js +11 -0
  437. package/dist/chunks/privacyLevel-CRCHhztk.js +1 -0
  438. package/dist/chunks/process-CnhUplBr.js +1 -0
  439. package/dist/chunks/process-X4vCP9x0.js +1 -0
  440. package/dist/chunks/processBashCommand-NL0YEUqW.js +3 -0
  441. package/dist/chunks/processSlashCommand-FPMWElsI.js +6 -0
  442. package/dist/chunks/processSlashCommand-_oJs6_w8.js +6 -0
  443. package/dist/chunks/processUserInput-QAJK0XSn.js +1 -0
  444. package/dist/chunks/projectContext-B21hXj9q.js +1 -0
  445. package/dist/chunks/projectContext-DbTQHQS3.js +1 -0
  446. package/dist/chunks/prompt-C6eleu4x.js +1 -0
  447. package/dist/chunks/prompt-CUdoQXyN.js +1 -0
  448. package/dist/chunks/prompt-CsBCtw4l.js +228 -0
  449. package/dist/chunks/prompt-hnIDYhP4.js +54 -0
  450. package/dist/chunks/promptEditor-CrlVcc17.js +4 -0
  451. package/dist/chunks/protectedNamespace-Cn4901XG.js +1 -0
  452. package/dist/chunks/protocolHandler-DM_w7sJ5.js +13 -0
  453. package/dist/chunks/protocols-CpoQzjyI.js +7 -0
  454. package/dist/chunks/proxy-9WvtUy8E.js +99 -0
  455. package/dist/chunks/rate-limit-options-BehQ3MoX.js +1 -0
  456. package/dist/chunks/rcDebugLog-BbHlIxCm.js +11 -0
  457. package/dist/chunks/referral-BfAZEIZL.js +1 -0
  458. package/dist/chunks/refresh-Bl3Miver.js +1 -0
  459. package/dist/chunks/registerProtocol-BHZ3vZED.js +36 -0
  460. package/dist/chunks/registerSkillHooks-BR7v5qDA.js +1 -0
  461. package/dist/chunks/registry-C2igpRd-.js +1 -0
  462. package/dist/chunks/release-notes-C_Cou6ye.js +4 -0
  463. package/dist/chunks/releaseNotes-DveQShyB.js +2 -0
  464. package/dist/chunks/reload-plugins-D-pAUoB5.js +1 -0
  465. package/dist/chunks/remote-env-C_dBgbgo.js +1 -0
  466. package/dist/chunks/remoteBridgeCore-BxWhTy1u.js +1 -0
  467. package/dist/chunks/remoteControlServer-D3OjUlB-.js +3 -0
  468. package/dist/chunks/rename-f3m0ETSt.js +1 -0
  469. package/dist/chunks/renderOptions-QZLxGnh_.js +1 -0
  470. package/dist/chunks/replBridge-qeVmCJOb.js +1 -0
  471. package/dist/chunks/resume-CM_8p9Iu.js +2 -0
  472. package/dist/chunks/rewind-0cB7o6fx.js +1 -0
  473. package/dist/chunks/ripgrep-BEWqxrpl.js +5 -0
  474. package/dist/chunks/ripgrep-G82m12Ng.js +1 -0
  475. package/dist/chunks/rollback-CVo2gqgR.js +11 -0
  476. package/dist/chunks/runtimeObserver-1EdvvoYw.js +1 -0
  477. package/dist/chunks/runtimeObserver-CX6vepq9.js +10 -0
  478. package/dist/chunks/sandbox-adapter-DzHfW2tH.js +1 -0
  479. package/dist/chunks/sandbox-toggle-N6KgmH2T.js +1 -0
  480. package/dist/chunks/sanitization-CIBpY9KT.js +1 -0
  481. package/dist/chunks/satisfies-B7ZvBUQP.js +1 -0
  482. package/dist/chunks/schemas-Bwt-7U5W.js +40 -0
  483. package/dist/chunks/sdk-Drp69kIx.js +1 -0
  484. package/dist/chunks/sdkHeapDumpMonitor-B9GVkISU.js +1 -0
  485. package/dist/chunks/searchExtraTools-BphNJsl8.js +1 -0
  486. package/dist/chunks/semver-BsItM2Z4.js +1 -0
  487. package/dist/chunks/semver-D3lOjiBN.js +1 -0
  488. package/dist/chunks/sentry-ySzRCXGd.js +1 -0
  489. package/dist/chunks/server-C8nMDji6.js +1 -0
  490. package/dist/chunks/server-XZG51Slr.js +1 -0
  491. package/dist/chunks/serverBanner-D68EBGzH.js +1 -0
  492. package/dist/chunks/serverLog-hv2hc5US.js +1 -0
  493. package/dist/chunks/session-CVoGFb8a.js +2 -0
  494. package/dist/chunks/sessionDataUploader-BaD1Q7v3.js +1 -0
  495. package/dist/chunks/sessionDiscovery-D7g66TX6.js +1 -0
  496. package/dist/chunks/sessionFileAccessHooks-9lPjspRX.js +1 -0
  497. package/dist/chunks/sessionManager-BhOjMNAP.js +1 -0
  498. package/dist/chunks/sessionMemory-BA6cdxqP.js +1 -0
  499. package/dist/chunks/sessionMemory-CtEhIRGF.js +1 -0
  500. package/dist/chunks/sessionMemoryUtils-D_B92ypa.js +1 -0
  501. package/dist/chunks/sessionObserver-CESI-uVZ.js +1 -0
  502. package/dist/chunks/sessionObserver-SpE_eglb.js +20 -0
  503. package/dist/chunks/sessionRestore-DqsqYK4K.js +1 -0
  504. package/dist/chunks/sessionState-Dgky34M4.js +1 -0
  505. package/dist/chunks/sessionStorage-DJb5HKhQ.js +1 -0
  506. package/dist/chunks/sessionStorage-DSMfHTcg.js +1 -0
  507. package/dist/chunks/sessionStoragePortable-DyM_hZnp.js +3 -0
  508. package/dist/chunks/sessionTitle-Bzxk_EW9.js +14 -0
  509. package/dist/chunks/sessionTracing-DR8O0686.js +12 -0
  510. package/dist/chunks/setup-BHNS9sBS.js +9 -0
  511. package/dist/chunks/setup-BafJxZ0F.js +4 -0
  512. package/dist/chunks/setup-MLNNYLi6.js +1 -0
  513. package/dist/chunks/shadowedRuleDetection-Ch9gTxfD.js +1 -0
  514. package/dist/chunks/shellQuote-3s6tV-hK.js +1 -0
  515. package/dist/chunks/sideQuestion-BBn6XIOD.js +20 -0
  516. package/dist/chunks/signal-BTxmab6r.js +1 -0
  517. package/dist/chunks/signin-ChbUAEGq.js +1 -0
  518. package/dist/chunks/sink-B1qICbRh.js +1 -0
  519. package/dist/chunks/sink-yBIcxQf1.js +1 -0
  520. package/dist/chunks/sinks-C7weduDR.js +1 -0
  521. package/dist/chunks/skill-learning-08nEdOJ2.js +5 -0
  522. package/dist/chunks/skillGapStore-CuvWGqFb.js +5 -0
  523. package/dist/chunks/skillGapStore-DmMuDXKO.js +1 -0
  524. package/dist/chunks/skillGenerator-mEMjcmmm.js +8 -0
  525. package/dist/chunks/skillLearning-B3a-8Ys3.js +1 -0
  526. package/dist/chunks/skillLearning-q5T6o0mH.js +1 -0
  527. package/dist/chunks/skillPanel-BuUMhONI.js +28 -0
  528. package/dist/chunks/skillSearchPanel-BUEv7Sm9.js +21 -0
  529. package/dist/chunks/skillUsageTracking-BBTiWOKB.js +1 -0
  530. package/dist/chunks/skills-DvQuQfDW.js +1 -0
  531. package/dist/chunks/slashCommandParsing-BkTC3GRb.js +1 -0
  532. package/dist/chunks/sleep-CC8jykQd.js +1 -0
  533. package/dist/chunks/slowOperations-niPqC54V.js +1 -0
  534. package/dist/chunks/sprites-C5X62Vyh.js +1 -0
  535. package/dist/chunks/src-58uAJYF_.js +6 -0
  536. package/dist/chunks/src-7Y8fx6gl.js +2 -0
  537. package/dist/chunks/src-BuserDTl.js +1 -0
  538. package/dist/chunks/src-CMY4XoRy.js +1 -0
  539. package/dist/chunks/src-CfeAM1FB.js +1 -0
  540. package/dist/chunks/src-CxT2FDXy.js +1 -0
  541. package/dist/chunks/src-CyQf7rVu.js +26 -0
  542. package/dist/chunks/src-DJLbU8sT.js +1 -0
  543. package/dist/chunks/src-DJQlyVK6.js +5 -0
  544. package/dist/chunks/src-DNHWYkls.js +53 -0
  545. package/dist/chunks/src-DU_g0n_Q.js +1 -0
  546. package/dist/chunks/src-DhqzQjMg.js +19 -0
  547. package/dist/chunks/src-Duzv1Znh.js +1 -0
  548. package/dist/chunks/src-OBx6GAig.js +1 -0
  549. package/dist/chunks/src-WjnK2Dbo.js +1 -0
  550. package/dist/chunks/src-hjAMxWFj.js +7 -0
  551. package/dist/chunks/src-lLwoqdC0.js +9 -0
  552. package/dist/chunks/src-yRsWbJp_.js +2 -0
  553. package/dist/chunks/sso-oidc-yfC-A2A2.js +1 -0
  554. package/dist/chunks/startupProfiler-4P7GdVw6.js +3 -0
  555. package/dist/chunks/startupProfiler-CipS0otN.js +1 -0
  556. package/dist/chunks/state-9wSimHaL.js +1 -0
  557. package/dist/chunks/state-BQkyHx88.js +1 -0
  558. package/dist/chunks/state-CEAUTY3A.js +1 -0
  559. package/dist/chunks/state-CUZTq6r0.js +1 -0
  560. package/dist/chunks/state-U0HNbTx8.js +1 -0
  561. package/dist/chunks/staticRender-BB3CisKd.js +1 -0
  562. package/dist/chunks/stats-Dyi2U_mq.js +1 -0
  563. package/dist/chunks/status-CSL-GMou.js +1 -0
  564. package/dist/chunks/statusNoticeHelpers-BaXE951d.js +1 -0
  565. package/dist/chunks/stdio-BuUJYJFs.js +3 -0
  566. package/dist/chunks/stdio-iX0TTmbp.js +1 -0
  567. package/dist/chunks/stickers-2CRSckfH.js +1 -0
  568. package/dist/chunks/store-DdfsZvtr.js +1 -0
  569. package/dist/chunks/stringUtils-U7kMYMJq.js +4 -0
  570. package/dist/chunks/sts-CJmdeT7s.js +1 -0
  571. package/dist/chunks/subprocessEnv-DKTILev5.js +1 -0
  572. package/dist/chunks/subprocessEnv-WjRguKWf.js +1 -0
  573. package/dist/chunks/supports-color-DaytqqjM.js +1 -0
  574. package/dist/chunks/systemPromptSections-BnrxBWdc.js +1 -0
  575. package/dist/chunks/systemPromptSections-Dk6azdAb.js +1 -0
  576. package/dist/chunks/systemTheme-C1GNqIfy.js +1 -0
  577. package/dist/chunks/tag-C4cH016L.js +11 -0
  578. package/dist/chunks/tasks-CEdUW3RQ.js +1 -0
  579. package/dist/chunks/teamHelpers-CTA_CtTT.js +1 -0
  580. package/dist/chunks/teamHelpers-D65qZInv.js +1 -0
  581. package/dist/chunks/teammate-C-FiRloZ.js +1 -0
  582. package/dist/chunks/teammateModeSnapshot-DWRG5-Us.js +1 -0
  583. package/dist/chunks/teammateModeSnapshot-DtgsNj1G.js +1 -0
  584. package/dist/chunks/teleport-C_UgMy0V.js +1 -0
  585. package/dist/chunks/templateJobs-CMbS0tuk.js +12 -0
  586. package/dist/chunks/terminalSetup--jwGVap8.js +33 -0
  587. package/dist/chunks/terminalSetup-zID-wokH.js +1 -0
  588. package/dist/chunks/theme-C6XwTpVy.js +1 -0
  589. package/dist/chunks/thinkback-CVLnmLAT.js +1 -0
  590. package/dist/chunks/thinkback-MeOOO7gf.js +1 -0
  591. package/dist/chunks/thinkback-play-D7G260F4.js +1 -0
  592. package/dist/chunks/tmux-DtYJuTWh.js +1 -0
  593. package/dist/chunks/toolEventObserver-BtC9xDYY.js +1 -0
  594. package/dist/chunks/toolEventObserver-MfsHAt8h.js +1 -0
  595. package/dist/chunks/toolPool-CEi_2xIH.js +1 -0
  596. package/dist/chunks/toolPool-CdYJcCnc.js +1 -0
  597. package/dist/chunks/trustedDevice-CjQTGAa4.js +1 -0
  598. package/dist/chunks/trustedDevice-DADcxAAs.js +1 -0
  599. package/dist/chunks/tui-B8Ijq4Pk.js +6 -0
  600. package/dist/chunks/turndown.es-T-Xe93nc.js +69 -0
  601. package/dist/chunks/types-BVelRhgb.js +17 -0
  602. package/dist/chunks/types-Bqp3meR4.js +1 -0
  603. package/dist/chunks/types-CNmINIu3.js +1 -0
  604. package/dist/chunks/types-DgzOOCDl.js +3 -0
  605. package/dist/chunks/udsClient-ClY_0CKr.js +1 -0
  606. package/dist/chunks/ultrareviewCommand-CqvHj9Io.js +3 -0
  607. package/dist/chunks/undercover-CVCVOSrs.js +1 -0
  608. package/dist/chunks/undercover-CbxiJO2b.js +31 -0
  609. package/dist/chunks/up-CBJhVVbd.js +12 -0
  610. package/dist/chunks/updateCCB-DPPpquAw.js +11 -0
  611. package/dist/chunks/upgrade-DaaHOvft.js +1 -0
  612. package/dist/chunks/upgrade-k7ZvAWZ0.js +1 -0
  613. package/dist/chunks/upload-CEDxwMa1.js +1 -0
  614. package/dist/chunks/upstreamproxy-BtGJ2LRi.js +11 -0
  615. package/dist/chunks/usage-CsUSu4fb.js +1 -0
  616. package/dist/chunks/usage-oABvixCs.js +1 -0
  617. package/dist/chunks/useExitOnCtrlCDWithKeybindings-CBce_-hb.js +1 -0
  618. package/dist/chunks/useExitOnCtrlCDWithKeybindings-CLYjTZXb.js +1 -0
  619. package/dist/chunks/useKeybinding-DAQL_dB_.js +1 -0
  620. package/dist/chunks/useMainLoopModel-QC_H3esG.js +1 -0
  621. package/dist/chunks/useManageMCPConnections-bf-VfJGD.js +1 -0
  622. package/dist/chunks/useManagePlugins-CXdYUpit.js +1 -0
  623. package/dist/chunks/useMergedTools-DERzhQOJ.js +1 -0
  624. package/dist/chunks/useSearchInput-nqhdILI2.js +1 -0
  625. package/dist/chunks/useTerminalSize-DzV4aaTi.js +1 -0
  626. package/dist/chunks/useVoice-CO69xtWC.js +1 -0
  627. package/dist/chunks/util-C8wqPqv0.js +1 -0
  628. package/dist/chunks/utils-CDFsSXHr.js +1 -0
  629. package/dist/chunks/utils-ZO5TryVH.js +1 -0
  630. package/dist/chunks/v4-DLhvDPkt.js +1 -0
  631. package/dist/chunks/validatePlugin-C4cd71Yz.js +1 -0
  632. package/dist/chunks/vertex-sdk-CC3U26o7.js +9 -0
  633. package/dist/chunks/vim-BNiQx5Vf.js +1 -0
  634. package/dist/chunks/voice-BCbnJzYL.js +8 -0
  635. package/dist/chunks/voice-BJyz9KZO.js +8 -0
  636. package/dist/chunks/voice-CP2ULpju.js +2 -0
  637. package/dist/chunks/voiceModeEnabled-C-pa8B3Q.js +1 -0
  638. package/dist/chunks/voiceModeEnabled-CMtRN2pa.js +1 -0
  639. package/dist/chunks/voiceStreamSTT-31b2u0rj.js +1 -0
  640. package/dist/chunks/voiceStreamSTT-Fkhm6Ftg.js +1 -0
  641. package/dist/chunks/voiceStreamSTT-sI-hg-aP.js +1 -0
  642. package/dist/chunks/web-tools-CLmlPgLk.js +1 -0
  643. package/dist/chunks/which-C0ex-06E.js +1 -0
  644. package/dist/chunks/windowsPaths-C5TNvKYu.js +1 -0
  645. package/dist/chunks/windowsPaths-Kue_7s52.js +1 -0
  646. package/dist/chunks/workSecret-Dh5Ayceu.js +1 -0
  647. package/dist/chunks/workerRegistry-B5iWYqpK.js +1 -0
  648. package/dist/chunks/worktree-BypJA0GB.js +1 -0
  649. package/dist/chunks/worktreeModeEnabled-DPTdK3JV.js +1 -0
  650. package/dist/chunks/worktreeModeEnabled-Dtrcn7eD.js +1 -0
  651. package/dist/chunks/wrapper-BDPb4PTV.js +6 -0
  652. package/dist/chunks/wrapper-DRTs77RK.js +1 -0
  653. package/dist/chunks/xdg-BaVL-FHd.js +1 -0
  654. package/dist/chunks/xml-E8VMPwdJ.js +1 -0
  655. package/dist/chunks/zod-B_P2Eo_D.js +1 -0
  656. package/dist/cli-bun.js +2 -0
  657. package/dist/cli-node.js +2 -0
  658. package/dist/cli.js +2 -0
  659. package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
  660. package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
  661. package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
  662. package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
  663. package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
  664. package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
  665. package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
  666. package/package.json +233 -0
  667. package/scripts/postinstall.cjs +389 -0
  668. package/scripts/run-parallel.mjs +10 -0
  669. package/scripts/setup-chrome-mcp.mjs +70 -0
@@ -0,0 +1 @@
1
+ import{i as e,n as t}from"./chunk-DR8-3Aex.js";function n(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function r(t){return typeof Bun<`u`?Bun.hash(t).toString():e(`crypto`).createHash(`sha256`).update(t).digest(`hex`)}function i(t,n){return typeof Bun<`u`?Bun.hash(n,Bun.hash(t)).toString():e(`crypto`).createHash(`sha256`).update(t).update(`\0`).update(n).digest(`hex`)}var a=t((()=>{}));export{a as i,r as n,i as r,n as t};
@@ -0,0 +1,5 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Ht as t,at as n}from"./state-CUZTq6r0.js";import{Jl as r,Ql as i}from"./growthbook-p4aJ_UMv.js";import{E as a,J as o,O as s,U as c,_ as l,h as u,l as d,p as f}from"./debug-CjIaNjpK.js";import{o as p,s as m}from"./log-DVv8YiNo.js";import{n as h,r as g}from"./analytics-i6X1et4O.js";import{join as _}from"path";import{createWriteStream as v,writeFileSync as y}from"fs";import{readFile as b,readdir as x,writeFile as S}from"fs/promises";import{pipeline as C}from"stream/promises";import{getHeapSnapshot as w,getHeapSpaceStatistics as T,getHeapStatistics as E}from"v8";async function D(e,t=0){let r=process.memoryUsage(),i=E(),a=process.resourceUsage(),o=process.uptime(),s;try{s=T()}catch{}let c=process._getActiveHandles().length,l=process._getActiveRequests().length,u;try{u=(await x(`/proc/self/fd`)).length}catch{}let d;try{d=await b(`/proc/self/smaps_rollup`,`utf8`)}catch{}let f=r.rss-r.heapUsed,p=o>0?r.rss/o:0,m=p*3600/(1024*1024),h=[];return i.number_of_detached_contexts>0&&h.push(`${i.number_of_detached_contexts} detached context(s) - possible iframe/context leak`),c>100&&h.push(`${c} active handles - possible timer/socket leak`),f>r.heapUsed&&h.push(`Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)`),m>100&&h.push(`High memory growth rate: ${m.toFixed(1)} MB/hour`),u&&u>500&&h.push(`${u} open file descriptors - possible file/socket leak`),{timestamp:new Date().toISOString(),sessionId:n(),trigger:e,dumpNumber:t,uptimeSeconds:o,memoryUsage:{heapUsed:r.heapUsed,heapTotal:r.heapTotal,external:r.external,arrayBuffers:r.arrayBuffers,rss:r.rss},memoryGrowthRate:{bytesPerSecond:p,mbPerHour:m},v8HeapStats:{heapSizeLimit:i.heap_size_limit,mallocedMemory:i.malloced_memory,peakMallocedMemory:i.peak_malloced_memory,detachedContexts:i.number_of_detached_contexts,nativeContexts:i.number_of_native_contexts},v8HeapSpaces:s?.map(e=>({name:e.space_name,size:e.space_size,used:e.space_used_size,available:e.space_available_size})),resourceUsage:{maxRSS:a.maxRSS*1024,userCPUTime:a.userCPUTime,systemCPUTime:a.systemCPUTime},activeHandles:c,activeRequests:l,openFileDescriptors:u,analysis:{potentialLeaks:h,recommendation:h.length>0?`WARNING: ${h.length} potential leak indicator(s) found. See potentialLeaks array.`:`No obvious leak indicators. Check heap snapshot for retained objects.`},smapsRollup:d,platform:process.platform,nodeVersion:process.version,ccVersion:`2.8.4`}}async function O(e=`manual`,t=0){try{let i=n(),a=await D(e,t),o=e=>(e/1024/1024/1024).toFixed(3);f(`[HeapDump] Memory state:
2
+ heapUsed: ${o(a.memoryUsage.heapUsed)} GB (in snapshot)
3
+ external: ${o(a.memoryUsage.external)} GB (NOT in snapshot)
4
+ rss: ${o(a.memoryUsage.rss)} GB (total process)
5
+ ${a.analysis.recommendation}`);let c=r();await u().mkdir(c);let l=t>0?`-dump${t}`:``,d=`${i}${l}.heapsnapshot`,p=`${i}${l}-diagnostics.json`,m=_(c,d),h=_(c,p);return await S(h,s(a,null,2),{mode:384}),f(`[HeapDump] Diagnostics written to ${h}`),await k(m),f(`[HeapDump] Heap dump written to ${m}`),g(`tengu_heap_dump`,{triggerManual:e===`manual`,triggerAuto15GB:e===`auto-1.5GB`,dumpNumber:t,success:!0}),{success:!0,heapPath:m,diagPath:h}}catch(n){let r=o(n);return m(r),g(`tengu_heap_dump`,{triggerManual:e===`manual`,triggerAuto15GB:e===`auto-1.5GB`,dumpNumber:t,success:!1}),{success:!1,error:r.message}}}async function k(e){if(typeof Bun<`u`){y(e,Bun.generateHeapSnapshot(`v8`,`arraybuffer`),{mode:384}),Bun.gc(!0);return}let t=v(e,{mode:384});await C(w(),t)}var A=e((()=>{t(),h(),d(),c(),i(),l(),p(),a()}));async function j(){let e=await O();return e.success?{type:`text`,value:`${e.heapPath}\n${e.diagPath}`}:{type:`text`,value:`Failed to create heap dump: ${e.error}`}}e((()=>{A()}))();export{j as call};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Q as r,Rn as i,b as a,i as o,n as s,p as c,r as l,t as u,tt as d,x as f}from"./src-DNHWYkls.js";import{t as p}from"./jsx-runtime-BTgGEFjL.js";import{b as m,x as h}from"./startupProfiler-4P7GdVw6.js";import{Ei as g,RT as _,ji as v,ob as y,sb as b,wi as x,zT as S,zi as C}from"./loadAgentsDir-Bz0FfcVt.js";import{t as w}from"./useKeybinding-DAQL_dB_.js";import{t as T}from"./useTerminalSize-DzV4aaTi.js";import{n as E,r as D}from"./modalContext-B1b0Gsro.js";import{n as O,t as k}from"./useExitOnCtrlCDWithKeybindings-CLYjTZXb.js";import{n as A,t as j}from"./PromptInputHelpMenu-JedFdsxU.js";function M({commands:e,maxHeight:t,columns:n,title:r,onCancel:i,emptyMessage:s}){let{headerFocused:c,focusHeader:l}=o(),u=Math.max(1,n-10),d=Math.max(1,Math.floor((t-10)/2)),p=(0,N.useMemo)(()=>{let t=new Set;return e.filter(e=>t.has(e.name)?!1:(t.add(e.name),!0)).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:`/${e.name}`,value:e.name,description:h(v(e),u,!0)}))},[e,u]);return(0,P.jsx)(f,{flexDirection:`column`,paddingY:1,children:e.length===0&&s?(0,P.jsx)(a,{dimColor:!0,children:s}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a,{children:r}),(0,P.jsx)(f,{marginTop:1,children:(0,P.jsx)(_,{options:p,visibleOptionCount:d,onCancel:i,disableSelection:!0,hideIndexes:!0,layout:`compact-vertical`,onUpFromFirstItem:l,isDisabled:c})})]})})}var N,P,F=e((()=>{i(),N=t(i(),1),C(),m(),u(),S(),P=p()}));function I(){return(0,L.jsxs)(f,{flexDirection:`column`,paddingY:1,gap:1,children:[(0,L.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,L.jsx)(a,{bold:!0,children:`Getting started`}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`1. `}),(0,L.jsx)(a,{children:`Ask a question or describe a task — Claude will explore your code and respond.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`2. `}),(0,L.jsx)(a,{children:`When Claude wants to edit files or run commands, you review and approve each action.`})]}),(0,L.jsxs)(a,{children:[(0,L.jsx)(a,{bold:!0,children:`3. `}),(0,L.jsx)(a,{children:`Type `}),(0,L.jsx)(a,{bold:!0,children:`/commit`}),(0,L.jsx)(a,{children:` to commit changes, `}),(0,L.jsx)(a,{bold:!0,children:`/help`}),(0,L.jsx)(a,{children:` for commands, or `}),(0,L.jsx)(a,{bold:!0,children:`?`}),(0,L.jsx)(a,{children:` for shortcuts.`})]})]})]}),(0,L.jsxs)(f,{flexDirection:`column`,children:[(0,L.jsx)(f,{children:(0,L.jsx)(a,{bold:!0,children:`Shortcuts`})}),(0,L.jsx)(j,{gap:2,fixedWidth:!0})]})]})}var L,R=e((()=>{i(),u(),A(),L=p()}));function z({onClose:e,commands:t}){let{rows:i,columns:o}=n(),u=Math.floor(i/2),p=D(),m=()=>e(`Help dialog dismissed`,{display:`system`});d(`help:dismiss`,m,{context:`Help`});let h=O(m),_=b(`help:dismiss`,`Help`,`esc`),v=g(),y=t.filter(e=>v.has(e.name)&&!e.isHidden),S=[];if(process.env.USER_TYPE===`ant`){let e=new Set(x.map(e=>e.name));y=y.filter(t=>!e.has(t.name)),S=t.filter(t=>e.has(t.name)&&!t.isHidden)}let C=t.filter(e=>!v.has(e.name)&&!e.isHidden),w=[(0,B.jsx)(s,{title:`general`,children:(0,B.jsx)(I,{})},`general`)];return w.push((0,B.jsx)(s,{title:`commands`,children:(0,B.jsx)(M,{commands:y,maxHeight:u,columns:o,title:`Browse default commands:`,onCancel:m})},`commands`)),w.push((0,B.jsx)(s,{title:`custom-commands`,children:(0,B.jsx)(M,{commands:C,maxHeight:u,columns:o,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),process.env.USER_TYPE===`ant`&&S.length>0&&w.push((0,B.jsx)(s,{title:`[ant-only]`,children:(0,B.jsx)(M,{commands:S,maxHeight:u,columns:o,title:`Browse ant-only commands:`,onCancel:m})},`ant-only`)),(0,B.jsx)(f,{flexDirection:`column`,height:p?void 0:u,children:(0,B.jsxs)(c,{color:`professionalBlue`,children:[(0,B.jsx)(l,{title:process.env.USER_TYPE===`ant`?`/help`:`Claude Code v2.8.4`,color:`professionalBlue`,defaultTab:`general`,children:w}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsxs)(a,{children:[`For more help: `,(0,B.jsx)(r,{url:`https://code.claude.com/docs/en/overview`})]})}),(0,B.jsx)(f,{marginTop:1,children:(0,B.jsx)(a,{dimColor:!0,children:h.pending?(0,B.jsxs)(B.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,B.jsxs)(a,{italic:!0,children:[_,` to cancel`]})})})]})})}var B,V=e((()=>{i(),k(),y(),C(),E(),T(),u(),w(),F(),R(),B=p()})),H,U;e((()=>{V(),H=p(),U=async(e,{options:{commands:t}})=>(0,H.jsx)(z,{commands:t,onClose:e})}))();export{U as call};
@@ -0,0 +1,79 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./memoize-DNnuA2aU.js";import{n as i,t as a}from"./figures-fES5sASd.js";import{Q as o,Rn as s,b as c,f as l,t as u,tt as d,x as f}from"./src-DNHWYkls.js";import{t as p}from"./jsx-runtime-BTgGEFjL.js";import{Ht as m,Z as h}from"./state-CUZTq6r0.js";import{Gs as g,Rs as _,Vs as v}from"./growthbook-p4aJ_UMv.js";import{a as y,c as b}from"./stringUtils-U7kMYMJq.js";import{n as x,r as S}from"./analytics-i6X1et4O.js";import{Gb as C,JE as ee,Jb as w,Kb as T,Lf as E,RT as D,Rf as O,Xb as k,YE as A,Yb as j,Zb as M,nD as N,qE as P,qb as te,tD as ne,zT as F}from"./loadAgentsDir-Bz0FfcVt.js";import{t as re}from"./useKeybinding-DAQL_dB_.js";function ie(e,t){let n={PreToolUse:{},PostToolUse:{},PostToolUseFailure:{},PermissionDenied:{},Notification:{},UserPromptSubmit:{},SessionStart:{},SessionEnd:{},Stop:{},StopFailure:{},SubagentStart:{},SubagentStop:{},PreCompact:{},PostCompact:{},PermissionRequest:{},Setup:{},TeammateIdle:{},TaskCreated:{},TaskCompleted:{},Elicitation:{},ElicitationResult:{},ConfigChange:{},WorktreeCreate:{},WorktreeRemove:{},InstructionsLoaded:{},CwdChanged:{},FileChanged:{}},r=L(t);C(e).forEach(e=>{let t=n[e.event];if(t){let n=r[e.event].matcherMetadata===void 0?``:e.matcher||``;t[n]||(t[n]=[]),t[n].push(e)}});let i=h();if(i)for(let[e,t]of Object.entries(i)){let r=e,i=n[r];if(i)for(let e of t??[]){let t=e.matcher||``;if(`pluginRoot`in e){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:n,matcher:e.matcher,source:`pluginHook`,pluginName:e.pluginId})}else if(process.env.USER_TYPE===`ant`){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:{type:`command`,command:`[ANT-ONLY] Built-in Hook`},matcher:e.matcher,source:`builtinHook`})}}}return n}function ae(e,t){return M(Object.keys(e[t]||{}),e,t)}function oe(e,t,n){let r=n??``;return e[t]?.[r]??[]}function I(e,t){return L(t)[e].matcherMetadata}var L,R=e((()=>{r(),m(),k(),L=n(function(e){return{PreToolUse:{summary:`Before tool execution`,description:`Input to command is JSON of tool call arguments.
2
+ Exit code 0 - stdout/stderr not shown
3
+ Exit code 2 - show stderr to model and block tool call
4
+ Other exit codes - show stderr to user only but continue with tool call`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PostToolUse:{summary:`After tool execution`,description:`Input to command is JSON with fields "inputs" (tool call arguments) and "response" (tool call response).
5
+ Exit code 0 - stdout shown in transcript mode (ctrl+o)
6
+ Exit code 2 - show stderr to model immediately
7
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PostToolUseFailure:{summary:`After tool execution fails`,description:`Input to command is JSON with tool_name, tool_input, tool_use_id, error, error_type, is_interrupt, and is_timeout.
8
+ Exit code 0 - stdout shown in transcript mode (ctrl+o)
9
+ Exit code 2 - show stderr to model immediately
10
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PermissionDenied:{summary:`After auto mode classifier denies a tool call`,description:`Input to command is JSON with tool_name, tool_input, tool_use_id, and reason.
11
+ Return {"hookSpecificOutput":{"hookEventName":"PermissionDenied","retry":true}} to tell the model it may retry.
12
+ Exit code 0 - stdout shown in transcript mode (ctrl+o)
13
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},Notification:{summary:`When notifications are sent`,description:`Input to command is JSON with notification message and type.
14
+ Exit code 0 - stdout/stderr not shown
15
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`notification_type`,values:[`permission_prompt`,`idle_prompt`,`auth_success`,`elicitation_dialog`,`elicitation_complete`,`elicitation_response`]}},UserPromptSubmit:{summary:`When the user submits a prompt`,description:`Input to command is JSON with original user prompt text.
16
+ Exit code 0 - stdout shown to Claude
17
+ Exit code 2 - block processing, erase original prompt, and show stderr to user only
18
+ Other exit codes - show stderr to user only`},SessionStart:{summary:`When a new session is started`,description:`Input to command is JSON with session start source.
19
+ Exit code 0 - stdout shown to Claude
20
+ Blocking errors are ignored
21
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`source`,values:[`startup`,`resume`,`clear`,`compact`]}},Stop:{summary:`Right before Claude concludes its response`,description:`Exit code 0 - stdout/stderr not shown
22
+ Exit code 2 - show stderr to model and continue conversation
23
+ Other exit codes - show stderr to user only`},StopFailure:{summary:`When the turn ends due to an API error`,description:`Fires instead of Stop when an API error (rate limit, auth failure, etc.) ended the turn. Fire-and-forget — hook output and exit codes are ignored.`,matcherMetadata:{fieldToMatch:`error`,values:[`rate_limit`,`authentication_failed`,`billing_error`,`invalid_request`,`server_error`,`max_output_tokens`,`unknown`]}},SubagentStart:{summary:`When a subagent (Agent tool call) is started`,description:`Input to command is JSON with agent_id and agent_type.
24
+ Exit code 0 - stdout shown to subagent
25
+ Blocking errors are ignored
26
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`agent_type`,values:[]}},SubagentStop:{summary:`Right before a subagent (Agent tool call) concludes its response`,description:`Input to command is JSON with agent_id, agent_type, and agent_transcript_path.
27
+ Exit code 0 - stdout/stderr not shown
28
+ Exit code 2 - show stderr to subagent and continue having it run
29
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`agent_type`,values:[]}},PreCompact:{summary:`Before conversation compaction`,description:`Input to command is JSON with compaction details.
30
+ Exit code 0 - stdout appended as custom compact instructions
31
+ Exit code 2 - block compaction
32
+ Other exit codes - show stderr to user only but continue with compaction`,matcherMetadata:{fieldToMatch:`trigger`,values:[`manual`,`auto`]}},PostCompact:{summary:`After conversation compaction`,description:`Input to command is JSON with compaction details and the summary.
33
+ Exit code 0 - stdout shown to user
34
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`trigger`,values:[`manual`,`auto`]}},SessionEnd:{summary:`When a session is ending`,description:`Input to command is JSON with session end reason.
35
+ Exit code 0 - command completes successfully
36
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`reason`,values:[`clear`,`logout`,`prompt_input_exit`,`other`]}},PermissionRequest:{summary:`When a permission dialog is displayed`,description:`Input to command is JSON with tool_name, tool_input, and tool_use_id.
37
+ Output JSON with hookSpecificOutput containing decision to allow or deny.
38
+ Exit code 0 - use hook decision if provided
39
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},Setup:{summary:`Repo setup hooks for init and maintenance`,description:`Input to command is JSON with trigger (init or maintenance).
40
+ Exit code 0 - stdout shown to Claude
41
+ Blocking errors are ignored
42
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`trigger`,values:[`init`,`maintenance`]}},TeammateIdle:{summary:`When a teammate is about to go idle`,description:`Input to command is JSON with teammate_name and team_name.
43
+ Exit code 0 - stdout/stderr not shown
44
+ Exit code 2 - show stderr to teammate and prevent idle (teammate continues working)
45
+ Other exit codes - show stderr to user only`},TaskCreated:{summary:`When a task is being created`,description:`Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
46
+ Exit code 0 - stdout/stderr not shown
47
+ Exit code 2 - show stderr to model and prevent task creation
48
+ Other exit codes - show stderr to user only`},TaskCompleted:{summary:`When a task is being marked as completed`,description:`Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
49
+ Exit code 0 - stdout/stderr not shown
50
+ Exit code 2 - show stderr to model and prevent task completion
51
+ Other exit codes - show stderr to user only`},Elicitation:{summary:`When an MCP server requests user input (elicitation)`,description:`Input to command is JSON with mcp_server_name, message, and requested_schema.
52
+ Output JSON with hookSpecificOutput containing action (accept/decline/cancel) and optional content.
53
+ Exit code 0 - use hook response if provided
54
+ Exit code 2 - deny the elicitation
55
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`mcp_server_name`,values:[]}},ElicitationResult:{summary:`After a user responds to an MCP elicitation`,description:`Input to command is JSON with mcp_server_name, action, content, mode, and elicitation_id.
56
+ Output JSON with hookSpecificOutput containing optional action and content to override the response.
57
+ Exit code 0 - use hook response if provided
58
+ Exit code 2 - block the response (action becomes decline)
59
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`mcp_server_name`,values:[]}},ConfigChange:{summary:`When configuration files change during a session`,description:`Input to command is JSON with source (user_settings, project_settings, local_settings, policy_settings, skills) and file_path.
60
+ Exit code 0 - allow the change
61
+ Exit code 2 - block the change from being applied to the session
62
+ Other exit codes - show stderr to user only`,matcherMetadata:{fieldToMatch:`source`,values:[`user_settings`,`project_settings`,`local_settings`,`policy_settings`,`skills`]}},InstructionsLoaded:{summary:`When an instruction file (CLAUDE.md or rule) is loaded`,description:`Input to command is JSON with file_path, memory_type (User, Project, Local, Managed), load_reason (session_start, nested_traversal, path_glob_match, include, compact), globs (optional — the paths: frontmatter patterns that matched), trigger_file_path (optional — the file Claude touched that caused the load), and parent_file_path (optional — the file that @-included this one).
63
+ Exit code 0 - command completes successfully
64
+ Other exit codes - show stderr to user only
65
+ This hook is observability-only and does not support blocking.`,matcherMetadata:{fieldToMatch:`load_reason`,values:[`session_start`,`nested_traversal`,`path_glob_match`,`include`,`compact`]}},WorktreeCreate:{summary:`Create an isolated worktree for VCS-agnostic isolation`,description:`Input to command is JSON with name (suggested worktree slug).
66
+ Stdout should contain the absolute path to the created worktree directory.
67
+ Exit code 0 - worktree created successfully
68
+ Other exit codes - worktree creation failed`},WorktreeRemove:{summary:`Remove a previously created worktree`,description:`Input to command is JSON with worktree_path (absolute path to worktree).
69
+ Exit code 0 - worktree removed successfully
70
+ Other exit codes - show stderr to user only`},CwdChanged:{summary:`After the working directory changes`,description:`Input to command is JSON with old_cwd and new_cwd.
71
+ CLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent BashTool commands.
72
+ Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to register with the FileChanged watcher.
73
+ Exit code 0 - command completes successfully
74
+ Other exit codes - show stderr to user only`},FileChanged:{summary:`When a watched file changes`,description:`Input to command is JSON with file_path and event (change, add, unlink).
75
+ CLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent BashTool commands.
76
+ The matcher field specifies filenames to watch in the current directory (e.g. ".envrc|.env").
77
+ Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to dynamically update the watch list.
78
+ Exit code 0 - command completes successfully
79
+ Other exit codes - show stderr to user only`}}},e=>e.slice().sort().join(`,`))}));function z({hookEventMetadata:e,hooksByEvent:t,totalHooksCount:n,restrictedByPolicy:r,onSelectEvent:i,onCancel:s}){return(0,B.jsx)(l,{title:`Hooks`,subtitle:`${n} ${b(n,`hook`)} configured`,onCancel:s,children:(0,B.jsxs)(f,{flexDirection:`column`,gap:1,children:[r&&(0,B.jsxs)(f,{flexDirection:`column`,children:[(0,B.jsxs)(c,{color:`suggestion`,children:[a.info,` Hooks Restricted by Policy`]}),(0,B.jsx)(c,{dimColor:!0,children:`Only hooks from managed settings can run. User-defined hooks from ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json are blocked.`})]}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsxs)(c,{dimColor:!0,children:[a.info,` This menu is read-only. To add or modify hooks, edit settings.json directly or ask Claude.`,` `,(0,B.jsx)(o,{url:`https://code.claude.com/docs/en/hooks`,children:`Learn more`})]})}),(0,B.jsx)(f,{flexDirection:`column`,children:(0,B.jsx)(D,{onChange:e=>{i(e)},onCancel:s,options:Object.entries(e).map(([e,n])=>{let r=t[e]||0;return{label:r>0?(0,B.jsxs)(c,{children:[e,` `,(0,B.jsxs)(c,{color:`suggestion`,children:[`(`,r,`)`]})]}):e,value:e,description:n.summary}})})})]})})}var B,V=e((()=>{i(),s(),u(),y(),F(),B=p()}));function H({selectedEvent:e,selectedMatcher:t,hooksForSelectedMatcher:n,hookEventMetadata:r,onSelect:i,onCancel:a}){let o=r.matcherMetadata===void 0?e:`${e} - Matcher: ${t||`(all)`}`;return n.length===0?(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,inputGuide:()=>(0,U.jsx)(c,{children:`Esc to go back`}),children:(0,U.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,U.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,U.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,U.jsx)(l,{title:o,subtitle:r.description,onCancel:a,children:(0,U.jsx)(f,{flexDirection:`column`,children:(0,U.jsx)(D,{options:n.map((e,t)=>({label:`[${e.config.type}] ${T(e.config)}`,value:t.toString(),description:e.source===`pluginHook`&&e.pluginName?`${w(e.source)} (${e.pluginName})`:w(e.source)})),onChange:e=>{let t=n[parseInt(e,10)];t&&i(t)},onCancel:a})})})}var U,W=e((()=>{s(),u(),k(),F(),U=p()}));function G({selectedEvent:e,matchersForSelectedEvent:t,hooksByEventAndMatcher:n,eventDescription:r,onSelect:i,onCancel:a}){let o=K.useMemo(()=>t.map(t=>{let r=n[e]?.[t]||[];return{matcher:t,sources:Array.from(new Set(r.map(e=>e.source))),hookCount:r.length}}),[t,n,e]);return t.length===0?(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,inputGuide:()=>(0,q.jsx)(c,{children:`Esc to go back`}),children:(0,q.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,q.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Claude.`})]})}):(0,q.jsx)(l,{title:`${e} - Matchers`,subtitle:r,onCancel:a,children:(0,q.jsx)(f,{flexDirection:`column`,children:(0,q.jsx)(D,{options:o.map(e=>({label:`[${e.sources.map(j).join(`, `)}] ${e.matcher||`(all)`}`,value:e.matcher,description:`${e.hookCount} ${b(e.hookCount,`hook`)}`})),onChange:e=>{i(e)},onCancel:a})})})}var K,q,se=e((()=>{K=t(s(),1),u(),k(),y(),F(),q=p()}));function ce({selectedHook:e,eventSupportsMatcher:t,onCancel:n}){return(0,J.jsx)(l,{title:`Hook details`,onCancel:n,inputGuide:()=>(0,J.jsx)(c,{children:`Esc to go back`}),children:(0,J.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{children:[`Event: `,(0,J.jsx)(c,{bold:!0,children:e.event})]}),t&&(0,J.jsxs)(c,{children:[`Matcher: `,(0,J.jsx)(c,{bold:!0,children:e.matcher||`(all)`})]}),(0,J.jsxs)(c,{children:[`Type: `,(0,J.jsx)(c,{bold:!0,children:e.config.type})]}),(0,J.jsxs)(c,{children:[`Source: `,(0,J.jsx)(c,{dimColor:!0,children:te(e.source)})]}),e.pluginName&&(0,J.jsxs)(c,{children:[`Plugin: `,(0,J.jsx)(c,{dimColor:!0,children:e.pluginName})]})]}),(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsxs)(c,{dimColor:!0,children:[le(e.config),`:`]}),(0,J.jsx)(f,{borderStyle:`round`,borderDimColor:!0,paddingLeft:1,paddingRight:1,children:(0,J.jsx)(c,{children:ue(e.config)})})]}),`statusMessage`in e.config&&e.config.statusMessage&&(0,J.jsxs)(c,{children:[`Status message: `,(0,J.jsx)(c,{dimColor:!0,children:e.config.statusMessage})]}),(0,J.jsx)(c,{dimColor:!0,children:`To modify or remove this hook, edit settings.json directly or ask Claude to help.`})]})})}function le(e){switch(e.type){case`command`:return`Command`;case`prompt`:return`Prompt`;case`agent`:return`Prompt`;case`http`:return`URL`}}function ue(e){switch(e.type){case`command`:return e.command;case`prompt`:return e.prompt;case`agent`:return e.prompt;case`http`:return e.url}}var J,Y=e((()=>{s(),u(),k(),J=p()}));function de({toolNames:e,onExit:t}){let[n,r]=(0,X.useState)({mode:`select-event`}),[i,a]=(0,X.useState)(()=>v()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),[o,s]=(0,X.useState)(()=>_(`policySettings`)?.allowManagedHooksOnly===!0);N(e=>{e===`policySettings`&&(a(v()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),s(_(`policySettings`)?.allowManagedHooksOnly===!0))});let u=n.mode,p=`event`in n?n.event:`PreToolUse`,m=`matcher`in n?n.matcher:null,h=ee(e=>e.mcp),g=A(),y=(0,X.useMemo)(()=>[...e,...h.tools.map(e=>e.name)],[e,h.tools]),x=(0,X.useMemo)(()=>ie(g.getState(),y),[y,g]),S=(0,X.useMemo)(()=>ae(x,p),[x,p]),C=(0,X.useMemo)(()=>oe(x,p,m),[x,p,m]),w=(0,X.useCallback)(()=>{t(`Hooks dialog dismissed`,{display:`system`})},[t]);d(`confirm:no`,w,{context:`Confirmation`,isActive:u===`select-event`}),d(`confirm:no`,()=>{r({mode:`select-event`})},{context:`Confirmation`,isActive:u===`select-matcher`}),d(`confirm:no`,()=>{`event`in n&&(I(n.event,y)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event}))},{context:`Confirmation`,isActive:u===`select-hook`}),d(`confirm:no`,()=>{if(n.mode===`view-hook`){let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}},{context:`Confirmation`,isActive:u===`view-hook`});let T=L(y),E=v()?.disableAllHooks===!0,{hooksByEvent:D,totalHooksCount:O}=(0,X.useMemo)(()=>{let e={},t=0;for(let[n,r]of Object.entries(x)){let i=Object.values(r).reduce((e,t)=>e+t.length,0);e[n]=i,t+=i}return{hooksByEvent:e,totalHooksCount:t}},[x]);if(E)return(0,Z.jsx)(l,{title:`Hook Configuration - Disabled`,onCancel:w,inputGuide:()=>(0,Z.jsx)(c,{children:`Esc to close`}),children:(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsxs)(f,{flexDirection:`column`,children:[(0,Z.jsxs)(c,{children:[`All hooks are currently `,(0,Z.jsx)(c,{bold:!0,children:`disabled`}),i&&` by a managed settings file`,`. You have `,(0,Z.jsx)(c,{bold:!0,children:O}),` `,`configured `,b(O,`hook`),` that `,b(O,`is`,`are`),` not running.`]}),(0,Z.jsx)(f,{marginTop:1,children:(0,Z.jsx)(c,{dimColor:!0,children:`When hooks are disabled:`})}),(0,Z.jsx)(c,{dimColor:!0,children:`· No hook commands will execute`}),(0,Z.jsx)(c,{dimColor:!0,children:`· StatusLine will not be displayed`}),(0,Z.jsx)(c,{dimColor:!0,children:`· Tool operations will proceed without hook validation`})]}),!i&&(0,Z.jsx)(c,{dimColor:!0,children:`To re-enable hooks, remove "disableAllHooks" from settings.json or ask Claude.`})]})});switch(n.mode){case`select-event`:return(0,Z.jsx)(z,{hookEventMetadata:T,hooksByEvent:D,totalHooksCount:O,restrictedByPolicy:o,onSelectEvent:e=>{I(e,y)===void 0?r({mode:`select-hook`,event:e,matcher:``}):r({mode:`select-matcher`,event:e})},onCancel:w});case`select-matcher`:return(0,Z.jsx)(G,{selectedEvent:n.event,matchersForSelectedEvent:S,hooksByEventAndMatcher:x,eventDescription:T[n.event].description,onSelect:e=>{r({mode:`select-hook`,event:n.event,matcher:e})},onCancel:()=>{r({mode:`select-event`})}});case`select-hook`:return(0,Z.jsx)(H,{selectedEvent:n.event,selectedMatcher:n.matcher,hooksForSelectedMatcher:C,hookEventMetadata:T[n.event],onSelect:e=>{r({mode:`view-hook`,event:n.event,hook:e})},onCancel:()=>{I(n.event,y)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event})}});case`view-hook`:return(0,Z.jsx)(ce,{selectedHook:n.hook,eventSupportsMatcher:I(n.event,y)!==void 0,onCancel:()=>{let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}})}}var X,Z,fe=e((()=>{s(),X=t(s(),1),P(),ne(),u(),re(),R(),g(),y(),V(),W(),se(),Y(),Z=p()})),Q,$;e((()=>{fe(),x(),O(),Q=p(),$=async(e,t)=>{S(`tengu_hooks_command`,{});let n=t.getAppState().toolPermissionContext;return(0,Q.jsx)(de,{toolNames:E(n).map(e=>e.name),onExit:e})}}))();export{$ as call};
@@ -0,0 +1 @@
1
+ import{Ut as e,ln as t,nn as n,un as r}from"./loadAgentsDir-Bz0FfcVt.js";r();export{e as executeSessionEndHooks,n as getSessionEndHookTimeoutMs,t as hasWorktreeCreateHook};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,p as n}from"./debug-CjIaNjpK.js";import{o as r,r as i}from"./common-HfKcqOYK.js";import{c as a,s as o}from"./escHotkey-CVn_80xM.js";import{i as s,n as c,r as l}from"./gates-CmKoQ0O-.js";import{n as u,t as d}from"./executor-Dnf3YYma.js";import{format as f}from"util";function p(){try{return Bun.spawnSync({cmd:[`osascript`,`-e`,`tell application "System Events" to get name of every process whose background only is false`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function m(){try{return Bun.spawnSync({cmd:[`screencapture`,`-x`,`-R`,`0,0,1,1`,`/dev/null`],stdout:`pipe`,stderr:`pipe`}).exitCode===0}catch{return!1}}function h(){return _||(_={serverName:i,logger:new g,executor:d({getMouseAnimationEnabled:()=>l().mouseAnimation,getHideBeforeActionEnabled:()=>l().hideBeforeAction}),ensureOsPermissions:async()=>{if(process.platform!==`darwin`)return{granted:!0};let e=a().tcc;if(e){let t=e.checkAccessibility(),n=e.checkScreenRecording();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}}let t=p(),n=m();return t&&n?{granted:!0}:{granted:!1,accessibility:t,screenRecording:n}},isDisabled:()=>!c(),getSubGates:l,getAutoUnhideEnabled:()=>!0,cropRawPatch:()=>null},_)}var g,_,v=e((()=>{t(),r(),u(),s(),o(),g=class{silly(e,t){n(f(e,t??``),{level:`debug`})}debug(e,t){n(f(e,t??``),{level:`debug`})}info(e,t){n(f(e,t??``),{level:`info`})}warn(e,t){n(f(e,t??``),{level:`warn`})}error(e,t){n(f(e,t??``),{level:`error`})}}}));export{v as n,h as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{o as t}from"./log-DVv8YiNo.js";function n(e){let t;try{t=new URL(e).hostname}catch{throw Error(`assertWorkspaceHost: invalid URL "${e}". Workspace API key requests must target ${i}.`)}if(t!==i)throw Error(`assertWorkspaceHost: refusing to send workspace API key to non-Anthropic host "${t}". Workspace API key requests must target ${i}. If you are using a custom base URL, workspace endpoints are only available on the Anthropic API.`)}function r(e){let t;try{t=new URL(e).hostname}catch{throw Error(`assertSubscriptionBaseUrl: invalid URL "${e}". Subscription OAuth requests must target ${i}.`)}if(t!==i)throw Error(`assertSubscriptionBaseUrl: refusing subscription OAuth request to non-Anthropic host "${t}". Subscription OAuth requests must target ${i}.`)}var i,a=e((()=>{t(),i=`api.anthropic.com`}));export{n,a as r,r as t};
@@ -0,0 +1,13 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-CaCI0a5T.js";import{n as r,r as i,t as a}from"./dist-es-Cp--qjOi.js";import{n as o,r as s,t as c}from"./dist-es-BctcPxLN.js";import{c as l,i as u,l as d,r as f,t as p}from"./dist-es-6kjvVbJd.js";import{D as m,O as h,k as g}from"./protocols-CpoQzjyI.js";import{i as _,r as ee}from"./dist-es-BgLoR-hQ.js";import{h as te,t as ne}from"./client-CinDjeSq.js";import{s as re,t as ie}from"./dist-es-BPPewn1A.js";var ae=e((()=>{})),oe,se=e((()=>{oe=(e,t)=>{if(!t||t.length===0)return e;let n=[];for(let r of t)for(let t of e)t.schemeId.split(`#`)[1]===r&&n.push(t);for(let t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n}}));function ce(e){let t=new Map;for(let n of e)t.set(n.schemeId,n);return t}var le,ue=e((()=>{c(),se(),le=(e,t)=>(n,r)=>async i=>{let a=oe(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=ce(e.httpAuthSchemes),c=s(r),l=[];for(let n of a){let i=o.get(n.schemeId);if(!i){l.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}let a=i.identityProvider(await t.identityProviderConfigProvider(e));if(!a){l.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:s={},signingProperties:u={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},s),n.signingProperties=Object.assign(n.signingProperties||{},u),c.selectedHttpAuthScheme={httpAuthOption:n,identity:await a(n.identityProperties),signer:i.signer};break}if(!c.selectedHttpAuthScheme)throw Error(l.join(`
2
+ `));return n(i)}})),de,fe,pe=e((()=>{ue(),de={step:`serialize`,tags:[`HTTP_AUTH_SCHEME`],name:`httpAuthSchemeMiddleware`,override:!0,relation:`before`,toMiddleware:`endpointV2Middleware`},fe=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(le(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),de)}})})),me=e((()=>{})),he=e((()=>{ue(),pe(),me()})),ge,_e,ve,ye=e((()=>{a(),c(),ge=e=>e=>{throw e},_e=(e,t)=>{},ve=e=>(e,t)=>async n=>{if(!i.isInstance(n.request))return e(n);let r=s(t).selectedHttpAuthScheme;if(!r)throw Error(`No HttpAuthScheme was selected: unable to sign request`);let{httpAuthOption:{signingProperties:a={}},identity:o,signer:c}=r,l=await e({...n,request:await c.sign(n.request,o,a)}).catch((c.errorHandler||ge)(a));return(c.successHandler||_e)(l.response,a),l}})),be,xe,Se=e((()=>{ye(),be={step:`finalizeRequest`,tags:[`HTTP_SIGNING`],name:`httpSigningMiddleware`,aliases:[`apiKeyMiddleware`,`tokenMiddleware`,`awsAuthMiddleware`],override:!0,relation:`after`,toMiddleware:`retryMiddleware`},xe=e=>({applyToStack:t=>{t.addRelativeTo(ve(e),be)}})})),Ce=e((()=>{ye(),Se()})),v,we=e((()=>{v=e=>{if(typeof e==`function`)return e;let t=Promise.resolve(e);return()=>t}}));function Te(e,t,n,r,i){return async function*(a,o,...s){let c=o,l=a.startingToken??c[n],u=!0,d;for(;u;){if(c[n]=l,i&&(c[i]=c[i]??a.pageSize),a.client instanceof e)d=await Ee(t,a.client,o,a.withCommand,...s);else throw Error(`Invalid client, expected instance of ${e.name}`);yield d;let f=l;l=De(d,r),u=!!(l&&(!a.stopOnSameToken||l!==f))}return void 0}}var Ee,De,Oe=e((()=>{Ee=async(e,t,n,r=e=>e,...i)=>{let a=new e(n);return a=r(a)??a,await t.send(a,...i)},De=(e,t)=>{let n=e,r=t.split(`.`);for(let e of r){if(!n||typeof n!=`object`)return;n=n[e]}return n}})),ke=e((()=>{}));function Ae(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}var je=e((()=>{})),y,Me=e((()=>{t(),y=class{constructor(e){n(this,`authSchemes`,new Map);for(let t in e){let n=e[t];n!==void 0&&this.authSchemes.set(t,n)}}getIdentityProvider(e){return this.authSchemes.get(e)}}})),Ne=e((()=>{})),b,Pe=e((()=>{a(),b=class{async sign(e,t,n){let r=i.clone(e);if(!t.token)throw Error("request could not be signed with `token` since the `token` is not defined");return r.headers.Authorization=`Bearer ${t.token}`,r}}})),x,Fe=e((()=>{x=class{async sign(e,t,n){return e}}})),Ie=e((()=>{Ne(),Pe(),Fe()})),S,Le,C,w,T,Re=e((()=>{S=e=>function(t){return w(t)&&t.expiration.getTime()-Date.now()<e},Le=3e5,C=S(Le),w=e=>e.expiration!==void 0,T=(e,t,n)=>{if(e===void 0)return;let r=typeof e==`function`?e:async()=>Promise.resolve(e),i,a,o,s=!1,c=async e=>{a||(a=r(e));try{i=await a,o=!0,s=!1}finally{a=void 0}return i};return t===void 0?async e=>((!o||e?.forceRefresh)&&(i=await c(e)),i):async e=>((!o||e?.forceRefresh)&&(i=await c(e)),s?i:n(i)?(t(i)&&await c(e),i):(s=!0,i))}})),ze=e((()=>{Me(),Ie(),Re()})),E=e((()=>{ae(),he(),Ce(),we(),Oe(),ke(),je(),ze()})),D,Be=e((()=>{a(),D=e=>r.isInstance(e)?e.headers?.date??e.headers?.Date:void 0})),O,Ve=e((()=>{O=e=>new Date(Date.now()+e)})),He,Ue=e((()=>{Ve(),He=(e,t)=>Math.abs(O(t).getTime()-e)>=3e5})),k,We=e((()=>{Ue(),k=(e,t)=>{let n=Date.parse(e);return He(n,t)?n-Date.now():t}})),Ge=e((()=>{Be(),Ve(),We()})),A,j,M,Ke=e((()=>{a(),Ge(),A=(e,t)=>{if(!t)throw Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},j=async e=>{let t=A(`context`,e.context),n=A(`config`,e.config),r=t.endpointV2?.properties?.authSchemes?.[0];return{config:n,signer:await A(`signer`,n.signer)(r),signingRegion:e?.signingRegion,signingRegionSet:e?.signingRegionSet,signingName:e?.signingName}},M=class{async sign(e,t,n){if(!i.isInstance(e))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let r=await j(n),{config:a,signer:o}=r,{signingRegion:s,signingName:c}=r,l=n.context;if(l?.authSchemes?.length??!1){let[e,t]=l.authSchemes;e?.name===`sigv4a`&&t?.name===`sigv4`&&(s=t?.signingRegion??s,c=t?.signingName??c)}return await o.sign(e,{signingDate:O(a.systemClockOffset),signingRegion:s,signingService:c})}errorHandler(e){return t=>{let n=t.ServerTime??D(t.$response);if(n){let r=A(`config`,e.config),i=r.systemClockOffset;r.systemClockOffset=k(n,r.systemClockOffset),r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){let n=D(e);if(n){let e=A(`config`,t.config);e.systemClockOffset=k(n,e.systemClockOffset)}}}})),qe,Je=e((()=>{a(),Ge(),Ke(),qe=class extends M{async sign(e,t,n){if(!i.isInstance(e))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:r,signer:a,signingRegion:o,signingRegionSet:s,signingName:c}=await j(n),l=(await r.sigv4aSigningRegionSet?.()??s??[o]).join(`,`);return await a.sign(e,{signingDate:O(r.systemClockOffset),signingRegion:l,signingService:c})}}})),N,Ye=e((()=>{N=e=>typeof e==`string`&&e.length>0?e.split(`,`).map(e=>e.trim()):[]})),P,Xe=e((()=>{P=e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,`_`).toUpperCase()}`})),F,I,Ze,Qe=e((()=>{Ye(),Xe(),F=`AWS_AUTH_SCHEME_PREFERENCE`,I=`auth_scheme_preference`,Ze={environmentVariableSelector:(e,t)=>{if(t?.signingName&&P(t.signingName)in e)return[`httpBearerAuth`];if(F in e)return N(e[F])},configFileSelector:e=>{if(I in e)return N(e[I])},default:[]}})),$e,et,tt=e((()=>{E(),ie(),$e=e=>(e.sigv4aSigningRegionSet=v(e.sigv4aSigningRegionSet),e),et={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(`,`).map(e=>e.trim());throw new re(`AWS_SIGV4A_SIGNING_REGION_SET not set in env.`,{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??``).split(`,`).map(e=>e.trim());throw new re(`sigv4a_signing_region_set not set in profile.`,{tryNextLink:!0})},default:void 0}})),nt,L,R,rt,it,z,B,V,H,at,ot,st,ct,lt,ut,dt,U,ft,pt,W,G=e((()=>{nt=`X-Amz-Algorithm`,L=`X-Amz-Credential`,R=`X-Amz-Date`,rt=`X-Amz-SignedHeaders`,it=`X-Amz-Expires`,z=`X-Amz-Signature`,B=`X-Amz-Security-Token`,V=`authorization`,H=R.toLowerCase(),at=`date`,ot=[V,H,at],z.toLowerCase(),st=`x-amz-content-sha256`,ct=B.toLowerCase(),lt={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},ut=/^proxy-/,dt=/^sec-/,U=`AWS4-HMAC-SHA256`,ft=`AWS4-HMAC-SHA256-PAYLOAD`,pt=`UNSIGNED-PAYLOAD`,W=`aws4_request`})),K,q,J,mt,Y,ht=e((()=>{h(),p(),G(),K={},q=[],J=(e,t,n)=>`${e}/${t}/${n}/${W}`,mt=async(e,t,n,r,i)=>{let a=`${n}:${r}:${i}:${g(await Y(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(a in K)return K[a];for(q.push(a);q.length>50;)delete K[q.shift()];let o=`AWS4${t.secretAccessKey}`;for(let t of[n,r,i,W])o=await Y(e,o,t);return K[a]=o},Y=(e,t,n)=>{let r=new e(t);return r.update(f(n)),r.digest()}})),X,gt=e((()=>{G(),X=({headers:e},t,n)=>{let r={};for(let i of Object.keys(e).sort()){if(e[i]==null)continue;let a=i.toLowerCase();(a in lt||t?.has(a)||ut.test(a)||dt.test(a))&&(!n||n&&!n.has(a))||(r[a]=e[i].trim().replace(/\s+/g,` `))}return r}})),Z,_t=e((()=>{l(),h(),p(),G(),Z=async({headers:e,body:t},n)=>{for(let t of Object.keys(e))if(t.toLowerCase()===`x-amz-content-sha256`)return e[t];if(t==null)return`e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`;if(typeof t==`string`||ArrayBuffer.isView(t)||d(t)){let e=new n;return e.update(f(t)),g(await e.digest())}return pt}}));function vt(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}var yt,bt,xt,St,Ct=e((()=>{h(),p(),t(),yt=class{format(e){let t=[];for(let n of Object.keys(e)){let r=u(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}let n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0)),r=0;for(let e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case`boolean`:return Uint8Array.from([+!e.value]);case`byte`:return Uint8Array.from([2,e.value]);case`short`:let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case`integer`:let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case`long`:let r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case`binary`:let i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);let a=new Uint8Array(i.buffer);return a.set(e.value,3),a;case`string`:let o=u(e.value),s=new DataView(new ArrayBuffer(3+o.byteLength));s.setUint8(0,7),s.setUint16(1,o.byteLength,!1);let c=new Uint8Array(s.buffer);return c.set(o,3),c;case`timestamp`:let l=new Uint8Array(9);return l[0]=8,l.set(St.fromNumber(e.value.valueOf()).bytes,1),l;case`uuid`:if(!xt.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let d=new Uint8Array(17);return d[0]=9,d.set(m(e.value.replace(/\-/g,``)),1),d}}},(function(e){e[e.boolTrue=0]=`boolTrue`,e[e.boolFalse=1]=`boolFalse`,e[e.byte=2]=`byte`,e[e.short=3]=`short`,e[e.integer=4]=`integer`,e[e.long=5]=`long`,e[e.byteArray=6]=`byteArray`,e[e.string=7]=`string`,e[e.timestamp=8]=`timestamp`,e[e.uuid=9]=`uuid`})(bt||(bt={})),xt=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,St=class e{constructor(e){if(n(this,`bytes`,void 0),this.bytes=e,e.byteLength!==8)throw Error(`Int64 buffers must be exactly 8 bytes`)}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let n=new Uint8Array(8);for(let e=7,r=Math.abs(Math.round(t));e>-1&&r>0;e--,r/=256)n[e]=r;return t<0&&vt(n),new e(n)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;return t&&vt(e),parseInt(g(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}})),wt,Tt=e((()=>{wt=(e,t)=>{e=e.toLowerCase();for(let n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1}})),Et,Dt=e((()=>{a(),Et=(e,t={})=>{let{headers:n,query:r={}}=i.clone(e);for(let e of Object.keys(n)){let i=e.toLowerCase();(i.slice(0,6)===`x-amz-`&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}}})),Q,Ot=e((()=>{a(),G(),Q=e=>{e=i.clone(e);for(let t of Object.keys(e.headers))ot.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e}})),kt,At=e((()=>{ee(),G(),kt=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e)){if(r.toLowerCase()===`x-amz-signature`)continue;let i=_(r);t.push(i);let a=e[r];typeof a==`string`?n[i]=`${i}=${_(a)}`:Array.isArray(a)&&(n[i]=a.slice(0).reduce((e,t)=>e.concat([`${i}=${_(t)}`]),[]).sort().join(`&`))}return t.sort().map(e=>n[e]).filter(e=>e).join(`&`)}})),jt,Mt,Nt=e((()=>{jt=e=>Mt(e).toISOString().replace(/\.\d{3}Z$/,`Z`),Mt=e=>typeof e==`number`?new Date(e*1e3):typeof e==`string`?Number(e)?new Date(Number(e)*1e3):new Date(e):e})),Pt,Ft=e((()=>{h(),c(),ee(),p(),At(),Nt(),t(),Pt=class{constructor({applyChecksum:e,credentials:t,region:r,service:i,sha256:a,uriEscapePath:s=!0}){n(this,`service`,void 0),n(this,`regionProvider`,void 0),n(this,`credentialProvider`,void 0),n(this,`sha256`,void 0),n(this,`uriEscapePath`,void 0),n(this,`applyChecksum`,void 0),this.service=i,this.sha256=a,this.uriEscapePath=s,this.applyChecksum=typeof e==`boolean`?e:!0,this.regionProvider=o(r),this.credentialProvider=o(t)}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method}
3
+ ${this.getCanonicalPath(e)}
4
+ ${kt(e)}
5
+ ${r.map(e=>`${e}:${t[e]}`).join(`
6
+ `)}
7
+
8
+ ${r.join(`;`)}
9
+ ${n}`}async createStringToSign(e,t,n,r){let i=new this.sha256;return i.update(f(n)),`${r}
10
+ ${e}
11
+ ${t}
12
+ ${g(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split(`/`))n?.length!==0&&n!==`.`&&(n===`..`?t.pop():t.push(n));return _(`${e?.startsWith(`/`)?`/`:``}${t.join(`/`)}${t.length>0&&e?.endsWith(`/`)?`/`:``}`).replace(/%2F/g,`/`)}return e}validateResolvedCredentials(e){if(typeof e!=`object`||typeof e.accessKeyId!=`string`||typeof e.secretAccessKey!=`string`)throw Error(`Resolved credential object is not valid`)}formatDate(e){let t=jt(e).replace(/[\-:]/g,``);return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(`;`)}}})),$,It=e((()=>{h(),p(),G(),ht(),gt(),_t(),Ct(),Tt(),Dt(),Ot(),Ft(),t(),$=class extends Pt{constructor({applyChecksum:e,credentials:t,region:r,service:i,sha256:a,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:t,region:r,service:i,sha256:a,uriEscapePath:o}),n(this,`headerFormatter`,new yt)}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:s,signingRegion:c,signingService:l}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);let d=c??await this.regionProvider(),{longDate:f,shortDate:p}=this.formatDate(n);if(r>604800)return Promise.reject(`Signature version 4 presigned URLs must have an expiration date less than one week in the future`);let m=J(p,d,l??this.service),h=Et(Q(e),{unhoistableHeaders:a,hoistableHeaders:s});u.sessionToken&&(h.query[B]=u.sessionToken),h.query[nt]=U,h.query[L]=`${u.accessKeyId}/${m}`,h.query[R]=f,h.query[it]=r.toString(10);let g=X(h,i,o);return h.query[rt]=this.getCanonicalHeaderList(g),h.query[z]=await this.getSignature(f,m,this.getSigningKey(u,d,p,l),this.createCanonicalRequest(h,g,await Z(e,this.sha256))),h}async sign(e,t){return typeof e==`string`?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:a,eventStreamCredentials:o}){let s=i??await this.regionProvider(),{shortDate:c,longDate:l}=this.formatDate(n),u=J(c,s,a??this.service),d=await Z({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);let p=[ft,l,u,r,g(await f.digest()),d].join(`
13
+ `);return this.signString(p,{signingDate:n,signingRegion:s,signingService:a,eventStreamCredentials:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r,eventStreamCredentials:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature,eventStreamCredentials:i}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r,eventStreamCredentials:i}={}){let a=i??await this.credentialProvider();this.validateResolvedCredentials(a);let o=n??await this.regionProvider(),{shortDate:s}=this.formatDate(t),c=new this.sha256(await this.getSigningKey(a,o,s,r));return c.update(f(e)),g(await c.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:a}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let s=i??await this.regionProvider(),c=Q(e),{longDate:l,shortDate:u}=this.formatDate(t),d=J(u,s,a??this.service);c.headers[H]=l,o.sessionToken&&(c.headers[ct]=o.sessionToken);let f=await Z(c,this.sha256);!wt(`x-amz-content-sha256`,c.headers)&&this.applyChecksum&&(c.headers[st]=f);let p=X(c,r,n),m=await this.getSignature(l,d,this.getSigningKey(o,s,u,a),this.createCanonicalRequest(c,p,f));return c.headers[V]=`${U} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(p)}, Signature=${m}`,c}async getSignature(e,t,n,r){let i=await this.createStringToSign(e,t,r,U),a=new this.sha256(await n);return a.update(f(i)),g(await a.digest())}getSigningKey(e,t,n,r){return mt(this.sha256,e,n,t,r||this.service)}}})),Lt,Rt=e((()=>{Lt={SignatureV4a:null}})),zt=e((()=>{It(),G(),gt(),At(),_t(),Dt(),Ot(),ht(),Ft(),Tt(),Rt()}));function Bt(e,{credentials:t,credentialDefaultProvider:n}){let r;return r=t?t?.memoized?t:T(t,C,w):n?v(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Vt(e,t){if(t.configBound)return t;let n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}var Ht,Ut=e((()=>{ne(),E(),zt(),Ht=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,`credentials`,{set(i){i&&i!==t&&i!==r&&(n=!0),t=i;let a=Vt(e,Bt(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}));if(n&&!a.attributed){let e=typeof t==`object`&&!!t;r=async t=>{let n=await a(t);return e&&(!n.$source||Object.keys(n.$source).length===0)?te(n,`CREDENTIALS_CODE`,`e`):n},r.memoized=a.memoized,r.configBound=a.configBound,r.attributed=!0}else r=a},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;let{signingEscapePath:i=!0,systemClockOffset:a=e.systemClockOffset||0,sha256:o}=e,s;return s=e.signer?v(e.signer):e.regionInfoProvider?()=>v(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{let{signingRegion:r,signingService:a}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||$)(s)}):async t=>{t=Object.assign({},{name:`sigv4`,signingName:e.signingName||e.defaultSigningName,signingRegion:await v(e.region)(),properties:{}},t);let n=t.signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;let a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||$)(a)},Object.assign(e,{systemClockOffset:a,signingEscapePath:i,signer:s})}})),Wt=e((()=>{Ke(),Je(),Qe(),tt(),Ut()})),Gt=e((()=>{Wt(),Xe()}));export{fe as C,xe as S,b as _,$ as a,Te as b,Ze as c,M as d,E as f,x as g,T as h,Lt as i,P as l,C as m,Ht as n,et as o,w as p,zt as r,$e as s,Gt as t,qe as u,y as v,v as x,Ae as y};
@@ -0,0 +1,2 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i,b as a,f as o,t as s,x as c}from"./src-DNHWYkls.js";import{t as l}from"./jsx-runtime-BTgGEFjL.js";import{_s as u,ls as d,xs as f}from"./growthbook-p4aJ_UMv.js";import{n as p,t as m}from"./cwd-B2guYBbl.js";import{r as h,t as g}from"./execFileNoThrow-DdmR1mBS.js";import{d as _,f as v}from"./stringUtils-U7kMYMJq.js";import{BE as y,Dl as b,El as x,HE as S,Ll as C,Pl as w,Ql as T,RT as E,Rl as D,Ul as O,au as k,ht as A,vt as j,vw as M,zE as N,zl as P}from"./loadAgentsDir-Bz0FfcVt.js";import*as F from"path";function I({onComplete:e}){return(0,V.jsxs)(o,{title:`Do you wish to enable auto-connect to IDE?`,color:`ide`,onCancel:e,children:[(0,V.jsx)(E,{options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}],onChange:(0,B.useCallback)(async t=>{let n=t===`yes`;f(e=>({...e,autoConnectIde:n,hasIdeAutoConnectDialogBeenShown:!0})),e()},[e]),defaultValue:`yes`}),(0,V.jsx)(a,{dimColor:!0,children:`You can also configure this in /config or with the --ide flag`})]})}function L(){let e=d();return!P()&&e.autoConnectIde!==!0&&e.hasIdeAutoConnectDialogBeenShown!==!0}function R({onComplete:e}){let t=(0,B.useCallback)(t=>{let n=t===`yes`;n&&f(e=>({...e,autoConnectIde:!1})),e(n)},[e]);return(0,V.jsx)(o,{title:`Do you wish to disable auto-connect to IDE?`,subtitle:`You can also configure this in /config`,onCancel:(0,B.useCallback)(()=>{e(!1)},[e]),color:`ide`,children:(0,V.jsx)(E,{options:[{label:`No`,value:`no`},{label:`Yes`,value:`yes`}],onChange:t,defaultValue:`no`})})}function z(){let e=d();return!P()&&e.autoConnectIde===!0}var B,V,H=e((()=>{B=t(i(),1),s(),u(),w(),M(),V=l()}));function U({availableIDEs:e,unavailableIDEs:t,selectedIDE:n,onClose:r,onSelect:i}){let[s,l]=(0,Z.useState)(n?.port?.toString()??`None`),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(!1),m=(0,Z.useCallback)(t=>{t!==`None`&&L()?d(!0):t===`None`&&z()?p(!0):i(e.find(e=>e.port===parseInt(t,10)))},[e,i]),h=e.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{}),g=e.map(e=>{let t=(h[e.name]||0)>1&&e.workspaceFolders.length>0;return{label:e.name,value:e.port.toString(),description:t?X(e.workspaceFolders):void 0}}).concat([{label:`None`,value:`None`,description:void 0}]);return u?(0,Q.jsx)(I,{onComplete:()=>m(s)}):f?(0,Q.jsx)(R,{onComplete:()=>{i(void 0)}}):(0,Q.jsx)(o,{title:`Select IDE`,subtitle:`Connect to an IDE for integrated development features.`,onCancel:r,color:`ide`,children:(0,Q.jsxs)(c,{flexDirection:`column`,children:[e.length===0&&(0,Q.jsx)(a,{dimColor:!0,children:D()?`No available IDEs detected. Please install the plugin and restart your IDE:
2
+ https://docs.claude.com/s/claude-code-jetbrains`:`No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.`}),e.length!==0&&(0,Q.jsx)(E,{defaultValue:s,defaultFocusValue:s,options:g,onChange:e=>{l(e),m(e)}}),e.length!==0&&e.some(e=>e.name===`VS Code`||e.name===`Visual Studio Code`)&&(0,Q.jsx)(c,{marginTop:1,children:(0,Q.jsx)(a,{color:`warning`,children:`Note: Only one Claude Code instance can be connected to VS Code at a time.`})}),e.length!==0&&!P()&&(0,Q.jsx)(c,{marginTop:1,children:(0,Q.jsx)(a,{dimColor:!0,children:`Tip: You can enable auto-connect to IDE in /config or with the --ide flag`})}),t.length>0&&(0,Q.jsxs)(c,{marginTop:1,flexDirection:`column`,children:[(0,Q.jsxs)(a,{dimColor:!0,children:[`Found `,t.length,` other running IDE(s). However, their workspace/project directories do not match the current cwd.`]}),(0,Q.jsx)(c,{marginTop:1,flexDirection:`column`,children:t.map((e,t)=>(0,Q.jsx)(c,{paddingLeft:3,children:(0,Q.jsxs)(a,{dimColor:!0,children:[`• `,e.name,`: `,X(e.workspaceFolders)]})},t))})]})]})})}async function W(e,t){let n=t?.ide;if(!n||n.type!==`sse-ide`&&n.type!==`ws-ide`)return null;for(let t of e)if(t.url===n.url)return t;return null}function G({availableIDEs:e,onSelectIDE:t,onDone:n}){let[r,i]=(0,Z.useState)(e[0]?.port?.toString()??``),a=(0,Z.useCallback)(n=>{t(e.find(e=>e.port===parseInt(n,10)))},[e,t]),s=e.map(e=>({label:e.name,value:e.port.toString()}));function c(){n(`IDE selection cancelled`,{display:`system`})}return(0,Q.jsx)(o,{title:`Select an IDE to open the project`,onCancel:c,color:`ide`,children:(0,Q.jsx)(E,{defaultValue:r,defaultFocusValue:r,options:s,onChange:e=>{i(e),a(e)}})})}function K({runningIDEs:e,onSelectIDE:t,onDone:n}){let[r,i]=(0,Z.useState)(e[0]??``),a=(0,Z.useCallback)(e=>{t(e)},[t]),s=e.map(e=>({label:O(e),value:e}));function c(){n(`IDE selection cancelled`,{display:`system`})}return(0,Q.jsx)(o,{title:`Select IDE to install extension`,onCancel:c,color:`ide`,children:(0,Q.jsx)(E,{defaultFocusValue:r,options:s,onChange:e=>{i(e),a(e)}})})}function q({ide:e,onInstall:t}){return(0,Z.useEffect)(()=>{t(e)},[e,t]),null}async function J(e,t,r){v(`tengu_ext_ide_command`,{});let{options:{dynamicMcpConfig:i},onChangeDynamicMcpConfig:a}=t;if(r?.trim()===`open`){let t=A(),r=t?t.worktreePath:m(),i=(await x(!0)).filter(e=>e.isValid);return i.length===0?(e(`No IDEs with Claude Code extension detected.`),null):(0,Q.jsx)(G,{availableIDEs:i,onSelectIDE:async i=>{if(!i){e(`No IDE selected.`);return}if(i.name.toLowerCase().includes(`vscode`)||i.name.toLowerCase().includes(`cursor`)||i.name.toLowerCase().includes(`windsurf`)){let{code:a}=await g(`code`,[r]);e(a===0?`Opened ${t?`worktree`:`project`} in ${n.bold(i.name)}`:`Failed to open in ${i.name}. Try opening manually: ${r}`)}else D(),e(`Please open the ${t?`worktree`:`project`} manually in ${n.bold(i.name)}: ${r}`)},onDone:()=>{e(`Exited without opening IDE`,{display:`system`})}})}let o=await x(!0);if(o.length===0&&t.onInstallIDEExtension&&!P()){let r=await b(),i=r=>{t.onInstallIDEExtension&&(t.onInstallIDEExtension(r),C(r)?e(`Installed plugin to ${n.bold(O(r))}\nPlease ${n.bold(`restart your IDE`)} completely for it to take effect`):e(`Installed extension to ${n.bold(O(r))}`))};if(r.length>1)return(0,Q.jsx)(K,{runningIDEs:r,onSelectIDE:i,onDone:()=>{e(`No IDE selected.`,{display:`system`})}});if(r.length===1)return(0,Q.jsx)(q,{ide:r[0],onInstall:i})}let s=o.filter(e=>e.isValid);return(0,Q.jsx)(Y,{availableIDEs:s,unavailableIDEs:o.filter(e=>!e.isValid),currentIDE:await W(s,i),dynamicMcpConfig:i,onChangeDynamicMcpConfig:a,onDone:e})}function Y({availableIDEs:e,unavailableIDEs:t,currentIDE:n,dynamicMcpConfig:r,onChangeDynamicMcpConfig:i,onDone:o}){let[s,c]=(0,Z.useState)(null),l=y(e=>e.mcp.clients.find(e=>e.name===`ide`)),u=S(),d=(0,Z.useRef)(!0);(0,Z.useEffect)(()=>{if(s){if(d.current){d.current=!1;return}!l||l.type===`pending`||(l.type===`connected`?o(`Connected to ${s.name}.`):l.type===`failed`&&o(`Failed to connect to ${s.name}.`))}},[l,s,o]),(0,Z.useEffect)(()=>{if(!s)return;let e=setTimeout(o,$,`Connection to ${s.name} timed out.`);return()=>clearTimeout(e)},[s,o]);let f=(0,Z.useCallback)(e=>{if(!i){o(`Error connecting to IDE.`);return}let t={...r||{}};if(n&&delete t.ide,!e){l&&l.type===`connected`&&n&&(l.client.onclose=()=>{},T(`ide`,l.config),u(e=>({...e,mcp:{...e.mcp,clients:e.mcp.clients.filter(e=>e.name!==`ide`),tools:e.mcp.tools.filter(e=>!e.name?.startsWith(`mcp__ide__`)),commands:e.mcp.commands.filter(e=>!e.name?.startsWith(`mcp__ide__`))}}))),i(t),o(n?`Disconnected from ${n.name}.`:`No IDE selected.`);return}let a=e.url;t.ide={type:a.startsWith(`ws:`)?`ws-ide`:`sse-ide`,url:a,ideName:e.name,authToken:e.authToken,ideRunningInWindows:e.ideRunningInWindows,scope:`dynamic`},d.current=!0,c(e),i(t)},[r,n,l,u,i,o]);return s?(0,Q.jsxs)(a,{dimColor:!0,children:[`Connecting to `,s.name,`…`]}):(0,Q.jsx)(U,{availableIDEs:e,unavailableIDEs:t,selectedIDE:n,onClose:()=>o(`IDE selection cancelled`,{display:`system`}),onSelect:f})}function X(e,t=100){if(e.length===0)return``;let n=m(),r=e.slice(0,2),i=e.length>2,a=i?3:0,o=t-(r.length-1)*2-a,s=Math.floor(o/r.length),c=n.normalize(`NFC`),l=r.map(e=>{let t=e.normalize(`NFC`);return t.startsWith(c+F.sep)&&(e=t.slice(c.length+1)),e.length<=s?e:`…`+e.slice(-(s-1))}).join(`, `);return i&&(l+=`, …`),l}var Z,Q,$;e((()=>{r(),Z=t(i(),1),_(),M(),s(),H(),k(),N(),p(),h(),w(),j(),Q=l(),$=35e3}))();export{J as call,X as formatWorkspaceFolders};
@@ -0,0 +1 @@
1
+ import{n as e,s as t}from"./envUtils-CFG7IQID.js";import{n,t as r}from"./axios-Zh7qGPze.js";import{Ln as i,Tt as a,wn as o}from"./schemas-Bwt-7U5W.js";import{t as s}from"./v4-DLhvDPkt.js";import{Ht as c,at as l}from"./state-CUZTq6r0.js";import{l as u,p as d}from"./debug-CjIaNjpK.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{a as m,n as h,t as g}from"./bridgeConfig-GYR-LUiu.js";import{basename as _,join as v}from"path";import{randomUUID as y}from"crypto";import{mkdir as b,writeFile as x}from"fs/promises";r(),s(),c(),u(),t(),p(),m();var S=3e4;function C(e){d(`[bridge:inbound-attach] ${e}`)}var w=f(()=>o({file_uuid:i(),file_name:i()})),T=f(()=>a(w()));function E(e){if(typeof e!=`object`||!e||!(`file_attachments`in e))return[];let t=T().safeParse(e.file_attachments);return t.success?t.data:[]}function D(e){return _(e).replace(/[^a-zA-Z0-9._-]/g,`_`)||`attachment`}function O(){return v(e(),`uploads`,l())}async function k(e){let t=g();if(!t){C(`skip: no oauth token`);return}let r;try{let i=`${h()}/api/oauth/files/${encodeURIComponent(e.file_uuid)}/content`,a=await n.get(i,{headers:{Authorization:`Bearer ${t}`},responseType:`arraybuffer`,timeout:S,validateStatus:()=>!0});if(a.status!==200){C(`fetch ${e.file_uuid} failed: status=${a.status}`);return}r=Buffer.from(a.data)}catch(t){C(`fetch ${e.file_uuid} threw: ${t}`);return}let i=D(e.file_name),a=(e.file_uuid.slice(0,8)||y().slice(0,8)).replace(/[^a-zA-Z0-9_-]/g,`_`),o=O(),s=v(o,`${a}-${i}`);try{await b(o,{recursive:!0}),await x(s,r)}catch(e){C(`write ${s} failed: ${e}`);return}return C(`resolved ${e.file_uuid} → ${s} (${r.length} bytes)`),s}async function A(e){if(e.length===0)return``;C(`resolving ${e.length} attachment(s)`);let t=(await Promise.all(e.map(k))).filter(e=>e!==void 0);return t.length===0?``:t.map(e=>`@"${e}"`).join(` `)+` `}function j(e,t){if(!t)return e;if(typeof e==`string`)return t+e;let n=e.findLastIndex(e=>e.type===`text`);if(n!==-1){let r=e[n];if(r.type===`text`)return[...e.slice(0,n),{...r,text:t+r.text},...e.slice(n+1)]}return[...e,{type:`text`,text:t.trimEnd()}]}async function M(e,t){let n=E(e);return n.length===0?t:j(t,await A(n))}export{M as resolveAndPrepend};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-CaCI0a5T.js";import{a as r,c as i,i as a,l as o,n as s,o as c,r as l,s as u,t as d,u as f}from"./classPrivateFieldSet2-DZkxcFPS.js";import{channel as p,tracingChannel as m}from"node:diagnostics_channel";function h(){let e=new ke(l(S,this)),t=new ke(l(S,this));d(V,this,e),d(B,this,t);let n=this.ttlAutopurge?Array.from({length:l(S,this)}):void 0;d(H,this,n),d(_e,this,(n,r,a=l(D,this).now())=>{t[n]=r===0?0:a,e[n]=r,i(n,r)}),d(q,this,n=>{t[n]=e[n]===0?0:l(D,this).now(),i(n,e[n])});let i=this.ttlAutopurge?(e,t)=>{if(n?.[e]&&(clearTimeout(n[e]),n[e]=void 0),t&&t!==0&&n){let i=setTimeout(()=>{l(Y,this).call(this,e)&&r(K,this,x).call(this,l(j,this)[e],`expire`)},t+1);i.unref&&i.unref(),n[e]=i}}:()=>{};d(J,this,(n,r)=>{if(e[r]){let i=e[r],s=t[r];if(!i||!s)return;n.ttl=i,n.start=s,n.now=a||o(),n.remainingTTL=i-(n.now-s)}});let a=0,o=()=>{let e=l(D,this).now();if(this.ttlResolution>0){a=e;let t=setTimeout(()=>a=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let r=l(A,this).get(n);if(r===void 0)return 0;let i=e[r],s=t[r];return!i||!s?1/0:i-((a||o())-s)},d(Y,this,n=>{let r=t[n],i=e[n];return!!i&&!!r&&(a||o())-r>i})}function ee(){let e=new ke(l(S,this));d(k,this,0),d(z,this,e),d(X,this,t=>{d(k,this,l(k,this)-e[t]),e[t]=0}),d(ye,this,(e,t,n,i)=>{if(r(K,this,b).call(this,t))return 0;if(!$(n))if(i){if(typeof i!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=i(t,e),!$(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n}),d(ve,this,(t,n,i)=>{if(e[t]=n,l(C,this)){let n=l(C,this)-e[t];for(;l(k,this)>n;)r(K,this,y).call(this,!0)}d(k,this,l(k,this)+e[t]),i&&(i.entrySize=n,i.totalCalculatedSize=l(k,this))})}function*g({allowStale:e=this.allowStale}={}){if(l(O,this))for(let t=l(I,this);r(K,this,te).call(this,t)&&((e||!l(Y,this).call(this,t))&&(yield t),t!==l(F,this));)t=l(P,this)[t]}function*_({allowStale:e=this.allowStale}={}){if(l(O,this))for(let t=l(F,this);r(K,this,te).call(this,t)&&((e||!l(Y,this).call(this,t))&&(yield t),t!==l(I,this));)t=l(N,this)[t]}function te(e){return e!==void 0&&l(A,this).get(l(j,this)[e])===e}function v(e,t,n={}){var i;let{ttl:a=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:u}=n;if(t===void 0)return u&&(u.set=`deleted`),this.delete(e),this;let{noUpdateTTL:f=this.noUpdateTTL}=n;u&&!r(K,this,b).call(this,t)&&(u.value=t);let p=l(ye,this).call(this,e,t,n.size||0,c,u);if(this.maxEntrySize&&p>this.maxEntrySize)return r(K,this,x).call(this,e,`set`),u&&(u.set=`miss`,u.maxEntrySizeExceeded=!0),this;let m=l(O,this)===0?void 0:l(A,this).get(e);if(m===void 0)m=l(O,this)===0?l(I,this):l(L,this).length===0?l(O,this)===l(S,this)?r(K,this,y).call(this,!1):l(O,this):l(L,this).pop(),l(j,this)[m]=e,l(M,this)[m]=t,l(A,this).set(e,m),l(N,this)[l(I,this)]=m,l(P,this)[m]=l(I,this),d(I,this,m),d(O,this,(i=l(O,this),i++,i)),l(ve,this).call(this,m,p,u),u&&(u.set=`add`),f=!1,l(ge,this)&&l(T,this)?.call(this,t,e,`add`);else{r(K,this,ue).call(this,m);let n=l(M,this)[m];if(t!==n){if(l(W,this)&&r(K,this,b).call(this,n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!s&&(l(U,this)&&l(w,this)?.call(this,t,e,`set`),l(G,this)&&l(R,this)?.push([t,e,`set`]))}else s||(l(U,this)&&l(w,this)?.call(this,n,e,`set`),l(G,this)&&l(R,this)?.push([n,e,`set`]));if(l(X,this).call(this,m),l(ve,this).call(this,m,p,u),l(M,this)[m]=t,u){u.set=`replace`;let e=n&&r(K,this,b).call(this,n)?n.__staleWhileFetching:n;e!==void 0&&(u.oldValue=e)}}else u&&(u.set=`update`);l(ge,this)&&this.onInsert?.(t,e,t===n?`update`:`replace`)}if(a!==0&&!l(V,this)&&r(K,this,h).call(this),l(V,this)&&(f||l(_e,this).call(this,m,a,o),u&&l(J,this).call(this,u,m)),!s&&l(G,this)&&l(R,this)){let e=l(R,this),t;for(;t=e?.shift();)l(E,this)?.call(this,...t)}return this}function y(e){var t;let n=l(F,this),i=l(j,this)[n],a=l(M,this)[n];return l(W,this)&&r(K,this,b).call(this,a)?a.__abortController.abort(Error(`evicted`)):(l(U,this)||l(G,this))&&(l(U,this)&&l(w,this)?.call(this,a,i,`evict`),l(G,this)&&l(R,this)?.push([a,i,`evict`])),l(X,this).call(this,n),l(H,this)?.[n]&&(clearTimeout(l(H,this)[n]),l(H,this)[n]=void 0),e&&(l(j,this)[n]=void 0,l(M,this)[n]=void 0,l(L,this).push(n)),l(O,this)===1?(d(F,this,d(I,this,0)),l(L,this).length=0):d(F,this,l(N,this)[n]),l(A,this).delete(i),d(O,this,(t=l(O,this),t--,t)),n}function ne(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,a=l(A,this).get(e);if(a!==void 0){let e=l(M,this)[a];if(r(K,this,b).call(this,e)&&e.__staleWhileFetching===void 0)return!1;if(l(Y,this).call(this,a))i&&(i.has=`stale`,l(J,this).call(this,i,a));else return n&&l(q,this).call(this,a),i&&(i.has=`hit`,l(J,this).call(this,i,a)),!0}else i&&(i.has=`miss`);return!1}function re(e,t){let{status:n,allowStale:i=this.allowStale}=t,a=l(A,this).get(e);if(a===void 0||!i&&l(Y,this).call(this,a)){n&&(n.peek=a===void 0?`miss`:`stale`);return}let o=l(M,this)[a],s=r(K,this,b).call(this,o)?o.__staleWhileFetching:o;return n&&(s===void 0?n.peek=`miss`:(n.peek=`hit`,n.value=s)),s}function ie(e,t,n,i){let a=t===void 0?void 0:l(M,this)[t];if(r(K,this,b).call(this,a))return a;let o=new AbortController,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:i},u=(i,a=!1)=>{let{aborted:s}=o.signal,u=n.ignoreFetchAbort&&i!==void 0,d=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&i!==void 0);if(n.status&&(s&&!a?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,u&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!u&&!a)return f(o.signal.reason,d);let p=m,h=l(M,this)[t];return(h===m||h===void 0&&u&&a)&&(i===void 0?p.__staleWhileFetching===void 0?r(K,this,x).call(this,e,`fetch`):l(M,this)[t]=p.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),r(K,this,v).call(this,e,i,c.options))),i},d=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),f(e,!1)),f=(i,a)=>{let{aborted:s}=o.signal,c=s&&n.allowStaleOnFetchAbort,u=c||n.allowStaleOnFetchRejection,d=u||n.noDeleteOnFetchRejection,f=m;if(l(M,this)[t]===m&&(!d||!a&&f.__staleWhileFetching===void 0?r(K,this,x).call(this,e,`fetch`):c||(l(M,this)[t]=f.__staleWhileFetching)),u)return n.status&&f.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),f.__staleWhileFetching;if(f.__returned===f)throw i},p=(t,r)=>{let i=l(me,this)?.call(this,e,a,c);i&&i instanceof Promise&&i.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>u(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(u,d),h=Object.assign(m,{__abortController:o,__staleWhileFetching:a,__returned:void 0});return t===void 0?(r(K,this,v).call(this,e,h,{...c.options,status:void 0}),t=l(A,this).get(e)):l(M,this)[t]=h,h}function b(e){if(!l(W,this))return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof AbortController}async function ae(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:c=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:ee,forceRefresh:g=!1,status:_,signal:te}=t;if(_&&(_.op=`fetch`,_.key=e,g&&(_.forceRefresh=!0)),!l(W,this))return _&&(_.fetch=`get`),r(K,this,ce).call(this,e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a,status:_});let v={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a,ttl:o,noDisposeOnSet:s,size:c,sizeCalculation:u,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:h,ignoreFetchAbort:m,status:_,signal:te},y=l(A,this).get(e);if(y===void 0){_&&(_.fetch=`miss`);let t=r(K,this,ie).call(this,e,y,v,ee);return t.__returned=t}else{let t=l(M,this)[y];if(r(K,this,b).call(this,t)){let e=n&&t.__staleWhileFetching!==void 0;return _&&(_.fetch=`inflight`,e&&(_.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let a=l(Y,this).call(this,y);if(!g&&!a)return _&&(_.fetch=`hit`),r(K,this,ue).call(this,y),i&&l(q,this).call(this,y),_&&l(J,this).call(this,_,y),t;let o=r(K,this,ie).call(this,e,y,v,ee),s=o.__staleWhileFetching!==void 0&&n;return _&&(_.fetch=a?`stale`:`refresh`,s&&a&&(_.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}async function oe(e,t={}){let n=await r(K,this,ae).call(this,e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}function se(e,t={}){let n=l(he,this);if(!n)throw Error(`no memoMethod provided to constructor`);let{context:i,status:a,forceRefresh:o,...s}=t;a&&o&&(a.forceRefresh=!0);let c=r(K,this,ce).call(this,e,s),u=o||c===void 0;if(a&&(a.memo=u?`miss`:`hit`,u||(a.value=c)),!u)return c;let d=n(e,c,{options:s,context:i});return a&&(a.value=d),r(K,this,v).call(this,e,d,s),d}function ce(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:o}=t,s=l(A,this).get(e);if(s===void 0){o&&(o.get=`miss`);return}let c=l(M,this)[s],u=r(K,this,b).call(this,c);return o&&l(J,this).call(this,o,s),l(Y,this).call(this,s)?u?(o&&(o.get=`stale-fetching`),n&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(a||r(K,this,x).call(this,e,`expire`),o&&(o.get=`stale`),n?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=u?`fetching`:`hit`),r(K,this,ue).call(this,s),i&&l(q,this).call(this,s),u?c.__staleWhileFetching:c)}function le(e,t){l(P,this)[t]=e,l(N,this)[e]=t}function ue(e){e!==l(I,this)&&(e===l(F,this)?d(F,this,l(N,this)[e]):r(K,this,le).call(this,l(P,this)[e],l(N,this)[e]),r(K,this,le).call(this,l(I,this),e),d(I,this,e))}function x(e,t){Z.hasSubscribers&&Z.publish({op:`delete`,delete:t,key:e});let n=!1;if(l(O,this)!==0){let a=l(A,this).get(e);if(a!==void 0)if(l(H,this)?.[a]&&(clearTimeout(l(H,this)?.[a]),l(H,this)[a]=void 0),n=!0,l(O,this)===1)r(K,this,de).call(this,t);else{var i;l(X,this).call(this,a);let n=l(M,this)[a];if(r(K,this,b).call(this,n)?n.__abortController.abort(Error(`deleted`)):(l(U,this)||l(G,this))&&(l(U,this)&&l(w,this)?.call(this,n,e,t),l(G,this)&&l(R,this)?.push([n,e,t])),l(A,this).delete(e),l(j,this)[a]=void 0,l(M,this)[a]=void 0,a===l(I,this))d(I,this,l(P,this)[a]);else if(a===l(F,this))d(F,this,l(N,this)[a]);else{let e=l(P,this)[a];l(N,this)[e]=l(N,this)[a];let t=l(N,this)[a];l(P,this)[t]=l(P,this)[a]}d(O,this,(i=l(O,this),i--,i)),l(L,this).push(a)}}if(l(G,this)&&l(R,this)?.length){let e=l(R,this),t;for(;t=e?.shift();)l(E,this)?.call(this,...t)}return n}function de(e){for(let t of r(K,this,_).call(this,{allowStale:!0})){let n=l(M,this)[t];if(r(K,this,b).call(this,n))n.__abortController.abort(Error(`deleted`));else{let r=l(j,this)[t];l(U,this)&&l(w,this)?.call(this,n,r,e),l(G,this)&&l(R,this)?.push([n,r,e])}}if(l(A,this).clear(),l(M,this).fill(void 0),l(j,this).fill(void 0),l(V,this)&&l(B,this)){l(V,this).fill(0),l(B,this).fill(0);for(let e of l(H,this)??[])e!==void 0&&clearTimeout(e);l(H,this)?.fill(void 0)}if(l(z,this)&&l(z,this).fill(0),d(F,this,0),d(I,this,0),l(L,this).length=0,d(k,this,0),d(O,this,0),l(G,this)&&l(R,this)){let e=l(R,this),t;for(;t=e?.shift();)l(E,this)?.call(this,...t)}}var fe,pe,S,C,w,T,E,me,he,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,ge,K,q,J,_e,Y,X,ve,ye,be,xe,Z,Q,Se,Ce,we,Te,Ee,De,$,Oe,ke,Ae,je,Me=e((()=>{t(),c(),f(),i(),a(),s(),Z=p(`lru-cache:metrics`),Q=m(`lru-cache`),Se=()=>Z.hasSubscribers||Q.hasSubscribers,Ce=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,we=new Set,Te=typeof process==`object`&&process?process:{},Ee=(e,t,n,r)=>{typeof Te.emitWarning==`function`?Te.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},De=e=>!we.has(e),$=e=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),Oe=e=>$(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?ke:null:null,ke=class extends Array{constructor(e){super(e),this.fill(0)}},Ae=(fe=class e{static create(t){let n=Oe(t);if(!n)return[];pe._=r(fe,e,!0);let i=new e(t,n);return pe._=r(fe,e,!1),i}constructor(t,i){if(n(this,`heap`,void 0),n(this,`length`,void 0),!r(fe,e,pe)._)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new i(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},pe={_:!1},fe),je=(S=new WeakMap,C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakMap,me=new WeakMap,he=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakMap,z=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap,ge=new WeakMap,K=new WeakSet,q=new WeakMap,J=new WeakMap,_e=new WeakMap,Y=new WeakMap,X=new WeakMap,ve=new WeakMap,ye=new WeakMap,xe=Symbol.iterator,be=Symbol.toStringTag,class e{get perf(){return l(D,this)}static unsafeExposeInternals(e){return{starts:l(B,e),ttls:l(V,e),autopurgeTimers:l(H,e),sizes:l(z,e),keyMap:l(A,e),keyList:l(j,e),valList:l(M,e),next:l(N,e),prev:l(P,e),get head(){return l(F,e)},get tail(){return l(I,e)},free:l(L,e),isBackgroundFetch:t=>r(K,e,b).call(e,t),backgroundFetch:(t,n,i,a)=>r(K,e,ie).call(e,t,n,i,a),moveToTail:t=>r(K,e,ue).call(e,t),indexes:t=>r(K,e,g).call(e,t),rindexes:t=>r(K,e,_).call(e,t),isStale:t=>l(Y,e).call(e,t)}}get max(){return l(S,this)}get maxSize(){return l(C,this)}get calculatedSize(){return l(k,this)}get size(){return l(O,this)}get fetchMethod(){return l(me,this)}get memoMethod(){return l(he,this)}get dispose(){return l(w,this)}get onInsert(){return l(T,this)}get disposeAfter(){return l(E,this)}constructor(t){o(this,K),u(this,S,void 0),u(this,C,void 0),u(this,w,void 0),u(this,T,void 0),u(this,E,void 0),u(this,me,void 0),u(this,he,void 0),u(this,D,void 0),n(this,`ttl`,void 0),n(this,`ttlResolution`,void 0),n(this,`ttlAutopurge`,void 0),n(this,`updateAgeOnGet`,void 0),n(this,`updateAgeOnHas`,void 0),n(this,`allowStale`,void 0),n(this,`noDisposeOnSet`,void 0),n(this,`noUpdateTTL`,void 0),n(this,`maxEntrySize`,void 0),n(this,`sizeCalculation`,void 0),n(this,`noDeleteOnFetchRejection`,void 0),n(this,`noDeleteOnStaleGet`,void 0),n(this,`allowStaleOnFetchAbort`,void 0),n(this,`allowStaleOnFetchRejection`,void 0),n(this,`ignoreFetchAbort`,void 0),u(this,O,void 0),u(this,k,void 0),u(this,A,void 0),u(this,j,void 0),u(this,M,void 0),u(this,N,void 0),u(this,P,void 0),u(this,F,void 0),u(this,I,void 0),u(this,L,void 0),u(this,R,void 0),u(this,z,void 0),u(this,B,void 0),u(this,V,void 0),u(this,H,void 0),u(this,U,void 0),u(this,W,void 0),u(this,G,void 0),u(this,ge,void 0),u(this,q,()=>{}),u(this,J,()=>{}),u(this,_e,()=>{}),u(this,Y,()=>!1),u(this,X,e=>{}),u(this,ve,(e,t,n)=>{}),u(this,ye,(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0}),n(this,be,`LRUCache`);let{max:i=0,ttl:a,ttlResolution:s=1,ttlAutopurge:c,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:m,dispose:g,onInsert:_,disposeAfter:te,noDisposeOnSet:v,noUpdateTTL:y,maxSize:ne=0,maxEntrySize:re=0,sizeCalculation:ie,fetchMethod:b,memoMethod:ae,noDeleteOnFetchRejection:oe,noDeleteOnStaleGet:se,allowStaleOnFetchRejection:ce,allowStaleOnFetchAbort:le,ignoreFetchAbort:ue,perf:x}=t;if(x!==void 0&&typeof x?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(d(D,this,x??Ce),i!==0&&!$(i))throw TypeError(`max option must be a nonnegative integer`);let de=i?Oe(i):Array;if(!de)throw Error(`invalid max value: `+i);if(d(S,this,i),d(C,this,ne),this.maxEntrySize=re||l(C,this),this.sizeCalculation=ie,this.sizeCalculation){if(!l(C,this)&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(ae!==void 0&&typeof ae!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(d(he,this,ae),b!==void 0&&typeof b!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(d(me,this,b),d(W,this,!!b),d(A,this,new Map),d(j,this,Array.from({length:i}).fill(void 0)),d(M,this,Array.from({length:i}).fill(void 0)),d(N,this,new de(i)),d(P,this,new de(i)),d(F,this,0),d(I,this,0),d(L,this,Ae.create(i)),d(O,this,0),d(k,this,0),typeof g==`function`&&d(w,this,g),typeof _==`function`&&d(T,this,_),typeof te==`function`?(d(E,this,te),d(R,this,[])):(d(E,this,void 0),d(R,this,void 0)),d(U,this,!!l(w,this)),d(ge,this,!!l(T,this)),d(G,this,!!l(E,this)),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!oe,this.allowStaleOnFetchRejection=!!ce,this.allowStaleOnFetchAbort=!!le,this.ignoreFetchAbort=!!ue,this.maxEntrySize!==0){if(l(C,this)!==0&&!$(l(C,this)))throw TypeError(`maxSize must be a positive integer if specified`);if(!$(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);r(K,this,ee).call(this)}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!se,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=$(s)||s===0?s:1,this.ttlAutopurge=!!c,this.ttl=a||0,this.ttl){if(!$(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);r(K,this,h).call(this)}if(l(S,this)===0&&this.ttl===0&&l(C,this)===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!l(S,this)&&!l(C,this)){let t=`LRU_CACHE_UNBOUNDED`;De(t)&&(we.add(t),Ee(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return l(A,this).has(e)?1/0:0}*entries(){for(let e of r(K,this,g).call(this))l(M,this)[e]!==void 0&&l(j,this)[e]!==void 0&&!r(K,this,b).call(this,l(M,this)[e])&&(yield[l(j,this)[e],l(M,this)[e]])}*rentries(){for(let e of r(K,this,_).call(this))l(M,this)[e]!==void 0&&l(j,this)[e]!==void 0&&!r(K,this,b).call(this,l(M,this)[e])&&(yield[l(j,this)[e],l(M,this)[e]])}*keys(){for(let e of r(K,this,g).call(this)){let t=l(j,this)[e];t!==void 0&&!r(K,this,b).call(this,l(M,this)[e])&&(yield t)}}*rkeys(){for(let e of r(K,this,_).call(this)){let t=l(j,this)[e];t!==void 0&&!r(K,this,b).call(this,l(M,this)[e])&&(yield t)}}*values(){for(let e of r(K,this,g).call(this))l(M,this)[e]!==void 0&&!r(K,this,b).call(this,l(M,this)[e])&&(yield l(M,this)[e])}*rvalues(){for(let e of r(K,this,_).call(this))l(M,this)[e]!==void 0&&!r(K,this,b).call(this,l(M,this)[e])&&(yield l(M,this)[e])}[xe](){return this.entries()}find(e,t={}){for(let n of r(K,this,g).call(this)){let i=l(M,this)[n],a=r(K,this,b).call(this,i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,l(j,this)[n],this))return r(K,this,ce).call(this,l(j,this)[n],t)}}forEach(e,t=this){for(let n of r(K,this,g).call(this)){let i=l(M,this)[n],a=r(K,this,b).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,l(j,this)[n],this)}}rforEach(e,t=this){for(let n of r(K,this,_).call(this)){let i=l(M,this)[n],a=r(K,this,b).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,l(j,this)[n],this)}}purgeStale(){let e=!1;for(let t of r(K,this,_).call(this,{allowStale:!0}))l(Y,this).call(this,t)&&(r(K,this,x).call(this,l(j,this)[t],`expire`),e=!0);return e}info(e){let t=l(A,this).get(e);if(t===void 0)return;let n=l(M,this)[t],i=r(K,this,b).call(this,n)?n.__staleWhileFetching:n;if(i===void 0)return;let a={value:i};if(l(V,this)&&l(B,this)){let e=l(V,this)[t],n=l(B,this)[t];e&&n&&(a.ttl=e-(l(D,this).now()-n),a.start=Date.now())}return l(z,this)&&(a.size=l(z,this)[t]),a}dump(){let e=[];for(let t of r(K,this,g).call(this,{allowStale:!0})){let n=l(j,this)[t],i=l(M,this)[t],a=r(K,this,b).call(this,i)?i.__staleWhileFetching:i;if(a===void 0||n===void 0)continue;let o={value:a};if(l(V,this)&&l(B,this)){o.ttl=l(V,this)[t];let e=l(D,this).now()-l(B,this)[t];o.start=Math.floor(Date.now()-e)}l(z,this)&&(o.size=l(z,this)[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=l(D,this).now()-e}r(K,this,v).call(this,t,n.value,n)}}set(e,t,n={}){let{status:i=Z.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op=`set`,i.key=e,t!==void 0&&(i.value=t));let a=r(K,this,v).call(this,e,t,n);return i&&Z.hasSubscribers&&Z.publish(i),a}pop(){try{for(;l(O,this);){let e=l(M,this)[l(F,this)];if(r(K,this,y).call(this,!0),r(K,this,b).call(this,e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(l(G,this)&&l(R,this)){let e=l(R,this),t;for(;t=e?.shift();)l(E,this)?.call(this,...t)}}}has(e,t={}){let{status:n=Z.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op=`has`,n.key=e);let i=r(K,this,ne).call(this,e,t);return Z.hasSubscribers&&Z.publish(n),i}peek(e,t={}){let{status:n=Se()?{}:void 0}=t;n&&(n.op=`peek`,n.key=e),t.status=n;let i=r(K,this,re).call(this,e,t);return Z.hasSubscribers&&Z.publish(n),i}fetch(e,t={}){let n=Q.hasSubscribers,{status:i=Se()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let a=r(K,this,ae).call(this,e,t);return i&&Se()&&n&&(i.trace=!0,Q.tracePromise(()=>a,i).catch(()=>{})),a}forceFetch(e,t={}){let n=Q.hasSubscribers,{status:i=Se()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let a=r(K,this,oe).call(this,e,t);return i&&Se()&&n&&(i.trace=!0,Q.tracePromise(()=>a,i).catch(()=>{})),a}memo(e,t={}){let{status:n=Z.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op=`memo`,n.key=e,t.context&&(n.context=t.context));let i=r(K,this,se).call(this,e,t);return n&&(n.value=i),Z.hasSubscribers&&Z.publish(n),i}get(e,t={}){let{status:n=Z.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op=`get`,n.key=e);let i=r(K,this,ce).call(this,e,t);return n&&(i!==void 0&&(n.value=i),Z.hasSubscribers&&Z.publish(n)),i}delete(e){return r(K,this,x).call(this,e,`delete`)}clear(){return r(K,this,de).call(this,`delete`)}})}));export{Me as n,je as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-DR8-3Aex.js";import{Ht as t,K as n,at as r}from"./state-CUZTq6r0.js";import{A as i,Ft as ee,It as a,Q as o,W as s,_s as c,ls as te,m as l,nt as u,u as d,xs as ne}from"./growthbook-p4aJ_UMv.js";import{U as f,l as p,p as m,z as re}from"./debug-CjIaNjpK.js";import{i as h,m as g,v as _}from"./git-Bj8Ow4pJ.js";import{a as v,s as y}from"./privacyLevel-CRCHhztk.js";import{AF as b,Bc as ie,Gi as ae,Hc as oe,Ui as x,Zc as S,Zi as C,br as w,kF as se,rr as T,tl as ce}from"./loadAgentsDir-Bz0FfcVt.js";import{c as E,o as D,s as O,u as le}from"./debugUtils-Dsg-UHeg.js";import{a as k,i as ue,n as de,o as fe,t as A}from"./bridgeConfig-GYR-LUiu.js";import{a as j,o as M,r as N,s as P,t as F}from"./bridgeEnabled-DKqmLnKO.js";import{i as I,t as L}from"./assistant-D4-qcNT1.js";import{t as R}from"./pollConfig-C8nODJY1.js";import{a as z,i as B,n as V,t as pe}from"./createSession-CnRHI3RU.js";import{i as H,n as me}from"./envLessBridgeConfig-DJ1Sts3F.js";import{n as U,o as W}from"./mappers-DLkk0PZz.js";import{n as he,r as G,t as ge}from"./sessionTitle-Bzxk_EW9.js";import{t as _e}from"./replBridge-qeVmCJOb.js";import{hostname as ve}from"os";t(),l(),a(),x(),u(),c(),p(),v(),f(),_(),U(),S(),w(),G(),b(),k(),N(),B(),D(),H(),E();async function K(t){let{onInboundMessage:a,onPermissionResponse:c,onInterrupt:l,onSetModel:u,onSetMaxThinkingTokens:f,onSetPermissionMode:p,onStateChange:_,initialMessages:v,getMessages:y,previouslyFlushedUUIDs:b,initialName:x,perpetual:S,outboundOnly:w,tags:E}=t??{};if(le(M),!await j())return O(`not_enabled`,`[bridge:repl] Skipping: bridge not enabled`),null;if(!A())return O(`no_oauth`,`[bridge:repl] Skipping: no OAuth tokens`),_?.(`failed`,`/login`),null;if(await C(),!ae(`allow_remote_control`))return O(`policy_denied`,`[bridge:repl] Skipping: allow_remote_control policy not allowed`),_?.(`failed`,`disabled by your organization's policy`),null;if(!ue()){let e=te();if(e.bridgeOauthDeadExpiresAt!=null&&(e.bridgeOauthDeadFailCount??0)>=3&&s()?.expiresAt===e.bridgeOauthDeadExpiresAt)return m(`[bridge:repl] Skipping: cross-process backoff (dead token seen ${e.bridgeOauthDeadFailCount} times)`),null;await i();let t=s();if(t&&t.expiresAt!==null&&t.expiresAt<=Date.now()){O(`oauth_expired_unrefreshable`,`[bridge:repl] Skipping: OAuth token expired and refresh failed (re-login required)`),_?.(`failed`,`/login`);let e=t.expiresAt;return ne(t=>({...t,bridgeOauthDeadExpiresAt:e,bridgeOauthDeadFailCount:t.bridgeOauthDeadExpiresAt===e?(t.bridgeOauthDeadFailCount??0)+1:1})),null}}let D=de(),k=`remote-control-${se()}`,N=!1,B=!1;if(x)k=x,N=!0,B=!0;else{let e=r(),t=e?T(e):void 0;if(t)k=t,N=!0,B=!0;else if(v&&v.length>0)for(let e=v.length-1;e>=0;e--){let t=v[e];if(t.type!==`user`||t.isMeta||t.toolUseResult||t.isCompactSummary||t.origin&&t.origin.kind!==`human`||ce(t))continue;let n=ie(t.message.content);if(!n)continue;let r=J(n);if(r){k=r,N=!0;break}}}let H=0,U,G=0,K=(e,t,n)=>{N=!0,k=e,m(`[bridge:repl] derived title from message ${n}: ${e}`),z(t,e,{baseUrl:D,getAccessToken:A}).catch(()=>{})},q=(e,t)=>{let n=++G,i=H;he(e,AbortSignal.timeout(15e3)).then(e=>{e&&n===G&&U===t&&!T(r())&&K(e,t,i)})},Y=(e,t)=>{if(B||T(r()))return!0;if(U!==void 0&&U!==t&&(H=0),U=t,H++,H===1&&!N){let n=J(e);n&&K(n,t,H),q(e,t)}else if(H===3){let n=y?.();q(n?ge(oe(n)):e,t)}return H>=3},X=d(`tengu_bridge_initial_history_cap`,200,300*1e3),Z=fe()?`self-hosted`:await ee();if(!Z)return O(`no_org_uuid`,`[bridge:repl] Skipping: no org UUID`),_?.(`failed`,`/login`),null;if(P()&&!S){let e=await me();if(e)return O(`version_too_old`,`[bridge:repl] Skipping: ${e}`,!0),_?.(`failed`,"run `claude update` to upgrade"),null;m(`[bridge:repl] Using env-less bridge path (tengu_bridge_repl_v2)`);let{initEnvLessBridgeCore:t}=await import(`./remoteBridgeCore-BxWhTy1u.js`);return t({baseUrl:D,orgUUID:Z,title:k,getAccessToken:A,onAuth401:o,toSDKMessages:W,initialHistoryCap:X,initialMessages:v,onInboundMessage:a,onUserMessage:Y,onPermissionResponse:c,onInterrupt:l,onSetModel:u,onSetMaxThinkingTokens:f,onSetPermissionMode:p,onStateChange:_,outboundOnly:w,tags:E})}let Q=F();if(Q)return O(`version_too_old`,`[bridge:repl] Skipping: ${Q}`),_?.(`failed`,"run `claude update` to upgrade"),null;let ye=await h(),be=await g(),xe=process.env.CLAUDE_BRIDGE_SESSION_INGRESS_URL||D,$=`claude_code`;{let{isAssistantMode:t}=(I(),e(L));t()&&($=`claude_code_assistant`)}return _e({dir:n(),machineName:ve(),branch:ye,gitRepoUrl:be,title:k,baseUrl:D,sessionIngressUrl:xe,workerType:$,getAccessToken:A,createSession:e=>V({...e,events:[],baseUrl:D,getAccessToken:A}),archiveSession:e=>pe(e,{baseUrl:D,getAccessToken:A,timeoutMs:1500}).catch(e=>{m(`[bridge:repl] archiveBridgeSession threw: ${re(e)}`,{level:`error`})}),getCurrentTitle:()=>T(r())??k,onUserMessage:Y,toSDKMessages:W,onAuth401:o,getPollIntervalConfig:R,initialHistoryCap:X,initialMessages:v,previouslyFlushedUUIDs:b,onInboundMessage:a,onPermissionResponse:c,onInterrupt:l,onSetModel:u,onSetMaxThinkingTokens:f,onSetPermissionMode:p,onStateChange:_,perpetual:S})}var q=50;function J(e){let t=y(e),n=(/^(.*?[.!?])\s/.exec(t)?.[1]??t).replace(/\s+/g,` `).trim();if(n)return n.length>q?n.slice(0,q-1)+`…`:n}export{K as initReplBridge};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-DR8-3Aex.js";import{Ht as t,K as n,at as r}from"./state-CUZTq6r0.js";import{A as i,Ft as ee,It as a,Q as o,W as s,_s as c,ls as te,m as l,nt as u,u as d,xs as ne}from"./growthbook-p4aJ_UMv.js";import{U as f,l as p,p as m,z as re}from"./debug-CjIaNjpK.js";import{i as h,m as g,v as _}from"./git-Bj8Ow4pJ.js";import{a as v,s as y}from"./privacyLevel-CRCHhztk.js";import{AF as b,Bc as ie,Gi as ae,Hc as oe,Ui as x,Zc as S,Zi as C,br as w,kF as se,rr as T,tl as ce}from"./loadAgentsDir-Bz0FfcVt.js";import{c as E,o as D,s as O,u as le}from"./debugUtils-Dsg-UHeg.js";import{a as k,i as ue,n as de,o as fe,t as A}from"./bridgeConfig-GYR-LUiu.js";import{a as j,o as M,r as N,s as P,t as F}from"./bridgeEnabled-DKqmLnKO.js";import{i as I,t as L}from"./assistant-D4-qcNT1.js";import{t as R}from"./pollConfig-C8nODJY1.js";import{a as z,i as B,n as V,t as pe}from"./createSession-CnRHI3RU.js";import{i as H,n as me}from"./envLessBridgeConfig-DJ1Sts3F.js";import{n as U,o as W}from"./mappers-DLkk0PZz.js";import{n as he,r as G,t as ge}from"./sessionTitle-Bzxk_EW9.js";import{t as _e}from"./replBridge-qeVmCJOb.js";import{hostname as ve}from"os";t(),l(),a(),x(),u(),c(),p(),v(),f(),_(),U(),S(),w(),G(),b(),k(),N(),B(),D(),H(),E();async function K(t){let{onInboundMessage:a,onPermissionResponse:c,onInterrupt:l,onSetModel:u,onSetMaxThinkingTokens:f,onSetPermissionMode:p,onStateChange:_,initialMessages:v,getMessages:y,previouslyFlushedUUIDs:b,initialName:x,perpetual:S,outboundOnly:w,tags:E}=t??{};if(le(M),!await j())return O(`not_enabled`,`[bridge:repl] Skipping: bridge not enabled`),null;if(!A())return O(`no_oauth`,`[bridge:repl] Skipping: no OAuth tokens`),_?.(`failed`,`/login`),null;if(await C(),!ae(`allow_remote_control`))return O(`policy_denied`,`[bridge:repl] Skipping: allow_remote_control policy not allowed`),_?.(`failed`,`disabled by your organization's policy`),null;if(!ue()){let e=te();if(e.bridgeOauthDeadExpiresAt!=null&&(e.bridgeOauthDeadFailCount??0)>=3&&s()?.expiresAt===e.bridgeOauthDeadExpiresAt)return m(`[bridge:repl] Skipping: cross-process backoff (dead token seen ${e.bridgeOauthDeadFailCount} times)`),null;await i();let t=s();if(t&&t.expiresAt!==null&&t.expiresAt<=Date.now()){O(`oauth_expired_unrefreshable`,`[bridge:repl] Skipping: OAuth token expired and refresh failed (re-login required)`),_?.(`failed`,`/login`);let e=t.expiresAt;return ne(t=>({...t,bridgeOauthDeadExpiresAt:e,bridgeOauthDeadFailCount:t.bridgeOauthDeadExpiresAt===e?(t.bridgeOauthDeadFailCount??0)+1:1})),null}}let D=de(),k=`remote-control-${se()}`,N=!1,B=!1;if(x)k=x,N=!0,B=!0;else{let e=r(),t=e?T(e):void 0;if(t)k=t,N=!0,B=!0;else if(v&&v.length>0)for(let e=v.length-1;e>=0;e--){let t=v[e];if(t.type!==`user`||t.isMeta||t.toolUseResult||t.isCompactSummary||t.origin&&t.origin.kind!==`human`||ce(t))continue;let n=ie(t.message.content);if(!n)continue;let r=J(n);if(r){k=r,N=!0;break}}}let H=0,U,G=0,K=(e,t,n)=>{N=!0,k=e,m(`[bridge:repl] derived title from message ${n}: ${e}`),z(t,e,{baseUrl:D,getAccessToken:A}).catch(()=>{})},q=(e,t)=>{let n=++G,i=H;he(e,AbortSignal.timeout(15e3)).then(e=>{e&&n===G&&U===t&&!T(r())&&K(e,t,i)})},Y=(e,t)=>{if(B||T(r()))return!0;if(U!==void 0&&U!==t&&(H=0),U=t,H++,H===1&&!N){let n=J(e);n&&K(n,t,H),q(e,t)}else if(H===3){let n=y?.();q(n?ge(oe(n)):e,t)}return H>=3},X=d(`tengu_bridge_initial_history_cap`,200,300*1e3),Z=fe()?`self-hosted`:await ee();if(!Z)return O(`no_org_uuid`,`[bridge:repl] Skipping: no org UUID`),_?.(`failed`,`/login`),null;if(P()&&!S){let e=await me();if(e)return O(`version_too_old`,`[bridge:repl] Skipping: ${e}`,!0),_?.(`failed`,"run `claude update` to upgrade"),null;m(`[bridge:repl] Using env-less bridge path (tengu_bridge_repl_v2)`);let{initEnvLessBridgeCore:t}=await import(`./remoteBridgeCore-BxWhTy1u.js`);return t({baseUrl:D,orgUUID:Z,title:k,getAccessToken:A,onAuth401:o,toSDKMessages:W,initialHistoryCap:X,initialMessages:v,onInboundMessage:a,onUserMessage:Y,onPermissionResponse:c,onInterrupt:l,onSetModel:u,onSetMaxThinkingTokens:f,onSetPermissionMode:p,onStateChange:_,outboundOnly:w,tags:E})}let Q=F();if(Q)return O(`version_too_old`,`[bridge:repl] Skipping: ${Q}`),_?.(`failed`,"run `claude update` to upgrade"),null;let ye=await h(),be=await g(),xe=process.env.CLAUDE_BRIDGE_SESSION_INGRESS_URL||D,$=`claude_code`;{let{isAssistantMode:t}=(I(),e(L));t()&&($=`claude_code_assistant`)}return _e({dir:n(),machineName:ve(),branch:ye,gitRepoUrl:be,title:k,baseUrl:D,sessionIngressUrl:xe,workerType:$,getAccessToken:A,createSession:e=>V({...e,events:[],baseUrl:D,getAccessToken:A}),archiveSession:e=>pe(e,{baseUrl:D,getAccessToken:A,timeoutMs:1500}).catch(e=>{m(`[bridge:repl] archiveBridgeSession threw: ${re(e)}`,{level:`error`})}),getCurrentTitle:()=>T(r())??k,onUserMessage:Y,toSDKMessages:W,onAuth401:o,getPollIntervalConfig:R,initialHistoryCap:X,initialMessages:v,previouslyFlushedUUIDs:b,onInboundMessage:a,onPermissionResponse:c,onInterrupt:l,onSetModel:u,onSetMaxThinkingTokens:f,onSetPermissionMode:p,onStateChange:_,perpetual:S})}var q=50;function J(e){let t=y(e),n=(/^(.*?[.!?])\s/.exec(t)?.[1]??t).replace(/\s+/g,` `).trim();if(n)return n.length>q?n.slice(0,q-1)+`…`:n}export{K as initReplBridge};