claude-code-best 2.7.0 → 2.7.1

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 (886) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-C7od6sFQ.js +1 -0
  2. package/dist/chunks/App-EfHjElWP.js +1 -0
  3. package/dist/chunks/ApproveApiKey-CSz0291w.js +1 -0
  4. package/dist/chunks/ApproveApiKey-Cc5SaLqs.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-mLIhDlxW.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-OkUSMj0I.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-BCdft-m_.js +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-BPlrCIo-.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-BbPaorIs.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-D8fk-Ib5.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-Dyv4mI_o.js +1 -0
  12. package/dist/chunks/DesktopHandoff-BQwx7qWA.js +1 -0
  13. package/dist/chunks/DevChannelsDialog-CujM8Ivu.js +1 -0
  14. package/dist/chunks/DiffDialog-Byv1UJvS.js +3 -0
  15. package/dist/chunks/Doctor-CRrE5Sf4.js +1 -0
  16. package/dist/chunks/Doctor-Cv7wbi6C.js +3 -0
  17. package/dist/chunks/ExitFlow-DKusdm_v.js +2 -0
  18. package/dist/chunks/Feedback-Diw8XUr-.js +2 -0
  19. package/dist/chunks/Grove-CAi037VV.js +11 -0
  20. package/dist/chunks/Grove-CgX5Fdeh.js +1 -0
  21. package/dist/chunks/HybridTransport-CP0RopXu.js +4 -0
  22. package/dist/chunks/ITermBackend-RvD4VX7c.js +1 -0
  23. package/dist/chunks/InvalidConfigDialog-Bhlgysxl.js +1 -0
  24. package/dist/chunks/InvalidSettingsDialog-dGStgJZN.js +1 -0
  25. package/dist/chunks/MCPConnectionManager-D5a9ysw2.js +1 -0
  26. package/dist/chunks/McpParsingWarnings-B_z9pZ_8.js +1 -0
  27. package/dist/chunks/MessageSelector-CEvbAZGv.js +3 -0
  28. package/dist/chunks/Messages-DTmFVhRG.js +11 -0
  29. package/dist/chunks/Onboarding-BoAtphYb.js +1 -0
  30. package/dist/chunks/OverageCreditUpsell-DA7Ne7Mj.js +1 -0
  31. package/dist/chunks/PluginSettings-D3bQRsge.js +17 -0
  32. package/dist/chunks/PromptInputFooterSuggestions-DhIQ0Nge.js +1 -0
  33. package/dist/chunks/PromptInputHelpMenu-B__j9zE6.js +1 -0
  34. package/dist/chunks/QueryEngine-CMcQGyql.js +1 -0
  35. package/dist/chunks/REPL-B1BS9jwx.js +147 -0
  36. package/dist/chunks/REPL-C9f3ToGu.js +1 -0
  37. package/dist/chunks/RemoteCallout-Bwe1ESr9.js +1 -0
  38. package/dist/chunks/RemoteSessionManager-BKD4YmzY.js +2 -0
  39. package/dist/chunks/ResumeConversation-DxqbAKA4.js +1 -0
  40. package/dist/chunks/SSETransport-D3e5KNL3.js +4 -0
  41. package/dist/chunks/SearchExtraToolsTool-BVAhywUI.js +1 -0
  42. package/dist/chunks/SentryErrorBoundary-D-YZTGQG.js +2 -0
  43. package/dist/chunks/SentryErrorBoundary-M1ipwe1n.js +1 -0
  44. package/dist/chunks/Settings-D5EWYL40.js +2 -0
  45. package/dist/chunks/TeleportProgress-C3Ubx1Se.js +1 -0
  46. package/dist/chunks/TeleportRepoMismatchDialog-D_ax3xQy.js +1 -0
  47. package/dist/chunks/TeleportResumeWrapper-DeVKIXQp.js +1 -0
  48. package/dist/chunks/ThemePicker-DKmIL5Ku.js +1 -0
  49. package/dist/chunks/TmuxBackend-Bm_cRJ2x.js +9 -0
  50. package/dist/chunks/TrustDialog-ClXFMKj6.js +1 -0
  51. package/dist/chunks/TungstenTool-B40YHYXC.js +1 -0
  52. package/dist/chunks/ValidationErrorsList-SdQADfvA.js +2 -0
  53. package/dist/chunks/WelcomeV2-BijS6i2Z.js +1 -0
  54. package/dist/chunks/WindowsTerminalBackend-CGEQ5ClB.js +2 -0
  55. package/dist/chunks/add-dir-B7kleB6k.js +1 -0
  56. package/dist/chunks/agentDisplay-Dr1XbOAu.js +1 -0
  57. package/dist/chunks/agents-CpLvvWpO.js +103 -0
  58. package/dist/chunks/agents-Dy5YOJC9.js +2 -0
  59. package/dist/chunks/ant-gwf-4eGN.js +1 -0
  60. package/dist/chunks/api-BdbBnz5c.js +1 -0
  61. package/dist/chunks/api-CDmgYrwN.js +1 -0
  62. package/dist/chunks/asciicast-C_1Pi99k.js +4 -0
  63. package/dist/chunks/asciicast-DA6TudSH.js +1 -0
  64. package/dist/chunks/assistant-1usDIXtk.js +1 -0
  65. package/dist/chunks/assistant-BMviqf0l.js +1 -0
  66. package/dist/chunks/assistant-BULedprW.js +1 -0
  67. package/dist/chunks/auth-CvHVr2A5.js +1 -0
  68. package/dist/chunks/auth-ORBmEqnH.js +1 -0
  69. package/dist/chunks/autoMode-DSMM2seL.js +45 -0
  70. package/dist/chunks/autonomy-Dj6Nzxus.js +19 -0
  71. package/dist/chunks/autonomy-TtBO2TAe.js +1 -0
  72. package/dist/chunks/autonomyPanel-CbmU7lPg.js +1 -0
  73. package/dist/chunks/backgroundHousekeeping-BAvSPaZ5.js +1 -0
  74. package/dist/chunks/backgroundHousekeeping-Cp2RvmEN.js +17 -0
  75. package/dist/chunks/banner-D9Cq292T.js +2 -0
  76. package/dist/chunks/bg-CngkAkgc.js +1 -0
  77. package/dist/chunks/bg-DgpgS_VU.js +9 -0
  78. package/dist/chunks/branch-Cj5TGroO.js +3 -0
  79. package/dist/chunks/break-cache-DrIa8RdW.js +8 -0
  80. package/dist/chunks/bridge-CsqJAoEg.js +2 -0
  81. package/dist/chunks/bridgeConfig-B49H_B9L.js +1 -0
  82. package/dist/chunks/bridgeConfig-pjDV5Z2l.js +1 -0
  83. package/dist/chunks/bridgeEnabled-D9jI6X-w.js +1 -0
  84. package/dist/chunks/bridgeEnabled-DsG2JvIr.js +1 -0
  85. package/dist/chunks/bridgeMain-CNmR9iDD.js +68 -0
  86. package/dist/chunks/bridgeMain-DYCShrcV.js +1 -0
  87. package/dist/chunks/bridgeMessaging-DN0X35NX.js +1 -0
  88. package/dist/chunks/bridgePointer-Clcvh52n.js +1 -0
  89. package/dist/chunks/browser-Bt-ckCaU.js +1 -0
  90. package/dist/chunks/btw-BOg0RTKl.js +1 -0
  91. package/dist/chunks/buddy-BFuPeIxM.js +3 -0
  92. package/dist/chunks/bypassPermissionsKillswitch-kxVnIVRs.js +1 -0
  93. package/dist/chunks/caches-BsYvQnWV.js +1 -0
  94. package/dist/chunks/caches-BumkMuGA.js +3 -0
  95. package/dist/chunks/ccrClient-BI1QPLmN.js +1 -0
  96. package/dist/chunks/changeDetector-By54zja0.js +1 -0
  97. package/dist/chunks/channelNotification-CoZSFUlb.js +1 -0
  98. package/dist/chunks/channelNotification-Cx82K1CD.js +1 -0
  99. package/dist/chunks/chrome-C_5EZcdc.js +1 -0
  100. package/dist/chunks/chromeNativeHost-BldB1Zzi.js +1 -0
  101. package/dist/chunks/claudeDesktop-BqTW_pbB.js +1 -0
  102. package/dist/chunks/cleanup-rCLlo4w8.js +1 -0
  103. package/dist/chunks/clear-BQr2zTyP.js +1 -0
  104. package/dist/chunks/cliLaunch-Citfs01Q.js +1 -0
  105. package/dist/chunks/client-BbavFXJZ.js +1 -0
  106. package/dist/chunks/color-DOsgZO2n.js +1 -0
  107. package/dist/chunks/commands-CfwfGt3T.js +1 -0
  108. package/dist/chunks/commitAttribution-CH9C_hoL.js +1 -0
  109. package/dist/chunks/commitAttribution-iKd8bTOI.js +2 -0
  110. package/dist/chunks/common-Bi4yZBkh.js +1 -0
  111. package/dist/chunks/common-Da57Qwms.js +1 -0
  112. package/dist/chunks/common-NEOWMwtB.js +1 -0
  113. package/dist/chunks/compact-B6Muofhz.js +3 -0
  114. package/dist/chunks/companion-B_LrjSk5.js +1 -0
  115. package/dist/chunks/completionCache-BQgiR45Q.js +1 -0
  116. package/dist/chunks/completionCache-C7hDqIDL.js +4 -0
  117. package/dist/chunks/config-CJd9kJ57.js +1 -0
  118. package/dist/chunks/config-CQd4IkXo.js +1 -0
  119. package/dist/chunks/context-noninteractive-DCYvLxWx.js +1 -0
  120. package/dist/chunks/context-noninteractive-DZsSp-ES.js +54 -0
  121. package/dist/chunks/context-qAHTuazZ.js +1 -0
  122. package/dist/chunks/conversation-DYUVAAQt.js +1 -0
  123. package/dist/chunks/conversation-NrAy2em3.js +1 -0
  124. package/dist/chunks/copy-B2jhZndZ.js +7 -0
  125. package/dist/chunks/createSSHSession-CKdoEmAg.js +6 -0
  126. package/dist/chunks/createSession-Czx7_nf6.js +1 -0
  127. package/dist/chunks/createSession-WkBw7wdn.js +1 -0
  128. package/dist/chunks/cronJitterConfig-2u6WAlti.js +6 -0
  129. package/dist/chunks/crossProjectResume-CjJISRBQ.js +40 -0
  130. package/dist/chunks/daemon-BRKR4D1D.js +2 -0
  131. package/dist/chunks/datadog-QSR9B7CZ.js +1 -0
  132. package/dist/chunks/datadog-YsyhnDmr.js +1 -0
  133. package/dist/chunks/desktop-BN9pHpK_.js +1 -0
  134. package/dist/chunks/detached-C_2ZXr7X.js +5 -0
  135. package/dist/chunks/detectRepository-2ICvGD0U.js +1 -0
  136. package/dist/chunks/detectRepository-BLwSmun2.js +1 -0
  137. package/dist/chunks/detection-0mMj--Bt.js +1 -0
  138. package/dist/chunks/detection-95TCHkW8.js +1 -0
  139. package/dist/chunks/diff-BTtUFuf-.js +1 -0
  140. package/dist/chunks/directoryCompletion-DqtWZsoW.js +1 -0
  141. package/dist/chunks/doctor-BKBb426q.js +1 -0
  142. package/dist/chunks/earlyInput-CFYRGxau.js +2 -0
  143. package/dist/chunks/earlyInput-D3OhUZ4G.js +1 -0
  144. package/dist/chunks/effort-ClhxMqY6.js +9 -0
  145. package/dist/chunks/entry-CJlJ47nP.js +14 -0
  146. package/dist/chunks/env-C2A9gV_G.js +1 -0
  147. package/dist/chunks/envLessBridgeConfig-C9UUbQCo.js +1 -0
  148. package/dist/chunks/envLessBridgeConfig-DSJqg3Ox.js +1 -0
  149. package/dist/chunks/execFileNoThrow-azCkYhmF.js +1 -0
  150. package/dist/chunks/executor-BVh1PTF-.js +1561 -0
  151. package/dist/chunks/executor-CvTuHx-k.js +1 -0
  152. package/dist/chunks/exit-DxY3yJrp.js +1 -0
  153. package/dist/chunks/export-DS2esu8D.js +2 -0
  154. package/dist/chunks/exportRenderer-DX2L5fQ7.js +1 -0
  155. package/dist/chunks/extra-usage-DaxUQk9I.js +1 -0
  156. package/dist/chunks/extra-usage-XJxfHsbe.js +1 -0
  157. package/dist/chunks/extra-usage-core-D84ifgBo.js +1 -0
  158. package/dist/chunks/extra-usage-noninteractive-fxqxHnIt.js +1 -0
  159. package/dist/chunks/extraUsage-P_NGI1-I.js +1 -0
  160. package/dist/chunks/extractMemories-B3cTWsph.js +1 -0
  161. package/dist/chunks/fast-CHiQGMBE.js +1 -0
  162. package/dist/chunks/fast-CpN8lLnE.js +1 -0
  163. package/dist/chunks/featureCheck-CUJ2rPM6.js +1 -0
  164. package/dist/chunks/feedback-CqRsOG3c.js +1 -0
  165. package/dist/chunks/fileStateCache-BhVfo23e.js +1 -0
  166. package/dist/chunks/files-Bdr_PQyV.js +2 -0
  167. package/dist/chunks/findExecutable-BHQl4NaS.js +1 -0
  168. package/dist/chunks/firstPartyEventLogger-CM0V7Uev.js +1 -0
  169. package/dist/chunks/flushGate-DNutWuOE.js +1 -0
  170. package/dist/chunks/gates-C4JvRq4i.js +1 -0
  171. package/dist/chunks/gates-DvjyKZVA.js +1 -0
  172. package/dist/chunks/gemini-B0M6SQSG.js +1 -0
  173. package/dist/chunks/generateRecap-DhDOgXn3.js +1 -0
  174. package/dist/chunks/generateSessionName-CoFR2wgK.js +1 -0
  175. package/dist/chunks/genericProcessUtils-tJxf3yqB.js +23 -0
  176. package/dist/chunks/git-C0IuvuIy.js +6 -0
  177. package/dist/chunks/git-hSvFiuiG.js +1 -0
  178. package/dist/chunks/githubRepoPathMapping-DGiSNykv.js +1 -0
  179. package/dist/chunks/goal-DRb6pPAp.js +3 -0
  180. package/dist/chunks/grok-emDua_hT.js +1 -0
  181. package/dist/chunks/growthbook-COAneL48.js +1 -0
  182. package/dist/chunks/heapdump-CA6DHA8G.js +5 -0
  183. package/dist/chunks/help-XXY7deZm.js +1 -0
  184. package/dist/chunks/hooks-C6zZYnDi.js +79 -0
  185. package/dist/chunks/hooks-DOej0jqp.js +1 -0
  186. package/dist/chunks/hostAdapter-DZbdeXCV.js +1 -0
  187. package/dist/chunks/hostGuard-DSOEyH-P.js +1 -0
  188. package/dist/chunks/ide-BLRNkzVx.js +2 -0
  189. package/dist/chunks/inboundAttachments-60kD5Qt_.js +1 -0
  190. package/dist/chunks/inboundAttachments-BBYxcnvj.js +1 -0
  191. package/dist/chunks/initReplBridge-Dt2aQBia.js +1 -0
  192. package/dist/chunks/insights-BBugI3tW.js +822 -0
  193. package/dist/chunks/install-CuVHbwyW.js +1 -0
  194. package/dist/chunks/install-github-app-ByyzrlM9.js +147 -0
  195. package/dist/chunks/install-slack-app-CJGtmacz.js +1 -0
  196. package/dist/chunks/instrumentation-C8zvzMg1.js +12 -0
  197. package/dist/chunks/job-DBf6aPQX.js +2 -0
  198. package/dist/chunks/jwtUtils-BQXXBwqW.js +1 -0
  199. package/dist/chunks/keybindings-Bi7SMp5-.js +2 -0
  200. package/dist/chunks/lang-CVDkUhjk.js +1 -0
  201. package/dist/chunks/language-BYeqMX74.js +1 -0
  202. package/dist/chunks/language-BoKr5ylY.js +1 -0
  203. package/dist/chunks/launchAgentsPlatform-BKqxMFFn.js +1 -0
  204. package/dist/chunks/launchAutofixPr-CauX6gOB.js +18 -0
  205. package/dist/chunks/launchLocalMemory-Brrd_BJC.js +3 -0
  206. package/dist/chunks/launchLocalVault-DtAn656A.js +3 -0
  207. package/dist/chunks/launchMemoryStores-x7_Id7Yr.js +1 -0
  208. package/dist/chunks/launchOnboarding-DkamFByn.js +8 -0
  209. package/dist/chunks/launchSchedule-DjNQNxW4.js +1 -0
  210. package/dist/chunks/launchSkillStore-D2GUGhDD.js +1 -0
  211. package/dist/chunks/launchTeleport-DTfhiZkf.js +3 -0
  212. package/dist/chunks/launchVault-BZ2Po4r8.js +1 -0
  213. package/dist/chunks/loadAgentsDir-C_wFhytF.js +4697 -0
  214. package/dist/chunks/loadAgentsDir-whRB0phu.js +1 -0
  215. package/dist/chunks/loadPluginHooks-CYZjzxyO.js +1 -0
  216. package/dist/chunks/localSearch-B0p0_bjP.js +1 -0
  217. package/dist/chunks/localSearch-DAwFmV2Y.js +1 -0
  218. package/dist/chunks/log-DSV4Ht5l.js +1 -0
  219. package/dist/chunks/login-C1uE6Pg9.js +1 -0
  220. package/dist/chunks/login-DOyB64Rv.js +1 -0
  221. package/dist/chunks/logoV2Utils-BJHvwGup.js +1 -0
  222. package/dist/chunks/logout-DTPo3Myl.js +1 -0
  223. package/dist/chunks/magicDocs-DPZzG7Z2.js +57 -0
  224. package/dist/chunks/main-CNwSLti2.js +1312 -0
  225. package/dist/chunks/main-CfkIGrBF.js +31 -0
  226. package/dist/chunks/mappers-Dxs_kNJH.js +1 -0
  227. package/dist/chunks/mcp-CVnFM6nR.js +6 -0
  228. package/dist/chunks/mcp-CbDDqdzF.js +2 -0
  229. package/dist/chunks/mcp-CzfQB8BT.js +1 -0
  230. package/dist/chunks/mcpServer-BJNjQXsU.js +1 -0
  231. package/dist/chunks/mcpServer-Py4Iz9Hx.js +1 -0
  232. package/dist/chunks/memoize-DJ1XCN-z.js +1 -0
  233. package/dist/chunks/memory-BdUqEKio.js +1 -0
  234. package/dist/chunks/mobile-BMglW1NB.js +2 -0
  235. package/dist/chunks/mode-CqGusjoT.js +2 -0
  236. package/dist/chunks/model-BBULcn7y.js +1 -0
  237. package/dist/chunks/model-BOc_-7m0.js +1 -0
  238. package/dist/chunks/onChangeAppState-BkRihYau.js +1 -0
  239. package/dist/chunks/openai-yNI_zoao.js +10 -0
  240. package/dist/chunks/overageCreditGrant-Cbh0_fbM.js +1 -0
  241. package/dist/chunks/panel-BYfvo_mR.js +1 -0
  242. package/dist/chunks/panel-D3wvAEFE.js +1 -0
  243. package/dist/chunks/panelCall-t10Sud9A.js +1 -0
  244. package/dist/chunks/parser-DGXE1uWd.js +1 -0
  245. package/dist/chunks/passes-D_iS6DaC.js +1 -0
  246. package/dist/chunks/path-BE28AJwZ.js +1 -0
  247. package/dist/chunks/paths-Ci1iwL5Y.js +36 -0
  248. package/dist/chunks/permissions-BE-1pIly.js +1 -0
  249. package/dist/chunks/permissions-CHvu4-yX.js +3 -0
  250. package/dist/chunks/pipeTransport-EAYXsubu.js +1 -0
  251. package/dist/chunks/plan-CP5nq_EB.js +1 -0
  252. package/dist/chunks/platform-mh9ypxS8.js +2 -0
  253. package/dist/chunks/plugin-8apy_RBT.js +1 -0
  254. package/dist/chunks/pluginAutoupdate-ClrgF5b3.js +1 -0
  255. package/dist/chunks/pluginBlocklist-B1LVo0j_.js +1 -0
  256. package/dist/chunks/pluginCliCommands-eqyMBWcP.js +1 -0
  257. package/dist/chunks/pluginFlagging-BiTDVP10.js +1 -0
  258. package/dist/chunks/pluginOperations-gZ-iCmhu.js +2 -0
  259. package/dist/chunks/pluginStartupCheck-DCDWHam6.js +1 -0
  260. package/dist/chunks/pluginStartupCheck-EjLvCXru.js +1 -0
  261. package/dist/chunks/plugins-BAIVqfi8.js +4 -0
  262. package/dist/chunks/policyLimits-Cdp3QwZ1.js +1 -0
  263. package/dist/chunks/pollConfig-_2W7bHoW.js +1 -0
  264. package/dist/chunks/poller-BA1jhG3F.js +1 -0
  265. package/dist/chunks/poor-Dii0mpOW.js +1 -0
  266. package/dist/chunks/poorMode-DzEL0cu0.js +1 -0
  267. package/dist/chunks/poorMode-aDmmvJ_e.js +1 -0
  268. package/dist/chunks/print-BwSmcUQu.js +39 -0
  269. package/dist/chunks/privacy-settings-DaAgSLKw.js +1 -0
  270. package/dist/chunks/processBashCommand-BZ1_JKu4.js +1 -0
  271. package/dist/chunks/processSlashCommand-v1Rvzxwn.js +6 -0
  272. package/dist/chunks/projectContext-Cd7V9pES.js +1 -0
  273. package/dist/chunks/prompt-6ZKyqv6z.js +227 -0
  274. package/dist/chunks/prompt-DPqKtC0b.js +1 -0
  275. package/dist/chunks/prompt-WjMHPk90.js +1 -0
  276. package/dist/chunks/promptEditor-Dz41P-3I.js +4 -0
  277. package/dist/chunks/protocolHandler-CHGHjfdf.js +13 -0
  278. package/dist/chunks/rate-limit-options-BlU9av7g.js +1 -0
  279. package/dist/chunks/rcDebugLog-C42A0pX1.js +11 -0
  280. package/dist/chunks/referral-IIcY3jkp.js +1 -0
  281. package/dist/chunks/refresh-DTGEx7X_.js +1 -0
  282. package/dist/chunks/registerProtocol-BkNncGMI.js +36 -0
  283. package/dist/chunks/registry-CBqb7wbi.js +1 -0
  284. package/dist/chunks/release-notes-BxzOD-zP.js +4 -0
  285. package/dist/chunks/releaseNotes-C8KQGZHq.js +2 -0
  286. package/dist/chunks/reload-plugins-gYyC6_g8.js +1 -0
  287. package/dist/chunks/remote-env-CEJH5aJh.js +1 -0
  288. package/dist/chunks/remoteBridgeCore-Dte7ZUAN.js +1 -0
  289. package/dist/chunks/remoteControlServer-GN-eDbEz.js +3 -0
  290. package/dist/chunks/rename-BEU6BNRp.js +1 -0
  291. package/dist/chunks/renderOptions-Caca3bCd.js +1 -0
  292. package/dist/chunks/resume-D36S2rXg.js +2 -0
  293. package/dist/chunks/ripgrep-Bzwdi5-K.js +5 -0
  294. package/dist/chunks/ripgrep-DEa1djpJ.js +1 -0
  295. package/dist/chunks/runtimeObserver-CDMCeww2.js +1 -0
  296. package/dist/chunks/runtimeObserver-DaKaKNVW.js +10 -0
  297. package/dist/chunks/sandbox-adapter-DqTuhgud.js +1 -0
  298. package/dist/chunks/sandbox-toggle-BPO26t48.js +1 -0
  299. package/dist/chunks/searchExtraTools-Brae4wmG.js +1 -0
  300. package/dist/chunks/sentry-9EbPa1Xu.js +13 -0
  301. package/dist/chunks/session-D18B22u4.js +2 -0
  302. package/dist/chunks/sessionDiscovery-B-OTvXJf.js +1 -0
  303. package/dist/chunks/sessionFileAccessHooks-BXsK8Dwf.js +1 -0
  304. package/dist/chunks/sessionMemory-Bv-AYifm.js +1 -0
  305. package/dist/chunks/sessionMemory-Ctauybzs.js +1 -0
  306. package/dist/chunks/sessionMemoryUtils-D-bzdsAT.js +1 -0
  307. package/dist/chunks/sessionObserver-ardnTJ37.js +20 -0
  308. package/dist/chunks/sessionObserver-j8D9hidw.js +1 -0
  309. package/dist/chunks/sessionStorage-Cw5ibYWA.js +1 -0
  310. package/dist/chunks/sessionStoragePortable-CJUZrbIq.js +3 -0
  311. package/dist/chunks/sessionTitle-DEKvIVCK.js +14 -0
  312. package/dist/chunks/sessionTracing-CJUUEWZ4.js +11 -0
  313. package/dist/chunks/settingsSync-BWt3oUR7.js +1 -0
  314. package/dist/chunks/setup-BECFDOT9.js +9 -0
  315. package/dist/chunks/setup-CDxkPTCq.js +2 -0
  316. package/dist/chunks/setup-CmCTB2T_.js +1 -0
  317. package/dist/chunks/shadowedRuleDetection-BbALfdxE.js +1 -0
  318. package/dist/chunks/shellQuote-CBjhlaFO.js +1 -0
  319. package/dist/chunks/sideQuestion-BHK6dd1q.js +20 -0
  320. package/dist/chunks/sink-DFWgcGHX.js +1 -0
  321. package/dist/chunks/sink-Do5fWbUC.js +1 -0
  322. package/dist/chunks/sinks-BnkxTOU9.js +1 -0
  323. package/dist/chunks/sinks-Dc9V7k6a.js +2 -0
  324. package/dist/chunks/skill-learning-BHW9G3Dn.js +5 -0
  325. package/dist/chunks/skillChangeDetector-DwAvG835.js +1 -0
  326. package/dist/chunks/skillGapStore-DVMbI2yy.js +1 -0
  327. package/dist/chunks/skillGapStore-Wa7s6orv.js +5 -0
  328. package/dist/chunks/skillGenerator-CBuoIFsH.js +8 -0
  329. package/dist/chunks/skillLearning-BI2YDG3K.js +1 -0
  330. package/dist/chunks/skillLearning-BZMJRJPp.js +1 -0
  331. package/dist/chunks/skillPanel-2w82nkOl.js +28 -0
  332. package/dist/chunks/skillSearchPanel-7BhCBkdh.js +21 -0
  333. package/dist/chunks/skills-D5rMEo2w.js +1 -0
  334. package/dist/chunks/sprites-uNWgVZT6.js +1 -0
  335. package/dist/chunks/src-BGzuPZ5q.js +26 -0
  336. package/dist/chunks/src-kgpr3s-l.js +1 -0
  337. package/dist/chunks/startupProfiler-CAntGAbs.js +3 -0
  338. package/dist/chunks/startupProfiler-WtUzkMKV.js +1 -0
  339. package/dist/chunks/stats-D0CJB2HV.js +1 -0
  340. package/dist/chunks/status-nte1Arzy.js +1 -0
  341. package/dist/chunks/statusNoticeHelpers-Lqf99003.js +1 -0
  342. package/dist/chunks/stdio-Cg20AQ5W.js +1 -0
  343. package/dist/chunks/stickers-DDAm--86.js +1 -0
  344. package/dist/chunks/stringUtils-KZoO4GUd.js +4 -0
  345. package/dist/chunks/subprocessEnv-D4Cbyl2J.js +1 -0
  346. package/dist/chunks/systemPromptSections-CVpefuSD.js +1 -0
  347. package/dist/chunks/tag-BnvWS9HE.js +11 -0
  348. package/dist/chunks/tasks-CEs-pxkC.js +1 -0
  349. package/dist/chunks/teamHelpers-D4vCj2hP.js +1 -0
  350. package/dist/chunks/teamHelpers-D8R_gGLb.js +1 -0
  351. package/dist/chunks/teammateModeSnapshot-BDJ1JTcl.js +1 -0
  352. package/dist/chunks/teammateModeSnapshot-Bdra3VIJ.js +1 -0
  353. package/dist/chunks/teleport-RxTr4aCi.js +1 -0
  354. package/dist/chunks/templateJobs-BDKGtmr3.js +12 -0
  355. package/dist/chunks/terminalSetup-Bbvq-9Xl.js +1 -0
  356. package/dist/chunks/terminalSetup-C1X-sXwp.js +33 -0
  357. package/dist/chunks/theme-DXv6bV7f.js +1 -0
  358. package/dist/chunks/thinkback-CMsW7mvG.js +1 -0
  359. package/dist/chunks/thinkback-DRJBz3Is.js +1 -0
  360. package/dist/chunks/thinkback-play-CFdkpzlj.js +1 -0
  361. package/dist/chunks/tmux-DelKEjda.js +1 -0
  362. package/dist/chunks/toolEventObserver-CF7T7FBH.js +1 -0
  363. package/dist/chunks/toolEventObserver-DDJV8cvW.js +1 -0
  364. package/dist/chunks/toolPool-0zCdXfEu.js +1 -0
  365. package/dist/chunks/toolPool-BJv0sBnR.js +1 -0
  366. package/dist/chunks/trustedDevice-C5s2au0k.js +1 -0
  367. package/dist/chunks/trustedDevice-C9nJhhyZ.js +1 -0
  368. package/dist/chunks/tui-DoOiz2RW.js +6 -0
  369. package/dist/chunks/types-BCy5hsQR.js +1 -0
  370. package/dist/chunks/types-KeqFPzY5.js +17 -0
  371. package/dist/chunks/udsClient-CBF_cZFW.js +1 -0
  372. package/dist/chunks/ultrareviewCommand-BEv1_AS1.js +3 -0
  373. package/dist/chunks/undercover-DPVt2WN7.js +31 -0
  374. package/dist/chunks/undercover-DYa00dVv.js +1 -0
  375. package/dist/chunks/up-DaiW-V1N.js +12 -0
  376. package/dist/chunks/updateCCB-D-4naIUu.js +11 -0
  377. package/dist/chunks/upgrade-BHj8ALep.js +1 -0
  378. package/dist/chunks/upgrade-CSld83v7.js +1 -0
  379. package/dist/chunks/upload-DVlE8SRp.js +1 -0
  380. package/dist/chunks/upstreamproxy-CLf1UaJv.js +11 -0
  381. package/dist/chunks/usage-B_bY46ep.js +1 -0
  382. package/dist/chunks/usage-D4Ubnttz.js +1 -0
  383. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BHi41Ku_.js +1 -0
  384. package/dist/chunks/useMainLoopModel-D3tJJC3y.js +1 -0
  385. package/dist/chunks/useManagePlugins-B4kcqcyY.js +1 -0
  386. package/dist/chunks/useMergedTools-CTQl4cdV.js +1 -0
  387. package/dist/chunks/useSearchInput-JPayBRPC.js +1 -0
  388. package/dist/chunks/useSettingsErrors-YTgPxnRZ.js +1 -0
  389. package/dist/chunks/useTerminalSize-Du-EamDN.js +1 -0
  390. package/dist/chunks/useVoice-CaBv3G13.js +1 -0
  391. package/dist/chunks/util-Q70qdjeS.js +1 -0
  392. package/dist/chunks/utils-Cr-x1Oyd.js +1 -0
  393. package/dist/chunks/validatePlugin-6lg9B564.js +1 -0
  394. package/dist/chunks/vim-zOsQBIp4.js +1 -0
  395. package/dist/chunks/voice-DBQevAhk.js +2 -0
  396. package/dist/chunks/voice-YtzCcIoM.js +8 -0
  397. package/dist/chunks/voiceModeEnabled-CjBjjeNR.js +1 -0
  398. package/dist/chunks/voiceModeEnabled-DK6u8Aaj.js +1 -0
  399. package/dist/chunks/voiceStreamSTT-B8CTbb_6.js +1 -0
  400. package/dist/chunks/voiceStreamSTT-CCkOfmdI.js +1 -0
  401. package/dist/chunks/web-tools-CGqBqo07.js +1 -0
  402. package/dist/chunks/windowsPaths-BeDSnJ23.js +2 -0
  403. package/dist/chunks/windowsPaths-ttHiMKpR.js +1 -0
  404. package/dist/chunks/workerRegistry-Bx6FvTZF.js +1 -0
  405. package/dist/chunks/worktree-DPpgPLLG.js +1 -0
  406. package/dist/chunks/worktreeModeEnabled-RtizNgNg.js +1 -0
  407. package/dist/chunks/xml-CVF7dWfi.js +1 -0
  408. package/dist/cli.js +1 -1
  409. package/package.json +1 -1
  410. package/dist/chunks/AddWorkspaceDirectory-BqR8LhJq.js +0 -1
  411. package/dist/chunks/App-DkBMWXkK.js +0 -1
  412. package/dist/chunks/ApproveApiKey-5xd0lUV7.js +0 -1
  413. package/dist/chunks/ApproveApiKey-Dmr2VaVA.js +0 -1
  414. package/dist/chunks/AssistantSessionChooser-C7rigDkQ.js +0 -1
  415. package/dist/chunks/BackgroundTasksDialog-RtEwbumC.js +0 -2
  416. package/dist/chunks/BypassPermissionsModeDialog-7s3ULbNF.js +0 -1
  417. package/dist/chunks/ClaudeInChromeOnboarding-Bjv-sERa.js +0 -1
  418. package/dist/chunks/ClaudeMdExternalIncludesDialog-BTysDIlI.js +0 -1
  419. package/dist/chunks/ClaudeMdExternalIncludesDialog-DosNL91g.js +0 -1
  420. package/dist/chunks/ConsoleOAuthFlow-Cc1yaM-M.js +0 -1
  421. package/dist/chunks/DesktopHandoff-Cy89ZB_9.js +0 -1
  422. package/dist/chunks/DevChannelsDialog-ws8prcNK.js +0 -1
  423. package/dist/chunks/DiffDialog-BhqgxA7o.js +0 -3
  424. package/dist/chunks/Doctor-BWouB_9X.js +0 -1
  425. package/dist/chunks/Doctor-Ts5k8hn1.js +0 -3
  426. package/dist/chunks/ExitFlow-BBoImtT_.js +0 -2
  427. package/dist/chunks/Feedback-BVbSMBwY.js +0 -2
  428. package/dist/chunks/Grove-CTQrX7WO.js +0 -1
  429. package/dist/chunks/Grove-ZMHK4CBZ.js +0 -11
  430. package/dist/chunks/HybridTransport-B9g074Y1.js +0 -4
  431. package/dist/chunks/ITermBackend-DaFK8DOH.js +0 -1
  432. package/dist/chunks/InvalidConfigDialog-BkZkVKB4.js +0 -1
  433. package/dist/chunks/InvalidSettingsDialog-Lr60eQWj.js +0 -1
  434. package/dist/chunks/MCPConnectionManager-DmJ6dLOp.js +0 -1
  435. package/dist/chunks/McpParsingWarnings-CE2pQPXV.js +0 -1
  436. package/dist/chunks/MessageSelector-BT1FDbwv.js +0 -3
  437. package/dist/chunks/Messages-DT2gDtrJ.js +0 -11
  438. package/dist/chunks/Onboarding-DsqnXQel.js +0 -1
  439. package/dist/chunks/OverageCreditUpsell-UWtCrOmN.js +0 -1
  440. package/dist/chunks/PluginSettings-OJQz3d5V.js +0 -17
  441. package/dist/chunks/PromptInputFooterSuggestions-BImBB6Yk.js +0 -1
  442. package/dist/chunks/PromptInputHelpMenu-CblAb9vk.js +0 -1
  443. package/dist/chunks/QueryEngine-_re1pGHr.js +0 -1
  444. package/dist/chunks/REPL-eBTeslsR.js +0 -147
  445. package/dist/chunks/REPL-wIg0cBqS.js +0 -1
  446. package/dist/chunks/RemoteCallout-DMQai8_P.js +0 -1
  447. package/dist/chunks/RemoteSessionManager-DQmsHvj_.js +0 -2
  448. package/dist/chunks/ResumeConversation-D81hDeTl.js +0 -1
  449. package/dist/chunks/SSETransport-BbeM6bi9.js +0 -4
  450. package/dist/chunks/SearchExtraToolsTool-QbJQCWXd.js +0 -1
  451. package/dist/chunks/SentryErrorBoundary-BQJXHbWh.js +0 -2
  452. package/dist/chunks/SentryErrorBoundary-Cnw74oVG.js +0 -1
  453. package/dist/chunks/Settings-DiXc-_IG.js +0 -2
  454. package/dist/chunks/TeleportProgress-B3oRJlWH.js +0 -1
  455. package/dist/chunks/TeleportRepoMismatchDialog-GPuEipFy.js +0 -1
  456. package/dist/chunks/TeleportResumeWrapper-CcDuR6o9.js +0 -1
  457. package/dist/chunks/ThemePicker-BjSRjA_L.js +0 -1
  458. package/dist/chunks/TmuxBackend-BE3zsPKE.js +0 -9
  459. package/dist/chunks/TrustDialog-B6Qg0xUr.js +0 -1
  460. package/dist/chunks/TungstenTool-C5IqKVr0.js +0 -1
  461. package/dist/chunks/ValidationErrorsList-C5BoLiye.js +0 -2
  462. package/dist/chunks/WelcomeV2-BJAKZYz1.js +0 -1
  463. package/dist/chunks/WindowsTerminalBackend-BcwpxU2Q.js +0 -2
  464. package/dist/chunks/add-dir-OR7-VVcq.js +0 -1
  465. package/dist/chunks/agentDisplay-CMqTUh0A.js +0 -1
  466. package/dist/chunks/agents-DRtgUZ6t.js +0 -103
  467. package/dist/chunks/agents-EolUGDZB.js +0 -2
  468. package/dist/chunks/ant-Bgl31h7a.js +0 -1
  469. package/dist/chunks/api-BpQPVgif.js +0 -1
  470. package/dist/chunks/api-xFvB7WoB.js +0 -1
  471. package/dist/chunks/asciicast-CJObpRg9.js +0 -1
  472. package/dist/chunks/asciicast-Dr_Div_R.js +0 -4
  473. package/dist/chunks/assistant-CENsWvTb.js +0 -1
  474. package/dist/chunks/assistant-CHawoD04.js +0 -1
  475. package/dist/chunks/assistant-s7XNIA76.js +0 -1
  476. package/dist/chunks/auth-DX12yVM8.js +0 -1
  477. package/dist/chunks/auth-h6VL9BbC.js +0 -1
  478. package/dist/chunks/autoMode-BDzVqEPm.js +0 -45
  479. package/dist/chunks/autonomy-CeqOXzJl.js +0 -19
  480. package/dist/chunks/autonomy-D2YudQnH.js +0 -1
  481. package/dist/chunks/autonomyPanel-B0OQV4lv.js +0 -1
  482. package/dist/chunks/backgroundHousekeeping-CvHD981l.js +0 -17
  483. package/dist/chunks/backgroundHousekeeping-DMkk-QoZ.js +0 -1
  484. package/dist/chunks/banner-DNLUJFS_.js +0 -2
  485. package/dist/chunks/bg-D_H-uZDS.js +0 -9
  486. package/dist/chunks/bg-FtpmvQuT.js +0 -1
  487. package/dist/chunks/branch-D44HjlJp.js +0 -3
  488. package/dist/chunks/break-cache-ByJ7U2Ts.js +0 -8
  489. package/dist/chunks/bridge-4sldfa8u.js +0 -2
  490. package/dist/chunks/bridgeConfig-BM7iHryd.js +0 -1
  491. package/dist/chunks/bridgeConfig-CcCNsSBX.js +0 -1
  492. package/dist/chunks/bridgeEnabled-CYddgTU1.js +0 -1
  493. package/dist/chunks/bridgeEnabled-DoT2l1Oj.js +0 -1
  494. package/dist/chunks/bridgeMain-DaO51duk.js +0 -68
  495. package/dist/chunks/bridgeMain-Dc4-ZK69.js +0 -1
  496. package/dist/chunks/bridgeMessaging-IlSWKGmC.js +0 -1
  497. package/dist/chunks/bridgePointer-fFD_tbSk.js +0 -1
  498. package/dist/chunks/browser-DwnUS505.js +0 -1
  499. package/dist/chunks/btw-CrdUyRUP.js +0 -1
  500. package/dist/chunks/buddy-Ci0hdCf9.js +0 -3
  501. package/dist/chunks/bypassPermissionsKillswitch-BWOlc_sK.js +0 -1
  502. package/dist/chunks/caches-BHRJHGlc.js +0 -1
  503. package/dist/chunks/caches-CitduRKp.js +0 -3
  504. package/dist/chunks/ccrClient-yNKhQYnf.js +0 -1
  505. package/dist/chunks/changeDetector-B1tCH9Pa.js +0 -1
  506. package/dist/chunks/channelNotification-D8NPg8I8.js +0 -1
  507. package/dist/chunks/channelNotification-oE3eipDZ.js +0 -1
  508. package/dist/chunks/chrome-CwAwCY0V.js +0 -1
  509. package/dist/chunks/chromeNativeHost-63xqELw-.js +0 -1
  510. package/dist/chunks/claudeDesktop-CX1AsJie.js +0 -1
  511. package/dist/chunks/cleanup-C0gyKaOb.js +0 -1
  512. package/dist/chunks/clear-B5D08sZ0.js +0 -1
  513. package/dist/chunks/cliLaunch-8aeIk2ts.js +0 -1
  514. package/dist/chunks/client-un1k_6md.js +0 -1
  515. package/dist/chunks/color-BtVvrSvq.js +0 -1
  516. package/dist/chunks/commands--qEK1j9j.js +0 -1
  517. package/dist/chunks/commitAttribution-AEb-sE-t.js +0 -1
  518. package/dist/chunks/commitAttribution-HP_CWP0X.js +0 -2
  519. package/dist/chunks/common-BBRP_KzA.js +0 -1
  520. package/dist/chunks/common-BD4Q7osK.js +0 -1
  521. package/dist/chunks/common-C56I-_O3.js +0 -1
  522. package/dist/chunks/compact-BNhxD2UA.js +0 -3
  523. package/dist/chunks/companion-BlhNrZiL.js +0 -1
  524. package/dist/chunks/completionCache-BHSsdkBs.js +0 -1
  525. package/dist/chunks/completionCache-Daqaxlf3.js +0 -4
  526. package/dist/chunks/config-9z8716kz.js +0 -1
  527. package/dist/chunks/config-f8Cx16Z6.js +0 -1
  528. package/dist/chunks/context-BdOjhAmM.js +0 -1
  529. package/dist/chunks/context-noninteractive-CnaDbgvf.js +0 -54
  530. package/dist/chunks/context-noninteractive-DRM7gbFk.js +0 -1
  531. package/dist/chunks/conversation-B9pq-m4L.js +0 -1
  532. package/dist/chunks/conversation-DUxXVrGj.js +0 -1
  533. package/dist/chunks/copy-Cjl0-hg1.js +0 -7
  534. package/dist/chunks/createSSHSession-CYaHalxc.js +0 -6
  535. package/dist/chunks/createSession-DoR2K7ay.js +0 -1
  536. package/dist/chunks/createSession-VlSLvi7J.js +0 -1
  537. package/dist/chunks/cronJitterConfig-DjSd7nvj.js +0 -6
  538. package/dist/chunks/crossProjectResume-CDWr5DFl.js +0 -40
  539. package/dist/chunks/daemon-FAp0WyY6.js +0 -2
  540. package/dist/chunks/datadog-CahWdK03.js +0 -1
  541. package/dist/chunks/datadog-DPkKCR8M.js +0 -1
  542. package/dist/chunks/desktop-y3mzgaWo.js +0 -1
  543. package/dist/chunks/detached-Brq3-vHi.js +0 -5
  544. package/dist/chunks/detectRepository-CSN3yxkq.js +0 -1
  545. package/dist/chunks/detectRepository-CbR0WgtE.js +0 -1
  546. package/dist/chunks/detection-BPPZCanO.js +0 -1
  547. package/dist/chunks/detection-DrdKrqbQ.js +0 -1
  548. package/dist/chunks/diff-hpp0dp6U.js +0 -1
  549. package/dist/chunks/directoryCompletion-DAc3u1K2.js +0 -1
  550. package/dist/chunks/doctor-B230p0R_.js +0 -1
  551. package/dist/chunks/earlyInput-BFcdUMaX.js +0 -2
  552. package/dist/chunks/earlyInput-vv9abU2L.js +0 -1
  553. package/dist/chunks/effort-D7i2v6vd.js +0 -9
  554. package/dist/chunks/entry-Du3gtq9o.js +0 -14
  555. package/dist/chunks/env-BH-OBzcA.js +0 -1
  556. package/dist/chunks/envLessBridgeConfig-CKD4eOEe.js +0 -1
  557. package/dist/chunks/envLessBridgeConfig-DI0ouryy.js +0 -1
  558. package/dist/chunks/execFileNoThrow-B_aZH_GP.js +0 -1
  559. package/dist/chunks/executor-BJb5d6mo.js +0 -1
  560. package/dist/chunks/executor-Dmn3RTuI.js +0 -1561
  561. package/dist/chunks/exit-fntBGxEC.js +0 -1
  562. package/dist/chunks/export-Dy9M7FnZ.js +0 -2
  563. package/dist/chunks/exportRenderer-Ckv4v0ye.js +0 -1
  564. package/dist/chunks/extra-usage-DLEvlKzs.js +0 -1
  565. package/dist/chunks/extra-usage-core-3KkeQSve.js +0 -1
  566. package/dist/chunks/extra-usage-noninteractive-DUezD54f.js +0 -1
  567. package/dist/chunks/extra-usage-pU11YXHS.js +0 -1
  568. package/dist/chunks/extraUsage-B-l-oe-7.js +0 -1
  569. package/dist/chunks/extractMemories-CXarlmZp.js +0 -1
  570. package/dist/chunks/fast-BzfzSH7K.js +0 -1
  571. package/dist/chunks/fast-CbLu_WYL.js +0 -1
  572. package/dist/chunks/featureCheck-p7OeCYzj.js +0 -1
  573. package/dist/chunks/feedback-DiyZIbov.js +0 -1
  574. package/dist/chunks/fileStateCache-C7-TxF8G.js +0 -1
  575. package/dist/chunks/files-DYvAZGxp.js +0 -2
  576. package/dist/chunks/firstPartyEventLogger-Dig8Mv7_.js +0 -1
  577. package/dist/chunks/flushGate-Ci3NHOV4.js +0 -1
  578. package/dist/chunks/gates-CtkQH6jy.js +0 -1
  579. package/dist/chunks/gates-xscCu8-N.js +0 -1
  580. package/dist/chunks/gemini-BCuY2aYj.js +0 -1
  581. package/dist/chunks/generateRecap-DA0SNyFR.js +0 -1
  582. package/dist/chunks/generateSessionName-BtQ4NGXP.js +0 -1
  583. package/dist/chunks/genericProcessUtils-D-78JZxz.js +0 -23
  584. package/dist/chunks/git-BZEgupMC.js +0 -1
  585. package/dist/chunks/git-DayFjsvj.js +0 -6
  586. package/dist/chunks/githubRepoPathMapping-C5RkiJWj.js +0 -1
  587. package/dist/chunks/goal-B6GHfd9J.js +0 -3
  588. package/dist/chunks/grok-DDM6xYuy.js +0 -1
  589. package/dist/chunks/growthbook-D-Po5Uxl.js +0 -1
  590. package/dist/chunks/heapdump-DHlUfpVV.js +0 -5
  591. package/dist/chunks/help-BulgC9m7.js +0 -1
  592. package/dist/chunks/hooks-D5AcFnD1.js +0 -1
  593. package/dist/chunks/hooks-jxIrev-X.js +0 -79
  594. package/dist/chunks/hostAdapter-BvraKy0o.js +0 -1
  595. package/dist/chunks/hostGuard-CWijeIyE.js +0 -1
  596. package/dist/chunks/ide-tx4qMFln.js +0 -2
  597. package/dist/chunks/inboundAttachments-C93Q7Dvt.js +0 -1
  598. package/dist/chunks/inboundAttachments-DxcFiX4f.js +0 -1
  599. package/dist/chunks/initReplBridge-BEldrf6f.js +0 -1
  600. package/dist/chunks/insights-HEsEDeCQ.js +0 -822
  601. package/dist/chunks/install-DRsM0bJO.js +0 -1
  602. package/dist/chunks/install-github-app-BVK5Z95c.js +0 -147
  603. package/dist/chunks/install-slack-app-DCw3O2J_.js +0 -1
  604. package/dist/chunks/instrumentation-DJ-R1s8C.js +0 -12
  605. package/dist/chunks/job-CUz_OGIq.js +0 -2
  606. package/dist/chunks/jwtUtils-DVyv2jab.js +0 -1
  607. package/dist/chunks/keybindings-Chr5nGBu.js +0 -2
  608. package/dist/chunks/lang-C7kJlPIh.js +0 -1
  609. package/dist/chunks/language-CQXwoDkI.js +0 -1
  610. package/dist/chunks/language-Lx3WlBN6.js +0 -1
  611. package/dist/chunks/launchAgentsPlatform-Fsslu42L.js +0 -1
  612. package/dist/chunks/launchAutofixPr-Cww8uS_5.js +0 -18
  613. package/dist/chunks/launchLocalMemory-BywmyvSJ.js +0 -3
  614. package/dist/chunks/launchLocalVault-BU3a5NV7.js +0 -3
  615. package/dist/chunks/launchMemoryStores-QUCODCJS.js +0 -1
  616. package/dist/chunks/launchOnboarding-BriZ0oIA.js +0 -8
  617. package/dist/chunks/launchSchedule-uLm7zt_B.js +0 -1
  618. package/dist/chunks/launchSkillStore-DMo2bV8X.js +0 -1
  619. package/dist/chunks/launchTeleport-DgQWSfXM.js +0 -3
  620. package/dist/chunks/launchVault-DfnBBFne.js +0 -1
  621. package/dist/chunks/loadAgentsDir-Br5fGLLI.js +0 -4697
  622. package/dist/chunks/loadAgentsDir-DDYPdQKP.js +0 -1
  623. package/dist/chunks/loadPluginHooks-C4soqr6g.js +0 -1
  624. package/dist/chunks/localSearch-CELyiWF6.js +0 -1
  625. package/dist/chunks/localSearch-DhZMcy5t.js +0 -1
  626. package/dist/chunks/log-DS97_rIr.js +0 -1
  627. package/dist/chunks/login-CvvIpkpq.js +0 -1
  628. package/dist/chunks/login-DjgITOAw.js +0 -1
  629. package/dist/chunks/logoV2Utils-BN_HrHSc.js +0 -1
  630. package/dist/chunks/logout-DOFJpZEJ.js +0 -1
  631. package/dist/chunks/magicDocs-2Zr7bYY_.js +0 -57
  632. package/dist/chunks/main-BafHJuKH.js +0 -31
  633. package/dist/chunks/main-D61CvHRy.js +0 -1312
  634. package/dist/chunks/mappers-BCiceNt3.js +0 -1
  635. package/dist/chunks/mcp-BV4m1Gbl.js +0 -2
  636. package/dist/chunks/mcp-CrAgAK9u.js +0 -1
  637. package/dist/chunks/mcp-DK4m73gO.js +0 -6
  638. package/dist/chunks/mcpServer-7zyXl9Wg.js +0 -1
  639. package/dist/chunks/mcpServer-sa9Z183j.js +0 -1
  640. package/dist/chunks/memoize-CPexXTP7.js +0 -1
  641. package/dist/chunks/memory-BrJPVgxn.js +0 -1
  642. package/dist/chunks/mobile-Cydobb55.js +0 -2
  643. package/dist/chunks/mode-Cr-NTlRa.js +0 -2
  644. package/dist/chunks/model-CCjuMV6k.js +0 -1
  645. package/dist/chunks/model-aJS_plgM.js +0 -1
  646. package/dist/chunks/onChangeAppState-C9EvI3EH.js +0 -1
  647. package/dist/chunks/openai-Cvb_-1A-.js +0 -10
  648. package/dist/chunks/overageCreditGrant-cGQilawd.js +0 -1
  649. package/dist/chunks/panel-ByW1omJn.js +0 -1
  650. package/dist/chunks/panel-DO_faHV-.js +0 -1
  651. package/dist/chunks/panelCall-DqZuxAf0.js +0 -1
  652. package/dist/chunks/parser-DbKSpFRq.js +0 -1
  653. package/dist/chunks/passes-DsrceO14.js +0 -1
  654. package/dist/chunks/path-nCzt96pE.js +0 -1
  655. package/dist/chunks/paths-DfGsIjPm.js +0 -39
  656. package/dist/chunks/permissions-CjPIu4IE.js +0 -3
  657. package/dist/chunks/permissions-Ps_D01ZB.js +0 -1
  658. package/dist/chunks/pipeTransport-C5u1K0wu.js +0 -1
  659. package/dist/chunks/plan-YjMAcn6g.js +0 -1
  660. package/dist/chunks/platform-DYZVoA9J.js +0 -2
  661. package/dist/chunks/plugin-Oux5bBQj.js +0 -1
  662. package/dist/chunks/pluginAutoupdate-Dl9U-fbk.js +0 -1
  663. package/dist/chunks/pluginBlocklist-BzI5DNeN.js +0 -1
  664. package/dist/chunks/pluginCliCommands-CExAcsaR.js +0 -1
  665. package/dist/chunks/pluginFlagging-BeqrbhgG.js +0 -1
  666. package/dist/chunks/pluginOperations-s0FQGOBm.js +0 -2
  667. package/dist/chunks/pluginStartupCheck-BVag9B-T.js +0 -1
  668. package/dist/chunks/pluginStartupCheck-BuorUEEf.js +0 -1
  669. package/dist/chunks/plugins-DTQHVJtY.js +0 -4
  670. package/dist/chunks/policyLimits-zoyF_6O4.js +0 -1
  671. package/dist/chunks/pollConfig-C19GiX7i.js +0 -1
  672. package/dist/chunks/poller-DADqVTWi.js +0 -1
  673. package/dist/chunks/poor-Bx5vvamq.js +0 -1
  674. package/dist/chunks/poorMode-BCoeB5zB.js +0 -1
  675. package/dist/chunks/poorMode-CTd_csCl.js +0 -1
  676. package/dist/chunks/print-UXl3rG8y.js +0 -39
  677. package/dist/chunks/privacy-settings-e43D9a4o.js +0 -1
  678. package/dist/chunks/processBashCommand-CvR9-gf8.js +0 -1
  679. package/dist/chunks/processSlashCommand-CB3wyAX7.js +0 -6
  680. package/dist/chunks/projectContext-D3_u80TY.js +0 -1
  681. package/dist/chunks/prompt-53lRY98R.js +0 -1
  682. package/dist/chunks/prompt-B8M-HLIS.js +0 -227
  683. package/dist/chunks/prompt-CooZNM1u.js +0 -1
  684. package/dist/chunks/promptEditor-CHiopfD7.js +0 -4
  685. package/dist/chunks/protocolHandler-DjivYn8H.js +0 -13
  686. package/dist/chunks/rate-limit-options-B-vndk5W.js +0 -1
  687. package/dist/chunks/rcDebugLog-BoroyfjB.js +0 -11
  688. package/dist/chunks/referral-DOqhciQu.js +0 -1
  689. package/dist/chunks/refresh-C8uLznwm.js +0 -1
  690. package/dist/chunks/registerProtocol-4lQ7O4Cc.js +0 -36
  691. package/dist/chunks/registry-q6v98JYd.js +0 -1
  692. package/dist/chunks/release-notes-C7JHshX3.js +0 -4
  693. package/dist/chunks/releaseNotes-CXY-xAja.js +0 -2
  694. package/dist/chunks/reload-plugins-DLS5lQcc.js +0 -1
  695. package/dist/chunks/remote-env-DhHea8yK.js +0 -1
  696. package/dist/chunks/remoteBridgeCore-BhOLhQIA.js +0 -1
  697. package/dist/chunks/remoteControlServer-CI0F83pg.js +0 -3
  698. package/dist/chunks/rename-DiKWWCzB.js +0 -1
  699. package/dist/chunks/renderOptions-DKe32LfM.js +0 -1
  700. package/dist/chunks/resume-DA4ToJFW.js +0 -2
  701. package/dist/chunks/runtimeObserver-BfVC8KK9.js +0 -1
  702. package/dist/chunks/runtimeObserver-DetZ5Tek.js +0 -10
  703. package/dist/chunks/sandbox-adapter-wh4cKN45.js +0 -1
  704. package/dist/chunks/sandbox-toggle-D8MgV0DT.js +0 -1
  705. package/dist/chunks/searchExtraTools-DbPpcAPw.js +0 -1
  706. package/dist/chunks/sentry-C3sL9nhF.js +0 -13
  707. package/dist/chunks/session-Bd-4QCqc.js +0 -2
  708. package/dist/chunks/sessionDiscovery-D_KPF86E.js +0 -1
  709. package/dist/chunks/sessionFileAccessHooks-COne5L2E.js +0 -1
  710. package/dist/chunks/sessionMemory-0Jqo1_MV.js +0 -1
  711. package/dist/chunks/sessionMemory-BDt_8bNB.js +0 -1
  712. package/dist/chunks/sessionMemoryUtils-BFIJ1nqF.js +0 -1
  713. package/dist/chunks/sessionObserver-CEky1SLb.js +0 -1
  714. package/dist/chunks/sessionObserver-CQxIKV8D.js +0 -20
  715. package/dist/chunks/sessionStorage-D1XhqZyW.js +0 -1
  716. package/dist/chunks/sessionStoragePortable-DJZ_6cL8.js +0 -3
  717. package/dist/chunks/sessionTitle-CB0ZEkS_.js +0 -14
  718. package/dist/chunks/sessionTracing-BIKXLTJZ.js +0 -11
  719. package/dist/chunks/settingsSync-pI3L3CeR.js +0 -1
  720. package/dist/chunks/setup-BSi50fkU.js +0 -1
  721. package/dist/chunks/setup-DjsmjRKQ.js +0 -2
  722. package/dist/chunks/setup-Dq0_SRA1.js +0 -9
  723. package/dist/chunks/shadowedRuleDetection-DvAjOOPL.js +0 -1
  724. package/dist/chunks/shellQuote-D8XPeqkc.js +0 -1
  725. package/dist/chunks/sideQuestion-BrTA8ooG.js +0 -20
  726. package/dist/chunks/sink-CqWxcRl9.js +0 -1
  727. package/dist/chunks/sink-Dkat5kH9.js +0 -1
  728. package/dist/chunks/sinks--frMI4-5.js +0 -2
  729. package/dist/chunks/sinks-CvPAVcMY.js +0 -1
  730. package/dist/chunks/skill-learning-2LV0yuwF.js +0 -5
  731. package/dist/chunks/skillChangeDetector-B5CGPl7e.js +0 -1
  732. package/dist/chunks/skillGapStore-Dc29T-OG.js +0 -1
  733. package/dist/chunks/skillGapStore-KzRf6Ezr.js +0 -5
  734. package/dist/chunks/skillGenerator-BdOHsgc4.js +0 -8
  735. package/dist/chunks/skillLearning-CdcVIG14.js +0 -1
  736. package/dist/chunks/skillLearning-DXWMxSA2.js +0 -1
  737. package/dist/chunks/skillPanel-zMY8o-86.js +0 -28
  738. package/dist/chunks/skillSearchPanel-l8aolUP8.js +0 -21
  739. package/dist/chunks/skills-BeMWJPup.js +0 -1
  740. package/dist/chunks/sprites-qel_EgTP.js +0 -1
  741. package/dist/chunks/src-BIPP3_mo.js +0 -26
  742. package/dist/chunks/src-DJXKJavk.js +0 -1
  743. package/dist/chunks/startupProfiler-CnDpob1v.js +0 -3
  744. package/dist/chunks/startupProfiler-TrMfE6Q4.js +0 -1
  745. package/dist/chunks/stats-CEBfahqM.js +0 -1
  746. package/dist/chunks/status-C9KXyfDk.js +0 -1
  747. package/dist/chunks/statusNoticeHelpers-CxoN9oDh.js +0 -1
  748. package/dist/chunks/stdio-BEEzuxaZ.js +0 -1
  749. package/dist/chunks/stickers-eHrGA1W5.js +0 -1
  750. package/dist/chunks/subprocessEnv-CggQWZCx.js +0 -1
  751. package/dist/chunks/systemPromptSections-DB93ZNWP.js +0 -1
  752. package/dist/chunks/tag-Dvl7Us9y.js +0 -11
  753. package/dist/chunks/tasks-BhiwUF0n.js +0 -1
  754. package/dist/chunks/teamHelpers-COQazluD.js +0 -1
  755. package/dist/chunks/teamHelpers-Mgfrv-Jf.js +0 -1
  756. package/dist/chunks/teammateModeSnapshot-8EWjlA-s.js +0 -1
  757. package/dist/chunks/teammateModeSnapshot-BV-P8s5r.js +0 -1
  758. package/dist/chunks/teleport-U5Zgqw3H.js +0 -1
  759. package/dist/chunks/templateJobs-C3idypN_.js +0 -12
  760. package/dist/chunks/terminalSetup-CmAEgt-5.js +0 -33
  761. package/dist/chunks/terminalSetup-mvAN4no7.js +0 -1
  762. package/dist/chunks/theme-BD2H4vJi.js +0 -1
  763. package/dist/chunks/thinkback-BOByXYp2.js +0 -1
  764. package/dist/chunks/thinkback-Dzu2mnNF.js +0 -1
  765. package/dist/chunks/thinkback-play-BX1K2UMY.js +0 -1
  766. package/dist/chunks/tmux-DruHFjDy.js +0 -1
  767. package/dist/chunks/toolEventObserver-B6cLV_dK.js +0 -1
  768. package/dist/chunks/toolEventObserver-i6it3p2_.js +0 -1
  769. package/dist/chunks/toolPool--2gNFbrz.js +0 -1
  770. package/dist/chunks/toolPool-dNV2JxUI.js +0 -1
  771. package/dist/chunks/trustedDevice-DY8OosTr.js +0 -1
  772. package/dist/chunks/trustedDevice-zya_Ml1N.js +0 -1
  773. package/dist/chunks/tui-KoYD82tT.js +0 -6
  774. package/dist/chunks/types-CQ1wrnQ0.js +0 -1
  775. package/dist/chunks/types-D5R26wwH.js +0 -17
  776. package/dist/chunks/udsClient-RkYuzeZC.js +0 -1
  777. package/dist/chunks/ultrareviewCommand-CCkKby4J.js +0 -3
  778. package/dist/chunks/undercover-CIutVLEO.js +0 -1
  779. package/dist/chunks/undercover-D9O2McNG.js +0 -31
  780. package/dist/chunks/up-BPM85EYl.js +0 -12
  781. package/dist/chunks/updateCCB-Bmn3Y63Y.js +0 -11
  782. package/dist/chunks/upgrade-D3rVOeHO.js +0 -1
  783. package/dist/chunks/upgrade-Dq3l14ZY.js +0 -1
  784. package/dist/chunks/upload-1PmElPfW.js +0 -1
  785. package/dist/chunks/upstreamproxy-BBTSJnad.js +0 -11
  786. package/dist/chunks/usage-B5G8FOZ3.js +0 -1
  787. package/dist/chunks/usage-VtTu7beE.js +0 -1
  788. package/dist/chunks/useMainLoopModel-CaQLIr1V.js +0 -1
  789. package/dist/chunks/useManagePlugins-BvoeOnqq.js +0 -1
  790. package/dist/chunks/useMergedTools-C133BfRp.js +0 -1
  791. package/dist/chunks/useSearchInput-CROB7AbC.js +0 -1
  792. package/dist/chunks/useSettingsErrors-DRxtFXoe.js +0 -1
  793. package/dist/chunks/useVoice-BQ9aSFJe.js +0 -1
  794. package/dist/chunks/util-BZnJgF79.js +0 -1
  795. package/dist/chunks/utils-4gsxQpga.js +0 -1
  796. package/dist/chunks/validatePlugin-DlrnBhPA.js +0 -1
  797. package/dist/chunks/vim-BXQCLoFJ.js +0 -1
  798. package/dist/chunks/voice-CeRmLRHT.js +0 -2
  799. package/dist/chunks/voice-QHyDff3f.js +0 -8
  800. package/dist/chunks/voiceModeEnabled-Bq_rttkL.js +0 -1
  801. package/dist/chunks/voiceModeEnabled-CLAVCVLW.js +0 -1
  802. package/dist/chunks/voiceStreamSTT-BDKenO5F.js +0 -1
  803. package/dist/chunks/voiceStreamSTT-CL52x8wZ.js +0 -1
  804. package/dist/chunks/windowsPaths-43st5EQF.js +0 -1
  805. package/dist/chunks/windowsPaths-DerzGPcz.js +0 -2
  806. package/dist/chunks/workerRegistry-BUD3lBk_.js +0 -1
  807. package/dist/chunks/worktree-C0f9Ke-R.js +0 -1
  808. package/dist/chunks/worktreeModeEnabled-THQb19xR.js +0 -1
  809. package/dist/chunks/xml-DvVQHZ1N.js +0 -1
  810. /package/dist/chunks/{Dialog-DYFGqyDs.js → Dialog-91X6ZGg9.js} +0 -0
  811. /package/dist/chunks/{InProcessTransport-B0mmAoxw.js → InProcessTransport-B9II3BiO.js} +0 -0
  812. /package/dist/chunks/{ListItem-OFARanN7.js → ListItem-DCQhApdJ.js} +0 -0
  813. /package/dist/chunks/{PermissionDialog-5MlJf7ew.js → PermissionDialog-_WQPRYHQ.js} +0 -0
  814. /package/dist/chunks/{PressEnterToContinue-BdA9zDGs.js → PressEnterToContinue-BJ58eCFC.js} +0 -0
  815. /package/dist/chunks/{SearchBox-DfOmUoaI.js → SearchBox-CkO4rQ-9.js} +0 -0
  816. /package/dist/chunks/{TungstenTool-V-Bwqlx3.js → TungstenTool-CnAF4y0E.js} +0 -0
  817. /package/dist/chunks/{attributionHooks-DZJjA8p9.js → attributionHooks-VGSpz4mk.js} +0 -0
  818. /package/dist/chunks/{attributionTrailer-CZY9XTcr.js → attributionTrailer-C8uqiLIb.js} +0 -0
  819. /package/dist/chunks/{autoModeDenials-CGAtAGGf.js → autoModeDenials-DlO5g6E9.js} +0 -0
  820. /package/dist/chunks/{bedrockClient-DZgaJTHp.js → bedrockClient-BUmO2U-X.js} +0 -0
  821. /package/dist/chunks/{capacityWake-BXlUpptF.js → capacityWake-DtmDHwEt.js} +0 -0
  822. /package/dist/chunks/{ccshareResume-CZggHNOf.js → ccshareResume-DKwcd0Vc.js} +0 -0
  823. /package/dist/chunks/{computerUseLock-BoEK9xYv.js → computerUseLock-Diig5B8p.js} +0 -0
  824. /package/dist/chunks/{connectHeadless-KNT0Sg7Z.js → connectHeadless-ByewVfOb.js} +0 -0
  825. /package/dist/chunks/{constants-41VpZw2G.js → constants-BljlAJOX.js} +0 -0
  826. /package/dist/chunks/{controlMessageCompat-BJhFiS7u.js → controlMessageCompat-Ds-CF-sM.js} +0 -0
  827. /package/dist/chunks/{cron-DiW7eIPP.js → cron-g_P3I5uT.js} +0 -0
  828. /package/dist/chunks/{dangerousBackend-ByOAEFld.js → dangerousBackend-Dkjtndh1.js} +0 -0
  829. /package/dist/chunks/{debugUtils-CiEnbhiz.js → debugUtils-l8nsUZ6R.js} +0 -0
  830. /package/dist/chunks/{distRoot-CcxmnzqQ.js → distRoot-BNg_iO5-.js} +0 -0
  831. /package/dist/chunks/{escHotkey-DfdC44i7.js → escHotkey-D8WgbSyj.js} +0 -0
  832. /package/dist/chunks/{esm-C-1qL9Mn.js → esm-vlR7mK5b.js} +0 -0
  833. /package/dist/chunks/{eventLoopStallDetector-l83_98VR.js → eventLoopStallDetector-bYy0fesH.js} +0 -0
  834. /package/dist/chunks/{exit-_obETqBv.js → exit-DOBLl8jN.js} +0 -0
  835. /package/dist/chunks/{featureCheck-Cm0YNDXO.js → featureCheck-j7P30mry.js} +0 -0
  836. /package/dist/chunks/{fpsMetrics-DOI_SIeY.js → fpsMetrics-DKWp7vng.js} +0 -0
  837. /package/dist/chunks/{fuse-Bp7rmZ5x.js → fuse-D3B-UE5Y.js} +0 -0
  838. /package/dist/chunks/{hash-BRmOQc3c.js → hash-CaUkS-30.js} +0 -0
  839. /package/dist/chunks/{index.min-BJnb9GQI.js → index.min-BNgJ2wVD.js} +0 -0
  840. /package/dist/chunks/{instinctParser-Bxhe2LOF.js → instinctParser-DOtj1Kni.js} +0 -0
  841. /package/dist/chunks/{intl-Pse97ORk.js → intl-CLeE9DsD.js} +0 -0
  842. /package/dist/chunks/{launchCommand-Du91jxMC.js → launchCommand-9eYsPG7W.js} +0 -0
  843. /package/dist/chunks/{lazySchema-2sOku3cX.js → lazySchema-B0QShMaQ.js} +0 -0
  844. /package/dist/chunks/{lib-B4Q0Nrpb.js → lib-Cf16LgKj.js} +0 -0
  845. /package/dist/chunks/{lockfile-CeCEBLtN.js → lockfile-C3JsqLpb.js} +0 -0
  846. /package/dist/chunks/{modalContext-CmSKRyea.js → modalContext-c5Yqx_CQ.js} +0 -0
  847. /package/dist/chunks/{normalization-Cox8C0dP.js → normalization-BLfP0Kqt.js} +0 -0
  848. /package/dist/chunks/{observationStore-BaPq7CKI.js → observationStore-rLlDwRtG.js} +0 -0
  849. /package/dist/chunks/{openaiShared-Crt0cZLO.js → openaiShared-C-AuktRP.js} +0 -0
  850. /package/dist/chunks/{output-style-BkOnFmfe.js → output-style-B64-Zum6.js} +0 -0
  851. /package/dist/chunks/{parseConnectUrl-BFNiff4c.js → parseConnectUrl-DL390ePs.js} +0 -0
  852. /package/dist/chunks/{parser-BXWr_mLL.js → parser-aIWfAYnt.js} +0 -0
  853. /package/dist/chunks/{permissions-DXLfdE7b.js → permissions-BsVJvaEe.js} +0 -0
  854. /package/dist/chunks/{postCommitAttribution-CA9Z2sqn.js → postCommitAttribution-D8MoHFoz.js} +0 -0
  855. /package/dist/chunks/{projectContext-CwJlxP2Y.js → projectContext-Dn7umMp6.js} +0 -0
  856. /package/dist/chunks/{prompt-4tea6NJQ.js → prompt-IqfIbvg9.js} +0 -0
  857. /package/dist/chunks/{proxy-nPT6a6QY.js → proxy-CF7ZDxaW.js} +0 -0
  858. /package/dist/chunks/{rewind-DTk4TFYB.js → rewind-Djt1zU_3.js} +0 -0
  859. /package/dist/chunks/{rollback-DbSpxmJE.js → rollback-CtS4yEQx.js} +0 -0
  860. /package/dist/chunks/{sanitization-DD414_3t.js → sanitization-Ds6zRQyx.js} +0 -0
  861. /package/dist/chunks/{sdkHeapDumpMonitor-fNRF2fbK.js → sdkHeapDumpMonitor-DLMMNeqo.js} +0 -0
  862. /package/dist/chunks/{semver-Tw0AFar5.js → semver-Di5OaTd5.js} +0 -0
  863. /package/dist/chunks/{server-DTd90dmm.js → server-DONKdvGc.js} +0 -0
  864. /package/dist/chunks/{serverBanner-B7UaaCCl.js → serverBanner-DIyjgIM-.js} +0 -0
  865. /package/dist/chunks/{serverLog-DRvGpDtt.js → serverLog-D1N5yx8A.js} +0 -0
  866. /package/dist/chunks/{sessionDataUploader-BDsz_1Uy.js → sessionDataUploader-CsNePsOb.js} +0 -0
  867. /package/dist/chunks/{sessionManager-Bh-Z-YXy.js → sessionManager-BOmgJd1l.js} +0 -0
  868. /package/dist/chunks/{slashCommandParsing-Cari0pNg.js → slashCommandParsing-BfanVchF.js} +0 -0
  869. /package/dist/chunks/{sleep-8Eb9j_Ly.js → sleep-C6koP5Ka.js} +0 -0
  870. /package/dist/chunks/{src-x7u_sB6m.js → src-BWpNn6Yz.js} +0 -0
  871. /package/dist/chunks/{src-BRAdBA8A.js → src-C-Ho8kYe.js} +0 -0
  872. /package/dist/chunks/{src-BlLavFUS.js → src-Cu58IYYb.js} +0 -0
  873. /package/dist/chunks/{src-CI_jaaBj.js → src-d2UJ68oX.js} +0 -0
  874. /package/dist/chunks/{state-Ce1HlR-H.js → state-BiRT9RAF.js} +0 -0
  875. /package/dist/chunks/{staticRender-Br64h1E1.js → staticRender-C5v46np_.js} +0 -0
  876. /package/dist/chunks/{stdio-D4cT86R0.js → stdio-Oy68T2eE.js} +0 -0
  877. /package/dist/chunks/{store-DhI7Lcan.js → store-DYC8zeL1.js} +0 -0
  878. /package/dist/chunks/{subprocessEnv-DV6q6o6w.js → subprocessEnv-DIeTJ-xE.js} +0 -0
  879. /package/dist/chunks/{systemPromptSections-BcN_XBTx.js → systemPromptSections-DY7epA2Y.js} +0 -0
  880. /package/dist/chunks/{systemTheme-dDbitcxB.js → systemTheme-eRWGHYSL.js} +0 -0
  881. /package/dist/chunks/{teammate-DMYOtLTK.js → teammate-CbskW5G9.js} +0 -0
  882. /package/dist/chunks/{types-RJTEOuIt.js → types-C0nqJFkV.js} +0 -0
  883. /package/dist/chunks/{useKeybinding-FsOnjW6T.js → useKeybinding-DPOUuymz.js} +0 -0
  884. /package/dist/chunks/{workSecret-qRMNrQy2.js → workSecret-DJu7k30X.js} +0 -0
  885. /package/dist/chunks/{worktreeModeEnabled-Db6b_Iy_.js → worktreeModeEnabled-KtHEqeFA.js} +0 -0
  886. /package/dist/chunks/{xdg-CBxMmQux.js → xdg-BFD9ydDV.js} +0 -0
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{Cl as r,wl as i}from"./paths-DfGsIjPm.js";import{CE as a,Ot as o,Sd as s,TE as c,Tt as l,xd as u}from"./loadAgentsDir-Br5fGLLI.js";import{n as d,t as f}from"./ExitFlow-BBoImtT_.js";import{spawnSync as p}from"child_process";function m(){return i(_)??`Goodbye!`}async function h(e){if(s())return e(),p(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let t=l()!==null;return t?(0,g.jsx)(f,{showWorktree:t,onDone:e,onCancel:()=>e()}):(e(m()),await a(0,`prompt_input_exit`),null)}var g,_;e((()=>{r(),t(),d(),u(),c(),o(),g=n(),_=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{h as call};
@@ -1,2 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,f as a,g as o,h as s,t as c,tn as l,tt as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{A as p,E as m}from"./debug-otxXY3j-.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{DC as _,EC as v,aS as y,dS as b,fS as x,hT as S,oS as C}from"./loadAgentsDir-Br5fGLLI.js";import{t as w}from"./useKeybinding-FsOnjW6T.js";import{n as T,t as E}from"./exportRenderer-Ckv4v0ye.js";import{join as D}from"path";function O({content:e,defaultFilename:t,onDone:r}){let[,c]=(0,k.useState)(null),[f,m]=(0,k.useState)(t),[h,_]=(0,k.useState)(t.length),[x,S]=(0,k.useState)(!1),{columns:C}=n(),w=(0,k.useCallback)(()=>{S(!1),c(null)},[]),T=async t=>{if(t===`clipboard`){let t=await l(e);t&&process.stdout.write(t),r({success:!0,message:`Conversation copied to clipboard`})}else t===`file`&&(c(`file`),S(!0))},E=()=>{let t=f.endsWith(`.txt`)?f:f.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{p(n,e,{encoding:`utf-8`,flush:!0}),r({success:!0,message:`Conversation exported to: ${n}`})}catch(e){r({success:!1,message:`Failed to export conversation: ${e instanceof Error?e.message:`Unknown error`}`})}},O=(0,k.useCallback)(()=>{x?w():r({success:!1,message:`Export cancelled`})},[x,w,r]),j=[{label:`Copy to clipboard`,value:`clipboard`,description:`Copy the conversation to your system clipboard`},{label:`Save to file`,value:`file`,description:`Save the conversation to a file in the current directory`}];function M(e){return x?(0,A.jsxs)(s,{children:[(0,A.jsx)(o,{shortcut:`Enter`,action:`save`}),(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}):e.pending?(0,A.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):(0,A.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})}return u(`confirm:no`,O,{context:`Settings`,isActive:x}),(0,A.jsx)(a,{title:`Export Conversation`,subtitle:`Select export method:`,color:`permission`,onCancel:O,inputGuide:M,isCancelActive:!x,children:x?(0,A.jsxs)(d,{flexDirection:`column`,children:[(0,A.jsx)(i,{children:`Enter filename:`}),(0,A.jsxs)(d,{flexDirection:`row`,gap:1,marginTop:1,children:[(0,A.jsx)(i,{children:`>`}),(0,A.jsx)(b,{value:f,onChange:m,onSubmit:E,focus:!0,showCursor:!0,columns:C,cursorOffset:h,onChangeCursorOffset:_})]})]}):(0,A.jsx)(y,{options:j,onChange:T,onCancel:O})})}var k,A,j=e((()=>{k=t(r(),1),S(),c(),w(),h(),m(),_(),C(),x(),A=f()}));function M(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}-${String(e.getHours()).padStart(2,`0`)}${String(e.getMinutes()).padStart(2,`0`)}${String(e.getSeconds()).padStart(2,`0`)}`}function N(e){let t=e.find(e=>e.type===`user`);if(!t||t.type!==`user`)return``;let n=t.message?.content,r=``;if(typeof n==`string`)r=n.trim();else if(Array.isArray(n)){let e=n.find(e=>e.type===`text`);e&&`text`in e&&(r=e.text.trim())}return r=r.split(`
2
- `)[0]||``,r.length>50&&(r=r.substring(0,49)+`…`),r}function P(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)}async function F(e){let t=e.options.tools||[];return T(e.messages,t)}async function I(e,t,n){let r=await F(t),i=n.trim();if(i){let t=i.endsWith(`.txt`)?i:i.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{return p(n,r,{encoding:`utf-8`,flush:!0}),e(`Conversation exported to: ${n}`),null}catch(t){return e(`Failed to export conversation: ${t instanceof Error?t.message:`Unknown error`}`),null}}let a=N(t.messages),o=M(new Date),s;if(a){let e=P(a);s=e?`${o}-${e}.txt`:`conversation-${o}.txt`}else s=`conversation-${o}.txt`;return(0,L.jsx)(O,{content:r,defaultFilename:s,onDone:t=>{e(t.message)}})}var L;e((()=>{r(),j(),h(),E(),m(),L=f()}))();export{I as call,N as extractFirstPrompt,P as sanitizeFilename};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,Tn as r,rt as i,wn as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{AT as s,IT as c,RT as l,cC as u,lC as d}from"./loadAgentsDir-Br5fGLLI.js";import{n as f,t as p}from"./staticRender-Br64h1E1.js";import{n as m,t as h}from"./Messages-DT2gDtrJ.js";function g({children:e}){let{bindings:t}=l(),n=(0,b.useRef)(null),r=(0,b.useRef)(new Map),a=(0,b.useRef)(new Set).current;return(0,x.jsx)(i,{bindings:t,pendingChordRef:n,pendingChord:null,setPendingChord:()=>{},activeContexts:a,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:r,children:e})}function _(e){if(!(`message`in e))return 1;let t=e.message.content;return Array.isArray(t)?t.length:1}async function v(e,t,n,{columns:i,verbose:a=!1,chunkSize:o=40,onProgress:s}={}){let c=n=>f((0,x.jsx)(u,{children:(0,x.jsx)(g,{children:(0,x.jsx)(h,{messages:e,tools:t,commands:[],verbose:a,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:`export`,screen:`prompt`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:n})})}),i),l=o;for(let t of e)l+=_(t);for(let e=0;e<l;e+=o){let t=await c([e,e+o]);if(r(t).trim()===``)break;await n(t),s?.(e+o)}}async function y(e,t=[],n){let i=[];return await v(e,t,e=>void i.push(r(e)),{columns:n}),i.join(``)}var b,x,S=e((()=>{b=t(n(),1),a(),m(),s(),c(),d(),p(),x=o()}));export{y as n,S as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./extra-usage-core-3KkeQSve.js";import{r as a,t as o}from"./login-CvvIpkpq.js";async function s(e,t){let n=await r();return n.type===`message`?(e(n.value),null):(0,c.jsx)(o,{startingMessage:`Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.`,onDone:n=>{t.onChangeAPIKey(),e(n?`Login successful`:`Login interrupted`)}})}var c,l=e((()=>{t(),a(),i(),c=n()}));export{l as n,s as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Ac as r,Da as i,Pc as a,Sc as o,ka as s,on as c,tn as l}from"./paths-DfGsIjPm.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{o as f,s as p}from"./log-DS97_rIr.js";import{a as m,l as h,o as g}from"./api-BpQPVgif.js";import{n as _,t as v}from"./browser-DwnUS505.js";import{n as y,t as b}from"./usage-VtTu7beE.js";import{i as x,r as S}from"./overageCreditGrant-cGQilawd.js";async function C(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests`;return(await t.post(a,e,{headers:i})).data}async function w(e,n){let{accessToken:r,orgUUID:i}=await h(),a={...m(r),"x-organization-uuid":i},o=`${u().BASE_API_URL}/api/oauth/organizations/${i}/admin_requests/me?request_type=${e}`;for(let e of n)o+=`&statuses=${e}`;return(await t.get(o,{headers:a})).data}async function T(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests/eligibility?request_type=${e}`;return(await t.get(a,{headers:i})).data}var E=e((()=>{n(),d(),g()}));async function D(){o().hasVisitedExtraUsage||a(e=>({...e,hasVisitedExtraUsage:!0})),x();let e=l(),t=e===`team`||e===`enterprise`;if(!i()&&t){let e;try{e=(await b())?.extra_usage}catch(e){p(e)}if(e?.is_enabled&&e.monthly_limit===null)return{type:`message`,value:`Your organization already has unlimited extra usage. No request needed.`};try{if((await T(`limit_increase`))?.is_allowed===!1)return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}catch(e){p(e)}try{let e=await w(`limit_increase`,[`pending`,`dismissed`]);if(e&&e.length>0)return{type:`message`,value:`You have already submitted a request for extra usage to your admin.`}}catch(e){p(e)}try{return await C({request_type:`limit_increase`,details:null}),{type:`message`,value:e?.is_enabled?`Request sent to your admin to increase extra usage.`:`Request sent to your admin to enable extra usage.`}}catch(e){p(e)}return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}let n=t?`https://claude.ai/admin-settings/usage`:`https://claude.ai/settings/usage`;try{return{type:`browser-opened`,url:n,opened:await _(n)}}catch(e){return p(e),{type:`message`,value:`Failed to open browser. Please visit ${n} to manage extra usage.`}}}var O=e((()=>{E(),S(),y(),c(),s(),v(),r(),f()}));export{D as n,O as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./extra-usage-core-3KkeQSve.js";async function r(){let e=await t();return e.type===`message`?{type:`text`,value:e.value}:{type:`text`,value:e.opened?`Browser opened to manage extra usage. If it didn't open, visit: ${e.url}`:`Please visit ${e.url} to manage extra usage.`}}e((()=>{n()}))();export{r as call};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./extra-usage-DLEvlKzs.js";e();export{t as call};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,g as i,h as a,nt as o,p as ee,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Bl as u,Br as d,Cr as f,Gs as p,Pr as m,Qa as te,Rr as h,bi as ne,dn as g,dr as _,li as v,lo as re,on as y,oo as b,ur as x,vi as S,xi as C,yi as ie,zl as ae}from"./paths-DfGsIjPm.js";import{n as w,r as oe}from"./analytics-DqMQntaB.js";import{By as T,Cj as E,DC as D,EC as se,Hf as O,Ij as ce,Lj as le,Mj as ue,Nj as de,Sj as k,Vf as fe,aS as pe,fC as me,jj as A,kj as j,lC as M,uC as N,xj as P}from"./loadAgentsDir-Br5fGLLI.js";import{t as F}from"./useKeybinding-FsOnjW6T.js";import{l as I,u as he}from"./referral-DOqhciQu.js";function L(e,t){if(!A(t))return;let n=E(t,e);return`${R(n)} ${n} · /effort`}function R(e){switch(e){case`low`:return`○`;case`medium`:return`◐`;case`high`:return`●`;case`xhigh`:return`⦿`;case`max`:return`◉`;default:return`●`}}var z=e((()=>{p(),j()}));function B({initial:e,sessionModel:t,onSelect:n,onCancel:s,isStandaloneCommand:l,showFastModeNotice:u,headerText:d,skipSettingsWrite:f}){let p=me(),m=he(),g=e===null?K:e,[_,y]=(0,W.useState)(g),b=N(e=>C()?e.fastMode:!1),[S,w]=(0,W.useState)(()=>new Set(x(g)?[g.replace(/\[1m\]/i,``)]:[])),T=(0,W.useCallback)(()=>{if(!_||_===K)return;let e=_.replace(/\[1m\]/i,``);w(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[_]),[E,D]=(0,W.useState)(!1),O=N(e=>e.effortValue),[k,j]=(0,W.useState)(O===void 0?void 0:P(O)),M=(0,W.useMemo)(()=>fe(b??!1),[b]),F=(0,W.useMemo)(()=>e!==null&&!M.some(t=>t.value===e)?[...M,{value:e,label:h(e),description:`Current model`}]:M,[M,e]),I=(0,W.useMemo)(()=>F.map(e=>({...e,value:e.value===null?K:e.value})),[F]),L=(0,W.useMemo)(()=>I.some(e=>e.value===g)?g:I[0]?.value??void 0,[I,g]),R=Math.min(10,I.length),z=Math.max(0,I.length-R),B=I.find(e=>e.value===_)?.label,q=V(_),J=_!==void 0&&_!==K&&S.has(_.replace(/\[1m\]/i,``)),Y=q?A(q):!1,X=q?de(q):!1,Z=q?ue(q):!1,Q=U(_),$=k===`max`&&!Z?X?`xhigh`:`high`:k===`xhigh`&&!X?`high`:k,_e=(0,W.useCallback)(e=>{y(e),!E&&O===void 0&&j(U(e))},[E,O]),ve=(0,W.useCallback)(e=>{Y&&(j(t=>ge(t??Q,e,X,Z)),D(!0))},[Y,X,Z,Q]);o({"modelPicker:decreaseEffort":()=>ve(`left`),"modelPicker:increaseEffort":()=>ve(`right`),"modelPicker:toggle1M":()=>T()},{context:`ModelPicker`});function ye(e){if(oe(`tengu_model_command_menu_effort`,{effort:k}),!f){let t=ce(k,U(e),te(`userSettings`)?.effortLevel,E),n=le(t);n!==void 0&&re(`userSettings`,{effortLevel:n}),p(e=>({...e,effortValue:t}))}let t=V(e),r=E&&t&&A(t)?k:void 0;if(e===K){n(null,r);return}let i=e.replace(/\[1m\]/i,``);n(S.has(i)?`${i}[1m]`:i,r)}let be=(0,G.jsxs)(c,{flexDirection:`column`,children:[(0,G.jsxs)(c,{flexDirection:`column`,children:[(0,G.jsxs)(c,{marginBottom:1,flexDirection:`column`,children:[(0,G.jsx)(r,{color:`remember`,bold:!0,children:`Select model`}),(0,G.jsx)(r,{dimColor:!0,children:d??`Choose a model for this and future sessions. Use ← → to adjust effort, Space to toggle 1M context.`}),t&&(0,G.jsxs)(r,{dimColor:!0,children:[`Currently using `,h(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,G.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(c,{flexDirection:`column`,children:(0,G.jsx)(pe,{defaultValue:g,defaultFocusValue:L,options:I,onChange:ye,onFocus:_e,onCancel:s??(()=>{}),visibleOptionCount:R})}),z>0&&(0,G.jsx)(c,{paddingLeft:3,children:(0,G.jsxs)(r,{dimColor:!0,children:[`and `,z,` more…`]})})]}),(0,G.jsxs)(c,{marginBottom:1,flexDirection:`column`,children:[Y?(0,G.jsxs)(r,{dimColor:!0,children:[(0,G.jsx)(H,{effort:$}),` `,ae($),` effort`,$===Q?` (default)`:``,` `,(0,G.jsx)(r,{color:`subtle`,children:`← → to adjust`})]}):(0,G.jsxs)(r,{color:`subtle`,children:[(0,G.jsx)(H,{effort:void 0}),` Effort not supported`,B?` for ${B}`:``]}),J?(0,G.jsxs)(r,{dimColor:!0,children:[(0,G.jsx)(H,{effort:`high`}),` 1M context on`,(0,G.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]}):(0,G.jsxs)(r,{color:`subtle`,children:[(0,G.jsx)(H,{effort:void 0}),` 1M context off`,B?` for ${B}`:``,(0,G.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]})]}),C()?u?(0,G.jsx)(c,{marginBottom:1,children:(0,G.jsxs)(r,{dimColor:!0,children:[`Fast mode is `,(0,G.jsx)(r,{bold:!0,children:`ON`}),` and available with `,v,` only (/fast). Switching to other models turn off fast mode.`]})}):ie()&&!ne()?(0,G.jsx)(c,{marginBottom:1,children:(0,G.jsxs)(r,{dimColor:!0,children:[`Use `,(0,G.jsx)(r,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,v,` only).`]})}):null:null]}),l&&(0,G.jsx)(r,{dimColor:!0,italic:!0,children:m.pending?(0,G.jsxs)(G.Fragment,{children:[`Press `,m.keyName,` again to exit`]}):(0,G.jsxs)(a,{children:[(0,G.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,G.jsx)(se,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return l?(0,G.jsx)(ee,{color:`permission`,children:be}):be}function V(e){if(e)return e===K?f():d(e)}function H({effort:e}){return(0,G.jsx)(r,{color:e?`claude`:`subtle`,children:R(e??`low`)})}function ge(e,t,n,r){let i=[`low`,`medium`,`high`,...n?[`xhigh`]:[],...r?[`max`]:[]],a=i.indexOf(e),o=a===-1?i.indexOf(`high`):a;return t===`right`?i[(o+1)%i.length]:i[(o-1+i.length)%i.length]}function U(e){let t=k(V(e)??f());return t===void 0?`high`:P(t)}var W,G,K,q=e((()=>{u(),n(),W=t(n(),1),_(),I(),w(),S(),s(),F(),M(),j(),m(),O(),b(),D(),T(),z(),G=l(),K=`__NO_PREFERENCE__`}));function J(e,t,n){if(!g())return!1;if(t)return!0;if(e===null||!x(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var Y=e((()=>{y(),_()}));export{R as a,q as i,J as n,L as o,B as r,z as s,Y as t};
@@ -1 +0,0 @@
1
- import{iu as e,nu as t,ru as n,tu as r}from"./loadAgentsDir-Br5fGLLI.js";e();export{r as drainPendingExtraction,t as executeExtractMemories,n as initExtractMemories};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./fast-CbLu_WYL.js";t();export{n as FastModePicker,e as call};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Q as i,Rn as a,b as o,f as s,nt as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Ac as p,Di as m,Gs as h,Sc as g,Si as _,ci as v,di as y,fi as b,li as x,lo as S,mi as C,oi as w,oo as T,si as E,ui as D,vi as O,xi as k}from"./paths-DfGsIjPm.js";import{n as A,r as j}from"./analytics-DqMQntaB.js";import{d as M,x as N}from"./startupProfiler-CnDpob1v.js";import{fC as P,lC as F,uC as I}from"./loadAgentsDir-Br5fGLLI.js";import{t as L}from"./useKeybinding-FsOnjW6T.js";import{n as R,t as z}from"./systemTheme-dDbitcxB.js";function B({cooldown:e}){return e?(0,H.jsx)(o,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(o,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let r=R(g().theme);return t?n.dim(u(`promptBorder`,r)(`↯`)):u(`fastMode`,r)(`↯`)}var H,U=e((()=>{r(),a(),h(),l(),p(),z(),H=f()}));function W(e,t){D(),S(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!_(e.mainLoopModel);return{...e,...t?{mainLoopModel:y(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let n=I(e=>e.mainLoopModel),r=I(e=>e.fastMode),a=P(),[l,u]=(0,J.useState)(r??!1),f=b(),p=f.status===`cooldown`,m=t!==null,h=w(E(!0));function g(){m||(W(l,a),j(`tengu_fast_mode_toggled`,{enabled:l,source:`picker`}),l?e(`${V(l)} Fast mode ON${_(n)?``:` · model set to ${x}`} · ${h}`):(a(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function v(){if(m){r&&W(!1,a),e(`Fast mode OFF`,{display:`system`});return}e(r?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function y(){m||u(e=>!e)}return c({"confirm:yes":g,"confirm:nextField":y,"confirm:next":y,"confirm:previous":y,"confirm:cycleMode":y,"confirm:toggle":y},{context:`Confirmation`}),(0,Y.jsxs)(s,{title:(0,Y.jsxs)(o,{children:[(0,Y.jsx)(B,{cooldown:p}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${x}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:v,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):m?(0,Y.jsx)(o,{children:`Esc to cancel`}):(0,Y.jsx)(o,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsx)(o,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(d,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(d,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(o,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(o,{color:l?`fastMode`:void 0,bold:l,children:l?`ON `:`OFF`}),(0,Y.jsx)(o,{dimColor:!0,children:h})]})}),p&&f.status===`cooldown`&&(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsxs)(o,{color:`warning`,children:[f.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,M(f.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(o,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(i,{url:`https://code.claude.com/docs/en/fast-mode`,children:`https://code.claude.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=C();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),j(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${_(i)?``:` · model set to ${x}`} · ${w(E(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!k())return null;await m();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=C();return j(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{a(),J=t(a(),1),l(),U(),L(),A(),F(),O(),N(),v(),T(),Y=f()}));export{U as a,V as i,q as n,X as r,G as t};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./featureCheck-Cm0YNDXO.js";n();export{e as isSkillLearningCompiledIn,t as isSkillLearningEnabled};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Feedback-BVbSMBwY.js";function a(e,t,n,r=``,a={}){return(0,s.jsx)(i,{abortSignal:t,messages:n,initialDescription:r,onDone:e,backgroundTasks:a})}async function o(e,t,n){let r=n||``;return a(e,t.abortController.signal,t.messages,r)}var s;e((()=>{t(),r(),s=n()}))();export{o as call,a as renderFeedbackComponent};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{n as r,t as i}from"./index.min-BJnb9GQI.js";import{normalize as a}from"path";function o(e,t=d){return new f(e,t)}function s(e){return Object.fromEntries(e.entries())}function c(e){return Array.from(e.keys())}function l(e){let t=o(e.max,e.maxSize);return t.load(e.dump()),t}function u(e,t){let n=l(e);for(let[e,r]of t.entries()){let t=n.get(e);(!t||r.timestamp>t.timestamp)&&n.set(e,r)}return n}var d,f,p=e((()=>{r(),t(),d=25*1024*1024,f=class{constructor(e,t){n(this,`cache`,void 0),this.cache=new i({max:e,maxSize:t,sizeCalculation:e=>{let t=e.content,n=typeof t==`string`?t:t==null?``:typeof t==`object`?JSON.stringify(t):String(t);return Math.max(1,Buffer.byteLength(n,`utf8`))}})}get(e){return this.cache.get(a(e))}set(e,t){return this.cache.set(a(e),t),this}has(e){return this.cache.has(a(e))}delete(e){return this.cache.delete(a(e))}clear(){this.cache.clear()}get size(){return this.cache.size}get max(){return this.cache.max}get maxSize(){return this.cache.maxSize}get calculatedSize(){return this.cache.calculatedSize}keys(){return this.cache.keys()}entries(){return this.cache.entries()}dump(){return this.cache.dump()}load(e){this.cache.load(e)}}}));export{o as a,l as i,c as n,p as o,s as r,u as s,f as t};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./cwd--iizewsn.js";import{n as r,o as i}from"./fileStateCache-C7-TxF8G.js";import{relative as a}from"path";async function o(e,t){let i=t.readFileState?r(t.readFileState):[];return i.length===0?{type:`text`,value:`No files in context`}:{type:`text`,value:`Files in context:\n${i.map(e=>a(n(),e)).join(`
2
- `)}`}}e((()=>{t(),i()}))();export{o as call};
@@ -1 +0,0 @@
1
- import{F as e,I as t,L as n,M as r,N as i,P as a,R as o,j as s,z as c}from"./paths-DfGsIjPm.js";r();export{s as getEventSamplingConfig,i as initialize1PEventLogging,a as is1PEventLoggingEnabled,e as logEventTo1P,t as logGrowthBookExperimentTo1P,n as reinitialize1PEventLoggingIfConfigChanged,o as shouldSampleEvent,c as shutdown1PEventLogging};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{U as n,l as r,p as i,z as a}from"./debug-otxXY3j-.js";import{O as o,k as s}from"./rcDebugLog-BoroyfjB.js";import{i as c}from"./workSecret-qRMNrQy2.js";import{t as l}from"./ccrClient-yNKhQYnf.js";import{n as u,t as d}from"./SSETransport-BbeM6bi9.js";u(),r(),n(),o();function f(e){return{write:t=>e.write(t),writeBatch:t=>e.writeBatch(t),close:()=>e.close(),isConnectedStatus:()=>e.isConnectedStatus(),getStateLabel:()=>e.getStateLabel(),setOnData:t=>e.setOnData(t),setOnClose:t=>e.setOnClose(t),setOnConnect:t=>e.setOnConnect(t),connect:()=>void e.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return e.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function p(e){let{sessionUrl:t,ingressToken:n,sessionId:r,initialSequenceNum:o,getAuthToken:u}=e,f;u?f=()=>{let e=u();return e?{Authorization:`Bearer ${e}`}:{}}:s(n);let p=e.epoch??await c(t,n);i(`[bridge:repl] CCR v2: worker sessionId=${r} epoch=${p}${e.epoch===void 0?` (via registerWorker)`:` (from /bridge)`}`);let m=new URL(t);m.pathname=m.pathname.replace(/\/$/,``)+`/worker/events/stream`;let h=new d(m,{},r,void 0,o,f),g,_=new l(h,new URL(t),{getAuthHeaders:f,heartbeatIntervalMs:e.heartbeatIntervalMs,heartbeatJitterFraction:e.heartbeatJitterFraction,onEpochMismatch:()=>{i(`[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery`);try{_.close(),h.close(),g?.(4090)}catch(e){i(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${a(e)}`,{level:`error`})}throw Error(`epoch superseded`)}});h.setOnEvent(e=>{_.reportDelivery(e.event_id,`received`),_.reportDelivery(e.event_id,`processed`)});let v,y=!1,b=!1;return{write(e){return _.writeEvent(e)},async writeBatch(e){for(let t of e){if(b)break;await _.writeEvent(t)}},close(){b=!0,_.close(),h.close()},isConnectedStatus(){return y},getStateLabel(){return h.isClosedStatus()?`closed`:h.isConnectedStatus()?y?`connected`:`init`:`connecting`},setOnData(e){h.setOnData(e)},setOnClose(e){g=e,h.setOnClose(t=>{_.close(),e(t??4092)})},setOnConnect(e){v=e},getLastSequenceNum(){return h.getLastSequenceNum()},droppedBatchCount:0,reportState(e){_.reportState(e)},reportMetadata(e){_.reportMetadata(e)},reportDelivery(e,t){_.reportDelivery(e,t)},flush(){return _.flush()},connect(){e.outboundOnly||h.connect(),_.initialize(p).then(()=>{y=!0,i(`[bridge:repl] v2 transport ready for writes (epoch=${p}, sse=${h.isConnectedStatus()?`open`:`opening`})`),v?.()},e=>{i(`[bridge:repl] CCR v2 initialize failed: ${a(e)}`,{level:`error`}),_.close(),h.close(),g?.(4091)})}}}e();var m=class{constructor(){t(this,`_active`,!1),t(this,`_pending`,[])}get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...e){return this._active?(this._pending.push(...e),!0):!1}drop(){this._active=!1;let e=this._pending.length;return this._pending.length=0,e}deactivate(){this._active=!1}};export{f as n,p as r,m as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{S as r,g as i}from"./paths-DfGsIjPm.js";function a(){return{...u,...i(`tengu_malort_pedway`,u)}}function o(){return!0}function s(){return process.env.USER_TYPE===`ant`&&process.env.MONOREPO_ROOT_DIR&&!n(process.env.ALLOW_ANT_COMPUTER_USE_MCP)?!1:o()&&a().enabled}function c(){let{enabled:e,coordinateMode:t,...n}=a();return n}function l(){return d??(d=a().coordinateMode),d}var u,d,f=e((()=>{r(),t(),u={enabled:!0,pixelValidation:!1,clipboardPasteMultiline:!0,mouseAnimation:!0,hideBeforeAction:!0,autoTargetDisplay:!0,clipboardGuard:!0,coordinateMode:`pixels`}}));export{f as i,s as n,c as r,l as t};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./gates-CtkQH6jy.js";e();export{t as getChicagoEnabled};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{o as a,u as o}from"./proxy-nPT6a6QY.js";import{G_ as s,K_ as c,Qo as l,Uo as u,W_ as d,Xo as f,dD as p,fD as m,mo as h,q_ as g,st as _,ut as v}from"./loadAgentsDir-Br5fGLLI.js";import{G as y,H as b,K as x,P as S,U as C,W as w,q as T}from"./rcDebugLog-BoroyfjB.js";import{n as E,r as D}from"./SSETransport-BbeM6bi9.js";import{randomUUID as O}from"crypto";function k(){return(process.env.GEMINI_BASE_URL||M).replace(/\/+$/,``)}function A(e){let t=e.replace(/^\/+/,``);return t.startsWith(`models/`)?t:`models/${t}`}async function*j(e){let t=await(e.fetchOverride??fetch)(`${k()}/${A(e.model)}:streamGenerateContent?alt=sse`,{method:`POST`,headers:{"Content-Type":`application/json`,"x-goog-api-key":process.env.GEMINI_API_KEY||``},body:JSON.stringify(e.body),signal:e.signal,...a({forAnthropicAPI:!1})});if(!t.ok){let e=await t.text();throw Error(`Gemini API request failed (${t.status} ${t.statusText}): ${e||`empty response body`}`)}if(!t.body)throw Error(`Gemini API returned no response body`);let n=t.body.getReader(),r=new TextDecoder,o=``;try{for(;;){let{done:e,value:t}=await n.read();if(e)break;o+=r.decode(t,N);let{frames:a,remaining:s}=D(o);o=s;for(let e of a)if(!(!e.data||e.data===`[DONE]`))try{yield JSON.parse(e.data)}catch(e){throw Error(`Failed to parse Gemini SSE payload: ${i(e)}`)}}o+=r.decode();let{frames:e}=D(o);for(let t of e)if(!(!t.data||t.data===`[DONE]`))try{yield JSON.parse(t.data)}catch(e){throw Error(`Failed to parse trailing Gemini SSE payload: ${i(e)}`)}}finally{n.releaseLock()}}var M,N,P=e((()=>{E(),t(),o(),M=`https://generativelanguage.googleapis.com/v1beta`,N={stream:!0}}));async function*F(e,t,n,i,a,o){try{let u=T(a.model),p=l(e,n),h=await Promise.all(n.map(e=>v(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model}))),g=h.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),{contents:_,systemInstruction:S}=y(p,t),E=w(g),D=C(a.toolChoice),k=j({model:u,signal:i,fetchOverride:a.fetchOverride,body:{contents:_,...S&&{systemInstruction:S},...E.length>0&&{tools:E},...D&&{toolConfig:{functionCallingConfig:D}},generationConfig:{...a.temperatureOverride!==void 0&&{temperature:a.temperatureOverride},...o.type!==`disabled`&&{thinkingConfig:{includeThoughts:!0,...o.type===`enabled`&&{thinkingBudget:o.budgetTokens}}}}}});r(`[Gemini] Calling model=${u}, messages=${_.length}, tools=${E.length}`);let A=b(k,u),M={},N=[],P=null,F=0,I=Date.now();for await(let e of A){switch(e.type){case`message_start`:P=e.message,F=Date.now()-I;break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.type===`thinking`?r.signature=n.signature:r[x]=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let r={message:{...P,content:f([t],n,a.agentId)},requestId:void 0,type:`assistant`,uuid:O(),timestamp:new Date().toISOString()};N.push(r),yield r;break}case`message_delta`:case`message_stop`:break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:F}:void 0}}m(a.langfuseTrace??null,{model:u,provider:`gemini`,input:d(p,t),output:s(N),usage:{input_tokens:0,output_tokens:0},startTime:new Date(I),endTime:new Date,completionStartTime:F>0?new Date(I+F):void 0,tools:c(h),thinking:o.type===`disabled`?void 0:{type:o.type,...o.type===`enabled`&&{budgetTokens:o.budgetTokens}}})}catch(e){let t=e instanceof Error?e.message:String(e);r(`[Gemini] Error: ${t}`,{level:`error`}),yield h({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{_(),n(),u(),p(),g(),P(),S()}))();export{F as queryModelGemini};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{g as t}from"./client-_sjL0I7A.js";import{l as n,p as r}from"./debug-otxXY3j-.js";import{t as i}from"./sdk-DEtgRZvI.js";import{Bl as a,Eo as o,Ll as s,Rl as c,Uo as l,jo as u}from"./loadAgentsDir-Br5fGLLI.js";async function d(){try{let{getResolvedLanguage:e}=await import(`./language-Lx3WlBN6.js`);return e()===`zh`?m:p}catch{return p}}async function f(e){let n=s();if(!n)return r(`[recap] no CacheSafeParams saved, skipping`),{kind:`no-turn`};let i=new AbortController;e.addEventListener(`abort`,()=>i.abort(),{once:!0});try{let{messages:t}=await a({promptMessages:[o({content:await d()})],cacheSafeParams:n,canUseTool:async()=>({behavior:`deny`,message:`Recap cannot use tools`,decisionReason:{type:`other`,reason:`away_summary`}}),overrides:{abortController:i},querySource:`away_summary`,forkLabel:`away_summary`,maxTurns:1,skipCacheWrite:!0,skipTranscript:!0});if(e.aborted)return{kind:`aborted`};let r=t.find(e=>e.type===`assistant`&&e.isApiErrorMessage);if(r)return{kind:`api-error`,text:u(r)??``};let s=t.filter(e=>e.type===`assistant`&&!e.isApiErrorMessage).pop();if(!s)return{kind:`failed`};let c=u(s);return!c||c.trim().length===0?{kind:`failed`}:{kind:`ok`,text:c.trim()}}catch(n){return n instanceof t||e.aborted||i.signal.aborted?{kind:`aborted`}:(r(`[recap] generation failed: ${n}`),{kind:`failed`})}}var p,m;e((()=>{i(),n(),c(),l(),p=`The user stepped away and is coming back. Recap in under 40 words, 1-2 plain sentences, no markdown. Lead with the overall goal and current task, then the one next action. Skip root-cause narrative, fix internals, secondary to-dos, and em-dash tangents.`,m=`用户离开后回来了。用中文写 1-2 句话,不超过 60 字,无 markdown。先说明高层目标和当前任务,再说明下一步操作。跳过根因分析和次要待办。`}))();export{f as generateRecap};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{s as a,u as o}from"./types-D5R26wwH.js";import{Uo as s,ko as c,lk as l,nt as u,tt as d}from"./loadAgentsDir-Br5fGLLI.js";import{X as f}from"./rcDebugLog-BoroyfjB.js";import{r as p,t as m}from"./sessionTitle-CB0ZEkS_.js";async function h(e,t){let n=m(e);if(!n)return null;try{let e=await u({systemPrompt:f([`Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.`]),userPrompt:n,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1}},signal:t,options:{querySource:`rename_generate_name`,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),r=o(Array.isArray(e.message.content)?c(e.message.content):e.message.content);return r&&typeof r==`object`&&`name`in r&&typeof r.name==`string`?r.name:null}catch(e){return r(`generateSessionName failed: ${i(e)}`,{level:`error`}),null}}var g=e((()=>{d(),n(),t(),a(),s(),p(),l()}));export{g as n,h as t};
@@ -1,23 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,n,r}from"./execFileNoThrow-B_aZH_GP.js";function i(e){if(e<=1)return!1;try{return process.kill(e,0),!0}catch{return!1}}async function a(e,t=10){if(process.platform===`win32`){let r=await n(`powershell.exe`,[`-NoProfile`,`-Command`,`
2
- $pid = ${String(e)}
3
- $ancestors = @()
4
- for ($i = 0; $i -lt ${t}; $i++) {
5
- $proc = Get-CimInstance Win32_Process -Filter "ProcessId=$pid" -ErrorAction SilentlyContinue
6
- if (-not $proc -or -not $proc.ParentProcessId -or $proc.ParentProcessId -eq 0) { break }
7
- $pid = $proc.ParentProcessId
8
- $ancestors += $pid
9
- }
10
- $ancestors -join ','
11
- `.trim()],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.trim().split(`,`).filter(Boolean).map(e=>parseInt(e,10)).filter(e=>!isNaN(e))}let r=await n(`sh`,[`-c`,`pid=${String(e)}; for i in $(seq 1 ${t}); do ppid=$(ps -o ppid= -p $pid 2>/dev/null | tr -d ' '); if [ -z "$ppid" ] || [ "$ppid" = "0" ] || [ "$ppid" = "1" ]; then break; fi; echo $ppid; pid=$ppid; done`],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.trim().split(`
12
- `).filter(Boolean).map(e=>parseInt(e,10)).filter(e=>!isNaN(e))}function o(e){try{let n=String(e),r=t(process.platform===`win32`?`powershell.exe -NoProfile -Command "(Get-CimInstance Win32_Process -Filter \\"ProcessId=${n}\\").CommandLine"`:`ps -o command= -p ${n}`,{timeout:1e3});return r?r.trim():null}catch{return null}}async function s(e,t=10){if(process.platform===`win32`){let r=await n(`powershell.exe`,[`-NoProfile`,`-Command`,`
13
- $currentPid = ${String(e)}
14
- $commands = @()
15
- for ($i = 0; $i -lt ${t}; $i++) {
16
- $proc = Get-CimInstance Win32_Process -Filter "ProcessId=$currentPid" -ErrorAction SilentlyContinue
17
- if (-not $proc) { break }
18
- if ($proc.CommandLine) { $commands += $proc.CommandLine }
19
- if (-not $proc.ParentProcessId -or $proc.ParentProcessId -eq 0) { break }
20
- $currentPid = $proc.ParentProcessId
21
- }
22
- $commands -join [char]0
23
- `.trim()],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.split(`\0`).filter(Boolean)}let r=await n(`sh`,[`-c`,`currentpid=${String(e)}; for i in $(seq 1 ${t}); do cmd=$(ps -o command= -p $currentpid 2>/dev/null); if [ -n "$cmd" ]; then printf '%s\\0' "$cmd"; fi; ppid=$(ps -o ppid= -p $currentpid 2>/dev/null | tr -d ' '); if [ -z "$ppid" ] || [ "$ppid" = "0" ] || [ "$ppid" = "1" ]; then break; fi; currentpid=$ppid; done`],{timeout:3e3});return r.code!==0||!r.stdout?.trim()?[]:r.stdout.split(`\0`).filter(Boolean)}var c=e((()=>{r()}));export{i as a,c as i,a as n,o as r,s as t};
@@ -1 +0,0 @@
1
- import{a as e,i as t,m as n,r,v as i}from"./git-DayFjsvj.js";i();export{r as findGitRoot,t as getBranch,e as getDefaultBranch,n as getRemoteUrl};
@@ -1,6 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{Nr as a,cn as o}from"./state-sIHsFpDu.js";import{E as s,O as ee,Q as te,Z as ne,_ as c,h as l,l as re,p as u}from"./debug-otxXY3j-.js";import{n as ie,t as d}from"./cwd--iizewsn.js";import{r as ae,t as oe}from"./which-BnEnzWhs.js";import{o as se}from"./log-DS97_rIr.js";import{n as f,t as ce}from"./memoize-CPexXTP7.js";import{r as le,t as p}from"./execFileNoThrow-B_aZH_GP.js";import{basename as ue,dirname as m,join as h,resolve as g,sep as _}from"path";import{readFileSync as v,realpathSync as y,statSync as de,unwatchFile as fe,watchFile as pe}from"fs";import{createHash as me}from"crypto";import{readFile as b,readdir as he,stat as ge}from"fs/promises";function x(e,t,n){let r=_e();if(!r)return;let i={timestamp:new Date().toISOString(),level:e,event:t,data:n??{}},a=l(),o=ee(i)+`
2
- `;try{a.appendFileSync(r,o)}catch{try{a.mkdirSync(m(r)),a.appendFileSync(r,o)}catch{}}}function _e(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function ve(e,t,n){let r=Date.now();x(`info`,`${e}_started`);try{let i=await t(),a=n?n(i):{};return x(`info`,`${e}_completed`,{duration_ms:Date.now()-r,...a}),i}catch(t){throw x(`error`,`${e}_failed`,{duration_ms:Date.now()-r}),t}}var S=e((()=>{c(),s()}));function ye(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return C.has(t)}var C,be=e((()=>{C=new Set(`.png,.jpg,.jpeg,.gif,.bmp,.ico,.webp,.tiff,.tif,.mp4,.mov,.avi,.mkv,.webm,.wmv,.flv,.m4v,.mpeg,.mpg,.mp3,.wav,.ogg,.flac,.aac,.m4a,.wma,.aiff,.opus,.zip,.tar,.gz,.bz2,.7z,.rar,.xz,.z,.tgz,.iso,.exe,.dll,.so,.dylib,.bin,.o,.a,.obj,.lib,.app,.msi,.deb,.rpm,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp,.ttf,.otf,.woff,.woff2,.eot,.pyc,.pyo,.class,.jar,.war,.ear,.node,.wasm,.rlib,.sqlite,.sqlite3,.db,.mdb,.idx,.psd,.ai,.eps,.sketch,.fig,.xd,.blend,.3ds,.max,.swf,.fla,.lockb,.dat,.data`.split(`,`))}));async function w(e,t,n,r){try{return xe(await b(h(e,`config`),`utf-8`),t,n,r)}catch{return null}}function xe(e,t,n,r){let i=e.split(`
3
- `),a=t.toLowerCase(),o=r.toLowerCase(),s=!1;for(let e of i){let t=e.trim();if(t.length===0||t[0]===`#`||t[0]===`;`)continue;if(t[0]===`[`){s=Te(t,a,n);continue}if(!s)continue;let r=Se(t);if(r&&r.key.toLowerCase()===o)return r.value}return null}function Se(e){let t=0;for(;t<e.length&&Ee(e[t]);)t++;if(t===0)return null;let n=e.slice(0,t);for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;if(t>=e.length||e[t]!==`=`)return null;for(t++;t<e.length&&(e[t]===` `||e[t]===` `);)t++;return{key:n,value:Ce(e,t)}}function Ce(e,t){let n=``,r=!1,i=t;for(;i<e.length;){let t=e[i];if(!r&&(t===`#`||t===`;`))break;if(t===`"`){r=!r,i++;continue}if(t===`\\`&&i+1<e.length){let t=e[i+1];if(r){switch(t){case`n`:n+=`
4
- `;break;case`t`:n+=` `;break;case`b`:n+=`\b`;break;case`"`:n+=`"`;break;case`\\`:n+=`\\`;break;default:n+=t;break}i+=2;continue}if(t===`\\`){n+=`\\`,i+=2;continue}}n+=t,i++}return r||(n=we(n)),n}function we(e){let t=e.length;for(;t>0&&(e[t-1]===` `||e[t-1]===` `);)t--;return e.slice(0,t)}function Te(e,t,n){let r=1;for(;r<e.length&&e[r]!==`]`&&e[r]!==` `&&e[r]!==` `&&e[r]!==`"`;)r++;if(e.slice(1,r).toLowerCase()!==t)return!1;if(n===null)return r<e.length&&e[r]===`]`;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r>=e.length||e[r]!==`"`)return!1;r++;let i=``;for(;r<e.length&&e[r]!==`"`;){if(e[r]===`\\`&&r+1<e.length){let t=e[r+1];if(t===`\\`||t===`"`){i+=t,r+=2;continue}i+=t,r+=2;continue}i+=e[r],r++}return r>=e.length||e[r]!==`"`||(r++,r>=e.length||e[r]!==`]`)?!1:i===n}function Ee(e){return e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`-`}var T=e((()=>{}));function De(){N.clear()}async function E(e){let t=g(e??d()),n=N.get(t);if(n!==void 0)return n;let r=V(t);if(!r)return N.set(t,null),null;let i=h(r,`.git`);try{if((await ge(i)).isFile()){let e=(await b(i,`utf-8`)).trim();if(e.startsWith(`gitdir:`)){let n=g(r,e.slice(7).trim());return N.set(t,n),n}}return N.set(t,i),i}catch{return N.set(t,null),null}}function D(e){return!(!e||e.startsWith(`-`)||e.startsWith(`/`)||e.includes(`..`)||e.split(`/`).some(e=>e===`.`||e===``)||!/^[a-zA-Z0-9/._+@-]+$/.test(e))}function O(e){return/^[0-9a-f]{40}$/.test(e)||/^[0-9a-f]{64}$/.test(e)}async function k(e){try{let t=(await b(h(e,`HEAD`),`utf-8`)).trim();if(t.startsWith(`ref:`)){let n=t.slice(4).trim();if(n.startsWith(`refs/heads/`)){let e=n.slice(11);return D(e)?{type:`branch`,name:e}:null}if(!D(n))return null;let r=await A(e,n);return r?{type:`detached`,sha:r}:{type:`detached`,sha:``}}return O(t)?{type:`detached`,sha:t}:null}catch{return null}}async function A(e,t){let n=await j(e,t);if(n)return n;let r=await M(e);return r&&r!==e?j(r,t):null}async function j(e,t){try{let n=(await b(h(e,t),`utf-8`)).trim();if(n.startsWith(`ref:`)){let t=n.slice(4).trim();return D(t)?A(e,t):null}return O(n)?n:null}catch{}try{let n=await b(h(e,`packed-refs`),`utf-8`);for(let e of n.split(`
5
- `)){if(e.startsWith(`#`)||e.startsWith(`^`))continue;let n=e.indexOf(` `);if(n!==-1&&e.slice(n+1)===t){let t=e.slice(0,n);return O(t)?t:null}}}catch{}return null}async function M(e){try{return g(e,(await b(h(e,`commondir`),`utf-8`)).trim())}catch{return null}}async function Oe(e,t,n){try{let r=(await b(h(e,t),`utf-8`)).trim();if(r.startsWith(`ref:`)){let e=r.slice(4).trim();if(e.startsWith(n)){let t=e.slice(n.length);return D(t)?t:null}}}catch{}return null}async function ke(){let e=await E();if(!e)return`HEAD`;let t=await k(e);return t&&t.type===`branch`?t.name:`HEAD`}async function Ae(){let e=await E();if(!e)return``;let t=await k(e);return t?t.type===`branch`?await A(e,`refs/heads/${t.name}`)??``:t.sha:``}async function je(){let e=await E();if(!e)return null;let t=await w(e,`remote`,`origin`,`url`);if(t)return t;let n=await M(e);return n&&n!==e?w(n,`remote`,`origin`,`url`):null}async function Me(){let e=await E();if(!e)return`main`;let t=await M(e)??e,n=await Oe(t,`refs/remotes/origin/HEAD`,`refs/remotes/origin/`);if(n)return n;for(let e of[`main`,`master`])if(await A(t,`refs/remotes/origin/${e}`))return e;return`main`}function Ne(){return I.get(`branch`,ke)}function Pe(){return I.get(`head`,Ae)}function Fe(){return I.get(`remoteUrl`,je)}function Ie(){return I.get(`defaultBranch`,Me)}async function Le(e){let t=await E(e);if(!t)return null;let n=await k(t);return n?n.type===`branch`?A(t,`refs/heads/${n.name}`):n.sha:null}async function Re(e){let t;try{let n=(await b(h(e,`.git`),`utf-8`)).trim();if(!n.startsWith(`gitdir:`))return null;t=g(e,n.slice(7).trim())}catch{return null}let n=await k(t);return n?n.type===`branch`?A(t,`refs/heads/${n.name}`):n.sha:null}async function ze(e){let t=await E(e);if(!t)return null;let n=await w(t,`remote`,`origin`,`url`);if(n)return n;let r=await M(t);return r&&r!==t?w(r,`remote`,`origin`,`url`):null}async function Be(){try{let e=await E();return e?(await he(h(await M(e)??e,`worktrees`))).length+1:0}catch{return 1}}var N,P,F,I,L=e((()=>{o(),ne(),ie(),$(),T(),r(),N=new Map,P=1e3,F=class{constructor(){i(this,`gitDir`,null),i(this,`commonDir`,null),i(this,`initialized`,!1),i(this,`initPromise`,null),i(this,`watchedPaths`,[]),i(this,`branchRefPath`,null),i(this,`cache`,new Map)}async ensureStarted(){if(!this.initialized)return this.initPromise||(this.initPromise=this.start()),this.initPromise}async start(){this.gitDir=await E(),this.initialized=!0,this.gitDir&&(this.commonDir=await M(this.gitDir),this.watchPath(h(this.gitDir,`HEAD`),()=>{this.onHeadChanged()}),this.watchPath(h(this.commonDir??this.gitDir,`config`),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),te(async()=>{this.stopWatching()}))}watchPath(e,t){this.watchedPaths.push(e),pe(e,{interval:P},t)}async watchCurrentBranchRef(){if(!this.gitDir)return;let e=await k(this.gitDir),t=this.commonDir??this.gitDir,n=e?.type===`branch`?h(t,`refs`,`heads`,e.name):null;n!==this.branchRefPath&&(this.branchRefPath&&(fe(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter(e=>e!==this.branchRefPath)),this.branchRefPath=n,n&&this.watchPath(n,()=>{this.invalidate()}))}async onHeadChanged(){this.invalidate(),await a(),await this.watchCurrentBranchRef()}invalidate(){for(let e of this.cache.values())e.dirty=!0}stopWatching(){for(let e of this.watchedPaths)fe(e);this.watchedPaths=[],this.branchRefPath=null}async get(e,t){await this.ensureStarted();let n=this.cache.get(e);if(n&&!n.dirty)return n.value;n&&(n.dirty=!1);let r=await t(),i=this.cache.get(e);return i&&!i.dirty&&(i.value=r),i||this.cache.set(e,{value:r,dirty:!1,compute:t}),r}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}},I=new F}));function Ve(){function e(e){let t=B(e);return t===z?null:t}return e.cache=B.cache,e}function He(){function e(e){let t=V(e);return t?H(t):null}return e.cache=H.cache,e}function Ue(e){return E(e)}function R(e){let t=e.trim();if(!t)return null;let n=t.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(n&&n[1]&&n[2])return`${n[1]}/${n[2]}`.toLowerCase();let r=t.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(r&&r[1]&&r[2]){let e=r[1],t=r[2];if(qe(e)&&t.startsWith(`git/`)){let e=t.slice(4),n=e.split(`/`);return n.length>=3&&n[0].includes(`.`)?e.toLowerCase():`github.com/${e}`.toLowerCase()}return`${e}/${t}`.toLowerCase()}return null}async function We(){let e=await J();if(!e)return null;let t=R(e);return t?me(`sha256`).update(t).digest(`hex`).substring(0,16):null}async function Ge(){try{let[e,t,n,r,i,a]=await Promise.all([G(),K(),J(),Y(),X(),Q()]);return{commitHash:e,branchName:t,remoteUrl:n,isHeadOnRemote:r,isClean:i,worktreeCount:a}}catch{return null}}async function Ke(){let{parseGitRemote:e}=await import(`./detectRepository-CbR0WgtE.js`),t=await J();if(!t)return u(`Local GitHub repo: unknown`),null;let n=e(t);if(n&&n.host===`github.com`){let e=`${n.owner}/${n.name}`;return u(`Local GitHub repo: ${e}`),e}return u(`Local GitHub repo: unknown`),null}function qe(e){let t=e.split(`:`)[0]??``;return t===`localhost`||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(t)}function Je(){let e=l(),t=d(),n=h(t,`.git`);try{let t=e.statSync(n);if(t.isFile())return!1;if(t.isDirectory()){let t=h(n,`HEAD`);try{if(e.statSync(t).isFile())return!1}catch{}}}catch{}try{if(e.statSync(h(t,`HEAD`)).isFile())return!0}catch{}try{if(e.statSync(h(t,`objects`)).isDirectory())return!0}catch{}try{if(e.statSync(h(t,`refs`)).isDirectory())return!0}catch{}return!1}var z,B,V,H,U,W,Ye,Xe,G,K,q,J,Y,X,Z,Q,Ze,$=e((()=>{n(),ie(),re(),S(),le(),c(),L(),se(),ce(),oe(),z=Symbol(`git-root-not-found`),B=f(e=>{let t=Date.now();x(`info`,`find_git_root_started`);let n=g(e),r=n.substring(0,n.indexOf(_)+1)||_,i=0;for(;n!==r;){try{let e=h(n,`.git`);i++;let r=de(e);if(r.isDirectory()||r.isFile())return x(`info`,`find_git_root_completed`,{duration_ms:Date.now()-t,stat_count:i,found:!0}),n.normalize(`NFC`)}catch{}let e=m(n);if(e===n)break;n=e}try{let e=h(r,`.git`);i++;let n=de(e);if(n.isDirectory()||n.isFile())return x(`info`,`find_git_root_completed`,{duration_ms:Date.now()-t,stat_count:i,found:!0}),r.normalize(`NFC`)}catch{}return x(`info`,`find_git_root_completed`,{duration_ms:Date.now()-t,stat_count:i,found:!1}),z},e=>e,50),V=Ve(),H=f(e=>{try{let t=v(h(e,`.git`),`utf-8`).trim();if(!t.startsWith(`gitdir:`))return e;let n=g(e,t.slice(7).trim()),r=g(n,v(h(n,`commondir`),`utf-8`).trim());return g(m(n))!==h(r,`worktrees`)||y(v(h(n,`gitdir`),`utf-8`).trim())!==h(y(e),`.git`)?e:ue(r)===`.git`?m(r).normalize(`NFC`):r.normalize(`NFC`)}catch{return e}},e=>e,50),U=He(),W=t(()=>ae(`git`)||`git`),Ye=t(async()=>{let e=Date.now();x(`info`,`is_git_check_started`);let t=V(d())!==null;return x(`info`,`is_git_check_completed`,{duration_ms:Date.now()-e,is_git:t}),t}),Xe=async e=>V(e)!==null,G=async()=>Pe(),K=async()=>Ne(),q=async()=>Ie(),J=async()=>Fe(),Y=async()=>{let{code:e}=await p(W(),[`rev-parse`,`@{u}`],{preserveOutputOnError:!1});return e===0},X=async e=>{let t=[`--no-optional-locks`,`status`,`--porcelain`];e?.ignoreUntracked&&t.push(`-uno`);let{stdout:n}=await p(W(),t,{preserveOutputOnError:!1});return n.trim().length===0},Z=async()=>{let{stdout:e}=await p(W(),[`--no-optional-locks`,`status`,`--porcelain`],{preserveOutputOnError:!1}),t=[],n=[];return e.trim().split(`
6
- `).filter(e=>e.length>0).forEach(e=>{let r=e.substring(0,2),i=e.substring(2).trim();r===`??`?n.push(i):i&&t.push(i)}),{tracked:t,untracked:n}},Q=async()=>Be(),Ze=async e=>{try{let t=e||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:n}=await Z();if(n.length>0){let{code:e}=await p(W(),[`add`,...n],{preserveOutputOnError:!1});if(e!==0)return!1}let{code:r}=await p(W(),[`stash`,`push`,`--message`,t],{preserveOutputOnError:!1});return r===0}catch{return!1}}}));export{T as A,M as C,Re as D,L as E,x as F,ve as I,ye as M,be as N,E as O,S as P,De as S,ze as T,W as _,q as a,R as b,Ge as c,X as d,Ye as f,Q as g,We as h,K as i,w as j,A as k,Ke as l,J as m,U as n,Z as o,Y as p,V as r,Ue as s,Xe as t,G as u,$ as v,Le as w,Ze as x,Je as y};
@@ -1 +0,0 @@
1
- import{cn as e,ot as t}from"./state-sIHsFpDu.js";import{Ac as n,Pc as r,Sc as i,al as a,el as o}from"./paths-DfGsIjPm.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{E as l,T as u,r as d,v as f}from"./git-DayFjsvj.js";import{a as p,n as m,o as h}from"./detectRepository-CSN3yxkq.js";import{realpath as g}from"fs/promises";e(),n(),s(),p(),o(),l(),f();async function _(){try{let e=await m();if(!e){c(`Not in a GitHub repository, skipping path mapping update`);return}let n=t(),a=d(n)??n,o;try{o=(await g(a)).normalize(`NFC`)}catch{o=a}let s=e.toLowerCase(),l=i().githubRepoPaths?.[s]??[];if(l[0]===o){c(`Path ${o} already tracked for repo ${s}`);return}let u=l.filter(e=>e!==o),f=[o,...u];r(e=>({...e,githubRepoPaths:{...e.githubRepoPaths,[s]:f}})),c(`Added ${o} to tracked paths for repo ${s}`)}catch(e){c(`Error updating repo path mapping: ${e}`)}}function v(e){let t=i(),n=e.toLowerCase();return t.githubRepoPaths?.[n]??[]}async function y(e){let t=await Promise.all(e.map(a));return e.filter((e,n)=>t[n])}async function b(e,t){try{let n=await u(e);if(!n)return!1;let r=h(n);return r?r.toLowerCase()===t.toLowerCase():!1}catch{return!1}}function x(e,t){let n=i(),a=e.toLowerCase(),o=n.githubRepoPaths?.[a]??[],s=o.filter(e=>e!==t);if(s.length===o.length)return;let l={...n.githubRepoPaths};s.length===0?delete l[a]:l[a]=s,r(e=>({...e,githubRepoPaths:l})),c(`Removed ${t} from tracked paths for repo ${a}`)}export{b as a,_ as i,v as n,x as r,y as t};
@@ -1,3 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{Bm as o,By as s,Fm as c,Hm as l,Im as u,Lm as d,Mm as f,Nm as p,Pm as m,QO as h,Um as g,Wm as _,aS as v,cd as y,od as b,qO as x,sd as S,zm as C}from"./loadAgentsDir-Br5fGLLI.js";import{n as w,t as T}from"./PermissionDialog-5MlJf7ew.js";function E({currentGoal:e,newObjective:t,onConfirm:r,onCancel:a}){function o(e){e===`yes`?r():a()}let s=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`;return(0,D.jsx)(T,{color:`warning`,title:`Replace active goal?`,children:(0,D.jsxs)(i,{flexDirection:`column`,marginTop:1,paddingX:1,children:[(0,D.jsx)(n,{children:`A goal is already in progress. Replacing it will reset all progress and counters.`}),(0,D.jsxs)(i,{marginTop:1,flexDirection:`column`,children:[(0,D.jsx)(n,{dimColor:!0,children:`Current goal:`}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Objective: `}),e.objective]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Status: `}),u(e.status)]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Time: `}),c(e)]}),(0,D.jsxs)(n,{children:[(0,D.jsx)(n,{dimColor:!0,children:`· Tokens: `}),s]})]}),(0,D.jsxs)(i,{marginTop:1,flexDirection:`column`,children:[(0,D.jsx)(n,{dimColor:!0,children:`New objective:`}),(0,D.jsx)(n,{children:t})]}),(0,D.jsx)(i,{marginTop:1,children:(0,D.jsx)(v,{options:[{label:`Yes, replace the goal`,value:`yes`},{label:`No, keep the current goal`,value:`no`}],onChange:o,onCancel:a})})]})})}var D,O=e((()=>{t(),r(),s(),w(),o(),D=a()}));function k(e){let t=e.split(`
2
- `)[0]??e;return t.length<=I?t:t.slice(0,I)+`…`}function A(){h(e=>e.origin===`goal-continuation`||e.origin===`goal-budget-limit`)}function j(){let e=d();if(!e)return"No active goal. Set one with `/goal <objective>`.";let t=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`,n=[`Goal: ${e.objective}`,`Status: ${u(e.status)}`,`Time: ${c(e)}`,`Tokens: ${t}`,`Continuation turns: ${e.turnsExecuted}`];return e.status===`max_turns`&&n.push("Hint: Max continuation turns reached (150). Run `/goal continue` to reset and continue."),n.join(`
3
- `)}function M(e){return _(e),C(),S(),`Goal set.`}async function N(e,t,n){let r=n.trim();if(!r||r.toLowerCase()===`status`)return e(j(),{display:`system`}),null;let i=r.toLowerCase();if(i===`clear`){let t=f();return t&&(y(),A()),e(t?`Goal cleared.`:`No active goal to clear.`,{display:`system`}),null}if(i===`pause`){let t=l();return t&&(S(),A()),e(t?`Goal paused.`:`No active goal to pause.`,{display:`system`}),null}if(i===`resume`){if(d()?.status===`max_turns`)return e("Goal reached max continuation turns (150). Run `/goal continue` to reset turn counter and continue.",{display:`system`}),null;let t=g();return t&&S(),e(t?`Goal resumed.`:`No paused goal to resume.`,{display:`system`,shouldQuery:!!t}),null}if(i===`continue`){let t=m();return t&&S(),e(t?`Goal continuation counter reset (0/150). Continuing...`:`Current goal is not in max-turns state.`,{display:`system`,shouldQuery:!!t}),null}if(i===`complete`){let t=p();return t&&(S(),A()),e(t?`Goal marked complete.`:`No active goal to complete.`,{display:`system`}),null}if(r.length>F)return e(`Goal objective is too long (${r.length} chars; limit ${F}). Save the detailed instructions to a file and reference it from a shorter objective.`,{display:`system`}),null;let a=d();return a&&a.status!==`complete`?(0,P.jsx)(E,{currentGoal:a,newObjective:r,onConfirm:()=>{A(),e(M(r),{display:`system`,shouldQuery:!0,displayArgs:k(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]})},onCancel:()=>{e(`Kept the current goal. New objective discarded.`,{display:`system`})}}):(e(M(r),{display:`system`,shouldQuery:!0,displayArgs:k(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]}),null)}var P,F,I;e((()=>{t(),o(),b(),x(),O(),P=a(),F=4e3,I=80}))();export{N as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{ai as t,ci as n}from"./paths-DfGsIjPm.js";import{l as r,p as i}from"./debug-otxXY3j-.js";import{B_ as a,G_ as o,K_ as s,Qo as c,Tm as l,Uo as u,V_ as d,W_ as f,Xo as p,dD as m,fD as h,km as g,mo as _,q_ as v,st as y,ut as b}from"./loadAgentsDir-Br5fGLLI.js";import{F as x,I as S,J as C,L as w,P as T,R as E}from"./rcDebugLog-BoroyfjB.js";import{n as D,t as O}from"./openaiShared-Crt0cZLO.js";import{randomUUID as k}from"crypto";async function*A(e,n,r,u,d){try{let m=C(d.model),g=c(e,r),_=await Promise.all(r.map(e=>b(e,{getToolPermissionContext:d.getToolPermissionContext,tools:r,agents:d.agents,allowedAgentTypes:d.allowedAgentTypes,model:d.model}))),v=_.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),y=E(g,n),T=w(v),O=S(d.toolChoice),A=a({maxRetries:0,fetchOverride:d.fetchOverride,source:d.querySource});i(`[Grok] Calling model=${m}, messages=${y.length}, tools=${T.length}`);let j=x(await A.chat.completions.create({model:m,messages:y,...T.length>0&&{tools:T,...O&&{tool_choice:O}},stream:!0,stream_options:{include_usage:!0},...d.temperatureOverride!==void 0&&{temperature:d.temperatureOverride}},{signal:u}),m),M={},N=[],P=null,F={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},I=0,L=Date.now();for await(let e of j){switch(e.type){case`message_start`:P=e.message,I=Date.now()-L,e.message.usage&&(F=D(F,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let n={message:{...P,content:p([t],r,d.agentId)},requestId:void 0,type:`assistant`,uuid:k(),timestamp:new Date().toISOString()};N.push(n),yield n;break}case`message_delta`:{let t=e.usage;t&&(F=D(F,t));break}case`message_stop`:break}e.type===`message_stop`&&F.input_tokens+F.output_tokens>0&&l(t(m,F),F,d.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:I}:void 0}}h(d.langfuseTrace??null,{model:m,provider:`grok`,input:f(g,n),output:o(N),usage:{input_tokens:F.input_tokens,output_tokens:F.output_tokens,cache_creation_input_tokens:F.cache_creation_input_tokens,cache_read_input_tokens:F.cache_read_input_tokens},startTime:new Date(L),endTime:new Date,completionStartTime:I>0?new Date(L+I):void 0,tools:s(_)})}catch(e){let t=e instanceof Error?e.message:String(e);i(`[Grok] Error: ${t}`,{level:`error`}),yield _({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{d(),O(),T(),u(),y(),r(),g(),n(),m(),v()}))();export{A as queryModelGrok};
@@ -1 +0,0 @@
1
- import{A as e,C as t,D as n,E as r,O as i,S as a,T as o,_ as s,b as c,d as l,f as u,g as d,h as f,k as p,l as m,m as h,p as g,u as _,v,w as y,x as b,y as x}from"./paths-DfGsIjPm.js";a();export{m as checkGate_CACHED_OR_BLOCKING,_ as checkSecurityRestrictionGate,l as checkStatsigFeatureGate_CACHED_MAY_BE_STALE,u as clearGrowthBookConfigOverrides,g as getAllGrowthBookFeatures,h as getApiBaseUrlHost,f as getDynamicConfig_BLOCKS_ON_INIT,d as getDynamicConfig_CACHED_MAY_BE_STALE,s as getFeatureValue_CACHED_MAY_BE_STALE,v as getFeatureValue_CACHED_WITH_REFRESH,x as getFeatureValue_DEPRECATED,c as getGrowthBookConfigOverrides,b as hasGrowthBookEnvOverride,t as initializeGrowthBook,y as onGrowthBookRefresh,o as refreshGrowthBookAfterAuthChange,r as refreshGrowthBookFeatures,n as resetGrowthBook,i as setGrowthBookConfigOverride,p as setupPeriodicGrowthBookRefresh,e as stopPeriodicGrowthBookRefresh};
@@ -1,5 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{Xc as r,el as i}from"./paths-DfGsIjPm.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-otxXY3j-.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{o as h,s as g}from"./log-DS97_rIr.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,n=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:t(),trigger:e,dumpNumber:n,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.7.0`}}async function O(e=`manual`,n=0){try{let i=t(),a=await D(e,n),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=n>0?`-dump${n}`:``,d=`${i}${l}.heapsnapshot`,p=`${i}${l}-diagnostics.json`,h=_(c,d),g=_(c,p);return await S(g,s(a,null,2),{mode:384}),f(`[HeapDump] Diagnostics written to ${g}`),await k(h),f(`[HeapDump] Heap dump written to ${h}`),m(`tengu_heap_dump`,{triggerManual:e===`manual`,triggerAuto15GB:e===`auto-1.5GB`,dumpNumber:n,success:!0}),{success:!0,heapPath:h,diagPath:g}}catch(t){let r=o(t);return g(r),m(`tengu_heap_dump`,{triggerManual:e===`manual`,triggerAuto15GB:e===`auto-1.5GB`,dumpNumber:n,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((()=>{n(),p(),d(),c(),i(),l(),h(),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};
@@ -1 +0,0 @@
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-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{C as m,S as h}from"./startupProfiler-CnDpob1v.js";import{Ji as g,OT as _,Ui as v,Vi as y,aS as b,hT as x,kT as S,na as C,oS as w}from"./loadAgentsDir-Br5fGLLI.js";import{t as T}from"./useKeybinding-FsOnjW6T.js";import{l as E,u as D}from"./referral-DOqhciQu.js";import{n as O,r as k}from"./modalContext-CmSKRyea.js";import{n as A,t as j}from"./PromptInputHelpMenu-CblAb9vk.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:m(g(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)(b,{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(),h(),u(),w(),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=k(),m=()=>e(`Help dialog dismissed`,{display:`system`});d(`help:dismiss`,m,{context:`Help`});let h=D(m),g=S(`help:dismiss`,`Help`,`esc`),_=v(),b=t.filter(e=>_.has(e.name)&&!e.isHidden),x=[];if(process.env.USER_TYPE===`ant`){let e=new Set(y.map(e=>e.name));b=b.filter(t=>!e.has(t.name)),x=t.filter(t=>e.has(t.name)&&!t.isHidden)}let C=t.filter(e=>!_.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:b,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`&&x.length>0&&w.push((0,B.jsx)(s,{title:`[ant-only]`,children:(0,B.jsx)(M,{commands:x,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.7.0`,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:[g,` to cancel`]})})})]})})}var B,V=e((()=>{i(),E(),_(),C(),O(),x(),u(),T(),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};
@@ -1 +0,0 @@
1
- import{$t as e,Cn as t,Sn as n,mn as r}from"./loadAgentsDir-Br5fGLLI.js";t();export{e as executeSessionEndHooks,r as getSessionEndHookTimeoutMs,n as hasWorktreeCreateHook};
@@ -1,79 +0,0 @@
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-gfT9mM8P.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-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,ht as h}from"./state-sIHsFpDu.js";import{Po as g,Qa as _,jo as v,no as y,oo as b}from"./paths-DfGsIjPm.js";import{n as x,r as S}from"./analytics-DqMQntaB.js";import{$u as C,Qu as w,aS as T,av as E,cv as D,dC as O,iv as k,lC as A,nv as j,oS as M,ov as N,rv as P,sv as F,uC as ee,vC as te,yC as ne}from"./loadAgentsDir-Br5fGLLI.js";import{t as re}from"./useKeybinding-FsOnjW6T.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);j(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 D(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(),F(),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} ${g(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)(T,{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(),v(),M(),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)(T,{options:n.map((e,t)=>({label:`[${e.config.type}] ${P(e.config)}`,value:t.toString(),description:e.source===`pluginHook`&&e.pluginName?`${E(e.source)} (${e.pluginName})`:E(e.source)})),onChange:e=>{let t=n[parseInt(e,10)];t&&i(t)},onCancel:a})})})}var U,W=e((()=>{s(),u(),F(),M(),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)(T,{options:o.map(e=>({label:`[${e.sources.map(N).join(`, `)}] ${e.matcher||`(all)`}`,value:e.matcher,description:`${e.hookCount} ${g(e.hookCount,`hook`)}`})),onChange:e=>{i(e)},onCancel:a})})})}var K,q,se=e((()=>{K=t(s(),1),u(),F(),v(),M(),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:k(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(),F(),J=p()}));function de({toolNames:e,onExit:t}){let[n,r]=(0,X.useState)({mode:`select-event`}),[i,a]=(0,X.useState)(()=>y()?.disableAllHooks===!0&&_(`policySettings`)?.disableAllHooks===!0),[o,s]=(0,X.useState)(()=>_(`policySettings`)?.allowManagedHooksOnly===!0);ne(e=>{e===`policySettings`&&(a(y()?.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),v=O(),b=(0,X.useMemo)(()=>[...e,...h.tools.map(e=>e.name)],[e,h.tools]),x=(0,X.useMemo)(()=>ie(v.getState(),b),[b,v]),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,b)===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(b),E=y()?.disableAllHooks===!0,{hooksByEvent:D,totalHooksCount:k}=(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:k}),` `,`configured `,g(k,`hook`),` that `,g(k,`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:k,restrictedByPolicy:o,onSelectEvent:e=>{I(e,b)===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,b)===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,b)!==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),A(),te(),u(),re(),R(),b(),v(),V(),W(),se(),Y(),Z=p()})),Q,$;e((()=>{fe(),x(),C(),Q=p(),$=async(e,t)=>{S(`tengu_hooks_command`,{});let n=t.getAppState().toolPermissionContext;return(0,Q.jsx)(de,{toolNames:w(n).map(e=>e.name),onExit:e})}}))();export{$ as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,p as n}from"./debug-otxXY3j-.js";import{o as r,r as i}from"./common-BD4Q7osK.js";import{c as a,s as o}from"./escHotkey-DfdC44i7.js";import{i as s,n as c,r as l}from"./gates-CtkQH6jy.js";import{n as u,t as d}from"./executor-Dmn3RTuI.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};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{o as t}from"./log-DS97_rIr.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};
@@ -1,2 +0,0 @@
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-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ac as u,Pc as d,Sc as f}from"./paths-DfGsIjPm.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{r as _,t as v}from"./execFileNoThrow-B_aZH_GP.js";import{Ax as y,By as b,Cx as x,Fx as S,Jx as C,Nx as w,Ot as T,Px as E,Sx as D,Tt as O,aS as k,fC as A,lC as j,tS as M,uC as N,zx as P}from"./loadAgentsDir-Br5fGLLI.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)(k,{options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}],onChange:(0,B.useCallback)(async t=>{let n=t===`yes`;d(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=f();return!S()&&e.autoConnectIde!==!0&&e.hasIdeAutoConnectDialogBeenShown!==!0}function R({onComplete:e}){let t=(0,B.useCallback)(t=>{let n=t===`yes`;n&&d(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)(k,{options:[{label:`No`,value:`no`},{label:`Yes`,value:`yes`}],onChange:t,defaultValue:`no`})})}function z(){let e=f();return!S()&&e.autoConnectIde===!0}var B,V,H=e((()=>{B=t(i(),1),s(),u(),y(),b(),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:E()?`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)(k,{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&&!S()&&(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)(k,{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:P(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)(k,{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){m(`tengu_ext_ide_command`,{});let{options:{dynamicMcpConfig:i},onChangeDynamicMcpConfig:a}=t;if(r?.trim()===`open`){let t=O(),r=t?t.worktreePath:g(),i=(await D(!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 v(`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 E(),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 D(!0);if(o.length===0&&t.onInstallIDEExtension&&!S()){let r=await x(),i=r=>{t.onInstallIDEExtension&&(t.onInstallIDEExtension(r),w(r)?e(`Installed plugin to ${n.bold(P(r))}\nPlease ${n.bold(`restart your IDE`)} completely for it to take effect`):e(`Installed extension to ${n.bold(P(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=N(e=>e.mcp.clients.find(e=>e.name===`ide`)),u=A(),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=()=>{},C(`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=g(),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),p(),b(),s(),H(),M(),j(),h(),_(),y(),T(),Q=l(),$=35e3}))();export{J as call,X as formatWorkspaceFolders};
@@ -1 +0,0 @@
1
- import{n as e,s as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{Ln as i,Tt as a,wn as o}from"./schemas-BGAvj1T4.js";import{t as s}from"./v4-f1i_CNUT.js";import{Ct as c,cn as l}from"./state-sIHsFpDu.js";import{l as u,p as d}from"./debug-otxXY3j-.js";import{n as f,t as p}from"./lazySchema-2sOku3cX.js";import{a as m,n as h,t as g}from"./bridgeConfig-CcCNsSBX.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(),l(),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`,c())}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{A as i,j as n,M as r,E as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./inboundAttachments-C93Q7Dvt.js";export{e as resolveAndPrepend};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-DR8-3Aex.js";import{d as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{Ct as i,cn as a,ot as o}from"./state-sIHsFpDu.js";import{Ac as s,Jt as c,Pc as l,Pt as u,S as d,Sc as f,la as p,nn as m,on as h,ua as g,v as _}from"./paths-DfGsIjPm.js";import{Q as v,U as y,Z as b,l as x,p as S,z as C}from"./debug-otxXY3j-.js";import{n as ee,r as w}from"./analytics-DqMQntaB.js";import{F as T,P as E,i as te,m as ne,v as D}from"./git-DayFjsvj.js";import{g as O,m as k}from"./log-DS97_rIr.js";import{n as A,t as j}from"./sleep-8Eb9j_Ly.js";import{Aa as re,Cy as ie,Fa as ae,Fr as M,Ia as N,Ka as oe,La as se,Ma as ce,Mo as P,Na as F,Oa as le,Pa as ue,Po as I,Qa as L,Ra as R,Sy as de,Td as fe,Uo as pe,Wa as me,br as z,ja as he,ka as ge,qo as B,xd as _e}from"./loadAgentsDir-Br5fGLLI.js";import{O as V,_ as ve,d as H,k as ye,n as U,t as W}from"./rcDebugLog-BoroyfjB.js";import{a as G,c as K,d as be,f as xe,o as q,r as Se,s as J,u as Y}from"./debugUtils-CiEnbhiz.js";import{a as Ce,i as we}from"./trustedDevice-DY8OosTr.js";import{a as X,i as Te,n as Z,o as Q,t as $}from"./bridgeConfig-CcCNsSBX.js";import{a as Ee,o as De,r as Oe,s as ke,t as Ae}from"./bridgeEnabled-DoT2l1Oj.js";import{i as je,t as Me}from"./assistant-CHawoD04.js";import{t as Ne}from"./capacityWake-BXlUpptF.js";import{n as Pe,t as Fe}from"./pollConfig-C19GiX7i.js";import{a as Ie,n as Le,r as Re,t as ze}from"./workSecret-qRMNrQy2.js";import{a as Be,i as Ve,n as He,t as Ue}from"./createSession-VlSLvi7J.js";import{i as We,n as Ge}from"./envLessBridgeConfig-DI0ouryy.js";import{n as Ke,o as qe}from"./mappers-BCiceNt3.js";import{n as Je,r as Ye,t as Xe}from"./sessionTitle-CB0ZEkS_.js";import{a as Ze,i as Qe,n as $e,o as et,r as tt,t as nt}from"./bridgeMessaging-IlSWKGmC.js";import{t as rt}from"./HybridTransport-B9g074Y1.js";import{n as it,r as at,t as ot}from"./flushGate-Ci3NHOV4.js";import{hostname as st}from"os";import{randomUUID as ct}from"crypto";a(),k(),D(),s(),g(),h(),d(),X(),ie(),Oe(),pe(),me(),M(),Ve(),We(),Ke(),Ye(),ae(),x(),W(),E(),ee(),b(),K(),_e(),Ce(),V(),H(),n(),q(),y(),j(),ge();var lt=2e3,ut=6e4,dt=900*1e3,ft=0;async function pt(e){let{dir:n,machineName:i,branch:a,gitRepoUrl:o,title:s,baseUrl:c,sessionIngressUrl:l,workerType:u,getAccessToken:d,createSession:f,archiveSession:p,getCurrentTitle:m=()=>s,toSDKMessages:h=()=>{throw Error(`BridgeCoreParams.toSDKMessages not provided. Pass it if you use writeMessages() or initialMessages — daemon callers that only use writeSdkMessages() never hit this path.`)},onAuth401:g,getPollIntervalConfig:_=()=>Pe,initialHistoryCap:y=200,initialMessages:b,previouslyFlushedUUIDs:x,onInboundMessage:ee,onPermissionResponse:E,onInterrupt:te,onSetModel:ne,onSetMaxThinkingTokens:D,onSetPermissionMode:O,onStateChange:k,onUserMessage:A,perpetual:j,initialSSESequenceNum:ie=0}=e,ae=++ft,{writeBridgePointer:M,clearBridgePointer:N,readBridgePointer:oe}=await import(`./bridgePointer-fFD_tbSk.js`),se=j?await oe(n):null,P=se?.source===`repl`?se:null;S(`[bridge:repl] initBridgeCore #${ae} starting (initialMessages=${b?.length??0}${P?` perpetual prior=env:${P.environmentId}`:``})`);let F=ue({baseUrl:c,getAccessToken:d,runnerVersion:`2.7.0`,onDebug:S,onAuth401:g,getTrustedDeviceToken:we}),I=process.env.USER_TYPE===`ant`?ce(F):F,L={dir:n,machineName:i,branch:a,gitRepoUrl:o,maxSessions:1,spawnMode:`single-session`,verbose:!1,sandbox:!1,bridgeId:ct(),workerType:u,environmentId:ct(),reuseEnvironmentId:P?.environmentId,apiBaseUrl:c,sessionIngressUrl:l},R,de;try{let e=await I.registerBridgeEnvironment(L);R=e.environment_id,de=e.environment_secret}catch(e){return J(`registration_failed`,`[bridge:repl] Environment registration failed: ${C(e)}`),P&&await N(n),k?.(`failed`,C(e)),null}S(`[bridge:repl] Environment registered: ${R}`),T(`info`,`bridge_repl_env_registered`),w(`tengu_bridge_repl_env_registered`,{});async function pe(e,t){if(R!==e)return S(`[bridge:repl] Env mismatch (requested ${e}, got ${R}) — cannot reconnect in place`),!1;let n=xe(t),r=n===t?[t]:[t,n];for(let e of r)try{return await I.reconnectSession(R,e),S(`[bridge:repl] Reconnected session ${e} in place on env ${R}`),!0}catch(t){S(`[bridge:repl] reconnectSession(${e}) failed: ${C(t)}`)}return S(`[bridge:repl] reconnectSession exhausted — falling through to fresh session`),!1}let me=P?await pe(P.environmentId,P.sessionId):!1;P&&!me&&await N(n);let z;if(me&&P){if(z=P.sessionId,S(`[bridge:repl] Perpetual session reused: ${z}`),b&&x)for(let e of b)x.add(e.uuid)}else{let e=await f({environmentId:R,title:s,gitRepoUrl:o,branch:a,signal:AbortSignal.timeout(15e3)});if(!e)return S(`[bridge:repl] Session creation failed, deregistering environment`),w(`tengu_bridge_repl_session_failed`,{}),await I.deregisterEnvironment(R).catch(()=>{}),k?.(`failed`,`Session creation failed`),null;z=e,S(`[bridge:repl] Session created: ${z}`)}await M(n,{sessionId:z,environmentId:R,source:`repl`}),T(`info`,`bridge_repl_session_created`),w(`tengu_bridge_repl_started`,{has_initial_messages:!!(b&&b.length>0),inProtectedNamespace:t()});let ge=new Set;if(b)for(let e of b)ge.add(e.uuid);let B=new nt(2e3);for(let e of ge)B.add(e);let _e=new nt(2e3),V=new AbortController,H=null;ve(e=>{V.signal.aborted||H?.reportMetadata(e)},{replayCurrent:!0});let W=0,G=me?ie:0,K=null,q=null,Se=Ne(V.signal),Y=Se.wake,Ce=Se.signal,X=new ot,Te=!A,Z=0,Q=null;async function $(){if(Q)return Q;Q=Ee();try{return await Q}finally{Q=null}}async function Ee(){if(Z++,U(`doReconnect: attempt=${Z}/3 envId=${R} sessionId=${z} workId=${K}`),W++,S(`[bridge:repl] Reconnecting after env lost (attempt ${Z}/3)`),Z>3)return S(`[bridge:repl] Environment reconnect limit reached (3), giving up`),!1;if(H){let e=H.getLastSequenceNum();e>G&&(G=e),H.close(),H=null}if(Y(),X.drop(),K){let e=K;if(await I.stopWork(R,e,!1).catch(()=>{}),K!==e)return S(`[bridge:repl] Poll loop recovered during stopWork await — deferring to it`),Z=0,!0;K=null,q=null}if(V.signal.aborted)return S(`[bridge:repl] Reconnect aborted by teardown`),!1;let e=R;L.reuseEnvironmentId=e;try{let e=await I.registerBridgeEnvironment(L);R=e.environment_id,de=e.environment_secret}catch(e){return L.reuseEnvironmentId=void 0,S(`[bridge:repl] Environment re-registration failed: ${C(e)}`),!1}if(L.reuseEnvironmentId=void 0,S(`[bridge:repl] Re-registered: requested=${e} got=${R}`),V.signal.aborted)return S(`[bridge:repl] Reconnect aborted after env registration, cleaning up`),await I.deregisterEnvironment(R).catch(()=>{}),!1;if(H!==null)return S(`[bridge:repl] Poll loop recovered during registerBridgeEnvironment await — deferring to it`),Z=0,!0;if(await pe(e,z))return w(`tengu_bridge_repl_reconnected_in_place`,{}),Z=0,!0;if(R!==e&&w(`tengu_bridge_repl_env_expired_fresh_session`,{}),await p(z),V.signal.aborted)return S(`[bridge:repl] Reconnect aborted after archive, cleaning up`),await I.deregisterEnvironment(R).catch(()=>{}),!1;let t=m(),r=await f({environmentId:R,title:t,gitRepoUrl:o,branch:a,signal:AbortSignal.timeout(15e3)});return r?V.signal.aborted?(S(`[bridge:repl] Reconnect aborted after session creation, cleaning up`),await p(r),!1):(z=r,fe(be(r)).catch(()=>{}),G=0,_e.clear(),Te=!A,S(`[bridge:repl] Re-created session: ${z}`),await M(n,{sessionId:z,environmentId:R,source:`repl`}),x?.clear(),Z=0,!0):(S(`[bridge:repl] Session creation failed during reconnection`),!1)}function De(){return d()}function Oe(){let e=X.end();if(e.length===0)return;if(!H){S(`[bridge:repl] Cannot drain ${e.length} pending message(s): no transport`);return}for(let t of e)B.add(t.uuid);let t=h(e).map(e=>({...e,session_id:z}));S(`[bridge:repl] Drained ${e.length} pending message(s) after flush`),H.writeBatch(t)}let ke=null;function Ae(){ke?.()}function je(e){if(U(`handleTransportPermanentClose: code=${e} transport=${H?`exists`:`null`} pollAborted=${V.signal.aborted}`),S(`[bridge:repl] Transport permanently closed: code=${e}`),w(`tengu_bridge_repl_ws_closed`,{code:e}),H){let e=H.getLastSequenceNum();e>G&&(G=e),H=null}Y();let t=X.drop();if(t>0&&S(`[bridge:repl] Dropping ${t} pending message(s) on transport close (code=${e})`,{level:`warn`}),e===1e3){k?.(`failed`,`session ended`),V.abort(),Ae();return}k?.(`reconnecting`,`Remote Control connection lost (code ${e})`),S(`[bridge:repl] Transport reconnect budget exhausted (code=${e}), attempting env reconnect`),$().then(t=>{t||V.signal.aborted||(S(`[bridge:repl] reconnectEnvironmentWithSession resolved false — tearing down`),w(`tengu_bridge_repl_reconnect_failed`,{close_code:e}),k?.(`failed`,`reconnection failed`),Ae())})}let Me;process.env.USER_TYPE===`ant`&&process.platform!==`win32`&&(Me=()=>{S(`[bridge:repl] SIGUSR2 received — forcing doReconnect() for testing`),$()},process.on(`SIGUSR2`,Me));let Fe=null;process.env.USER_TYPE===`ant`&&he({fireClose:e=>{if(!Fe){S(`[bridge:debug] fireClose: no transport wired yet`);return}S(`[bridge:debug] fireClose(${e}) — injecting`),Fe(e)},forceReconnect:()=>{S(`[bridge:debug] forceReconnect — injecting`),$()},injectFault:re,wakePollLoop:Y,describe:()=>`env=${R} session=${z} transport=${H?.getStateLabel()??`null`} workId=${K??`null`}`}),mt({api:I,getCredentials:()=>({environmentId:R,environmentSecret:de}),signal:V.signal,getPollIntervalConfig:_,onStateChange:k,getWsState:()=>H?.getStateLabel()??`null`,isAtCapacity:()=>H!==null,capacitySignal:Ce,onFatalError:Ae,getHeartbeatInfo:()=>!K||!q?null:{environmentId:R,workId:K,sessionToken:q},onHeartbeatFatal:e=>{if(S(`[bridge:repl] heartbeatWork fatal (status=${e.status}) — tearing down work item for fast re-dispatch`),H){let e=H.getLastSequenceNum();e>G&&(G=e),H.close(),H=null}X.drop(),K&&I.stopWork(R,K,!1).catch(e=>{S(`[bridge:repl] stopWork after heartbeat fatal: ${C(e)}`)}),K=null,q=null,Y(),k?.(`reconnecting`,`Work item lease expired, fetching fresh token`)},async onEnvironmentLost(){return await $()?{environmentId:R,environmentSecret:de}:null},onWorkReceived:(e,t,i,a)=>{if(H?.isConnectedStatus()&&S(`[bridge:repl] Work received while transport connected, replacing with fresh token (workId=${i})`),S(`[bridge:repl] Work received: workId=${i} workSessionId=${e} currentSessionId=${z} match=${Ie(e,z)}`),M(n,{sessionId:z,environmentId:R,source:`repl`}),!Ie(e,z)){S(`[bridge:repl] Rejecting foreign session: expected=${z} got=${e}`);return}K=i,q=t;let o=a||r(process.env.CLAUDE_BRIDGE_USE_CCR_V2),s;if(!o){if(s=De(),!s){S(`[bridge:repl] No OAuth token available for session ingress, skipping work`);return}ye(s)}if(w(`tengu_bridge_repl_work_received`,{}),H){let e=H;H=null;let t=e.getLastSequenceNum();t>G&&(G=t),e.close()}X.deactivate();let u=e=>Qe(e,{transport:H,sessionId:z,onInterrupt:te,onSetModel:ne,onSetMaxThinkingTokens:D,onSetPermissionMode:O}),d=!1,f=e=>{H=e,e.setOnConnect(()=>{if(H===e){if(S(`[bridge:repl] Ingress transport connected`),w(`tengu_bridge_repl_ws_connected`,{}),!o){let e=De();e&&ye(e)}if(He=!1,!d&&b&&b.length>0){d=!0;let t=y,n=b.filter(e=>Ze(e)&&!x?.has(e.uuid)),r=t>0&&n.length>t?n.slice(-t):n;r.length<n.length&&(S(`[bridge:repl] Capped initial flush: ${n.length} -> ${r.length} (cap=${t})`),w(`tengu_bridge_repl_history_capped`,{eligible_count:n.length,capped_count:r.length}));let i=h(r);if(i.length>0){S(`[bridge:repl] Flushing ${i.length} initial message(s) via transport`);let t=i.map(e=>({...e,session_id:z})),n=e.droppedBatchCount;e.writeBatch(t).then(()=>{if(e.droppedBatchCount>n){S(`[bridge:repl] Initial flush dropped ${e.droppedBatchCount-n} batch(es) — not marking ${i.length} UUID(s) as flushed`);return}if(x)for(let e of i)e.uuid&&x.add(e.uuid)}).catch(e=>S(`[bridge:repl] Initial flush failed: ${e}`)).finally(()=>{H===e&&(Oe(),k?.(`connected`))})}else Oe(),k?.(`connected`)}else X.active||k?.(`connected`)}}),e.setOnData(e=>{try{let t=JSON.parse(e);U(`ingress: type=${t.type}${t.type===`control_request`?` subtype=${t.request?.subtype} request_id=${t.request_id}`:``}${t.type===`control_response`?` subtype=${t.response?.subtype} request_id=${t.response?.request_id}`:``}${t.type===`user`?` uuid=${t.uuid}`:``}${t.type===`keep_alive`?``:` len=${e.length}`}`)}catch{U(`ingress (non-JSON): ${String(e).slice(0,200)}`)}tt(e,B,_e,ee,E,u)}),Fe=je,e.setOnClose(t=>{H===e&&(U(`transport onClose: code=${t} connected=${e.isConnectedStatus()} state=${e.getStateLabel()} seq=${e.getLastSequenceNum()}`),je(t))}),!d&&b&&b.length>0&&X.start(),e.connect()};if(W++,o){let n=ze(c,e),r=W;S(`[bridge:repl] CCR v2: sessionUrl=${n} session=${e} gen=${r}`),at({sessionUrl:n,ingressToken:t,sessionId:e,initialSequenceNum:G}).then(e=>{if(V.signal.aborted){e.close();return}if(r!==W){S(`[bridge:repl] CCR v2: discarding stale handshake gen=${r} current=${W}`),e.close();return}f(e)},e=>{S(`[bridge:repl] CCR v2: createV2ReplTransport failed: ${C(e)}`,{level:`error`}),w(`tengu_bridge_repl_ccr_v2_init_failed`,{}),r===W&&(K&&(I.stopWork(R,K,!1).catch(e=>{S(`[bridge:repl] stopWork after v2 init failure: ${C(e)}`)}),K=null,q=null),Y())})}else{let t=Le(l,e);S(`[bridge:repl] Ingress URL: ${t}`),S(`[bridge:repl] Creating HybridTransport: session=${e}`);let n=s??``;f(it(new rt(new URL(t),{Authorization:`Bearer ${n}`,"anthropic-version":`2023-06-01`},e,()=>({Authorization:`Bearer ${De()??n}`,"anthropic-version":`2023-06-01`}),{maxConsecutiveFailures:50,isBridge:!0,onBatchDropped:()=>{k?.(`reconnecting`,`Lost sync with Remote Control — events could not be delivered`),Y()}})))}}});let Re=j?setInterval(()=>{Q||M(n,{sessionId:z,environmentId:R,source:`repl`})},60*6e4):null;Re?.unref?.();let Be=_().session_keepalive_interval_v2_ms,Ve=Be>0?setInterval(()=>{H&&(S(`[bridge:repl] keep_alive sent`),H.write({type:`keep_alive`}).catch(e=>{S(`[bridge:repl] keep_alive write failed: ${C(e)}`)}))},Be):null;Ve?.unref?.();let He=!1;ke=async()=>{if(He){S(`[bridge:repl] Teardown already in progress, skipping duplicate call env=${R} session=${z}`);return}He=!0;let e=Date.now();if(S(`[bridge:repl] Teardown starting: env=${R} session=${z} workId=${K??`none`} transportState=${H?.getStateLabel()??`null`}`),Re!==null&&clearInterval(Re),Ve!==null&&clearInterval(Ve),Me&&process.off(`SIGUSR2`,Me),process.env.USER_TYPE===`ant`&&(le(),Fe=null),V.abort(),S(`[bridge:repl] Teardown: poll loop aborted`),H){let e=H.getLastSequenceNum();e>G&&(G=e)}if(j){H=null,X.drop(),await M(n,{sessionId:z,environmentId:R,source:`repl`}),S(`[bridge:repl] Teardown (perpetual): leaving env=${R} session=${z} alive on server, duration=${Date.now()-e}ms`);return}let t=H;if(H=null,X.drop(),t){let e={...et(z),session_id:z};t.write(e)}let r=K?I.stopWork(R,K,!0).then(()=>{S(`[bridge:repl] Teardown: stopWork completed`)}).catch(e=>{S(`[bridge:repl] Teardown stopWork failed: ${C(e)}`)}):Promise.resolve();await Promise.all([r,p(z)]),t?.close(),S(`[bridge:repl] Teardown: transport closed`),await I.deregisterEnvironment(R).catch(e=>{S(`[bridge:repl] Teardown deregister failed: ${C(e)}`)}),await N(n),S(`[bridge:repl] Teardown complete: env=${R} duration=${Date.now()-e}ms`)};let Ue=v(()=>ke?.());return S(`[bridge:repl] Ready: env=${R} session=${z}`),k?.(`ready`),{get bridgeSessionId(){return z},get environmentId(){return R},getSSESequenceNum(){let e=H?.getLastSequenceNum()??0;return Math.max(G,e)},sessionIngressUrl:l,writeMessages(e){let t=e.filter(e=>Ze(e)&&!ge.has(e.uuid)&&!B.has(e.uuid));if(t.length===0)return;if(!Te)for(let e of t){let t=$e(e);if(t!==void 0&&A?.(t,z)){Te=!0;break}}if(X.enqueue(...t)){S(`[bridge:repl] Queued ${t.length} message(s) during initial flush`);return}if(!H){let e=t.map(e=>e.type).join(`,`);S(`[bridge:repl] Transport not configured, dropping ${t.length} message(s) [${e}] for session=${z}`,{level:`warn`});return}for(let e of t)B.add(e.uuid);S(`[bridge:repl] Sending ${t.length} message(s) via transport`);let n=h(t).map(e=>({...e,session_id:z}));H.writeBatch(n)},writeSdkMessages(e){let t=e.filter(e=>!e.uuid||!B.has(e.uuid));if(t.length===0)return;if(!H){S(`[bridge:repl] Transport not configured, dropping ${t.length} SDK message(s) for session=${z}`,{level:`warn`});return}for(let e of t)e.uuid&&B.add(e.uuid);let n=t.map(e=>({...e,session_id:z}));H.writeBatch(n)},sendControlRequest(e){if(!H){S(`[bridge:repl] Transport not configured, skipping control_request`);return}let t={...e,session_id:z};H.write(t),S(`[bridge:repl] Sent control_request request_id=${e.request_id}`)},sendControlResponse(e){if(!H){S(`[bridge:repl] Transport not configured, skipping control_response`);return}let t={...e,session_id:z};H.write(t),S(`[bridge:repl] Sent control_response`)},sendControlCancelRequest(e){if(!H){S(`[bridge:repl] Transport not configured, skipping control_cancel_request`);return}let t={type:`control_cancel_request`,request_id:e,session_id:z};H.write(t),S(`[bridge:repl] Sent control_cancel_request request_id=${e}`)},sendResult(){if(!H){S(`[bridge:repl] sendResult: skipping, transport not configured session=${z}`);return}H.reportState(`idle`);let e={...et(z),session_id:z};H.write(e),S(`[bridge:repl] Sent result for session=${z}`)},async teardown(){Ue(),await ke?.(),S(`[bridge:repl] Torn down`),w(`tengu_bridge_repl_teardown`,{})}}}async function mt({api:e,getCredentials:t,signal:n,onStateChange:r,onWorkReceived:i,onEnvironmentLost:a,getWsState:o,isAtCapacity:s,capacitySignal:c,onFatalError:l,getPollIntervalConfig:u=()=>Pe,getHeartbeatInfo:d,onHeartbeatFatal:f}){S(`[bridge:repl] Starting work poll loop for env=${t().environmentId}`);let p=0,m=null,h=null,g=0,_=!1;for(;!n.aborted;){let{environmentId:v,environmentSecret:y}=t(),b=u();try{let t=await e.pollForWork(v,y,n,b.reclaim_older_than_ms);if(g=0,p>0&&(S(`[bridge:repl] Poll recovered after ${p} consecutive error(s)`),p=0,m=null,h=null,r?.(`ready`)),!t){let t=_;if(_=!1,s?.()&&c&&!t){let t=b.poll_interval_ms_at_capacity;if(b.non_exclusive_heartbeat_interval_ms>0&&d){w(`tengu_bridge_heartbeat_mode_entered`,{heartbeat_interval_ms:b.non_exclusive_heartbeat_interval_ms});let r=t>0?Date.now()+t:null,i=!1,a=0;for(;!n.aborted&&s()&&(r===null||Date.now()<r);){let t=u();if(t.non_exclusive_heartbeat_interval_ms<=0)break;let n=d();if(!n)break;let r=c();try{await e.heartbeatWork(n.environmentId,n.workId,n.sessionToken)}catch(e){if(S(`[bridge:repl:heartbeat] Failed: ${C(e)}`),e instanceof F){r.cleanup(),w(`tengu_bridge_heartbeat_error`,{status:e.status,error_type:e.status===401||e.status===403?`auth_failed`:`fatal`}),f?(f(e),S(`[bridge:repl:heartbeat] Fatal (status=${e.status}), work state cleared — fast-polling for re-dispatch`)):i=!0;break}}a++,await A(t.non_exclusive_heartbeat_interval_ms,r.signal),r.cleanup()}let o=i?`error`:n.aborted?`shutdown`:s()?r!==null&&Date.now()>=r?`poll_due`:`config_disabled`:`capacity_changed`;if(w(`tengu_bridge_heartbeat_mode_exited`,{reason:o,heartbeat_cycles:a}),!i){o===`poll_due`&&S(`[bridge:repl] Heartbeat poll_due after ${a} cycles — falling through to pollForWork`);continue}}let r=t>0?t:b.non_exclusive_heartbeat_interval_ms;if(r>0){let e=c(),t=Date.now();await A(r,e.signal),e.cleanup();let n=Date.now()-t-r;n>6e4&&(S(`[bridge:repl] At-capacity sleep overran by ${Math.round(n/1e3)}s — process suspension detected, forcing one fast-poll cycle`),w(`tengu_bridge_repl_suspension_detected`,{overrun_ms:n}),_=!0)}}else await A(b.poll_interval_ms_not_at_capacity,n);continue}let a;try{a=Re(t.secret)}catch(n){S(`[bridge:repl] Failed to decode work secret: ${C(n)}`),w(`tengu_bridge_repl_work_secret_failed`,{}),await e.stopWork(v,t.id,!1).catch(()=>{});continue}S(`[bridge:repl] Acknowledging workId=${t.id}`);try{await e.acknowledgeWork(v,t.id,a.session_ingress_token)}catch(e){S(`[bridge:repl] Acknowledge failed workId=${t.id}: ${C(e)}`)}if(t.data.type===`healthcheck`){S(`[bridge:repl] Healthcheck received`);continue}if(t.data.type===`session`){let e=t.data.id;try{R(e,`session_id`)}catch{S(`[bridge:repl] Invalid session_id in work: ${e}`);continue}i(e,a.session_ingress_token,t.id,a.use_code_sessions===!0),S(`[bridge:repl] Work accepted, continuing poll loop`)}}catch(i){if(n.aborted)break;if(i instanceof F&&i.status===404&&a){let e=t().environmentId;if(v!==e){S(`[bridge:repl] Stale poll error for old env=${v}, current env=${e} — skipping onEnvironmentLost`),p=0,m=null;continue}if(g++,S(`[bridge:repl] Environment deleted, attempting re-registration (attempt ${g}/3)`),w(`tengu_bridge_repl_env_lost`,{attempt:g}),g>3){S(`[bridge:repl] Environment re-registration limit reached (3), giving up`),r?.(`failed`,`Environment deleted and re-registration limit reached`),l?.();break}r?.(`reconnecting`,`environment lost, recreating session`);let i=await a();if(n.aborted)break;if(i){p=0,m=null,r?.(`ready`),S(`[bridge:repl] Re-registered environment: ${i.environmentId}`);continue}r?.(`failed`,`Environment deleted and re-registration failed`),l?.();break}if(i instanceof F){let e=N(i.errorType),t=se(i);S(`[bridge:repl] Fatal poll error: ${i.message} (status=${i.status}, type=${i.errorType??`unknown`})${t?` (suppressed)`:``}`),w(`tengu_bridge_repl_fatal_error`,{status:i.status,error_type:i.errorType}),T(e?`info`:`error`,`bridge_repl_fatal_error`,{status:i.status,error_type:i.errorType}),t||r?.(`failed`,e?`session expired · /remote-control to reconnect`:i.message),l?.();break}let s=Date.now();h!==null&&s-h>6e4*2&&(S(`[bridge:repl] Detected system sleep (${Math.round((s-h)/1e3)}s gap), resetting poll error budget`),T(`info`,`bridge_repl_poll_sleep_detected`,{gapMs:s-h}),p=0,m=null),h=s,p++,m===null&&(m=s);let c=s-m,f=G(i),_=Se(i),y=o?.()??`unknown`;if(S(`[bridge:repl] Poll error (attempt ${p}, elapsed ${Math.round(c/1e3)}s, ws=${y}): ${_}`),w(`tengu_bridge_repl_poll_error`,{status:f,consecutiveErrors:p,elapsedMs:c}),p===1&&r?.(`reconnecting`,_),c>=9e5){S(`[bridge:repl] Poll failures exceeded ${dt/1e3}s (${p} errors), giving up`),T(`info`,`bridge_repl_poll_give_up`),w(`tengu_bridge_repl_poll_give_up`,{consecutiveErrors:p,elapsedMs:c,lastStatus:f}),r?.(`failed`,`connection to server lost`);break}let b=Math.min(lt*2**(p-1),ut);if(u().non_exclusive_heartbeat_interval_ms>0){let t=d?.();if(t)try{await e.heartbeatWork(t.environmentId,t.workId,t.sessionToken)}catch{}}await A(b,n)}}S(`[bridge:repl] Work poll loop ended (aborted=${n.aborted}) env=${t().environmentId}`)}x(),y(),q(),K();async function ht(t){let{onInboundMessage:n,onPermissionResponse:r,onInterrupt:a,onSetModel:s,onSetMaxThinkingTokens:d,onSetPermissionMode:h,onStateChange:g,initialMessages:v,getMessages:y,previouslyFlushedUUIDs:b,initialName:x,perpetual:ee,outboundOnly:w,tags:T}=t??{};if(Y(De),!await Ee())return J(`not_enabled`,`[bridge:repl] Skipping: bridge not enabled`),null;if(!$())return J(`no_oauth`,`[bridge:repl] Skipping: no OAuth tokens`),g?.(`failed`,`/login`),null;if(await L(),!oe(`allow_remote_control`))return J(`policy_denied`,`[bridge:repl] Skipping: allow_remote_control policy not allowed`),g?.(`failed`,`disabled by your organization's policy`),null;if(!Te()){let e=f();if(e.bridgeOauthDeadExpiresAt!=null&&(e.bridgeOauthDeadFailCount??0)>=3&&c()?.expiresAt===e.bridgeOauthDeadExpiresAt)return S(`[bridge:repl] Skipping: cross-process backoff (dead token seen ${e.bridgeOauthDeadFailCount} times)`),null;await u();let t=c();if(t&&t.expiresAt!==null&&t.expiresAt<=Date.now()){J(`oauth_expired_unrefreshable`,`[bridge:repl] Skipping: OAuth token expired and refresh failed (re-login required)`),g?.(`failed`,`/login`);let e=t.expiresAt;return l(t=>({...t,bridgeOauthDeadExpiresAt:e,bridgeOauthDeadFailCount:t.bridgeOauthDeadExpiresAt===e?(t.bridgeOauthDeadFailCount??0)+1:1})),null}}let E=Z(),D=`remote-control-${de()}`,O=!1,k=!1;if(x)D=x,O=!0,k=!0;else{let e=i(),t=e?z(e):void 0;if(t)D=t,O=!0,k=!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`||B(t))continue;let n=P(t.message.content);if(!n)continue;let r=_t(n);if(r){D=r,O=!0;break}}}let A=0,j,re=0,ie=(e,t,n)=>{O=!0,D=e,S(`[bridge:repl] derived title from message ${n}: ${e}`),Be(t,e,{baseUrl:E,getAccessToken:$}).catch(()=>{})},ae=(e,t)=>{let n=++re,r=A;Je(e,AbortSignal.timeout(15e3)).then(e=>{e&&n===re&&j===t&&!z(i())&&ie(e,t,r)})},M=(e,t)=>{if(k||z(i()))return!0;if(j!==void 0&&j!==t&&(A=0),j=t,A++,A===1&&!O){let n=_t(e);n&&ie(n,t,A),ae(e,t)}else if(A===3){let n=y?.();ae(n?Xe(I(n)):e,t)}return A>=3},N=_(`tengu_bridge_initial_history_cap`,200,300*1e3),se=Q()?`self-hosted`:await p();if(!se)return J(`no_org_uuid`,`[bridge:repl] Skipping: no org UUID`),g?.(`failed`,`/login`),null;if(ke()&&!ee){let e=await Ge();if(e)return J(`version_too_old`,`[bridge:repl] Skipping: ${e}`,!0),g?.(`failed`,"run `claude update` to upgrade"),null;S(`[bridge:repl] Using env-less bridge path (tengu_bridge_repl_v2)`);let{initEnvLessBridgeCore:t}=await import(`./remoteBridgeCore-BhOLhQIA.js`);return t({baseUrl:E,orgUUID:se,title:D,getAccessToken:$,onAuth401:m,toSDKMessages:qe,initialHistoryCap:N,initialMessages:v,onInboundMessage:n,onUserMessage:M,onPermissionResponse:r,onInterrupt:a,onSetModel:s,onSetMaxThinkingTokens:d,onSetPermissionMode:h,onStateChange:g,outboundOnly:w,tags:T})}let ce=Ae();if(ce)return J(`version_too_old`,`[bridge:repl] Skipping: ${ce}`),g?.(`failed`,"run `claude update` to upgrade"),null;let F=await te(),le=await ne(),ue=process.env.CLAUDE_BRIDGE_SESSION_INGRESS_URL||E,R=`claude_code`;{let{isAssistantMode:t}=(je(),e(Me));t()&&(R=`claude_code_assistant`)}return pt({dir:o(),machineName:st(),branch:F,gitRepoUrl:le,title:D,baseUrl:E,sessionIngressUrl:ue,workerType:R,getAccessToken:$,createSession:e=>He({...e,events:[],baseUrl:E,getAccessToken:$}),archiveSession:e=>Ue(e,{baseUrl:E,getAccessToken:$,timeoutMs:1500}).catch(e=>{S(`[bridge:repl] archiveBridgeSession threw: ${C(e)}`,{level:`error`})}),getCurrentTitle:()=>z(i())??D,onUserMessage:M,toSDKMessages:qe,onAuth401:m,getPollIntervalConfig:Fe,initialHistoryCap:N,initialMessages:v,previouslyFlushedUUIDs:b,onInboundMessage:n,onPermissionResponse:r,onInterrupt:a,onSetModel:s,onSetMaxThinkingTokens:d,onSetPermissionMode:h,onStateChange:g,perpetual:ee})}var gt=50;function _t(e){let t=O(e),n=(/^(.*?[.!?])\s/.exec(t)?.[1]??t).replace(/\s+/g,` `).trim();if(n)return n.length>gt?n.slice(0,gt-1)+`…`:n}export{ht as initReplBridge};