@readmagic/workmate 0.0.8 → 0.0.10

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 (512) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-Vmmm7p1c.js +1 -0
  2. package/dist/chunks/App-C2yQjBgY.js +1 -0
  3. package/dist/chunks/ApproveApiKey-CKbv5C1x.js +1 -0
  4. package/dist/chunks/ApproveApiKey-MscC-ssL.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-CL5NWsFL.js +2 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-CLSACUmo.js +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-BqNxQOXJ.js +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-C0-psohX.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-4mOvEer_.js +1 -0
  10. package/dist/chunks/DiffDialog-9AYwtupw.js +6 -0
  11. package/dist/chunks/Doctor-DmgAwce2.js +1 -0
  12. package/dist/chunks/Doctor-jEs9chPk.js +3 -0
  13. package/dist/chunks/ExitFlow-DVKxFdpX.js +2 -0
  14. package/dist/chunks/Grove-B9-hhkZA.js +11 -0
  15. package/dist/chunks/{HybridTransport-BJPOG2wl.js → HybridTransport-MxJ_W_np.js} +3 -3
  16. package/dist/chunks/InvalidConfigDialog-o9DF1REI.js +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-YyQcHocx.js +1 -0
  18. package/dist/chunks/MCPConnectionManager-CUTuaa8T.js +1 -0
  19. package/dist/chunks/MCPToolListView-CvqB4nCw.js +1 -0
  20. package/dist/chunks/McpParsingWarnings-BCpfHaBK.js +1 -0
  21. package/dist/chunks/MessageSelector-BLzw172f.js +3 -0
  22. package/dist/chunks/Messages-4K5sLmNh.js +11 -0
  23. package/dist/chunks/Onboarding-ClwHS5rh.js +1 -0
  24. package/dist/chunks/{PermissionDialog-0ya1CU5k.js → PermissionDialog-Cb3z8OUP.js} +1 -1
  25. package/dist/chunks/{PressEnterToContinue-Dl9Hg9Mf.js → PressEnterToContinue-Dq0Imo9c.js} +1 -1
  26. package/dist/chunks/PromptInputFooterSuggestions-BSA9NrZc.js +1 -0
  27. package/dist/chunks/PromptInputHelpMenu-Bb4KdIX_.js +1 -0
  28. package/dist/chunks/QueryEngine-DPHLSsax.js +1 -0
  29. package/dist/chunks/REPL-Bf46iQCN.js +1 -0
  30. package/dist/chunks/REPL-DIaAo9M9.js +133 -0
  31. package/dist/chunks/RemoteSessionManager-CS6mywIn.js +2 -0
  32. package/dist/chunks/ResumeConversation-Br2KsBoe.js +1 -0
  33. package/dist/chunks/{SSETransport-CrwbKuVt.js → SSETransport-CoxQ8YpH.js} +1 -1
  34. package/dist/chunks/{SearchBox-vfLXEPed.js → SearchBox-C9vUA4IM.js} +1 -1
  35. package/dist/chunks/SearchExtraToolsTool-i_YO3QvV.js +1 -0
  36. package/dist/chunks/Settings-BMXysXIx.js +2 -0
  37. package/dist/chunks/TeleportProgress-Doucj-50.js +1 -0
  38. package/dist/chunks/TeleportRepoMismatchDialog-B5I73j7Y.js +1 -0
  39. package/dist/chunks/TeleportResumeWrapper-D6kpr2c6.js +1 -0
  40. package/dist/chunks/ThemePicker-DrC8tlp0.js +1 -0
  41. package/dist/chunks/{TrustDialog-BukWGvHZ.js → TrustDialog-Fk4m_Sy4.js} +1 -1
  42. package/dist/chunks/{ValidationErrorsList-DokTJQwi.js → ValidationErrorsList-D_OUa4RT.js} +1 -1
  43. package/dist/chunks/WelcomeV2-DvfQHnZY.js +1 -0
  44. package/dist/chunks/add-dir-CZ6Clvq8.js +1 -0
  45. package/dist/chunks/{agentDisplay-DBQYOaOh.js → agentDisplay-B755vMZE.js} +1 -1
  46. package/dist/chunks/{agents-HlKk68Qc.js → agents-CIvP8l0s.js} +1 -1
  47. package/dist/chunks/agents-DHnNg4h6.js +103 -0
  48. package/dist/chunks/allErrors-CU89tF-z.js +1 -0
  49. package/dist/chunks/analytics-DJobLaWP.js +1 -0
  50. package/dist/chunks/api-BSeE6MwB.js +1 -0
  51. package/dist/chunks/{api-CF5IVtj0.js → api-nSHc_GIQ.js} +1 -1
  52. package/dist/chunks/auth-5QB6tsfB.js +15 -0
  53. package/dist/chunks/auth-BIGJth5U.js +1 -0
  54. package/dist/chunks/auth-CDQMhIZP.js +1 -0
  55. package/dist/chunks/{autoMode-Cr0AhS1G.js → autoMode-BnUiK9Cu.js} +4 -4
  56. package/dist/chunks/{autonomy-ARUQt-Lu.js → autonomy-C1aSgWPQ.js} +1 -1
  57. package/dist/chunks/autonomy-Src6sKCp.js +15 -0
  58. package/dist/chunks/{autonomyPanel-BQK9MoeB.js → autonomyPanel-DnHpuiy4.js} +1 -1
  59. package/dist/chunks/backgroundHousekeeping-B-cw0UcS.js +17 -0
  60. package/dist/chunks/backgroundHousekeeping-BS_8z3_x.js +1 -0
  61. package/dist/chunks/{banner-Ca7rki2V.js → banner-D0P7wXdw.js} +1 -1
  62. package/dist/chunks/bg-50rllUNh.js +1 -0
  63. package/dist/chunks/{bg-DxRHF1yn.js → bg-DAPORXF3.js} +2 -2
  64. package/dist/chunks/branch-DFWa4Oxo.js +3 -0
  65. package/dist/chunks/{break-cache-BKvoMOZx.js → break-cache-Chj9i9MP.js} +2 -2
  66. package/dist/chunks/{bridgeConfig-jDEva6Eh.js → bridgeConfig-Bb6URf4Q.js} +1 -1
  67. package/dist/chunks/bridgeConfig-BeqChxJC.js +1 -0
  68. package/dist/chunks/bridgeMessaging-C3huGcR3.js +1 -0
  69. package/dist/chunks/{bridgePointer-DIM0sj0x.js → bridgePointer-DLYyvRKb.js} +1 -1
  70. package/dist/chunks/bridgeStatusUtil-DFMftajD.js +1 -0
  71. package/dist/chunks/btw-DSK9R2C8.js +1 -0
  72. package/dist/chunks/caches-BTQAW9zc.js +1 -0
  73. package/dist/chunks/caches-BVtSCnV1.js +1 -0
  74. package/dist/chunks/{capacityWake-CKOiRELo.js → capacityWake-amzeeBz0.js} +1 -1
  75. package/dist/chunks/{ccrClient-BC2q3k44.js → ccrClient-Bu7Tf1Z5.js} +1 -1
  76. package/dist/chunks/{claudeDesktop-DQXL5bGm.js → claudeDesktop-CsJfF1b-.js} +1 -1
  77. package/dist/chunks/{clear-1etSJhdg.js → clear-ClFDpWVJ.js} +1 -1
  78. package/dist/chunks/{cliLaunch-CQjLYRzM.js → cliLaunch-BWcoyZDP.js} +1 -1
  79. package/dist/chunks/client-BWQ4-rN7.js +1 -0
  80. package/dist/chunks/{client-DQwf_b9o.js → client-DFlE4fYh.js} +1 -1
  81. package/dist/chunks/client-c-3-PW1F.js +1 -0
  82. package/dist/chunks/commands-Bi7k3Wg-.js +1 -0
  83. package/dist/chunks/compact-J-h0Yf4b.js +2 -0
  84. package/dist/chunks/config-CVHMRMwd.js +1 -0
  85. package/dist/chunks/config-Do1870_d.js +3 -0
  86. package/dist/chunks/config-yyFe87vW.js +1 -0
  87. package/dist/chunks/context-Tb1Ca2Q-.js +1 -0
  88. package/dist/chunks/{context-noninteractive-Ct_ttQfP.js → context-noninteractive-D5iQhasu.js} +2 -2
  89. package/dist/chunks/context-noninteractive-soPYKAc9.js +1 -0
  90. package/dist/chunks/conversation-CSEtUxOY.js +1 -0
  91. package/dist/chunks/conversation-Dk1WDQuN.js +1 -0
  92. package/dist/chunks/{createSSHSession-BmHXA2me.js → createSSHSession-CJtzNQdZ.js} +1 -1
  93. package/dist/chunks/{createSession-C4rukWkv.js → createSession-DkT1GL8y.js} +1 -1
  94. package/dist/chunks/createSession-eE8mswkv.js +1 -0
  95. package/dist/chunks/crossProjectResume-04n3Ppy9.js +40 -0
  96. package/dist/chunks/cwd-Cfdf7z7s.js +1 -0
  97. package/dist/chunks/cwd-ClLru_7T.js +1 -0
  98. package/dist/chunks/datadog-DjeJThpV.js +1 -0
  99. package/dist/chunks/{debug-RZ4NuXyS.js → debug-RAynG_nM.js} +4 -4
  100. package/dist/chunks/{debugUtils-D30M1cbN.js → debugUtils-DX0KAXNK.js} +1 -1
  101. package/dist/chunks/{detached-jrVP11oU.js → detached-X_yjYR7x.js} +1 -1
  102. package/dist/chunks/{detectRepository-CFiHe6Rv.js → detectRepository-DgpNd87p.js} +1 -1
  103. package/dist/chunks/detectRepository-ctF9KDbb.js +1 -0
  104. package/dist/chunks/{diff-BKiK3xHv.js → diff-jEJJe58I.js} +1 -1
  105. package/dist/chunks/directoryCompletion-BbXR2bfy.js +1 -0
  106. package/dist/chunks/doctor-B-Wag4C1.js +1 -0
  107. package/dist/chunks/earlyInput-BEjRkAtH.js +1 -0
  108. package/dist/chunks/{earlyInput-BTC_Wucv.js → earlyInput-IghoCjG5.js} +1 -1
  109. package/dist/chunks/entry-oIqjxIjQ.js +14 -0
  110. package/dist/chunks/envUtils-BDhHQY0-.js +1 -0
  111. package/dist/chunks/esm-Cf4nSRjF.js +1 -0
  112. package/dist/chunks/{execFileNoThrow-CCX-JY8h.js → execFileNoThrow-Dwu6psHW.js} +1 -1
  113. package/dist/chunks/{execSyncWrapper-dhRSYGFW.js → execSyncWrapper-BTZJjCuv.js} +1 -1
  114. package/dist/chunks/exit-BtW7LfRX.js +1 -0
  115. package/dist/chunks/extraUsage-Mi66JwFZ.js +1 -0
  116. package/dist/chunks/extractMemories-CUrdiNcr.js +1 -0
  117. package/dist/chunks/fast-BU4iUZ8E.js +1 -0
  118. package/dist/chunks/fast-C60p6AqJ.js +1 -0
  119. package/dist/chunks/featureCheck-D6FjD-nt.js +1 -0
  120. package/dist/chunks/featureCheck-JOur3pHb.js +1 -0
  121. package/dist/chunks/fileSuggestions-BMfQIDdW.js +3 -0
  122. package/dist/chunks/firstPartyEventLogger-B3cXgR67.js +5 -0
  123. package/dist/chunks/firstPartyEventLogger-BfCYN7lt.js +1 -0
  124. package/dist/chunks/flushGate-DgSDVGKZ.js +1 -0
  125. package/dist/chunks/{fpsMetrics-Cf_hdtiJ.js → fpsMetrics-DffAomdg.js} +1 -1
  126. package/dist/chunks/gemini-BwvSxGgn.js +1 -0
  127. package/dist/chunks/generateSessionName-DlrdedOk.js +1 -0
  128. package/dist/chunks/{genericProcessUtils-DVfMHhfy.js → genericProcessUtils-CmsUPyRz.js} +1 -1
  129. package/dist/chunks/{git-BerW9bId.js → git-2c7WlGDL.js} +1 -1
  130. package/dist/chunks/git-XtKbtJMc.js +1 -0
  131. package/dist/chunks/githubRepoPathMapping-DbWG4hFQ.js +1 -0
  132. package/dist/chunks/goal-ZmSRBx4q.js +3 -0
  133. package/dist/chunks/grok-BXMvezWb.js +1 -0
  134. package/dist/chunks/grove-CeOjTaY6.js +7 -0
  135. package/dist/chunks/help-5DNZO6_H.js +1 -0
  136. package/dist/chunks/{hooks-BZJTWD07.js → hooks-C637tFtd.js} +2 -2
  137. package/dist/chunks/hooks-DWg07LmS.js +1 -0
  138. package/dist/chunks/initReplBridge-D1h10vQ9.js +1 -0
  139. package/dist/chunks/{install-BI---dv0.js → install-C-6ItpH0.js} +1 -1
  140. package/dist/chunks/{instrumentation-CcWzhGfE.js → instrumentation-DaiPDUst.js} +4 -4
  141. package/dist/chunks/intl-D2kgJmX7.js +1 -0
  142. package/dist/chunks/{job-B0ftcqPF.js → job-BeYzQUiR.js} +1 -1
  143. package/dist/chunks/{jwtUtils-C0cE-1Ey.js → jwtUtils-CUPXdX3W.js} +1 -1
  144. package/dist/chunks/keybindings-DgIPdBy9.js +2 -0
  145. package/dist/chunks/launchLocalMemory-CE4J98xO.js +3 -0
  146. package/dist/chunks/launchOnboarding-BfTdC6vp.js +8 -0
  147. package/dist/chunks/{loadAgentsDir-ByO8eJqU.js → loadAgentsDir-C7lOqvfh.js} +2233 -2454
  148. package/dist/chunks/loadAgentsDir-zikjxLvn.js +1 -0
  149. package/dist/chunks/loadPluginHooks-Cp8MSwAc.js +1 -0
  150. package/dist/chunks/{localSearch-CHHCH16D.js → localSearch-BKrznW5x.js} +1 -1
  151. package/dist/chunks/localSearch-ZFyFy5FN.js +1 -0
  152. package/dist/chunks/log-CezCRpAN.js +1 -0
  153. package/dist/chunks/logoV2Utils-BkQfyQ1-.js +1 -0
  154. package/dist/chunks/{magicDocs-C5i5ruuU.js → magicDocs-BpVcON9o.js} +3 -3
  155. package/dist/chunks/main-9r5gLzUW.js +605 -0
  156. package/dist/chunks/{main-BLD4QAQg.js → main-CvOv59-7.js} +4 -4
  157. package/dist/chunks/managedEnv-B61yLpwp.js +1 -0
  158. package/dist/chunks/{managedEnv-C-9XSN14.js → managedEnv-DhWRJ5DK.js} +1 -1
  159. package/dist/chunks/{mappers-CHRFic5q.js → mappers-bOab8ipV.js} +1 -1
  160. package/dist/chunks/mcp-BckPBjaM.js +6 -0
  161. package/dist/chunks/mcp-CS1DA3JL.js +1 -0
  162. package/dist/chunks/mcp-VcGPYCkW.js +2 -0
  163. package/dist/chunks/{memoize-B8hfb1JN.js → memoize-DsqYrbeR.js} +1 -1
  164. package/dist/chunks/memory-C5ohwh-T.js +1 -0
  165. package/dist/chunks/{modalContext-DFjKLCB6.js → modalContext-CUThy6Ph.js} +1 -1
  166. package/dist/chunks/mode-DlKnUM8l.js +2 -0
  167. package/dist/chunks/model-BGu1AGq0.js +1 -0
  168. package/dist/chunks/model-BsZ4sP_H.js +1 -0
  169. package/dist/chunks/model-D19IIcll.js +1 -0
  170. package/dist/chunks/modelOptions-CxP067Qv.js +1 -0
  171. package/dist/chunks/nativeInstaller-QB8cEJ18.js +1 -0
  172. package/dist/chunks/oauth-BN2I0_jl.js +1 -0
  173. package/dist/chunks/oauth-C9VBDB0Y.js +1 -0
  174. package/dist/chunks/omit-DDUIPHnl.js +1 -0
  175. package/dist/chunks/onChangeAppState-RBl6H7ho.js +1 -0
  176. package/dist/chunks/{openai-DPH6rXOZ.js → openai-B9C2XN5Q.js} +3 -3
  177. package/dist/chunks/{panel-mD094ALT.js → panel-KW-wmEvU.js} +1 -1
  178. package/dist/chunks/{parser-dbHRgXb8.js → parser-BwPXQomy.js} +1 -1
  179. package/dist/chunks/parser-xSBaQRLH.js +1 -0
  180. package/dist/chunks/partition-D-UhsUCx.js +1 -0
  181. package/dist/chunks/permissions-BoLXYN1j.js +3 -0
  182. package/dist/chunks/pidLock-nJHbufJN.js +3 -0
  183. package/dist/chunks/plan-CyU2zrCK.js +1 -0
  184. package/dist/chunks/{platform-DCXXznJg.js → platform-BMPbglug.js} +1 -1
  185. package/dist/chunks/plugin-C6-GQke5.js +17 -0
  186. package/dist/chunks/pluginAutoupdate-SlRFJlTT.js +1 -0
  187. package/dist/chunks/{pluginBlocklist-PwHHD3nj.js → pluginBlocklist-n6Imlh3y.js} +1 -1
  188. package/dist/chunks/pluginCliCommands-Bd96zSOQ.js +1 -0
  189. package/dist/chunks/{pluginFlagging-pBxSselw.js → pluginFlagging-DZaYzecY.js} +1 -1
  190. package/dist/chunks/pluginOperations-D90IRawu.js +2 -0
  191. package/dist/chunks/pluginStartupCheck-Bxkxpm4k.js +1 -0
  192. package/dist/chunks/{pluginStartupCheck-Di4LjHXf.js → pluginStartupCheck-CB2q2dLv.js} +1 -1
  193. package/dist/chunks/plugins-B9eSjLSA.js +4 -0
  194. package/dist/chunks/poorMode-BAnubpn1.js +1 -0
  195. package/dist/chunks/{poorMode-CYXmr_mU.js → poorMode-DEwQOAJt.js} +1 -1
  196. package/dist/chunks/print-eCRv_Li-.js +26 -0
  197. package/dist/chunks/processBashCommand-B5F2Cl7K.js +1 -0
  198. package/dist/chunks/processSlashCommand-BC_D3cH5.js +5 -0
  199. package/dist/chunks/{projectContext-D9MDwJUF.js → projectContext-CIxul6vA.js} +1 -1
  200. package/dist/chunks/{projectContext-BaDZBAoK.js → projectContext-RUMJB798.js} +1 -1
  201. package/dist/chunks/prompt-C1JPqinc.js +1 -0
  202. package/dist/chunks/prompt-DZhBz_Vu.js +1 -0
  203. package/dist/chunks/prompt-M2lu8_Oa.js +139 -0
  204. package/dist/chunks/promptEditor-DhcZY-iu.js +4 -0
  205. package/dist/chunks/{protocolHandler-RNKkhq91.js → protocolHandler-CkFaJKKo.js} +1 -1
  206. package/dist/chunks/{proxy-BmtEnJ02.js → proxy-CuMaO_YV.js} +1 -1
  207. package/dist/chunks/reconciler-B4GDm_iC.js +1 -0
  208. package/dist/chunks/refresh-DBVizOzg.js +1 -0
  209. package/dist/chunks/{registerProtocol-DoKqmqu2.js → registerProtocol-CsNYRZKr.js} +1 -1
  210. package/dist/chunks/reload-plugins-B7JAE3b4.js +1 -0
  211. package/dist/chunks/{remoteBridgeCore-Cddqv2WW.js → remoteBridgeCore-CFLJhsB6.js} +1 -1
  212. package/dist/chunks/remoteManagedSettings-xh_MViZH.js +1 -0
  213. package/dist/chunks/rename-BCp2Vtqu.js +1 -0
  214. package/dist/chunks/{renderOptions-ChLwxtVu.js → renderOptions-Q5oCLFIC.js} +1 -1
  215. package/dist/chunks/resume-DVCSzKvv.js +2 -0
  216. package/dist/chunks/{ripgrep-gaT9Njwi.js → ripgrep-DvOOsDMv.js} +1 -1
  217. package/dist/chunks/ripgrep-e-iewvTf.js +1 -0
  218. package/dist/chunks/{runtimeObserver-Dbxxw4ls.js → runtimeObserver-CS_3BDNo.js} +4 -4
  219. package/dist/chunks/{runtimeObserver-CsIwinzh.js → runtimeObserver-DYUva6g-.js} +1 -1
  220. package/dist/chunks/sandbox-adapter-BFZFHplu.js +1 -0
  221. package/dist/chunks/sandbox-toggle--zNSKce_.js +1 -0
  222. package/dist/chunks/searchExtraTools-ui5y2VSE.js +1 -0
  223. package/dist/chunks/session-CO3gEqQP.js +2 -0
  224. package/dist/chunks/sessionFileAccessHooks-CZvCqQJ6.js +1 -0
  225. package/dist/chunks/sessionObserver-Ba7um95p.js +1 -0
  226. package/dist/chunks/{sessionObserver-DoYc0ZOP.js → sessionObserver-YkRHC-Aa.js} +2 -2
  227. package/dist/chunks/sessionState-Bifmu95-.js +11 -0
  228. package/dist/chunks/sessionStorage-CedwLLQs.js +1 -0
  229. package/dist/chunks/{sessionStoragePortable-Cx6JQ5Ye.js → sessionStoragePortable-JZnGwqUM.js} +1 -1
  230. package/dist/chunks/sessionTitle-COBSgSXS.js +14 -0
  231. package/dist/chunks/sessionTracing-BrNx1k2V.js +11 -0
  232. package/dist/chunks/settings-DkDH7WQT.js +1 -0
  233. package/dist/chunks/settings-DnptdP79.js +20 -0
  234. package/dist/chunks/settingsSync-PmU7SmkU.js +1 -0
  235. package/dist/chunks/setup-BEsBuzsk.js +3 -0
  236. package/dist/chunks/shadowedRuleDetection-DEaw-X5j.js +1 -0
  237. package/dist/chunks/{shellQuote-BUVKMu_P.js → shellQuote-BYeOv3Ip.js} +1 -1
  238. package/dist/chunks/{sideQuestion-C780iYwd.js → sideQuestion-D0OKljee.js} +3 -3
  239. package/dist/chunks/sinks-BJHgxz6Y.js +1 -0
  240. package/dist/chunks/sinks-D5-yhcgU.js +2 -0
  241. package/dist/chunks/skillChangeDetector-Dd0WPdkO.js +1 -0
  242. package/dist/chunks/{skillGapStore-Dc1arohs.js → skillGapStore-N_kmvXML.js} +2 -2
  243. package/dist/chunks/{skillLifecycle-DP6mY1Kp.js → skillLifecycle-C4F5RXuh.js} +2 -2
  244. package/dist/chunks/{skillSearchPanel-CpLTImaL.js → skillSearchPanel-CftorvAM.js} +4 -4
  245. package/dist/chunks/skills-C4CTRN9o.js +1 -0
  246. package/dist/chunks/{src-CDCSSo0U2.js → src-P_wYS_NJ2.js} +1 -1
  247. package/dist/chunks/{src-CST_jFnT.js → src-r6ZFgWPx2.js} +1 -1
  248. package/dist/chunks/startupProfiler-D4FBdEQr.js +1 -0
  249. package/dist/chunks/{startupProfiler-DCn_NxMH.js → startupProfiler-L_UWZ03w.js} +3 -3
  250. package/dist/chunks/{state-Cn_m2NOf.js → state-BAGmpVBn.js} +1 -1
  251. package/dist/chunks/state-BemZdQIl.js +1 -0
  252. package/dist/chunks/state-D_lk6z-C.js +1 -0
  253. package/dist/chunks/{staticRender-BIxpgNUq.js → staticRender-DrU6eWoq.js} +1 -1
  254. package/dist/chunks/{stats-Duk7_xjQ.js → stats-IzV0_vEc.js} +1 -1
  255. package/dist/chunks/{status-peiVB_2j.js → status-CeVP_uDT.js} +1 -1
  256. package/dist/chunks/status-Dzuw3hBv.js +2 -0
  257. package/dist/chunks/statusNoticeHelpers-Bb9gxdSt.js +1 -0
  258. package/dist/chunks/{stringUtils-B6FudhoZ.js → stringUtils-C84IJ91d.js} +1 -1
  259. package/dist/chunks/subprocessEnv-CZkA9Cdp.js +1 -0
  260. package/dist/chunks/{subprocessEnv-vrwzMgKn.js → subprocessEnv-Ci8VV_bi.js} +1 -1
  261. package/dist/chunks/switcher-4KzBvuKH.js +1 -0
  262. package/dist/chunks/{switcher-BAMqSX7Z.js → switcher-CCs9xl1z.js} +1 -1
  263. package/dist/chunks/{syncCache-Zl9kZRRl.js → syncCache-CBRiRU5x.js} +1 -1
  264. package/dist/chunks/tasks-DZDhgx0w.js +1 -0
  265. package/dist/chunks/teleport-Bw0jSxe9.js +1 -0
  266. package/dist/chunks/{templateJobs-DR5fKFiO.js → templateJobs-CrNPEKkh.js} +1 -1
  267. package/dist/chunks/{terminalSetup-DgRBt-JJ.js → terminalSetup-CBqcwQll.js} +1 -1
  268. package/dist/chunks/terminalSetup-D-N8YPiQ.js +33 -0
  269. package/dist/chunks/{theme-Bz6esfST.js → theme-Dazsirbw.js} +1 -1
  270. package/dist/chunks/{tmux-DSU9tYIo.js → tmux-DewYVEBm.js} +1 -1
  271. package/dist/chunks/{toolEventObserver-BSekCkM2.js → toolEventObserver-lnHJ9fLQ.js} +1 -1
  272. package/dist/chunks/toolPool-CkXFlqsn.js +1 -0
  273. package/dist/chunks/{trustedDevice-B0x9X0fb.js → trustedDevice-CFf5yaG-.js} +1 -1
  274. package/dist/chunks/trustedDevice-CuwSv8dG.js +1 -0
  275. package/dist/chunks/{types-D7_37tP2.js → types-3j8PS-Du.js} +1 -1
  276. package/dist/chunks/{udsClient-CHoMMH28.js → udsClient-e9dIkwVA.js} +1 -1
  277. package/dist/chunks/updateCCB-BPe9_FW6.js +11 -0
  278. package/dist/chunks/{upstreamproxy-Hmq-n8fw.js → upstreamproxy-DF00RzGG.js} +1 -1
  279. package/dist/chunks/useExitOnCtrlCDWithKeybindings-ChqBs9Lr.js +1 -0
  280. package/dist/chunks/useMainLoopModel-2-eujv0n.js +1 -0
  281. package/dist/chunks/useManagePlugins-CYBIkaB1.js +1 -0
  282. package/dist/chunks/useMergedTools-Dk5cPqLc.js +1 -0
  283. package/dist/chunks/useSearchInput-C7Y1I9P9.js +1 -0
  284. package/dist/chunks/useSettingsErrors-DAEO7AyB.js +1 -0
  285. package/dist/chunks/{userAgent-BxTG7IMk.js → userAgent-CIq27vUR.js} +1 -1
  286. package/dist/chunks/util-VO98TdOz.js +1 -0
  287. package/dist/chunks/{validatePlugin-AHl-g4ct.js → validatePlugin-Kk6pxnO2.js} +1 -1
  288. package/dist/chunks/vim-EYQn94Kx.js +1 -0
  289. package/dist/chunks/{which-CHLNJmtJ.js → which-DzFN5TNM.js} +1 -1
  290. package/dist/chunks/{windowsPaths-o62uq6LF.js → windowsPaths-BU3yQWTB.js} +1 -1
  291. package/dist/chunks/windowsPaths-DgZ3YY4a.js +1 -0
  292. package/dist/chunks/{workSecret-DG9shvG0.js → workSecret-DUqdPy44.js} +1 -1
  293. package/dist/chunks/workerRegistry-C07BcZIw.js +6 -0
  294. package/dist/chunks/worktree-dFUkhVE_.js +1 -0
  295. package/dist/cli.js +1 -1
  296. package/package.json +1 -1
  297. package/dist/chunks/AddWorkspaceDirectory-CwLtQld4.js +0 -1
  298. package/dist/chunks/App-Ba52HvYC.js +0 -1
  299. package/dist/chunks/ApproveApiKey-CEIfuUh0.js +0 -1
  300. package/dist/chunks/ApproveApiKey-D2MLQu2P.js +0 -1
  301. package/dist/chunks/BackgroundTasksDialog-IGDrkbWl.js +0 -2
  302. package/dist/chunks/BypassPermissionsModeDialog-GYhq--JR.js +0 -1
  303. package/dist/chunks/ClaudeMdExternalIncludesDialog-C-CTa-95.js +0 -1
  304. package/dist/chunks/ClaudeMdExternalIncludesDialog-Catv6BCJ.js +0 -1
  305. package/dist/chunks/ConsoleOAuthFlow-BeQXqUtX.js +0 -1
  306. package/dist/chunks/DiffDialog-AC5DSJrq.js +0 -6
  307. package/dist/chunks/Doctor-B9Rxsoy0.js +0 -1
  308. package/dist/chunks/Doctor-lhUBhEy5.js +0 -3
  309. package/dist/chunks/ExitFlow-Cu8SoQHs.js +0 -2
  310. package/dist/chunks/Grove-Bc4CofEj.js +0 -11
  311. package/dist/chunks/InvalidConfigDialog-BI13il58.js +0 -1
  312. package/dist/chunks/InvalidSettingsDialog-CtOheV1K.js +0 -1
  313. package/dist/chunks/MCPConnectionManager-ao-P3xSA.js +0 -1
  314. package/dist/chunks/MCPToolListView-dkofcJs4.js +0 -1
  315. package/dist/chunks/McpParsingWarnings-BS4JoR5l.js +0 -1
  316. package/dist/chunks/MessageSelector-B88b2ypw.js +0 -3
  317. package/dist/chunks/Messages-BPeI7lLV.js +0 -11
  318. package/dist/chunks/Onboarding-c2fQ8Io_.js +0 -1
  319. package/dist/chunks/PromptInputFooterSuggestions-D1cH9sDX.js +0 -1
  320. package/dist/chunks/PromptInputHelpMenu-DDD5WuK0.js +0 -1
  321. package/dist/chunks/QueryEngine-Cv_meCam.js +0 -1
  322. package/dist/chunks/REPL-BXhAQOXb.js +0 -139
  323. package/dist/chunks/REPL-YqjLnr3A.js +0 -1
  324. package/dist/chunks/RemoteSessionManager-CT7T8BaR.js +0 -2
  325. package/dist/chunks/ResumeConversation-CIZCjms9.js +0 -1
  326. package/dist/chunks/SearchExtraToolsTool-Dx6093yw.js +0 -1
  327. package/dist/chunks/Settings-CyUm0AtU.js +0 -2
  328. package/dist/chunks/TeleportProgress-C3qyp5zy.js +0 -1
  329. package/dist/chunks/TeleportRepoMismatchDialog-BV--nyYn.js +0 -1
  330. package/dist/chunks/TeleportResumeWrapper-Blo2cZg-.js +0 -1
  331. package/dist/chunks/ThemePicker-EQ6hPUeI.js +0 -1
  332. package/dist/chunks/WelcomeV2-Ci9VwPYh.js +0 -1
  333. package/dist/chunks/add-dir-DPQV0qml.js +0 -1
  334. package/dist/chunks/agents-DmybpgDN.js +0 -103
  335. package/dist/chunks/allErrors-BPn_2TrB.js +0 -1
  336. package/dist/chunks/analytics-CkYUHW_U.js +0 -1
  337. package/dist/chunks/ant-DjdvlLOo.js +0 -1
  338. package/dist/chunks/api-AMgj1zf_.js +0 -1
  339. package/dist/chunks/asciicast-BJNYO5sh.js +0 -4
  340. package/dist/chunks/asciicast-CH6hdK0a.js +0 -1
  341. package/dist/chunks/attributionTrailer-oKKrF3z8.js +0 -1
  342. package/dist/chunks/auth-CNjDn1VY.js +0 -15
  343. package/dist/chunks/auth-CZzP483s.js +0 -1
  344. package/dist/chunks/auth-DDSBm_Yj.js +0 -1
  345. package/dist/chunks/autonomy-D4xZLOdJ.js +0 -15
  346. package/dist/chunks/backgroundHousekeeping--eBgphcg.js +0 -17
  347. package/dist/chunks/backgroundHousekeeping-VV1V_Y2Z.js +0 -1
  348. package/dist/chunks/bg-BK_9J6F6.js +0 -1
  349. package/dist/chunks/branch-BYq0zpzT.js +0 -3
  350. package/dist/chunks/bridgeConfig-C82un7rJ.js +0 -1
  351. package/dist/chunks/bridgeMessaging-YqYdl6ej.js +0 -1
  352. package/dist/chunks/btw-CUV3nRrE.js +0 -1
  353. package/dist/chunks/caches-BZ59_En6.js +0 -1
  354. package/dist/chunks/caches-Cg-HtWKG.js +0 -1
  355. package/dist/chunks/client-DQXvVKND.js +0 -1
  356. package/dist/chunks/client-DkgC-mFB.js +0 -1
  357. package/dist/chunks/color-CBsNbt1s.js +0 -1
  358. package/dist/chunks/commands-qM5z_Uld.js +0 -1
  359. package/dist/chunks/compact-BclJiRJe.js +0 -2
  360. package/dist/chunks/completionCache-BMHAktkM.js +0 -1
  361. package/dist/chunks/config-CE058cvr.js +0 -3
  362. package/dist/chunks/config-D81avYye.js +0 -1
  363. package/dist/chunks/config-DpOOllGk.js +0 -1
  364. package/dist/chunks/context-noninteractive-DJb8H_hN.js +0 -1
  365. package/dist/chunks/context-sR9fJmXE.js +0 -1
  366. package/dist/chunks/conversation-D48Kt3ar.js +0 -1
  367. package/dist/chunks/conversation-fOFTa7k5.js +0 -1
  368. package/dist/chunks/createSession-CSwlW2T2.js +0 -1
  369. package/dist/chunks/crossProjectResume-lDFB2ZcY.js +0 -40
  370. package/dist/chunks/cwd-5Xr-Qka6.js +0 -1
  371. package/dist/chunks/cwd-C5ce-7WB.js +0 -1
  372. package/dist/chunks/daemon-ZtpTZWgQ.js +0 -2
  373. package/dist/chunks/datadog-BJn5ECIu.js +0 -1
  374. package/dist/chunks/detectRepository-DqQvyj_a.js +0 -1
  375. package/dist/chunks/directoryCompletion-BagQcynj.js +0 -1
  376. package/dist/chunks/doctor-BEHYm34V.js +0 -1
  377. package/dist/chunks/earlyInput-xcoTbKQn.js +0 -1
  378. package/dist/chunks/entry-BzL1MFQG.js +0 -14
  379. package/dist/chunks/envUtils-DSxRz_kt.js +0 -1
  380. package/dist/chunks/esm-BLPbfHQd.js +0 -1
  381. package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +0 -1
  382. package/dist/chunks/exit-DE2YiAhQ.js +0 -1
  383. package/dist/chunks/extraUsage-Dw7AXiH7.js +0 -1
  384. package/dist/chunks/extractMemories-DxTUMiv3.js +0 -1
  385. package/dist/chunks/fast-CHmMkIpE.js +0 -1
  386. package/dist/chunks/fast-uQASHWqR.js +0 -1
  387. package/dist/chunks/featureCheck-CrJeuheQ.js +0 -1
  388. package/dist/chunks/featureCheck-HslM03dr.js +0 -1
  389. package/dist/chunks/fileSuggestions-Dyu2kQtE.js +0 -3
  390. package/dist/chunks/firstPartyEventLogger-D5ohKbIe.js +0 -5
  391. package/dist/chunks/firstPartyEventLogger-LsNY6yOt.js +0 -1
  392. package/dist/chunks/flushGate-Cnsu4HET.js +0 -1
  393. package/dist/chunks/gemini-Cudre91e.js +0 -1
  394. package/dist/chunks/generateRecap-CiFxXlmH.js +0 -1
  395. package/dist/chunks/generateSessionName-DitoBxJT.js +0 -1
  396. package/dist/chunks/git-D6dOU2mT.js +0 -1
  397. package/dist/chunks/githubRepoPathMapping-DGr0kJ8D.js +0 -1
  398. package/dist/chunks/goal-DuUayfDg.js +0 -3
  399. package/dist/chunks/grok-tRbmZzEh.js +0 -1
  400. package/dist/chunks/grove-Cv19v6Sv.js +0 -7
  401. package/dist/chunks/help-DkqxbFDM.js +0 -1
  402. package/dist/chunks/hooks-CsP42iOp.js +0 -1
  403. package/dist/chunks/initReplBridge-DdsSWVqN.js +0 -1
  404. package/dist/chunks/intl-cKc-V6Mq.js +0 -1
  405. package/dist/chunks/keybindings-DZU3vwo3.js +0 -2
  406. package/dist/chunks/language-DHhXLb_Y.js +0 -1
  407. package/dist/chunks/language-s-dLbdVz.js +0 -1
  408. package/dist/chunks/launchLocalMemory-twLxpPvg.js +0 -3
  409. package/dist/chunks/launchOnboarding-BWz2XSb9.js +0 -8
  410. package/dist/chunks/lib-rQZENxQg.js +0 -8
  411. package/dist/chunks/loadAgentsDir-CMNFLt7R.js +0 -1
  412. package/dist/chunks/loadPluginHooks-BPnxcgrL.js +0 -1
  413. package/dist/chunks/localSearch-DzQODFap.js +0 -1
  414. package/dist/chunks/log-CZ0zYP_c.js +0 -1
  415. package/dist/chunks/logoV2Utils-CGUJ-5gY.js +0 -1
  416. package/dist/chunks/main-D4Uk-WUs.js +0 -862
  417. package/dist/chunks/managedEnv-DLVRBaA9.js +0 -1
  418. package/dist/chunks/mcp-BMVdGknC.js +0 -1
  419. package/dist/chunks/mcp-COS5RJFS.js +0 -6
  420. package/dist/chunks/mcp-tGsOW1GN.js +0 -2
  421. package/dist/chunks/memory-DR6poqeH.js +0 -1
  422. package/dist/chunks/mode-QV-NW1Wd.js +0 -2
  423. package/dist/chunks/model-BF_4ebyl.js +0 -1
  424. package/dist/chunks/model-BNU_ulDJ.js +0 -1
  425. package/dist/chunks/model-CwO-g1RW.js +0 -1
  426. package/dist/chunks/nativeInstaller-B-lNJjM-.js +0 -1
  427. package/dist/chunks/oauth-BqJqV-2M.js +0 -1
  428. package/dist/chunks/oauth-C8X_p8Gc.js +0 -1
  429. package/dist/chunks/omit-DZCEXri5.js +0 -1
  430. package/dist/chunks/onChangeAppState-BmfM5g-D.js +0 -1
  431. package/dist/chunks/p-map-B1EeBuI8.js +0 -1
  432. package/dist/chunks/p-map-HKDr3iDo.js +0 -1
  433. package/dist/chunks/panelCall-SbffM7G4.js +0 -1
  434. package/dist/chunks/parser-DrBC8nWp.js +0 -1
  435. package/dist/chunks/partition-DKuAFJkc.js +0 -1
  436. package/dist/chunks/path-Cv9QMBAX.js +0 -1
  437. package/dist/chunks/permissions-ey-bfanE.js +0 -3
  438. package/dist/chunks/pidLock-DJnS_38v.js +0 -3
  439. package/dist/chunks/pipeTransport-DVOKR4c_.js +0 -1
  440. package/dist/chunks/plan-Brg9XnRr.js +0 -1
  441. package/dist/chunks/plugin-CRwa39Y1.js +0 -17
  442. package/dist/chunks/pluginAutoupdate-D0LIP7cy.js +0 -1
  443. package/dist/chunks/pluginCliCommands-BJM5Bdpf.js +0 -1
  444. package/dist/chunks/pluginOperations-C7p_Qr2r.js +0 -2
  445. package/dist/chunks/pluginStartupCheck-C0HqhG6D.js +0 -1
  446. package/dist/chunks/plugins-DUKNjLq6.js +0 -4
  447. package/dist/chunks/poorMode-CejPNCp-.js +0 -1
  448. package/dist/chunks/print-gyTOCJzk.js +0 -23
  449. package/dist/chunks/processBashCommand-Cze9vCm6.js +0 -1
  450. package/dist/chunks/processSlashCommand-BRajh1v7.js +0 -5
  451. package/dist/chunks/prompt-B7joRiqj.js +0 -139
  452. package/dist/chunks/prompt-DqSMh2x9.js +0 -1
  453. package/dist/chunks/prompt-Eysh8Et_.js +0 -1
  454. package/dist/chunks/promptEditor-R_acDAgI.js +0 -4
  455. package/dist/chunks/reconciler-BfkO6X2X.js +0 -4
  456. package/dist/chunks/refresh-C1X3sptR.js +0 -1
  457. package/dist/chunks/reload-plugins-C0osFcNh.js +0 -1
  458. package/dist/chunks/remoteManagedSettings-B1mnRDmA.js +0 -1
  459. package/dist/chunks/rename-B3tf-YiD.js +0 -1
  460. package/dist/chunks/replBridgeHandle-CNwNIijW.js +0 -1
  461. package/dist/chunks/resume-Be1G_GBL.js +0 -2
  462. package/dist/chunks/ripgrep-C2PhTJDh.js +0 -1
  463. package/dist/chunks/rollback-BPWRKlIZ.js +0 -11
  464. package/dist/chunks/sandbox-adapter-C6GBuJPB.js +0 -1
  465. package/dist/chunks/sandbox-toggle-jEySONTW.js +0 -1
  466. package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +0 -1
  467. package/dist/chunks/searchExtraTools-C_UTryh_.js +0 -1
  468. package/dist/chunks/session-DDI1Eb2x.js +0 -2
  469. package/dist/chunks/sessionDataUploader-CaCjwsA2.js +0 -1
  470. package/dist/chunks/sessionFileAccessHooks-DfJ7Htfl.js +0 -1
  471. package/dist/chunks/sessionMemory-CQBxPkTQ.js +0 -1
  472. package/dist/chunks/sessionMemory-s0ALUHvc.js +0 -1
  473. package/dist/chunks/sessionMemoryUtils-xt7dTHGC.js +0 -1
  474. package/dist/chunks/sessionObserver-C2sYqWL3.js +0 -1
  475. package/dist/chunks/sessionState-CjNY991n.js +0 -11
  476. package/dist/chunks/sessionStorage-DqsY-7pi.js +0 -1
  477. package/dist/chunks/sessionTitle-B0OYf5nM.js +0 -14
  478. package/dist/chunks/sessionTracing-CwsXt_uA.js +0 -11
  479. package/dist/chunks/settings-BWtOA9A7.js +0 -1
  480. package/dist/chunks/settings-hQDLwPVj.js +0 -20
  481. package/dist/chunks/settingsSync-DdFagwHV.js +0 -1
  482. package/dist/chunks/setup-DzC22EkN.js +0 -3
  483. package/dist/chunks/shadowedRuleDetection-C86PTj1m.js +0 -1
  484. package/dist/chunks/sinks-5G_xhc1Q.js +0 -1
  485. package/dist/chunks/sinks-Cftq7Es0.js +0 -2
  486. package/dist/chunks/skillChangeDetector-plLveEbf.js +0 -1
  487. package/dist/chunks/skills-zGYaYfFV.js +0 -1
  488. package/dist/chunks/startupProfiler-JbpAkfNE.js +0 -1
  489. package/dist/chunks/state-C2OSZkV1.js +0 -1
  490. package/dist/chunks/state-DU9lRJ9x.js +0 -1
  491. package/dist/chunks/status-CFw-FpZM.js +0 -2
  492. package/dist/chunks/statusNoticeHelpers-B5U5c9PE.js +0 -1
  493. package/dist/chunks/subprocessEnv-BSQSomcK.js +0 -1
  494. package/dist/chunks/switcher-hgBgVzLb.js +0 -1
  495. package/dist/chunks/tasks-BxpyRhmD.js +0 -1
  496. package/dist/chunks/teleport-CwxeD5vL.js +0 -1
  497. package/dist/chunks/terminalSetup-DlaFWI81.js +0 -33
  498. package/dist/chunks/toolPool-B7SIoDw5.js +0 -1
  499. package/dist/chunks/trustedDevice-CjHQtVkO.js +0 -1
  500. package/dist/chunks/up-B8wBSpLg.js +0 -12
  501. package/dist/chunks/updateCCB-D_kGQKPT.js +0 -11
  502. package/dist/chunks/useExitOnCtrlCDWithKeybindings-Cce612uS.js +0 -1
  503. package/dist/chunks/useMainLoopModel-BICP6_Fi.js +0 -1
  504. package/dist/chunks/useManagePlugins-DtbY_vPL.js +0 -1
  505. package/dist/chunks/useMergedTools-Ckx2IEhF.js +0 -1
  506. package/dist/chunks/useSearchInput-BAgljZUl.js +0 -1
  507. package/dist/chunks/useSettingsErrors-CAJR_wpd.js +0 -1
  508. package/dist/chunks/util-DDtmyq_r.js +0 -1
  509. package/dist/chunks/vim-kg-mRVbu.js +0 -1
  510. package/dist/chunks/windowsPaths-Pmx8LDR6.js +0 -1
  511. package/dist/chunks/workerRegistry-C7H_lsQX.js +0 -6
  512. package/dist/chunks/worktree-O2p-mJdF.js +0 -1
@@ -25,7 +25,7 @@ No matching component was found for:
25
25
  `)i&&(r+=ws(``)),r+=Fs(a);else if(t===`
26
26
  `){let e=[...a];Ps(c.slice(u+1),e),r+=Is(e),i&&(r+=ws(i))}u+=t.length}return r}})),Us,Ws=t((()=>{Hs(),Us=(typeof Bun<`u`&&typeof Bun.wrapAnsi==`function`?Bun.wrapAnsi:null)??$o}));function Gs(e,t,n){let r=No(e,t,n);return la(r)>n-t?No(e,t,n-1):r}function Ks(e,t,n){if(t<1)return``;if(t===1)return Js;let r=la(e);if(r<=t)return e;if(n===`start`)return Js+Gs(e,r-t+1,r);if(n===`middle`){let n=Math.floor(t/2);return Gs(e,0,n)+Js+Gs(e,r-(t-n)+1,r)}return Gs(e,0,t-1)+Js}function qs(e,t,n){if(n===`wrap`)return Us(e,t,{trim:!1,hard:!0});if(n===`wrap-trim`)return Us(e,t,{trim:!0,hard:!0});if(n.startsWith(`truncate`)){let r=`end`;return n===`truncate-middle`&&(r=`middle`),n===`truncate-start`&&(r=`start`),Ks(e,t,r)}return e}var Js,Ys=t((()=>{Po(),ua(),Ws(),Js=`…`}));function Xs(e,t,n=!1){if(t.nodeName===`#text`)return;let r=t,i=n||r.style.position===`absolute`,a=ya.get(r);a&&(_a(e,a,i),ya.delete(r));for(let t of r.childNodes)Xs(e,t,i)}function Zs(e,t){return Qs(e,t)}function Qs(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function $s(e){return e.nodeName!==`#text`}function ec(e,t){let n=[];return r(e,0),n;function r(e,i){let a=e.yogaNode;if(!a||a.getDisplay()===mi.None)return;let o=i+a.getComputedTop(),s=a.getComputedHeight();if(!(t<o||t>=o+s)){e.debugOwnerChain&&(n=e.debugOwnerChain);for(let t of e.childNodes)$s(t)&&r(t,o)}}}var tc,nc,rc,ic,ac,oc,sc,cc,lc,uc,dc,fc,pc,mc,hc=t((()=>{ki(),Si(),ga(),Sa(),Ta(),Da(),Ys(),tc=e=>{let t={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:e!==`ink-virtual-text`&&e!==`ink-link`&&e!==`ink-progress`?Oi():void 0,dirty:!1};return e===`ink-text`?t.yogaNode?.setMeasureFunc(lc.bind(null,t)):e===`ink-raw-ansi`&&t.yogaNode?.setMeasureFunc(uc.bind(null,t)),t},nc=(e,t)=>{t.parentNode&&ic(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),dc(e)},rc=(e,t,n)=>{t.parentNode&&ic(t.parentNode,t),t.parentNode=e;let r=e.childNodes.indexOf(n);if(r>=0){let n=0;if(t.yogaNode&&e.yogaNode)for(let t=0;t<r;t++)e.childNodes[t]?.yogaNode&&n++;e.childNodes.splice(r,0,t),t.yogaNode&&e.yogaNode&&e.yogaNode.insertChild(t.yogaNode,n),dc(e);return}e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),dc(e)},ic=(e,t)=>{t.yogaNode&&t.parentNode?.yogaNode?.removeChild(t.yogaNode),Xs(e,t),t.parentNode=void 0;let n=e.childNodes.indexOf(t);n>=0&&e.childNodes.splice(n,1),dc(e)},ac=(e,t,n)=>{t!==`children`&&e.attributes[t]!==n&&(e.attributes[t]=n,dc(e))},oc=(e,t)=>{Zs(e.style,t)||(e.style=t,dc(e))},sc=(e,t)=>{Qs(e.textStyles,t)||(e.textStyles=t,dc(e))},cc=e=>{let t={nodeName:`#text`,nodeValue:e,yogaNode:void 0,parentNode:void 0,style:{}};return pc(t,e),t},lc=function(e,t,n){let r=Ea(e.nodeName===`#text`?e.nodeValue:wa(e)),i=ha(r,t);return i.width<=t||i.width>=1&&t>0&&t<1?i:r.includes(`
27
27
  `)&&n===xi.Undefined?ha(r,Math.max(t,i.width)):ha(qs(r,t,e.style?.textWrap??`wrap`),t)},uc=function(e){return{width:e.attributes.rawWidth,height:e.attributes.rawHeight}},dc=e=>{let t=e,n=!1;for(;t;)t.nodeName!==`#text`&&(t.dirty=!0,!n&&(t.nodeName===`ink-text`||t.nodeName===`ink-raw-ansi`)&&t.yogaNode&&(t.yogaNode.markDirty(),n=!0)),t=t.parentNode},fc=e=>{let t=e;for(;t?.parentNode;)t=t.parentNode;t&&t.nodeName!==`#text`&&t.onRender?.()},pc=(e,t)=>{typeof t!=`string`&&(t=String(t)),e.nodeValue!==t&&(e.nodeValue=t,dc(e))},mc=e=>{if(`childNodes`in e)for(let t of e.childNodes)mc(t);e.yogaNode=void 0}})),gc,_c,vc=t((()=>{gc={keydown:{bubble:`onKeyDown`,capture:`onKeyDownCapture`},focus:{bubble:`onFocus`,capture:`onFocusCapture`},blur:{bubble:`onBlur`,capture:`onBlurCapture`},paste:{bubble:`onPaste`,capture:`onPasteCapture`},resize:{bubble:`onResize`},click:{bubble:`onClick`},mousedown:{bubble:`onMouseDown`},mouseup:{bubble:`onMouseUp`},mousedrag:{bubble:`onMouseDrag`}},_c=new Set([`onKeyDown`,`onKeyDownCapture`,`onFocus`,`onFocusCapture`,`onBlur`,`onBlurCapture`,`onPaste`,`onPasteCapture`,`onResize`,`onClick`,`onMouseDown`,`onMouseUp`,`onMouseDrag`,`onMouseEnter`,`onMouseLeave`])}));function yc(e,t,n){let r=e._eventHandlers;if(!r)return;let i=gc[t];if(!i)return;let a=n?i.capture:i.bubble;if(a)return r[a]}function bc(e,t){let n=[],r=e;for(;r;){let i=r===e,a=yc(r,t.type,!0),o=yc(r,t.type,!1);a&&n.unshift({node:r,handler:a,phase:i?`at_target`:`capturing`}),o&&(t.bubbles||i)&&n.push({node:r,handler:o,phase:i?`at_target`:`bubbling`}),r=r.parentNode}return n}function xc(e,t){let n;for(let{node:r,handler:i,phase:a}of e){if(t._isImmediatePropagationStopped()||t._isPropagationStopped()&&r!==n)break;t._setEventPhase(a),t._setCurrentTarget(r),t._prepareForTarget(r);try{i(t)}catch(e){wc(e)}n=r}}function Sc(e){switch(e){case`keydown`:case`keyup`:case`click`:case`focus`:case`blur`:case`paste`:return Cc.DiscreteEventPriority;case`resize`:case`scroll`:case`mousemove`:return Cc.ContinuousEventPriority;default:return Cc.DefaultEventPriority}}var Cc,wc,Tc,Ec=t((()=>{Cc=Me(),vc(),c(),wc=e=>{console.error(e)},Tc=class{constructor(){l(this,`currentEvent`,null),l(this,`currentUpdatePriority`,Cc.DefaultEventPriority),l(this,`discreteUpdates`,null)}resolveEventPriority(){return this.currentUpdatePriority===0?this.currentEvent?Sc(this.currentEvent.type):Cc.DefaultEventPriority:this.currentUpdatePriority}dispatch(e,t){let n=this.currentEvent;this.currentEvent=t;try{return t._setTarget(e),xc(bc(e,t),t),t._setEventPhase(`none`),t._setCurrentTarget(null),!t.defaultPrevented}finally{this.currentEvent=n}}dispatchDiscrete(e,t){return this.discreteUpdates?this.discreteUpdates((e,t)=>this.dispatch(e,t),e,t,void 0,void 0):this.dispatch(e,t)}dispatchContinuous(e,t){let n=this.currentUpdatePriority;try{return this.currentUpdatePriority=Cc.ContinuousEventPriority,this.dispatch(e,t)}finally{this.currentUpdatePriority=n}}}})),Dc,Oc=t((()=>{zn(),c(),Dc=class extends Rn{constructor(e,t){super(),l(this,`type`,void 0),l(this,`timeStamp`,void 0),l(this,`bubbles`,void 0),l(this,`cancelable`,void 0),l(this,`_target`,null),l(this,`_currentTarget`,null),l(this,`_eventPhase`,`none`),l(this,`_propagationStopped`,!1),l(this,`_defaultPrevented`,!1),this.type=e,this.timeStamp=performance.now(),this.bubbles=t?.bubbles??!0,this.cancelable=t?.cancelable??!0}get target(){return this._target}get currentTarget(){return this._currentTarget}get eventPhase(){return this._eventPhase}get defaultPrevented(){return this._defaultPrevented}stopPropagation(){this._propagationStopped=!0}stopImmediatePropagation(){super.stopImmediatePropagation(),this._propagationStopped=!0}preventDefault(){this.cancelable&&(this._defaultPrevented=!0)}_setTarget(e){this._target=e}_setCurrentTarget(e){this._currentTarget=e}_setEventPhase(e){this._eventPhase=e}_isPropagationStopped(){return this._propagationStopped}_isImmediatePropagationStopped(){return this.didStopImmediatePropagation()}_prepareForTarget(e){}}})),kc,Ac=t((()=>{Oc(),c(),kc=class extends Dc{constructor(e,t=null){super(e,{bubbles:!0,cancelable:!1}),l(this,`relatedTarget`,void 0),this.relatedTarget=t}}}));function jc(e){let t=[];return Mc(e,t),t}function Mc(e,t){let n=e.attributes.tabIndex;typeof n==`number`&&n>=0&&t.push(e);for(let n of e.childNodes)n.nodeName!==`#text`&&Mc(n,t)}function Nc(e,t){let n=e;for(;n;){if(n===t)return!0;n=n.parentNode}return!1}function Pc(e){let t=e;for(;t;){if(t.focusManager)return t;t=t.parentNode}throw Error(`Node is not in a tree with a FocusManager`)}function Fc(e){return Pc(e).focusManager}var Ic,Lc,Rc=t((()=>{Ac(),c(),Ic=32,Lc=class{constructor(e){l(this,`activeElement`,null),l(this,`dispatchFocusEvent`,void 0),l(this,`enabled`,!0),l(this,`focusStack`,[]),this.dispatchFocusEvent=e}focus(e){if(e===this.activeElement||!this.enabled)return;let t=this.activeElement;if(t){let n=this.focusStack.indexOf(t);n!==-1&&this.focusStack.splice(n,1),this.focusStack.push(t),this.focusStack.length>Ic&&this.focusStack.shift(),this.dispatchFocusEvent(t,new kc(`blur`,e))}this.activeElement=e,this.dispatchFocusEvent(e,new kc(`focus`,t))}blur(){if(!this.activeElement)return;let e=this.activeElement;this.activeElement=null,this.dispatchFocusEvent(e,new kc(`blur`,null))}handleNodeRemoved(e,t){if(this.focusStack=this.focusStack.filter(n=>n!==e&&Nc(n,t)),!this.activeElement||this.activeElement!==e&&Nc(this.activeElement,t))return;let n=this.activeElement;for(this.activeElement=null,this.dispatchFocusEvent(n,new kc(`blur`,null));this.focusStack.length>0;){let e=this.focusStack.pop();if(Nc(e,t)){this.activeElement=e,this.dispatchFocusEvent(e,new kc(`focus`,n));return}}}handleAutoFocus(e){this.focus(e)}handleClickFocus(e){typeof e.attributes.tabIndex==`number`&&this.focus(e)}enable(){this.enabled=!0}disable(){this.enabled=!1}focusNext(e){this.moveFocus(1,e)}focusPrevious(e){this.moveFocus(-1,e)}moveFocus(e,t){if(!this.enabled)return;let n=jc(t);if(n.length===0)return;let r=this.activeElement?n.indexOf(this.activeElement):-1,i=n[r===-1?e===1?0:n.length-1:(r+e+n.length)%n.length];i&&this.focus(i)}}}));function zc(e,t,n){typeof n==`string`?e.setPositionPercent(t,Number.parseInt(n,10)):typeof n==`number`?e.setPosition(t,n):e.setPosition(t,NaN)}var Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc=t((()=>{Si(),Bc=(e,t)=>{`position`in t&&e.setPositionType(t.position===`absolute`?yi.Absolute:yi.Relative),`top`in t&&zc(e,`top`,t.top),`bottom`in t&&zc(e,`bottom`,t.bottom),`left`in t&&zc(e,`left`,t.left),`right`in t&&zc(e,`right`,t.right)},Vc=(e,t)=>{let n=t.overflowY??t.overflow,r=t.overflowX??t.overflow;n===`scroll`||r===`scroll`?e.setOverflow(bi.Scroll):n===`hidden`||r===`hidden`?e.setOverflow(bi.Hidden):(`overflow`in t||`overflowX`in t||`overflowY`in t)&&e.setOverflow(bi.Visible)},Hc=(e,t)=>{`margin`in t&&e.setMargin(U.All,t.margin??0),`marginX`in t&&e.setMargin(U.Horizontal,t.marginX??0),`marginY`in t&&e.setMargin(U.Vertical,t.marginY??0),`marginLeft`in t&&e.setMargin(U.Start,t.marginLeft||0),`marginRight`in t&&e.setMargin(U.End,t.marginRight||0),`marginTop`in t&&e.setMargin(U.Top,t.marginTop||0),`marginBottom`in t&&e.setMargin(U.Bottom,t.marginBottom||0)},Uc=(e,t)=>{`padding`in t&&e.setPadding(U.All,t.padding??0),`paddingX`in t&&e.setPadding(U.Horizontal,t.paddingX??0),`paddingY`in t&&e.setPadding(U.Vertical,t.paddingY??0),`paddingLeft`in t&&e.setPadding(U.Left,t.paddingLeft||0),`paddingRight`in t&&e.setPadding(U.Right,t.paddingRight||0),`paddingTop`in t&&e.setPadding(U.Top,t.paddingTop||0),`paddingBottom`in t&&e.setPadding(U.Bottom,t.paddingBottom||0)},Wc=(e,t)=>{`flexGrow`in t&&e.setFlexGrow(t.flexGrow??0),`flexShrink`in t&&e.setFlexShrink(typeof t.flexShrink==`number`?t.flexShrink:1),`flexWrap`in t&&(t.flexWrap===`nowrap`&&e.setFlexWrap(vi.NoWrap),t.flexWrap===`wrap`&&e.setFlexWrap(vi.Wrap),t.flexWrap===`wrap-reverse`&&e.setFlexWrap(vi.WrapReverse)),`flexDirection`in t&&(t.flexDirection===`row`&&e.setFlexDirection(hi.Row),t.flexDirection===`row-reverse`&&e.setFlexDirection(hi.RowReverse),t.flexDirection===`column`&&e.setFlexDirection(hi.Column),t.flexDirection===`column-reverse`&&e.setFlexDirection(hi.ColumnReverse)),`flexBasis`in t&&(typeof t.flexBasis==`number`?e.setFlexBasis(t.flexBasis):typeof t.flexBasis==`string`?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(NaN)),`alignItems`in t&&((t.alignItems===`stretch`||!t.alignItems)&&e.setAlignItems(gi.Stretch),t.alignItems===`flex-start`&&e.setAlignItems(gi.FlexStart),t.alignItems===`center`&&e.setAlignItems(gi.Center),t.alignItems===`flex-end`&&e.setAlignItems(gi.FlexEnd)),`alignSelf`in t&&((t.alignSelf===`auto`||!t.alignSelf)&&e.setAlignSelf(gi.Auto),t.alignSelf===`flex-start`&&e.setAlignSelf(gi.FlexStart),t.alignSelf===`center`&&e.setAlignSelf(gi.Center),t.alignSelf===`flex-end`&&e.setAlignSelf(gi.FlexEnd)),`justifyContent`in t&&((t.justifyContent===`flex-start`||!t.justifyContent)&&e.setJustifyContent(_i.FlexStart),t.justifyContent===`center`&&e.setJustifyContent(_i.Center),t.justifyContent===`flex-end`&&e.setJustifyContent(_i.FlexEnd),t.justifyContent===`space-between`&&e.setJustifyContent(_i.SpaceBetween),t.justifyContent===`space-around`&&e.setJustifyContent(_i.SpaceAround),t.justifyContent===`space-evenly`&&e.setJustifyContent(_i.SpaceEvenly))},Gc=(e,t)=>{`width`in t&&(typeof t.width==`number`?e.setWidth(t.width):typeof t.width==`string`?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),`height`in t&&(typeof t.height==`number`?e.setHeight(t.height):typeof t.height==`string`?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),`minWidth`in t&&(typeof t.minWidth==`string`?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth(t.minWidth??0)),`minHeight`in t&&(typeof t.minHeight==`string`?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight(t.minHeight??0)),`maxWidth`in t&&(typeof t.maxWidth==`string`?e.setMaxWidthPercent(Number.parseInt(t.maxWidth,10)):e.setMaxWidth(t.maxWidth??0)),`maxHeight`in t&&(typeof t.maxHeight==`string`?e.setMaxHeightPercent(Number.parseInt(t.maxHeight,10)):e.setMaxHeight(t.maxHeight??0))},Kc=(e,t)=>{`display`in t&&e.setDisplay(t.display===`flex`?mi.Flex:mi.None)},qc=(e,t,n)=>{let r=n??t;if(`borderStyle`in t){let n=+!!t.borderStyle;e.setBorder(U.Top,r.borderTop===!1?0:n),e.setBorder(U.Bottom,r.borderBottom===!1?0:n),e.setBorder(U.Left,r.borderLeft===!1?0:n),e.setBorder(U.Right,r.borderRight===!1?0:n)}else`borderTop`in t&&t.borderTop!==void 0&&e.setBorder(U.Top,t.borderTop===!1?0:1),`borderBottom`in t&&t.borderBottom!==void 0&&e.setBorder(U.Bottom,t.borderBottom===!1?0:1),`borderLeft`in t&&t.borderLeft!==void 0&&e.setBorder(U.Left,t.borderLeft===!1?0:1),`borderRight`in t&&t.borderRight!==void 0&&e.setBorder(U.Right,t.borderRight===!1?0:1)},Jc=(e,t)=>{`gap`in t&&e.setGap(pi.All,t.gap??0),`columnGap`in t&&e.setGap(pi.Column,t.columnGap??0),`rowGap`in t&&e.setGap(pi.Row,t.rowGap??0)},Yc=(e,t={},n)=>{Bc(e,t),Vc(e,t),Hc(e,t),Uc(e,t),Wc(e,t),Gc(e,t),Kc(e,t),qc(e,t,n),Jc(e,t)}}));function Zc(e,t,n){e._eventHandlers||(e._eventHandlers={}),e._eventHandlers[t]=n}function Qc(e,t,n){if(t!==`children`){if(t===`style`){oc(e,n),e.yogaNode&&Yc(e.yogaNode,n);return}if(t===`textStyles`){e.textStyles=n;return}if(_c.has(t)){Zc(e,t,n);return}ac(e,t,n)}}function $c(e){let t=[],n=new Set,r=e;for(let e=0;r&&e<50&&!n.has(r);e++){n.add(r);let e=r.elementType,i=typeof e==`function`?e.displayName||e.name:typeof e==`string`?void 0:e?.displayName||e?.name;i&&i!==t[t.length-1]&&t.push(i),r=r._debugOwner??r.return}return t}function el(){return ll===void 0&&(ll=process.env.CLAUDE_CODE_DEBUG_REPAINTS===`1`),ll}function tl(e){console.warn(`[ink-commit] ${e}`)}function q(e){vl=e}function nl(){return vl}function rl(){bl=performance.now()}function il(){return yl}function al(){vl=0,yl=0,bl=0}var ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl=t((()=>{ol=n(fi(),1),Ut(),hc(),Ec(),vc(),Rc(),Si(),Xc(),sl=(e,t)=>{if(e===t)return;if(!e)return t;let n={},r=!1;for(let i of Object.keys(e))(!t||!Object.hasOwn(t,i))&&(n[i]=void 0,r=!0);if(t)for(let i of Object.keys(t))t[i]!==e[i]&&(n[i]=t[i],r=!0);return r?n:void 0},cl=e=>{let t=e.yogaNode;t&&(t.unsetMeasureFunc(),mc(e),t.freeRecursive())},ul=new Tc,dl=process.env.CLAUDE_CODE_COMMIT_LOG,fl=0,pl=0,ml=0,hl=0,gl=0,_l=0,vl=0,yl=0,bl=0,xl=(0,ol.default)({getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>(dl&&(_l=performance.now()),null),preparePortalMount:()=>null,clearContainer:()=>!1,resetAfterCommit(e){if(yl=bl>0?performance.now()-bl:0,bl=0,dl){let e=performance.now();fl++;let t=ml>0?e-ml:0;t>hl&&(hl=t),ml=e;let n=_l>0?e-_l:0;(t>30||n>20||gl>50)&&tl(`${e.toFixed(1)} gap=${t.toFixed(1)}ms reconcile=${n.toFixed(1)}ms creates=${gl}`),gl=0,e-pl>1e3&&(tl(`${e.toFixed(1)} commits=${fl}/s maxGap=${hl.toFixed(1)}ms`),fl=0,hl=0,pl=e)}let t=dl?performance.now():0;if(typeof e.onComputeLayout==`function`&&e.onComputeLayout(),dl){let e=performance.now()-t;if(e>20){let n=ct();tl(`${t.toFixed(1)} SLOW_YOGA ${e.toFixed(1)}ms visited=${n.visited} measured=${n.measured} hits=${n.cacheHits} live=${n.live}`)}}let n=dl?performance.now():0;if(e.onRender?.(),dl){let e=performance.now()-n;e>10&&tl(`${n.toFixed(1)} SLOW_PAINT ${e.toFixed(1)}ms`)}},getChildHostContext(e,t){let n=e.isInsideText,r=t===`ink-text`||t===`ink-virtual-text`||t===`ink-link`;return n===r?e:{isInsideText:r}},shouldSetTextContent:()=>!1,createInstance(e,t,n,r,i){if(r.isInsideText&&e===`ink-box`)throw Error(`<Box> can't be nested inside <Text> component`);let a=tc(e===`ink-text`&&r.isInsideText?`ink-virtual-text`:e);dl&&gl++;for(let[e,n]of Object.entries(t))Qc(a,e,n);return el()&&(a.debugOwnerChain=$c(i)),a},createTextInstance(e,t,n){if(!n.isInsideText)throw Error(`Text string "${e}" must be rendered inside <Text> component`);return cc(e)},resetTextContent(){},hideTextInstance(e){pc(e,``)},unhideTextInstance(e,t){pc(e,t)},getPublicInstance:e=>e,hideInstance(e){e.isHidden=!0,e.yogaNode?.setDisplay(mi.None),dc(e)},unhideInstance(e){e.isHidden=!1,e.yogaNode?.setDisplay(mi.Flex),dc(e)},appendInitialChild:nc,appendChild:nc,insertBefore:rc,finalizeInitialChildren(e,t,n){return n.autoFocus===!0},commitMount(e){Fc(e).handleAutoFocus(e)},isPrimaryRenderer:!0,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,getCurrentUpdatePriority:()=>ul.currentUpdatePriority,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},getInstanceFromNode:()=>null,prepareScopeUpdate(){},getInstanceFromScope:()=>null,appendChildToContainer:nc,insertInContainerBefore:rc,removeChildFromContainer(e,t){ic(e,t),cl(t),Fc(e).handleNodeRemoved(t,e)},commitUpdate(e,t,n,r){let i=sl(n,r),a=sl(n.style,r.style);if(i)for(let[t,n]of Object.entries(i)){if(t===`style`){oc(e,n);continue}if(t===`textStyles`){sc(e,n);continue}if(_c.has(t)){Zc(e,t,n);continue}ac(e,t,n)}a&&e.yogaNode&&Yc(e.yogaNode,a,r.style)},commitTextUpdate(e,t,n){pc(e,n)},removeChild(e,t){if(ic(e,t),cl(t),t.nodeName!==`#text`){let n=Pc(e);n.focusManager.handleNodeRemoved(t,n)}},maySuspendCommit(){return!1},preloadInstance(){return!0},startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady(){return null},NotPendingTransition:null,HostTransitionContext:{$$typeof:Symbol.for(`react.context`),_currentValue:null},setCurrentUpdatePriority(e){ul.currentUpdatePriority=e},resolveUpdatePriority(){return ul.resolveEventPriority()},resetFormInstance(){},requestPostPaintCallback(){},shouldAttemptEagerTransition(){return!1},trackSchedulerEvent(){},resolveEventType(){return ul.currentEvent?.type??null},resolveEventTimeStamp(){return ul.currentEvent?.timeStamp??-1.1}}),ul.discreteUpdates=xl.discreteUpdates.bind(xl)}));function Cl(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return{x:n,y:r,width:i-n,height:a-r}}function wl(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}var Tl=t((()=>{})),El=t((()=>{}));function Dl(e,t){e!==void 0&&(Number.isInteger(e)||`${t}${e}`)}var Ol=t((()=>{El()}));function kl(e){for(let t of e)if(uu.has(t.endCode))return!0;return!1}function Al(){let e=new Int32Array(128);return e.fill(-1),e[32]=du,e}function jl(e,t,n){return e<<pu|t<<mu|n}function Ml(e,t){let n=t<<1;return e.cells[n]===0&&e.cells[n|1]===0}function Nl(e,t,n){return t<0||n<0||t>=e.width||n>=e.height||Ml(e,n*e.width+t)}function Pl(e,t){return e.hyperlinkPool.intern(t)}function Fl(e,t,n,r,i){Dl(e,`createScreen width`),Dl(t,`createScreen height`),(!Number.isInteger(e)||e<0)&&(e=Math.max(0,Math.floor(e)||0)),(!Number.isInteger(t)||t<0)&&(t=Math.max(0,Math.floor(t)||0));let a=e*t,o=new ArrayBuffer(a<<3),s=new Int32Array(o),c=new BigInt64Array(o);return{width:e,height:t,cells:s,cells64:c,charPool:r,hyperlinkPool:i,emptyStyleId:n.none,damage:void 0,noSelect:new Uint8Array(a),softWrap:new Int32Array(t)}}function Il(e,t,n){Dl(t,`resetScreen width`),Dl(n,`resetScreen height`),(!Number.isInteger(t)||t<0)&&(t=Math.max(0,Math.floor(t)||0)),(!Number.isInteger(n)||n<0)&&(n=Math.max(0,Math.floor(n)||0));let r=t*n;if(e.cells64.length<r){let t=new ArrayBuffer(r<<3);e.cells=new Int32Array(t),e.cells64=new BigInt64Array(t),e.noSelect=new Uint8Array(r)}e.softWrap.length<n&&(e.softWrap=new Int32Array(n)),e.cells64.fill(_u,0,r),e.noSelect.fill(0,0,r),e.softWrap.fill(0,0,n),e.width=t,e.height=n,e.damage=void 0}function Ll(e,t,n){let r=e.charPool,i=e.hyperlinkPool;if(r===t&&i===n)return;let a=e.width*e.height,o=e.cells;for(let e=0;e<a<<1;e+=2){let a=o[e];o[e]=t.intern(r.get(a));let s=o[e+1],c=s>>>mu&hu;if(c!==0){let t=i.get(c),r=n.intern(t),a=s>>>pu,l=s&gu;o[e+1]=jl(a,r,l)}}e.charPool=t,e.hyperlinkPool=n}function Rl(e,t,n){if(!(t<0||n<0||t>=e.width||n>=e.height))return zl(e,n*e.width+t)}function zl(e,t){let n=t<<1,r=e.cells[n+1],i=r>>>mu&hu;return{char:e.charPool.get(e.cells[n]),styleId:r>>>pu,width:r&gu,hyperlink:i===0?void 0:e.hyperlinkPool.get(i)}}function Bl(e,t,n,r,i){let a=r<<1,o=e[a];if(o===1)return;let s=e[a+1];if(o===0&&!(s&262140)){let e=s>>>pu;if(e===0||e===i)return}let c=s>>>mu&hu;return{char:t.get(o),styleId:s>>>pu,width:s&gu,hyperlink:c===0?void 0:n.get(c)}}function Vl(e,t,n){let r=t|1,i=e.cells[r];n.char=e.charPool.get(e.cells[t]),n.styleId=i>>>pu,n.width=i&gu;let a=i>>>mu&hu;n.hyperlink=a===0?void 0:e.hyperlinkPool.get(a)}function Hl(e,t,n){if(t<0||n<0||t>=e.width||n>=e.height)return;let r=n*e.width+t<<1;return e.charPool.get(e.cells[r])}function Ul(e,t,n,r){if(t<0||n<0||t>=e.width||n>=e.height)return;let i=n*e.width+t<<1,a=e.cells,o=a[i+1]&gu;if(o===1&&r.width!==1&&t+1<e.width){let t=i+2;(a[t+1]&gu)===2&&(a[t]=du,a[t+1]=jl(e.emptyStyleId,0,0))}let s=-1;if(o===2&&r.width!==2&&t>0){let n=i-2;(a[n+1]&gu)===1&&(a[n]=du,a[n+1]=jl(e.emptyStyleId,0,0),s=t-1)}a[i]=Wl(e,r.char),a[i+1]=jl(r.styleId,Pl(e,r.hyperlink),r.width);let c=s>=0?Math.min(t,s):t,l=e.damage;if(l){let e=l.x+l.width,r=l.y+l.height;c<l.x?(l.width+=l.x-c,l.x=c):t>=e&&(l.width=t-l.x+1),n<l.y?(l.height+=l.y-n,l.y=n):n>=r&&(l.height=n-l.y+1)}else e.damage={x:c,y:n,width:t-c+1,height:1};if(r.width===1){let n=t+1;if(n<e.width){let t=i+2;if((a[t+1]&gu)===1){let r=t+2;n+1<e.width&&(a[r+1]&gu)===2&&(a[r]=du,a[r+1]=jl(e.emptyStyleId,0,0))}a[t]=fu,a[t+1]=jl(e.emptyStyleId,0,2);let r=e.damage;r&&n>=r.x+r.width&&(r.width=n-r.x+1)}}}function J(e,t,n,r){if(t<0||n<0||t>=e.width||n>=e.height)return;let i=n*e.width+t<<1,a=e.cells,o=a[i+1],s=o&gu;if(s===2||s===3)return;let c=o>>>mu&hu;a[i+1]=jl(r,c,s);let l=e.damage;l?e.damage=Cl(l,{x:t,y:n,width:1,height:1}):e.damage={x:t,y:n,width:1,height:1}}function Wl(e,t){return e.charPool.intern(t)}function Gl(e,t,n,r,i,a){if(n=Math.max(0,n),r=Math.max(0,r),n>=i||r>=a)return;let o=i-n,s=t.width<<1,c=e.width<<1,l=o<<1,u=t.cells,d=e.cells,f=t.noSelect,p=e.noSelect;if(e.softWrap.set(t.softWrap.subarray(r,a),r),n===0&&i===t.width&&t.width===e.width){let e=r*s,n=(a-r)*s;d.set(u.subarray(e,e+n),e);let i=r*t.width,o=(a-r)*t.width;p.set(f.subarray(i,i+o),i)}else{let i=r*s+(n<<1),m=r*c+(n<<1),h=r*t.width+n,g=r*e.width+n;for(let n=r;n<a;n++)d.set(u.subarray(i,i+l),m),p.set(f.subarray(h,h+o),g),i+=s,m+=c,h+=t.width,g+=e.width}let m={x:n,y:r,width:o,height:a-r};if(e.damage?e.damage=Cl(e.damage,m):e.damage=m,i<e.width){let n=r*t.width+(i-1)<<1,o=r*e.width+i<<1,l=!1;for(let t=r;t<a;t++)(u[n+1]&gu)===1&&(d[o]=fu,d[o+1]=jl(e.emptyStyleId,0,2),l=!0),n+=s,o+=c;l&&e.damage&&e.damage.x+e.damage.width===i&&(e.damage={...e.damage,width:e.damage.width+1})}}function Kl(e,t,n,r){if(r===0||t<0||n>=e.height||t>n)return;let i=e.width,a=e.cells64,o=e.noSelect,s=e.softWrap;if(Math.abs(r)>n-t){a.fill(_u,t*i,(n+1)*i),o.fill(0,t*i,(n+1)*i),s.fill(0,t,n+1);return}r>0?(a.copyWithin(t*i,(t+r)*i,(n+1)*i),o.copyWithin(t*i,(t+r)*i,(n+1)*i),s.copyWithin(t,t+r,n+1),a.fill(_u,(n-r+1)*i,(n+1)*i),o.fill(0,(n-r+1)*i,(n+1)*i),s.fill(0,n-r+1,n+1)):(a.copyWithin((t-r)*i,t*i,(n+r+1)*i),o.copyWithin((t-r)*i,t*i,(n+r+1)*i),s.copyWithin(t-r,t,n+r+1),a.fill(_u,t*i,(t-r)*i),o.fill(0,t*i,(t-r)*i),s.fill(0,t,t-r))}function ql(e){for(let t of e){let e=t.code;if(e.length<5||!e.startsWith(yu))continue;let n=e.match(vu);if(n)return n[1]||null}return null}function Jl(e){return e.filter(e=>!e.code.startsWith(yu)||!vu.test(e.code))}function Yl(e,t,n){let r=e.width,i=t.width,a=e.height,o=t.height,s;r===0&&a===0?s={x:0,y:0,width:i,height:o}:t.damage?(s=t.damage,e.damage&&(s=Cl(s,e.damage))):s=e.damage?e.damage:{x:0,y:0,width:0,height:0},a>o&&(s=Cl(s,{x:0,y:o,width:r,height:a-o})),r>i&&(s=Cl(s,{x:i,y:0,width:r-i,height:a}));let c=Math.max(a,o),l=Math.max(r,i),u=Math.min(s.y+s.height,c),d=Math.min(s.x+s.width,l);return r===i?eu(e,t,s.x,d,s.y,u,n):tu(e,t,s.x,d,s.y,u,n)}function Xl(e,t,n,r){for(let i=0;i<r;i++,n+=2){let r=n|1;if(e[n]!==t[n]||e[r]!==t[r])return i}return r}function Zl(e,t,n,r,i,a,o,s,c,l,u){let d=o;for(;d<s;){let o=Xl(e,t,i,s-d);if(d+=o,i+=o<<1,d>=s)break;if(Vl(n,i,c),Vl(r,i,l),u(d,a,c,l))return!0;d++,i+=2}return!1}function Ql(e,t,n,r,i,a,o){for(let s=r;s<i;s++,t+=2)if(Vl(e,t,a),o(s,n,a,void 0))return!0;return!1}function $l(e,t,n,r,i,a,o,s){for(let c=i;c<a;c++,n+=2)if(!(e[n]===0&&e[n|1]===0)&&(Vl(t,n,o),s(c,r,void 0,o)))return!0;return!1}function eu(e,t,n,r,i,a,o){let s=e.cells,c=t.cells,l=e.width,u=e.height,d=t.height,f=l<<1,p={char:` `,styleId:0,width:0,hyperlink:void 0},m={char:` `,styleId:0,width:0,hyperlink:void 0},h=Math.min(r,l),g=i*l+n<<1;for(let r=i;r<a;r++){let i=r<u,a=r<d;if(i&&a){if(Zl(s,c,e,t,g,r,n,h,p,m,o))return!0}else if(i){if(Ql(e,g,r,n,h,p,o))return!0}else if(a&&$l(c,t,g,r,n,h,m,o))return!0;g+=f}return!1}function tu(e,t,n,r,i,a,o){let s=e.width,c=t.width,l=e.cells,u=t.cells,d={char:` `,styleId:0,width:0,hyperlink:void 0},f={char:` `,styleId:0,width:0,hyperlink:void 0},p=s<<1,m=c<<1,h=i*s+n<<1,g=i*c+n<<1;for(let _=i;_<a;_++){let i=_<e.height,a=_<t.height,v=i?Math.min(r,s):n,y=a?Math.min(r,c):n,b=Math.min(v,y),x=h,S=g;for(let r=n;r<b;r++){if(l[x]===u[S]&&l[x+1]===u[S+1]){x+=2,S+=2;continue}if(Vl(e,x,d),Vl(t,S,f),x+=2,S+=2,o(r,_,d,f))return!0}if(v>b){x=h+(b-n<<1);for(let t=b;t<v;t++)if(Vl(e,x,d),x+=2,o(t,_,d,void 0))return!0}if(y>b){S=g+(b-n<<1);for(let e=b;e<y;e++){if(u[S]===0&&u[S|1]===0){S+=2;continue}if(Vl(t,S,f),S+=2,o(e,_,void 0,f))return!0}}h+=p,g+=m}return!1}function nu(e,t,n,r,i){let a=Math.min(t+r,e.width),o=Math.min(n+i,e.height),s=e.noSelect,c=e.width;for(let e=Math.max(0,n);e<o;e++){let n=e*c;s.fill(1,n+Math.max(0,t),n+a)}}var ru,iu,au,ou,su,cu,lu,uu,Y,du,fu,pu,mu,hu,gu,_u,vu,yu,bu=t((()=>{Ao(),Tl(),Gn(),Ol(),c(),ru=class{constructor(){l(this,`strings`,[` `,``]),l(this,`stringMap`,new Map([[` `,0],[``,1]])),l(this,`ascii`,Al())}intern(e){if(e.length===1){let t=e.charCodeAt(0);if(t<128){let n=this.ascii[t];if(n!==-1)return n;let r=this.strings.length;return this.strings.push(e),this.ascii[t]=r,r}}let t=this.stringMap.get(e);if(t!==void 0)return t;let n=this.strings.length;return this.strings.push(e),this.stringMap.set(e,n),n}get(e){return this.strings[e]??` `}},iu=class{constructor(){l(this,`strings`,[``]),l(this,`stringMap`,new Map)}intern(e){if(!e)return 0;let t=this.stringMap.get(e);return t===void 0&&(t=this.strings.length,this.strings.push(e),this.stringMap.set(e,t)),t}get(e){return e===0?void 0:this.strings[e]}},au={type:`ansi`,code:`\x1B[7m`,endCode:`\x1B[27m`},ou={type:`ansi`,code:`\x1B[1m`,endCode:`\x1B[22m`},su={type:`ansi`,code:`\x1B[4m`,endCode:`\x1B[24m`},cu={type:`ansi`,code:`\x1B[33m`,endCode:`\x1B[39m`},lu=class e{constructor(){l(this,`ids`,new Map),l(this,`styles`,[]),l(this,`transitionCache`,new Map),l(this,`none`,void 0),l(this,`inverseCache`,new Map),l(this,`currentMatchCache`,new Map),l(this,`selectionBgCode`,null),l(this,`selectionBgCache`,new Map),this.none=this.intern([])}evictCacheIfNeeded(){if(this.transitionCache.size>e.CACHE_MAX){let t=this.transitionCache.keys();for(let n=0;n<this.transitionCache.size-e.CACHE_MAX;n++){let e=t.next().value;e!==void 0&&this.transitionCache.delete(e)}}if(this.inverseCache.size>e.CACHE_MAX){let t=this.inverseCache.keys();for(let n=0;n<this.inverseCache.size-e.CACHE_MAX;n++){let e=t.next().value;e!==void 0&&this.inverseCache.delete(e)}}if(this.currentMatchCache.size>e.CACHE_MAX){let t=this.currentMatchCache.keys();for(let n=0;n<this.currentMatchCache.size-e.CACHE_MAX;n++){let e=t.next().value;e!==void 0&&this.currentMatchCache.delete(e)}}}intern(e){let t=e.length===0?``:e.map(e=>e.code).join(`\0`),n=this.ids.get(t);if(n===void 0){let r=this.styles.length;this.styles.push(e.length===0?[]:e),n=r<<1|(e.length>0&&kl(e)?1:0),this.ids.set(t,n),this.evictCacheIfNeeded()}return n}get(e){return this.styles[e>>>1]??[]}transition(e,t){if(e===t)return``;let n=e*1048576+t,r=this.transitionCache.get(n);return r===void 0&&(r=ro(mo(this.get(e),this.get(t))),this.transitionCache.set(n,r)),r}withInverse(e){let t=this.inverseCache.get(e);if(t===void 0){let n=this.get(e);t=n.some(e=>e.endCode===`\x1B[27m`)?e:this.intern([...n,au]),this.inverseCache.set(e,t)}return t}withCurrentMatch(e){let t=this.currentMatchCache.get(e);if(t===void 0){let n=this.get(e),r=n.filter(e=>e.endCode!==`\x1B[39m`&&e.endCode!==`\x1B[49m`);r.push(cu),n.some(e=>e.endCode===`\x1B[27m`)||r.push(au),n.some(e=>e.endCode===`\x1B[22m`)||r.push(ou),n.some(e=>e.endCode===`\x1B[24m`)||r.push(su),t=this.intern(r),this.currentMatchCache.set(e,t)}return t}setSelectionBg(e){this.selectionBgCode?.code!==e?.code&&(this.selectionBgCode=e,this.selectionBgCache.clear())}withSelectionBg(e){let t=this.selectionBgCode;if(t===null)return this.withInverse(e);let n=this.selectionBgCache.get(e);if(n===void 0){let r=this.get(e).filter(e=>e.endCode!==`\x1B[49m`&&e.endCode!==`\x1B[27m`);r.push(t),n=this.intern(r),this.selectionBgCache.set(e,n)}return n}},l(lu,`CACHE_MAX`,1e3),uu=new Set([`\x1B[49m`,`\x1B[27m`,`\x1B[24m`,`\x1B[29m`,`\x1B[55m`]),Y=function(e){return e[e.Narrow=0]=`Narrow`,e[e.Wide=1]=`Wide`,e[e.SpacerTail=2]=`SpacerTail`,e[e.SpacerHead=3]=`SpacerHead`,e}({}),du=0,fu=1,pu=17,mu=2,hu=32767,gu=3,_u=0n,vu=RegExp(`^\x1B\\]8;;([^\x07]*)\x07$`),yu=`\x1B]8;`}));function xu(){return{anchor:null,focus:null,isDragging:!1,anchorSpan:null,scrolledOffAbove:[],scrolledOffBelow:[],scrolledOffAboveSW:[],scrolledOffBelowSW:[],lastPressHadAlt:!1}}function Su(e,t,n){e.anchor={col:t,row:n},e.focus=null,e.isDragging=!0,e.anchorSpan=null,e.scrolledOffAbove=[],e.scrolledOffBelow=[],e.scrolledOffAboveSW=[],e.scrolledOffBelowSW=[],e.virtualAnchorRow=void 0,e.virtualFocusRow=void 0,e.lastPressHadAlt=!1}function X(e,t,n){e.isDragging&&(!e.focus&&e.anchor&&e.anchor.col===t&&e.anchor.row===n||(e.focus={col:t,row:n}))}function Cu(e){e.isDragging=!1}function Z(e){e.anchor=null,e.focus=null,e.isDragging=!1,e.anchorSpan=null,e.scrolledOffAbove=[],e.scrolledOffBelow=[],e.scrolledOffAboveSW=[],e.scrolledOffBelowSW=[],e.virtualAnchorRow=void 0,e.virtualFocusRow=void 0,e.lastPressHadAlt=!1}function Q(e){return e===` `||e===``?0:Hu.test(e)?1:2}function wu(e,t,n){if(n<0||n>=e.height)return null;let r=e.width,i=e.noSelect,a=n*r,o=t;if(o>0){let t=Rl(e,o,n);t&&t.width===Y.SpacerTail&&--o}if(o<0||o>=r||i[a+o]===1)return null;let s=Rl(e,o,n);if(!s)return null;let c=Q(s.char),l=o;for(;l>0;){let t=l-1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r)break;if(r.width===Y.SpacerTail){if(t===0||i[a+t-1]===1)break;let r=Rl(e,t-1,n);if(!r||Q(r.char)!==c)break;l=t-1;continue}if(Q(r.char)!==c)break;l=t}let u=o;for(;u<r-1;){let t=u+1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r)break;if(r.width===Y.SpacerTail){u=t;continue}if(Q(r.char)!==c)break;u=t}return{lo:l,hi:u}}function Tu(e,t){return e.row===t.row?e.col===t.col?0:e.col<t.col?-1:1:e.row<t.row?-1:1}function Eu(e,t,n,r){let i=wu(t,n,r);if(!i)return;let a={col:i.lo,row:r},o={col:i.hi,row:r};e.anchor=a,e.focus=o,e.isDragging=!0,e.anchorSpan={lo:a,hi:o,kind:`word`}}function Du(e){if(e.length!==1)return!1;let t=e.charCodeAt(0);return t>=33&&t<=126&&!Uu.has(e)}function Ou(e,t,n){if(n<0||n>=e.height)return;let r=e.width,i=e.noSelect,a=n*r,o=t;if(o>0){let t=Rl(e,o,n);t&&t.width===Y.SpacerTail&&--o}if(o<0||o>=r||i[a+o]===1)return;let s=Rl(e,o,n);if(!s||!Du(s.char))return;let c=o;for(;c>0;){let t=c-1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r||r.width!==Y.Narrow||!Du(r.char))break;c=t}let l=o;for(;l<r-1;){let t=l+1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r||r.width!==Y.Narrow||!Du(r.char))break;l=t}let u=``;for(let t=c;t<=l;t++)u+=Rl(e,t,n).char;let d=o-c,f=/(?:https?|file):\/\//g,p=-1,m=u.length;for(let e;e=f.exec(u);){if(e.index>d){m=e.index;break}p=e.index}if(p<0)return;let h=u.slice(p,m),g={")":`(`,"]":`[`,"}":`{`};for(;h.length>0;){let e=h.at(-1);if(`.,;:!?`.includes(e)){h=h.slice(0,-1);continue}let t=g[e];if(!t)break;let n=0,r=0;for(let i=0;i<h.length;i++){let a=h.charAt(i);a===t?n++:a===e&&r++}if(r>n)h=h.slice(0,-1);else break}if(!(d>=p+h.length))return h}function ku(e,t,n){if(n<0||n>=t.height)return;let r={col:0,row:n},i={col:t.width-1,row:n};e.anchor=r,e.focus=i,e.isDragging=!0,e.anchorSpan={lo:r,hi:i,kind:`line`}}function Au(e,t,n,r){if(!e.isDragging||!e.anchorSpan)return;let i=e.anchorSpan,a,o;if(i.kind===`word`){let e=wu(t,n,r);a={col:e?e.lo:n,row:r},o={col:e?e.hi:n,row:r}}else{let e=wl(r,0,t.height-1);a={col:0,row:e},o={col:t.width-1,row:e}}Tu(o,i.lo)<0?(e.anchor=i.hi,e.focus=a):Tu(a,i.hi)>0?(e.anchor=i.lo,e.focus=o):(e.anchor=i.lo,e.focus=i.hi)}function ju(e,t,n){e.focus&&(e.anchorSpan=null,e.focus={col:t,row:n},e.virtualFocusRow=void 0)}function Mu(e,t,n,r,i){if(!e.anchor||!e.focus)return;let a=(e.virtualAnchorRow??e.anchor.row)+t,o=(e.virtualFocusRow??e.focus.row)+t;if(a<n&&o<n||a>r&&o>r){Z(e);return}let s=Math.min(e.virtualAnchorRow??e.anchor.row,e.virtualFocusRow??e.focus.row),c=Math.max(e.virtualAnchorRow??e.anchor.row,e.virtualFocusRow??e.focus.row),l=Math.max(0,n-s),u=Math.max(0,c-r),d=Math.max(0,n-Math.min(a,o)),f=Math.max(0,Math.max(a,o)-r);if(d<l){let t=l-d;e.scrolledOffAbove.length-=t,e.scrolledOffAboveSW.length=e.scrolledOffAbove.length}if(f<u){let t=u-f;e.scrolledOffBelow.splice(0,t),e.scrolledOffBelowSW.splice(0,t)}e.scrolledOffAbove.length>d&&(e.scrolledOffAbove=d>0?e.scrolledOffAbove.slice(-d):[],e.scrolledOffAboveSW=d>0?e.scrolledOffAboveSW.slice(-d):[]),e.scrolledOffBelow.length>f&&(e.scrolledOffBelow=e.scrolledOffBelow.slice(0,f),e.scrolledOffBelowSW=e.scrolledOffBelowSW.slice(0,f));let p=(e,t)=>t<n?{col:0,row:n}:t>r?{col:i-1,row:r}:{col:e.col,row:t};if(e.anchor=p(e.anchor,a),e.focus=p(e.focus,o),e.virtualAnchorRow=a<n||a>r?a:void 0,e.virtualFocusRow=o<n||o>r?o:void 0,e.anchorSpan){let a=e=>{let a=e.row+t;return a<n?{col:0,row:n}:a>r?{col:i-1,row:r}:{col:e.col,row:a}};e.anchorSpan={lo:a(e.anchorSpan.lo),hi:a(e.anchorSpan.hi),kind:e.anchorSpan.kind}}}function Nu(e,t,n,r){if(!e.anchor)return;let i=(e.virtualAnchorRow??e.anchor.row)+t;if(e.anchor={col:e.anchor.col,row:wl(i,n,r)},e.virtualAnchorRow=i<n||i>r?i:void 0,e.anchorSpan){let i=e=>({col:e.col,row:wl(e.row+t,n,r)});e.anchorSpan={lo:i(e.anchorSpan.lo),hi:i(e.anchorSpan.hi),kind:e.anchorSpan.kind}}}function Pu(e,t,n,r){if(!e.anchor)return!1;let i=(e.virtualAnchorRow??e.anchor.row)+t,a=e.focus?(e.virtualFocusRow??e.focus.row)+t:void 0;if(i<n&&a!==void 0&&a<n)return Z(e),!0;if(e.anchor={col:e.anchor.col,row:wl(i,n,r)},e.focus&&a!==void 0&&(e.focus={col:e.focus.col,row:wl(a,n,r)}),e.virtualAnchorRow=i<n||i>r?i:void 0,e.virtualFocusRow=a!==void 0&&(a<n||a>r)?a:void 0,e.anchorSpan){let i=e=>({col:e.col,row:wl(e.row+t,n,r)});e.anchorSpan={lo:i(e.anchorSpan.lo),hi:i(e.anchorSpan.hi),kind:e.anchorSpan.kind}}return!1}function Fu(e){return e.anchor!==null&&e.focus!==null}function Iu(e){return!e.anchor||!e.focus?null:Tu(e.anchor,e.focus)<=0?{start:e.anchor,end:e.focus}:{start:e.focus,end:e.anchor}}function Lu(e,t,n,r){let i=e.noSelect,a=t*e.width,o=t+1<e.height?e.softWrap[t+1]:0,s=o>0?Math.min(r,o-1):r,c=``;for(let r=n;r<=s;r++){if(i[a+r]===1)continue;let n=Rl(e,r,t);n&&(n.width===Y.SpacerTail||n.width===Y.SpacerHead||(c+=n.char))}return o>0?c:c.replace(/\s+$/,``)}function Ru(e,t,n){n&&e.length>0?e[e.length-1]+=t:e.push(t)}function zu(e,t){let n=Iu(e);if(!n)return``;let{start:r,end:i}=n,a=t.softWrap,o=[];for(let t=0;t<e.scrolledOffAbove.length;t++)Ru(o,e.scrolledOffAbove[t],e.scrolledOffAboveSW[t]);for(let e=r.row;e<=i.row;e++){let n=e===r.row?r.col:0,s=e===i.row?i.col:t.width-1;Ru(o,Lu(t,e,n,s),a[e]>0)}for(let t=0;t<e.scrolledOffBelow.length;t++)Ru(o,e.scrolledOffBelow[t],e.scrolledOffBelowSW[t]);return o.join(`
28
- `)}function Bu(e,t,n,r,i){let a=Iu(e);if(!a||n>r)return;let{start:o,end:s}=a,c=Math.max(n,o.row),l=Math.min(r,s.row);if(c>l)return;let u=t.width,d=t.softWrap,f=[],p=[];for(let e=c;e<=l;e++){let n=e===o.row?o.col:0,r=e===s.row?s.col:u-1;f.push(Lu(t,e,n,r)),p.push(d[e]>0)}i===`above`?(e.scrolledOffAbove.push(...f),e.scrolledOffAboveSW.push(...p),e.anchor&&e.anchor.row===o.row&&c===o.row&&(e.anchor={col:0,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}}))):(e.scrolledOffBelow.unshift(...f),e.scrolledOffBelowSW.unshift(...p),e.anchor&&e.anchor.row===s.row&&l===s.row&&(e.anchor={col:u-1,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}})))}function Vu(e,t,n){let r=Iu(t);if(!r)return;let{start:i,end:a}=r,o=e.width,s=e.noSelect;for(let t=i.row;t<=a.row&&t<e.height;t++){let r=t===i.row?i.col:0,c=t===a.row?Math.min(a.col,o-1):o-1,l=t*o;for(let i=r;i<=c;i++){let r=l+i;if(s[r]===1)continue;let a=zl(e,r);J(e,i,t,n.withSelectionBg(a.styleId))}}}var Hu,Uu,Wu=t((()=>{Tl(),bu(),Hu=/[\p{L}\p{N}_/.\-+~\\]/u,Uu=new Set([...`<>"'\` `])}));function Gu(){return process.platform===`win32`&&!!process.env.WT_SESSION}function Ku(){return!!(process.env.TERM_PROGRAM===`mintty`||process.platform===`win32`&&process.env.MSYSTEM)}function qu(){return!!(Gu()||process.platform===`win32`&&process.env.TERM_PROGRAM===`vscode`&&process.env.TERM_PROGRAM_VERSION||Ku())}function Ju(){return process.platform===`win32`?qu()?hr+gr+pr:hr+Yu:hr+gr+pr}var Yu,Xu=t((()=>{Er(),Yu=H(0,`f`),Ju()}));function Zu(e){return H(`?${e}h`)}function Qu(e){return H(`?${e}l`)}var $u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd=t((()=>{Er(),$u={CURSOR_VISIBLE:25,ALT_SCREEN:47,ALT_SCREEN_CLEAR:1049,MOUSE_NORMAL:1e3,MOUSE_BUTTON:1002,MOUSE_ANY:1003,MOUSE_SGR:1006,FOCUS_EVENTS:1004,BRACKETED_PASTE:2004,SYNCHRONIZED_UPDATE:2026},ed=Zu($u.SYNCHRONIZED_UPDATE),td=Qu($u.SYNCHRONIZED_UPDATE),nd=Zu($u.BRACKETED_PASTE),rd=Qu($u.BRACKETED_PASTE),id=Zu($u.FOCUS_EVENTS),ad=Qu($u.FOCUS_EVENTS),od=Zu($u.CURSOR_VISIBLE),sd=Qu($u.CURSOR_VISIBLE),cd=Zu($u.ALT_SCREEN_CLEAR),ld=Qu($u.ALT_SCREEN_CLEAR),ud=Zu($u.MOUSE_NORMAL)+Zu($u.MOUSE_BUTTON)+Zu($u.MOUSE_ANY)+Zu($u.MOUSE_SGR),dd=Qu($u.MOUSE_SGR)+Qu($u.MOUSE_ANY)+Qu($u.MOUSE_BUTTON)+Qu($u.MOUSE_NORMAL)}));function pd(e,t,n={}){return new Promise(r=>{let{input:i,timeout:a}=n,o=ne(e,t,{timeout:a},(e,t,n)=>{r({code:+!!e,stdout:t??``,stderr:n??``})});i&&o.stdin&&(o.stdin.write(i),o.stdin.end())})}function md(...e){let t=process.env.TERM_PROGRAM===`kitty`?Ad:`\x07`;return`${kd}${e.join(`;`)}${t}`}function hd(e){return process.env.TMUX?`\x1bPtmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}\x1b\\`:process.env.STY?`\x1bP${e}\x1b\\`:e}function gd(){return process.platform===`darwin`&&!process.env.SSH_CONNECTION?`native`:process.env.TMUX?`tmux-buffer`:`osc52`}function _d(e){return`Ptmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}${Ad}`}async function vd(e){if(!process.env.TMUX)return!1;let{code:t}=await pd(`tmux`,process.env.LC_TERMINAL===`iTerm2`?[`load-buffer`,`-`]:[`load-buffer`,`-w`,`-`],{input:e,useCwd:!1,timeout:2e3});return t===0}async function yd(e){let t=ee.from(e,`utf8`).toString(`base64`),n=md(Md.CLIPBOARD,`c`,t);return process.env.SSH_CONNECTION||bd(e),await vd(e)?_d(`]52;c;${t}`):n}function bd(e){let t={input:e,useCwd:!1,timeout:2e3};switch(process.platform){case`darwin`:pd(`pbcopy`,[],t);return;case`linux`:if(jd===null)return;if(jd===`wl-copy`){pd(`wl-copy`,[],t);return}if(jd===`xclip`){pd(`xclip`,[`-selection`,`clipboard`],t);return}if(jd===`xsel`){pd(`xsel`,[`--clipboard`,`--input`],t);return}pd(`wl-copy`,[],t).then(e=>{if(e.code===0){jd=`wl-copy`;return}pd(`xclip`,[`-selection`,`clipboard`],t).then(e=>{if(e.code===0){jd=`xclip`;return}pd(`xsel`,[`--clipboard`,`--input`],t).then(e=>{jd=e.code===0?`xsel`:null})})});return;case`win32`:pd(`clip`,[],t);return}}function xd(e){let t=e.indexOf(`;`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):``,i=parseInt(n,10);if(i===Md.SET_TITLE_AND_ICON)return{type:`title`,action:{type:`both`,title:r}};if(i===Md.SET_ICON)return{type:`title`,action:{type:`iconName`,name:r}};if(i===Md.SET_TITLE)return{type:`title`,action:{type:`windowTitle`,title:r}};if(i===Md.HYPERLINK){let e=r.split(`;`),t=e[0]??``,n=e.slice(1).join(`;`);if(n===``)return{type:`link`,action:{type:`end`}};let i={};if(t)for(let e of t.split(`:`)){let t=e.indexOf(`=`);t>=0&&(i[e.slice(0,t)]=e.slice(t+1))}return{type:`link`,action:{type:`start`,url:n,params:Object.keys(i).length>0?i:void 0}}}return i===Md.TAB_STATUS?{type:`tabStatus`,action:Cd(r)}:{type:`unknown`,sequence:`\x1b]${e}`}}function Sd(e){let t=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);if(t)return{type:`rgb`,r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};let n=e.match(/^rgb:([0-9a-f]{1,4})\/([0-9a-f]{1,4})\/([0-9a-f]{1,4})$/i);if(n){let e=e=>Math.round(parseInt(e,16)/(16**e.length-1)*255);return{type:`rgb`,r:e(n[1]),g:e(n[2]),b:e(n[3])}}return null}function Cd(e){let t={};for(let[n,r]of wd(e))switch(n){case`indicator`:t.indicator=r===``?null:Sd(r);break;case`status`:t.status=r===``?null:r;break;case`status-color`:t.statusColor=r===``?null:Sd(r);break}return t}function*wd(e){let t=``,n=``,r=!1,i=!1;for(let a of e)i?(r?n+=a:t+=a,i=!1):a===`\\`?i=!0:a===`;`?(yield[t,n],t=``,n=``,r=!1):a===`=`&&!r?r=!0:r?n+=a:t+=a;(t||r)&&(yield[t,n])}function Td(e,t){if(!e)return Nd;let n={id:Ed(e),...t},r=Object.entries(n).map(([e,t])=>`${e}=${t}`).join(`:`);return md(Md.HYPERLINK,r,e)}function Ed(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function Dd(){return process.env.USER_TYPE===`ant`}function Od(e){let t=[],n=e=>e.type===`rgb`?`#${[e.r,e.g,e.b].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`:``;return`indicator`in e&&t.push(`indicator=${e.indicator?n(e.indicator):``}`),`status`in e&&t.push(`status=${e.status?.replaceAll(`\\`,`\\\\`).replaceAll(`;`,`\\;`)??``}`),`statusColor`in e&&t.push(`status-color=${e.statusColor?n(e.statusColor):``}`),md(Md.TAB_STATUS,t.join(`;`))}var kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd=t((()=>{Gn(),kd=`\x1B`+String.fromCharCode(Wn.OSC),Ad=`\x1B\\`,Md={SET_TITLE_AND_ICON:0,SET_ICON:1,SET_TITLE:2,SET_COLOR:4,SET_CWD:7,HYPERLINK:8,ITERM2:9,SET_FG_COLOR:10,SET_BG_COLOR:11,SET_CURSOR_COLOR:12,CLIPBOARD:52,KITTY:99,RESET_COLOR:104,RESET_FG_COLOR:110,RESET_BG_COLOR:111,RESET_CURSOR_COLOR:112,SEMANTIC_PROMPT:133,GHOSTTY:777,TAB_STATUS:21337},Nd=md(Md.HYPERLINK,``,``),Pd={NOTIFY:0,BADGE:2,PROGRESS:4},Fd={CLEAR:0,SET:1,ERROR:2,INDETERMINATE:3},Id=`${kd}${Md.ITERM2};${Pd.PROGRESS};${Fd.CLEAR};`,Ld=`${kd}${Md.SET_TITLE_AND_ICON};`,Rd=md(Md.TAB_STATUS,`indicator=;status=;status-color=`)}));function Bd(){if(!process.stdout.isTTY||process.env.WT_SESSION)return!1;if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return!0;let e=(0,qd.coerce)(process.env.TERM_PROGRAM_VERSION);return e?process.env.TERM_PROGRAM===`ghostty`?(0,qd.gte)(e.version,`1.2.0`):process.env.TERM_PROGRAM===`iTerm.app`&&(0,qd.gte)(e.version,`3.6.6`):!1}function Vd(){if(process.env.TMUX)return!1;let e=process.env.TERM_PROGRAM,t=process.env.TERM;if(e===`iTerm.app`||e===`WezTerm`||e===`WarpTerminal`||e===`ghostty`||e===`contour`||e===`vscode`||e===`alacritty`||t?.includes(`kitty`)||process.env.KITTY_WINDOW_ID||t===`xterm-ghostty`||t?.startsWith(`foot`)||t?.includes(`alacritty`)||process.env.ZED_TERM||process.env.WT_SESSION)return!0;let n=process.env.VTE_VERSION;return!!(n&&parseInt(n,10)>=6800)}function Hd(e){Jd===void 0&&(Jd=e)}function Ud(){return process.env.TERM_PROGRAM===`vscode`?!0:Jd?.startsWith(`xterm.js`)??!1}function Wd(){return Yd.includes(process.env.TERM_PROGRAM??``)}function Gd(){return process.platform===`win32`||!!process.env.WT_SESSION}function Kd(e,t,n=!1){if(t.length===0)return;let r=!n,i=r?ed:``;for(let e of t)switch(e.type){case`stdout`:i+=e.content;break;case`clear`:e.count>0&&(i+=nr(e.count));break;case`clearTerminal`:i+=Ju();break;case`cursorHide`:i+=sd;break;case`cursorShow`:i+=od;break;case`cursorMove`:i+=tr(e.x,e.y);break;case`cursorTo`:i+=$n(e.col);break;case`carriageReturn`:i+=`\r`;break;case`hyperlink`:i+=Td(e.uri);break;case`styleStr`:i+=e.str;break}r&&(i+=td),e.stdout.write(i)}var qd,Jd,Yd,Xd,Zd=t((()=>{qd=g(),Xu(),Er(),fd(),zd(),Yd=[`iTerm.app`,`kitty`,`WezTerm`,`ghostty`,`tmux`,`windows-terminal`],Xd=Vd()}));function Qd(e){nf=e?`focused`:`blurred`;for(let e of af)e();if(!e){for(let e of rf)e();rf.clear()}}function $d(){return nf!==`blurred`}function ef(){return nf}function tf(e){return af.add(e),()=>{af.delete(e)}}var nf,rf,af,of=t((()=>{nf=`unknown`,rf=new Set,af=new Set}));function sf(){return{request:H(`>0q`),match:e=>e.type===`xtversion`}}var cf,lf,uf=t((()=>{Er(),zd(),c(),cf=H(`c`),lf=class{constructor(e){l(this,`stdout`,void 0),l(this,`queue`,[]),this.stdout=e}send(e){return new Promise(t=>{this.queue.push({kind:`query`,match:e.match,resolve:e=>t(e)}),this.stdout.write(e.request)})}flush(){return new Promise(e=>{this.queue.push({kind:`sentinel`,resolve:e}),this.stdout.write(cf)})}onResponse(e){let t=this.queue.findIndex(t=>t.kind===`query`&&t.match(e));if(t!==-1){let[n]=this.queue.splice(t,1);n?.kind===`query`&&n.resolve(e);return}if(e.type===`da1`){let e=this.queue.findIndex(e=>e.kind===`sentinel`);if(e===-1)return;for(let t of this.queue.splice(0,e+1))t.kind===`query`?t.resolve(void 0):t.resolve()}}}})),df,ff,pf=t((()=>{df=n(N(),1),ff=(0,df.createContext)({exit(){}}),ff.displayName=`InternalAppContext`})),mf=t((()=>{}));function hf({children:e}){let t=(0,gf.useSyncExternalStore)(tf,$d),n=(0,gf.useSyncExternalStore)(tf,ef),r=(0,gf.useMemo)(()=>({isTerminalFocused:t,terminalFocusState:n}),[t,n]);return(0,_f.jsx)(vf.Provider,{value:r,children:e})}var gf,_f,vf,yf=t((()=>{gf=n(N(),1),of(),_f=y(),vf=(0,gf.createContext)({isTerminalFocused:!0,terminalFocusState:`unknown`}),vf.displayName=`TerminalFocusContext`}));function bf(){let{isTerminalFocused:e}=(0,xf.useContext)(vf);return e}var xf,Sf=t((()=>{xf=n(N(),1),yf()}));function Cf(e){let t=new Map,n=null,r=e,i=0,a=0;function o(){a=Date.now()-i;for(let e of t.keys())e()}function s(){[...t.values()].some(Boolean)?(n&&(clearInterval(n),n=null),i===0&&(i=Date.now()),n=setInterval(o,r)):n&&(clearInterval(n),n=null)}return{subscribe(e,n){return t.set(e,n),s(),()=>{t.delete(e),s()}},now(){return i===0&&(i=Date.now()),n&&a?a:Date.now()-i},setTickInterval(e){e!==r&&(r=e,s())}}}function wf({children:e}){let[t]=(0,Tf.useState)(()=>Cf(16)),n=bf();return(0,Tf.useEffect)(()=>{t.setTickInterval(n?16:Of)},[t,n]),(0,Ef.jsx)(Df.Provider,{value:t,children:e})}var Tf,Ef,Df,Of,kf=t((()=>{Tf=n(N(),1),mf(),Sf(),Ef=y(),Df=(0,Tf.createContext)(null),Of=32})),Af,jf,Mf=t((()=>{Af=n(N(),1),jf=(0,Af.createContext)(()=>{})})),Nf,Pf=t((()=>{Nf=(e,t=2)=>e.replace(/^\t+/gm,e=>` `.repeat(e.length*t))})),Ff,If,Lf=t((()=>{Pf(),Ff=(e,t)=>{let n=[],r=e-t,i=e+t;for(let e=r;e<=i;e++)n.push(e);return n},If=(e,t,n={})=>{if(typeof e!=`string`)throw TypeError(`Source code is missing.`);if(!t||t<1)throw TypeError("Line number must start from `1`.");let r=Nf(e).split(/\r?\n/);if(!(t>r.length))return Ff(t,n.around??3).filter(e=>r[e-1]!==void 0).map(e=>({line:e,value:r[e-1]}))}})),Rf=r(((e,t)=>{var n=/[|\\{}()[\]^$+*?.-]/g;t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(n,`\\$&`)}})),zf=r(((t,n)=>{var r=Rf(),i=typeof process==`object`&&process&&typeof process.cwd==`function`?process.cwd():`.`,a=[].concat(e(`module`).builtinModules,`bootstrap_node`,`node`).map(e=>RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));a.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var o=class e{constructor(t){t={ignoredPackages:[],...t},`internals`in t||(t.internals=e.nodeInternals()),`cwd`in t||(t.cwd=i),this._cwd=t.cwd.replace(/\\/g,`/`),this._internals=[].concat(t.internals,c(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...a]}clean(e,t=0){t=` `.repeat(t),Array.isArray(e)||(e=e.split(`
28
+ `)}function Bu(e,t,n,r,i){let a=Iu(e);if(!a||n>r)return;let{start:o,end:s}=a,c=Math.max(n,o.row),l=Math.min(r,s.row);if(c>l)return;let u=t.width,d=t.softWrap,f=[],p=[];for(let e=c;e<=l;e++){let n=e===o.row?o.col:0,r=e===s.row?s.col:u-1;f.push(Lu(t,e,n,r)),p.push(d[e]>0)}i===`above`?(e.scrolledOffAbove.push(...f),e.scrolledOffAboveSW.push(...p),e.anchor&&e.anchor.row===o.row&&c===o.row&&(e.anchor={col:0,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}}))):(e.scrolledOffBelow.unshift(...f),e.scrolledOffBelowSW.unshift(...p),e.anchor&&e.anchor.row===s.row&&l===s.row&&(e.anchor={col:u-1,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}})))}function Vu(e,t,n){let r=Iu(t);if(!r)return;let{start:i,end:a}=r,o=e.width,s=e.noSelect;for(let t=i.row;t<=a.row&&t<e.height;t++){let r=t===i.row?i.col:0,c=t===a.row?Math.min(a.col,o-1):o-1,l=t*o;for(let i=r;i<=c;i++){let r=l+i;if(s[r]===1)continue;let a=zl(e,r);J(e,i,t,n.withSelectionBg(a.styleId))}}}var Hu,Uu,Wu=t((()=>{Tl(),bu(),Hu=/[\p{L}\p{N}_/.\-+~\\]/u,Uu=new Set([...`<>"'\` `])}));function Gu(){return process.platform===`win32`&&!!process.env.WT_SESSION}function Ku(){return!!(process.env.TERM_PROGRAM===`mintty`||process.platform===`win32`&&process.env.MSYSTEM)}function qu(){return!!(Gu()||process.platform===`win32`&&process.env.TERM_PROGRAM===`vscode`&&process.env.TERM_PROGRAM_VERSION||Ku())}function Ju(){return process.platform===`win32`?qu()?hr+gr+pr:hr+Yu:hr+gr+pr}var Yu,Xu=t((()=>{Er(),Yu=H(0,`f`),Ju()}));function Zu(e){return H(`?${e}h`)}function Qu(e){return H(`?${e}l`)}var $u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd=t((()=>{Er(),$u={CURSOR_VISIBLE:25,ALT_SCREEN:47,ALT_SCREEN_CLEAR:1049,MOUSE_NORMAL:1e3,MOUSE_BUTTON:1002,MOUSE_ANY:1003,MOUSE_SGR:1006,FOCUS_EVENTS:1004,BRACKETED_PASTE:2004,SYNCHRONIZED_UPDATE:2026},ed=Zu($u.SYNCHRONIZED_UPDATE),td=Qu($u.SYNCHRONIZED_UPDATE),nd=Zu($u.BRACKETED_PASTE),rd=Qu($u.BRACKETED_PASTE),id=Zu($u.FOCUS_EVENTS),ad=Qu($u.FOCUS_EVENTS),od=Zu($u.CURSOR_VISIBLE),sd=Qu($u.CURSOR_VISIBLE),cd=Zu($u.ALT_SCREEN_CLEAR),ld=Qu($u.ALT_SCREEN_CLEAR),ud=Zu($u.MOUSE_NORMAL)+Zu($u.MOUSE_BUTTON)+Zu($u.MOUSE_ANY)+Zu($u.MOUSE_SGR),dd=Qu($u.MOUSE_SGR)+Qu($u.MOUSE_ANY)+Qu($u.MOUSE_BUTTON)+Qu($u.MOUSE_NORMAL)}));function pd(e,t,n={}){return new Promise(r=>{let{input:i,timeout:a}=n,o=ne(e,t,{timeout:a},(e,t,n)=>{r({code:+!!e,stdout:t??``,stderr:n??``})});i&&o.stdin&&(o.stdin.write(i),o.stdin.end())})}function md(...e){let t=process.env.TERM_PROGRAM===`kitty`?Ad:`\x07`;return`${kd}${e.join(`;`)}${t}`}function hd(e){return process.env.TMUX?`\x1bPtmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}\x1b\\`:process.env.STY?`\x1bP${e}\x1b\\`:e}function gd(){return process.platform===`darwin`&&!process.env.SSH_CONNECTION?`native`:process.env.TMUX?`tmux-buffer`:`osc52`}function _d(e){return`Ptmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}${Ad}`}async function vd(e){if(!process.env.TMUX)return!1;let{code:t}=await pd(`tmux`,process.env.LC_TERMINAL===`iTerm2`?[`load-buffer`,`-`]:[`load-buffer`,`-w`,`-`],{input:e,useCwd:!1,timeout:2e3});return t===0}async function yd(e){let t=ee.from(e,`utf8`).toString(`base64`),n=md(Md.CLIPBOARD,`c`,t);return process.env.SSH_CONNECTION||bd(e),await vd(e)?_d(`]52;c;${t}`):n}function bd(e){let t={input:e,useCwd:!1,timeout:2e3};switch(process.platform){case`darwin`:pd(`pbcopy`,[],t);return;case`linux`:if(jd===null)return;if(jd===`wl-copy`){pd(`wl-copy`,[],t);return}if(jd===`xclip`){pd(`xclip`,[`-selection`,`clipboard`],t);return}if(jd===`xsel`){pd(`xsel`,[`--clipboard`,`--input`],t);return}pd(`wl-copy`,[],t).then(e=>{if(e.code===0){jd=`wl-copy`;return}pd(`xclip`,[`-selection`,`clipboard`],t).then(e=>{if(e.code===0){jd=`xclip`;return}pd(`xsel`,[`--clipboard`,`--input`],t).then(e=>{jd=e.code===0?`xsel`:null})})});return;case`win32`:pd(`clip`,[],t);return}}function xd(e){let t=e.indexOf(`;`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):``,i=parseInt(n,10);if(i===Md.SET_TITLE_AND_ICON)return{type:`title`,action:{type:`both`,title:r}};if(i===Md.SET_ICON)return{type:`title`,action:{type:`iconName`,name:r}};if(i===Md.SET_TITLE)return{type:`title`,action:{type:`windowTitle`,title:r}};if(i===Md.HYPERLINK){let e=r.split(`;`),t=e[0]??``,n=e.slice(1).join(`;`);if(n===``)return{type:`link`,action:{type:`end`}};let i={};if(t)for(let e of t.split(`:`)){let t=e.indexOf(`=`);t>=0&&(i[e.slice(0,t)]=e.slice(t+1))}return{type:`link`,action:{type:`start`,url:n,params:Object.keys(i).length>0?i:void 0}}}return i===Md.TAB_STATUS?{type:`tabStatus`,action:Cd(r)}:{type:`unknown`,sequence:`\x1b]${e}`}}function Sd(e){let t=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);if(t)return{type:`rgb`,r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};let n=e.match(/^rgb:([0-9a-f]{1,4})\/([0-9a-f]{1,4})\/([0-9a-f]{1,4})$/i);if(n){let e=e=>Math.round(parseInt(e,16)/(16**e.length-1)*255);return{type:`rgb`,r:e(n[1]),g:e(n[2]),b:e(n[3])}}return null}function Cd(e){let t={};for(let[n,r]of wd(e))switch(n){case`indicator`:t.indicator=r===``?null:Sd(r);break;case`status`:t.status=r===``?null:r;break;case`status-color`:t.statusColor=r===``?null:Sd(r);break}return t}function*wd(e){let t=``,n=``,r=!1,i=!1;for(let a of e)i?(r?n+=a:t+=a,i=!1):a===`\\`?i=!0:a===`;`?(yield[t,n],t=``,n=``,r=!1):a===`=`&&!r?r=!0:r?n+=a:t+=a;(t||r)&&(yield[t,n])}function Td(e,t){if(!e)return Nd;let n={id:Ed(e),...t},r=Object.entries(n).map(([e,t])=>`${e}=${t}`).join(`:`);return md(Md.HYPERLINK,r,e)}function Ed(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function Dd(){return!1}function Od(e){let t=[],n=e=>e.type===`rgb`?`#${[e.r,e.g,e.b].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`:``;return`indicator`in e&&t.push(`indicator=${e.indicator?n(e.indicator):``}`),`status`in e&&t.push(`status=${e.status?.replaceAll(`\\`,`\\\\`).replaceAll(`;`,`\\;`)??``}`),`statusColor`in e&&t.push(`status-color=${e.statusColor?n(e.statusColor):``}`),md(Md.TAB_STATUS,t.join(`;`))}var kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd=t((()=>{Gn(),kd=`\x1B`+String.fromCharCode(Wn.OSC),Ad=`\x1B\\`,Md={SET_TITLE_AND_ICON:0,SET_ICON:1,SET_TITLE:2,SET_COLOR:4,SET_CWD:7,HYPERLINK:8,ITERM2:9,SET_FG_COLOR:10,SET_BG_COLOR:11,SET_CURSOR_COLOR:12,CLIPBOARD:52,KITTY:99,RESET_COLOR:104,RESET_FG_COLOR:110,RESET_BG_COLOR:111,RESET_CURSOR_COLOR:112,SEMANTIC_PROMPT:133,GHOSTTY:777,TAB_STATUS:21337},Nd=md(Md.HYPERLINK,``,``),Pd={NOTIFY:0,BADGE:2,PROGRESS:4},Fd={CLEAR:0,SET:1,ERROR:2,INDETERMINATE:3},Id=`${kd}${Md.ITERM2};${Pd.PROGRESS};${Fd.CLEAR};`,Ld=`${kd}${Md.SET_TITLE_AND_ICON};`,Rd=md(Md.TAB_STATUS,`indicator=;status=;status-color=`)}));function Bd(){if(!process.stdout.isTTY||process.env.WT_SESSION)return!1;if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return!0;let e=(0,qd.coerce)(process.env.TERM_PROGRAM_VERSION);return e?process.env.TERM_PROGRAM===`ghostty`?(0,qd.gte)(e.version,`1.2.0`):process.env.TERM_PROGRAM===`iTerm.app`&&(0,qd.gte)(e.version,`3.6.6`):!1}function Vd(){if(process.env.TMUX)return!1;let e=process.env.TERM_PROGRAM,t=process.env.TERM;if(e===`iTerm.app`||e===`WezTerm`||e===`WarpTerminal`||e===`ghostty`||e===`contour`||e===`vscode`||e===`alacritty`||t?.includes(`kitty`)||process.env.KITTY_WINDOW_ID||t===`xterm-ghostty`||t?.startsWith(`foot`)||t?.includes(`alacritty`)||process.env.ZED_TERM||process.env.WT_SESSION)return!0;let n=process.env.VTE_VERSION;return!!(n&&parseInt(n,10)>=6800)}function Hd(e){Jd===void 0&&(Jd=e)}function Ud(){return process.env.TERM_PROGRAM===`vscode`?!0:Jd?.startsWith(`xterm.js`)??!1}function Wd(){return Yd.includes(process.env.TERM_PROGRAM??``)}function Gd(){return process.platform===`win32`||!!process.env.WT_SESSION}function Kd(e,t,n=!1){if(t.length===0)return;let r=!n,i=r?ed:``;for(let e of t)switch(e.type){case`stdout`:i+=e.content;break;case`clear`:e.count>0&&(i+=nr(e.count));break;case`clearTerminal`:i+=Ju();break;case`cursorHide`:i+=sd;break;case`cursorShow`:i+=od;break;case`cursorMove`:i+=tr(e.x,e.y);break;case`cursorTo`:i+=$n(e.col);break;case`carriageReturn`:i+=`\r`;break;case`hyperlink`:i+=Td(e.uri);break;case`styleStr`:i+=e.str;break}r&&(i+=td),e.stdout.write(i)}var qd,Jd,Yd,Xd,Zd=t((()=>{qd=g(),Xu(),Er(),fd(),zd(),Yd=[`iTerm.app`,`kitty`,`WezTerm`,`ghostty`,`tmux`,`windows-terminal`],Xd=Vd()}));function Qd(e){nf=e?`focused`:`blurred`;for(let e of af)e();if(!e){for(let e of rf)e();rf.clear()}}function $d(){return nf!==`blurred`}function ef(){return nf}function tf(e){return af.add(e),()=>{af.delete(e)}}var nf,rf,af,of=t((()=>{nf=`unknown`,rf=new Set,af=new Set}));function sf(){return{request:H(`>0q`),match:e=>e.type===`xtversion`}}var cf,lf,uf=t((()=>{Er(),zd(),c(),cf=H(`c`),lf=class{constructor(e){l(this,`stdout`,void 0),l(this,`queue`,[]),this.stdout=e}send(e){return new Promise(t=>{this.queue.push({kind:`query`,match:e.match,resolve:e=>t(e)}),this.stdout.write(e.request)})}flush(){return new Promise(e=>{this.queue.push({kind:`sentinel`,resolve:e}),this.stdout.write(cf)})}onResponse(e){let t=this.queue.findIndex(t=>t.kind===`query`&&t.match(e));if(t!==-1){let[n]=this.queue.splice(t,1);n?.kind===`query`&&n.resolve(e);return}if(e.type===`da1`){let e=this.queue.findIndex(e=>e.kind===`sentinel`);if(e===-1)return;for(let t of this.queue.splice(0,e+1))t.kind===`query`?t.resolve(void 0):t.resolve()}}}})),df,ff,pf=t((()=>{df=n(N(),1),ff=(0,df.createContext)({exit(){}}),ff.displayName=`InternalAppContext`})),mf=t((()=>{}));function hf({children:e}){let t=(0,gf.useSyncExternalStore)(tf,$d),n=(0,gf.useSyncExternalStore)(tf,ef),r=(0,gf.useMemo)(()=>({isTerminalFocused:t,terminalFocusState:n}),[t,n]);return(0,_f.jsx)(vf.Provider,{value:r,children:e})}var gf,_f,vf,yf=t((()=>{gf=n(N(),1),of(),_f=y(),vf=(0,gf.createContext)({isTerminalFocused:!0,terminalFocusState:`unknown`}),vf.displayName=`TerminalFocusContext`}));function bf(){let{isTerminalFocused:e}=(0,xf.useContext)(vf);return e}var xf,Sf=t((()=>{xf=n(N(),1),yf()}));function Cf(e){let t=new Map,n=null,r=e,i=0,a=0;function o(){a=Date.now()-i;for(let e of t.keys())e()}function s(){[...t.values()].some(Boolean)?(n&&(clearInterval(n),n=null),i===0&&(i=Date.now()),n=setInterval(o,r)):n&&(clearInterval(n),n=null)}return{subscribe(e,n){return t.set(e,n),s(),()=>{t.delete(e),s()}},now(){return i===0&&(i=Date.now()),n&&a?a:Date.now()-i},setTickInterval(e){e!==r&&(r=e,s())}}}function wf({children:e}){let[t]=(0,Tf.useState)(()=>Cf(16)),n=bf();return(0,Tf.useEffect)(()=>{t.setTickInterval(n?16:Of)},[t,n]),(0,Ef.jsx)(Df.Provider,{value:t,children:e})}var Tf,Ef,Df,Of,kf=t((()=>{Tf=n(N(),1),mf(),Sf(),Ef=y(),Df=(0,Tf.createContext)(null),Of=32})),Af,jf,Mf=t((()=>{Af=n(N(),1),jf=(0,Af.createContext)(()=>{})})),Nf,Pf=t((()=>{Nf=(e,t=2)=>e.replace(/^\t+/gm,e=>` `.repeat(e.length*t))})),Ff,If,Lf=t((()=>{Pf(),Ff=(e,t)=>{let n=[],r=e-t,i=e+t;for(let e=r;e<=i;e++)n.push(e);return n},If=(e,t,n={})=>{if(typeof e!=`string`)throw TypeError(`Source code is missing.`);if(!t||t<1)throw TypeError("Line number must start from `1`.");let r=Nf(e).split(/\r?\n/);if(!(t>r.length))return Ff(t,n.around??3).filter(e=>r[e-1]!==void 0).map(e=>({line:e,value:r[e-1]}))}})),Rf=r(((e,t)=>{var n=/[|\\{}()[\]^$+*?.-]/g;t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(n,`\\$&`)}})),zf=r(((t,n)=>{var r=Rf(),i=typeof process==`object`&&process&&typeof process.cwd==`function`?process.cwd():`.`,a=[].concat(e(`module`).builtinModules,`bootstrap_node`,`node`).map(e=>RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));a.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var o=class e{constructor(t){t={ignoredPackages:[],...t},`internals`in t||(t.internals=e.nodeInternals()),`cwd`in t||(t.cwd=i),this._cwd=t.cwd.replace(/\\/g,`/`),this._internals=[].concat(t.internals,c(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...a]}clean(e,t=0){t=` `.repeat(t),Array.isArray(e)||(e=e.split(`
29
29
  `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let n=!1,r=null,i=[];return e.forEach(e=>{if(e=e.replace(/\\/g,`/`),this._internals.some(t=>t.test(e)))return;let t=/^\s*at /.test(e);n?e=e.trimEnd().replace(/^(\s+)at /,`$1`):(e=e.trim(),t&&(e=e.slice(3))),e=e.replace(`${this._cwd}/`,``),e&&(t?(r&&(i.push(r),r=null),i.push(e)):(n=!0,r=e))}),i.map(e=>`${t}${e}\n`).join(``)}captureString(e,t=this.captureString){typeof e==`function`&&(t=e,e=1/0);let{stackTraceLimit:n}=Error;e&&(Error.stackTraceLimit=e);let r={};Error.captureStackTrace(r,t);let{stack:i}=r;return Error.stackTraceLimit=n,this.clean(i)}capture(e,t=this.capture){typeof e==`function`&&(t=e,e=1/0);let{prepareStackTrace:n,stackTraceLimit:r}=Error;Error.prepareStackTrace=(e,t)=>this._wrapCallSite?t.map(this._wrapCallSite):t,e&&(Error.stackTraceLimit=e);let i={};Error.captureStackTrace(i,t);let{stack:a}=i;return Object.assign(Error,{prepareStackTrace:n,stackTraceLimit:r}),a}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let n={line:t.getLineNumber(),column:t.getColumnNumber()};s(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!==`Object`&&r!==`[object Object]`&&(n.type=r);let i=t.getFunctionName();i&&(n.function=i);let a=t.getMethodName();return a&&i!==a&&(n.method=a),n}parseLine(e){let t=e&&e.match(l);if(!t)return null;let n=t[1]===`new`,r=t[2],i=t[3],a=t[4],o=Number(t[5]),c=Number(t[6]),d=t[7],f=t[8],p=t[9],m=t[10]===`native`,h=t[11]===`)`,g,_={};if(f&&(_.line=Number(f)),p&&(_.column=Number(p)),h&&d){let e=0;for(let t=d.length-1;t>0;t--)if(d.charAt(t)===`)`)e++;else if(d.charAt(t)===`(`&&d.charAt(t-1)===` `&&(e--,e===-1&&d.charAt(t-1)===` `)){let e=d.slice(0,t-1);d=d.slice(t+1),r+=` (${e}`;break}}if(r){let e=r.match(u);e&&(r=e[1],g=e[2])}return s(_,d,this._cwd),n&&Object.defineProperty(_,"constructor",{value:!0,configurable:!0}),i&&(_.evalOrigin=i,_.evalLine=o,_.evalColumn=c,_.evalFile=a&&a.replace(/\\/g,`/`)),m&&(_.native=!0),r&&(_.function=r),g&&r!==g&&(_.method=g),_}};function s(e,t,n){t&&(t=t.replace(/\\/g,`/`),t.startsWith(`${n}/`)&&(t=t.slice(n.length+1)),e.file=t)}function c(e){if(e.length===0)return[];let t=e.map(e=>r(e));return RegExp(`[\/\\\\]node_modules[\/\\\\](?:${t.join(`|`)})[\/\\\\][^:]+:\\d+:\\d+`)}var l=RegExp(`^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$`),u=/^(.*?) \[as (.*?)\]$/;n.exports=o}));function Bf({children:e,flexWrap:t=`nowrap`,flexDirection:n=`row`,flexGrow:r=0,flexShrink:i=1,ref:a,tabIndex:o,autoFocus:s,onClick:c,onFocus:l,onFocusCapture:u,onBlur:d,onBlurCapture:f,onMouseEnter:p,onMouseLeave:m,onKeyDown:h,onKeyDownCapture:g,..._}){return Dl(_.margin,`margin`),Dl(_.marginX,`marginX`),Dl(_.marginY,`marginY`),Dl(_.marginTop,`marginTop`),Dl(_.marginBottom,`marginBottom`),Dl(_.marginLeft,`marginLeft`),Dl(_.marginRight,`marginRight`),Dl(_.padding,`padding`),Dl(_.paddingX,`paddingX`),Dl(_.paddingY,`paddingY`),Dl(_.paddingTop,`paddingTop`),Dl(_.paddingBottom,`paddingBottom`),Dl(_.paddingLeft,`paddingLeft`),Dl(_.paddingRight,`paddingRight`),Dl(_.gap,`gap`),Dl(_.columnGap,`columnGap`),Dl(_.rowGap,`rowGap`),(0,Vf.jsx)(`ink-box`,{ref:a,tabIndex:o,autoFocus:s,onClick:c,onFocus:l,onFocusCapture:u,onBlur:d,onBlurCapture:f,onMouseEnter:p,onMouseLeave:m,onKeyDown:h,onKeyDownCapture:g,style:{flexWrap:t,flexDirection:n,flexGrow:r,flexShrink:i,..._,overflowX:_.overflowX??_.overflow??`visible`,overflowY:_.overflowY??_.overflow??`visible`},children:e})}var Vf,Hf=t((()=>{N(),Ol(),Vf=y()}));function Uf({color:e,backgroundColor:t,bold:n,dim:r,italic:i=!1,underline:a=!1,strikethrough:o=!1,inverse:s=!1,wrap:c=`wrap`,children:l}){if(l==null)return null;let u={...e&&{color:e},...t&&{backgroundColor:t},...r&&{dim:r},...n&&{bold:n},...i&&{italic:i},...a&&{underline:a},...o&&{strikethrough:o},...s&&{inverse:s}};return(0,Wf.jsx)(`ink-text`,{style:Gf[c],textStyles:u,children:l})}var Wf,Gf,Kf=t((()=>{N(),Wf=y(),Gf={wrap:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`wrap`},"wrap-trim":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`wrap-trim`},end:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`end`},middle:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`middle`},"truncate-end":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate-end`},truncate:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate`},"truncate-middle":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate-middle`},"truncate-start":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate-start`}}}));function qf(){return Qf??(Qf=new Yf.default({cwd:process.cwd(),internals:Yf.default.nodeInternals()}))}function Jf({error:e}){let t=e.stack?e.stack.split(`
30
30
  `).slice(1):void 0,n=t?qf().parseLine(t[0]):void 0,r=Zf(n?.file),i,a=0;if(r&&n?.line)try{if(i=If(T(r,`utf8`),n.line),i)for(let{line:e}of i)a=Math.max(a,String(e).length)}catch{}return(0,Xf.jsxs)(Bf,{flexDirection:`column`,padding:1,children:[(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsxs)(Uf,{backgroundColor:`ansi:red`,color:`ansi:white`,children:[` `,`ERROR`,` `]}),(0,Xf.jsxs)(Uf,{children:[` `,e.message]})]}),n&&r&&(0,Xf.jsx)(Bf,{marginTop:1,children:(0,Xf.jsxs)(Uf,{dim:!0,children:[r,`:`,n.line,`:`,n.column]})}),n&&i&&(0,Xf.jsx)(Bf,{marginTop:1,flexDirection:`column`,children:i.map(({line:e,value:t})=>(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsx)(Bf,{width:a+1,children:(0,Xf.jsxs)(Uf,{dim:e!==n.line,backgroundColor:e===n.line?`ansi:red`:void 0,color:e===n.line?`ansi:white`:void 0,children:[String(e).padStart(a,` `),`:`]})}),(0,Xf.jsx)(Uf,{backgroundColor:e===n.line?`ansi:red`:void 0,color:e===n.line?`ansi:white`:void 0,children:` `+t},e)]},e))}),e.stack&&(0,Xf.jsx)(Bf,{marginTop:1,flexDirection:`column`,children:e.stack.split(`
31
31
  `).slice(1).map(e=>{let t=qf().parseLine(e);return t?(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsx)(Uf,{dim:!0,children:`- `}),(0,Xf.jsx)(Uf,{bold:!0,children:t.function}),(0,Xf.jsxs)(Uf,{dim:!0,children:[` `,`(`,Zf(t.file)??``,`:`,t.line,`:`,t.column,`)`]})]},e):(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsx)(Uf,{dim:!0,children:`- `}),(0,Xf.jsx)(Uf,{bold:!0,children:e})]},e)})})]})}var Yf,Xf,Zf,Qf,$f=t((()=>{Lf(),N(),Yf=n(zf(),1),Hf(),Kf(),Xf=y(),Zf=e=>e?.replace(`file://${process.cwd()}/`,``)})),ep,tp,np=t((()=>{ep=n(N(),1),Vn(),tp=(0,ep.createContext)({stdin:process.stdin,internal_eventEmitter:new Bn,setRawMode(){},isRawModeSupported:!1,internal_exitOnCtrlC:!0,internal_querier:null}),tp.displayName=`InternalStdinContext`})),rp,ip,ap=t((()=>{rp=n(N(),1),ip=(0,rp.createContext)(null)}));function op(e){return e===`1`||e===`true`}function sp(e,t,n,r){t.some(e=>e.kind===`key`||e.kind===`mouse`&&!(e.button&32&&(e.button&3)==3))&&dp.updateLastInteractionTime();for(let n of t){if(n.kind===`response`){e.querier.onResponse(n.response);continue}if(n.kind===`mouse`){cp(e,n);continue}let t=n.sequence;if(t===br){e.handleTerminalFocus(!0);let t=new si(`terminalfocus`);e.internal_eventEmitter.emit(`terminalfocus`,t);continue}if(t===xr){e.handleTerminalFocus(!1),e.props.selection.isDragging&&(Cu(e.props.selection),e.props.onSelectionChange());let t=new si(`terminalblur`);e.internal_eventEmitter.emit(`terminalblur`,t);continue}if($d()||Qd(!0),n.name===`z`&&n.ctrl&&fp){e.handleSuspend();continue}e.handleInput(t);let r=new ai(n);e.internal_eventEmitter.emit(`input`,r),e.props.dispatchKeyboardEvent(n)}}function cp(e,t){if(dp.isMouseClicksDisabled())return;let n=e.props.selection,r=t.col-1,i=t.row-1,a=t.button&3;if(t.action===`press`){if(t.button&32&&a===3){if(n.isDragging&&(Cu(n),e.props.onSelectionChange()),r===e.lastHoverCol&&i===e.lastHoverRow)return;e.lastHoverCol=r,e.lastHoverRow=i,e.props.onHoverAt(r,i);return}if(a!==0){e.clickCount=0;return}if(t.button&32){e.props.onSelectionDrag(r,i);return}n.isDragging&&(Cu(n),e.props.onSelectionChange());let o=Date.now();if(e.clickCount=o-e.lastClickTime<mp&&Math.abs(r-e.lastClickCol)<=hp&&Math.abs(i-e.lastClickRow)<=hp?e.clickCount+1:1,e.lastClickTime=o,e.lastClickCol=r,e.lastClickRow=i,e.clickCount>=2){e.pendingHyperlinkTimer&&(clearTimeout(e.pendingHyperlinkTimer),e.pendingHyperlinkTimer=null);let t=e.clickCount===2?2:3;e.props.onMultiClick(r,i,t);return}Su(n,r,i),n.lastPressHadAlt=(t.button&8)!=0,e.props.onSelectionChange();return}if(a!==0){if(!n.isDragging)return;Cu(n),e.props.onSelectionChange();return}if(Cu(n),!Fu(n)&&n.anchor&&!e.props.onClickAt(r,i)){let t=e.props.getHyperlinkAt(r,i);t&&process.env.TERM_PROGRAM!==`vscode`&&!Ud()&&(e.pendingHyperlinkTimer&&clearTimeout(e.pendingHyperlinkTimer),e.pendingHyperlinkTimer=setTimeout((e,t)=>{e.pendingHyperlinkTimer=null,e.props.onOpenHyperlink(t)},mp,e,t))}e.props.onSelectionChange()}var lp,up,dp,fp,pp,mp,hp,gp,_p=t((()=>{lp=n(N(),1),up=y(),c(),Vn(),oi(),ci(),ri(),Sl(),Wu(),Zd(),of(),uf(),Er(),fd(),pf(),kf(),Mf(),$f(),np(),yf(),ap(),dp={updateLastInteractionTime:()=>{},stopCapturingEarlyInput:()=>{},isMouseClicksDisabled:()=>!1,logError:e=>console.error(e),logForDebugging:(e,t)=>{}},fp=process.platform!==`win32`,pp=5e3,mp=500,hp=1,gp=class extends lp.PureComponent{constructor(...e){super(...e),l(this,`state`,{error:void 0}),l(this,`rawModeEnabledCount`,0),l(this,`internal_eventEmitter`,new Bn),l(this,`keyParseState`,Qr),l(this,`incompleteEscapeTimer`,null),l(this,`NORMAL_TIMEOUT`,50),l(this,`PASTE_TIMEOUT`,500),l(this,`querier`,new lf(this.props.stdout)),l(this,`lastClickTime`,0),l(this,`lastClickCol`,-1),l(this,`lastClickRow`,-1),l(this,`clickCount`,0),l(this,`pendingHyperlinkTimer`,null),l(this,`lastHoverCol`,-1),l(this,`lastHoverRow`,-1),l(this,`lastStdinTime`,Date.now()),l(this,`handleSetRawMode`,e=>{let{stdin:t}=this.props;if(!this.isRawModeSupported())throw t===process.stdin?Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
@@ -1 +1 @@
1
- import{$r as e,$t as t,An as n,B as r,Bt as i,C as a,Cn as o,Cr as s,Ct as c,D as l,Dr as u,Dt as d,En as f,Er as p,Ft as m,G as h,Gn as g,Gr as _,Gt as v,H as y,I as b,In as x,Jr as S,Jt as C,Kt as w,Lt as T,Mn as E,Mr as D,N as O,On as k,P as A,Pn as j,Pr as M,Pt as N,Q as P,Qn as F,Qr as I,R as L,Rn as R,Sn as z,T as B,Tn as V,Tt as H,U,Un as W,V as G,Vn as K,Vt as q,Wt as J,Xn as Y,Xr as X,Xt as Z,Y as Q,Yt as $,Z as ee,Zn as te,Zt as ne,_ as re,_n as ie,_r as ae,a as oe,ai as se,an as ce,ar as le,br as ue,cn as de,cr as fe,ct as pe,d as me,dr as he,dt as ge,en as _e,er as ve,et as ye,fn as be,fr as xe,ft as Se,gr as Ce,gt as we,h as Te,hn as Ee,hr as De,ir as Oe,it as ke,j as Ae,jt as je,k as Me,kn as Ne,kr as Pe,kt as Fe,l as Ie,ln as Le,lr as Re,lt as ze,mr as Be,mt as Ve,n as He,nn as Ue,nt as We,o as Ge,oi as Ke,on as qe,or as Je,ot as Ye,p as Xe,pn as Ze,pr as Qe,q as $e,qn as et,r as tt,ri as nt,rn as rt,rr as it,s as at,si as ot,sn as st,sr as ct,t as lt,ti as ut,tn as dt,tr as ft,un as pt,vr as mt,vt as ht,x as gt,xn as _t,xr as vt,xt as yt,y as bt,yr as xt,yt as St,zn as Ct}from"./src-CDCSSo0U2.js";lt();export{St as AlternateScreen,m as Ansi,et as BaseBox,g as BaseText,b as Box,je as Button,B as Byline,Je as CLEAR_ITERM2_PROGRESS,ct as CLEAR_TAB_STATUS,fe as CLEAR_TERMINAL_TITLE,Ct as ClickEvent,Be as DBP,De as DFE,I as DISABLE_KITTY_KEYBOARD,e as DISABLE_MODIFY_OTHER_KEYS,Ce as DISABLE_MOUSE_TRACKING,P as DOUBLE_PRESS_TIMEOUT_MS,bt as Dialog,a as Divider,ae as ENABLE_MOUSE_TRACKING,mt as ENTER_ALT_SCREEN,xt as EXIT_ALT_SCREEN,nt as Event,ut as EventEmitter,Pe as FocusEvent,u as FocusManager,Te as FuzzyPicker,ue as HIDE_CURSOR,n as Ink,X as InputEvent,w as KeybindingProvider,q as KeybindingSetup,K as KeyboardEvent,l as KeyboardShortcutHint,T as Link,re as ListItem,Xe as LoadingState,Fe as Newline,H as NoSelect,gt as Pane,me as ProgressBar,Ie as Ratchet,c as RawAnsi,vt as SHOW_CURSOR,yt as ScrollBox,Me as SearchBox,d as Spacer,at as StatusIcon,_t as THEME_NAMES,z as THEME_SETTINGS,He as Tab,tt as Tabs,S as TerminalFocusEvent,W as TerminalSizeContext,E as TerminalWriteProvider,A as Text,O as TextHoverColorContext,L as ThemeProvider,se as applyColor,Ke as applyTextStyles,Ue as chordToDisplayString,rt as chordToString,s as clamp,Ae as color,ot as colorize,f as createRoot,ne as getBindingDisplayText,Re as getClipboardPath,pt as getKeyName,te as getTerminalFocusState,F as getTerminalFocused,o as getTheme,ft as hasCursorUpViewportYankBug,R as instances,it as isSynchronizedOutputSupported,Oe as isXtermJs,ce as keystrokeToDisplayString,qe as keystrokeToString,t as keystrokesEqual,be as matchesBinding,Ze as matchesKeystroke,N as measureElement,st as parseBindings,de as parseChord,Le as parseKeystroke,x as renderBorder,k as renderSync,_e as resolveKey,dt as resolveKeyWithChordState,he as setClipboard,r as setThemeConfigCallbacks,_ as stringWidth,p as styles,ve as subscribeTerminalFocus,i as supportsHyperlinks,xe as supportsTabStatus,V as themeColorToAnsi,Ve as useAnimationFrame,ge as useAnimationTimer,ht as useApp,h as useDeclaredCursor,ye as useDoublePress,pe as useHasSelection,Ee as useInput,Se as useInterval,J as useKeybinding,C as useKeybindingContext,v as useKeybindings,We as useMinDisplayTime,$ as useOptionalKeybindingContext,G as usePreviewTheme,Z as useRegisterKeybindingContext,$e as useSearchHighlight,ze as useSelection,ie as useStdin,oe as useTabHeaderFocus,ee as useTabStatus,Ge as useTabsWidth,Y as useTerminalFocus,j as useTerminalNotification,Ye as useTerminalSize,Q as useTerminalTitle,we as useTerminalViewport,y as useTheme,U as useThemeSetting,ke as useTimeout,M as wrapAnsi,Qe as wrapForMultiplexer,D as wrapText,Ne as wrappedRender,le as writeDiffToTerminal};
1
+ import{$r as e,$t as t,An as n,B as r,Bt as i,C as a,Cn as o,Cr as s,Ct as c,D as l,Dr as u,Dt as d,En as f,Er as p,Ft as m,G as h,Gn as g,Gr as _,Gt as v,H as y,I as b,In as x,Jr as S,Jt as C,Kt as w,Lt as T,Mn as E,Mr as D,N as O,On as k,P as A,Pn as j,Pr as M,Pt as N,Q as P,Qn as F,Qr as I,R as L,Rn as R,Sn as z,T as B,Tn as V,Tt as H,U,Un as W,V as G,Vn as K,Vt as q,Wt as J,Xn as Y,Xr as X,Xt as Z,Y as Q,Yt as $,Z as ee,Zn as te,Zt as ne,_ as re,_n as ie,_r as ae,a as oe,ai as se,an as ce,ar as le,br as ue,cn as de,cr as fe,ct as pe,d as me,dr as he,dt as ge,en as _e,er as ve,et as ye,fn as be,fr as xe,ft as Se,gr as Ce,gt as we,h as Te,hn as Ee,hr as De,ir as Oe,it as ke,j as Ae,jt as je,k as Me,kn as Ne,kr as Pe,kt as Fe,l as Ie,ln as Le,lr as Re,lt as ze,mr as Be,mt as Ve,n as He,nn as Ue,nt as We,o as Ge,oi as Ke,on as qe,or as Je,ot as Ye,p as Xe,pn as Ze,pr as Qe,q as $e,qn as et,r as tt,ri as nt,rn as rt,rr as it,s as at,si as ot,sn as st,sr as ct,t as lt,ti as ut,tn as dt,tr as ft,un as pt,vr as mt,vt as ht,x as gt,xn as _t,xr as vt,xt as yt,y as bt,yr as xt,yt as St,zn as Ct}from"./src-P_wYS_NJ2.js";lt();export{St as AlternateScreen,m as Ansi,et as BaseBox,g as BaseText,b as Box,je as Button,B as Byline,Je as CLEAR_ITERM2_PROGRESS,ct as CLEAR_TAB_STATUS,fe as CLEAR_TERMINAL_TITLE,Ct as ClickEvent,Be as DBP,De as DFE,I as DISABLE_KITTY_KEYBOARD,e as DISABLE_MODIFY_OTHER_KEYS,Ce as DISABLE_MOUSE_TRACKING,P as DOUBLE_PRESS_TIMEOUT_MS,bt as Dialog,a as Divider,ae as ENABLE_MOUSE_TRACKING,mt as ENTER_ALT_SCREEN,xt as EXIT_ALT_SCREEN,nt as Event,ut as EventEmitter,Pe as FocusEvent,u as FocusManager,Te as FuzzyPicker,ue as HIDE_CURSOR,n as Ink,X as InputEvent,w as KeybindingProvider,q as KeybindingSetup,K as KeyboardEvent,l as KeyboardShortcutHint,T as Link,re as ListItem,Xe as LoadingState,Fe as Newline,H as NoSelect,gt as Pane,me as ProgressBar,Ie as Ratchet,c as RawAnsi,vt as SHOW_CURSOR,yt as ScrollBox,Me as SearchBox,d as Spacer,at as StatusIcon,_t as THEME_NAMES,z as THEME_SETTINGS,He as Tab,tt as Tabs,S as TerminalFocusEvent,W as TerminalSizeContext,E as TerminalWriteProvider,A as Text,O as TextHoverColorContext,L as ThemeProvider,se as applyColor,Ke as applyTextStyles,Ue as chordToDisplayString,rt as chordToString,s as clamp,Ae as color,ot as colorize,f as createRoot,ne as getBindingDisplayText,Re as getClipboardPath,pt as getKeyName,te as getTerminalFocusState,F as getTerminalFocused,o as getTheme,ft as hasCursorUpViewportYankBug,R as instances,it as isSynchronizedOutputSupported,Oe as isXtermJs,ce as keystrokeToDisplayString,qe as keystrokeToString,t as keystrokesEqual,be as matchesBinding,Ze as matchesKeystroke,N as measureElement,st as parseBindings,de as parseChord,Le as parseKeystroke,x as renderBorder,k as renderSync,_e as resolveKey,dt as resolveKeyWithChordState,he as setClipboard,r as setThemeConfigCallbacks,_ as stringWidth,p as styles,ve as subscribeTerminalFocus,i as supportsHyperlinks,xe as supportsTabStatus,V as themeColorToAnsi,Ve as useAnimationFrame,ge as useAnimationTimer,ht as useApp,h as useDeclaredCursor,ye as useDoublePress,pe as useHasSelection,Ee as useInput,Se as useInterval,J as useKeybinding,C as useKeybindingContext,v as useKeybindings,We as useMinDisplayTime,$ as useOptionalKeybindingContext,G as usePreviewTheme,Z as useRegisterKeybindingContext,$e as useSearchHighlight,ze as useSelection,ie as useStdin,oe as useTabHeaderFocus,ee as useTabStatus,Ge as useTabsWidth,Y as useTerminalFocus,j as useTerminalNotification,Ye as useTerminalSize,Q as useTerminalTitle,we as useTerminalViewport,y as useTheme,U as useThemeSetting,ke as useTimeout,M as wrapAnsi,Qe as wrapForMultiplexer,D as wrapText,Ne as wrappedRender,le as writeDiffToTerminal};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./startupProfiler-L_UWZ03w.js";e();export{t as profileCheckpoint};
@@ -1,3 +1,3 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,n,o as r}from"./envUtils-DSxRz_kt.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Gr as o,t as s}from"./src-CDCSSo0U2.js";import{$t as ee,mt as c}from"./state-C2OSZkV1.js";import{E as te,S as ne,a as l,d as u,l as d,p as f}from"./debug-RZ4NuXyS.js";import{n as p,r as m}from"./analytics-CkYUHW_U.js";import{a as h,n as g,r as _,s as v}from"./intl-cKc-V6Mq.js";import{dirname as re,join as ie}from"path";function y(e,t){if(o(e)<=t)return e;if(t<=0)return`…`;if(t<5)return b(e,t);let n=e.lastIndexOf(`/`),r=n>=0?e.slice(n):e,i=n>=0?e.slice(0,n):``,a=o(r);if(a>=t-1)return x(e,t);let s=t-1-a;return s<=0?x(r,t):S(i,s)+`…`+r}function b(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t-1)break;r+=i,n+=e}return r+`…`}function x(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=[...g().segment(e)],r=0,i=n.length;for(let e=n.length-1;e>=0;e--){let a=o(n[e].segment);if(r+a>t-1)break;r+=a,i=e}return`…`+n.slice(i).map(e=>e.segment).join(``)}function S(e,t){if(o(e)<=t)return e;if(t<=0)return``;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t)break;r+=i,n+=e}return r}function C(e,t,n=!1){if(e==null)return``;let r=e;if(n){let n=e.indexOf(`
2
- `);if(n!==-1)return r=e.substring(0,n),o(r)+1>t?b(r,t):`${r}…`}return o(r)<=t?r:b(r,t)}var w=e((()=>{s(),v()}));function T(e){let t=e/1024;if(t<1)return`${e} bytes`;if(t<1024)return`${t.toFixed(1).replace(/\.0$/,``)}KB`;let n=t/1024;return n<1024?`${n.toFixed(1).replace(/\.0$/,``)}MB`:`${(n/1024).toFixed(1).replace(/\.0$/,``)}GB`}function E(e){return`${(e/1e3).toFixed(1)}s`}function D(e,t){if(e<6e4)return e===0?`0s`:e<1?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/1e3).toString()}s`;let n=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),i=Math.floor(e%36e5/6e4),a=Math.round(e%6e4/1e3);a===60&&(a=0,i++),i===60&&(i=0,r++),r===24&&(r=0,n++);let o=t?.hideTrailingZeros;return t?.mostSignificantOnly?n>0?`${n}d`:r>0?`${r}h`:i>0?`${i}m`:`${a}s`:n>0?o&&r===0&&i===0?`${n}d`:o&&i===0?`${n}d ${r}h`:`${n}d ${r}h ${i}m`:r>0?o&&i===0&&a===0?`${r}h`:o&&a===0?`${r}h ${i}m`:`${r}h ${i}m ${a}s`:i>0?o&&a===0?`${i}m`:`${i}m ${a}s`:`${a}s`}function O(e){return F(e>=1e3).format(e).toLowerCase()}function k(e){return O(e).replace(`.0`,``)}function A(e,t={}){let{style:n=`narrow`,numeric:r=`always`,now:i=new Date}=t,a=e.getTime()-i.getTime(),o=Math.trunc(a/1e3);for(let{unit:e,seconds:t,shortUnit:i}of[{unit:`year`,seconds:31536e3,shortUnit:`y`},{unit:`month`,seconds:2592e3,shortUnit:`mo`},{unit:`week`,seconds:604800,shortUnit:`w`},{unit:`day`,seconds:86400,shortUnit:`d`},{unit:`hour`,seconds:3600,shortUnit:`h`},{unit:`minute`,seconds:60,shortUnit:`m`},{unit:`second`,seconds:1,shortUnit:`s`}])if(Math.abs(o)>=t){let a=Math.trunc(o/t);return n===`narrow`?o<0?`${Math.abs(a)}${i} ago`:`in ${a}${i}`:_(`long`,r).format(a,e)}return n===`narrow`?o<=0?`0s ago`:`in 0s`:_(n,r).format(0,`second`)}function j(e,t={}){let{now:n=new Date,...r}=t;return e>n?A(e,{...r,now:n}):A(e,{...r,numeric:`always`,now:n})}function M(e){let t=e.fileSize===void 0?`${e.messageCount} messages`:T(e.fileSize),n=[j(e.modified,{style:`short`}),...e.gitBranch?[e.gitBranch]:[],t];return e.tag&&n.push(`#${e.tag}`),e.agentSetting&&n.push(`@${e.agentSetting}`),e.prNumber&&n.push(e.prRepository?`${e.prRepository}#${e.prNumber}`:`#${e.prNumber}`),n.join(` · `)}function ae(e,t=!1,n=!0){if(!e)return;let r=new Date(e*1e3),i=new Date,a=r.getMinutes();if((r.getTime()-i.getTime())/(1e3*60*60)>24){let e={month:`short`,day:`numeric`,hour:n?`numeric`:void 0,minute:!n||a===0?void 0:`2-digit`,hour12:n?!0:void 0};return r.getFullYear()!==i.getFullYear()&&(e.year=`numeric`),r.toLocaleString(`en-US`,e).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}return r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:a===0?void 0:`2-digit`,hour12:!0}).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}var N,P,F,I=e((()=>{v(),w(),N=null,P=null,F=e=>e?(N||(N=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:1})),N):(P||(P=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:0})),P)}));function L(){return V}function R(e){return e.toFixed(3)}function z(e,t,n,r,i,a,o=``){let s=r?` | RSS: ${T(r.rss)}, Heap: ${T(r.heapUsed)}`:``;return`[+${R(e).padStart(i)}ms] (+${R(t).padStart(a)}ms) ${n}${o}${s}`}var B,V,H=e((()=>{I(),i(),B=class{constructor(){a(this,`marks`,new Map),a(this,`_origin`,void 0),this._origin=Number(process.hrtime.bigint()/1000n)/1e3}mark(e){this.marks.set(e,this.now())}getEntriesByType(e){if(e!==`mark`)return[];let t=[];for(let[e,n]of this.marks)t.push({name:e,startTime:n,entryType:`mark`});return t}clearMarks(e){e===void 0?this.marks.clear():this.marks.delete(e)}now(){return Number(process.hrtime.bigint()/1000n)/1e3-this._origin}},V=new B}));function U(e){X&&(L().mark(e),J&&Z.push(process.memoryUsage()))}function W(){if(!J)return`Startup profiling not enabled`;let e=L().getEntriesByType(`mark`);if(e.length===0)return`No profiling checkpoints recorded`;let t=[];t.push(`=`.repeat(80)),t.push(`STARTUP PROFILING REPORT`),t.push(`=`.repeat(80)),t.push(``);let n=0;for(let[r,i]of e.entries())t.push(z(i.startTime,i.startTime-n,i.name,Z[r],8,7)),n=i.startTime;let r=e[e.length-1];return t.push(``),t.push(`Total startup time: ${R(r?.startTime??0)}ms`),t.push(`=`.repeat(80)),t.join(`
3
- `)}function G(){if(!$){if($=!0,oe(),J){let e=q(),t=re(e);u().mkdirSync(t),te(e,W(),{encoding:`utf8`,flush:!0}),d(`Startup profiling report:`),d(W())}L().clearMarks(),Z.length=0}}function K(){return J}function q(){return ie(n(),`startup-perf`,`${c()}.txt`)}function oe(){if(!Y)return;let e=L().getEntriesByType(`mark`);if(e.length===0)return;let t=new Map;for(let n of e)t.set(n.name,n.startTime);let n={};for(let[e,[r,i]]of Object.entries(Q)){let a=t.get(r),o=t.get(i);a!==void 0&&o!==void 0&&(n[`${e}_ms`]=Math.round(o-a))}n.checkpoint_count=e.length,m(`tengu_startup_perf`,n)}var J,Y,X,Z,Q,$,se=e((()=>{ee(),p(),l(),r(),f(),H(),ne(),J=t(process.env.CLAUDE_CODE_PROFILE_STARTUP),Y=process.env.USER_TYPE===`ant`||Math.random()<.005,X=J||Y,Z=[],Q={import_time:[`cli_entry`,`main_tsx_imports_loaded`],init_time:[`init_function_start`,`init_function_end`],settings_time:[`eagerLoadSettings_start`,`eagerLoadSettings_end`],total_time:[`cli_entry`,`main_after_run`]},X&&U(`profiler_initialized`),$=!1}));export{x as C,y as S,S as T,E as _,G as a,w as b,L as c,T as d,M as f,ae as g,j as h,U as i,H as l,A as m,se as n,R as o,O as p,K as r,z as s,q as t,D as u,k as v,b as w,C as x,I as y};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,n,o as r}from"./envUtils-BDhHQY0-.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Gr as o,t as s}from"./src-P_wYS_NJ2.js";import{Wt as ee,pt as c}from"./state-BemZdQIl.js";import{E as te,S as ne,a as l,d as u,l as d,p as f}from"./debug-RAynG_nM.js";import{n as p,r as m}from"./analytics-DJobLaWP.js";import{i as h,n as g,o as _,r as v}from"./intl-D2kgJmX7.js";import{dirname as re,join as ie}from"path";function y(e,t){if(o(e)<=t)return e;if(t<=0)return`…`;if(t<5)return b(e,t);let n=e.lastIndexOf(`/`),r=n>=0?e.slice(n):e,i=n>=0?e.slice(0,n):``,a=o(r);if(a>=t-1)return x(e,t);let s=t-1-a;return s<=0?x(r,t):S(i,s)+`…`+r}function b(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t-1)break;r+=i,n+=e}return r+`…`}function x(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=[...g().segment(e)],r=0,i=n.length;for(let e=n.length-1;e>=0;e--){let a=o(n[e].segment);if(r+a>t-1)break;r+=a,i=e}return`…`+n.slice(i).map(e=>e.segment).join(``)}function S(e,t){if(o(e)<=t)return e;if(t<=0)return``;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t)break;r+=i,n+=e}return r}function C(e,t,n=!1){if(e==null)return``;let r=e;if(n){let n=e.indexOf(`
2
+ `);if(n!==-1)return r=e.substring(0,n),o(r)+1>t?b(r,t):`${r}…`}return o(r)<=t?r:b(r,t)}var w=e((()=>{s(),_()}));function T(e){let t=e/1024;if(t<1)return`${e} bytes`;if(t<1024)return`${t.toFixed(1).replace(/\.0$/,``)}KB`;let n=t/1024;return n<1024?`${n.toFixed(1).replace(/\.0$/,``)}MB`:`${(n/1024).toFixed(1).replace(/\.0$/,``)}GB`}function E(e){return`${(e/1e3).toFixed(1)}s`}function D(e,t){if(e<6e4)return e===0?`0s`:e<1?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/1e3).toString()}s`;let n=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),i=Math.floor(e%36e5/6e4),a=Math.round(e%6e4/1e3);a===60&&(a=0,i++),i===60&&(i=0,r++),r===24&&(r=0,n++);let o=t?.hideTrailingZeros;return t?.mostSignificantOnly?n>0?`${n}d`:r>0?`${r}h`:i>0?`${i}m`:`${a}s`:n>0?o&&r===0&&i===0?`${n}d`:o&&i===0?`${n}d ${r}h`:`${n}d ${r}h ${i}m`:r>0?o&&i===0&&a===0?`${r}h`:o&&a===0?`${r}h ${i}m`:`${r}h ${i}m ${a}s`:i>0?o&&a===0?`${i}m`:`${i}m ${a}s`:`${a}s`}function O(e){return F(e>=1e3).format(e).toLowerCase()}function k(e){return O(e).replace(`.0`,``)}function A(e,t={}){let{style:n=`narrow`,numeric:r=`always`,now:i=new Date}=t,a=e.getTime()-i.getTime(),o=Math.trunc(a/1e3);for(let{unit:e,seconds:t,shortUnit:i}of[{unit:`year`,seconds:31536e3,shortUnit:`y`},{unit:`month`,seconds:2592e3,shortUnit:`mo`},{unit:`week`,seconds:604800,shortUnit:`w`},{unit:`day`,seconds:86400,shortUnit:`d`},{unit:`hour`,seconds:3600,shortUnit:`h`},{unit:`minute`,seconds:60,shortUnit:`m`},{unit:`second`,seconds:1,shortUnit:`s`}])if(Math.abs(o)>=t){let a=Math.trunc(o/t);return n===`narrow`?o<0?`${Math.abs(a)}${i} ago`:`in ${a}${i}`:v(`long`,r).format(a,e)}return n===`narrow`?o<=0?`0s ago`:`in 0s`:v(n,r).format(0,`second`)}function j(e,t={}){let{now:n=new Date,...r}=t;return e>n?A(e,{...r,now:n}):A(e,{...r,numeric:`always`,now:n})}function M(e){let t=e.fileSize===void 0?`${e.messageCount} messages`:T(e.fileSize),n=[j(e.modified,{style:`short`}),...e.gitBranch?[e.gitBranch]:[],t];return e.tag&&n.push(`#${e.tag}`),e.agentSetting&&n.push(`@${e.agentSetting}`),e.prNumber&&n.push(e.prRepository?`${e.prRepository}#${e.prNumber}`:`#${e.prNumber}`),n.join(` · `)}function ae(e,t=!1,n=!0){if(!e)return;let r=new Date(e*1e3),i=new Date,a=r.getMinutes();if((r.getTime()-i.getTime())/(1e3*60*60)>24){let e={month:`short`,day:`numeric`,hour:n?`numeric`:void 0,minute:!n||a===0?void 0:`2-digit`,hour12:n?!0:void 0};return r.getFullYear()!==i.getFullYear()&&(e.year=`numeric`),r.toLocaleString(`en-US`,e).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}return r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:a===0?void 0:`2-digit`,hour12:!0}).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}var N,P,F,I=e((()=>{_(),w(),N=null,P=null,F=e=>e?(N||(N=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:1})),N):(P||(P=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:0})),P)}));function L(){return V}function R(e){return e.toFixed(3)}function z(e,t,n,r,i,a,o=``){let s=r?` | RSS: ${T(r.rss)}, Heap: ${T(r.heapUsed)}`:``;return`[+${R(e).padStart(i)}ms] (+${R(t).padStart(a)}ms) ${n}${o}${s}`}var B,V,H=e((()=>{I(),i(),B=class{constructor(){a(this,`marks`,new Map),a(this,`_origin`,void 0),this._origin=Number(process.hrtime.bigint()/1000n)/1e3}mark(e){this.marks.set(e,this.now())}getEntriesByType(e){if(e!==`mark`)return[];let t=[];for(let[e,n]of this.marks)t.push({name:e,startTime:n,entryType:`mark`});return t}clearMarks(e){e===void 0?this.marks.clear():this.marks.delete(e)}now(){return Number(process.hrtime.bigint()/1000n)/1e3-this._origin}},V=new B}));function U(e){X&&(L().mark(e),J&&Z.push(process.memoryUsage()))}function W(){if(!J)return`Startup profiling not enabled`;let e=L().getEntriesByType(`mark`);if(e.length===0)return`No profiling checkpoints recorded`;let t=[];t.push(`=`.repeat(80)),t.push(`STARTUP PROFILING REPORT`),t.push(`=`.repeat(80)),t.push(``);let n=0;for(let[r,i]of e.entries())t.push(z(i.startTime,i.startTime-n,i.name,Z[r],8,7)),n=i.startTime;let r=e[e.length-1];return t.push(``),t.push(`Total startup time: ${R(r?.startTime??0)}ms`),t.push(`=`.repeat(80)),t.join(`
3
+ `)}function G(){if(!$){if($=!0,q(),J){let e=K(),t=re(e);u().mkdirSync(t),te(e,W(),{encoding:`utf8`,flush:!0}),d(`Startup profiling report:`),d(W())}L().clearMarks(),Z.length=0}}function K(){return ie(n(),`startup-perf`,`${c()}.txt`)}function q(){if(!Y)return;let e=L().getEntriesByType(`mark`);if(e.length===0)return;let t=new Map;for(let n of e)t.set(n.name,n.startTime);let n={};for(let[e,[r,i]]of Object.entries(Q)){let a=t.get(r),o=t.get(i);a!==void 0&&o!==void 0&&(n[`${e}_ms`]=Math.round(o-a))}n.checkpoint_count=e.length,m(`tengu_startup_perf`,n)}var J,Y,X,Z,Q,$,oe=e((()=>{ee(),p(),l(),r(),f(),H(),ne(),J=t(process.env.CLAUDE_CODE_PROFILE_STARTUP),Y=Math.random()<.005,X=J||Y,Z=[],Q={import_time:[`cli_entry`,`main_tsx_imports_loaded`],init_time:[`init_function_start`,`init_function_end`],settings_time:[`eagerLoadSettings_start`,`eagerLoadSettings_end`],total_time:[`cli_entry`,`main_after_run`]},X&&U(`profiler_initialized`),$=!1}));export{b as C,x as S,k as _,R as a,C as b,H as c,M as d,O as f,E as g,ae as h,G as i,D as l,j as m,oe as n,z as o,A as p,U as r,L as s,K as t,T as u,I as v,S as w,y as x,w as y};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-DSxRz_kt.js";import{dirname as r,join as i}from"path";import{mkdirSync as a,readFileSync as o,unlinkSync as s,writeFileSync as c}from"fs";function l(e=`remote-control`){return i(t(),`daemon`,`${e}.json`)}function u(e,t=`remote-control`){let n=l(t);a(r(n),{recursive:!0}),c(n,JSON.stringify(e,null,2),`utf-8`)}function d(e=`remote-control`){let t=l(e);try{let e=o(t,`utf-8`);return JSON.parse(e)}catch{return null}}function f(e=`remote-control`){let t=l(e);try{s(t)}catch{}}function p(e){try{return process.kill(e,0),!0}catch{return!1}}function m(e=`remote-control`){let t=d(e);return t?p(t.pid)?{status:`running`,state:t}:(f(e),{status:`stale`}):{status:`stopped`}}async function h(e=`remote-control`,t=1e4){let n=d(e);if(!n)return!1;let{pid:r}=n;if(!p(r))return f(e),!1;try{process.kill(r,`SIGTERM`)}catch{return f(e),!1}let i=Date.now()+t;for(;Date.now()<i;){if(!p(r))return f(e),!0;await new Promise(e=>setTimeout(e,200))}try{process.kill(r,`SIGKILL`)}catch{}return await new Promise(e=>setTimeout(e,500)),f(e),!0}var g=e((()=>{n()}));export{u as a,h as i,m as n,f as r,g as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-BDhHQY0-.js";import{dirname as r,join as i}from"path";import{mkdirSync as a,readFileSync as o,unlinkSync as s,writeFileSync as c}from"fs";function l(e=`remote-control`){return i(t(),`daemon`,`${e}.json`)}function u(e,t=`remote-control`){let n=l(t);a(r(n),{recursive:!0}),c(n,JSON.stringify(e,null,2),`utf-8`)}function d(e=`remote-control`){let t=l(e);try{let e=o(t,`utf-8`);return JSON.parse(e)}catch{return null}}function f(e=`remote-control`){let t=l(e);try{s(t)}catch{}}function p(e){try{return process.kill(e,0),!0}catch{return!1}}function m(e=`remote-control`){let t=d(e);return t?p(t.pid)?{status:`running`,state:t}:(f(e),{status:`stale`}):{status:`stopped`}}async function h(e=`remote-control`,t=1e4){let n=d(e);if(!n)return!1;let{pid:r}=n;if(!p(r))return f(e),!1;try{process.kill(r,`SIGTERM`)}catch{return f(e),!1}let i=Date.now()+t;for(;Date.now()<i;){if(!p(r))return f(e),!0;await new Promise(e=>setTimeout(e,200))}try{process.kill(r,`SIGKILL`)}catch{}return await new Promise(e=>setTimeout(e,500)),f(e),!0}var g=e((()=>{n()}));export{u as a,h as i,m as n,f as r,g as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./isObject-C6qM3WEW.js";import{a as d,c as f,d as p,f as m,g as h,h as g,i as _,l as v,m as y,n as ee,o as te,p as ne,r as re,s as ie,t as ae,u as oe}from"./memoize-BK3gG5ob.js";import{i as b,n as se,r as x,t as ce}from"./isSymbol-BO6cdPI7.js";import{realpathSync as le}from"fs";import{randomUUID as ue}from"crypto";import{cwd as de}from"process";function fe(){this.__data__=new ie,this.size=0}var pe=e((()=>{f()}));function me(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var he=e((()=>{}));function ge(e){return this.__data__.get(e)}var _e=e((()=>{}));function ve(e){return this.__data__.has(e)}var ye=e((()=>{}));function be(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!d||r.length<xe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this}var xe,Se=e((()=>{f(),te(),_(),xe=200}));function S(e){var t=this.__data__=new ie(e);this.size=t.size}var Ce=e((()=>{f(),pe(),he(),_e(),ye(),Se(),S.prototype.clear=fe,S.prototype.delete=me,S.prototype.get=ge,S.prototype.has=ve,S.prototype.set=be}));function we(e){return this.__data__.set(e,Te),this}var Te,Ee=e((()=>{Te=`__lodash_hash_undefined__`}));function De(e){return this.__data__.has(e)}var Oe=e((()=>{}));function C(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new re;++t<n;)this.add(e[t])}var ke=e((()=>{_(),Ee(),Oe(),C.prototype.add=C.prototype.push=we,C.prototype.has=De}));function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var je=e((()=>{}));function Me(e,t){return e.has(t)}var Ne=e((()=>{}));function Pe(e,t,n,r,i,a){var o=n&Fe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Ie?new C:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ae(t,function(e,t){if(!Me(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Fe,Ie,Le=e((()=>{ke(),je(),Ne(),Fe=1,Ie=2})),w,Re=e((()=>{c(),w=n.Uint8Array}));function ze(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var Be=e((()=>{}));function Ve(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var He=e((()=>{}));function Ue(e,t,n,r,i,a,o){switch(n){case nt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tt:return!(e.byteLength!=t.byteLength||!a(new w(e),new w(t)));case Ke:case qe:case Xe:return v(+e,+t);case Je:return e.name==t.name&&e.message==t.message;case Ze:case $e:return e==t+``;case Ye:var s=ze;case Qe:var c=r&We;if(s||(s=Ve),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Ge,o.set(e,t);var u=Pe(s(e),s(t),r,i,a,o);return o.delete(e),u;case et:if(T)return T.call(e)==T.call(t)}return!1}var We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,T,it=e((()=>{o(),Re(),oe(),Le(),Be(),He(),We=1,Ge=2,Ke=`[object Boolean]`,qe=`[object Date]`,Je=`[object Error]`,Ye=`[object Map]`,Xe=`[object Number]`,Ze=`[object RegExp]`,Qe=`[object Set]`,$e=`[object String]`,et=`[object Symbol]`,tt=`[object ArrayBuffer]`,nt=`[object DataView]`,rt=t?t.prototype:void 0,T=rt?rt.valueOf:void 0}));function at(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ot=e((()=>{})),E,D=e((()=>{E=Array.isArray}));function st(e,t,n){var r=t(e);return E(e)?r:at(r,n(e))}var ct=e((()=>{ot(),D()}));function lt(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var ut=e((()=>{}));function dt(){return[]}var ft=e((()=>{})),pt,mt,ht,gt=e((()=>{ut(),ft(),pt=Object.prototype.propertyIsEnumerable,mt=Object.getOwnPropertySymbols,ht=mt?function(e){return e==null?[]:(e=Object(e),lt(mt(e),function(t){return pt.call(e,t)}))}:dt}));function _t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vt=e((()=>{}));function yt(e){return b(e)&&s(e)==bt}var bt,xt=e((()=>{r(),x(),bt=`[object Arguments]`})),St,Ct,wt,O,Tt=e((()=>{xt(),x(),St=Object.prototype,Ct=St.hasOwnProperty,wt=St.propertyIsEnumerable,O=yt(function(){return arguments}())?yt:function(e){return b(e)&&Ct.call(e,`callee`)&&!wt.call(e,`callee`)}}));function Et(){return!1}var Dt=e((()=>{})),Ot,kt,At,k,jt=e((()=>{c(),Dt(),Ot=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kt=Ot&&typeof module==`object`&&module&&!module.nodeType&&module,At=kt&&kt.exports===Ot?n.Buffer:void 0,k=(At?At.isBuffer:void 0)||Et}));function Mt(e,t){var n=typeof e;return t=t??Nt,!!t&&(n==`number`||n!=`symbol`&&Pt.test(e))&&e>-1&&e%1==0&&e<t}var Nt,Pt,A=e((()=>{Nt=9007199254740991,Pt=/^(?:0|[1-9]\d*)$/}));function j(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Ft}var Ft,It=e((()=>{Ft=9007199254740991}));function Lt(e){return b(e)&&j(e.length)&&!!M[s(e)]}var Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,M,ln=e((()=>{r(),It(),x(),Rt=`[object Arguments]`,zt=`[object Array]`,Bt=`[object Boolean]`,Vt=`[object Date]`,Ht=`[object Error]`,Ut=`[object Function]`,Wt=`[object Map]`,Gt=`[object Number]`,Kt=`[object Object]`,qt=`[object RegExp]`,Jt=`[object Set]`,Yt=`[object String]`,Xt=`[object WeakMap]`,Zt=`[object ArrayBuffer]`,Qt=`[object DataView]`,$t=`[object Float32Array]`,en=`[object Float64Array]`,tn=`[object Int8Array]`,nn=`[object Int16Array]`,rn=`[object Int32Array]`,an=`[object Uint8Array]`,on=`[object Uint8ClampedArray]`,sn=`[object Uint16Array]`,cn=`[object Uint32Array]`,M={},M[$t]=M[en]=M[tn]=M[nn]=M[rn]=M[an]=M[on]=M[sn]=M[cn]=!0,M[Rt]=M[zt]=M[Zt]=M[Bt]=M[Qt]=M[Vt]=M[Ht]=M[Ut]=M[Wt]=M[Gt]=M[Kt]=M[qt]=M[Jt]=M[Yt]=M[Xt]=!1}));function un(e){return function(t){return e(t)}}var dn=e((()=>{})),fn,N,P,F,pn=e((()=>{u(),fn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,N=fn&&typeof module==`object`&&module&&!module.nodeType&&module,P=N&&N.exports===fn&&i.process,F=function(){try{return N&&N.require&&N.require(`util`).types||P&&P.binding&&P.binding(`util`)}catch{}}()})),mn,I,hn=e((()=>{ln(),dn(),pn(),mn=F&&F.isTypedArray,I=mn?un(mn):Lt}));function gn(e,t){var n=E(e),r=!n&&O(e),i=!n&&!r&&k(e),a=!n&&!r&&!i&&I(e),o=n||r||i||a,s=o?_t(e.length,String):[],c=s.length;for(var l in e)(t||_n.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Mt(l,c)))&&s.push(l);return s}var _n,vn=e((()=>{vt(),Tt(),D(),jt(),A(),hn(),_n=Object.prototype.hasOwnProperty}));function yn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||bn)}var bn,xn=e((()=>{bn=Object.prototype}));function Sn(e,t){return function(n){return e(t(n))}}var Cn=e((()=>{})),wn,Tn=e((()=>{Cn(),wn=Sn(Object.keys,Object)}));function En(e){if(!yn(e))return wn(e);var t=[];for(var n in Object(e))Dn.call(e,n)&&n!=`constructor`&&t.push(n);return t}var Dn,On=e((()=>{xn(),Tn(),Dn=Object.prototype.hasOwnProperty}));function kn(e){return e!=null&&j(e.length)&&!h(e)}var An=e((()=>{g(),It()}));function L(e){return kn(e)?gn(e):En(e)}var jn=e((()=>{vn(),On(),An()}));function Mn(e){return st(e,L,ht)}var Nn=e((()=>{ct(),gt(),jn()}));function Pn(e,t,n,r,i,a){var o=n&Fn,s=Mn(e),c=s.length;if(c!=Mn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:In.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Fn,In,Ln=e((()=>{Nn(),Fn=1,In=Object.prototype.hasOwnProperty})),R,Rn=e((()=>{m(),c(),R=p(n,`DataView`)})),z,zn=e((()=>{m(),c(),z=p(n,`Promise`)})),B,Bn=e((()=>{m(),c(),B=p(n,`Set`)})),V,Vn=e((()=>{m(),c(),V=p(n,`WeakMap`)})),Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,H,U,$n=e((()=>{Rn(),te(),zn(),Bn(),Vn(),r(),ne(),Hn=`[object Map]`,Un=`[object Object]`,Wn=`[object Promise]`,Gn=`[object Set]`,Kn=`[object WeakMap]`,qn=`[object DataView]`,Jn=y(R),Yn=y(d),Xn=y(z),Zn=y(B),Qn=y(V),H=s,(R&&H(new R(new ArrayBuffer(1)))!=qn||d&&H(new d)!=Hn||z&&H(z.resolve())!=Wn||B&&H(new B)!=Gn||V&&H(new V)!=Kn)&&(H=function(e){var t=s(e),n=t==Un?e.constructor:void 0,r=n?y(n):``;if(r)switch(r){case Jn:return qn;case Yn:return Hn;case Xn:return Wn;case Zn:return Gn;case Qn:return Kn}return t}),U=H}));function er(e,t,n,r,i,a){var o=E(e),s=E(t),c=o?rr:U(e),l=s?rr:U(t);c=c==nr?W:c,l=l==nr?W:l;var u=c==W,d=l==W,f=c==l;if(f&&k(e)){if(!k(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new S),o||I(e)?Pe(e,t,n,r,i,a):Ue(e,t,c,n,r,i,a);if(!(n&tr)){var p=u&&ir.call(e,`__wrapped__`),m=d&&ir.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new S),i(h,g,n,r,a)}}return f?(a||(a=new S),Pn(e,t,n,r,i,a)):!1}var tr,nr,rr,W,ir,ar=e((()=>{Ce(),Le(),it(),Ln(),$n(),D(),jt(),hn(),tr=1,nr=`[object Arguments]`,rr=`[object Array]`,W=`[object Object]`,ir=Object.prototype.hasOwnProperty}));function G(e,t,n,r,i){return e===t?!0:e==null||t==null||!b(e)&&!b(t)?e!==e&&t!==t:er(e,t,n,r,G,i)}var or=e((()=>{ar(),x()}));function sr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new S;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?G(u,l,cr|lr,r,d):f))return!1}}return!0}var cr,lr,ur=e((()=>{Ce(),or(),cr=1,lr=2}));function dr(e){return e===e&&!a(e)}var fr=e((()=>{l()}));function pr(e){for(var t=L(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,dr(i)]}return t}var mr=e((()=>{fr(),jn()}));function hr(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var gr=e((()=>{}));function _r(e){var t=pr(e);return t.length==1&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||sr(n,e,t)}}var vr=e((()=>{ur(),mr(),gr()}));function yr(e,t){if(E(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||se(e)?!0:xr.test(e)||!br.test(e)||t!=null&&e in Object(t)}var br,xr,Sr=e((()=>{D(),ce(),br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xr=/^\w*$/}));function Cr(e){var t=ee(e,function(e){return n.size===wr&&n.clear(),e}),n=t.cache;return t}var wr,Tr=e((()=>{ae(),wr=500})),Er,Dr,Or,kr=e((()=>{Tr(),Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Or=Cr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Er,function(e,n,r,i){t.push(r?i.replace(Dr,`$1`):n||e)}),t})}));function Ar(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var jr=e((()=>{}));function Mr(e){if(typeof e==`string`)return e;if(E(e))return Ar(e,Mr)+``;if(se(e))return Fr?Fr.call(e):``;var t=e+``;return t==`0`&&1/e==-Nr?`-0`:t}var Nr,Pr,Fr,Ir=e((()=>{o(),jr(),D(),ce(),Nr=1/0,Pr=t?t.prototype:void 0,Fr=Pr?Pr.toString:void 0}));function Lr(e){return e==null?``:Mr(e)}var Rr=e((()=>{Ir()}));function zr(e,t){return E(e)?e:yr(e,t)?[e]:Or(Lr(e))}var Br=e((()=>{D(),Sr(),kr(),Rr()}));function K(e){if(typeof e==`string`||se(e))return e;var t=e+``;return t==`0`&&1/e==-Vr?`-0`:t}var Vr,q=e((()=>{ce(),Vr=1/0}));function Hr(e,t){t=zr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[K(t[n++])];return n&&n==r?e:void 0}var Ur=e((()=>{Br(),q()}));function Wr(e,t,n){var r=e==null?void 0:Hr(e,t);return r===void 0?n:r}var Gr=e((()=>{Ur()}));function Kr(e,t){return e!=null&&t in Object(e)}var qr=e((()=>{}));function Jr(e,t,n){t=zr(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=K(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&j(i)&&Mt(o,i)&&(E(e)||O(e)))}var Yr=e((()=>{Br(),Tt(),D(),A(),It(),q()}));function Xr(e,t){return e!=null&&Jr(e,t,Kr)}var Zr=e((()=>{qr(),Yr()}));function Qr(e,t){return yr(e)&&dr(t)?hr(K(e),t):function(n){var r=Wr(n,e);return r===void 0&&r===t?Xr(n,e):G(t,r,$r|ei)}}var $r,ei,ti=e((()=>{or(),Gr(),Zr(),Sr(),fr(),gr(),q(),$r=1,ei=2}));function ni(e){return e}var ri=e((()=>{}));function ii(e){return function(t){return t?.[e]}}var ai=e((()=>{}));function oi(e){return function(t){return Hr(t,e)}}var si=e((()=>{Ur()}));function ci(e){return yr(e)?ii(K(e)):oi(e)}var li=e((()=>{ai(),si(),Sr(),q()}));function ui(e){return typeof e==`function`?e:e==null?ni:typeof e==`object`?E(e)?Qr(e[0],e[1]):_r(e):ci(e)}var di=e((()=>{vr(),ti(),ri(),D(),li()}));function fi(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==void 0&&(n=n===void 0?a:n+a)}return n}var pi=e((()=>{}));function J(e,t){return e&&e.length?fi(e,ui(t,2)):0}var mi=e((()=>{di(),pi()})),hi=e((()=>{}));function gi(){return Y}function _i(e){Y=e}function vi(e){return X.has(e)?X.get(e):void 0}function yi(e,t){X.set(e,t)}function bi(e){return Z.get(e)}function xi(e,t){Z.set(e,t)}function Si(){Y=null,X.clear(),Z.clear()}function Ci(){return Ei}function wi(e){Ei=e}function Ti(){Ei=void 0}var Y,X,Z,Ei,Di=e((()=>{Y=null,X=new Map,Z=new Map}));function Oi(){let e=new Set;return{subscribe(t){return e.add(t),()=>{e.delete(t)}},emit(...t){for(let n of e)n(...t)},clear(){e.clear()}}}var ki=e((()=>{}));function Ai(){let e=``;if(typeof process<`u`&&typeof process.cwd==`function`&&typeof le==`function`){let t=de();try{e=le(t).normalize(`NFC`)}catch{e=t.normalize(`NFC`)}}return{originalCwd:e,projectRoot:e,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:e,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,clientType:`cli`,sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:[`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:ue(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function ji(){return Q.sessionId}function Mi(e={}){return e.setCurrentAsParent&&(Q.parentSessionId=Q.sessionId),Q.planSlugCache.delete(Q.sessionId),Q.sessionId=ue(),Q.sessionProjectDir=null,Q.sessionId}function Ni(){return Q.parentSessionId}function Pi(e,t=null){Q.planSlugCache.delete(Q.sessionId),Q.sessionId=e,Q.sessionProjectDir=t,zs.emit(e)}function Fi(){return Q.sessionProjectDir}function Ii(){return Q.originalCwd}function Li(){return Q.projectRoot}function Ri(e){Q.originalCwd=e.normalize(`NFC`)}function zi(e){Q.projectRoot=e.normalize(`NFC`)}function Bi(){return Q.cwd}function Vi(e){Q.cwd=e.normalize(`NFC`)}function Hi(){return Q.directConnectServerUrl}function Ui(e){Q.directConnectServerUrl=e}function Wi(e,t){Q.totalAPIDuration+=e,Q.totalAPIDurationWithoutRetries+=t}function Gi(e,t,n){Q.modelUsage[n]=t,Q.totalCostUSD+=e}function Ki(){return Q.totalCostUSD}function qi(){return Q.totalAPIDuration}function Ji(){return Date.now()-Q.startTime}function Yi(){return Q.totalAPIDurationWithoutRetries}function Xi(){return Q.totalToolDuration}function Zi(e){Q.totalToolDuration+=e,Q.turnToolDurationMs+=e,Q.turnToolCount++}function Qi(e){Q.turnHookDurationMs+=e,Q.turnHookCount++}function $i(){Q.turnHookDurationMs=0,Q.turnHookCount=0}function ea(){Q.turnToolDurationMs=0,Q.turnToolCount=0}function ta(e){Q.turnClassifierDurationMs+=e,Q.turnClassifierCount++}function na(){Q.turnClassifierDurationMs=0,Q.turnClassifierCount=0}function ra(){return Q.statsStore}function ia(e){Q.statsStore=e}function aa(e){e?oa():Vs=!0}function oa(){Q.lastInteractionTime=Date.now(),Vs=!1}function sa(e,t){Q.totalLinesAdded+=e,Q.totalLinesRemoved+=t}function ca(){return Q.totalLinesAdded}function la(){return Q.totalLinesRemoved}function ua(){return J(Object.values(Q.modelUsage),`inputTokens`)}function da(){return J(Object.values(Q.modelUsage),`outputTokens`)}function fa(){return J(Object.values(Q.modelUsage),`cacheReadInputTokens`)}function pa(){return J(Object.values(Q.modelUsage),`cacheCreationInputTokens`)}function ma(){return J(Object.values(Q.modelUsage),`webSearchRequests`)}function ha(){return da()-Hs}function ga(){return Us}function _a(e){Hs=da(),Us=e,$=0}function va(){return $}function ya(){$++}function ba(){Q.hasUnknownModelCost=!0}function xa(){return Q.hasUnknownModelCost}function Sa(){return Q.lastMainRequestId}function Ca(e){Q.lastMainRequestId=e}function wa(){return Q.lastApiCompletionTimestamp}function Ta(e){Q.lastApiCompletionTimestamp=e}function Ea(){Q.pendingPostCompaction=!0}function Da(){let e=Q.pendingPostCompaction;return Q.pendingPostCompaction=!1,e}function Oa(){return Q.lastInteractionTime}function ka(){return Ws}async function Aa(){for(;Ws;)await new Promise(e=>setTimeout(e,Gs).unref?.())}function ja(){return Q.modelUsage}function Ma(e){return Q.modelUsage[e]}function Na(){return Q.mainLoopModelOverride}function Pa(){return Q.initialMainLoopModel}function Fa(e){Q.mainLoopModelOverride=e}function Ia(e){Q.initialMainLoopModel=e}function La(){return Q.sdkBetas}function Ra(e){Q.sdkBetas=e}function za(){Q.totalCostUSD=0,Q.totalAPIDuration=0,Q.totalAPIDurationWithoutRetries=0,Q.totalToolDuration=0,Q.startTime=Date.now(),Q.totalLinesAdded=0,Q.totalLinesRemoved=0,Q.hasUnknownModelCost=!1,Q.modelUsage={},Q.promptId=null}function Ba({totalCostUSD:e,totalAPIDuration:t,totalAPIDurationWithoutRetries:n,totalToolDuration:r,totalLinesAdded:i,totalLinesRemoved:a,lastDuration:o,modelUsage:s}){Q.totalCostUSD=e,Q.totalAPIDuration=t,Q.totalAPIDurationWithoutRetries=n,Q.totalToolDuration=r,Q.totalLinesAdded=i,Q.totalLinesRemoved=a,s&&(Q.modelUsage=s),o&&(Q.startTime=Date.now()-o)}function Va(){return Q.modelStrings}function Ha(e){Q.modelStrings=e}function Ua(e,t){Q.meter=e,Q.sessionCounter=t(`claude_code.session.count`,{description:`Count of CLI sessions started`}),Q.locCounter=t(`claude_code.lines_of_code.count`,{description:`Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed`}),Q.prCounter=t(`claude_code.pull_request.count`,{description:`Number of pull requests created`}),Q.commitCounter=t(`claude_code.commit.count`,{description:`Number of git commits created`}),Q.costCounter=t(`claude_code.cost.usage`,{description:`Cost of the Work Mate session`,unit:`USD`}),Q.tokenCounter=t(`claude_code.token.usage`,{description:`Number of tokens used`,unit:`tokens`}),Q.codeEditToolDecisionCounter=t(`claude_code.code_edit_tool.decision`,{description:`Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools`}),Q.activeTimeCounter=t(`claude_code.active_time.total`,{description:`Total active time in seconds`,unit:`s`})}function Wa(){return Q.sessionCounter}function Ga(){return Q.locCounter}function Ka(){return Q.prCounter}function qa(){return Q.commitCounter}function Ja(){return Q.costCounter}function Ya(){return Q.tokenCounter}function Xa(){return Q.codeEditToolDecisionCounter}function Za(){return Q.activeTimeCounter}function Qa(){return Q.loggerProvider}function $a(e){Q.loggerProvider=e}function eo(){return Q.eventLogger}function to(e){Q.eventLogger=e}function no(){return Q.meterProvider}function ro(e){Q.meterProvider=e}function io(){return Q.tracerProvider}function ao(e){Q.tracerProvider=e}function oo(){return!Q.isInteractive}function so(){return Q.isInteractive}function co(e){Q.isInteractive=e}function lo(){return Q.clientType}function uo(e){Q.clientType=e}function fo(){return Q.sdkAgentProgressSummariesEnabled}function po(e){Q.sdkAgentProgressSummariesEnabled=e}function mo(){return Q.strictToolResultPairing}function ho(e){Q.sessionSource=e}function go(){return Q.questionPreviewFormat}function _o(e){Q.questionPreviewFormat=e}function vo(){return Q.agentColorMap}function yo(){return Q.flagSettingsPath}function bo(e){Q.flagSettingsPath=e}function xo(){return Q.flagSettingsInline}function So(e){Q.flagSettingsInline=e}function Co(){return Q.sessionIngressToken}function wo(e){Q.sessionIngressToken=e}function To(){return Q.oauthTokenFromFd}function Eo(e){Q.oauthTokenFromFd=e}function Do(){return Q.apiKeyFromFd}function Oo(e){Q.apiKeyFromFd=e}function ko(e){Q.lastAPIRequest=e}function Ao(e){Q.lastAPIRequestMessages=e}function jo(e){Q.lastClassifierRequests=e}function Mo(e){Q.cachedClaudeMdContent=e}function No(){return Q.cachedClaudeMdContent}function Po(){return Q.allowedSettingSources}function Fo(e){Q.allowedSettingSources=e}function Io(){return oo()&&Q.clientType!==`claude-vscode`}function Lo(e){Q.inlinePlugins=e}function Ro(){return Q.inlinePlugins}function zo(e){Q.useCoworkPlugins=e,Si()}function Bo(){return Q.useCoworkPlugins}function Vo(e){Q.sessionBypassPermissionsMode=e}function Ho(e){Q.sessionTrustAccepted=e}function Uo(){return Q.sessionTrustAccepted}function Wo(e){Q.sessionPersistenceDisabled=e}function Go(){return Q.sessionPersistenceDisabled}function Ko(){return Q.hasExitedPlanMode}function qo(e){Q.hasExitedPlanMode=e}function Jo(){return Q.needsPlanModeExitAttachment}function Yo(e){Q.needsPlanModeExitAttachment=e}function Xo(e,t){t===`plan`&&e!==`plan`&&(Q.needsPlanModeExitAttachment=!1),e===`plan`&&t!==`plan`&&(Q.needsPlanModeExitAttachment=!0)}function Zo(){return Q.needsAutoModeExitAttachment}function Qo(e){Q.needsAutoModeExitAttachment=e}function $o(e,t){if(e===`auto`&&t===`plan`||e===`plan`&&t===`auto`)return;let n=e===`auto`,r=t===`auto`;r&&!n&&(Q.needsAutoModeExitAttachment=!1),n&&!r&&(Q.needsAutoModeExitAttachment=!0)}function es(){return Q.lspRecommendationShownThisSession}function ts(e){Q.lspRecommendationShownThisSession=e}function ns(e){Q.initJsonSchema=e}function rs(){return Q.initJsonSchema}function is(e){Q.registeredHooks||(Q.registeredHooks={});for(let[t,n]of Object.entries(e)){let e=t;Q.registeredHooks[e]||(Q.registeredHooks[e]=[]),Q.registeredHooks[e].push(...n??[])}}function as(){return Q.registeredHooks}function os(){if(!Q.registeredHooks)return;let e={};for(let[t,n]of Object.entries(Q.registeredHooks)){let r=(n??[]).filter(e=>!(`pluginRoot`in e));r.length>0&&(e[t]=r)}Q.registeredHooks=Object.keys(e).length>0?e:null}function ss(){return Q.planSlugCache}function cs(e,t){if(Q.planSlugCache.size>=50){let e=Q.planSlugCache.keys().next().value;e!==void 0&&Q.planSlugCache.delete(e)}Q.planSlugCache.set(e,t)}function ls(e){Q.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:e.sessionId}}function us(){return Q.teleportedSessionInfo}function ds(){Q.teleportedSessionInfo&&(Q.teleportedSessionInfo.hasLoggedFirstMessage=!0)}function fs(e,t,n,r=null){let i=`${r??``}:${e}`;Q.invokedSkills.set(i,{skillName:e,skillPath:t,content:n,invokedAt:Date.now(),agentId:r})}function ps(e){let t=e??null,n=new Map;for(let[e,r]of Q.invokedSkills)r.agentId===t&&n.set(e,r);return n}function ms(e){if(!e||e.size===0){Q.invokedSkills.clear();return}for(let[t,n]of Q.invokedSkills)(n.agentId===null||!e.has(n.agentId))&&Q.invokedSkills.delete(t)}function hs(e){for(let[t,n]of Q.invokedSkills)n.agentId===e&&Q.invokedSkills.delete(t)}function gs(){return Q.mainThreadAgentType}function _s(e){Q.mainThreadAgentType=e}function vs(){return Q.isRemoteMode}function ys(e){Q.isRemoteMode=e}function bs(){return Q.systemPromptSectionCache}function xs(e,t){if(Q.systemPromptSectionCache.size>=100){let e=Q.systemPromptSectionCache.keys().next().value;e!==void 0&&Q.systemPromptSectionCache.delete(e)}Q.systemPromptSectionCache.set(e,t)}function Ss(){Q.systemPromptSectionCache.clear()}function Cs(){return Q.lastEmittedDate}function ws(e){Q.lastEmittedDate=e}function Ts(){return Q.additionalDirectoriesForClaudeMd}function Es(e){Q.additionalDirectoriesForClaudeMd=e}function Ds(){return Q.promptCache1hAllowlist}function Os(e){Q.promptCache1hAllowlist=e}function ks(){return Q.promptCache1hEligible}function As(e){Q.promptCache1hEligible=e}function js(){return Q.afkModeHeaderLatched}function Ms(e){Q.afkModeHeaderLatched=e}function Ns(){return Q.fastModeHeaderLatched}function Ps(e){Q.fastModeHeaderLatched=e}function Fs(){return Q.cacheEditingHeaderLatched}function Is(){Q.afkModeHeaderLatched=null,Q.fastModeHeaderLatched=null,Q.cacheEditingHeaderLatched=null}function Ls(){return Q.promptId}function Rs(e){Q.promptId=e}var Q,zs,Bs,Vs,Hs,Us,$,Ws,Gs,Ks=e((()=>{mi(),hi(),Di(),ki(),Q=Ai(),zs=Oi(),Bs=zs.subscribe,Hs=0,Us=null,$=0,Ws=!1,Gs=150}));export{To as $,Ho as $n,vn as $r,is as $t,eo as A,C as Ai,$a as An,zr as Ar,la as At,vs as B,Ri as Bn,B as Br,Ko as Bt,lo as C,ot as Ci,ys as Cn,di as Cr,Yi as Ct,ga as D,Re as Di,jo as Dn,Ur as Dr,Ji as Dt,Ja as E,w as Ei,Ta as En,Hr as Er,Ki as Et,Pa as F,ro as Fn,jr as Fr,ha as Ft,Sa as G,Rs as Gn,L as Gr,Go as Gt,wa as H,zi as Hn,Mn as Hr,xa as Ht,Ro as I,Ha as In,G as Ir,Ma as It,Na as J,Ra as Jn,Cn as Jr,Zo as Jt,Ga as K,_o as Kn,An as Kr,ds as Kt,ps as L,Qo as Ln,or as Lr,Bo as Lt,xo as M,S as Mi,Fa as Mn,Rr as Mr,Xi as Mt,yo as N,Ce as Ni,_s as Nn,Lr as Nr,ma as Nt,Bi as O,Me as Oi,ws as On,q as Or,ua as Ot,rs as P,Ua as Pn,Ar as Pr,io as Pt,ja as Q,ho as Qn,gn as Qr,Mi as Qt,so as R,Yo as Rn,U as Rr,$o as Rt,No as S,at as Si,co as Sn,ui as Sr,qi as St,qa as T,Ve as Ti,Ao as Tn,ri as Tr,fa as Tt,Cs as U,Os as Un,Nn as Ur,ya as Ut,ka as V,cs as Vn,Bn as Vr,es as Vt,Oa as W,As as Wn,jn as Wr,Ks as Wt,no as X,wo as Xn,xn as Xr,Bs as Xt,gs as Y,Vo as Yn,Sn as Yr,Jo as Yt,Va as Z,Wo as Zn,yn as Zr,Io as Zt,vo as _,ut as _i,qo as _n,Si as _r,ra as _t,sa as a,dn as ai,Ms as an,_a as ar,Ds as at,va as b,D as bi,Ia as bn,wi as br,us as bt,Is as c,jt as ci,Mo as cn,Aa as cr,go as ct,os as d,O as di,Vi as dn,Ti as dr,La as dt,hn as ei,za as en,ia as er,Ii as et,Ss as f,ht as fi,Ui as fn,bi as fr,Wa as ft,js as g,lt as gi,bo as gn,Di as gr,Uo as gt,Ts as h,dt as hi,So as hn,gi as hr,Fi as ht,Wi as i,un as ii,Es as in,zo as ir,Li as it,Ns as j,ke as ji,ts as jn,Br as jr,da as jt,Hi as k,Ne as ki,Ca as kn,K as kr,ca as kt,ms as l,k as li,uo as ln,Oi as lr,as as lt,Za as m,ft as mi,Ps as mn,Ci as mr,Co as mt,Zi as n,pn as ni,$i as nn,ls as nr,ss as nt,ta as o,A as oi,Fo as on,Pi as or,ks as ot,Da as p,gt as pi,to as pn,vi as pr,ji as pt,Qa as q,po as qn,kn as qr,Ea as qt,Gi as r,F as ri,ea as rn,ao as rr,Ka as rt,Qi as s,Mt as si,Oo as sn,aa as sr,Ls as st,fs as t,I as ti,na as tn,xs as tr,Ni as tt,hs as u,Tt as ui,Ba as un,ki as ur,fo as ut,Po as v,st as vi,ba as vn,xi as vr,mo as vt,Xa as w,He as wi,ko as wn,ni as wr,pa as wt,Fs as x,E as xi,Lo as xn,_i as xr,Ya as xt,Do as y,ct as yi,ns as yn,yi as yr,bs as yt,oo as z,Eo as zn,$n as zr,Xo as zt};
@@ -0,0 +1 @@
1
+ import{Bn as e,Wt as t,dn as n,pt as r,t as i}from"./state-BemZdQIl.js";t();export{i as addInvokedSkill,r as getSessionId,n as setCwdState,e as setOriginalCwd};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Kr as n,fi as r,kn as i,qr as a,t as o,vt as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{PassThrough as l}from"stream";function u({children:e}){let{exit:t}=s();return(0,m.useLayoutEffect)(()=>{let e=setTimeout(t,0);return()=>clearTimeout(e)},[t]),(0,h.jsx)(h.Fragment,{children:e})}function d(e){let t=e.indexOf(g);if(t===-1)return e;let n=t+8,r=e.indexOf(_,n);return r===-1?e:e.slice(n,r)}async function f(e,t){let n=``,r=new l;return t!==void 0&&(r.columns=t),r.on(`data`,e=>{n+=e.toString()}),await(await i((0,h.jsx)(u,{children:e}),{stdout:r,patchConsole:!1})).waitUntilExit(),d(n)}async function p(e,t){return a(await f(e,t))}var m,h,g,_,v=e((()=>{r(),m=t(r(),1),n(),o(),h=c(),g=`\x1B[?2026h`,_=`\x1B[?2026l`}));export{f as n,p as r,v as t};
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Kr as n,fi as r,kn as i,qr as a,t as o,vt as s}from"./src-P_wYS_NJ2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{PassThrough as l}from"stream";function u({children:e}){let{exit:t}=s();return(0,m.useLayoutEffect)(()=>{let e=setTimeout(t,0);return()=>clearTimeout(e)},[t]),(0,h.jsx)(h.Fragment,{children:e})}function d(e){let t=e.indexOf(g);if(t===-1)return e;let n=t+8,r=e.indexOf(_,n);return r===-1?e:e.slice(n,r)}async function f(e,t){let n=``,r=new l;return t!==void 0&&(r.columns=t),r.on(`data`,e=>{n+=e.toString()}),await(await i((0,h.jsx)(u,{children:e}),{stdout:r,patchConsole:!1})).waitUntilExit(),d(n)}async function p(e,t){return a(await f(e,t))}var m,h,g,_,v=e((()=>{r(),m=t(r(),1),n(),o(),h=c(),g=`\x1B[?2026h`,_=`\x1B[?2026l`}));export{f as n,p as r,v as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{g as r,y as i}from"./config-CE058cvr.js";var a=e(t(),1);r();var o=n();function s(e,t){let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);return r===i?e[r]:e[r]+(e[i]-e[r])*(n-r)}var c=1024;function l(){let e=new Map,t=new Map,n=new Map;return{increment(t,n=1){e.set(t,(e.get(t)??0)+n)},set(t,n){e.set(t,n)},observe(e,n){let r=t.get(e);if(r||(r={reservoir:[],count:0,sum:0,min:n,max:n},t.set(e,r)),r.count++,r.sum+=n,n<r.min&&(r.min=n),n>r.max&&(r.max=n),r.reservoir.length<c)r.reservoir.push(n);else{let e=Math.floor(Math.random()*r.count);e<c&&(r.reservoir[e]=n)}},add(e,t){let r=n.get(e);r||(r=new Set,n.set(e,r)),r.add(t)},getAll(){let r=Object.fromEntries(e);for(let[e,n]of t){if(n.count===0)continue;r[`${e}_count`]=n.count,r[`${e}_min`]=n.min,r[`${e}_max`]=n.max,r[`${e}_avg`]=n.sum/n.count;let t=[...n.reservoir].sort((e,t)=>e-t);r[`${e}_p50`]=s(t,50),r[`${e}_p95`]=s(t,95),r[`${e}_p99`]=s(t,99)}for(let[e,t]of n)r[e]=t.size;return r}}}var u=(0,a.createContext)(null);function d({store:e,children:t}){let n=(0,a.useMemo)(()=>l(),[]),r=e??n;return(0,a.useEffect)(()=>{let e=()=>{let e=r.getAll();Object.keys(e).length>0&&i(t=>({...t,lastSessionMetrics:e}))};return process.on(`exit`,e),()=>{process.off(`exit`,e)}},[r]),(0,o.jsx)(u.Provider,{value:r,children:t})}export{l as n,d as t};
1
+ import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{h as r,v as i}from"./config-Do1870_d.js";var a=e(t(),1);r();var o=n();function s(e,t){let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);return r===i?e[r]:e[r]+(e[i]-e[r])*(n-r)}var c=1024;function l(){let e=new Map,t=new Map,n=new Map;return{increment(t,n=1){e.set(t,(e.get(t)??0)+n)},set(t,n){e.set(t,n)},observe(e,n){let r=t.get(e);if(r||(r={reservoir:[],count:0,sum:0,min:n,max:n},t.set(e,r)),r.count++,r.sum+=n,n<r.min&&(r.min=n),n>r.max&&(r.max=n),r.reservoir.length<c)r.reservoir.push(n);else{let e=Math.floor(Math.random()*r.count);e<c&&(r.reservoir[e]=n)}},add(e,t){let r=n.get(e);r||(r=new Set,n.set(e,r)),r.add(t)},getAll(){let r=Object.fromEntries(e);for(let[e,n]of t){if(n.count===0)continue;r[`${e}_count`]=n.count,r[`${e}_min`]=n.min,r[`${e}_max`]=n.max,r[`${e}_avg`]=n.sum/n.count;let t=[...n.reservoir].sort((e,t)=>e-t);r[`${e}_p50`]=s(t,50),r[`${e}_p95`]=s(t,95),r[`${e}_p99`]=s(t,99)}for(let[e,t]of n)r[e]=t.size;return r}}}var u=(0,a.createContext)(null);function d({store:e,children:t}){let n=(0,a.useMemo)(()=>l(),[]),r=e??n;return(0,a.useEffect)(()=>{let e=()=>{let e=r.getAll();Object.keys(e).length>0&&i(t=>({...t,lastSessionMetrics:e}))};return process.on(`exit`,e),()=>{process.off(`exit`,e)}},[r]),(0,o.jsx)(u.Provider,{value:r,children:t})}export{l as n,d as t};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./Settings-CyUm0AtU.js";async function a(e,t){return(0,o.jsx)(i,{onClose:e,context:t,defaultTab:`Status`})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./Settings-BMXysXIx.js";async function a(e,t){return(0,o.jsx)(i,{onClose:e,context:t,defaultTab:`Status`})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,r,t as i}from"./envUtils-BDhHQY0-.js";import{n as a,t as o}from"./figures-5ThXQEtq.js";import{Rb as s,Sb as c,Vb as l,Wb as ee,Yb as u,vb as d,wb as f,xb as p}from"./loadAgentsDir-C7lOqvfh.js";import{P as m,di as h,fi as g,j as _,t as v,ui as y}from"./src-P_wYS_NJ2.js";import{t as b}from"./jsx-runtime-Bb4Xn-E0.js";import{Cn as x,a as S,bn as C,c as w,cn as T,g as E,in as D,r as O,rn as k}from"./settings-DnptdP79.js";import{f as A,v as j}from"./startupProfiler-L_UWZ03w.js";import{Bt as M,Gt as N,_ as te,ai as P,bt as F,i as I,si as L,x as R}from"./model-BsZ4sP_H.js";import{h as z,l as B,o as V,p as H}from"./proxy-CuMaO_YV.js";import{d as U,u as W}from"./pidLock-nJHbufJN.js";import{n as G,t as K}from"./nativeInstaller-QB8cEJ18.js";import{n as q,t as J}from"./allErrors-CU89tF-z.js";function Y(){return[]}function X(e,t=null,n){let r=e?.find(e=>e.name===`ide`);if(t){let e=u(t.ideType),i=ee(t.ideType)?`plugin`:`extension`;if(t.error)return[{label:`IDE`,value:(0,$.jsxs)(m,{children:[_(`error`,n)(o.cross),` Error installing `,e,` `,i,`:`,` `,t.error,`
2
+ `,`Please restart your IDE and try again.`]})}];if(t.installed)return r&&r.type===`connected`?t.installedVersion===r.serverInfo?.version?[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion}`}]:[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion} (server version: ${r.serverInfo?.version})`}]:[{label:`IDE`,value:`Installed ${e} ${i}`}]}else if(r){let e=s(r)??`IDE`;return r.type===`connected`?[{label:`IDE`,value:`Connected to ${e} extension`}]:[{label:`IDE`,value:`${_(`error`,n)(o.cross)} Not connected to ${e}`}]}return[]}function Z(e=[],t){let n=e.filter(e=>e.name!==`ide`);if(!n.length)return[];let r={connected:0,pending:0,needsAuth:0,failed:0};for(let e of n)e.type===`connected`?r.connected++:e.type===`pending`?r.pending++:e.type===`needs-auth`?r.needsAuth++:r.failed++;let i=[];return r.connected&&i.push(_(`success`,t)(`${r.connected} connected`)),r.needsAuth&&i.push(_(`warning`,t)(`${r.needsAuth} need auth`)),r.pending&&i.push(_(`inactive`,t)(`${r.pending} pending`)),r.failed&&i.push(_(`error`,t)(`${r.failed} failed`)),[{label:`MCP servers`,value:`${i.join(`, `)} ${_(`inactive`,t)(`· /mcp`)}`}]}async function Q(){let e=p(await c()),t=[];return e.forEach(e=>{let n=C(e.path);t.push(`Large ${n} will impact performance (${A(e.content.length)} chars > ${A(d)})`)}),t}function ne(){return[{label:`Setting sources`,value:k().filter(e=>{let t=w(e);return t!==null&&Object.keys(t).length>0}).map(e=>{if(e===`policySettings`){let e=S();if(e===null)return null;switch(e){case`remote`:return`Enterprise managed settings (remote)`;case`plist`:return`Enterprise managed settings (plist)`;case`hklm`:return`Enterprise managed settings (HKLM)`;case`file`:{let{hasBase:e,hasDropIns:t}=O();return e&&t?`Enterprise managed settings (file + drop-ins)`:t?`Enterprise managed settings (drop-ins)`:`Enterprise managed settings (file)`}case`hkcu`:return`Enterprise managed settings (HKCU)`}}return D(e)}).filter(e=>e!==null)}]}async function re(){return(await G()).map(e=>e.message)}async function ie(){let e=await W(),t=[],{errors:n}=J();if(n.length>0){let e=Array.from(new Set(n.map(e=>e.file))).join(`, `);t.push(`Found invalid settings files: ${e}. They will be ignored.`)}return e.warnings.forEach(e=>{t.push(e.issue)}),e.hasUpdatePermissions===!1&&t.push(`No write permissions for auto-updates (requires sudo)`),t}function ae(){let e=F();if(!e)return[];let t=[];return e.subscription&&t.push({label:`Login method`,value:`${e.subscription} Account`}),e.tokenSource&&t.push({label:`Auth token`,value:e.tokenSource}),e.apiKeySource&&t.push({label:`API key`,value:e.apiKeySource}),e.organization&&!process.env.IS_DEMO&&t.push({label:`Organization`,value:e.organization}),e.email&&!process.env.IS_DEMO&&t.push({label:`Email`,value:e.email}),t}function oe(){let e=P(),n=[];if(e!==`firstParty`){let t={bedrock:`AWS Bedrock`,vertex:`Google Vertex AI`,foundry:`Microsoft Foundry`,gemini:`Gemini API`,grok:`Grok API`,openai:`OpenAI API`}[e];n.push({label:`API provider`,value:t})}if(e===`firstParty`){let e=process.env.ANTHROPIC_BASE_URL;e&&n.push({label:`API base URL`,value:e})}else if(e===`bedrock`){let e=process.env.BEDROCK_BASE_URL;e&&n.push({label:`Bedrock base URL`,value:e}),n.push({label:`AWS region`,value:i()}),t(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&n.push({value:`AWS auth skipped`})}else if(e===`vertex`){let e=process.env.VERTEX_BASE_URL;e&&n.push({label:`Vertex base URL`,value:e});let i=process.env.ANTHROPIC_VERTEX_PROJECT_ID;i&&n.push({label:`GCP project`,value:i}),n.push({label:`Default region`,value:r()}),t(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)&&n.push({value:`GCP auth skipped`})}else if(e===`foundry`){let e=process.env.ANTHROPIC_FOUNDRY_BASE_URL;e&&n.push({label:`Microsoft Foundry base URL`,value:e});let r=process.env.ANTHROPIC_FOUNDRY_RESOURCE;r&&n.push({label:`Microsoft Foundry resource`,value:r}),t(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH)&&n.push({value:`Microsoft Foundry auth skipped`})}else if(e===`gemini`){let e=process.env.GEMINI_BASE_URL||`https://generativelanguage.googleapis.com/v1beta`;n.push({label:`Gemini base URL`,value:e})}else if(e===`grok`){let e=process.env.GROK_BASE_URL;n.push({label:`Grok base URL`,value:e})}else if(e===`openai`){let e=process.env.OPENAI_BASE_URL;n.push({label:`OpenAI base URL`,value:e})}let a=V();a&&n.push({label:`Proxy`,value:a});let o=H();return process.env.NODE_EXTRA_CA_CERTS&&n.push({label:`Additional CA cert(s)`,value:process.env.NODE_EXTRA_CA_CERTS}),o&&(o.cert&&process.env.CLAUDE_CODE_CLIENT_CERT&&n.push({label:`mTLS client cert`,value:process.env.CLAUDE_CODE_CLIENT_CERT}),o.key&&process.env.CLAUDE_CODE_CLIENT_KEY&&n.push({label:`mTLS client key`,value:process.env.CLAUDE_CODE_CLIENT_KEY})),n}function se(e){let t=R(e);if(e===null&&N()){let e=I();t=`${y.bold(`Default`)} ${e}`}return t}var $,ce=e((()=>{h(),a(),g(),v(),M(),f(),U(),n(),x(),j(),l(),te(),L(),z(),K(),B(),q(),T(),E(),$=b()}));export{ie as a,Y as c,ce as d,re as i,ne as l,ae as n,Z as o,X as r,Q as s,oe as t,se as u};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{na as t,ta as n}from"./loadAgentsDir-C7lOqvfh.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,n)=>e+t(`${n.agentType}: ${n.whenToUse}`),0):0}var i,a=e((()=>{n(),i=15e3}));export{r as n,a as r,i as t};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{r,t as i}from"./which-CHLNJmtJ.js";function a(e,t){return{cmd:r(e)??e,args:t}}var o=e((()=>{i()}));function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function l(e,t,n=t+`s`){return e===1?t:n}function u(e){let t=e.indexOf(`
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{r,t as i}from"./which-DzFN5TNM.js";function a(e,t){return{cmd:r(e)??e,args:t}}var o=e((()=>{i()}));function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function l(e,t,n=t+`s`){return e===1?t:n}function u(e){let t=e.indexOf(`
2
2
  `);return t===-1?e:e.slice(0,t)}function d(e,t,n=0){let r=0,i=e.indexOf(t,n);for(;i!==-1;)r++,i=e.indexOf(t,i+1);return r}function f(e){return e.replace(/[0-9]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function p(e){return e.replace(/\u3000/g,` `)}function m(e,t=`,`,n=g){let r=`...[truncated]`,i=``;for(let a of e){let e=i?t:``,o=e+a;if(i.length+o.length<=n)i+=o;else{let t=n-i.length-e.length-14;return t>0?i+=e+a.slice(0,t)+r:i+=r,i}}return i}function h(e,t){let n=e.split(`
3
3
  `);return n.length<=t?e:n.slice(0,t).join(`
4
4
  `)+`…`}var g,_,v=e((()=>{t(),g=2**21,_=class{constructor(e=g){n(this,`maxSize`,void 0),n(this,`content`,``),n(this,`isTruncated`,!1),n(this,`totalBytesReceived`,0),this.maxSize=e}append(e){let t=typeof e==`string`?e:e.toString();if(this.totalBytesReceived+=t.length,!(this.isTruncated&&this.content.length>=this.maxSize))if(this.content.length+t.length>this.maxSize){let e=this.maxSize-this.content.length;e>0&&(this.content+=t.slice(0,e)),this.isTruncated=!0}else this.content+=t}toString(){if(!this.isTruncated)return this.content;let e=this.totalBytesReceived-this.maxSize,t=Math.round(e/1024);return this.content+`\n... [output truncated - ${t}KB removed]`}clear(){this.content=``,this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}}));export{u as a,p as c,h as d,a as f,s as i,l,c as n,v as o,o as p,d as r,f as s,_ as t,m as u};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./subprocessEnv-Ci8VV_bi.js";t();export{e as registerUpstreamProxyEnvFn};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-DSxRz_kt.js";function r(e){o=e}function i(){let e=o?.()??{};if(!t(process.env.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB))return Object.keys(e).length>0?{...process.env,...e}:process.env;let n={...process.env,...e};for(let e of a)delete n[e],delete n[`INPUT_${e}`];return n}var a,o,s=e((()=>{n(),a=[`ANTHROPIC_API_KEY`,`CLAUDE_CODE_OAUTH_TOKEN`,`ANTHROPIC_AUTH_TOKEN`,`ANTHROPIC_FOUNDRY_API_KEY`,`ANTHROPIC_CUSTOM_HEADERS`,`OTEL_EXPORTER_OTLP_HEADERS`,`OTEL_EXPORTER_OTLP_LOGS_HEADERS`,`OTEL_EXPORTER_OTLP_METRICS_HEADERS`,`OTEL_EXPORTER_OTLP_TRACES_HEADERS`,`AWS_SECRET_ACCESS_KEY`,`AWS_SESSION_TOKEN`,`AWS_BEARER_TOKEN_BEDROCK`,`GOOGLE_APPLICATION_CREDENTIALS`,`AZURE_CLIENT_SECRET`,`AZURE_CLIENT_CERTIFICATE_PATH`,`ACTIONS_ID_TOKEN_REQUEST_TOKEN`,`ACTIONS_ID_TOKEN_REQUEST_URL`,`ACTIONS_RUNTIME_TOKEN`,`ACTIONS_RUNTIME_URL`,`ALL_INPUTS`,`OVERRIDE_GITHUB_TOKEN`,`DEFAULT_WORKFLOW_TOKEN`,`SSH_SIGNING_KEY`]}));export{r as n,i as r,s as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-BDhHQY0-.js";function r(e){o=e}function i(){let e=o?.()??{};if(!t(process.env.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB))return Object.keys(e).length>0?{...process.env,...e}:process.env;let n={...process.env,...e};for(let e of a)delete n[e],delete n[`INPUT_${e}`];return n}var a,o,s=e((()=>{n(),a=[`ANTHROPIC_API_KEY`,`CLAUDE_CODE_OAUTH_TOKEN`,`ANTHROPIC_AUTH_TOKEN`,`ANTHROPIC_FOUNDRY_API_KEY`,`ANTHROPIC_CUSTOM_HEADERS`,`OTEL_EXPORTER_OTLP_HEADERS`,`OTEL_EXPORTER_OTLP_LOGS_HEADERS`,`OTEL_EXPORTER_OTLP_METRICS_HEADERS`,`OTEL_EXPORTER_OTLP_TRACES_HEADERS`,`AWS_SECRET_ACCESS_KEY`,`AWS_SESSION_TOKEN`,`AWS_BEARER_TOKEN_BEDROCK`,`GOOGLE_APPLICATION_CREDENTIALS`,`AZURE_CLIENT_SECRET`,`AZURE_CLIENT_CERTIFICATE_PATH`,`ACTIONS_ID_TOKEN_REQUEST_TOKEN`,`ACTIONS_ID_TOKEN_REQUEST_URL`,`ACTIONS_RUNTIME_TOKEN`,`ACTIONS_RUNTIME_URL`,`ALL_INPUTS`,`OVERRIDE_GITHUB_TOKEN`,`DEFAULT_WORKFLOW_TOKEN`,`SSH_SIGNING_KEY`]}));export{r as n,i as r,s as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./switcher-CCs9xl1z.js";e();export{t as restoreActiveProvider};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-DSxRz_kt.js";import{A as r,l as i,n as a,p as o,w as s}from"./external-CEp-aPkt.js";import{o as c,s as l}from"./log-CZ0zYP_c.js";import{dirname as u,join as d}from"path";import{existsSync as f,readFileSync as p,renameSync as m,unlinkSync as h,writeFileSync as g}from"fs";import{randomBytes as _}from"node:crypto";var v=e((()=>{a(),a()})),y,b,x,S=e((()=>{v(),y=i([`openai-compat`,`anthropic-compat`]),b=s({id:r().min(1).regex(/^[a-z0-9-]+$/,`id must be kebab-case`),kind:y,baseUrl:r().url(),apiKey:r().min(1).optional(),apiKeyEnv:r().min(1).optional(),defaultModel:r().min(1).default(`gpt-4o-mini`)}).refine(e=>!!e.apiKey||!!e.apiKeyEnv,`either apiKey or apiKeyEnv is required`),x=o(b)}));function C(){return d(t(),`providers.json`)}function w(){k=null}function T(){if(k!==null)return k;let e=E();return k=e.providers,e.providers}function E(){let e=C();if(!f(e))return{providers:[]};let t;try{t=p(e,`utf-8`)}catch(t){let n=`loadProviders: failed to read ${e}: ${t instanceof Error?t.message:String(t)}`;return l(Error(n)),{providers:[],error:n}}if(!t.trim())return{providers:[]};let n;try{n=JSON.parse(t)}catch{let t=`loadProviders: ${e} is not valid JSON. Ignoring.`;return l(Error(t)),{providers:[],error:t}}let r=x.safeParse(n);if(!r.success){let t=`loadProviders: ${e} failed schema validation: ${r.error.message}. Ignoring.`;return l(Error(t)),{providers:[],error:t}}return{providers:r.data}}function D(e,t){return(t??T()).find(t=>t.id===e)}function O(e){let t=C(),n=d(u(t),`.providers-${_(8).toString(`hex`)}.tmp`);try{g(n,JSON.stringify(e,null,2),`utf-8`),m(n,t)}catch(e){try{h(n)}catch{}throw e}return w(),e}var k,A=e((()=>{c(),n(),S(),k=null}));function j(e){if(e.apiKey)return e.apiKey;if(e.apiKeyEnv)return process.env[e.apiKeyEnv]}function M(e,t){let n=t??T(),r=D(e,n);if(!r){let t=n.map(e=>e.id).join(`, `);throw Error(`switchProvider: provider "${e}" not found. Available: ${t}`)}let i=r.kind===`anthropic-compat`?{ANTHROPIC_BASE_URL:r.baseUrl,ANTHROPIC_MODEL:r.defaultModel}:{CLAUDE_CODE_USE_OPENAI:`1`,OPENAI_BASE_URL:r.baseUrl,OPENAI_MODEL:r.defaultModel},a=[];if(r.kind===`openai-compat`){let e=process.env.CLAUDE_CODE_USE_OPENAI===`1`||!!process.env.OPENAI_API_KEY,t=!!process.env.ANTHROPIC_API_KEY;e&&t&&a.push(`Both ANTHROPIC_API_KEY and OpenAI-compat mode are set. ANTHROPIC_API_KEY is for workspace endpoints (/v1/agents, /v1/vaults). OpenAI-compat mode routes /v1/messages to a third-party provider. These are separate planes — verify this is intentional.`)}return!r.apiKey&&!r.apiKeyEnv?a.push(`Provider "${r.id}" has neither apiKey nor apiKeyEnv configured. Edit ~/.claude/providers.json to add one.`):!r.apiKey&&r.apiKeyEnv&&!process.env[r.apiKeyEnv]&&a.push(`${r.apiKeyEnv} is not set in the current environment. Set it before starting Work Mate: export ${r.apiKeyEnv}=<your-api-key>`),{env:i,warnings:a,provider:r}}function N(e){return e.kind===`anthropic-compat`?`ANTHROPIC_API_KEY`:`OPENAI_API_KEY`}async function P(e,t){delete process.env.CLAUDE_CODE_USE_BEDROCK,delete process.env.CLAUDE_CODE_USE_VERTEX,delete process.env.CLAUDE_CODE_USE_FOUNDRY,delete process.env.CLAUDE_CODE_USE_GEMINI,delete process.env.CLAUDE_CODE_USE_GROK,e.kind===`anthropic-compat`?(delete process.env.CLAUDE_CODE_USE_OPENAI,delete process.env.OPENAI_BASE_URL,delete process.env.OPENAI_API_KEY,delete process.env.OPENAI_MODEL):(delete process.env.ANTHROPIC_BASE_URL,delete process.env.ANTHROPIC_API_KEY,delete process.env.ANTHROPIC_MODEL);let n=e.kind===`anthropic-compat`?{ANTHROPIC_BASE_URL:e.baseUrl,ANTHROPIC_API_KEY:t??``,ANTHROPIC_MODEL:e.defaultModel}:{CLAUDE_CODE_USE_OPENAI:`1`,OPENAI_BASE_URL:e.baseUrl,OPENAI_API_KEY:t??``,OPENAI_MODEL:e.defaultModel},{clearOpenAIClientCache:r}=await import(`./client-DkgC-mFB.js`);r();let{applyConfigEnvironmentVariables:i}=await import(`./managedEnv-DLVRBaA9.js`);i(),Object.assign(process.env,n)}async function F(e,t){let{provider:n,warnings:r}=M(e,t),i=j(n),a=N(n);i||r.push(`No API key available for provider "${n.id}" — ${a} will be empty. Set ${n.apiKeyEnv??`an env var`} or add an apiKey field in ~/.claude/providers.json.`),await P(n,i);let{updateSettingsForSource:o}=await import(`./settings-BWtOA9A7.js`);return o(`userSettings`,{activeProviderId:n.id,modelType:n.kind===`anthropic-compat`?`anthropic`:`openai`}),{provider:n,warnings:r}}async function I(){let{getSettingsForSource:e}=await import(`./settings-BWtOA9A7.js`),t=e(`userSettings`)?.activeProviderId;if(!t)return null;let n=D(t);if(!n)return null;let r=[],i=j(n);if(!i){let e=N(n);r.push(`No API key available for provider "${n.id}" — ${e} will be empty. Set ${n.apiKeyEnv??`an env var`} or add an apiKey field in ~/.claude/providers.json.`)}return await P(n,i),{provider:n,warnings:r}}var L=e((()=>{A()}));export{A as a,v as c,M as i,L as n,T as o,I as r,O as s,F as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-BDhHQY0-.js";import{A as r,l as i,n as a,p as o,w as s}from"./external-CEp-aPkt.js";import{o as c,s as l}from"./log-CezCRpAN.js";import{dirname as u,join as d}from"path";import{existsSync as f,readFileSync as p,renameSync as m,unlinkSync as h,writeFileSync as g}from"fs";import{randomBytes as _}from"node:crypto";var v=e((()=>{a(),a()})),y,b,x,S=e((()=>{v(),y=i([`openai-compat`,`anthropic-compat`]),b=s({id:r().min(1).regex(/^[a-z0-9-]+$/,`id must be kebab-case`),kind:y,baseUrl:r().url(),apiKey:r().min(1).optional(),apiKeyEnv:r().min(1).optional(),defaultModel:r().min(1).default(`gpt-4o-mini`)}).refine(e=>!!e.apiKey||!!e.apiKeyEnv,`either apiKey or apiKeyEnv is required`),x=o(b)}));function C(){return d(t(),`providers.json`)}function w(){k=null}function T(){if(k!==null)return k;let e=E();return k=e.providers,e.providers}function E(){let e=C();if(!f(e))return{providers:[]};let t;try{t=p(e,`utf-8`)}catch(t){let n=`loadProviders: failed to read ${e}: ${t instanceof Error?t.message:String(t)}`;return l(Error(n)),{providers:[],error:n}}if(!t.trim())return{providers:[]};let n;try{n=JSON.parse(t)}catch{let t=`loadProviders: ${e} is not valid JSON. Ignoring.`;return l(Error(t)),{providers:[],error:t}}let r=x.safeParse(n);if(!r.success){let t=`loadProviders: ${e} failed schema validation: ${r.error.message}. Ignoring.`;return l(Error(t)),{providers:[],error:t}}return{providers:r.data}}function D(e,t){return(t??T()).find(t=>t.id===e)}function O(e){let t=C(),n=d(u(t),`.providers-${_(8).toString(`hex`)}.tmp`);try{g(n,JSON.stringify(e,null,2),`utf-8`),m(n,t)}catch(e){try{h(n)}catch{}throw e}return w(),e}var k,A=e((()=>{c(),n(),S(),k=null}));function j(e){if(e.apiKey)return e.apiKey;if(e.apiKeyEnv)return process.env[e.apiKeyEnv]}function M(e,t){let n=t??T(),r=D(e,n);if(!r){let t=n.map(e=>e.id).join(`, `);throw Error(`switchProvider: provider "${e}" not found. Available: ${t}`)}let i=r.kind===`anthropic-compat`?{ANTHROPIC_BASE_URL:r.baseUrl,ANTHROPIC_MODEL:r.defaultModel}:{CLAUDE_CODE_USE_OPENAI:`1`,OPENAI_BASE_URL:r.baseUrl,OPENAI_MODEL:r.defaultModel},a=[];if(r.kind===`openai-compat`){let e=process.env.CLAUDE_CODE_USE_OPENAI===`1`||!!process.env.OPENAI_API_KEY,t=!!process.env.ANTHROPIC_API_KEY;e&&t&&a.push(`Both ANTHROPIC_API_KEY and OpenAI-compat mode are set. ANTHROPIC_API_KEY is for workspace endpoints (/v1/agents, /v1/vaults). OpenAI-compat mode routes /v1/messages to a third-party provider. These are separate planes — verify this is intentional.`)}return!r.apiKey&&!r.apiKeyEnv?a.push(`Provider "${r.id}" has neither apiKey nor apiKeyEnv configured. Edit ~/.claude/providers.json to add one.`):!r.apiKey&&r.apiKeyEnv&&!process.env[r.apiKeyEnv]&&a.push(`${r.apiKeyEnv} is not set in the current environment. Set it before starting Work Mate: export ${r.apiKeyEnv}=<your-api-key>`),{env:i,warnings:a,provider:r}}function N(e){return e.kind===`anthropic-compat`?`ANTHROPIC_API_KEY`:`OPENAI_API_KEY`}async function P(e,t){delete process.env.CLAUDE_CODE_USE_BEDROCK,delete process.env.CLAUDE_CODE_USE_VERTEX,delete process.env.CLAUDE_CODE_USE_FOUNDRY,delete process.env.CLAUDE_CODE_USE_GEMINI,delete process.env.CLAUDE_CODE_USE_GROK,e.kind===`anthropic-compat`?(delete process.env.CLAUDE_CODE_USE_OPENAI,delete process.env.OPENAI_BASE_URL,delete process.env.OPENAI_API_KEY,delete process.env.OPENAI_MODEL):(delete process.env.ANTHROPIC_BASE_URL,delete process.env.ANTHROPIC_API_KEY,delete process.env.ANTHROPIC_MODEL);let n=e.kind===`anthropic-compat`?{ANTHROPIC_BASE_URL:e.baseUrl,ANTHROPIC_API_KEY:t??``,ANTHROPIC_MODEL:e.defaultModel}:{CLAUDE_CODE_USE_OPENAI:`1`,OPENAI_BASE_URL:e.baseUrl,OPENAI_API_KEY:t??``,OPENAI_MODEL:e.defaultModel},{clearOpenAIClientCache:r}=await import(`./client-c-3-PW1F.js`);r();let{applyConfigEnvironmentVariables:i}=await import(`./managedEnv-B61yLpwp.js`);i(),Object.assign(process.env,n)}async function F(e,t){let{provider:n,warnings:r}=M(e,t),i=j(n),a=N(n);i||r.push(`No API key available for provider "${n.id}" — ${a} will be empty. Set ${n.apiKeyEnv??`an env var`} or add an apiKey field in ~/.claude/providers.json.`),await P(n,i);let{updateSettingsForSource:o}=await import(`./settings-DkDH7WQT.js`);return o(`userSettings`,{activeProviderId:n.id,modelType:n.kind===`anthropic-compat`?`anthropic`:`openai`}),{provider:n,warnings:r}}async function I(){let{getSettingsForSource:e}=await import(`./settings-DkDH7WQT.js`),t=e(`userSettings`)?.activeProviderId;if(!t)return null;let n=D(t);if(!n)return null;let r=[],i=j(n);if(!i){let e=N(n);r.push(`No API key available for provider "${n.id}" — ${e} will be empty. Set ${n.apiKeyEnv??`an env var`} or add an apiKey field in ~/.claude/providers.json.`)}return await P(n,i),{provider:n,warnings:r}}var L=e((()=>{A()}));export{A as a,v as c,M as i,L as n,T as o,I as r,O as s,F as t};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Hn as t,Un as n,Wn as r}from"./settings-hQDLwPVj.js";import{u as i}from"./oauth-BqJqV-2M.js";import{Bt as a,Ot as o,St as s,bi as c,vi as l,xi as u}from"./model-CwO-g1RW.js";function d(){p=void 0,n()}function f(){if(p!==void 0)return p;if(l()!==`firstParty`||!u()||process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`)return p=r(!1);let e=o();if(e?.accessToken&&e.subscriptionType===null||e?.accessToken&&e.scopes?.includes(`user:inference`)&&(e.subscriptionType===`enterprise`||e.subscriptionType===`team`))return p=r(!0);try{let{key:e}=s({skipRetrievingKeyFromApiKeyHelper:!0});if(e)return p=r(!0)}catch{}return p=r(!1)}var p,m=e((()=>{i(),a(),c(),t()}));export{f as n,d as r,m as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Hn as t,Un as n,Wn as r}from"./settings-DnptdP79.js";import{u as i}from"./oauth-C9VBDB0Y.js";import{Bt as a,Ot as o,St as s,ai as c,ci as l,si as u}from"./model-BsZ4sP_H.js";function d(){p=void 0,n()}function f(){if(p!==void 0)return p;if(c()!==`firstParty`||!l()||process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`)return p=r(!1);let e=o();if(e?.accessToken&&e.subscriptionType===null||e?.accessToken&&e.scopes?.includes(`user:inference`)&&(e.subscriptionType===`enterprise`||e.subscriptionType===`team`))return p=r(!0);try{let{key:e}=s({skipRetrievingKeyFromApiKeyHelper:!0});if(e)return p=r(!0)}catch{}return p=r(!1)}var p,m=e((()=>{i(),a(),u(),t()}));export{f as n,d as r,m as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./BackgroundTasksDialog-CL5NWsFL.js";async function a(e,t){return(0,o.jsx)(i,{toolUseContext:t,onDone:e})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
@@ -0,0 +1 @@
1
+ import{_u as e,bu as t,fu as n,hu as r,pu as i}from"./loadAgentsDir-C7lOqvfh.js";i();export{n as checkOutTeleportedSessionBranch,r as processMessagesForTeleportResume,e as teleportResumeCodeSession,t as validateGitState};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-DSxRz_kt.js";import{FD as r,PD as i,g as a,h as o,m as s}from"./loadAgentsDir-ByO8eJqU.js";import{basename as c,join as l}from"path";import{appendFileSync as u,mkdirSync as d,readFileSync as f,readdirSync as p,writeFileSync as m}from"fs";import{randomUUID as h}from"crypto";function g(){let e=o(`templates`,process.cwd()),n=l(t(),`templates`);try{return p(n),[...e,n]}catch{return e}}function _(){let e=[],t=new Set;for(let n of g()){let i;try{i=p(n)}catch{continue}for(let a of i){if(!a.endsWith(`.md`))continue;let i=c(a,`.md`);if(t.has(i))continue;t.add(i);let o=l(n,a);try{let{frontmatter:t,content:n}=r(f(o,`utf-8`),o),a=(typeof t.description==`string`?t.description:``)||s(n,`No description`);e.push({name:i,description:a,filePath:o,frontmatter:t,content:n})}catch{}}}return e}function v(e){return _().find(t=>t.name===e)??null}var y=e((()=>{i(),n(),a()}));function b(){return l(t(),`jobs`)}function x(e){return l(b(),e)}function S(e,t,n,r,i){let a=x(e);d(a,{recursive:!0});let o=new Date().toISOString(),s={jobId:e,templateName:t,createdAt:o,updatedAt:o,status:`created`,args:i};return m(l(a,`state.json`),JSON.stringify(s,null,2),`utf-8`),m(l(a,`template.md`),n,`utf-8`),m(l(a,`input.txt`),r,`utf-8`),a}function C(e){try{let t=f(l(x(e),`state.json`),`utf-8`),n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n;return typeof r.jobId!=`string`||typeof r.status!=`string`?null:r}catch{return null}}function w(e,t){let n=x(e),r=C(e);if(!r)return!1;let i=l(n,`replies.jsonl`),a=JSON.stringify({text:t,timestamp:new Date().toISOString()});try{u(i,a+`
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-BDhHQY0-.js";import{KE as r,g as i,h as a,m as o,qE as s}from"./loadAgentsDir-C7lOqvfh.js";import{basename as c,join as l}from"path";import{appendFileSync as u,mkdirSync as d,readFileSync as f,readdirSync as p,writeFileSync as m}from"fs";import{randomUUID as h}from"crypto";function g(){let e=a(`templates`,process.cwd()),n=l(t(),`templates`);try{return p(n),[...e,n]}catch{return e}}function _(){let e=[],t=new Set;for(let n of g()){let r;try{r=p(n)}catch{continue}for(let i of r){if(!i.endsWith(`.md`))continue;let r=c(i,`.md`);if(t.has(r))continue;t.add(r);let a=l(n,i);try{let{frontmatter:t,content:n}=s(f(a,`utf-8`),a),i=(typeof t.description==`string`?t.description:``)||o(n,`No description`);e.push({name:r,description:i,filePath:a,frontmatter:t,content:n})}catch{}}}return e}function v(e){return _().find(t=>t.name===e)??null}var y=e((()=>{r(),n(),i()}));function b(){return l(t(),`jobs`)}function x(e){return l(b(),e)}function S(e,t,n,r,i){let a=x(e);d(a,{recursive:!0});let o=new Date().toISOString(),s={jobId:e,templateName:t,createdAt:o,updatedAt:o,status:`created`,args:i};return m(l(a,`state.json`),JSON.stringify(s,null,2),`utf-8`),m(l(a,`template.md`),n,`utf-8`),m(l(a,`input.txt`),r,`utf-8`),a}function C(e){try{let t=f(l(x(e),`state.json`),`utf-8`),n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n;return typeof r.jobId!=`string`||typeof r.status!=`string`?null:r}catch{return null}}function w(e,t){let n=x(e),r=C(e);if(!r)return!1;let i=l(n,`replies.jsonl`),a=JSON.stringify({text:t,timestamp:new Date().toISOString()});try{u(i,a+`
2
2
  `,`utf-8`)}catch{m(i,a+`
3
3
  `,`utf-8`)}let o={...r,updatedAt:new Date().toISOString()};return m(l(n,`state.json`),JSON.stringify(o,null,2),`utf-8`),!0}var T=e((()=>{n()}));async function E(e){let t=e[0];switch(t){case`list`:k();break;case`new`:A(e.slice(1));break;case`reply`:j(e.slice(1));break;case`status`:O(e.slice(1));break;default:console.error(`Unknown template command: ${t}`),D(),process.exitCode=1}}function D(){console.log(`
4
4
  Template Job Commands:
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./terminalSetup-DlaFWI81.js";n();export{s as call,r as getNativeCSIuTerminalDisplayName,a as hasUsedBackslashReturn,e as isShiftEnterKeyBindingInstalled,i as markBackslashReturnUsed,o as setupTerminal,t as shouldOfferTerminalSetup};
1
+ import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./terminalSetup-D-N8YPiQ.js";n();export{s as call,r as getNativeCSIuTerminalDisplayName,a as hasUsedBackslashReturn,e as isShiftEnterKeyBindingInstalled,i as markBackslashReturnUsed,o as setupTerminal,t as shouldOfferTerminalSetup};
@@ -0,0 +1,33 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{Bt as r,di as i,j as a,t as o,ui as s}from"./src-P_wYS_NJ2.js";import{n as c,t as l}from"./cwd-Cfdf7z7s.js";import{C as u,H as d,S as f,d as p,p as ee,w as te,z as m}from"./debug-RAynG_nM.js";import{Cn as ne,Gt as h,Jt as g,Tn as re}from"./settings-DnptdP79.js";import{c as _,h as v,o as y,v as b,y as x}from"./config-Do1870_d.js";import{r as S,t as C}from"./execFileNoThrow-Dwu6psHW.js";import{o as w,s as T}from"./log-CezCRpAN.js";import{i as ie,o as ae}from"./platform-BMPbglug.js";import{d as oe,o as E,s as se}from"./types-3j8PS-Du.js";import{homedir as D,platform as O}from"os";import{dirname as ce,join as k}from"path";import{randomBytes as A}from"crypto";import{copyFile as j,mkdir as M,readFile as N,stat as P,writeFile as F}from"fs/promises";import{pathToFileURL as le}from"url";function I(){let e=p().existsSync(k(l(),`CLAUDE.md`)),t=re(l());return[{key:`workspace`,text:`Ask Claude to create a new app or clone a repository`,isComplete:!1,isCompletable:!0,isEnabled:t},{key:`claudemd`,text:`Run /init to create a CLAUDE.md file with instructions for Claude`,isComplete:e,isCompletable:!0,isEnabled:!t}]}function L(){return I().filter(({isCompletable:e,isEnabled:t})=>e&&t).every(({isComplete:e})=>e)}function R(){y().hasCompletedProjectOnboarding||L()&&b(e=>({...e,hasCompletedProjectOnboarding:!0}))}function ue(){b(e=>({...e,projectOnboardingSeenCount:e.projectOnboardingSeenCount+1}))}var z,B=e((()=>{n(),v(),c(),ne(),ee(),z=t(()=>{let e=y();return e.hasCompletedProjectOnboarding||e.projectOnboardingSeenCount>=4||process.env.IS_DEMO?!1:!L()})}));function V(e){x(t=>({...t,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:e}))}function H(){x(e=>({...e,appleTerminalSetupInProgress:!1}))}function de(){let e=_();return{inProgress:e.appleTerminalSetupInProgress??!1,backupPath:e.appleTerminalBackupPath||null}}function U(){return k(D(),`Library`,`Preferences`,`com.apple.Terminal.plist`)}async function fe(){let e=U(),t=`${e}.bak`;try{let{code:n}=await C(`defaults`,[`export`,`com.apple.Terminal`,e]);if(n!==0)return null;try{await P(e)}catch{return null}return await C(`defaults`,[`export`,`com.apple.Terminal`,t]),V(t),t}catch(e){return T(e),null}}async function W(){let{inProgress:e,backupPath:t}=de();if(!e)return{status:`no_backup`};if(!t)return H(),{status:`no_backup`};try{await P(t)}catch{return H(),{status:`no_backup`}}try{let{code:e}=await C(`defaults`,[`import`,`com.apple.Terminal`,t]);return e===0?(await C(`killall`,[`cfprefsd`]),H(),{status:`restored`}):{status:`failed`,backupPath:t}}catch(e){return T(Error(`Failed to restore Terminal.app settings with: ${e}`)),H(),{status:`failed`,backupPath:t}}}var G=e((()=>{v(),S(),w()}));function pe(){let e=process.env.VSCODE_GIT_ASKPASS_MAIN??``,t=process.env.PATH??``;return e.includes(`.vscode-server`)||e.includes(`.cursor-server`)||e.includes(`.windsurf-server`)||t.includes(`.vscode-server`)||t.includes(`.cursor-server`)||t.includes(`.windsurf-server`)}function me(){return!h.terminal||!(h.terminal in $)?null:$[h.terminal]??null}function K(e){return r()?`\x1b]8;;${le(e).href}\x07${e}\x1b]8;;\x07`:e}function q(){return O()===`darwin`&&h.terminal===`Apple_Terminal`||h.terminal===`vscode`||h.terminal===`cursor`||h.terminal===`windsurf`||h.terminal===`alacritty`||h.terminal===`zed`}async function J(e){let t=``;switch(h.terminal){case`Apple_Terminal`:t=await ye(e);break;case`vscode`:t=await Y(`VSCode`,e);break;case`cursor`:t=await Y(`Cursor`,e);break;case`windsurf`:t=await Y(`Windsurf`,e);break;case`alacritty`:t=await be(e);break;case`zed`:t=await xe(e);break;case null:break}return x(e=>[`vscode`,`cursor`,`windsurf`,`alacritty`,`zed`].includes(h.terminal??``)?e.shiftEnterKeyBindingInstalled===!0?e:{...e,shiftEnterKeyBindingInstalled:!0}:h.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled===!0?e:{...e,optionAsMetaKeyInstalled:!0}:e),R(),t}function he(){return _().shiftEnterKeyBindingInstalled===!0}function ge(){return _().hasUsedBackslashReturn===!0}function _e(){_().hasUsedBackslashReturn||x(e=>({...e,hasUsedBackslashReturn:!0}))}async function ve(e,t,n){if(h.terminal&&h.terminal in $)return e(`Shift+Enter is natively supported in ${$[h.terminal]}.
2
+
3
+ No configuration needed. Just use Shift+Enter to add newlines.`),null;if(!q()){let t=h.terminal||`your current terminal`,n=ie(),r=``;return n===`macos`?r=` • macOS: Apple Terminal
4
+ `:n===`windows`&&(r=` • Windows: Windows Terminal
5
+ `),e(`Terminal setup cannot be run from ${t}.
6
+
7
+ This command configures a convenient Shift+Enter shortcut for multi-line prompts.
8
+ ${s.dim(`Note: You can already use backslash (\\\\) + return to add newlines.`)}
9
+
10
+ To set up the shortcut (optional):
11
+ 1. Exit tmux/screen temporarily
12
+ 2. Run /terminal-setup directly in one of these terminals:
13
+ ${r} • IDE: VSCode, Cursor, Windsurf, Zed
14
+ • Other: Alacritty
15
+ 3. Return to tmux/screen - settings will persist
16
+
17
+ ${s.dim(`Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter natively.`)}`),null}return e(await J(t.options.theme)),null}async function Y(e=`VSCode`,t){if(pe())return`${a(`warning`,t)(`Cannot install keybindings from a remote ${e} session.`)}${Q}${Q}${e} keybindings must be installed on your local machine, not the remote server.${Q}${Q}To install the Shift+Enter keybinding:${Q}1. Open ${e} on your local machine (not connected to remote)${Q}2. Open the Command Palette (Cmd/Ctrl+Shift+P) → "Preferences: Open Keyboard Shortcuts (JSON)"${Q}3. Add this keybinding (the file must be a JSON array):${Q}${Q}${s.dim(`[
18
+ {
19
+ "key": "shift+enter",
20
+ "command": "workbench.action.terminal.sendSequence",
21
+ "args": { "text": "\\u001b\\r" },
22
+ "when": "terminalFocus"
23
+ }
24
+ ]`)}${Q}`;let n=e===`VSCode`?`Code`:e,r=k(D(),O()===`win32`?k(`AppData`,`Roaming`,n,`User`):O()===`darwin`?k(`Library`,`Application Support`,n,`User`):k(`.config`,n,`User`)),i=k(r,`keybindings.json`);try{await M(r,{recursive:!0});let n=`[]`,o=[],c=!1;try{n=await N(i,{encoding:`utf-8`}),c=!0,o=oe(n)??[]}catch(e){if(!d(e))throw e}if(c){let n=`${i}.${A(4).toString(`hex`)}.bak`;try{await j(i,n)}catch{return`${a(`warning`,t)(`Error backing up existing ${e} terminal keybindings. Bailing out.`)}${Q}${s.dim(`See ${K(i)}`)}${Q}${s.dim(`Backup path: ${K(n)}`)}${Q}`}}return o.find(e=>e.key===`shift+enter`&&e.command===`workbench.action.terminal.sendSequence`&&e.when===`terminalFocus`)?`${a(`warning`,t)(`Found existing ${e} terminal Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${K(i)}`)}${Q}`:(await F(i,E(n,{key:`shift+enter`,command:`workbench.action.terminal.sendSequence`,args:{text:`\x1B\r`},when:`terminalFocus`}),{encoding:`utf-8`}),`${a(`success`,t)(`Installed ${e} terminal Shift+Enter key binding`)}${Q}${s.dim(`See ${K(i)}`)}${Q}`)}catch(t){throw T(t),Error(`Failed to install ${e} terminal Shift+Enter key binding`)}}async function X(e){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':useOptionAsMetaKey bool true`,U()]);if(t!==0){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':useOptionAsMetaKey true`,U()]);if(t!==0)return T(Error(`Failed to enable Option as Meta key for Terminal.app profile: ${e}`)),!1}return!0}async function Z(e){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':Bell bool false`,U()]);if(t!==0){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':Bell false`,U()]);if(t!==0)return T(Error(`Failed to disable audio bell for Terminal.app profile: ${e}`)),!1}return!0}async function ye(e){try{if(!await fe())throw Error(`Failed to create backup of Terminal.app preferences, bailing out`);let{stdout:t,code:n}=await C(`defaults`,[`read`,`com.apple.Terminal`,`Default Window Settings`]);if(n!==0||!t.trim())throw Error(`Failed to read default Terminal.app profile`);let{stdout:r,code:i}=await C(`defaults`,[`read`,`com.apple.Terminal`,`Startup Window Settings`]);if(i!==0||!r.trim())throw Error(`Failed to read startup Terminal.app profile`);let o=!1,c=t.trim(),l=await X(c),u=await Z(c);(l||u)&&(o=!0);let d=r.trim();if(d!==c){let e=await X(d),t=await Z(d);(e||t)&&(o=!0)}if(!o)throw Error(`Failed to enable Option as Meta key or disable audio bell for any Terminal.app profile`);return await C(`killall`,[`cfprefsd`]),H(),`${a(`success`,e)(`Configured Terminal.app settings:`)}${Q}${a(`success`,e)(`- Enabled "Use Option as Meta key"`)}${Q}${a(`success`,e)(`- Switched to visual bell`)}${Q}${s.dim(`Option+Enter will now enter a newline.`)}${Q}${s.dim(`You must restart Terminal.app for changes to take effect.`,e)}${Q}`}catch(e){T(e);let t=await W(),n=`Failed to enable Option as Meta key for Terminal.app.`;throw t.status===`restored`?Error(`${n} Your settings have been restored from backup.`):t.status===`failed`?Error(`${n} Restoring from backup failed, try manually with: defaults import com.apple.Terminal ${t.backupPath}`):Error(`${n} No backup was available to restore from.`)}}async function be(e){let t=[],n=process.env.XDG_CONFIG_HOME;if(n?t.push(k(n,`alacritty`,`alacritty.toml`)):t.push(k(D(),`.config`,`alacritty`,`alacritty.toml`)),O()===`win32`){let e=process.env.APPDATA;e&&t.push(k(e,`alacritty`,`alacritty.toml`))}let r=null,i=``,o=!1;for(let e of t)try{i=await N(e,{encoding:`utf-8`}),r=e,o=!0;break}catch(e){if(!d(e))throw e}if(r||(r=t[0]??null),!r)throw Error(`No valid config path found for Alacritty`);try{if(o){if(i.includes(`mods = "Shift"`)&&i.includes(`key = "Return"`))return`${a(`warning`,e)(`Found existing Alacritty Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${K(r)}`)}${Q}`;let t=A(4).toString(`hex`),n=`${r}.${t}.bak`;try{await j(r,n)}catch{return`${a(`warning`,e)(`Error backing up existing Alacritty config. Bailing out.`)}${Q}${s.dim(`See ${K(r)}`)}${Q}${s.dim(`Backup path: ${K(n)}`)}${Q}`}}else await M(ce(r),{recursive:!0});let t=i;return i&&!i.endsWith(`
25
+ `)&&(t+=`
26
+ `),t+=`
27
+ [[keyboard.bindings]]
28
+ key = "Return"
29
+ mods = "Shift"
30
+ chars = "\\u001B\\r"
31
+ `,await F(r,t,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Alacritty Shift+Enter key binding`)}${Q}${a(`success`,e)(`You may need to restart Alacritty for changes to take effect`)}${Q}${s.dim(`See ${K(r)}`)}${Q}`}catch(e){throw T(e),Error(`Failed to install Alacritty Shift+Enter key binding`)}}async function xe(e){let t=k(D(),`.config`,`zed`),n=k(t,`keymap.json`);try{await M(t,{recursive:!0});let r=`[]`,i=!1;try{r=await N(n,{encoding:`utf-8`}),i=!0}catch(e){if(!d(e))throw e}if(i){if(r.includes(`shift-enter`))return`${a(`warning`,e)(`Found existing Zed Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${K(n)}`)}${Q}`;let t=`${n}.${A(4).toString(`hex`)}.bak`;try{await j(n,t)}catch{return`${a(`warning`,e)(`Error backing up existing Zed keymap. Bailing out.`)}${Q}${s.dim(`See ${K(n)}`)}${Q}${s.dim(`Backup path: ${K(t)}`)}${Q}`}}let o;try{o=u(r),Array.isArray(o)||(o=[])}catch{o=[]}return o.push({context:`Terminal`,bindings:{"shift-enter":[`terminal::SendText`,`\x1B\r`]}}),await F(n,te(o,null,2)+`
32
+ `,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Zed Shift+Enter key binding`)}${Q}${s.dim(`See ${K(n)}`)}${Q}`}catch(e){throw T(e),Error(`Failed to install Zed Shift+Enter key binding`)}}var Q,$,Se=e((()=>{i(),o(),B(),G(),v(),g(),m(),S(),se(),w(),ae(),f(),Q=`
33
+ `,$={ghostty:`Ghostty`,kitty:`Kitty`,"iTerm.app":`iTerm2`,WezTerm:`WezTerm`,WarpTerminal:`Warp`}}));export{he as a,q as c,I as d,ue as f,z as h,Se as i,W as l,R as m,me as n,_e as o,B as p,ge as r,J as s,ve as t,G as u};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{H as t,fi as n,t as r,x as i}from"./src-CDCSSo0U2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{n as o,t as s}from"./ThemePicker-EQ6hPUeI.js";function c({onDone:e}){let[,n]=t();return(0,l.jsx)(i,{color:`permission`,children:(0,l.jsx)(s,{onThemeSelect:t=>{n(t),e(`Theme set to ${t}`)},onCancel:()=>{e(`Theme picker dismissed`,{display:`system`})},skipExitHandling:!0})})}var l,u;e((()=>{n(),r(),o(),l=a(),u=async(e,t)=>(0,l.jsx)(c,{onDone:e})}))();export{u as call};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{H as t,fi as n,t as r,x as i}from"./src-P_wYS_NJ2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{n as o,t as s}from"./ThemePicker-DrC8tlp0.js";function c({onDone:e}){let[,n]=t();return(0,l.jsx)(i,{color:`permission`,children:(0,l.jsx)(s,{onThemeSelect:t=>{n(t),e(`Theme set to ${t}`)},onCancel:()=>{e(`Theme picker dismissed`,{display:`system`})},skipExitHandling:!0})})}var l,u;e((()=>{n(),r(),o(),l=a(),u=async(e,t)=>(0,l.jsx)(c,{onDone:e})}))();export{u as call};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{r,t as i}from"./execFileNoThrow-CCX-JY8h.js";import{a,i as o,t as s}from"./cliLaunch-CQjLYRzM.js";import{spawnSync as c}from"child_process";var l;e((()=>{r(),o(),t(),l=class{constructor(){n(this,`name`,`tmux`),n(this,`supportsInteractiveInput`,!0)}async available(){let{code:e}=await i(`tmux`,[`-V`],{useCwd:!1});return e===0}async start(e){let t=s(e.args,{env:{...e.env,CLAUDE_CODE_SESSION_KIND:`bg`,CLAUDE_CODE_SESSION_NAME:e.sessionName,CLAUDE_CODE_SESSION_LOG:e.logPath,CLAUDE_CODE_TMUX_SESSION:e.sessionName}}),n=a(t);if(c(`tmux`,[`new-session`,`-d`,`-s`,e.sessionName,n],{stdio:`inherit`,env:t.env}).status!==0)throw Error(`Failed to create tmux session.`);return{pid:0,sessionName:e.sessionName,logPath:e.logPath,engineUsed:`tmux`}}async attach(e){if(!e.tmuxSessionName)throw Error(`Session ${e.sessionId} has no tmux session name.`);if(c(`tmux`,[`attach-session`,`-t`,e.tmuxSessionName],{stdio:`inherit`}).status!==0)throw Error(`Failed to attach to tmux session '${e.tmuxSessionName}'.`)}}}))();export{l as TmuxEngine};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{r,t as i}from"./execFileNoThrow-Dwu6psHW.js";import{a,i as o,t as s}from"./cliLaunch-BWcoyZDP.js";import{spawnSync as c}from"child_process";var l;e((()=>{r(),o(),t(),l=class{constructor(){n(this,`name`,`tmux`),n(this,`supportsInteractiveInput`,!0)}async available(){let{code:e}=await i(`tmux`,[`-V`],{useCwd:!1});return e===0}async start(e){let t=s(e.args,{env:{...e.env,CLAUDE_CODE_SESSION_KIND:`bg`,CLAUDE_CODE_SESSION_NAME:e.sessionName,CLAUDE_CODE_SESSION_LOG:e.logPath,CLAUDE_CODE_TMUX_SESSION:e.sessionName}}),n=a(t);if(c(`tmux`,[`new-session`,`-d`,`-s`,e.sessionName,n],{stdio:`inherit`,env:t.env}).status!==0)throw Error(`Failed to create tmux session.`);return{pid:0,sessionName:e.sessionName,logPath:e.logPath,engineUsed:`tmux`}}async attach(e){if(!e.tmuxSessionName)throw Error(`Session ${e.sessionId} has no tmux session name.`);if(c(`tmux`,[`attach-session`,`-t`,e.tmuxSessionName],{stdio:`inherit`}).status!==0)throw Error(`Failed to attach to tmux session '${e.tmuxSessionName}'.`)}}}))();export{l as TmuxEngine};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,l as n}from"./debug-RZ4NuXyS.js";import{o as r,s as i}from"./log-CZ0zYP_c.js";import{r as a,t as o}from"./observationStore-BpjlK0pG.js";import{randomUUID as s}from"node:crypto";function c(){for(let[e,t]of T)if(t.size>x){let e=t.values(),n=t.size-S;for(let r=0;r<n;r++){let n=e.next();if(n.done)break;t.delete(n.value)}}if(T.size>C){let e=T.size-w,t=0;for(let n of T.keys()){if(t>=e)break;T.delete(n),t++}}}function l(e,t){let n=T.get(e)??new Set;n.add(t),T.delete(e),T.set(e,n),c()}function u(e,t){return T.get(e)?.has(t)??!1}function d(){T.clear()}function f(e){return{id:s(),sessionId:e.sessionId,projectId:e.projectId,projectName:e.projectName,cwd:e.cwd,timestamp:new Date().toISOString(),source:`tool-hook`,turn:e.turn}}function p(){return E||(E=Promise.all([import(`./projectContext-BaDZBAoK.js`),import(`./featureCheck-CrJeuheQ.js`),import(`./runtimeObserver-CsIwinzh.js`)]).then(([e,t,n])=>({resolveProjectContext:e.resolveProjectContext,isSkillLearningEnabled:t.isSkillLearningEnabled,RUNTIME_SESSION_ID:n.RUNTIME_SESSION_ID,getRuntimeTurn:n.getRuntimeTurn}))),E}function m(){E=void 0}async function h(e,t,r,a){let o;try{let{resolveProjectContext:s,isSkillLearningEnabled:c,RUNTIME_SESSION_ID:l,getRuntimeTurn:u}=await p();if(!c())return a();let d=s(process.cwd());o={sessionId:r.sessionId??l,turn:r.turn??u(),projectId:d.projectId,projectName:d.projectName,cwd:d.cwd,project:d},g(o,e,t).catch(e=>{n(`skill-learning: recordToolStart error`),i(e)})}catch(e){n(`skill-learning: hook setup error`),i(e)}try{let t=await a();return o&&_(o,e,t,`success`).catch(e=>{n(`skill-learning: recordToolComplete error`),i(e)}),t}catch(t){throw o&&v(o,e,t).catch(e=>{n(`skill-learning: recordToolError error`),i(e)}),t}}async function g(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_start`,toolName:t,toolInput:b(n)},{project:e.project})}async function _(e,t,n,r=`success`){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:r},{project:e.project})}async function v(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:`failure`},{project:e.project})}async function y(e,t){return l(e.sessionId,e.turn),o({...f(e),event:`user_message`,messageText:t},{project:e.project})}function b(e){if(e!=null){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}}var x,S,C,w,T,E;e((()=>{a(),t(),r(),x=500,S=250,C=50,w=25,T=new Map}))();export{u as hasToolHookObservationsForTurn,c as pruneEmittedTurns,_ as recordToolComplete,v as recordToolError,g as recordToolStart,y as recordUserCorrection,d as resetToolHookBookkeeping,m as resetToolHookDepsCache,h as runToolCallWithSkillLearningHooks};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,l as n}from"./debug-RAynG_nM.js";import{o as r,s as i}from"./log-CezCRpAN.js";import{r as a,t as o}from"./observationStore-BpjlK0pG.js";import{randomUUID as s}from"node:crypto";function c(){for(let[e,t]of T)if(t.size>x){let e=t.values(),n=t.size-S;for(let r=0;r<n;r++){let n=e.next();if(n.done)break;t.delete(n.value)}}if(T.size>C){let e=T.size-w,t=0;for(let n of T.keys()){if(t>=e)break;T.delete(n),t++}}}function l(e,t){let n=T.get(e)??new Set;n.add(t),T.delete(e),T.set(e,n),c()}function u(e,t){return T.get(e)?.has(t)??!1}function d(){T.clear()}function f(e){return{id:s(),sessionId:e.sessionId,projectId:e.projectId,projectName:e.projectName,cwd:e.cwd,timestamp:new Date().toISOString(),source:`tool-hook`,turn:e.turn}}function p(){return E||(E=Promise.all([import(`./projectContext-RUMJB798.js`),import(`./featureCheck-JOur3pHb.js`),import(`./runtimeObserver-DYUva6g-.js`)]).then(([e,t,n])=>({resolveProjectContext:e.resolveProjectContext,isSkillLearningEnabled:t.isSkillLearningEnabled,RUNTIME_SESSION_ID:n.RUNTIME_SESSION_ID,getRuntimeTurn:n.getRuntimeTurn}))),E}function m(){E=void 0}async function h(e,t,r,a){let o;try{let{resolveProjectContext:s,isSkillLearningEnabled:c,RUNTIME_SESSION_ID:l,getRuntimeTurn:u}=await p();if(!c())return a();let d=s(process.cwd());o={sessionId:r.sessionId??l,turn:r.turn??u(),projectId:d.projectId,projectName:d.projectName,cwd:d.cwd,project:d},g(o,e,t).catch(e=>{n(`skill-learning: recordToolStart error`),i(e)})}catch(e){n(`skill-learning: hook setup error`),i(e)}try{let t=await a();return o&&_(o,e,t,`success`).catch(e=>{n(`skill-learning: recordToolComplete error`),i(e)}),t}catch(t){throw o&&v(o,e,t).catch(e=>{n(`skill-learning: recordToolError error`),i(e)}),t}}async function g(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_start`,toolName:t,toolInput:b(n)},{project:e.project})}async function _(e,t,n,r=`success`){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:r},{project:e.project})}async function v(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:`failure`},{project:e.project})}async function y(e,t){return l(e.sessionId,e.turn),o({...f(e),event:`user_message`,messageText:t},{project:e.project})}function b(e){if(e!=null){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}}var x,S,C,w,T,E;e((()=>{a(),t(),r(),x=500,S=250,C=50,w=25,T=new Map}))();export{u as hasToolHookObservationsForTurn,c as pruneEmittedTurns,_ as recordToolComplete,v as recordToolError,g as recordToolStart,y as recordUserCorrection,d as resetToolHookBookkeeping,m as resetToolHookDepsCache,h as runToolCallWithSkillLearningHooks};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{XT as t,YT as n,nS as r,tS as i}from"./loadAgentsDir-C7lOqvfh.js";import{n as a,t as o}from"./partition-D-UhsUCx.js";function s(e,n,i){let[o,s]=a(t([...e,...n],`name`),r),c=(e,t)=>e.name.localeCompare(t.name);return[...s.sort(c),...o.sort(c)]}var c=e((()=>{o(),n(),i()}));export{s as n,c as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{n as r,t as i}from"./axios-DaWTGg7G.js";import{F as a,S as o,a as s,l as c,w as l,z as u}from"./debug-RZ4NuXyS.js";import{d,f}from"./log-CZ0zYP_c.js";import{l as p,u as m}from"./oauth-BqJqV-2M.js";import{Bt as h,Cn as g,Sn as _,ft as v}from"./model-CwO-g1RW.js";import{hostname as y}from"os";i(),n(),m(),s(),u(),d(),g(),o();var b=`tengu_sessions_elevated_auth_enforcement`;function x(){return!1}var S=t(()=>process.env.CLAUDE_TRUSTED_DEVICE_TOKEN||_().read()?.trustedDeviceToken);function C(){if(x())return S()}function w(){S.cache?.clear?.()}function T(){if(!x())return;let e=_();try{let t=e.read();t?.trustedDeviceToken&&(delete t.trustedDeviceToken,e.update(t))}catch{}S.cache?.clear?.()}async function E(){try{if(!await!1){c(`[trusted-device] Gate ${b} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){c(`[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)`);return}let{getClaudeAIOAuthTokens:t}=(h(),e(v)),n=t()?.accessToken;if(!n){c(`[trusted-device] No OAuth token, skipping enrollment`);return}let i=_();if(f()){c(`[trusted-device] Essential traffic only, skipping enrollment`);return}let o=p().BASE_API_URL,s;try{s=await r.post(`${o}/api/auth/trusted_devices`,{display_name:`Work Mate on ${y()} · ${process.platform}`},{headers:{Authorization:`Bearer ${n}`,"Content-Type":`application/json`},timeout:1e4,validateStatus:e=>e<500})}catch(e){c(`[trusted-device] Enrollment request failed: ${a(e)}`);return}if(s.status!==200&&s.status!==201){c(`[trusted-device] Enrollment failed ${s.status}: ${l(s.data).slice(0,200)}`);return}let u=s.data?.device_token;if(!u||typeof u!=`string`){c(`[trusted-device] Enrollment response missing device_token field`);return}try{let e=i.read();if(!e){c(`[trusted-device] Cannot read storage, skipping token persist`);return}e.trustedDeviceToken=u;let t=i.update(e);if(!t.success){c(`[trusted-device] Failed to persist token: ${t.warning??`unknown`}`);return}S.cache?.clear?.(),c(`[trusted-device] Enrolled device_id=${s.data.device_id??`unknown`}`)}catch(e){c(`[trusted-device] Storage write failed: ${a(e)}`)}}catch(e){c(`[trusted-device] Enrollment error: ${a(e)}`)}}export{C as i,w as n,E as r,T as t};
1
+ import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{n as r,t as i}from"./axios-DaWTGg7G.js";import{F as a,S as o,a as s,l as c,w as l,z as u}from"./debug-RAynG_nM.js";import{d,f}from"./log-CezCRpAN.js";import{l as p,u as m}from"./oauth-C9VBDB0Y.js";import{Bt as h,Cn as g,Sn as _,ft as v}from"./model-BsZ4sP_H.js";import{hostname as y}from"os";i(),n(),m(),s(),u(),d(),g(),o();var b=`tengu_sessions_elevated_auth_enforcement`;function x(){return!1}var S=t(()=>process.env.CLAUDE_TRUSTED_DEVICE_TOKEN||_().read()?.trustedDeviceToken);function C(){if(x())return S()}function w(){S.cache?.clear?.()}function T(){if(!x())return;let e=_();try{let t=e.read();t?.trustedDeviceToken&&(delete t.trustedDeviceToken,e.update(t))}catch{}S.cache?.clear?.()}async function E(){try{if(!await!1){c(`[trusted-device] Gate ${b} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){c(`[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)`);return}let{getClaudeAIOAuthTokens:t}=(h(),e(v)),n=t()?.accessToken;if(!n){c(`[trusted-device] No OAuth token, skipping enrollment`);return}let i=_();if(f()){c(`[trusted-device] Essential traffic only, skipping enrollment`);return}let o=p().BASE_API_URL,s;try{s=await r.post(`${o}/api/auth/trusted_devices`,{display_name:`Work Mate on ${y()} · ${process.platform}`},{headers:{Authorization:`Bearer ${n}`,"Content-Type":`application/json`},timeout:1e4,validateStatus:e=>e<500})}catch(e){c(`[trusted-device] Enrollment request failed: ${a(e)}`);return}if(s.status!==200&&s.status!==201){c(`[trusted-device] Enrollment failed ${s.status}: ${l(s.data).slice(0,200)}`);return}let u=s.data?.device_token;if(!u||typeof u!=`string`){c(`[trusted-device] Enrollment response missing device_token field`);return}try{let e=i.read();if(!e){c(`[trusted-device] Cannot read storage, skipping token persist`);return}e.trustedDeviceToken=u;let t=i.update(e);if(!t.success){c(`[trusted-device] Failed to persist token: ${t.warning??`unknown`}`);return}S.cache?.clear?.(),c(`[trusted-device] Enrolled device_id=${s.data.device_id??`unknown`}`)}catch(e){c(`[trusted-device] Storage write failed: ${a(e)}`)}}catch(e){c(`[trusted-device] Enrollment error: ${a(e)}`)}}export{C as i,w as n,E as r,T as t};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./trustedDevice-CFf5yaG-.js";export{t as clearTrustedDeviceToken,e as enrollTrustedDevice};