@readmagic/workmate 0.0.7 → 0.0.9

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 (623) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-qFZy3FOD.js +1 -0
  2. package/dist/chunks/App-DW4elk6E.js +1 -0
  3. package/dist/chunks/ApproveApiKey-D05WywHU.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DHAbdwkC.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-QgFwoaaC.js +2 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-BuRFF1fQ.js +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-CDrArsSX.js +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-DpecRCAt.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-D1MYL1dJ.js +1 -0
  10. package/dist/chunks/DiffDialog-BIcwpgSr.js +6 -0
  11. package/dist/chunks/Doctor-D160J8Ad.js +3 -0
  12. package/dist/chunks/Doctor-VhJi2cmL.js +1 -0
  13. package/dist/chunks/ExitFlow-CoWHhKHJ.js +2 -0
  14. package/dist/chunks/Grove-BmirUB6V.js +11 -0
  15. package/dist/chunks/{HybridTransport-rK83Qijz.js → HybridTransport-BVmSUHf0.js} +3 -3
  16. package/dist/chunks/InvalidConfigDialog-WRywkKeS.js +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-C4n3A72C.js +1 -0
  18. package/dist/chunks/MCPConnectionManager-DPFe4hPh.js +1 -0
  19. package/dist/chunks/MCPToolListView-BPmE0C2o.js +1 -0
  20. package/dist/chunks/McpParsingWarnings-CH4yyMAL.js +1 -0
  21. package/dist/chunks/MessageSelector-kOn2GaU-.js +3 -0
  22. package/dist/chunks/Messages-4EnHFeh1.js +11 -0
  23. package/dist/chunks/Onboarding-BboWs1pp.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-BpC9COmh.js +1 -0
  27. package/dist/chunks/PromptInputHelpMenu-BvcAzbSi.js +1 -0
  28. package/dist/chunks/QueryEngine-J6ElcO16.js +1 -0
  29. package/dist/chunks/REPL-DBjbAJsm.js +133 -0
  30. package/dist/chunks/REPL-oBemMXvp.js +1 -0
  31. package/dist/chunks/RemoteSessionManager-CoIyFKKa.js +2 -0
  32. package/dist/chunks/ResumeConversation-wBG8OD9P.js +1 -0
  33. package/dist/chunks/{SSETransport-5VK5okFv.js → SSETransport-1KBBUikF.js} +3 -3
  34. package/dist/chunks/{Dialog-vfLXEPed.js → SearchBox-C9vUA4IM.js} +1 -1
  35. package/dist/chunks/SearchExtraToolsTool-BugrzImr.js +1 -0
  36. package/dist/chunks/Settings-DptKuJE7.js +2 -0
  37. package/dist/chunks/TeleportProgress-BmgPAZAi.js +1 -0
  38. package/dist/chunks/TeleportRepoMismatchDialog-sgxNOeM_.js +1 -0
  39. package/dist/chunks/TeleportResumeWrapper-GptvrUdv.js +1 -0
  40. package/dist/chunks/ThemePicker-gAMqqD1P.js +1 -0
  41. package/dist/chunks/TrustDialog-CWt-4Evl.js +1 -0
  42. package/dist/chunks/{ValidationErrorsList-BYsDtAvX.js → ValidationErrorsList-De3kzHtz.js} +1 -1
  43. package/dist/chunks/{WelcomeV2-C1BfrqC5.js → WelcomeV2-BWF-cJOu.js} +1 -1
  44. package/dist/chunks/add-dir-DBVT1cEK.js +1 -0
  45. package/dist/chunks/{agentDisplay-CMmHIl86.js → agentDisplay-5gnCQwUY.js} +1 -1
  46. package/dist/chunks/{agents-DE_4mAHG.js → agents-Bz1MLp4A.js} +1 -1
  47. package/dist/chunks/agents-CnwTOlqO.js +103 -0
  48. package/dist/chunks/allErrors-DYw_q14e.js +1 -0
  49. package/dist/chunks/analytics-DJobLaWP.js +1 -0
  50. package/dist/chunks/api-DXDXTFGa.js +1 -0
  51. package/dist/chunks/api-DzccRM_z.js +1 -0
  52. package/dist/chunks/auth-Cjnyy10u.js +15 -0
  53. package/dist/chunks/auth-CnLb6RWc.js +1 -0
  54. package/dist/chunks/auth-D-SGHS0K.js +1 -0
  55. package/dist/chunks/{autoMode-ZW70mpr0.js → autoMode-CQ5nqP9c.js} +5 -5
  56. package/dist/chunks/{autonomy-CwbWsCnv.js → autonomy-CPUCe-YU.js} +1 -1
  57. package/dist/chunks/autonomy-dSJl0hN1.js +15 -0
  58. package/dist/chunks/{autonomyPanel-Mq50H7iM.js → autonomyPanel-Ccr9ilei.js} +1 -1
  59. package/dist/chunks/backgroundHousekeeping--cs5crp7.js +17 -0
  60. package/dist/chunks/backgroundHousekeeping-CcbHitKC.js +1 -0
  61. package/dist/chunks/{banner-CWkrK10u.js → banner-BJZNMppT.js} +2 -2
  62. package/dist/chunks/bg-DWloqGwk.js +1 -0
  63. package/dist/chunks/{bg-WnYN5ifx.js → bg-w3Vlsm3Y.js} +2 -2
  64. package/dist/chunks/branch-CG0AKS1J.js +3 -0
  65. package/dist/chunks/{break-cache-C_p7Kmx2.js → break-cache-DXV0brco.js} +2 -2
  66. package/dist/chunks/bridgeConfig-Dmc1ZDev.js +1 -0
  67. package/dist/chunks/{bridgeConfig-CE6dMsiJ.js → bridgeConfig-vORehbGG.js} +1 -1
  68. package/dist/chunks/bridgeMessaging-DlczTV9X.js +1 -0
  69. package/dist/chunks/bridgePointer-D4W9GpWw.js +1 -0
  70. package/dist/chunks/btw-DDUC_t0w.js +1 -0
  71. package/dist/chunks/caches-1IFb6_M_.js +1 -0
  72. package/dist/chunks/caches-CB8MHqy2.js +1 -0
  73. package/dist/chunks/capacityWake-L7b1mMft.js +3 -0
  74. package/dist/chunks/ccrClient-CG6HTv_n.js +1 -0
  75. package/dist/chunks/{claudeDesktop-Fe-QL-sN.js → claudeDesktop-CAmnheYx.js} +1 -1
  76. package/dist/chunks/{clear-D8m2utXW.js → clear-DdWexxbM.js} +1 -1
  77. package/dist/chunks/{cliLaunch-BkPAatcs.js → cliLaunch-BWWOgBFh.js} +1 -1
  78. package/dist/chunks/{client-C6MbjvOB.js → client-CoXtVRzi.js} +1 -1
  79. package/dist/chunks/client-Crrwkw7g.js +1 -0
  80. package/dist/chunks/client-D8hKghba.js +1 -0
  81. package/dist/chunks/color-Cuq0c6xy.js +1 -0
  82. package/dist/chunks/commands-D3sESsTp.js +1 -0
  83. package/dist/chunks/compact-DIpwuBDq.js +2 -0
  84. package/dist/chunks/config-CVvUNkj2.js +1 -0
  85. package/dist/chunks/config-D4G8_MqJ.js +3 -0
  86. package/dist/chunks/config-q9D4hFiK.js +1 -0
  87. package/dist/chunks/context-BWcfhhDj.js +1 -0
  88. package/dist/chunks/context-noninteractive-Bwt9A3XD.js +1 -0
  89. package/dist/chunks/context-noninteractive-c7jGVWHQ.js +29 -0
  90. package/dist/chunks/conversation-Bjo_8kia.js +1 -0
  91. package/dist/chunks/conversation-DrHZIQX2.js +1 -0
  92. package/dist/chunks/{createSSHSession-BOdTAX3N.js → createSSHSession-DP7B8yvb.js} +1 -1
  93. package/dist/chunks/createSession-CPo6GBSb.js +1 -0
  94. package/dist/chunks/createSession-DnykRoia.js +1 -0
  95. package/dist/chunks/crossProjectResume-D2A-qjgP.js +40 -0
  96. package/dist/chunks/cwd--q1ONL7P.js +1 -0
  97. package/dist/chunks/cwd-L4wygFqJ.js +1 -0
  98. package/dist/chunks/{daemon-YtZbMQtn.js → daemon-D2vFIVOz.js} +1 -1
  99. package/dist/chunks/datadog-DrmHyl3_.js +1 -0
  100. package/dist/chunks/{debug-BrXObCdR.js → debug-BdqxZ7rV.js} +4 -4
  101. package/dist/chunks/debugUtils-CezNYZ-4.js +1 -0
  102. package/dist/chunks/{detached-TYk4hMFj.js → detached-CkPpYMJj.js} +1 -1
  103. package/dist/chunks/detectRepository-DA1Q_Skc.js +1 -0
  104. package/dist/chunks/{detectRepository-BPr0VWNO.js → detectRepository-DvxoaPlk.js} +1 -1
  105. package/dist/chunks/{diff-CJEKvOA5.js → diff-DHzz9WAp.js} +1 -1
  106. package/dist/chunks/directoryCompletion-D5AvL7TF.js +1 -0
  107. package/dist/chunks/doctor-PWqB46xd.js +1 -0
  108. package/dist/chunks/entry-4JtoJONR.js +14 -0
  109. package/dist/chunks/envUtils-BDhHQY0-.js +1 -0
  110. package/dist/chunks/esm-DcIr7tVd.js +1 -0
  111. package/dist/chunks/{execFileNoThrow-D244NytW.js → execFileNoThrow-5SylUnAI.js} +1 -1
  112. package/dist/chunks/{execSyncWrapper-CCMQShK-.js → execSyncWrapper-DKuxVTaf.js} +1 -1
  113. package/dist/chunks/exit-OW9g7b9A.js +1 -0
  114. package/dist/chunks/{lazySchema-DULtBUCI.js → external-CEp-aPkt.js} +1 -1
  115. package/dist/chunks/extraUsage-Dt5mw35U.js +1 -0
  116. package/dist/chunks/extractMemories-1VlmCGwa.js +1 -0
  117. package/dist/chunks/fast-ClYQcEv5.js +1 -0
  118. package/dist/chunks/fast-CrvLdpy3.js +1 -0
  119. package/dist/chunks/fileSuggestions-fNxREjpe.js +3 -0
  120. package/dist/chunks/firstPartyEventLogger-BBXEQUf0.js +1 -0
  121. package/dist/chunks/firstPartyEventLogger-DhEPWcit.js +5 -0
  122. package/dist/chunks/flushGate-ch-Tvwjj.js +1 -0
  123. package/dist/chunks/{fpsMetrics-Cf_hdtiJ.js → fpsMetrics-DffAomdg.js} +1 -1
  124. package/dist/chunks/gemini-fZ0VPU2A.js +1 -0
  125. package/dist/chunks/generateRecap-BIBVlB__.js +1 -0
  126. package/dist/chunks/generateSessionName-nZj_VvKZ.js +1 -0
  127. package/dist/chunks/{genericProcessUtils-CdQTApYX.js → genericProcessUtils-BmDSLcMf.js} +1 -1
  128. package/dist/chunks/git-B9uvt96d.js +6 -0
  129. package/dist/chunks/git-BfS5Hk4S.js +1 -0
  130. package/dist/chunks/githubRepoPathMapping-Cqx3pSfc.js +1 -0
  131. package/dist/chunks/goal-IasZVqKh.js +3 -0
  132. package/dist/chunks/grok-Dk3LyzMa.js +1 -0
  133. package/dist/chunks/grove-BE4fQ6tG.js +7 -0
  134. package/dist/chunks/help-D2-v9Ug9.js +1 -0
  135. package/dist/chunks/{hooks-CkA9bhHl.js → hooks-BrKy5XWQ.js} +2 -2
  136. package/dist/chunks/hooks-DGd02IKF.js +1 -0
  137. package/dist/chunks/initReplBridge-RhCAlmHE.js +1 -0
  138. package/dist/chunks/{install-Dzlm4u58.js → install-CVGZ55wV.js} +1 -1
  139. package/dist/chunks/{instrumentation-Yt31gxWN.js → instrumentation-BmWotlxR.js} +4 -4
  140. package/dist/chunks/{job-BXujwZNa.js → job-DEXxW_Zo.js} +1 -1
  141. package/dist/chunks/{jwtUtils-DE2GPUcx.js → jwtUtils-C9sdGhvT.js} +1 -1
  142. package/dist/chunks/keybindings-BRdSOSUD.js +2 -0
  143. package/dist/chunks/language-C0cIpKE2.js +1 -0
  144. package/dist/chunks/{language-Ca4B018X.js → language-CxThoWRC.js} +1 -1
  145. package/dist/chunks/launchLocalMemory-CLSSVFoj.js +3 -0
  146. package/dist/chunks/launchOnboarding-BkJfKviO.js +8 -0
  147. package/dist/chunks/lazySchema-B4D4qJVE.js +1 -0
  148. package/dist/chunks/loadAgentsDir-8UprzS4w.js +1 -0
  149. package/dist/chunks/{loadAgentsDir-x3rlgED4.js → loadAgentsDir-CKSb56Gp.js} +1651 -2004
  150. package/dist/chunks/loadPluginHooks-LbaURHVH.js +1 -0
  151. package/dist/chunks/{localSearch-DtplGF-l.js → localSearch-CPOnyi8I.js} +1 -1
  152. package/dist/chunks/localSearch-DNjbr4S9.js +1 -0
  153. package/dist/chunks/log-CTFl4qpD.js +1 -0
  154. package/dist/chunks/logoV2Utils-we1sfJvf.js +1 -0
  155. package/dist/chunks/{magicDocs-qdDB_mKb.js → magicDocs-DmKlTQvK.js} +3 -3
  156. package/dist/chunks/main-BIiwW4mM.js +605 -0
  157. package/dist/chunks/{main-D862LI_d.js → main-ClXu1ilx.js} +2 -2
  158. package/dist/chunks/{managedEnv-Aq5BXfY7.js → managedEnv-Cl7YbYzf.js} +1 -1
  159. package/dist/chunks/managedEnv-CpiiQx_v.js +1 -0
  160. package/dist/chunks/{mappers-04gNXJ3w.js → mappers-xQC-Z4-h.js} +1 -1
  161. package/dist/chunks/mcp-B_m1XBDt.js +6 -0
  162. package/dist/chunks/mcp-BiyfH9Sd.js +1 -0
  163. package/dist/chunks/mcp-BjlaPUWX.js +2 -0
  164. package/dist/chunks/memoize-FJv2HV1u.js +1 -0
  165. package/dist/chunks/memory-LN8f_p2b.js +1 -0
  166. package/dist/chunks/{modalContext-DFjKLCB6.js → modalContext-CUThy6Ph.js} +1 -1
  167. package/dist/chunks/mode-lYTs0XHs.js +2 -0
  168. package/dist/chunks/model-C2e73CJD.js +1 -0
  169. package/dist/chunks/model-CvmS-Esk.js +1 -0
  170. package/dist/chunks/model-DJ8mFfuR.js +1 -0
  171. package/dist/chunks/modelOptions-efCGKnXT.js +1 -0
  172. package/dist/chunks/nativeInstaller-DQIFwdat.js +1 -0
  173. package/dist/chunks/oauth-BN2I0_jl.js +1 -0
  174. package/dist/chunks/oauth-C9VBDB0Y.js +1 -0
  175. package/dist/chunks/observationStore-BpjlK0pG.js +3 -0
  176. package/dist/chunks/omit-CLPZGevl.js +1 -0
  177. package/dist/chunks/onChangeAppState-DhBO34OK.js +1 -0
  178. package/dist/chunks/{openai-EYRnUsco.js → openai-DJLYqiRl.js} +3 -3
  179. package/dist/chunks/{panel-BSZGX6jN.js → panel-q0_iT9cg.js} +1 -1
  180. package/dist/chunks/panelCall-sum-3zvi.js +1 -0
  181. package/dist/chunks/parser-BcdhBGx0.js +1 -0
  182. package/dist/chunks/{parser-DFwaTGf7.js → parser-BdCj2GrE.js} +1 -1
  183. package/dist/chunks/partition-CpfoVrg1.js +1 -0
  184. package/dist/chunks/permissions-DTb9wkAP.js +3 -0
  185. package/dist/chunks/pidLock-BR5M6RQw.js +3 -0
  186. package/dist/chunks/{pipeTransport-CqCnc-Ys.js → pipeTransport-B3TIkTAp.js} +1 -1
  187. package/dist/chunks/plan-BeoIjNPv.js +1 -0
  188. package/dist/chunks/{platform-BrYefG_2.js → platform-D6IMiyqT.js} +1 -1
  189. package/dist/chunks/plugin-D_dHjTud.js +17 -0
  190. package/dist/chunks/pluginAutoupdate-BHKlOOXI.js +1 -0
  191. package/dist/chunks/pluginBlocklist-D93Hd1GF.js +1 -0
  192. package/dist/chunks/pluginCliCommands-vv0wNt4O.js +1 -0
  193. package/dist/chunks/pluginFlagging-CxuRF2Vc.js +1 -0
  194. package/dist/chunks/pluginOperations-BTq4AjYB.js +2 -0
  195. package/dist/chunks/pluginStartupCheck-B6leNWq9.js +1 -0
  196. package/dist/chunks/pluginStartupCheck-DBOCHUHQ.js +1 -0
  197. package/dist/chunks/plugins-pmipe7kE.js +4 -0
  198. package/dist/chunks/pollConfig-BgpfHQPJ.js +1 -0
  199. package/dist/chunks/{poorMode-CBOtooa0.js → poorMode-BxsyllUK.js} +1 -1
  200. package/dist/chunks/poorMode-iV1NwC5L.js +1 -0
  201. package/dist/chunks/print-CAUvczBM.js +23 -0
  202. package/dist/chunks/processBashCommand-CdeQg_c6.js +1 -0
  203. package/dist/chunks/processSlashCommand-CbkshIC6.js +5 -0
  204. package/dist/chunks/{projectContext-D9MDwJUF.js → projectContext-CIxul6vA.js} +1 -1
  205. package/dist/chunks/{projectContext-BaDZBAoK.js → projectContext-RUMJB798.js} +1 -1
  206. package/dist/chunks/prompt-CybUvG8G.js +139 -0
  207. package/dist/chunks/prompt-RBn4JdEg.js +1 -0
  208. package/dist/chunks/prompt-Rb8zXlDo.js +1 -0
  209. package/dist/chunks/promptEditor-0Ug93P2I.js +4 -0
  210. package/dist/chunks/{protocolHandler-JR8pASdH.js → protocolHandler-ClfbHTjI.js} +1 -1
  211. package/dist/chunks/{proxy-CRN7jYIi.js → proxy-Blq4W6Ox.js} +1 -1
  212. package/dist/chunks/rcDebugLog-CARUIORE.js +1 -0
  213. package/dist/chunks/reconciler-Drq3HSkj.js +4 -0
  214. package/dist/chunks/refresh-D8TLHO_T.js +1 -0
  215. package/dist/chunks/registerProtocol-3_ozAuDK.js +36 -0
  216. package/dist/chunks/reload-plugins-Dn1ibOiI.js +1 -0
  217. package/dist/chunks/remoteBridgeCore-Dpg6Se9C.js +1 -0
  218. package/dist/chunks/remoteManagedSettings-CCrq-qL-.js +1 -0
  219. package/dist/chunks/rename-CKsSc7Z3.js +1 -0
  220. package/dist/chunks/{renderOptions-BUJB9nAm.js → renderOptions-CLcco6fc.js} +1 -1
  221. package/dist/chunks/replBridgeHandle-DNC797_T.js +1 -0
  222. package/dist/chunks/resume-B1a5gLVR.js +2 -0
  223. package/dist/chunks/ripgrep-BisRODQ2.js +1 -0
  224. package/dist/chunks/{ripgrep-BXmXjAzA.js → ripgrep-DkL2S7-I.js} +1 -1
  225. package/dist/chunks/{runtimeObserver-CiwnPFjK.js → runtimeObserver-B0xfyLiA.js} +1 -1
  226. package/dist/chunks/runtimeObserver-DonWCJOx.js +10 -0
  227. package/dist/chunks/sandbox-adapter-BnBOSkKJ.js +1 -0
  228. package/dist/chunks/sandbox-toggle-CSdnHWp-.js +1 -0
  229. package/dist/chunks/searchExtraTools-DbgfnQkH.js +1 -0
  230. package/dist/chunks/session-BbQlh2S5.js +2 -0
  231. package/dist/chunks/sessionFileAccessHooks-Xfr1NiXG.js +1 -0
  232. package/dist/chunks/sessionIdCompat-DMayYBrf.js +1 -0
  233. package/dist/chunks/sessionMemory-7UOFdp29.js +1 -0
  234. package/dist/chunks/sessionMemory-fAzgAS7Q.js +1 -0
  235. package/dist/chunks/sessionMemoryUtils-DVjFw5Bd.js +1 -0
  236. package/dist/chunks/sessionObserver-Cl26OdaW.js +1 -0
  237. package/dist/chunks/sessionObserver-XV6N0XER.js +20 -0
  238. package/dist/chunks/sessionState-BvECKycx.js +11 -0
  239. package/dist/chunks/sessionStorage-DSj9yZkl.js +1 -0
  240. package/dist/chunks/{sessionStoragePortable-Cx6JQ5Ye.js → sessionStoragePortable-JZnGwqUM.js} +1 -1
  241. package/dist/chunks/sessionTitle-E1FvsKM9.js +14 -0
  242. package/dist/chunks/sessionTracing-ClGQ08jM.js +11 -0
  243. package/dist/chunks/settings-B-R9ZJNY.js +1 -0
  244. package/dist/chunks/settings-Xbq6AaD-.js +20 -0
  245. package/dist/chunks/settingsSync-NCN0a4sc.js +1 -0
  246. package/dist/chunks/setup-uZ0dSekt.js +3 -0
  247. package/dist/chunks/shadowedRuleDetection-B9iSx6mB.js +1 -0
  248. package/dist/chunks/{shellQuote-DkSy9MYE.js → shellQuote-Bth6IZgX.js} +1 -1
  249. package/dist/chunks/{sideQuestion-hUhxls9r.js → sideQuestion-D2dPToW8.js} +3 -3
  250. package/dist/chunks/sinks-C7q46rvE.js +2 -0
  251. package/dist/chunks/sinks-D3bXeHlQ.js +1 -0
  252. package/dist/chunks/skillChangeDetector-C1EJ7rUL.js +1 -0
  253. package/dist/chunks/skillGapStore-DylpOKJ6.js +5 -0
  254. package/dist/chunks/skillLifecycle-GK-8eyyn.js +8 -0
  255. package/dist/chunks/{skillSearchPanel-Cll9ccA5.js → skillSearchPanel-mpaC62y4.js} +4 -4
  256. package/dist/chunks/skills-t6krW8GZ.js +1 -0
  257. package/dist/chunks/{src-D06Xyj4g.js → src-BN7QRYLl.js} +1 -1
  258. package/dist/chunks/{src-CDCSSo0U2.js → src-P_wYS_NJ2.js} +1 -1
  259. package/dist/chunks/{src-CST_jFnT.js → src-r6ZFgWPx2.js} +1 -1
  260. package/dist/chunks/startupProfiler-BaiXZ9tr.js +1 -0
  261. package/dist/chunks/startupProfiler-jeId9f2i.js +3 -0
  262. package/dist/chunks/state-B4HwLt8i.js +1 -0
  263. package/dist/chunks/{state-Cn_m2NOf.js → state-BAGmpVBn.js} +1 -1
  264. package/dist/chunks/state-Bs5xweDL.js +1 -0
  265. package/dist/chunks/{staticRender-BIxpgNUq.js → staticRender-DrU6eWoq.js} +1 -1
  266. package/dist/chunks/{stats-CqfF4Axp.js → stats-BJBhl-Lc.js} +1 -1
  267. package/dist/chunks/{status-CC9Q-2Yn.js → status-BtsnKNVY.js} +1 -1
  268. package/dist/chunks/status-nZQEar7T.js +2 -0
  269. package/dist/chunks/statusNoticeHelpers-DMqRGFOh.js +1 -0
  270. package/dist/chunks/{stringUtils-DGLPkqJ4.js → stringUtils-CbS6OkmE.js} +1 -1
  271. package/dist/chunks/subprocessEnv-CZkA9Cdp.js +1 -0
  272. package/dist/chunks/{subprocessEnv-vrwzMgKn.js → subprocessEnv-Ci8VV_bi.js} +1 -1
  273. package/dist/chunks/switcher-77h2J5HC.js +1 -0
  274. package/dist/chunks/switcher-B2CYzCC_.js +1 -0
  275. package/dist/chunks/syncCache-By_-buUC.js +1 -0
  276. package/dist/chunks/tasks-BNrdmF9p.js +1 -0
  277. package/dist/chunks/teleport-mdnhIZBj.js +1 -0
  278. package/dist/chunks/{templateJobs-D1BdhZsv.js → templateJobs-Dkv4I9c1.js} +1 -1
  279. package/dist/chunks/{terminalSetup-Cn6jeYw1.js → terminalSetup-DQopnSPR.js} +1 -1
  280. package/dist/chunks/terminalSetup-DTGm1Eo2.js +33 -0
  281. package/dist/chunks/{theme-Cg4GNOoQ.js → theme-BjpBVRf5.js} +1 -1
  282. package/dist/chunks/{tmux-BY7IdQ1f.js → tmux-CMRiI6CD.js} +1 -1
  283. package/dist/chunks/{toolEventObserver-SFwURL5F.js → toolEventObserver-D-sNBvOe.js} +1 -1
  284. package/dist/chunks/toolPool-Di30gn_Y.js +1 -0
  285. package/dist/chunks/trustedDevice-CupLMpO8.js +1 -0
  286. package/dist/chunks/{trustedDevice-CKedohmT.js → trustedDevice-j1u2TG5U.js} +1 -1
  287. package/dist/chunks/{types-Dut4311z.js → types-DWRxAH0E.js} +2 -2
  288. package/dist/chunks/{udsClient-BuCtv7dN.js → udsClient-Cm3HqYUu.js} +1 -1
  289. package/dist/chunks/{updateCCB-C2G-U-qA.js → updateCCB-BlUAU2Vp.js} +8 -8
  290. package/dist/chunks/{upstreamproxy-DyR_eXO8.js → upstreamproxy-DDVMwoRi.js} +1 -1
  291. package/dist/chunks/useExitOnCtrlCDWithKeybindings-D2FvHieH.js +1 -0
  292. package/dist/chunks/useMainLoopModel-ylPQNj7Z.js +1 -0
  293. package/dist/chunks/useManagePlugins-BbWJNLe8.js +1 -0
  294. package/dist/chunks/useMergedTools-B-Z9XQ6U.js +1 -0
  295. package/dist/chunks/useSearchInput-C6d6nt9S.js +1 -0
  296. package/dist/chunks/useSettingsErrors-DKh4rkGi.js +1 -0
  297. package/dist/chunks/userAgent-Ng_TTjWr.js +1 -0
  298. package/dist/chunks/util-D-X8i5Z2.js +1 -0
  299. package/dist/chunks/validatePlugin-DSw08u76.js +1 -0
  300. package/dist/chunks/vim-3mUqsEJm.js +1 -0
  301. package/dist/chunks/{which-CKQnSouy.js → which-DznMOwny.js} +1 -1
  302. package/dist/chunks/windowsPaths-1mgenSWa.js +1 -0
  303. package/dist/chunks/{windowsPaths-DtapVxOo.js → windowsPaths-BVztIhXM.js} +1 -1
  304. package/dist/chunks/{workSecret-CNWiR2uQ.js → workSecret-DtiFreRl.js} +1 -1
  305. package/dist/chunks/workerRegistry-DdOYjLm3.js +6 -0
  306. package/dist/chunks/worktree-BX1ULzrw.js +1 -0
  307. package/dist/cli.js +1 -1
  308. package/package.json +1 -1
  309. package/dist/chunks/AddWorkspaceDirectory-CFrrXnt9.js +0 -1
  310. package/dist/chunks/App-Buad9Llp.js +0 -1
  311. package/dist/chunks/ApproveApiKey-B2HJUD7h.js +0 -1
  312. package/dist/chunks/ApproveApiKey-BQbHdvc3.js +0 -1
  313. package/dist/chunks/AssistantSessionChooser-4lm4eXQ8.js +0 -1
  314. package/dist/chunks/BackgroundTasksDialog-D4qA0M5O.js +0 -2
  315. package/dist/chunks/BypassPermissionsModeDialog-DllL8dxU.js +0 -1
  316. package/dist/chunks/ClaudeMdExternalIncludesDialog--ywODh81.js +0 -1
  317. package/dist/chunks/ClaudeMdExternalIncludesDialog-BZSyRqeq.js +0 -1
  318. package/dist/chunks/ConsoleOAuthFlow-Wkfw7Ts-.js +0 -1
  319. package/dist/chunks/DesktopHandoff-DaP4Riar.js +0 -1
  320. package/dist/chunks/DiffDialog-B7hx8i_Y.js +0 -6
  321. package/dist/chunks/Doctor-89OgoAUA.js +0 -1
  322. package/dist/chunks/Doctor-CuKJ-nGt.js +0 -3
  323. package/dist/chunks/ExitFlow-DnPydE17.js +0 -2
  324. package/dist/chunks/Feedback-SmGiR3mf.js +0 -2
  325. package/dist/chunks/Grove-CjN9DO47.js +0 -11
  326. package/dist/chunks/Grove-Cq88VBmM.js +0 -1
  327. package/dist/chunks/InvalidConfigDialog-DdO0AxyF.js +0 -1
  328. package/dist/chunks/InvalidSettingsDialog-s1G0DwXF.js +0 -1
  329. package/dist/chunks/ListItem-vfLXEPed.js +0 -1
  330. package/dist/chunks/MCPConnectionManager-NRfIjdlj.js +0 -1
  331. package/dist/chunks/McpParsingWarnings-Du5IxZos.js +0 -1
  332. package/dist/chunks/MessageSelector-iIroHvXo.js +0 -3
  333. package/dist/chunks/Messages-D4Hm4gaY.js +0 -11
  334. package/dist/chunks/Onboarding-BiZByBK-.js +0 -1
  335. package/dist/chunks/OverageCreditUpsell-BM7szLgm.js +0 -1
  336. package/dist/chunks/PluginSettings-uY5KTCtK.js +0 -17
  337. package/dist/chunks/PromptInputFooterSuggestions-BmsFdOu9.js +0 -1
  338. package/dist/chunks/PromptInputHelpMenu-DX-0wEDo.js +0 -1
  339. package/dist/chunks/QueryEngine-CGYaShXD.js +0 -1
  340. package/dist/chunks/REPL-CRJB2t2z.js +0 -142
  341. package/dist/chunks/REPL-u4Yq29Du.js +0 -1
  342. package/dist/chunks/RemoteCallout-B-tyvQOe.js +0 -1
  343. package/dist/chunks/RemoteSessionManager-DCd0O5_l.js +0 -2
  344. package/dist/chunks/ResumeConversation-DAAXlOCd.js +0 -1
  345. package/dist/chunks/SearchBox-vfLXEPed.js +0 -1
  346. package/dist/chunks/SearchExtraToolsTool-B-7Bworf.js +0 -1
  347. package/dist/chunks/Settings-CUjWlncb.js +0 -2
  348. package/dist/chunks/TeleportProgress-DxN0bQL2.js +0 -1
  349. package/dist/chunks/TeleportRepoMismatchDialog-A5Ss0kuk.js +0 -1
  350. package/dist/chunks/TeleportResumeWrapper-Bz14mUqR.js +0 -1
  351. package/dist/chunks/ThemePicker-CVSRqTzW.js +0 -1
  352. package/dist/chunks/TrustDialog-CY8an_Tg.js +0 -1
  353. package/dist/chunks/TungstenTool-Cb7gJvq4.js +0 -1
  354. package/dist/chunks/TungstenTool-CxMQVCuF.js +0 -1
  355. package/dist/chunks/add-dir-DfLYgwox.js +0 -1
  356. package/dist/chunks/agents-DJtPfvnL.js +0 -103
  357. package/dist/chunks/allErrors-CQE2k0zO.js +0 -1
  358. package/dist/chunks/analytics-BotDBGh0.js +0 -1
  359. package/dist/chunks/ant-ClQkuQjZ.js +0 -1
  360. package/dist/chunks/api-2cdIPaeq.js +0 -1
  361. package/dist/chunks/api-CG-lhKe-.js +0 -1
  362. package/dist/chunks/asciicast-BsWpcxrc.js +0 -1
  363. package/dist/chunks/asciicast-CbAjUHT_.js +0 -4
  364. package/dist/chunks/assistant-Bje16tQx.js +0 -1
  365. package/dist/chunks/assistant-C83quuNj.js +0 -1
  366. package/dist/chunks/assistant-z2o4-UJe.js +0 -1
  367. package/dist/chunks/auth-DMfEiQrC.js +0 -1
  368. package/dist/chunks/auth-D_cGl8WD.js +0 -1
  369. package/dist/chunks/auth-DqcKPbw8.js +0 -15
  370. package/dist/chunks/autonomy-Oui8yK8G.js +0 -15
  371. package/dist/chunks/backgroundHousekeeping-BpLtI45r.js +0 -1
  372. package/dist/chunks/backgroundHousekeeping-DtJNx4Ja.js +0 -17
  373. package/dist/chunks/bg-B0iMGM9C.js +0 -1
  374. package/dist/chunks/branch-DU5O9KZ0.js +0 -3
  375. package/dist/chunks/bridge-DNNxtPlz.js +0 -2
  376. package/dist/chunks/bridgeConfig-DP9dD1Cv.js +0 -1
  377. package/dist/chunks/bridgeEnabled-Cc0mGlTb.js +0 -1
  378. package/dist/chunks/bridgeEnabled-D8wP3DWQ.js +0 -1
  379. package/dist/chunks/bridgeMain-CwxMa_pd.js +0 -1
  380. package/dist/chunks/bridgeMain-D11t1BYQ.js +0 -68
  381. package/dist/chunks/bridgeMessaging-DdvApEqW.js +0 -1
  382. package/dist/chunks/bridgePointer-DqHMHa2B.js +0 -1
  383. package/dist/chunks/browser-BmZuQom6.js +0 -1
  384. package/dist/chunks/btw-CejSEdNl.js +0 -1
  385. package/dist/chunks/caches-5HVQSevy.js +0 -3
  386. package/dist/chunks/caches-B-nJoHLM.js +0 -1
  387. package/dist/chunks/capacityWake-CV_x9H8j.js +0 -1
  388. package/dist/chunks/ccrClient-BFyfO67b.js +0 -1
  389. package/dist/chunks/client-DKXCfdde.js +0 -1
  390. package/dist/chunks/client-xxikkAoZ.js +0 -1
  391. package/dist/chunks/color-DWhgZH7A.js +0 -1
  392. package/dist/chunks/commands-CxJpmEKF.js +0 -1
  393. package/dist/chunks/commitAttribution-DM6SBMwl.js +0 -1
  394. package/dist/chunks/commitAttribution-DPnHHKSA.js +0 -2
  395. package/dist/chunks/compact-CblM7306.js +0 -2
  396. package/dist/chunks/completionCache-MN3_MqK8.js +0 -4
  397. package/dist/chunks/completionCache-c4aiyZ_f.js +0 -1
  398. package/dist/chunks/config-BLVBFi5v.js +0 -1
  399. package/dist/chunks/config-CMnqm6Se.js +0 -1
  400. package/dist/chunks/config-DRDuVyzE.js +0 -3
  401. package/dist/chunks/context-CdSMMM-0.js +0 -1
  402. package/dist/chunks/context-noninteractive-CPkf2vB9.js +0 -1
  403. package/dist/chunks/context-noninteractive-DNury4JI.js +0 -54
  404. package/dist/chunks/conversation-DCMw_rsE.js +0 -1
  405. package/dist/chunks/conversation-pUtvc-cE.js +0 -1
  406. package/dist/chunks/createSession-8Ei-Lj7V.js +0 -1
  407. package/dist/chunks/createSession-CjqxVh_Q.js +0 -1
  408. package/dist/chunks/cron-3LntnnhJ.js +0 -1
  409. package/dist/chunks/crossProjectResume-Bj_Pe8oe.js +0 -40
  410. package/dist/chunks/cwd--nvsx73T.js +0 -1
  411. package/dist/chunks/cwd-CYmmnQVS.js +0 -1
  412. package/dist/chunks/datadog-DqHxqiwY.js +0 -1
  413. package/dist/chunks/debugUtils-NO5KtXqi.js +0 -1
  414. package/dist/chunks/desktop-Z5FAfunZ.js +0 -1
  415. package/dist/chunks/detectRepository-BTPgN89l.js +0 -1
  416. package/dist/chunks/directoryCompletion-CW2ckkQg.js +0 -1
  417. package/dist/chunks/doctor-BA2ZLDTl.js +0 -1
  418. package/dist/chunks/entry-DE0uMIf0.js +0 -14
  419. package/dist/chunks/envLessBridgeConfig-B-LKYNvv.js +0 -1
  420. package/dist/chunks/envLessBridgeConfig-DyD9XCda.js +0 -1
  421. package/dist/chunks/envUtils-DSxRz_kt.js +0 -1
  422. package/dist/chunks/esm-5w3xFBnt.js +0 -1
  423. package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +0 -1
  424. package/dist/chunks/exit-Dt9kHtJO.js +0 -1
  425. package/dist/chunks/extra-usage-C7E2Z1p1.js +0 -1
  426. package/dist/chunks/extra-usage-D0Kkjp-2.js +0 -1
  427. package/dist/chunks/extra-usage-core-DjdaD1qO.js +0 -1
  428. package/dist/chunks/extra-usage-noninteractive-BnD1RhKK.js +0 -1
  429. package/dist/chunks/extraUsage-CpgRTcMk.js +0 -1
  430. package/dist/chunks/extractMemories-DhUprYa7.js +0 -1
  431. package/dist/chunks/fast-C4ZevUNL.js +0 -1
  432. package/dist/chunks/fast-CChxlAAF.js +0 -1
  433. package/dist/chunks/feedback-BIhBhV6n.js +0 -1
  434. package/dist/chunks/file-DcZWPH2V.js +0 -12
  435. package/dist/chunks/fileStateCache-DDW5toIs.js +0 -1
  436. package/dist/chunks/files-Cz1-PK3r.js +0 -2
  437. package/dist/chunks/firstPartyEventLogger-BXY1IJ2D.js +0 -5
  438. package/dist/chunks/firstPartyEventLogger-CnkGSojw.js +0 -1
  439. package/dist/chunks/flushGate-CgHq81Gw.js +0 -1
  440. package/dist/chunks/gemini-C1J-x1g7.js +0 -1
  441. package/dist/chunks/generateRecap-C0jjCg0Z.js +0 -1
  442. package/dist/chunks/generateSessionName-w0BMtwS7.js +0 -1
  443. package/dist/chunks/git-CbcnOf0E.js +0 -1
  444. package/dist/chunks/git-Do0wJvux.js +0 -6
  445. package/dist/chunks/githubRepoPathMapping-8D0kpsif.js +0 -1
  446. package/dist/chunks/goal-B4GsR54_.js +0 -3
  447. package/dist/chunks/grok-ffNyU3Lt.js +0 -1
  448. package/dist/chunks/grove-BQisE2JM.js +0 -7
  449. package/dist/chunks/heapdump-DiCjAPR3.js +0 -5
  450. package/dist/chunks/help-2hn8VK2-.js +0 -1
  451. package/dist/chunks/hooks-CBmrBO-J.js +0 -1
  452. package/dist/chunks/hostGuard-BHI6Q8Mt.js +0 -1
  453. package/dist/chunks/inboundAttachments-C5K3XPTC.js +0 -1
  454. package/dist/chunks/inboundAttachments-IH-g95jo.js +0 -1
  455. package/dist/chunks/index.min-D75yiGLN.js +0 -1
  456. package/dist/chunks/initReplBridge-C-P4dgAG.js +0 -1
  457. package/dist/chunks/keybindings-D8FXoO89.js +0 -2
  458. package/dist/chunks/language-Baosud0X.js +0 -1
  459. package/dist/chunks/launchAgentsPlatform-D6DmNuDt.js +0 -1
  460. package/dist/chunks/launchCommand-1qkTCKpf.js +0 -1
  461. package/dist/chunks/launchLocalMemory-C0FzUq7x.js +0 -3
  462. package/dist/chunks/launchLocalVault-DkYAre4O.js +0 -3
  463. package/dist/chunks/launchMemoryStores-D2rKWAPs.js +0 -1
  464. package/dist/chunks/launchOnboarding-gOVAFEFp.js +0 -8
  465. package/dist/chunks/launchSchedule-IZdFstT_.js +0 -1
  466. package/dist/chunks/launchSkillStore-B7LamM1d.js +0 -1
  467. package/dist/chunks/launchTeleport-C2BQMfYP.js +0 -3
  468. package/dist/chunks/launchVault-C60WUcCI.js +0 -1
  469. package/dist/chunks/lib-rQZENxQg.js +0 -8
  470. package/dist/chunks/loadAgentsDir-B9c3Emvg.js +0 -1
  471. package/dist/chunks/loadPluginHooks-BhNdAjeY.js +0 -1
  472. package/dist/chunks/localSearch-BLCGsdyM.js +0 -1
  473. package/dist/chunks/log-BMCygSzM.js +0 -1
  474. package/dist/chunks/logoV2Utils-gGK9gErT.js +0 -1
  475. package/dist/chunks/main-OWFSddRx.js +0 -859
  476. package/dist/chunks/managedEnv-BHoeDjpS.js +0 -1
  477. package/dist/chunks/mcp-BSNdwbxR.js +0 -1
  478. package/dist/chunks/mcp-CMnDNI-4.js +0 -6
  479. package/dist/chunks/mcp-D1yA9E56.js +0 -2
  480. package/dist/chunks/memoize-B0zhbT8Z.js +0 -1
  481. package/dist/chunks/memory-D1zbyjxN.js +0 -1
  482. package/dist/chunks/mode-DY087x_x.js +0 -2
  483. package/dist/chunks/model-CZViyZnE.js +0 -1
  484. package/dist/chunks/model-D0EfJBuw.js +0 -1
  485. package/dist/chunks/model-DLLkVV6S.js +0 -1
  486. package/dist/chunks/nativeInstaller-yj81F75v.js +0 -1
  487. package/dist/chunks/oauth-BqJqV-2M.js +0 -1
  488. package/dist/chunks/oauth-C8X_p8Gc.js +0 -1
  489. package/dist/chunks/observationStore-DzCdXq8U.js +0 -4
  490. package/dist/chunks/onChangeAppState-DhGKPG9g.js +0 -1
  491. package/dist/chunks/output-style-BM3qAHLA.js +0 -1
  492. package/dist/chunks/overageCreditGrant-Du3dOYVu.js +0 -1
  493. package/dist/chunks/p-map-B1EeBuI8.js +0 -1
  494. package/dist/chunks/p-map-HKDr3iDo.js +0 -1
  495. package/dist/chunks/panel-Be-OxtqL.js +0 -1
  496. package/dist/chunks/panelCall-dMvRPAGE.js +0 -1
  497. package/dist/chunks/parser-Bf6iasPV.js +0 -1
  498. package/dist/chunks/partition-C4FWzYVm.js +0 -1
  499. package/dist/chunks/passes-Daz-ARWD.js +0 -1
  500. package/dist/chunks/path-D5U-tm91.js +0 -1
  501. package/dist/chunks/permissions-CeYKbtSC.js +0 -1
  502. package/dist/chunks/permissions-Cn_6f8CB.js +0 -1
  503. package/dist/chunks/permissions-DF8tAmDF.js +0 -3
  504. package/dist/chunks/pidLock-CbC_il6r.js +0 -3
  505. package/dist/chunks/plan-rsb_83Fo.js +0 -1
  506. package/dist/chunks/plugin-Cm31-nej.js +0 -1
  507. package/dist/chunks/pluginAutoupdate-0k03PVff.js +0 -1
  508. package/dist/chunks/pluginBlocklist-wPFCUPdm.js +0 -1
  509. package/dist/chunks/pluginCliCommands-DhL9LbH0.js +0 -1
  510. package/dist/chunks/pluginFlagging-CAdaFV_D.js +0 -1
  511. package/dist/chunks/pluginOperations-Cs_Z4C6O.js +0 -2
  512. package/dist/chunks/pluginStartupCheck-BRXGKGjG.js +0 -1
  513. package/dist/chunks/pluginStartupCheck-KeU0efTj.js +0 -1
  514. package/dist/chunks/plugins-CQNKZmjP.js +0 -4
  515. package/dist/chunks/policyLimits-D2s8M8P2.js +0 -1
  516. package/dist/chunks/pollConfig-2nFzv6Hy.js +0 -1
  517. package/dist/chunks/poor-DXumVTR4.js +0 -1
  518. package/dist/chunks/poorMode-yNZL5uYf.js +0 -1
  519. package/dist/chunks/print-uxCF5ka5.js +0 -23
  520. package/dist/chunks/privacy-settings-BncbJCV0.js +0 -1
  521. package/dist/chunks/processBashCommand-CGdwvPmD.js +0 -1
  522. package/dist/chunks/processSlashCommand-DQarepEb.js +0 -5
  523. package/dist/chunks/prompt-BgOdcHkd.js +0 -1
  524. package/dist/chunks/prompt-CE3sFmZV.js +0 -139
  525. package/dist/chunks/prompt-CLJKFebn.js +0 -1
  526. package/dist/chunks/promptEditor-CyTzyjwG.js +0 -4
  527. package/dist/chunks/rate-limit-options-C-EqWjeI.js +0 -1
  528. package/dist/chunks/rcDebugLog-DBB9r8aw.js +0 -11
  529. package/dist/chunks/reconciler-CYD_XpG4.js +0 -4
  530. package/dist/chunks/referral-CKmHHxj_.js +0 -1
  531. package/dist/chunks/refresh-ZqZdmLK5.js +0 -1
  532. package/dist/chunks/registerProtocol-wZv2uiW_.js +0 -36
  533. package/dist/chunks/release-notes-B5K7wVqZ.js +0 -4
  534. package/dist/chunks/releaseNotes-B8gbyFFJ.js +0 -2
  535. package/dist/chunks/reload-plugins-B9ApSp2m.js +0 -1
  536. package/dist/chunks/remote-env-CAt1dHIS.js +0 -1
  537. package/dist/chunks/remoteBridgeCore-Bk3UdSLJ.js +0 -1
  538. package/dist/chunks/remoteManagedSettings-bswzAB6W.js +0 -1
  539. package/dist/chunks/rename-CE_U6KE6.js +0 -1
  540. package/dist/chunks/resume-BicEjsPd.js +0 -2
  541. package/dist/chunks/ripgrep-BfIpz5uC.js +0 -1
  542. package/dist/chunks/rollback-BPWRKlIZ.js +0 -11
  543. package/dist/chunks/runtimeObserver-BrGF5QWX.js +0 -10
  544. package/dist/chunks/sandbox-adapter-BtMiHImm.js +0 -1
  545. package/dist/chunks/sandbox-toggle-D8eebdyI.js +0 -1
  546. package/dist/chunks/sanitization-DV-94a9Z.js +0 -1
  547. package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +0 -1
  548. package/dist/chunks/searchExtraTools-hLLPuh7c.js +0 -1
  549. package/dist/chunks/semver-BMRJYn3q.js +0 -1
  550. package/dist/chunks/session-BZIlR9Gc.js +0 -2
  551. package/dist/chunks/sessionDataUploader-CaCjwsA2.js +0 -1
  552. package/dist/chunks/sessionDiscovery-DfDqTrF1.js +0 -1
  553. package/dist/chunks/sessionFileAccessHooks-Bm8wiqwe.js +0 -1
  554. package/dist/chunks/sessionMemory-D37S0-jX.js +0 -1
  555. package/dist/chunks/sessionMemory-DmlAG3jq.js +0 -1
  556. package/dist/chunks/sessionMemoryUtils-6EWDHSGU.js +0 -1
  557. package/dist/chunks/sessionObserver-BUw2rzKl.js +0 -1
  558. package/dist/chunks/sessionObserver-KgquhGWw.js +0 -20
  559. package/dist/chunks/sessionStorage-CucBSK5Q.js +0 -1
  560. package/dist/chunks/sessionTitle-DAnM73S0.js +0 -14
  561. package/dist/chunks/sessionTracing-_Hh5VXxt.js +0 -11
  562. package/dist/chunks/settings-BeLFUeie.js +0 -19
  563. package/dist/chunks/settings-Cl16Haug.js +0 -1
  564. package/dist/chunks/settingsSync-BNvFYH3c.js +0 -1
  565. package/dist/chunks/setup-D8kXv3ts.js +0 -3
  566. package/dist/chunks/shadowedRuleDetection-C6R5zOUe.js +0 -1
  567. package/dist/chunks/sinks-BuE17DeZ.js +0 -2
  568. package/dist/chunks/sinks-FevoYQqP.js +0 -1
  569. package/dist/chunks/skill-learning-CMdxGtxr.js +0 -5
  570. package/dist/chunks/skillChangeDetector-C65ZLSYV.js +0 -1
  571. package/dist/chunks/skillGapStore-D18LRJAM.js +0 -5
  572. package/dist/chunks/skillGapStore-Ep62R-2_.js +0 -1
  573. package/dist/chunks/skillGenerator-Bc7WwNT8.js +0 -8
  574. package/dist/chunks/skillLearning-Cs9fJgkV.js +0 -1
  575. package/dist/chunks/skillLearning-duPZl69A.js +0 -1
  576. package/dist/chunks/skillPanel-Cyzby746.js +0 -28
  577. package/dist/chunks/skills-BPPeYBy7.js +0 -1
  578. package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +0 -1
  579. package/dist/chunks/startupProfiler-DIWVcO4e.js +0 -1
  580. package/dist/chunks/startupProfiler-xa3NmN7Z.js +0 -3
  581. package/dist/chunks/state-BOa-3Av3.js +0 -1
  582. package/dist/chunks/state-ix0xIunV.js +0 -1
  583. package/dist/chunks/status-D4IQpsNK.js +0 -2
  584. package/dist/chunks/statusNoticeHelpers-CEGvdm5d.js +0 -1
  585. package/dist/chunks/stickers-D5teCKMN.js +0 -1
  586. package/dist/chunks/subprocessEnv-BSQSomcK.js +0 -1
  587. package/dist/chunks/syncCache-CANQZ9mQ.js +0 -1
  588. package/dist/chunks/systemPromptSections-CR_AoPIX.js +0 -1
  589. package/dist/chunks/systemPromptSections-DN0HGVye.js +0 -1
  590. package/dist/chunks/tag-DDbNqBMu.js +0 -11
  591. package/dist/chunks/tasks-CZvWJYGr.js +0 -1
  592. package/dist/chunks/teleport-Dk5j03Ix.js +0 -1
  593. package/dist/chunks/terminalSetup-3JNy6i_J.js +0 -33
  594. package/dist/chunks/thinkback-p-vKIRW_.js +0 -1
  595. package/dist/chunks/thinkback-play-DnPTDE8B.js +0 -1
  596. package/dist/chunks/thinkback-rFA1do6F.js +0 -1
  597. package/dist/chunks/toolEventObserver-CzsCuUMc.js +0 -1
  598. package/dist/chunks/toolPool-BR27AMJO.js +0 -1
  599. package/dist/chunks/trustedDevice-BYt39fui.js +0 -1
  600. package/dist/chunks/tui-C2yuCuOU.js +0 -6
  601. package/dist/chunks/types-Bh9S_JG5.js +0 -3
  602. package/dist/chunks/types-DHkZVzJe.js +0 -1
  603. package/dist/chunks/ultrareviewCommand-C_4OSBTW.js +0 -3
  604. package/dist/chunks/undercover-D30rKimg.js +0 -31
  605. package/dist/chunks/undercover-DRSwLozU.js +0 -1
  606. package/dist/chunks/up-BHkC97_C.js +0 -12
  607. package/dist/chunks/upgrade-Bi-bIz7R.js +0 -1
  608. package/dist/chunks/upgrade-Chs-OQFd.js +0 -1
  609. package/dist/chunks/upload-D8FWMSQx.js +0 -1
  610. package/dist/chunks/usage-BxVeUt60.js +0 -1
  611. package/dist/chunks/usage-DUO7Yy1f.js +0 -1
  612. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js +0 -1
  613. package/dist/chunks/useMainLoopModel-Gy1Vv4Qr.js +0 -1
  614. package/dist/chunks/useManagePlugins-B11_87VN.js +0 -1
  615. package/dist/chunks/useMergedTools-CR56my9t.js +0 -1
  616. package/dist/chunks/useSearchInput-C5OzQnX6.js +0 -1
  617. package/dist/chunks/useSettingsErrors-B9vOZL41.js +0 -1
  618. package/dist/chunks/util-8EHwfg4A.js +0 -1
  619. package/dist/chunks/validatePlugin-6q1qmnAC.js +0 -1
  620. package/dist/chunks/vim-CNDzwoTd.js +0 -1
  621. package/dist/chunks/windowsPaths-9pEkw0oV.js +0 -1
  622. package/dist/chunks/workerRegistry-CvyHvwx-.js +0 -1
  623. package/dist/chunks/worktree-ogmNCIpz.js +0 -1
@@ -1,54 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Co as t,LE as n,Mo as r,Qc as i,RE as a,Xc as o}from"./loadAgentsDir-x3rlgED4.js";import{fn as s,pn as c}from"./settings-BeLFUeie.js";import{b as l,y as u}from"./startupProfiler-xa3NmN7Z.js";async function d(e){let{messages:n,getAppState:r,options:{mainLoopModel:i,tools:s,agentDefinitions:c,customSystemPrompt:l,appendSystemPrompt:u}}=e,d=t(n),{messages:f}=await a(d),p=r();return o(f,i,async()=>p.toolPermissionContext,s,c,void 0,{options:{customSystemPrompt:l,appendSystemPrompt:u}},void 0,d)}async function f(e,t){return{type:`text`,value:p(await d(t))}}function p(e){let{categories:t,totalTokens:n,rawMaxTokens:r,percentage:i,model:a,memoryFiles:o,mcpTools:c,agents:l,skills:d,messageBreakdown:f,systemTools:p,systemPromptSections:m}=e,h=`## Context Usage
2
-
3
- `;h+=`**Model:** ${a} \n`,h+=`**Tokens:** ${u(n)} / ${u(r)} (${i}%)\n`,h+=`
4
- `;let g=t.filter(e=>e.tokens>0&&e.name!==`Free space`&&e.name!==`Autocompact buffer`);if(g.length>0){h+=`### Estimated usage by category
5
-
6
- `,h+=`| Category | Tokens | Percentage |
7
- `,h+=`|----------|--------|------------|
8
- `;for(let e of g){let t=(e.tokens/r*100).toFixed(1);h+=`| ${e.name} | ${u(e.tokens)} | ${t}% |\n`}let e=t.find(e=>e.name===`Free space`);if(e&&e.tokens>0){let t=(e.tokens/r*100).toFixed(1);h+=`| Free space | ${u(e.tokens)} | ${t}% |\n`}let n=t.find(e=>e.name===`Autocompact buffer`);if(n&&n.tokens>0){let e=(n.tokens/r*100).toFixed(1);h+=`| Autocompact buffer | ${u(n.tokens)} | ${e}% |\n`}h+=`
9
- `}if(c.length>0){h+=`### MCP Tools
10
-
11
- `,h+=`| Tool | Server | Tokens |
12
- `,h+=`|------|--------|--------|
13
- `;for(let e of c)h+=`| ${e.name} | ${e.serverName} | ${u(e.tokens)} |\n`;h+=`
14
- `}if(p&&p.length>0&&process.env.USER_TYPE===`ant`){h+=`### [ANT-ONLY] System Tools
15
-
16
- `,h+=`| Tool | Tokens |
17
- `,h+=`|------|--------|
18
- `;for(let e of p)h+=`| ${e.name} | ${u(e.tokens)} |\n`;h+=`
19
- `}if(m&&m.length>0&&process.env.USER_TYPE===`ant`){h+=`### [ANT-ONLY] System Prompt Sections
20
-
21
- `,h+=`| Section | Tokens |
22
- `,h+=`|---------|--------|
23
- `;for(let e of m)h+=`| ${e.name} | ${u(e.tokens)} |\n`;h+=`
24
- `}if(l.length>0){h+=`### Custom Agents
25
-
26
- `,h+=`| Agent Type | Source | Tokens |
27
- `,h+=`|------------|--------|--------|
28
- `;for(let e of l){let t;switch(e.source){case`projectSettings`:t=`Project`;break;case`userSettings`:t=`User`;break;case`localSettings`:t=`Local`;break;case`flagSettings`:t=`Flag`;break;case`policySettings`:t=`Policy`;break;case`plugin`:t=`Plugin`;break;case`built-in`:t=`Built-in`;break;default:t=String(e.source)}h+=`| ${e.agentType} | ${t} | ${u(e.tokens)} |\n`}h+=`
29
- `}if(o.length>0){h+=`### Memory Files
30
-
31
- `,h+=`| Type | Path | Tokens |
32
- `,h+=`|------|------|--------|
33
- `;for(let e of o)h+=`| ${e.type} | ${e.path} | ${u(e.tokens)} |\n`;h+=`
34
- `}if(d&&d.tokens>0&&d.skillFrontmatter.length>0){h+=`### Skills
35
-
36
- `,h+=`| Skill | Source | Tokens |
37
- `,h+=`|-------|--------|--------|
38
- `;for(let e of d.skillFrontmatter)h+=`| ${e.name} | ${s(e.source)} | ${u(e.tokens)} |\n`;h+=`
39
- `}if(f&&process.env.USER_TYPE===`ant`){if(h+=`### [ANT-ONLY] Message Breakdown
40
-
41
- `,h+=`| Category | Tokens |
42
- `,h+=`|----------|--------|
43
- `,h+=`| Tool calls | ${u(f.toolCallTokens)} |\n`,h+=`| Tool results | ${u(f.toolResultTokens)} |\n`,h+=`| Attachments | ${u(f.attachmentTokens)} |\n`,h+=`| Assistant messages (non-tool) | ${u(f.assistantMessageTokens)} |\n`,h+=`| User messages (non-tool-result) | ${u(f.userMessageTokens)} |\n`,h+=`
44
- `,f.toolCallsByType.length>0){h+=`#### Top Tools
45
-
46
- `,h+=`| Tool | Call Tokens | Result Tokens |
47
- `,h+=`|------|-------------|---------------|
48
- `;for(let e of f.toolCallsByType)h+=`| ${e.name} | ${u(e.callTokens)} | ${u(e.resultTokens)} |\n`;h+=`
49
- `}if(f.attachmentsByType.length>0){h+=`#### Top Attachments
50
-
51
- `,h+=`| Attachment | Tokens |
52
- `,h+=`|------------|--------|
53
- `;for(let e of f.attachmentsByType)h+=`| ${e.name} | ${u(e.tokens)} |\n`;h+=`
54
- `}}return h}var m=e((()=>{n(),i(),l(),r(),c()}));export{d as n,m as r,f as t};
@@ -1 +0,0 @@
1
- import{a as e,n as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Fn as n,In as r,Rn as i,cn as a,en as o,ht as s,nt as c,q as l,un as u}from"./state-ix0xIunV.js";import{AC as d,Ci as ee,Ct as f,Cu as p,Ei as m,Et as h,Gh as g,Kh as _,Lp as v,Ly as y,Mn as b,Nl as x,OC as te,Rp as S,Ry as C,Xy as w,Zt as T,dn as E,dr as D,fi as O,jn as k,jr as A,kl as j,kn as M,nr as N,rb as P,wu as F,yn as I}from"./loadAgentsDir-x3rlgED4.js";import{o as L,s as ne}from"./log-BMCygSzM.js";import{n as R,r as z}from"./analytics-BotDBGh0.js";import{C as B,y as V}from"./rcDebugLog-DBB9r8aw.js";import{l as H,r as U}from"./commitAttribution-DPnHHKSA.js";import{c as W,d as G}from"./debugUtils-NO5KtXqi.js";import{n as K,t as q}from"./caches-5HVQSevy.js";import{randomUUID as J}from"crypto";function Y(e){Q=e,x(Z()??null).catch(()=>{})}function X(){return Q}function Z(){let e=X();return e?G(e.bridgeSessionId):void 0}var Q,$=t((()=>{j(),W(),Q=null}));function re(){let e=X();if(!e)return;e.markTranscriptReset?.();let t={type:`status`,subtype:`status`,status:`conversation_cleared`,message:`conversation_cleared`,uuid:J()};e.writeSdkMessages([t])}async function ie({setMessages:t,readFileState:o,discoveredSkillNames:d,loadedNestedMemoryPaths:p,getAppState:h,setAppState:g,setConversationId:v}){let y=E();await T(`clear`,{getAppState:h,setAppState:g,signal:AbortSignal.timeout(y),timeoutMs:y});let b=l();b&&z(`tengu_cache_eviction_hint`,{scope:`conversation_clear`,last_request_id:b});let x=new Set,j=[],P=e=>`isBackgrounded`in e&&e.isBackgrounded===!1;if(h)for(let e of Object.values(h().tasks))P(e)||F(e)&&(x.add(e.agentId),j.push(e));t(()=>[]),re();{let{setContextBlocked:t}=(V(),e(B));t(!1)}v&&v(J()),q(x),n(null),r(null),i(null),u(),S(c()),o.clear(),d?.clear(),p?.clear(),g&&g(e=>{let t={};for(let[n,r]of Object.entries(e.tasks)){if(!P(r)){t[n]=r;continue}try{r.status===`running`&&(_(r)&&(r.shellCommand?.kill(),r.shellCommand?.cleanup(),r.cleanupTimeoutId&&clearTimeout(r.cleanupTimeoutId)),`abortController`in r&&r.abortController?.abort(),`unregisterCleanup`in r&&r.unregisterCleanup?.())}catch(e){ne(e)}M(n)}return{...e,tasks:t,attribution:U(),standaloneAgentContext:void 0,fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:e.mcp.pluginReconnectKey}}}),w(),N(),a({setCurrentAsParent:!0}),process.env.USER_TYPE===`ant`&&process.env.CLAUDE_CODE_SESSION_ID&&(process.env.CLAUDE_CODE_SESSION_ID=s()),await O();for(let e of j)e.status===`running`&&k(e.id,D(te(e.agentId)));let{saveMode:I}=(A(),e(m));I(`normal`);let L=f();L&&ee(L);let R=await C(`clear`);R.length>0&&t(()=>R)}var ae=t((()=>{$(),o(),R(),p(),g(),d(),H(),I(),L(),P(),v(),y(),A(),b(),h(),K()}));export{Y as i,ae as n,$ as r,ie as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./conversation-DCMw_rsE.js";e();export{t as clearConversation};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{F as t,a as n,l as r,z as i}from"./debug-BrXObCdR.js";import{c as a,d as o,i as s,o as c}from"./debugUtils-NO5KtXqi.js";async function l({environmentId:e,title:n,events:i,gitRepoUrl:a,branch:o,signal:c,baseUrl:l,getAccessToken:u,permissionMode:d}){let{getClaudeAIOAuthTokens:f}=await import(`./auth-D_cGl8WD.js`),{getOrganizationUUID:p}=await import(`./client-DKXCfdde.js`),{getOauthConfig:m}=await import(`./oauth-C8X_p8Gc.js`),{getOAuthHeaders:h}=await import(`./api-CG-lhKe-.js`),{parseGitHubRepository:g}=await import(`./detectRepository-BTPgN89l.js`),{getDefaultBranch:_}=await import(`./git-CbcnOf0E.js`),{getMainLoopModel:v}=await import(`./model-DLLkVV6S.js`),{default:y}=await import(`./axios-BHBm_hhU.js`),{isSelfHostedBridge:b}=await import(`./bridgeConfig-DP9dD1Cv.js`),x=u?.()??f()?.accessToken;if(!x)return r(`[bridge] No access token for session creation`),null;let S=b()?`self-hosted`:await p();if(!S)return r(`[bridge] No org UUID for session creation`),null;let C=null,w=null;if(a){let{parseGitRemote:e}=await import(`./detectRepository-BTPgN89l.js`),t=e(a);if(t){let{host:e,owner:n,name:r}=t,i=o||await _()||void 0;C={type:`git_repository`,url:`https://${e}/${n}/${r}`,revision:i},w={type:`git_repository`,git_info:{type:`github`,repo:`${n}/${r}`,branches:[`claude/${o||`task`}`]}}}else{let e=g(a);if(e){let[t,n]=e.split(`/`);if(t&&n){let e=o||await _()||void 0;C={type:`git_repository`,url:`https://github.com/${t}/${n}`,revision:e},w={type:`git_repository`,git_info:{type:`github`,repo:`${t}/${n}`,branches:[`claude/${o||`task`}`]}}}}}}let T={...n!==void 0&&{title:n},events:i,session_context:{sources:C?[C]:[],outcomes:w?[w]:[],model:v()},environment_id:e,source:`remote-control`,...d&&{permission_mode:d}},E={...h(x),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":S},D=`${l??m().BASE_API_URL}/v1/sessions`,O;try{O=await y.post(D,T,{headers:E,signal:c,validateStatus:e=>e<500})}catch(e){return r(`[bridge] Session creation request failed: ${t(e)}`),null}if(!(O.status===200||O.status===201)){let e=s(O.data);return r(`[bridge] Session creation failed with status ${O.status}${e?`: ${e}`:``}`),null}let k=O.data;return!k||typeof k!=`object`||!(`id`in k)||typeof k.id!=`string`?(r(`[bridge] No session ID in response`),null):k.id}async function u(e,n){let{getClaudeAIOAuthTokens:i}=await import(`./auth-D_cGl8WD.js`),{getOrganizationUUID:a}=await import(`./client-DKXCfdde.js`),{getOauthConfig:o}=await import(`./oauth-C8X_p8Gc.js`),{getOAuthHeaders:c}=await import(`./api-CG-lhKe-.js`),{default:l}=await import(`./axios-BHBm_hhU.js`),{isSelfHostedBridge:u}=await import(`./bridgeConfig-DP9dD1Cv.js`),d=n?.getAccessToken?.()??i()?.accessToken;if(!d)return r(`[bridge] No access token for session fetch`),null;let f=u()?`self-hosted`:await a();if(!f)return r(`[bridge] No org UUID for session fetch`),null;let p={...c(d),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":f},m=`${n?.baseUrl??o().BASE_API_URL}/v1/sessions/${e}`;r(`[bridge] Fetching session ${e}`);let h;try{h=await l.get(m,{headers:p,timeout:1e4,validateStatus:e=>e<500})}catch(e){return r(`[bridge] Session fetch request failed: ${t(e)}`),null}if(h.status!==200){let e=s(h.data);return r(`[bridge] Session fetch failed with status ${h.status}${e?`: ${e}`:``}`),null}return h.data}async function d(e,t){let{getClaudeAIOAuthTokens:n}=await import(`./auth-D_cGl8WD.js`),{getOrganizationUUID:i}=await import(`./client-DKXCfdde.js`),{getOauthConfig:a}=await import(`./oauth-C8X_p8Gc.js`),{getOAuthHeaders:o}=await import(`./api-CG-lhKe-.js`),{default:c}=await import(`./axios-BHBm_hhU.js`),{isSelfHostedBridge:l}=await import(`./bridgeConfig-DP9dD1Cv.js`),u=t?.getAccessToken?.()??n()?.accessToken;if(!u){r(`[bridge] No access token for session archive`);return}let d=l()?`self-hosted`:await i();if(!d){r(`[bridge] No org UUID for session archive`);return}let f={...o(u),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":d},p=`${t?.baseUrl??a().BASE_API_URL}/v1/sessions/${e}/archive`;r(`[bridge] Archiving session ${e}`);let m=await c.post(p,{},{headers:f,timeout:t?.timeoutMs??1e4,validateStatus:e=>e<500});if(m.status===200)r(`[bridge] Session ${e} archived successfully`);else{let e=s(m.data);r(`[bridge] Session archive failed with status ${m.status}${e?`: ${e}`:``}`)}}async function f(e,n,i){let{getClaudeAIOAuthTokens:a}=await import(`./auth-D_cGl8WD.js`),{getOrganizationUUID:c}=await import(`./client-DKXCfdde.js`),{getOauthConfig:l}=await import(`./oauth-C8X_p8Gc.js`),{getOAuthHeaders:u}=await import(`./api-CG-lhKe-.js`),{default:d}=await import(`./axios-BHBm_hhU.js`),{isSelfHostedBridge:f}=await import(`./bridgeConfig-DP9dD1Cv.js`),p=i?.getAccessToken?.()??a()?.accessToken;if(!p){r(`[bridge] No access token for session title update`);return}let m=f()?`self-hosted`:await c();if(!m){r(`[bridge] No org UUID for session title update`);return}let h={...u(p),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":m},g=o(e),_=`${i?.baseUrl??l().BASE_API_URL}/v1/sessions/${g}`;r(`[bridge] Updating session title: ${g} → ${n}`);try{let e=await d.patch(_,{title:n},{headers:h,timeout:1e4,validateStatus:e=>e<500});if(e.status===200)r(`[bridge] Session title updated successfully`);else{let t=s(e.data);r(`[bridge] Session title update failed with status ${e.status}${t?`: ${t}`:``}`)}}catch(e){r(`[bridge] Session title update request failed: ${t(e)}`)}}var p=e((()=>{n(),i(),c(),a()}));export{f as a,p as i,l as n,u as r,d as t};
@@ -1 +0,0 @@
1
- import{a as e,i as t,n,r}from"./createSession-8Ei-Lj7V.js";t();export{n as createBridgeSession,r as getBridgeSession,e as updateBridgeSessionTitle};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";function t(e,t){let{min:n,max:r}=t,i=new Set;for(let t of e.split(`,`)){let e=t.match(/^\*(?:\/(\d+))?$/);if(e){let t=e[1]?parseInt(e[1],10):1;if(t<1)return null;for(let e=n;e<=r;e+=t)i.add(e);continue}let a=t.match(/^(\d+)-(\d+)(?:\/(\d+))?$/);if(a){let e=parseInt(a[1],10),t=parseInt(a[2],10),o=a[3]?parseInt(a[3],10):1,s=n===0&&r===6;if(e>t||o<1||e<n||t>(s?7:r))return null;for(let n=e;n<=t;n+=o)i.add(s&&n===7?0:n);continue}if(t.match(/^\d+$/)){let e=parseInt(t,10);if(n===0&&r===6&&e===7&&(e=0),e<n||e>r)return null;i.add(e);continue}return null}return i.size===0?null:Array.from(i).sort((e,t)=>e-t)}function n(e){if(typeof e!=`string`)return null;let n=e.trim().split(/\s+/);if(n.length!==5)return null;let r=[];for(let e=0;e<5;e++){let i=t(n[e],o[e]);if(!i)return null;r.push(i)}return{minute:r[0],hour:r[1],dayOfMonth:r[2],month:r[3],dayOfWeek:r[4]}}function r(e,t){return new Date(2e3,0,1,t,e).toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`})}function i(e,t){let n=new Date;return n.setUTCHours(t,e,0,0),n.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,timeZoneName:`short`})}function a(e,t){let n=t?.utc??!1,a=e.trim().split(/\s+/);if(a.length!==5)return e;let[o,c,l,u,d]=a,f=o.match(/^\*\/(\d+)$/);if(f&&c===`*`&&l===`*`&&u===`*`&&d===`*`){let e=parseInt(f[1],10);return e===1?`Every minute`:`Every ${e} minutes`}if(o.match(/^\d+$/)&&c===`*`&&l===`*`&&u===`*`&&d===`*`){let e=parseInt(o,10);return e===0?`Every hour`:`Every hour at :${e.toString().padStart(2,`0`)}`}let p=c.match(/^\*\/(\d+)$/);if(o.match(/^\d+$/)&&p&&l===`*`&&u===`*`&&d===`*`){let e=parseInt(p[1],10),t=parseInt(o,10),n=t===0?``:` at :${t.toString().padStart(2,`0`)}`;return e===1?`Every hour${n}`:`Every ${e} hours${n}`}if(!o.match(/^\d+$/)||!c.match(/^\d+$/))return e;let m=parseInt(o,10),h=parseInt(c,10),g=n?i:r;if(l===`*`&&u===`*`&&d===`*`)return`Every day at ${g(m,h)}`;if(l===`*`&&u===`*`&&d.match(/^\d$/)){let e=parseInt(d,10)%7,t;if(n){let n=new Date,r=(e-n.getUTCDay()+7)%7;n.setUTCDate(n.getUTCDate()+r),n.setUTCHours(h,m,0,0),t=s[n.getDay()]}else t=s[e];if(t)return`Every ${t} at ${g(m,h)}`}return l===`*`&&u===`*`&&d===`1-5`?`Weekdays at ${g(m,h)}`:e}var o,s,c=e((()=>{o=[{min:0,max:59},{min:0,max:23},{min:1,max:31},{min:1,max:12},{min:0,max:6}],s=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]}));export{c as n,n as r,a as t};
@@ -1,40 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{C as i,D as a,Gr as o,H as s,I as c,P as l,T as u,Wt as d,Xn as f,ai as p,di as m,fi as h,hn as ee,k as te,ot as ne,p as g,t as _,ui as v}from"./src-CDCSSo0U2.js";import{t as y}from"./jsx-runtime-Bb4Xn-E0.js";import{en as b,ht as re,nt as ie}from"./state-ix0xIunV.js";import{Cr as x,Dh as ae,Eb as S,Ex as oe,Fi as se,Fr as C,Ib as ce,Lb as w,Nr as le,Oh as ue,Pi as de,Tx as fe,Uu as pe,Vu as me,Wr as he,XS as T,ax as ge,fx as E,hr as _e,ix as ve,jr as D,px as ye,vi as be,wb as xe}from"./loadAgentsDir-x3rlgED4.js";import{C as Se,S as Ce,a as we,l as O}from"./debug-BrXObCdR.js";import{vn as Te,yn as Ee}from"./settings-BeLFUeie.js";import{_ as k,i as De}from"./git-Do0wJvux.js";import{a as A,o as Oe,s as ke}from"./log-BMCygSzM.js";import{n as Ae,r as j}from"./analytics-BotDBGh0.js";import{T as je,b as M,f as Me,h as Ne}from"./startupProfiler-xa3NmN7Z.js";import{_ as Pe,h as Fe}from"./model-CZViyZnE.js";import{i as N,r as P}from"./shellQuote-DkSy9MYE.js";import{u as Ie}from"./referral-CKmHHxj_.js";import{n as Le,t as Re}from"./useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js";import{t as ze}from"./SearchBox-vfLXEPed.js";import{n as Be,t as Ve}from"./useSearchInput-C5OzQnX6.js";import{d as He,n as F,t as Ue,u as We}from"./Messages-D4Hm4gaY.js";import{sep as I}from"path";function Ge({log:e,onExit:t,onSelect:n}){let[r,i]=L.useState(null);L.useEffect(()=>{i(null),C(e)&&he(e).then(i)},[e]);let o=C(e)&&r===null,s=r??e,f=x(s)||``,p=me();return d(`confirm:no`,t,{context:`Confirmation`}),d(`confirm:yes`,(0,L.useCallback)(()=>{n(r??e)},[n,r,e]),{context:`Confirmation`}),o?(0,R.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,R.jsx)(g,{message:`Loading session…`}),(0,R.jsx)(l,{dimColor:!0,children:(0,R.jsx)(u,{children:(0,R.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})})})]}):(0,R.jsxs)(c,{flexDirection:`column`,children:[(0,R.jsx)(Ue,{messages:s.messages,tools:p,commands:[],verbose:!0,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:f,screen:`transcript`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1}),(0,R.jsxs)(c,{flexShrink:0,flexDirection:`column`,borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:`single`,paddingLeft:2,children:[(0,R.jsxs)(l,{children:[Ne(s.modified),` · `,s.messageCount,` messages`,s.gitBranch?` · ${s.gitBranch}`:``]}),(0,R.jsx)(l,{dimColor:!0,children:(0,R.jsxs)(u,{children:[(0,R.jsx)(a,{shortcut:`Enter`,action:`resume`}),(0,R.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})]})}var L,R,z=e((()=>{L=t(h(),1),_(),Ie(),pe(),M(),D(),ye(),F(),R=y()}));function Ke(e,t){if(e===V)return 5;let n=o(e),r=t?Math.min(n,t-H-U):n;return Math.max(0,r)+H+U}function qe(e,t){let n=t-H-U;return o(e)<=n?e:n<=1?e.charAt(0):je(e,n)}function Je({tabs:e,selectedIndex:t,availableWidth:n,showAllProjects:r=!1}){let i=r?`Resume (All Projects)`:`Resume`,a=i.length+1,o=Math.max(et,W),s=n-a-o-2,u=Math.max(0,Math.min(t,e.length-1)),d=Math.max(20,Math.floor(s/2)),f=e.map(e=>Ke(e,d)),p=0,m=e.length;if(f.reduce((e,t,n)=>e+t+ +(n<f.length-1),0)>s){let t=s-$e,n=f[u]??0;for(p=u,m=u+1;p>0||m<e.length;){let r=p>0,i=m<e.length;if(r){let e=(f[p-1]??0)+1;if(n+e<=t){p--,n+=e;continue}}if(i){let e=(f[m]??0)+1;if(n+e<=t){m++,n+=e;continue}}break}}let h=p,ee=e.length-m,te=e.slice(p,m),ne=te.map((e,t)=>p+t);return(0,B.jsxs)(c,{flexDirection:`row`,gap:1,children:[(0,B.jsx)(l,{color:`suggestion`,children:i}),h>0&&(0,B.jsxs)(l,{dimColor:!0,children:[Ye,h]}),te.map((e,t)=>{let n=ne[t]===u,r=e===V?e:`#${qe(e,d-H)}`;return(0,B.jsxs)(l,{backgroundColor:n?`suggestion`:void 0,color:n?`inverseText`:void 0,bold:n,children:[` `,r,` `]},e)}),ee>0?(0,B.jsxs)(l,{dimColor:!0,children:[Xe,ee,Ze]}):(0,B.jsx)(l,{dimColor:!0,children:Qe})]})}var B,V,H,U,Ye,Xe,Ze,Qe,$e,et,W,G=e((()=>{h(),_(),M(),B=y(),V=`All`,H=2,U=1,Ye=`← `,Xe=`→`,Ze=` (tab to cycle)`,Qe=`(tab to cycle)`,$e=5,et=18,W=14}));function tt({nodes:e,onSelect:t,onCancel:n,onFocus:r,focusNodeId:i,visibleOptionCount:a,layout:o=`expanded`,isDisabled:s=!1,hideIndexes:l=!1,isNodeExpanded:u,onExpand:d,onCollapse:f,getParentPrefix:p,getChildPrefix:m,onUpFromFirstItem:h}){let[ee,te]=K.useState(new Set),ne=K.useRef(!1),g=K.useRef(null),_=K.useCallback(e=>u?u(e):ee.has(e),[u,ee]),v=K.useMemo(()=>{let t=[];function n(e,r,i){let a=!!e.children&&e.children.length>0,o=_(e.id);if(t.push({node:e,depth:r,isExpanded:o,hasChildren:a,parentId:i}),a&&o&&e.children)for(let t of e.children)n(t,r+1,e.id)}for(let t of e)n(t,0);return t},[e,_]),y=K.useCallback(e=>e?`▼ `:`▶ `,[]),b=K.useCallback(e=>` ▸ `,[]),re=p??y,ie=m??b,x=K.useCallback(e=>{let t=``;return e.hasChildren?t=re(e.isExpanded):e.depth>0&&(t=ie(e.depth)),t+e.node.label},[re,ie]),ae=K.useMemo(()=>v.map(e=>({label:x(e),description:e.node.description,dimDescription:e.node.dimDescription??!0,value:e.node.id})),[v,x]),S=K.useMemo(()=>{let e=new Map;return v.forEach(t=>e.set(t.node.id,t.node)),e},[v]),oe=K.useCallback(e=>v.find(t=>t.node.id===e),[v]),se=K.useCallback((e,t)=>{let n=oe(e);!n||!n.hasChildren||(t?d?d(e):te(t=>new Set(t).add(e)):f?f(e):te(t=>{let n=new Set(t);return n.delete(e),n}))},[oe,d,f]);return(0,nt.jsx)(c,{tabIndex:0,autoFocus:!0,onKeyDown:e=>{if(!i||s)return;let t=oe(i);if(t){if(e.key===`right`&&t.hasChildren)e.preventDefault(),se(i,!0);else if(e.key===`left`){if(t.hasChildren&&t.isExpanded)e.preventDefault(),se(i,!1);else if(t.parentId!==void 0&&(e.preventDefault(),ne.current=!0,se(t.parentId,!1),r)){let e=S.get(t.parentId);e&&r(e)}}}},children:(0,nt.jsx)(ve,{options:ae,onChange:K.useCallback(e=>{let n=S.get(e);n&&t(n)},[S,t]),onFocus:K.useCallback(e=>{if(ne.current){ne.current=!1;return}if(g.current!==e&&(g.current=e,r)){let t=S.get(e);t&&r(t)}},[r,S]),onCancel:n,defaultFocusValue:i,visibleOptionCount:a,layout:o,isDisabled:s,hideIndexes:l,onUpFromFirstItem:h})})}var K,nt,rt=e((()=>{K=t(h(),1),_(),ge(),nt=y()}));function it(e,t){return je(e.replace(/\s+/g,` `).trim(),t)}function at({before:e,match:t,after:n},r){return v.dim(e)+r(t)+v.dim(n)}function ot(e,t,n){let r=e.toLowerCase().indexOf(t.toLowerCase());if(r===-1)return null;let i=r+t.length,a=Math.max(0,r-n),o=Math.min(e.length,i+n),s=e.slice(a,r),c=e.slice(r,i),l=e.slice(i,o);return{before:(a>0?`…`:``)+s.replace(/\s+/g,` `).trimStart(),match:c.trim(),after:l.replace(/\s+/g,` `).trimEnd()+(o<e.length?`…`:``)}}function st(e,t,n){let{isGroupHeader:r=!1,isChild:i=!1,forkCount:a=0}=n||{},o=r&&a>0?mt:i?ht:0,s=r&&a>0?` (+${a} other ${a===1?`session`:`sessions`})`:``,c=e.isSidechain?` (sidechain)`:``,l=t-o-c.length-s.length;return`${it(A(e),l)}${c}${s}`}function ct(e,t){let{isChild:n=!1,showProjectPath:r=!1}=t||{},i=n?` `:``,a=Me(e),o=r&&e.projectPath?` · ${e.projectPath}`:``;return i+a+o}function lt({logs:e,maxHeight:t=1/0,forceWidth:n,onCancel:o,onSelect:m,onLogsChanged:h,onLoadMore:g,initialSearchQuery:_,showAllProjects:v=!1,onToggleAllProjects:y,onAgenticSearch:b}){let ae=ne(),S=n===void 0?ae.columns:n,oe=Le(o),se=f(),C=le(),w=process.env.USER_TYPE===`ant`,[ue]=s(),pe=ce(ue),me=q.useMemo(()=>e=>p(e,pe.warning),[pe.warning]),he=process.env.USER_TYPE===`ant`,[T,ge]=q.useState(null),[D,ye]=q.useState(!1),[Se,Ce]=q.useState(!1),[we,O]=q.useState(!1),Te=q.useMemo(()=>ie(),[]),[Ee,k]=q.useState(``),[Oe,ke]=q.useState(0),[Ae,je]=q.useState(new Set),[M,Ne]=q.useState(null),[Pe,Fe]=q.useState(1),[N,P]=q.useState(`list`),[Ie,Re]=q.useState(null),ze=q.useRef(null),[Ve,He]=q.useState(0),[F,Ue]=q.useState({status:`idle`}),[I,L]=q.useState(!1),R=q.useRef(null),{query:z,setQuery:Ke,cursorOffset:qe}=Be({isActive:N===`search`&&F.status!==`searching`,onExit:()=>{P(`list`),j(`tengu_session_search_toggled`,{enabled:!1})},onExitUp:()=>{P(`list`),j(`tengu_session_search_toggled`,{enabled:!1})},passthroughCtrlKeys:[`n`],initialQuery:_||``}),B=q.useDeferredValue(z),[V,H]=q.useState(``);q.useEffect(()=>{if(!B){H(``);return}let e=setTimeout(H,300,B);return()=>clearTimeout(e)},[B]);let[U,Ye]=q.useState(null),[Xe,Ze]=q.useState(!1);q.useEffect(()=>{De().then(e=>ge(e)),de(Te).then(e=>{O(e.length>1)})},[Te]);let Qe=q.useMemo(()=>new Map(e.map(e=>[e,dt(e)])),[e]),$e=q.useMemo(()=>w?new We(e.map(e=>({log:e,searchableText:Qe.get(e)??``})).filter(e=>e.searchableText),{keys:[`searchableText`],threshold:gt,ignoreLocation:!0,includeScore:!0}):null,[e,Qe,w]),et=q.useMemo(()=>pt(e),[e]),W=et.length>0,G=q.useMemo(()=>W?[`All`,...et]:[],[W,et]),K=G.length>0&&Ve<G.length?Ve:0,nt=G[K],rt=nt===`All`?void 0:nt,lt=+!!W,ut=q.useMemo(()=>{let t=e;return C&&(t=e.filter(e=>{let t=re(),n=x(e);return!!(t&&n===t||e.customTitle||_e(e.messages)||e.firstPrompt||e.customTitle)})),rt!==void 0&&(t=t.filter(e=>e.tag===rt)),D&&T&&(t=t.filter(e=>e.gitBranch===T)),we&&!Se&&(t=t.filter(e=>e.projectPath===Te)),t},[e,C,rt,D,T,we,Se,Te]),mt=q.useMemo(()=>{if(!z)return ut;let e=z.toLowerCase();return ut.filter(t=>{let n=A(t).toLowerCase(),r=(t.gitBranch||``).toLowerCase(),i=(t.tag||``).toLowerCase(),a=t.prNumber?`pr #${t.prNumber} ${t.prRepository||``}`.toLowerCase():``;return n.includes(e)||r.includes(e)||i.includes(e)||a.includes(e)})},[ut,z]);q.useEffect(()=>{w&&B&&B!==V&&Ze(!0)},[B,V,w]),q.useEffect(()=>{if(!w||!V||!$e){Ye(null),Ze(!1);return}let e=setTimeout((e,t,n,r)=>{let i=e.search(t);i.sort((e,t)=>{let n=new Date(e.item.log.modified).getTime(),r=new Date(t.item.log.modified).getTime()-n;return Math.abs(r)>_t?r:(e.score??1)-(t.score??1)}),n({results:i.map(e=>({log:e.item.log,score:e.score,searchableText:e.item.searchableText})),query:t}),r(!1)},0,$e,V,Ye,Ze);return()=>{clearTimeout(e)}},[V,$e,w]);let{filteredLogs:ht,snippets:Y}=q.useMemo(()=>{let e=new Map,t=mt;if(U&&V&&U.query===V){for(let t of U.results)if(t.searchableText){let n=ot(t.searchableText,V,vt);n&&e.set(t.log,n)}let n=new Set(t.map(e=>e.messages[0]?.uuid)),r=U.results.map(e=>e.log).filter(e=>!n.has(e.messages[0]?.uuid));t=[...t,...r]}return{filteredLogs:t,snippets:e}},[mt,U,V]),X=q.useMemo(()=>F.status===`results`&&F.results.length>0?F.results:ht,[F,ht]),Z=Math.max(30,S-4),yt=q.useMemo(()=>{if(!C)return[];let e=ft(X);return Array.from(e.entries()).map(([e,t])=>{let n=t[0],r=X.indexOf(n),i=Y.get(n),a=i?at(i,me):null;if(t.length===1){let t=ct(n,{showProjectPath:v});return{id:`log:${e}:0`,value:{log:n,indexInFiltered:r},label:st(n,Z),description:a?`${t}\n ${a}`:t,dimDescription:!0}}let o=t.length-1,s=t.slice(1).map((t,n)=>{let r=X.indexOf(t),i=Y.get(t),a=i?at(i,me):null,o=ct(t,{isChild:!0,showProjectPath:v});return{id:`log:${e}:${n+1}`,value:{log:t,indexInFiltered:r},label:st(t,Z,{isChild:!0}),description:a?`${o}\n ${a}`:o,dimDescription:!0}}),c=ct(n,{showProjectPath:v});return{id:`group:${e}`,value:{log:n,indexInFiltered:r},label:st(n,Z,{isGroupHeader:!0,forkCount:o}),description:a?`${c}\n ${a}`:c,dimDescription:!0,children:s}})},[C,X,Z,v,Y,me]),bt=q.useMemo(()=>C?[]:X.map((e,t)=>{let n=it(A(e)+(e.isSidechain?` (sidechain)`:``),Z),r=Me(e),i=v&&e.projectPath?` · ${e.projectPath}`:``,a=Y.get(e),o=a?at(a,me):null;return{label:n,description:o?`${r}${i}\n ${o}`:r+i,dimDescription:!0,value:t.toString()}}),[C,X,me,Z,v,Y]),Q=M?.value.log??null,xt=()=>{if(!C||!Q)return``;let e=x(Q);if(!e)return``;let t=X.filter(t=>x(t)===e);if(!(t.length>1))return``;let n=Ae.has(e);return t.indexOf(Q)>0||n?`← to collapse`:`→ to expand`},St=q.useCallback(async()=>{let e=Q?x(Q):void 0;if(!Q||!e){P(`list`),k(``);return}Ee.trim()&&(await be(e,Ee.trim(),Q.fullPath),C&&h&&h()),P(`list`),k(``)},[Q,Ee,h,C]),Ct=q.useCallback(()=>{P(`list`),j(`tengu_session_search_toggled`,{enabled:!1})},[]),wt=q.useCallback(()=>{P(`search`),j(`tengu_session_search_toggled`,{enabled:!0})},[]),Tt=q.useCallback(async()=>{if(!z.trim()||!b||!he)return;R.current?.abort();let t=new AbortController;R.current=t,Ue({status:`searching`}),j(`tengu_agentic_search_started`,{query_length:z.length});try{let n=await b(z,e,t.signal);if(t.signal.aborted)return;Ue({status:`results`,results:n,query:z}),j(`tengu_agentic_search_completed`,{query_length:z.length,results_count:n.length})}catch(e){if(t.signal.aborted)return;Ue({status:`error`,message:e instanceof Error?e.message:`Search failed`}),j(`tengu_agentic_search_error`,{query_length:z.length})}},[z,b,he,e]);q.useEffect(()=>{F.status!==`idle`&&F.status!==`searching`&&(F.status===`results`&&F.query!==z||F.status===`error`)&&Ue({status:`idle`})},[z,F]),q.useEffect(()=>()=>{R.current?.abort()},[]);let Et=q.useRef(F.status);q.useEffect(()=>{let e=Et.current;if(Et.current=F.status,e===`searching`&&F.status===`results`){if(C&&yt.length>0)Ne(yt[0]);else if(!C&&X.length>0){let e=X[0];Ne({id:`0`,value:{log:e,indexInFiltered:0},label:``})}}},[F.status,C,yt,X]);let Dt=q.useCallback(e=>{let t=parseInt(e,10),n=X[t];!n||ze.current===t.toString()||(ze.current=t.toString(),Ne({id:t.toString(),value:{log:n,indexInFiltered:t},label:``}),Fe(t+1))},[X]),Ot=q.useCallback(e=>{Ne(e);let t=X.findIndex(t=>x(t)===x(e.value.log));t>=0&&Fe(t+1)},[X]);d(`confirm:no`,()=>{R.current?.abort(),Ue({status:`idle`}),j(`tengu_agentic_search_cancelled`,{})},{context:`Confirmation`,isActive:N!==`preview`&&F.status===`searching`}),d(`confirm:no`,()=>{P(`list`),k(``)},{context:`Settings`,isActive:N===`rename`&&F.status!==`searching`}),d(`confirm:no`,()=>{Ke(``),L(!1),o?.()},{context:`Confirmation`,isActive:N!==`preview`&&N!==`rename`&&N!==`search`&&I&&F.status!==`searching`}),ee((e,t)=>{if(N!==`preview`&&F.status!==`searching`&&N!==`rename`)if(N===`search`)e.toLowerCase()===`n`&&t.ctrl?Ct():(t.return||t.downArrow)&&z.trim()&&b&&he&&F.status!==`results`&&L(!0);else{if(I){if(t.return){Tt(),L(!1);return}else if(t.downArrow){L(!1);return}else if(t.upArrow){P(`search`),L(!1);return}}if(W&&t.tab){let e=t.shift?-1:1;He(t=>{let n=((t<G.length?t:0)+G.length+e)%G.length,r=G[n];return j(`tengu_session_tag_filter_changed`,{is_all:r===`All`,tag_count:et.length}),n});return}let n=!t.ctrl&&!t.meta,r=e.toLowerCase();if(r===`a`&&t.ctrl&&y)y(),j(`tengu_session_all_projects_toggled`,{enabled:!v});else if(r===`b`&&t.ctrl){let e=!D;ye(e),j(`tengu_session_branch_filter_toggled`,{enabled:e})}else if(r===`w`&&t.ctrl&&we){let e=!Se;Ce(e),j(`tengu_session_worktree_filter_toggled`,{enabled:e})}else r===`/`&&n?(P(`search`),j(`tengu_session_search_toggled`,{enabled:!0})):r===`r`&&t.ctrl&&Q?(P(`rename`),k(``),j(`tengu_session_rename_started`,{})):r===`v`&&t.ctrl&&Q?(Re(Q),P(`preview`),j(`tengu_session_preview_opened`,{messageCount:Q.messageCount})):Q&&n&&e.length>0&&!/^\s+$/.test(e)&&(P(`search`),Ke(e),j(`tengu_session_search_toggled`,{enabled:!0}))}},{isActive:!0});let kt=[];D&&T&&kt.push(T),we&&!Se&&kt.push(`current worktree`);let At=8+ +(kt.length>0&&N!==`search`)+lt,$=Math.max(1,Math.floor((t-At-2)/3));return q.useEffect(()=>{if(!g)return;let e=$*2;Pe+e>=X.length&&g($*3)},[Pe,$,X.length,g]),e.length===0?null:N===`preview`&&Ie&&C?(0,J.jsx)(Ge,{log:Ie,onExit:()=>{P(`list`),Re(null)},onSelect:m}):(0,J.jsxs)(c,{flexDirection:`column`,height:t-1,children:[(0,J.jsx)(c,{flexShrink:0,children:(0,J.jsx)(i,{color:`suggestion`})}),(0,J.jsx)(c,{flexShrink:0,children:(0,J.jsx)(l,{children:` `})}),W?(0,J.jsx)(Je,{tabs:G,selectedIndex:K,availableWidth:S,showAllProjects:v}):(0,J.jsx)(c,{flexShrink:0,children:(0,J.jsxs)(l,{bold:!0,color:`suggestion`,children:[`Resume Session`,N===`list`&&X.length>$&&(0,J.jsxs)(l,{dimColor:!0,children:[` `,`(`,Pe,` of `,X.length,`)`]})]})}),(0,J.jsx)(te,{query:z,isFocused:N===`search`,isTerminalFocused:se,cursorOffset:qe}),kt.length>0&&N!==`search`&&(0,J.jsx)(c,{flexShrink:0,paddingLeft:2,children:(0,J.jsx)(l,{dimColor:!0,children:(0,J.jsx)(u,{children:kt})})}),(0,J.jsx)(c,{flexShrink:0,children:(0,J.jsx)(l,{children:` `})}),F.status===`searching`&&(0,J.jsxs)(c,{paddingLeft:1,flexShrink:0,children:[(0,J.jsx)(xe,{}),(0,J.jsx)(l,{children:` Searching…`})]}),F.status===`results`&&F.results.length>0&&(0,J.jsx)(c,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(l,{dimColor:!0,italic:!0,children:`Claude found these results:`})}),F.status===`results`&&F.results.length===0&&ht.length===0&&(0,J.jsx)(c,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(l,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),F.status===`error`&&ht.length===0&&(0,J.jsx)(c,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(l,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),!!z.trim()&&b&&he&&F.status!==`searching`&&F.status!==`results`&&F.status!==`error`&&(0,J.jsxs)(c,{flexShrink:0,flexDirection:`column`,children:[(0,J.jsxs)(c,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(l,{color:I?`suggestion`:void 0,children:I?r.pointer:` `}),(0,J.jsx)(l,{color:I?`suggestion`:void 0,bold:I,children:`Search deeply using Claude →`})]}),(0,J.jsx)(c,{height:1})]}),F.status===`searching`?null:N===`rename`&&Q?(0,J.jsxs)(c,{paddingLeft:2,flexDirection:`column`,children:[(0,J.jsx)(l,{bold:!0,children:`Rename session:`}),(0,J.jsx)(c,{paddingTop:1,children:(0,J.jsx)(fe,{value:Ee,onChange:k,onSubmit:St,placeholder:A(Q,`Enter new session name`),columns:S,cursorOffset:Oe,onChangeCursorOffset:ke,showCursor:!0})})]}):C?(0,J.jsx)(tt,{nodes:yt,onSelect:e=>{m(e.value.log)},onFocus:Ot,onCancel:o,focusNodeId:M?.id,visibleOptionCount:$,layout:`expanded`,isDisabled:N===`search`||I,hideIndexes:!1,isNodeExpanded:e=>{if(N===`search`||D)return!0;let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;return t?Ae.has(t):!1},onExpand:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&(je(e=>new Set(e).add(t)),j(`tengu_session_group_expanded`,{}))},onCollapse:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&je(e=>{let n=new Set(e);return n.delete(t),n})},onUpFromFirstItem:wt}):(0,J.jsx)(ve,{options:bt,onChange:e=>{let t=X[parseInt(e,10)];t&&m(t)},visibleOptionCount:$,onCancel:o,onFocus:Dt,defaultFocusValue:M?.id.toString(),layout:`expanded`,isDisabled:N===`search`||I,onUpFromFirstItem:wt}),(0,J.jsx)(c,{paddingLeft:2,children:oe.pending?(0,J.jsxs)(l,{dimColor:!0,children:[`Press `,oe.keyName,` again to exit`]}):N===`rename`?(0,J.jsx)(l,{dimColor:!0,children:(0,J.jsxs)(u,{children:[(0,J.jsx)(a,{shortcut:`Enter`,action:`save`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):F.status===`searching`?(0,J.jsx)(l,{dimColor:!0,children:(0,J.jsxs)(u,{children:[(0,J.jsx)(l,{children:`Searching with Claude…`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):I?(0,J.jsx)(l,{dimColor:!0,children:(0,J.jsxs)(u,{children:[(0,J.jsx)(a,{shortcut:`Enter`,action:`search`}),(0,J.jsx)(a,{shortcut:`↓`,action:`skip`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):N===`search`?(0,J.jsx)(l,{dimColor:!0,children:(0,J.jsxs)(u,{children:[(0,J.jsx)(l,{children:Xe&&w?`Searching…`:`Type to Search`}),(0,J.jsx)(a,{shortcut:`Enter`,action:`select`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`clear`})]})}):(0,J.jsx)(l,{dimColor:!0,children:(0,J.jsxs)(u,{children:[y&&(0,J.jsx)(a,{shortcut:`Ctrl+A`,action:`show ${v?`current dir`:`all projects`}`}),T&&(0,J.jsx)(a,{shortcut:`Ctrl+B`,action:`toggle branch`}),we&&(0,J.jsx)(a,{shortcut:`Ctrl+W`,action:`show ${Se?`current worktree`:`all worktrees`}`}),(0,J.jsx)(a,{shortcut:`Ctrl+V`,action:`preview`}),(0,J.jsx)(a,{shortcut:`Ctrl+R`,action:`rename`}),(0,J.jsx)(l,{children:`Type to search`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`}),xt()&&(0,J.jsx)(l,{children:xt()})]})})})]})}function ut(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function dt(e){let t=(e.messages.length<=Y?e.messages:[...e.messages.slice(0,X),...e.messages.slice(-1e3)]).map(ut).filter(Boolean).join(` `),n=`${[e.customTitle,e.summary,e.firstPrompt,e.gitBranch,e.tag,e.prNumber?`PR #${e.prNumber}`:void 0,e.prRepository].filter(Boolean).join(` `)} ${t}`.trim();return n.length>Z?n.slice(0,Z):n}function ft(e){let t=new Map;for(let n of e){let e=x(n);if(e){let r=t.get(e);r?r.push(n):t.set(e,[n])}}return t.forEach(e=>e.sort((e,t)=>new Date(t.modified).getTime()-new Date(e.modified).getTime())),t}function pt(e){let t=new Set;for(let n of e)n.tag&&t.add(n.tag);return Array.from(t).sort((e,t)=>e.localeCompare(t))}var q,J,mt,ht,Y,X,Z,gt,_t,vt,yt=e((()=>{m(),n(),He(),q=t(h(),1),b(),Re(),Ve(),T(),_(),Ie(),Ae(),M(),se(),k(),Oe(),D(),w(),ye(),ge(),ze(),z(),S(),G(),oe(),rt(),J=y(),mt=2,ht=4,Y=2e3,X=1e3,Z=5e4,gt=.3,_t=60*1e3,vt=50}));function bt(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function Q(e){if(e.length===0)return``;let t=(e.length<=wt?e:[...e.slice(0,wt/2),...e.slice(-100/2)]).map(bt).filter(Boolean).join(` `).replace(/\s+/g,` `).trim();return t.length>Ct?t.slice(0,Ct)+`…`:t}function xt(e,t){return!!(A(e).toLowerCase().includes(t)||e.customTitle?.toLowerCase().includes(t)||e.tag?.toLowerCase().includes(t)||e.gitBranch?.toLowerCase().includes(t)||e.summary?.toLowerCase().includes(t)||e.firstPrompt?.toLowerCase().includes(t)||e.messages&&e.messages.length>0&&Q(e.messages).toLowerCase().includes(t))}async function St(e,t,n){if(!e.trim()||t.length===0)return[];let r=e.toLowerCase(),i=t.filter(e=>xt(e,r)),a;if(i.length>=Tt)a=i.slice(0,Tt);else{let e=t.filter(e=>!xt(e,r)),n=Tt-i.length;a=[...i,...e.slice(0,n)]}O(`Agentic search: ${a.length}/${t.length} logs, query="${e}", matching: ${i.length}, with messages: ${Te(a,e=>e.messages?.length>0)}`);let o=a.map(async e=>{if(C(e))try{return await he(e)}catch(t){return ke(t),e}return e}),s=await Promise.all(o);O(`Agentic search: loaded ${Te(s,e=>e.messages?.length>0)}/${a.length} logs with transcripts`);let c=`Sessions:
2
- ${s.map((e,t)=>{let n=[`${t}:`],r=A(e);if(n.push(r),e.customTitle&&e.customTitle!==r&&n.push(`[custom title: ${e.customTitle}]`),e.tag&&n.push(`[tag: ${e.tag}]`),e.gitBranch&&n.push(`[branch: ${e.gitBranch}]`),e.summary&&n.push(`- Summary: ${e.summary}`),e.firstPrompt&&e.firstPrompt!==`No prompt`&&n.push(`- First message: ${e.firstPrompt.slice(0,300)}`),e.messages&&e.messages.length>0){let t=Q(e.messages);t&&n.push(`- Transcript: ${t}`)}return n.join(` `)}).join(`
3
- `)}
4
-
5
- Search query: "${e}"
6
-
7
- Find the sessions that are most relevant to this query.`;O(`Agentic search prompt (first 500 chars): ${c.slice(0,500)}...`);try{let e=Fe();O(`Agentic search using model: ${e}`);let t=(await ue({model:e,system:Et,messages:[{role:`user`,content:c}],signal:n,querySource:`session_search`})).content.find(e=>e.type===`text`);if(!t||t.type!==`text`)return O(`No text content in agentic search response`),[];O(`Agentic search response: ${t.text}`);let r=t.text.match(/\{[\s\S]*\}/);if(!r)return O(`Could not find JSON in agentic search response`),[];let i=(Se(r[0]).relevant_indices||[]).filter(e=>e>=0&&e<s.length).map(e=>s[e]);return O(`Agentic search found ${i.length} relevant sessions`),i}catch(e){return ke(e),O(`Agentic search error: ${e}`),[]}}var Ct,wt,Tt,Et,Dt=e((()=>{Ee(),we(),Oe(),Pe(),D(),ae(),Ce(),Ct=2e3,wt=100,Tt=100,Et=`Your goal is to find relevant sessions based on a user's search query.
8
-
9
- You will be given a list of sessions with their metadata and a search query. Identify which sessions are most relevant to the query.
10
-
11
- Each session may include:
12
- - Title (display name or custom title)
13
- - Tag (user-assigned category, shown as [tag: name] - users tag sessions with /tag command to categorize them)
14
- - Branch (git branch name, shown as [branch: name])
15
- - Summary (AI-generated summary)
16
- - First message (beginning of the conversation)
17
- - Transcript (excerpt of conversation content)
18
-
19
- IMPORTANT: Tags are user-assigned labels that indicate the session's topic or category. If the query matches a tag exactly or partially, those sessions should be highly prioritized.
20
-
21
- For each session, consider (in order of priority):
22
- 1. Exact tag matches (highest priority - user explicitly categorized this session)
23
- 2. Partial tag matches or tag-related terms
24
- 3. Title matches (custom titles or first message content)
25
- 4. Branch name matches
26
- 5. Summary and transcript content matches
27
- 6. Semantic similarity and related concepts
28
-
29
- CRITICAL: Be VERY inclusive in your matching. Include sessions that:
30
- - Contain the query term anywhere in any field
31
- - Are semantically related to the query (e.g., "testing" matches sessions about "tests", "unit tests", "QA", etc.)
32
- - Discuss topics that could be related to the query
33
- - Have transcripts that mention the concept even in passing
34
-
35
- When in doubt, INCLUDE the session. It's better to return too many results than too few. The user can easily scan through results, but missing relevant sessions is frustrating.
36
-
37
- Return sessions ordered by relevance (most relevant first). If truly no sessions have ANY connection to the query, return an empty array - but this should be rare.
38
-
39
- Respond with ONLY the JSON object, no markdown formatting:
40
- {"relevant_indices": [2, 5, 0]}`}));function Ot(e,t,n){let r=ie();if(!t||!e.projectPath||e.projectPath===r)return{isCrossProject:!1};if(process.env.USER_TYPE!==`ant`){let t=x(e);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${N([e.projectPath])} && claude --resume ${t}`,projectPath:e.projectPath}}if(n.some(t=>e.projectPath===t||e.projectPath.startsWith(t+I)))return{isCrossProject:!0,isSameRepoWorktree:!0,projectPath:e.projectPath};let i=x(e);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${N([e.projectPath])} && claude --resume ${i}`,projectPath:e.projectPath}}var kt=e((()=>{b(),P(),D()}));export{lt as a,Dt as i,kt as n,yt as o,St as r,Ot as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./cwd-CYmmnQVS.js";e();export{t as getCwd};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{O as t,en as n,nt as r}from"./state-ix0xIunV.js";import{AsyncLocalStorage as i}from"async_hooks";function a(e,t){return c.run(e,t)}function o(){return c.getStore()??t()}function s(){try{return o()}catch{return r()}}var c,l=e((()=>{n(),c=new i}));export{a as i,l as n,o as r,s as t};
@@ -1 +0,0 @@
1
- import{n 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,g as o}from"./config-DRDuVyzE.js";import{o as s,s as c}from"./log-BMCygSzM.js";import{Si as l,W as u,_ as d,r as f,wi as p,z as m}from"./model-CZViyZnE.js";import{Z as h,et as g}from"./esm-5w3xFBnt.js";import{f as _,p as v}from"./firstPartyEventLogger-BXY1IJ2D.js";import{createHash as y}from"crypto";function b(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}async function x(){if(N.length===0)return;let e=N;N=[];try{await r.post(E,e,{headers:{"Content-Type":`application/json`,"DD-API-KEY":D},timeout:A})}catch(e){c(e)}}function S(){P||(P=setTimeout(()=>{P=null,x()},T()).unref())}async function C(){P&&(clearTimeout(P),P=null),await x()}async function w(e,t){if(l()!==`firstParty`)return;let n=F;if(n===null&&(n=await I()),!(!n||!j.has(e)))try{let{envContext:n,...r}=await h({model:t.model,betas:t.betas}),i={...r,...n,...t,userBucket:R()};if(typeof i.toolName==`string`&&i.toolName.startsWith(`mcp__`)&&(i.toolName=`mcp`),process.env.USER_TYPE!==`ant`&&typeof i.model==`string`){let e=f(i.model.replace(/\[1m]$/i,``));i.model=e in m?e:`other`}if(typeof i.version==`string`&&(i.version=i.version.replace(/^(\d+\.\d+\.\d+-dev\.\d{8})\.t\d+\.sha[a-f0-9]+$/,`$1`)),i.status!==void 0&&i.status!==null){let e=String(i.status);i.http_status=e;let t=e.charAt(0);t>=`1`&&t<=`5`&&(i.http_status_range=`${t}xx`),delete i.status}let a=i,o={ddsource:`nodejs`,ddtags:[`event:${e}`,...M.filter(e=>a[e]!==void 0&&a[e]!==null).map(e=>`${b(e)}:${a[e]}`)].join(`,`),message:e,service:`claude-code`,hostname:`claude-code`,env:process.env.USER_TYPE};for(let[e,t]of Object.entries(i))t!=null&&(o[b(e)]=t);N.push(o),N.length>=k?(P&&(clearTimeout(P),P=null),x()):S()}catch(e){c(e)}}function T(){return parseInt(process.env.CLAUDE_CODE_DATADOG_FLUSH_INTERVAL_MS||``,10)||O}var E,D,O,k,A,j,M,N,P,F,I,L,R,z=e((()=>{i(),n(),o(),s(),d(),p(),u(),_(),g(),E=process.env.DATADOG_LOGS_ENDPOINT??``,D=process.env.DATADOG_API_KEY??``,O=15e3,k=100,A=5e3,j=new Set(`tengu_api_error.tengu_api_success.tengu_brief_mode_enabled.tengu_brief_mode_toggled.tengu_brief_send.tengu_cancel.tengu_compact_failed.tengu_exit.tengu_flicker.tengu_init.tengu_model_fallback_triggered.tengu_oauth_error.tengu_oauth_success.tengu_oauth_token_refresh_failure.tengu_oauth_token_refresh_success.tengu_oauth_token_refresh_lock_acquiring.tengu_oauth_token_refresh_lock_acquired.tengu_oauth_token_refresh_starting.tengu_oauth_token_refresh_completed.tengu_oauth_token_refresh_lock_releasing.tengu_oauth_token_refresh_lock_released.tengu_query_error.tengu_session_file_read.tengu_started.tengu_tool_use_error.tengu_tool_use_granted_in_prompt_permanent.tengu_tool_use_granted_in_prompt_temporary.tengu_tool_use_rejected_in_prompt.tengu_tool_use_success.tengu_uncaught_exception.tengu_unhandled_rejection.tengu_voice_recording_started.tengu_voice_toggled.tengu_team_mem_sync_pull.tengu_team_mem_sync_push.tengu_team_mem_sync_started.tengu_team_mem_entries_capped`.split(`.`)),M=[`arch`,`clientType`,`errorType`,`http_status_range`,`http_status`,`kairosActive`,`model`,`platform`,`provider`,`skillMode`,`subscriptionType`,`toolName`,`userBucket`,`userType`,`version`,`versionBase`],N=[],P=null,F=null,I=t(async()=>{if(v()||!E||!D)return F=!1,!1;try{return F=!0,!0}catch(e){return c(e),F=!1,!1}}),L=30,R=t(()=>{let e=a(),t=y(`sha256`).update(e).digest(`hex`);return parseInt(t.slice(0,8),16)%L})}));export{C as n,w as r,z as t};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./rolldown-runtime-DaDcL9Zw.js";import{F as n,S as r,a as i,l as a,w as o,z as s}from"./debug-BrXObCdR.js";import{n as c,r as l}from"./analytics-BotDBGh0.js";var u=t({setCseShimGate:()=>d,toCompatSessionId:()=>f,toInfraSessionId:()=>p});function d(e){m=e}function f(e){return!e.startsWith(`cse_`)||m&&!m()?e:`session_`+e.slice(4)}function p(e){return e.startsWith(`session_`)?`cse_`+e.slice(8):e}var m,h=e((()=>{}));function g(e){return e.replace(w,(e,t,n)=>n.length<T?`"${t}":"[REDACTED]"`:`"${t}":"${`${n.slice(0,8)}...${n.slice(-4)}`}"`)}function _(e){let t=e.replace(/\n/g,`\\n`);return t.length<=C?t:t.slice(0,C)+`... (${t.length} chars)`}function v(e){let t=g(typeof e==`string`?e:o(e));return t.length<=C?t:t.slice(0,C)+`... (${t.length} chars)`}function y(e){let t=n(e);if(e&&typeof e==`object`&&`response`in e){let n=e.response;if(n?.data&&typeof n.data==`object`){let e=n.data,r=typeof e.message==`string`?e.message:typeof e.error==`object`&&e.error&&`message`in e.error&&typeof e.error.message==`string`?e.error.message:void 0;if(r)return`${t}: ${r}`}}return t}function b(e){if(e&&typeof e==`object`&&`response`in e&&e.response&&typeof e.response.status==`number`)return e.response.status}function x(e){if(!(!e||typeof e!=`object`)){if(`message`in e&&typeof e.message==`string`)return e.message;if(`error`in e&&e.error!==null&&typeof e.error==`object`&&`message`in e.error&&typeof e.error.message==`string`)return e.error.message}}function S(e,t,n){t&&a(t),l(`tengu_bridge_repl_skipped`,{reason:e,...n!==void 0&&{v2:n}})}var C,w,T,E=e((()=>{c(),i(),s(),r(),C=2e3,w=RegExp(`"(${[`session_ingress_token`,`environment_secret`,`access_token`,`secret`,`token`].join(`|`)})"\\s*:\\s*"([^"]*)"`,`g`),T=16}));export{b as a,h as c,f as d,p as f,x as i,u as l,_ as n,E as o,y as r,S as s,v as t,d as u};
@@ -1 +0,0 @@
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"./DesktopHandoff-DaP4Riar.js";async function a(e){return(0,o.jsx)(i,{onDone:e})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
@@ -1 +0,0 @@
1
- import{a as e,i as t,o as n}from"./detectRepository-BPr0VWNO.js";t();export{e as parseGitHubRepository,n as parseGitRemote};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./cwd-CYmmnQVS.js";import{d as r,p as i}from"./debug-BrXObCdR.js";import{o as a,s as o}from"./log-BMCygSzM.js";import{n as s,t as c}from"./index.min-D75yiGLN.js";import{i as l,n as u}from"./path-D5U-tm91.js";import{basename as d,dirname as f,join as p,sep as m}from"path";function h(e,t){if(!e)return{directory:t||n(),prefix:``};let r=u(e,t);return e.endsWith(`/`)||e.endsWith(m)?{directory:r,prefix:``}:{directory:f(r),prefix:d(e)}}async function g(e){let t=C.get(e);if(t)return t;try{let t=(await r().readdir(e)).filter(e=>e.isDirectory()&&!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:`directory`})).slice(0,100);return C.set(e,t),t}catch(e){return o(e),[]}}async function _(e,t={}){let{basePath:r=n(),maxResults:i=10}=t,{directory:a,prefix:o}=h(e,r),s=await g(a),c=o.toLowerCase();return s.filter(e=>e.name.toLowerCase().startsWith(c)).slice(0,i).map(e=>({id:e.path,displayText:e.name+`/`,description:`directory`,metadata:{type:`directory`}}))}function v(e){return e.startsWith(`~/`)||e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`)||e===`~`||e===`.`||e===`..`}async function y(e,t=!1){let n=`${e}:${t}`,i=w.get(n);if(i)return i;try{let i=(await r().readdir(e)).filter(e=>t||!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:t.isDirectory()?`directory`:`file`})).sort((e,t)=>e.type===`directory`&&t.type!==`directory`?-1:e.type!==`directory`&&t.type===`directory`?1:e.name.localeCompare(t.name)).slice(0,100);return w.set(n,i),i}catch(e){return o(e),[]}}async function b(e,t={}){let{basePath:r=n(),maxResults:i=10,includeFiles:a=!0,includeHidden:o=!1}=t,{directory:s,prefix:c}=h(e,r),l=await y(s,o),u=c.toLowerCase(),d=l.filter(e=>!a&&e.type===`file`?!1:e.name.toLowerCase().startsWith(u)).slice(0,i),f=e.includes(`/`)||e.includes(m),p=``;if(f){let t=e.lastIndexOf(`/`),n=e.lastIndexOf(m),r=Math.max(t,n);p=e.substring(0,r+1)}return(p.startsWith(`./`)||p.startsWith(`.`+m))&&(p=p.slice(2)),d.map(e=>{let t=p+e.name;return{id:t,displayText:e.type===`directory`?t+`/`:t,metadata:{type:e.type}}})}var x,S,C,w,T=e((()=>{s(),t(),i(),a(),l(),x=500,S=300*1e3,C=new c({max:x,ttl:S}),w=new c({max:x,ttl:S})}));export{v as i,b as n,T as r,_ as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Doctor-CuKJ-nGt.js";var i,a;e((()=>{n(),i=t(),a=(e,t,n)=>Promise.resolve((0,i.jsx)(r,{onDone:e}))}))();export{a as call};
@@ -1,14 +0,0 @@
1
- import{n as e,t}from"./defineProperty-C-QyHrDq.js";import{C as n,D as r,E as i,F as a,L as o,N as s,P as c,_ as l,f as u,g as d,j as f,r as p,x as m}from"./lazySchema-DULtBUCI.js";import{Or as h,Zn as g,_t as _,en as v,kr as y,nt as b,vr as x}from"./state-ix0xIunV.js";import{G as ee,Hu as te,My as S,Ny as ne,Qi as re,Td as ie,Uu as ae,W as oe,XC as se,YC as ce,df as le,gr as C,i as ue,jr as de,o as fe,qi as pe,uf as me,wd as he}from"./loadAgentsDir-x3rlgED4.js";import{f as ge,g as _e}from"./settings-BeLFUeie.js";import{g as ve,r as ye}from"./config-DRDuVyzE.js";import{l as be,p as w,r as T}from"./sessionStoragePortable-Cx6JQ5Ye.js";import{_ as xe,u as Se}from"./model-CZViyZnE.js";import{Tn as Ce,wn as we}from"./prompt-CE3sFmZV.js";import{o as Te,t as Ee}from"./fileStateCache-DDW5toIs.js";import{n as De,r as Oe}from"./managedEnv-Aq5BXfY7.js";import{t as ke}from"./QueryEngine-CGYaShXD.js";import{dirname as Ae}from"node:path";import{randomUUID as E}from"node:crypto";import{Readable as je,Writable as Me}from"node:stream";import{unlink as Ne}from"node:fs/promises";import*as D from"node:path/posix";import{isAbsolute as Pe,resolve as Fe}from"node:path/posix";p();var O={authenticate:`authenticate`,document_did_change:`document/didChange`,document_did_close:`document/didClose`,document_did_focus:`document/didFocus`,document_did_open:`document/didOpen`,document_did_save:`document/didSave`,initialize:`initialize`,logout:`logout`,nes_accept:`nes/accept`,nes_close:`nes/close`,nes_reject:`nes/reject`,nes_start:`nes/start`,nes_suggest:`nes/suggest`,session_cancel:`session/cancel`,session_close:`session/close`,session_fork:`session/fork`,session_list:`session/list`,session_load:`session/load`,session_new:`session/new`,session_prompt:`session/prompt`,session_resume:`session/resume`,session_set_config_option:`session/set_config_option`,session_set_mode:`session/set_mode`,session_set_model:`session/set_model`},k={elicitation_complete:`elicitation/complete`,elicitation_create:`elicitation/create`,fs_read_text_file:`fs/read_text_file`,fs_write_text_file:`fs/write_text_file`,session_request_permission:`session/request_permission`,session_update:`session/update`,terminal_create:`terminal/create`,terminal_kill:`terminal/kill`,terminal_output:`terminal/output`,terminal_release:`terminal/release`,terminal_wait_for_exit:`terminal/wait_for_exit`},Ie=r({_meta:f(s(),a()).nullish(),terminal:l().optional().default(!1)}),Le=r({_meta:f(s(),a()).nullish(),label:s().nullish(),name:s(),optional:l().optional().default(!1),secret:l().optional().default(!0)}),Re=r({_meta:f(s(),a()).nullish(),description:s().nullish(),id:s(),name:s()}),ze=r({_meta:f(s(),a()).nullish(),description:s().nullish(),id:s(),link:s().nullish(),name:s(),vars:d(Le)}),Be=r({_meta:f(s(),a()).nullish(),args:d(s()).optional(),description:s().nullish(),env:f(s(),s()).optional(),id:s(),name:s()}),Ve=c([ze.and(r({type:n(`env_var`)})),Be.and(r({type:n(`terminal`)})),Re]),He=r({_meta:f(s(),a()).nullish(),methodId:s()}),Ue=r({_meta:f(s(),a()).nullish()}),We=r({_meta:f(s(),a()).nullish(),blob:s(),mimeType:s().nullish(),uri:s()}),Ge=r({default:l().nullish(),description:s().nullish(),title:s().nullish()}),Ke=r({_meta:f(s(),a()).nullish()}),qe=r({_meta:f(s(),a()).nullish()}),Je=r({amount:i(),currency:s()}),Ye=r({_meta:f(s(),a()).nullish(),terminalId:s()}),Xe=r({_meta:f(s(),a()).nullish(),newText:s(),oldText:s().nullish(),path:s()}),Ze=c([s(),i(),i(),l(),d(s())]),Qe=m(c([r({content:f(s(),Ze).nullish()}).and(r({action:n(`accept`)})),r({action:n(`decline`)}),r({action:n(`cancel`)})]),r({_meta:f(s(),a()).nullish()})),$e=r({_meta:f(s(),a()).nullish()}),et=s(),tt=r({_meta:f(s(),a()).nullish(),elicitationId:et}),nt=n(`object`),rt=n(`string`),it=r({_meta:f(s(),a()).nullish()}),at=r({_meta:f(s(),a()).nullish(),form:$e.nullish(),url:it.nullish()}),ot=r({const:s(),title:s()}),st=r({_meta:f(s(),a()).nullish(),name:s(),value:s()}),ct=r({code:c([n(-32700),n(-32600),n(-32601),n(-32602),n(-32603),n(-32800),n(-32e3),n(-32002),n(-32042),i().int().min(-2147483648,{message:`Invalid value: Expected int32 to be >= -2147483648`}).max(2147483647,{message:`Invalid value: Expected int32 to be <= 2147483647`})]),data:a().optional(),message:s()}),lt=a(),ut=a(),dt=a(),ft=r({_meta:f(s(),a()).nullish(),readTextFile:l().optional().default(!1),writeTextFile:l().optional().default(!1)}),pt=r({_meta:f(s(),a()).nullish(),name:s(),value:s()}),mt=r({_meta:f(s(),a()).nullish(),name:s(),title:s().nullish(),version:s()}),ht=r({default:i().nullish(),description:s().nullish(),maximum:i().nullish(),minimum:i().nullish(),title:s().nullish()}),gt=r({_meta:f(s(),a()).nullish()}),_t=r({_meta:f(s(),a()).nullish(),additionalDirectories:d(s()).optional(),cursor:s().nullish(),cwd:s().nullish()}),vt=r({_meta:f(s(),a()).nullish()}),yt=r({_meta:f(s(),a()).nullish(),logout:vt.nullish()}),bt=r({_meta:f(s(),a()).nullish()}),xt=r({_meta:f(s(),a()).nullish()}),St=r({_meta:f(s(),a()).nullish(),http:l().optional().default(!1),sse:l().optional().default(!1)}),Ct=r({_meta:f(s(),a()).nullish(),headers:d(pt),name:s(),url:s()}),wt=r({_meta:f(s(),a()).nullish(),headers:d(pt),name:s(),url:s()}),Tt=r({_meta:f(s(),a()).nullish(),args:d(s()),command:s(),env:d(st),name:s()}),A=c([Ct.and(r({type:n(`http`)})),wt.and(r({type:n(`sse`)})),Tt]),j=s(),Et=r({_meta:f(s(),a()).nullish(),description:s().nullish(),modelId:j,name:s()}),Dt=c([n(`error`),n(`warning`),n(`information`),n(`hint`)]),Ot=r({_meta:f(s(),a()).nullish()}),kt=r({_meta:f(s(),a()).nullish()}),At=r({_meta:f(s(),a()).nullish()}),jt=r({_meta:f(s(),a()).nullish()}),Mt=r({_meta:f(s(),a()).nullish()}),Nt=r({_meta:f(s(),a()).nullish(),maxCount:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),Pt=r({diff:s(),uri:s()}),Ft=r({endLine:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),startLine:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),text:s()}),It=r({_meta:f(s(),a()).nullish()}),Lt=r({_meta:f(s(),a()).nullish()}),Rt=r({languageId:s(),text:s(),uri:s()}),zt=r({_meta:f(s(),a()).nullish(),maxCount:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),Bt=c([n(`rejected`),n(`ignored`),n(`replaced`),n(`cancelled`)]),Vt=r({excerpts:d(Ft),uri:s()}),Ht=r({_meta:f(s(),a()).nullish()}),Ut=r({_meta:f(s(),a()).nullish()}),Wt=r({name:s(),owner:s(),remoteUrl:s()}),Gt=r({_meta:f(s(),a()).nullish()}),Kt=r({_meta:f(s(),a()).nullish(),jump:It.nullish(),rename:Ut.nullish(),searchAndReplace:Gt.nullish()}),qt=r({id:s(),isRegex:l().nullish(),replace:s(),search:s(),uri:s()}),Jt=c([n(`automatic`),n(`diagnostic`),n(`manual`)]),Yt=r({_meta:f(s(),a()).nullish(),maxCount:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),Xt=r({_meta:f(s(),a()).nullish(),diagnostics:Ot.nullish(),editHistory:Nt.nullish(),openFiles:Lt.nullish(),recentFiles:zt.nullish(),relatedSnippets:Ht.nullish(),userActions:Yt.nullish()}),Zt=r({_meta:f(s(),a()).nullish(),additionalDirectories:d(s()).optional(),cwd:s(),mcpServers:d(A)}),Qt=r({default:i().nullish(),description:s().nullish(),maximum:i().nullish(),minimum:i().nullish(),title:s().nullish()}),$t=s(),en=c([n(`allow_once`),n(`allow_always`),n(`reject_once`),n(`reject_always`)]),tn=r({_meta:f(s(),a()).nullish(),kind:en,name:s(),optionId:$t}),nn=c([n(`high`),n(`medium`),n(`low`)]),rn=c([n(`pending`),n(`in_progress`),n(`completed`)]),an=r({_meta:f(s(),a()).nullish(),content:s(),priority:nn,status:rn}),on=r({_meta:f(s(),a()).nullish(),entries:d(an)}),M=r({character:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),line:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`})}),sn=r({id:s(),position:M,uri:s()}),cn=r({id:s(),newName:s(),position:M,uri:s()}),ln=r({action:s(),position:M,timestampMs:i(),uri:s()}),un=c([n(`utf-16`),n(`utf-32`),n(`utf-8`)]),dn=r({_meta:f(s(),a()).nullish(),auth:Ie.optional().default({terminal:!1}),elicitation:at.nullish(),fs:ft.optional().default({readTextFile:!1,writeTextFile:!1}),nes:Kt.nullish(),positionEncodings:d(un).optional(),terminal:l().optional().default(!1)}),fn=r({_meta:f(s(),a()).nullish(),audio:l().optional().default(!1),embeddedContext:l().optional().default(!1),image:l().optional().default(!1)}),pn=i().int().gte(0).lte(65535),mn=r({_meta:f(s(),a()).nullish(),clientCapabilities:dn.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:mt.nullish(),protocolVersion:pn}),N=r({end:M,start:M}),hn=r({message:s(),range:N,severity:Dt,uri:s()}),gn=r({languageId:s(),lastFocusedMs:i().nullish(),uri:s(),visibleRange:N.nullish()}),_n=r({_meta:f(s(),a()).nullish(),diagnostics:d(hn).nullish(),editHistory:d(Pt).nullish(),openFiles:d(gn).nullish(),recentFiles:d(Rt).nullish(),relatedSnippets:d(Vt).nullish(),userActions:d(ln).nullish()}),vn=r({newText:s(),range:N}),yn=c([r({cursorPosition:M.nullish(),edits:d(vn),id:s(),uri:s()}).and(r({kind:n(`edit`)})),sn.and(r({kind:n(`jump`)})),cn.and(r({kind:n(`rename`)})),qt.and(r({kind:n(`searchAndReplace`)}))]),bn=r({_meta:f(s(),a()).nullish(),content:s()}),xn=r({_meta:f(s(),a()).nullish()}),P=c([i(),s()]).nullable();r({_meta:f(s(),a()).nullish(),requestId:P});var Sn=r({requestId:P}),Cn=u([`assistant`,`user`]),F=r({_meta:f(s(),a()).nullish(),audience:d(Cn).nullish(),lastModified:s().nullish(),priority:i().nullish()}),wn=r({_meta:f(s(),a()).nullish(),annotations:F.nullish(),data:s(),mimeType:s()}),Tn=r({_meta:f(s(),a()).nullish(),annotations:F.nullish(),data:s(),mimeType:s(),uri:s().nullish()}),En=r({_meta:f(s(),a()).nullish(),annotations:F.nullish(),description:s().nullish(),mimeType:s().nullish(),name:s(),size:i().nullish(),title:s().nullish(),uri:s()}),Dn=r({_meta:f(s(),a()).nullish(),optionId:$t}),On=c([r({outcome:n(`cancelled`)}),Dn.and(r({outcome:n(`selected`)}))]),kn=r({_meta:f(s(),a()).nullish(),outcome:On}),An=r({_meta:f(s(),a()).nullish()}),jn=r({_meta:f(s(),a()).nullish()}),Mn=r({currentValue:l()}),Nn=s(),Pn=s(),Fn=c([n(`mode`),n(`model`),n(`thought_level`),s()]),I=s(),In=r({_meta:f(s(),a()).nullish(),description:s().nullish(),name:s(),value:I}),Ln=r({_meta:f(s(),a()).nullish(),group:Nn,name:s(),options:d(In)}),L=m(c([r({currentValue:I,options:c([d(In),d(Ln)])}).and(r({type:n(`select`)})),Mn.and(r({type:n(`boolean`)}))]),r({_meta:f(s(),a()).nullish(),category:Fn.nullish(),description:s().nullish(),id:Pn,name:s()})),Rn=r({_meta:f(s(),a()).nullish(),configOptions:d(L)}),zn=r({_meta:f(s(),a()).nullish()}),R=s(),Bn=r({_meta:f(s(),a()).nullish(),id:s(),sessionId:R}),Vn=r({_meta:f(s(),a()).nullish(),sessionId:R}),Hn=r({_meta:f(s(),a()).nullish(),sessionId:R}),Un=r({_meta:f(s(),a()).nullish(),sessionId:R}),Wn=r({_meta:f(s(),a()).nullish(),args:d(s()).optional(),command:s(),cwd:s().nullish(),env:d(st).optional(),outputByteLimit:i().nullish(),sessionId:R}),Gn=r({_meta:f(s(),a()).nullish(),sessionId:R,uri:s()}),Kn=r({_meta:f(s(),a()).nullish(),position:M,sessionId:R,uri:s(),version:i(),visibleRange:N}),qn=r({_meta:f(s(),a()).nullish(),languageId:s(),sessionId:R,text:s(),uri:s(),version:i()}),Jn=r({_meta:f(s(),a()).nullish(),sessionId:R,uri:s()}),Yn=r({_meta:f(s(),a()).nullish(),additionalDirectories:d(s()).optional(),cwd:s(),mcpServers:d(A).optional(),sessionId:R}),Xn=r({_meta:f(s(),a()).nullish(),sessionId:R,terminalId:s()}),Zn=r({_meta:f(s(),a()).nullish(),additionalDirectories:d(s()).optional(),cwd:s(),mcpServers:d(A),sessionId:R}),Qn=r({_meta:f(s(),a()).nullish(),limit:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),line:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:s(),sessionId:R}),$n=r({_meta:f(s(),a()).nullish(),id:s(),reason:Bt.nullish(),sessionId:R}),er=r({_meta:f(s(),a()).nullish(),sessionId:R,terminalId:s()}),tr=r({_meta:f(s(),a()).nullish(),additionalDirectories:d(s()).optional(),cwd:s(),mcpServers:d(A).optional(),sessionId:R}),nr=r({_meta:f(s(),a()).nullish(),additionalDirectories:d(s()).optional(),cwd:s(),sessionId:R,title:s().nullish(),updatedAt:s().nullish()}),rr=r({_meta:f(s(),a()).nullish(),nextCursor:s().nullish(),sessions:d(nr)}),ir=r({_meta:f(s(),a()).nullish(),title:s().nullish(),updatedAt:s().nullish()}),ar=r({_meta:f(s(),a()).nullish()}),z=s(),or=r({_meta:f(s(),a()).nullish(),currentModeId:z}),sr=r({_meta:f(s(),a()).nullish(),description:s().nullish(),id:z,name:s()}),B=r({_meta:f(s(),a()).nullish(),availableModes:d(sr),currentModeId:z}),V=r({_meta:f(s(),a()).nullish(),availableModels:d(Et),currentModelId:j}),cr=r({_meta:f(s(),a()).nullish(),configOptions:d(L).nullish(),models:V.nullish(),modes:B.nullish(),sessionId:R}),lr=r({_meta:f(s(),a()).nullish(),configOptions:d(L).nullish(),models:V.nullish(),modes:B.nullish()}),ur=r({_meta:f(s(),a()).nullish(),configOptions:d(L).nullish(),models:V.nullish(),modes:B.nullish(),sessionId:R}),dr=r({_meta:f(s(),a()).nullish(),configOptions:d(L).nullish(),models:V.nullish(),modes:B.nullish()}),fr=r({_meta:f(s(),a()).nullish()}),pr=r({_meta:f(s(),a()).nullish(),additionalDirectories:An.nullish(),close:jn.nullish(),fork:zn.nullish(),list:ar.nullish(),resume:fr.nullish()}),mr=m(c([r({type:n(`boolean`),value:l()}),r({value:I})]),r({_meta:f(s(),a()).nullish(),configId:Pn,sessionId:R})),hr=r({_meta:f(s(),a()).nullish(),configOptions:d(L)}),gr=r({_meta:f(s(),a()).nullish(),modeId:z,sessionId:R}),_r=r({_meta:f(s(),a()).nullish()}),vr=r({_meta:f(s(),a()).nullish(),modelId:j,sessionId:R}),yr=r({_meta:f(s(),a()).nullish()}),br=r({_meta:f(s(),a()).nullish(),sessionId:R}),xr=c([n(`end_turn`),n(`max_tokens`),n(`max_turn_requests`),n(`refusal`),n(`cancelled`)]),Sr=c([n(`email`),n(`uri`),n(`date`),n(`date-time`)]),Cr=r({default:s().nullish(),description:s().nullish(),enum:d(s()).nullish(),format:Sr.nullish(),maxLength:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),minLength:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),oneOf:d(ot).nullish(),pattern:s().nullish(),title:s().nullish()}),wr=r({_meta:f(s(),a()).nullish(),context:_n.nullish(),position:M,selection:N.nullish(),sessionId:R,triggerKind:Jt,uri:s(),version:i()}),Tr=r({_meta:f(s(),a()).nullish(),suggestions:d(yn)}),Er=r({_meta:f(s(),a()).nullish(),terminalId:s()}),Dr=r({_meta:f(s(),a()).nullish(),exitCode:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:s().nullish()}),Or=r({_meta:f(s(),a()).nullish(),sessionId:R,terminalId:s()}),kr=r({_meta:f(s(),a()).nullish(),exitStatus:Dr.nullish(),output:s(),truncated:l()}),Ar=r({_meta:f(s(),a()).nullish(),annotations:F.nullish(),text:s()}),jr=r({range:N.nullish(),text:s()}),Mr=r({_meta:f(s(),a()).nullish(),contentChanges:d(jr),sessionId:R,uri:s(),version:i()});r({method:s(),params:c([Vn,qn,Mr,Gn,Jn,Kn,Bn,$n,lt]).nullish()});var Nr=c([n(`full`),n(`incremental`)]),Pr=r({_meta:f(s(),a()).nullish(),syncKind:Nr}),Fr=r({_meta:f(s(),a()).nullish(),didChange:Pr.nullish(),didClose:kt.nullish(),didFocus:At.nullish(),didOpen:jt.nullish(),didSave:Mt.nullish()}),Ir=r({_meta:f(s(),a()).nullish(),document:Fr.nullish()}),Lr=r({_meta:f(s(),a()).nullish(),context:Xt.nullish(),events:Ir.nullish()}),Rr=r({_meta:f(s(),a()).nullish(),auth:yt.optional().default({}),loadSession:l().optional().default(!1),mcpCapabilities:St.optional().default({http:!1,sse:!1}),nes:Lr.nullish(),positionEncoding:un.nullish(),promptCapabilities:fn.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:pr.optional().default({})}),zr=r({_meta:f(s(),a()).nullish(),agentCapabilities:Rr.optional().default({auth:{},loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:mt.nullish(),authMethods:d(Ve).optional().default([]),protocolVersion:pn}),Br=c([r({_meta:f(s(),a()).nullish(),mimeType:s().nullish(),text:s(),uri:s()}),We]),Vr=r({_meta:f(s(),a()).nullish(),annotations:F.nullish(),resource:Br}),H=c([Ar.and(r({type:n(`text`)})),Tn.and(r({type:n(`image`)})),wn.and(r({type:n(`audio`)})),En.and(r({type:n(`resource_link`)})),Vr.and(r({type:n(`resource`)}))]),Hr=r({_meta:f(s(),a()).nullish(),content:H}),U=r({_meta:f(s(),a()).nullish(),content:H,messageId:s().nullish()}),Ur=r({_meta:f(s(),a()).nullish(),messageId:s().nullish(),prompt:d(H),sessionId:R}),Wr=r({anyOf:d(ot)}),Gr=c([Hr.and(r({type:n(`content`)})),Xe.and(r({type:n(`diff`)})),Er.and(r({type:n(`terminal`)}))]),W=s(),Kr=r({sessionId:R,toolCallId:W.nullish()}),qr=m(c([Kr,Sn]),r({elicitationId:et,url:s().url()})),Jr=r({_meta:f(s(),a()).nullish(),line:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:s()}),Yr=c([n(`pending`),n(`in_progress`),n(`completed`),n(`failed`)]),Xr=c([n(`read`),n(`edit`),n(`delete`),n(`move`),n(`search`),n(`execute`),n(`think`),n(`fetch`),n(`switch_mode`),n(`other`)]),Zr=r({_meta:f(s(),a()).nullish(),content:d(Gr).optional(),kind:Xr.optional(),locations:d(Jr).optional(),rawInput:a().optional(),rawOutput:a().optional(),status:Yr.optional(),title:s(),toolCallId:W}),Qr=r({_meta:f(s(),a()).nullish(),content:d(Gr).nullish(),kind:Xr.nullish(),locations:d(Jr).nullish(),rawInput:a().optional(),rawOutput:a().optional(),status:Yr.nullish(),title:s().nullish(),toolCallId:W}),$r=r({_meta:f(s(),a()).nullish(),options:d(tn),sessionId:R,toolCall:Qr}),ei=r({_meta:f(s(),a()).nullish(),hint:s()}),ti=r({_meta:f(s(),a()).nullish(),description:s(),input:ei.nullish(),name:s()}),ni=r({_meta:f(s(),a()).nullish(),availableCommands:d(ti)}),ri=c([r({enum:d(s()),type:rt}),Wr]),ii=r({default:d(s()).nullish(),description:s().nullish(),items:ri,maxItems:i().nullish(),minItems:i().nullish(),title:s().nullish()}),ai=c([Cr.and(r({type:n(`string`)})),Qt.and(r({type:n(`number`)})),ht.and(r({type:n(`integer`)})),Ge.and(r({type:n(`boolean`)})),ii.and(r({type:n(`array`)}))]),oi=r({description:s().nullish(),properties:f(s(),ai).optional().default({}),required:d(s()).nullish(),title:s().nullish(),type:nt.optional().default(`object`)}),si=m(c([m(c([Kr,Sn]),r({requestedSchema:oi})).and(r({mode:n(`form`)})),qr.and(r({mode:n(`url`)}))]),r({_meta:f(s(),a()).nullish(),message:s()})),ci=r({cachedReadTokens:i().nullish(),cachedWriteTokens:i().nullish(),inputTokens:i(),outputTokens:i(),thoughtTokens:i().nullish(),totalTokens:i()});c([r({id:P,result:c([zr,Ue,xt,ur,lr,rr,cr,dr,qe,_r,hr,r({_meta:f(s(),a()).nullish(),stopReason:xr,usage:ci.nullish(),userMessageId:s().nullish()}),yr,br,Tr,Ke,dt])}),r({error:ct,id:P})]);var li=r({_meta:f(s(),a()).nullish(),cost:Je.nullish(),size:i(),used:i()}),ui=c([U.and(r({sessionUpdate:n(`user_message_chunk`)})),U.and(r({sessionUpdate:n(`agent_message_chunk`)})),U.and(r({sessionUpdate:n(`agent_thought_chunk`)})),Zr.and(r({sessionUpdate:n(`tool_call`)})),Qr.and(r({sessionUpdate:n(`tool_call_update`)})),on.and(r({sessionUpdate:n(`plan`)})),ni.and(r({sessionUpdate:n(`available_commands_update`)})),or.and(r({sessionUpdate:n(`current_mode_update`)})),Rn.and(r({sessionUpdate:n(`config_option_update`)})),ir.and(r({sessionUpdate:n(`session_info_update`)})),li.and(r({sessionUpdate:n(`usage_update`)}))]),di=r({_meta:f(s(),a()).nullish(),sessionId:R,update:ui});r({method:s(),params:c([di,tt,lt]).nullish()});var fi=r({_meta:f(s(),a()).nullish(),sessionId:R,terminalId:s()}),pi=r({_meta:f(s(),a()).nullish(),exitCode:i().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:s().nullish()}),mi=r({name:s(),uri:s()}),hi=r({_meta:f(s(),a()).nullish(),repository:Wt.nullish(),workspaceFolders:d(mi).nullish(),workspaceUri:s().nullish()});r({id:P,method:s(),params:c([mn,He,bt,Zt,Zn,_t,Yn,tr,Un,gr,mr,Ur,vr,hi,wr,Hn,ut]).nullish()});var gi=r({_meta:f(s(),a()).nullish(),content:s(),path:s(),sessionId:R});r({id:P,method:s(),params:c([gi,Qn,$r,Wn,Or,er,fi,Xn,si,ut]).nullish()}),c([r({id:P,result:c([r({_meta:f(s(),a()).nullish()}),bn,kn,Ye,kr,xn,pi,gt,Qe,dt])}),r({error:ct,id:P})]),e();function _i(e,t){let n=new TextEncoder,r=new TextDecoder;return{readable:new ReadableStream({async start(e){let n=``,i=t.getReader();try{for(;;){let{value:t,done:a}=await i.read();if(a){n+=r.decode();break}if(!t)continue;n+=r.decode(t,{stream:!0});let o=n.split(`
2
- `);n=o.pop()||``;for(let t of o){let n=t.trim();if(n)try{let t=JSON.parse(n);e.enqueue(t)}catch(e){console.error(`Failed to parse JSON message:`,n,e)}}}let t=n.trim();if(t)try{let n=JSON.parse(t);e.enqueue(n)}catch(e){console.error(`Failed to parse JSON message:`,t,e)}}catch(t){e.error(t);return}finally{i.releaseLock()}e.close()}}),writable:new WritableStream({async write(t){let r=JSON.stringify(t)+`
3
- `,i=e.getWriter();try{await i.write(n.encode(r))}finally{i.releaseLock()}}})}}p();var vi,yi=class{constructor(e,n){t(this,`connection`,void 0);let r=e(this),i=async(e,t)=>{switch(e){case O.initialize:{let e=mn.parse(t);return r.initialize(e)}case O.session_new:{let e=Zt.parse(t);return r.newSession(e)}case O.session_load:{if(!r.loadSession)throw G.methodNotFound(e);let n=Zn.parse(t);return r.loadSession(n)}case O.session_list:{if(!r.listSessions)throw G.methodNotFound(e);let n=_t.parse(t);return r.listSessions(n)}case O.session_fork:{if(!r.unstable_forkSession)throw G.methodNotFound(e);let n=Yn.parse(t);return r.unstable_forkSession(n)}case O.session_resume:{if(!r.unstable_resumeSession)throw G.methodNotFound(e);let n=tr.parse(t);return r.unstable_resumeSession(n)}case O.session_close:{if(!r.unstable_closeSession)throw G.methodNotFound(e);let n=Un.parse(t);return r.unstable_closeSession(n)}case O.session_set_mode:{if(!r.setSessionMode)throw G.methodNotFound(e);let n=gr.parse(t);return await r.setSessionMode(n)??{}}case O.authenticate:{let e=He.parse(t);return await r.authenticate(e)??{}}case O.logout:{if(!r.unstable_logout)throw G.methodNotFound(e);let n=bt.parse(t);return await r.unstable_logout(n)??{}}case O.session_prompt:{let e=Ur.parse(t);return r.prompt(e)}case O.session_set_model:{if(!r.unstable_setSessionModel)throw G.methodNotFound(e);let n=vr.parse(t);return await r.unstable_setSessionModel(n)??{}}case O.session_set_config_option:{if(!r.setSessionConfigOption)throw G.methodNotFound(e);let n=mr.parse(t);return r.setSessionConfigOption(n)}case O.nes_start:{if(!r.unstable_startNes)throw G.methodNotFound(e);let n=hi.parse(t);return r.unstable_startNes(n)}case O.nes_suggest:{if(!r.unstable_suggestNes)throw G.methodNotFound(e);let n=wr.parse(t);return r.unstable_suggestNes(n)}case O.nes_close:{if(!r.unstable_closeNes)throw G.methodNotFound(e);let n=Hn.parse(t);return await r.unstable_closeNes(n)??{}}default:if(r.extMethod)return r.extMethod(e,t);throw G.methodNotFound(e)}},a=async(e,t)=>{switch(e){case O.session_cancel:{let e=Vn.parse(t);return r.cancel(e)}case O.document_did_open:{if(!r.unstable_didOpenDocument)return;let e=qn.parse(t);return r.unstable_didOpenDocument(e)}case O.document_did_change:{if(!r.unstable_didChangeDocument)return;let e=Mr.parse(t);return r.unstable_didChangeDocument(e)}case O.document_did_close:{if(!r.unstable_didCloseDocument)return;let e=Gn.parse(t);return r.unstable_didCloseDocument(e)}case O.document_did_save:{if(!r.unstable_didSaveDocument)return;let e=Jn.parse(t);return r.unstable_didSaveDocument(e)}case O.document_did_focus:{if(!r.unstable_didFocusDocument)return;let e=Kn.parse(t);return r.unstable_didFocusDocument(e)}case O.nes_accept:{if(!r.unstable_acceptNes)return;let e=Bn.parse(t);return r.unstable_acceptNes(e)}case O.nes_reject:{if(!r.unstable_rejectNes)return;let e=$n.parse(t);return r.unstable_rejectNes(e)}default:if(r.extNotification)return r.extNotification(e,t);throw G.methodNotFound(e)}};this.connection=new xi(i,a,n)}async sessionUpdate(e){return await this.connection.sendNotification(k.session_update,e)}async requestPermission(e){return await this.connection.sendRequest(k.session_request_permission,e)}async readTextFile(e){return await this.connection.sendRequest(k.fs_read_text_file,e)}async writeTextFile(e){return await this.connection.sendRequest(k.fs_write_text_file,e)??{}}async createTerminal(e){return new bi((await this.connection.sendRequest(k.terminal_create,e)).terminalId,e.sessionId,this.connection)}async unstable_createElicitation(e){return await this.connection.sendRequest(k.elicitation_create,e)}async unstable_completeElicitation(e){return await this.connection.sendNotification(k.elicitation_complete,e)}async extMethod(e,t){return await this.connection.sendRequest(e,t)}async extNotification(e,t){return await this.connection.sendNotification(e,t)}get signal(){return this.connection.signal}get closed(){return this.connection.closed}};vi=Symbol.asyncDispose;var bi=class{constructor(e,n,r){t(this,`id`,void 0),t(this,`sessionId`,void 0),t(this,`connection`,void 0),this.id=e,this.sessionId=n,this.connection=r}async currentOutput(){return await this.connection.sendRequest(k.terminal_output,{sessionId:this.sessionId,terminalId:this.id})}async waitForExit(){return await this.connection.sendRequest(k.terminal_wait_for_exit,{sessionId:this.sessionId,terminalId:this.id})}async kill(){return await this.connection.sendRequest(k.terminal_kill,{sessionId:this.sessionId,terminalId:this.id})??{}}async release(){return await this.connection.sendRequest(k.terminal_release,{sessionId:this.sessionId,terminalId:this.id})??{}}async[vi](){await this.release()}},xi=class{constructor(e,n,r){t(this,`pendingResponses`,new Map),t(this,`nextRequestId`,0),t(this,`requestHandler`,void 0),t(this,`notificationHandler`,void 0),t(this,`stream`,void 0),t(this,`writeQueue`,Promise.resolve()),t(this,`abortController`,new AbortController),t(this,`closedPromise`,void 0),this.requestHandler=e,this.notificationHandler=n,this.stream=r,this.closedPromise=new Promise(e=>{this.abortController.signal.addEventListener(`abort`,()=>e())}),this.receive()}get signal(){return this.abortController.signal}get closed(){return this.closedPromise}async receive(){let e;try{let e=this.stream.readable.getReader();try{for(;!this.abortController.signal.aborted;){let{value:t,done:n}=await e.read();if(n)break;if(t)try{this.processMessage(t)}catch(e){console.error(`Unexpected error during message processing:`,t,e),`id`in t&&t.id!==void 0&&this.sendMessage({jsonrpc:`2.0`,id:t.id,error:{code:-32700,message:`Parse error`}})}}}finally{e.releaseLock()}}catch(t){e=t}finally{this.close(e)}}close(e){if(this.abortController.signal.aborted)return;let t=e??Error(`ACP connection closed`);for(let e of this.pendingResponses.values())e.reject(t);this.pendingResponses.clear(),this.abortController.abort(t)}async processMessage(e){if(`method`in e&&`id`in e){let t=await this.tryCallRequestHandler(e.method,e.params);`error`in t&&console.error(`Error handling request`,e,t.error),await this.sendMessage({jsonrpc:`2.0`,id:e.id,...t})}else if(`method`in e){let t=await this.tryCallNotificationHandler(e.method,e.params);`error`in t&&console.error(`Error handling notification`,e,t.error)}else`id`in e?this.handleResponse(e):console.error(`Invalid message`,{message:e})}async tryCallRequestHandler(e,t){try{return{result:await this.requestHandler(e,t)??null}}catch(e){if(e instanceof G)return e.toResult();if(e instanceof o)return G.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return G.internalError(t?JSON.parse(t):{}).toResult()}catch{return G.internalError({details:t}).toResult()}}}async tryCallNotificationHandler(e,t){try{return await this.notificationHandler(e,t),{result:null}}catch(e){if(e instanceof G)return e.toResult();if(e instanceof o)return G.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return G.internalError(t?JSON.parse(t):{}).toResult()}catch{return G.internalError({details:t}).toResult()}}}handleResponse(e){let t=this.pendingResponses.get(e.id);if(t){if(`result`in e)t.resolve(e.result);else if(`error`in e){let{code:n,message:r,data:i}=e.error;t.reject(new G(n,r,i))}this.pendingResponses.delete(e.id)}else console.error(`Got response to unknown request`,e.id)}sendRequest(e,t){this.throwIfClosed();let n=this.nextRequestId++,r=new Promise((e,t)=>{this.pendingResponses.set(n,{resolve:e,reject:t})});return r.catch(()=>{}),this.sendMessage({jsonrpc:`2.0`,id:n,method:e,params:t}),r}async sendNotification(e,t){this.throwIfClosed(),await this.sendMessage({jsonrpc:`2.0`,method:e,params:t})}throwIfClosed(){if(this.abortController.signal.aborted)throw this.abortController.signal.reason??Error(`ACP connection closed`)}async sendMessage(e){return this.writeQueue=this.writeQueue.then(async()=>{let t=this.stream.writable.getWriter();try{await t.write(e)}finally{t.releaseLock()}}).catch(e=>{this.close(e)}),this.writeQueue}},G=class e extends Error{constructor(e,n,r){super(n),t(this,`code`,void 0),t(this,`data`,void 0),this.code=e,this.name=`RequestError`,this.data=r}static parseError(t,n){return new e(-32700,`Parse error${n?`: ${n}`:``}`,t)}static invalidRequest(t,n){return new e(-32600,`Invalid request${n?`: ${n}`:``}`,t)}static methodNotFound(t){return new e(-32601,`"Method not found": ${t}`,{method:t})}static invalidParams(t,n){return new e(-32602,`Invalid params${n?`: ${n}`:``}`,t)}static internalError(t,n){return new e(-32603,`Internal error${n?`: ${n}`:``}`,t)}static authRequired(t,n){return new e(-32e3,`Authentication required${n?`: ${n}`:``}`,t)}static resourceNotFound(t){return new e(-32002,`Resource not found${t?`: ${t}`:``}`,t&&{uri:t})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};h(),v(),_e(),Ce(),ve(),Te(),se(),ae(),re(),ee(),fe(),Oe();function K(e,t){if(e)return t?Pe(e)?e:Fe(t,e):e}var Si=!(typeof process.geteuid==`function`?process.geteuid()===0:typeof process.getuid==`function`&&process.getuid()===0)||!!process.env.IS_SANDBOX,Ci={auto:`auto`,default:`default`,acceptedits:`acceptEdits`,dontask:`dontAsk`,plan:`plan`,bypasspermissions:`bypassPermissions`,bypass:`bypassPermissions`};function wi(e,t=`permissions.defaultMode`){if(e===void 0)return`default`;if(typeof e!=`string`)throw Error(`Invalid ${t}: expected a string.`);let n=e.trim().toLowerCase();if(n===``)throw Error(`Invalid ${t}: expected a non-empty string.`);let r=Ci[n];if(!r)throw Error(`Invalid ${t}: ${e}.`);if(r===`bypassPermissions`&&!Si)throw Error(`Invalid ${t}: bypassPermissions is not available when running as root.`);return r}function Ti(e){let t=[...e.mcpServers??[]].sort((e,t)=>e.name.localeCompare(t.name));return JSON.stringify({cwd:e.cwd,mcpServers:t})}var Ei=256;function Di(e){let t=e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim();return t.length<=Ei?t:t.slice(0,Ei-1)+`…`}function q(e,t){if(!t)return e;let n=D.resolve(t),r=D.resolve(e);return r.startsWith(n+D.sep)||r===n?D.relative(n,r):e}function Oi(e){let t="```";for(let n of e.matchAll(/^```+/gm)??[])for(;n[0].length>=t.length;)t+="`";return t+`
4
- `+e+(e.endsWith(`
5
- `)?``:`
6
- `)+t}function J(e,t=!1,n){let r=e.name,i=e.input;switch(r){case`Agent`:case`Task`:{let e=i?.description??`Task`,t=i?.prompt;return{title:e,kind:`think`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`Bash`:{let e=i?.command??`Terminal`,t=i?.description;return{title:e,kind:`execute`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`Read`:{let e=i?.file_path,t=e??`File`,r=i?.offset,a=i?.limit,o=``;a&&a>0?o=` (${r??1} - ${(r??1)+a-1})`:r&&(o=` (from line ${r})`);let s=t?q(t,n):`File`,c=K(e,n);return{title:`Read ${s}${o}`,kind:`read`,locations:c?[{path:c,line:r??1}]:[],content:[]}}case`Write`:{let e=i?.file_path??``,t=i?.content??``,r=e?q(e,n):void 0,a=K(e,n);return{title:r?`Write ${r}`:`Write`,kind:`edit`,content:a?[{type:`diff`,path:a,oldText:null,newText:t}]:[{type:`content`,content:{type:`text`,text:t}}],locations:a?[{path:a}]:[]}}case`Edit`:{let e=i?.file_path??``,t=i?.old_string??``,r=i?.new_string??``,a=e?q(e,n):void 0,o=K(e,n);return{title:a?`Edit ${a}`:`Edit`,kind:`edit`,content:o?[{type:`diff`,path:o,oldText:t||null,newText:r}]:[],locations:o?[{path:o}]:[]}}case`Glob`:{let e=i?.path??``,t=i?.pattern??``,r=K(e,n),a=`Find`;return e&&(a+=` \`${e}\``),t&&(a+=` \`${t}\``),{title:a,kind:`search`,content:[],locations:r?[{path:r}]:[]}}case`Grep`:{let e=i?.pattern??``,t=i?.path??``,n=`grep`;return i?.[`-i`]&&(n+=` -i`),i?.[`-n`]&&(n+=` -n`),i?.[`-A`]!==void 0&&(n+=` -A ${i[`-A`]}`),i?.[`-B`]!==void 0&&(n+=` -B ${i[`-B`]}`),i?.[`-C`]!==void 0&&(n+=` -C ${i[`-C`]}`),i?.output_mode===`files_with_matches`?n+=` -l`:i?.output_mode===`count`&&(n+=` -c`),i?.head_limit!==void 0&&(n+=` | head -${i.head_limit}`),i?.glob&&(n+=` --include="${i.glob}"`),i?.type&&(n+=` --type=${i.type}`),i?.multiline&&(n+=` -P`),e&&(n+=` "${e}"`),t&&(n+=` ${t}`),{title:n,kind:`search`,content:[]}}case`TodoWrite`:{let e=i?.todos;return{title:Array.isArray(e)?`Update TODOs: ${e.map(e=>e.content).join(`, `)}`:`Update TODOs`,kind:`think`,content:[]}}case`ExitPlanMode`:{let e=i?.plan;return{title:`Ready to code?`,kind:`switch_mode`,content:e?[{type:`content`,content:{type:`text`,text:e}}]:[]}}default:return{title:r||`Unknown Tool`,kind:`other`,content:[]}}}function ki(e,t){return Array.isArray(e)&&e.length>0?{content:e.map(e=>({type:`content`,content:Ai(e,t)}))}:typeof e==`string`&&e.length>0?{content:[{type:`content`,content:{type:`text`,text:t?`\`\`\`\n${e}\n\`\`\``:e}}]}:{}}function Ai(e,t){let n=e=>({type:`text`,text:t?`\`\`\`\n${e}\n\`\`\``:e});switch(e.type){case`text`:{let n=e.text;return{type:`text`,text:t?`\`\`\`\n${n}\n\`\`\``:n}}case`image`:{let t=e.source;return t?.type===`base64`?{type:`image`,data:t.data,mimeType:t.media_type}:n(t?.type===`url`?`[image: ${t.url}]`:`[image: file reference]`)}case`resource_link`:{let t=e.uri;return{type:`resource_link`,uri:t,name:e.name??t,mimeType:e.mimeType}}case`resource`:{let t=e.resource;return{type:`resource`,resource:{uri:t?.uri??``,mimeType:t?.mimeType,...typeof t?.text==`string`?{text:t.text}:{},...typeof t?.blob==`string`?{blob:t.blob}:{}}}}case`tool_reference`:return n(`Tool: ${e.tool_name}`);case`tool_search_tool_search_result`:{let t=e.tool_references;return n(`Tools found: ${t?.map(e=>e.tool_name).join(`, `)||`none`}`)}case`tool_search_tool_result_error`:return n(`Error: ${e.error_code}${e.error_message?` - ${e.error_message}`:``}`);case`web_fetch_result`:return n(`Fetched: ${e.url}`);case`web_fetch_tool_result_error`:return n(`Error: ${e.error_code}`);case`code_execution_result`:case`bash_code_execution_result`:return n(`Output: ${e.stdout||e.stderr||``}`);case`code_execution_tool_result_error`:case`bash_code_execution_tool_result_error`:return n(`Error: ${e.error_code}`);case`text_editor_code_execution_view_result`:return n(e.content);case`text_editor_code_execution_create_result`:return n(e.is_file_update?`File updated`:`File created`);case`text_editor_code_execution_str_replace_result`:{let t=e.lines;return n(t?.join(`
7
- `)||``)}case`text_editor_code_execution_tool_result_error`:return n(`Error: ${e.error_code}${e.error_message?` - ${e.error_message}`:``}`);default:try{return{type:`text`,text:JSON.stringify(e)}}catch{return{type:`text`,text:`[content]`}}}}function ji(e,t,n=!1){if(!t)return{};let r=e.is_error===!0,i=e.content;if(r&&i)return ki(i,!0);switch(t.name){case`Read`:return typeof i==`string`&&i.length>0?{content:[{type:`content`,content:{type:`text`,text:Oi(i)}}]}:Array.isArray(i)&&i.length>0?{content:i.map(e=>({type:`content`,content:e.type===`text`?{type:`text`,text:Oi(e.text)}:Ai(e,!1)}))}:{};case`Bash`:{let e=``;if(i&&typeof i==`object`&&!Array.isArray(i)&&i.type===`bash_code_execution_result`){let t=i;e=[t.stdout,t.stderr].filter(Boolean).join(`
8
- `)}else typeof i==`string`?e=i:Array.isArray(i)&&i.length>0&&(e=i.map(e=>e.type===`text`?e.text:``).join(`
9
- `));return e.trim()?{content:[{type:`content`,content:{type:`text`,text:`\`\`\`console\n${e.trimEnd()}\n\`\`\``}}]}:{}}case`Edit`:case`Write`:return{};case`ExitPlanMode`:return{title:`Exited Plan Mode`};default:return ki(i??``,r)}}function Mi(e){return e===`in_progress`?`in_progress`:e===`completed`?`completed`:`pending`}function Y(e,t,n,r,i,a,o){let s=[];for(let i of e){let e=i.type,a=null;switch(e){case`text`:case`text_delta`:{let e=i.text??``;a={sessionUpdate:t===`assistant`?`agent_message_chunk`:`user_message_chunk`,...o?.messageId?{messageId:o.messageId}:{},content:{type:`text`,text:e}};break}case`thinking`:case`thinking_delta`:{let e=i.thinking??``;a={sessionUpdate:`agent_thought_chunk`,...o?.messageId?{messageId:o.messageId}:{},content:{type:`text`,text:e}};break}case`image`:{let e=i.source;e?.type===`base64`&&(a={sessionUpdate:t===`assistant`?`agent_message_chunk`:`user_message_chunk`,...o?.messageId?{messageId:o.messageId}:{},content:{type:`image`,data:e.data,mimeType:e.media_type}});break}case`tool_use`:case`server_tool_use`:case`mcp_tool_use`:{let t=i.id??``,n=i.name??`unknown`,s=i.input,c=t in r;if(r[t]={type:e,id:t,name:n,input:s},n===`TodoWrite`){let e=s?.todos;Array.isArray(e)&&(a={sessionUpdate:`plan`,entries:e.map(e=>({content:e.content,status:Mi(e.status),priority:`medium`}))})}else{let e=s?{...s}:{};a=c?{_meta:{claudeCode:{toolName:n}},toolCallId:t,sessionUpdate:`tool_call_update`,status:`in_progress`,rawInput:e,...J({name:n,id:t,input:s??{}},!1,o?.cwd)}:{_meta:{claudeCode:{toolName:n}},toolCallId:t,sessionUpdate:`tool_call`,rawInput:e,status:`pending`,...J({name:n,id:t,input:s??{}},!1,o?.cwd)}}break}case`tool_result`:case`mcp_tool_result`:{let e=i.tool_use_id??``,t=r[e];if(!t)break;if(t.name!==`TodoWrite`){let n=ji(i,{name:t.name,id:t.id},!1);a={_meta:{claudeCode:{toolName:t.name}},toolCallId:e,sessionUpdate:`tool_call_update`,status:i.is_error===!0?`failed`:`completed`,rawOutput:i.content,...n}}break}case`redacted_thinking`:case`input_json_delta`:case`citations_delta`:case`signature_delta`:case`container_upload`:case`compaction`:case`compaction_delta`:break}if(a){if(o?.parentToolUseId){let e=a._meta;a._meta={...e,claudeCode:{...e?.claudeCode??{},parentToolUseId:o.parentToolUseId}}}s.push({sessionId:n,update:a})}}return s}function Ni(e,t,n,r,i){let a=e.message;if(!a)return[];let o=a.content;if(!o)return[];if(typeof o==`string`)return[{sessionId:t,update:{sessionUpdate:`agent_message_chunk`,...i?.messageId?{messageId:i.messageId}:{},content:{type:`text`,text:o}}}];let s=i?.streamingActive?o.filter(e=>e.type!==`text`&&e.type!==`thinking`):o;return s.length===0?[]:Y(s,`assistant`,t,n,r,void 0,i)}function Pi(e,t,n,r,i){let a=e.event;if(!a)return[];switch(a.type){case`content_block_start`:{let o=a.content_block;return o?Y([o],`assistant`,t,n,r,void 0,{clientCapabilities:i?.clientCapabilities,parentToolUseId:e.parent_tool_use_id,cwd:i?.cwd,messageId:i?.messageId}):[]}case`content_block_delta`:{let o=a.delta;return o?Y([o],`assistant`,t,n,r,void 0,{clientCapabilities:i?.clientCapabilities,parentToolUseId:e.parent_tool_use_id,cwd:i?.cwd,messageId:i?.messageId}):[]}case`message_start`:case`message_delta`:case`message_stop`:case`content_block_stop`:return[];default:return[]}}function Fi(e,t){let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;return n}function Ii(e,t){let n=null,r=0;for(let i of Object.keys(e)){let e=Fi(i,t);e>r&&(r=e,n=i)}return n?e[n]??null:null}var Li=console;function Ri(e,t){if(t.aborted)return Promise.resolve({done:!0,value:void 0});let n,r=new Promise(e=>{n=()=>e({done:!0,value:void 0}),t.addEventListener(`abort`,n,{once:!0})});return Promise.race([e.next(),r]).finally(()=>{n&&t.removeEventListener(`abort`,n)})}async function zi(e,t,n,r,i,a,o,s){let c=`end_turn`,l={inputTokens:0,outputTokens:0,cachedReadTokens:0,cachedWriteTokens:0},u=null,d=null,f=2e5,p=!1,m=null;try{for(;!r.aborted;){let s=await Ri(t,r);if(s.done||r.aborted)break;let h=s.value;if(h==null)continue;let g=h;switch(g.type){case`system`:g.subtype===`compact_boundary`&&(u=0,await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:`
10
-
11
- Compacting completed.`}}}));break;case`result`:{let t=g.usage;t&&(l.inputTokens+=t.input_tokens??0,l.outputTokens+=t.output_tokens??0,l.cachedReadTokens+=t.cache_read_input_tokens??0,l.cachedWriteTokens+=t.cache_creation_input_tokens??0);let i=g.modelUsage;if(i&&d){let e=Ii(i,d);e?.contextWindow&&(f=e.contextWindow)}u!==null&&await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`usage_update`,used:u,size:f}});let a=g.subtype,o=g.is_error;if(r.aborted){c=`cancelled`;break}switch(a){case`success`:{let e=g.stop_reason;c=e===`max_tokens`?`max_tokens`:e===`refusal`?`refusal`:`end_turn`,o&&(c=`end_turn`);break}case`error_during_execution`:c=g.stop_reason===`max_tokens`?`max_tokens`:`end_turn`;break;case`error_max_budget_usd`:case`error_max_turns`:case`error_max_structured_output_retries`:c=`max_turn_requests`;break}break}case`stream_event`:{let t=g.parent_tool_use_id;t===null&&m===null&&(m=E());let r=Pi(g,e,i,n,{clientCapabilities:a,cwd:o,messageId:t===null?m??void 0:void 0});for(let e of r)await n.sessionUpdate(e);p=!0;break}case`assistant`:{let t=g.message,r=g.parent_tool_use_id;if(t?.usage&&r===null){let e=t.usage;u=(typeof e.input_tokens==`number`?e.input_tokens:0)+(typeof e.output_tokens==`number`?e.output_tokens:0)+(typeof e.cache_read_input_tokens==`number`?e.cache_read_input_tokens:0)+(typeof e.cache_creation_input_tokens==`number`?e.cache_creation_input_tokens:0)}r===null&&t?.model&&t.model!==`<synthetic>`&&(d=t.model);let s;r===null&&(m===null&&(m=E()),s=m);let c=Ni(g,e,i,n,{clientCapabilities:a,cwd:o,parentToolUseId:r,streamingActive:p,messageId:s});for(let e of c)await n.sessionUpdate(e);r===null&&(m=null);break}case`user`:break;case`progress`:{let t=g.data;if(!t)break;let r=t.type;if(r===`agent_progress`||r===`skill_progress`){let r=t.message;if(r){let t=r.content;if(t)for(let r of t)r.type===`text`&&await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:r.text}}})}}break}case`tool_use_summary`:break;case`attachment`:break;case`compact_boundary`:u=0,await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:`
12
-
13
- Compacting completed.`}}});break;default:Li.debug(`Ignoring unknown SDK message type`);break}}if(r.aborted||s?.())return{stopReason:`cancelled`,usage:l}}catch(e){if(r.aborted)return{stopReason:`cancelled`,usage:l};throw e}return{stopReason:c,usage:l}}async function X(e,t,n,r,i,a){for(let o of t){let t=o;if(t.type!==`user`&&t.type!==`assistant`){Li.debug(`Ignoring unknown SDK message type`);continue}if(t.isMeta===!0)continue;let s=t.message?.content;if(!s)continue;let c=t.type===`assistant`?`assistant`:`user`;if(typeof s==`string`){if(!s.trim())continue;let t=E();await n.sessionUpdate({sessionId:e,update:{sessionUpdate:c===`assistant`?`agent_message_chunk`:`user_message_chunk`,...t?{messageId:t}:{},content:{type:`text`,text:s}}});continue}if(Array.isArray(s)){let t=Y(s,c,e,r,n,void 0,{clientCapabilities:i,cwd:a,messageId:E()});for(let e of t)await n.sessionUpdate(e)}}}function Bi(e,t,n,r,i,a,o,s){return async(n,c,l,u,d,f)=>{let p=Hi(r);if(n.name===`ExitPlanMode`)return Vi(e,t,d,c,p,i,a,o,s);if(f!==void 0)return f;try{let e=await oe(n,c,l,u,d);if(e.behavior===`allow`||e.behavior===`deny`)return e}catch(e){return console.error(`[ACP Permissions] Pipeline error:`,e),{behavior:`deny`,message:`Permission pipeline failed`,decisionReason:{type:`other`,reason:`Permission pipeline failed`},toolUseID:d}}let m=J({name:n.name,id:d,input:c},p,i),h={toolCallId:d,title:m.title,kind:m.kind,status:`pending`,rawInput:c},g=[{kind:`allow_always`,name:`Always Allow`,optionId:`allow_always`},{kind:`allow_once`,name:`Allow`,optionId:`allow`},{kind:`reject_once`,name:`Reject`,optionId:`reject`},{kind:`reject_always`,name:`Always Reject`,optionId:`reject_always`}];try{let n=await e.requestPermission({sessionId:t,toolCall:h,options:g});if(n.outcome.outcome===`cancelled`)return s?.(),{behavior:`deny`,message:`Permission request cancelled by client`,decisionReason:{type:`mode`,mode:`default`},toolUseID:d};if(n.outcome.outcome===`selected`&&`optionId`in n.outcome&&n.outcome.optionId!==void 0){let e=n.outcome.optionId;if(e===`allow`||e===`allow_always`)return{behavior:`allow`,updatedInput:c}}return{behavior:`deny`,message:`Permission denied by client`,decisionReason:{type:`mode`,mode:`default`}}}catch(e){return console.error(`[ACP Permissions] Client request error:`,e),{behavior:`deny`,message:`Permission request failed`,decisionReason:{type:`mode`,mode:`default`}}}}}async function Vi(e,t,n,r,i,a,o,s,c){let l=[{kind:`allow_always`,name:`Yes, and use "auto" mode`,optionId:`auto`},{kind:`allow_always`,name:`Yes, and auto-accept edits`,optionId:`acceptEdits`},{kind:`allow_once`,name:`Yes, and manually approve edits`,optionId:`default`},{kind:`reject_once`,name:`No, keep planning`,optionId:`plan`}];s?.()===!0&&l.unshift({kind:`allow_always`,name:`Yes, and bypass permissions`,optionId:`bypassPermissions`});let u=J({name:`ExitPlanMode`,id:n,input:r},i,a),d={toolCallId:n,title:u.title,kind:u.kind,status:`pending`,rawInput:r},f=await e.requestPermission({sessionId:t,toolCall:d,options:l});if(f.outcome.outcome===`cancelled`)return c?.(),{behavior:`deny`,message:`Tool use aborted`,decisionReason:{type:`mode`,mode:`default`}};if(f.outcome.outcome===`selected`&&`optionId`in f.outcome&&f.outcome.optionId!==void 0){let n=f.outcome.optionId;if(l.some(e=>e.optionId===n)&&(n==="default"||n===`acceptEdits`||n===`auto`||n===`bypassPermissions`))return o?.(n),await e.sessionUpdate({sessionId:t,update:{sessionUpdate:`current_mode_update`,currentModeId:n}}),{behavior:`allow`,updatedInput:r}}return{behavior:`deny`,message:`User rejected request to exit plan mode.`,decisionReason:{type:`mode`,mode:`plan`}}}function Hi(e){if(!e)return!1;if(e.terminal===!0)return!0;let t=e._meta;return!t||typeof t!=`object`?!1:t.terminal_output===!0}xe(),ie(),me(),be(),e(),ne(),de();var Z=class{constructor(e){t(this,`conn`,void 0),t(this,`sessions`,new Map),t(this,`clientCapabilities`,void 0),this.conn=e}async initialize(e){return this.clientCapabilities=e.clientCapabilities,{protocolVersion:1,authMethods:[],agentInfo:{name:`claude-code`,title:`Work Mate`,version:typeof globalThis.MACRO==`object`&&globalThis.MACRO!==null?String(globalThis.MACRO.VERSION??`0.0.0`):`0.0.0`},agentCapabilities:{_meta:{claudeCode:{promptQueueing:!0,forkSession:!0}},promptCapabilities:{image:!1,embeddedContext:!0},mcpCapabilities:{http:!0,sse:!0},loadSession:!0,sessionCapabilities:{list:{},resume:{},close:{},delete:{}}}}}async authenticate(e){return{}}async newSession(e){let t=await this.createSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async unstable_resumeSession(e){let t=await this.getOrCreateSession({...e,replay:!1});return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async loadSession(e){let t=await this.getOrCreateSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async listSessions(e){if(e.cursor!==void 0&&e.cursor!==null)throw Error(`Pagination cursor not supported: listSessions returns all results in a single page.`);let t=e.cwd||b(),n=await T(t),r=await le({dir:t}),i=[];for(let e of r){if(!e.cwd||await T(e.cwd)!==n)continue;let t=Di(e.summary??``);i.push({sessionId:e.sessionId,cwd:e.cwd,...t?{title:t}:{},updatedAt:new Date(e.lastModified).toISOString()})}return{sessions:i}}async unstable_forkSession(e){let{initialMessages:t}=await Ui(e.sessionId),n=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{initialMessages:t});return this.scheduleAvailableCommandsUpdate(n.sessionId),n}async unstable_closeSession(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return await this.teardownSession(e.sessionId),{}}async unstable_deleteSession(e){let t=await w(e.sessionId);if(t)try{await Ne(t.filePath)}catch(e){if(e.code!==`ENOENT`)throw e}return this.sessions.has(e.sessionId)&&await this.teardownSession(e.sessionId),{}}async extMethod(e,t){if(e===`session/delete`){let e=t.sessionId;if(typeof e!=`string`||e.length===0)throw Error(`session/delete requires a non-empty sessionId`);return this.unstable_deleteSession({sessionId:e})}throw G.methodNotFound(e)}async cancel(e){let t=this.sessions.get(e.sessionId);if(t){t.cancelled=!0,t.cancelGeneration+=1;for(let[,e]of t.pendingMessages)e.resolve(!0);t.pendingMessages.clear(),t.pendingQueue=[],t.pendingQueueHead=0,t.queryEngine.interrupt()}}async setSessionMode(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return this.applySessionMode(e.sessionId,e.modeId),await this.conn.sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:e.modeId}}),await this.updateConfigOption(e.sessionId,`mode`,e.modeId),{}}async unstable_setSessionModel(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);return t.queryEngine.setModel(e.modelId),await this.updateConfigOption(e.sessionId,`model`,e.modelId),{}}async sendAvailableCommandsUpdate(e){let t=this.sessions.get(e);if(!t)return;let n=t.commands.filter(e=>e.type===`prompt`&&!e.isHidden&&e.userInvocable!==!1).map(e=>({name:e.name,description:e.description,input:e.argumentHint?{hint:e.argumentHint}:void 0}));await this.conn.sessionUpdate({sessionId:e,update:{sessionUpdate:`available_commands_update`,availableCommands:n}})}scheduleAvailableCommandsUpdate(e){setTimeout(()=>{this.sendAvailableCommandsUpdate(e).catch(e=>{console.error(`[ACP] Failed to send available commands update:`,e)})},0)}};async function Ui(e){let t;try{let n=await C(e);n&&n.messages.length>0&&(t=S(n.messages))}catch(e){console.error(`[ACP] fork source load failed:`,e)}return{initialMessages:t}}var Wi=[`auto`,`default`,`acceptEdits`,`bypassPermissions`,`dontAsk`,`plan`];function Gi(e){return Wi.includes(e)}function Ki(e,t,n){if(t){let t=qi(e,`_meta.permissionMode`);if(t===`bypassPermissions`&&!Xi())throw Error(`Mode not available: bypassPermissions cannot run as root (start the agent as a non-root user, or set IS_SANDBOX=1).`);return t}return Ji(n)??`default`}function qi(e,t){if(e==null)throw Error(`Invalid ${t}: expected a string.`);return wi(e,t)}function Ji(e){if(e!=null)try{return wi(e,`permissions.defaultMode`)}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[ACP] Invalid permissions.defaultMode, using default:`,t);return}}function Yi(e,t){return!!e&&Object.hasOwn(e,t)}function Xi(){return Zi()}function Zi(){return process.env.IS_SANDBOX?!0:typeof process.geteuid==`function`?process.geteuid()!==0:typeof process.getuid!=`function`||process.getuid()!==0}function Qi(e,t){return[{id:`mode`,name:`Mode`,description:`Session permission mode`,category:`mode`,type:`select`,currentValue:e.currentModeId,options:e.availableModes.map(e=>({value:e.id,name:e.name,description:e.description}))},{id:`model`,name:`Model`,description:`AI model to use`,category:`model`,type:`select`,currentValue:t.currentModelId,options:t.availableModels.map(e=>({value:e.modelId,name:e.name,description:e.description??void 0}))}]}function $i(e){let t=[];if(!Array.isArray(e))return t;for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(Array.isArray(e.options))for(let n of e.options)n&&typeof n==`object`&&typeof n.value==`string`&&t.push(n.value);else typeof n.value==`string`&&t.push(n.value)}return t}function Q(e){return e.conn}function $(e){return e.clientCapabilities}function ea(e,t,n,r){n===`mode`?t.modes={...t.modes,currentModeId:r}:n===`model`&&(t.models={...t.models,currentModelId:r})}v();function ta(){return ge().permissions?.defaultMode}async function na(e,t={}){ye();let n=t.sessionId??E(),r=e.cwd;x(n,_()),g(r);let i=process.cwd(),a=!1;try{process.chdir(r),a=!0}catch{}y(),De();try{let i=we(),a=te(i),o=e._meta,s=Yi(o,`permissionMode`),c=Ki(s?o?.permissionMode:void 0,s,ta()),l=$(this),u=this.conn,d=Bi(u,n,()=>this.sessions.get(n)?.modes.currentModeId??`default`,l,r,e=>{this.applySessionMode(n,e)},()=>this.sessions.get(n)?.appState.toolPermissionContext.isBypassPermissionsModeAvailable??!1),f=Xi(),p={...ce(),toolPermissionContext:{...i,mode:c,isBypassPermissionsModeAvailable:f}},[m,h]=await Promise.all([pe(r),ue(r)]);p.agentDefinitions=h;let g=new ke({cwd:r,tools:a,commands:m,mcpClients:[],agents:h.activeAgents,canUseTool:d,getAppState:()=>p,setAppState:e=>{let t=e(p);Object.assign(p,t)},readFileCache:new Ee(500,50*1024*1024),includePartialMessages:!0,replayUserMessages:!0,initialMessages:t.initialMessages}),_={currentModeId:c,availableModes:[{id:`default`,name:`Default`,description:`Standard behavior, prompts for dangerous operations`},{id:`acceptEdits`,name:`Accept Edits`,description:`Auto-accept file edit operations`},{id:`plan`,name:`Plan Mode`,description:`Planning mode, no actual tool execution`},{id:`auto`,name:`Auto`,description:`Use a model classifier to approve/deny permission prompts.`},...f?[{id:`bypassPermissions`,name:`Bypass Permissions`,description:`Skip all permission checks`}]:[],{id:`dontAsk`,name:`Don't Ask`,description:`Don't prompt for permissions, deny if not pre-approved`}]},v=he(),y=Se(),b={availableModels:v.map(e=>({modelId:String(e.value??``),name:e.label??String(e.value??``),description:e.description??void 0})),currentModelId:y};g.setModel(y);let x=Qi(_,b),ee={queryEngine:g,cancelled:!1,cancelGeneration:0,cwd:r,modes:_,models:b,configOptions:x,promptRunning:!1,pendingMessages:new Map,pendingQueue:[],pendingQueueHead:0,toolUseCache:{},clientCapabilities:l,appState:p,commands:m,sessionFingerprint:Ti({cwd:r,mcpServers:e.mcpServers})};return this.sessions.set(n,ee),{sessionId:n,modes:_,models:b,configOptions:x}}finally{a&&process.chdir(i)}}Object.assign(Z.prototype,{createSession:na}),ne(),de(),v(),be();async function ra(e){let t=e.replay!==!1,n=this.sessions.get(e.sessionId);if(n){if(Ti({cwd:e.cwd,mcpServers:e.mcpServers})===n.sessionFingerprint){let r=await w(e.sessionId,e.cwd);return x(e.sessionId,r?Ae(r.filePath):null),g(e.cwd),t&&await this.replaySessionHistory(e),{sessionId:e.sessionId,modes:n.modes,models:n.models,configOptions:n.configOptions}}await this.teardownSession(e.sessionId)}let r=await w(e.sessionId,e.cwd),i=r?Ae(r.filePath):null;x(e.sessionId,i),g(e.cwd);let a;if(r)try{let t=await C(e.sessionId);t&&t.messages.length>0&&(a=S(t.messages))}catch(e){console.error(`[ACP] Failed to load session history:`,e)}let o=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{sessionId:e.sessionId,initialMessages:a});if(t&&a&&a.length>0){let t=this.sessions.get(e.sessionId);t&&await X(e.sessionId,a,Q(this),t.toolUseCache,$(this),t.cwd)}return{sessionId:o.sessionId,modes:o.modes,models:o.models,configOptions:o.configOptions}}async function ia(e){this.sessions.get(e)&&(await this.cancel({sessionId:e}),this.sessions.delete(e))}async function aa(e){try{let t=await C(e.sessionId);if(!t||t.messages.length===0)return;let n=S(t.messages);if(n.length===0)return;let r=this.sessions.get(e.sessionId);if(!r)return;await X(e.sessionId,n,Q(this),r.toolUseCache,$(this),r.cwd)}catch(e){console.error(`[ACP] Failed to replay session history:`,e)}}function oa(e,t){if(!Gi(t))throw Error(`Invalid mode: ${t}`);let n=this.sessions.get(e);if(n){if(t===`bypassPermissions`&&!n.appState.toolPermissionContext.isBypassPermissionsModeAvailable||!n.modes.availableModes.some(e=>e.id===t))throw Error(`Mode not available: ${t}`);n.modes={...n.modes,currentModeId:t},n.appState.toolPermissionContext={...n.appState.toolPermissionContext,mode:t}}}async function sa(e,t,n){let r=this.sessions.get(e);r&&(ea(this,r,t,n),r.configOptions=r.configOptions.map(e=>e.id===t&&typeof e.currentValue==`string`?{...e,currentValue:n}:e),await Q(this).sessionUpdate({sessionId:e,update:{sessionUpdate:`config_option_update`,configOptions:r.configOptions}}))}Object.assign(Z.prototype,{getOrCreateSession:ra,teardownSession:ia,replaySessionHistory:aa,applySessionMode:oa,updateConfigOption:sa});function ca(e){if(!e||e.length===0)return``;let t=[];for(let n of e){let e=n;if(e.type===`text`)t.push(String(e.text??``));else if(e.type===`resource_link`){let n=typeof e.name==`string`?e.name:void 0,r=typeof e.uri==`string`?e.uri:void 0;t.push(la(n,r))}else if(e.type===`resource`){let n=e.resource;if(n&&typeof n.text==`string`)t.push(n.text);else if(n&&typeof n.blob==`string`){let e=typeof n.mimeType==`string`?n.mimeType:`application/octet-stream`,r=typeof n.uri==`string`?n.uri:`(unknown uri)`;t.push(`Embedded resource: ${r} (${e}, base64 blob, ${n.blob.length} chars)`)}}}return t.filter(e=>e.length>0).join(`
14
- `)}function la(e,t){let n=[];return e&&e.length>0&&n.push(`name=${e}`),t&&t.length>0&&n.push(`uri=${t}`),n.length>0?`Resource link: ${n.join(`, `)}`:`Resource link`}function ua(e){for(;e.pendingQueueHead<e.pendingQueue.length;){let t=e.pendingQueue[e.pendingQueueHead++];if(!t)continue;let n=e.pendingMessages.get(t);if(n)return e.pendingMessages.delete(t),da(e),n}da(e)}function da(e){if(e.pendingQueueHead!==0){if(e.pendingQueueHead>=e.pendingQueue.length){e.pendingQueue=[],e.pendingQueueHead=0;return}e.pendingQueueHead>1024&&e.pendingQueueHead*2>e.pendingQueue.length&&(e.pendingQueue=e.pendingQueue.slice(e.pendingQueueHead),e.pendingQueueHead=0)}}v();async function fa(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session ${e.sessionId} not found`);let n=e.messageId??void 0,r=ca(e.prompt);if(!r.trim())throw Error(`Prompt content is empty`);let i=t.cancelGeneration;if(t.promptRunning){let e=E();if(await new Promise(n=>{t.pendingQueue.push(e),t.pendingMessages.set(e,{resolve:n})}))return{stopReason:`cancelled`}}if(t.cancelGeneration!==i)return{stopReason:`cancelled`};t.cancelled=!1,t.promptRunning=!0;try{t.queryEngine.resetAbortController(),x(e.sessionId,_());let i=t.queryEngine.submitMessage(r),{stopReason:a,usage:o}=await zi(e.sessionId,i,Q(this),t.queryEngine.getAbortSignal(),t.toolUseCache,$(this),t.cwd,()=>t.cancelled);if(t.cancelled)return{stopReason:`cancelled`};if(await ma(this,e.sessionId,r),o){let e={inputTokens:o.inputTokens,outputTokens:o.outputTokens,cachedReadTokens:o.cachedReadTokens,cachedWriteTokens:o.cachedWriteTokens,thoughtTokens:0,totalTokens:o.inputTokens+o.outputTokens+o.cachedReadTokens+o.cachedWriteTokens+0};return{stopReason:a,usage:e,...n?{userMessageId:n}:{},_meta:{claudeCode:{usage:e}}}}return{stopReason:a,...n?{userMessageId:n}:{}}}catch(n){let r=n instanceof Error&&(n.name===`AbortError`||/abort|cancelled|interrupt/i.test(n.message));if(t.cancelled||r)return{stopReason:`cancelled`};throw n instanceof Error&&(n.message.includes(`terminated`)||n.message.includes(`process exited`))?(await this.teardownSession(e.sessionId),Error(`The Claude Agent process exited unexpectedly. Please start a new session.`)):n}finally{let e=ua(t);e?(t.promptRunning=!0,e.resolve(!1)):t.promptRunning=!1}}async function pa(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);if(typeof e.value!=`string`)throw Error(`Invalid value for config option ${e.configId}: ${String(e.value)}`);let n=t.configOptions.find(t=>t.id===e.configId);if(!n)throw Error(`Unknown config option: ${e.configId}`);if(n.type===`select`){let t=$i(n.options);if(!t.includes(e.value))throw Error(`Invalid value '${e.value}' for config option ${e.configId}; must be one of: ${t.join(`, `)}`)}let r=e.value;return e.configId===`mode`?(this.applySessionMode(e.sessionId,r),await Q(this).sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:r}})):e.configId===`model`&&t.queryEngine.setModel(r),ea(this,t,e.configId,r),t.configOptions=t.configOptions.map(t=>t.id===e.configId&&typeof t.currentValue==`string`?{...t,currentValue:r}:t),{configOptions:t.configOptions}}async function ma(e,t,n){let r=e.sessions.get(t);if(!r)return;let i=r.toolUseCache;if(i.__sessionInfoTitleSent)return;i.__sessionInfoTitleSent=!0;let a=Di(n).slice(0,100);try{await Q(e).sessionUpdate({sessionId:t,update:{sessionUpdate:`session_info_update`,...a?{title:a}:{},updatedAt:new Date().toISOString()}})}catch(e){console.error(`[ACP] Failed to send session_info_update:`,e)}}Object.assign(Z.prototype,{prompt:fa,setSessionConfigOption:pa}),ve(),Oe();function ha(e,t){let n=je.toWeb(e);return _i(Me.toWeb(t),n)}async function ga(){ye(),De();let e=ha(process.stdin,process.stdout),t,n=new yi(e=>(t=new Z(e),t),e);console.log=console.error,console.info=console.error,console.warn=console.error,console.debug=console.error;async function r(){for(let[e]of t.sessions)try{await t.unstable_closeSession({sessionId:e})}catch{}process.exit(0)}n.closed.then(r).catch(r),process.on(`SIGTERM`,r),process.on(`SIGINT`,r),process.on(`unhandledRejection`,(e,t)=>{console.error(`Unhandled Rejection at:`,t,`reason:`,e)}),process.stdin.resume()}export{ga as runAcpAgent};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{D as t,E as n,N as r,_ as i,n as a,r as o,t as s}from"./lazySchema-DULtBUCI.js";import{i as c,r as l}from"./semver-BMRJYn3q.js";import{r as u,s as d}from"./bridgeEnabled-Cc0mGlTb.js";async function f(){let e=h,t=g().safeParse(e);return t.success?t.data:h}async function p(){let e=await f();return e.min_version&&c(`0.0.7`,e.min_version)?`Your version of Work Mate (0.0.7) is too old for Remote Control.\nVersion ${e.min_version} or higher is required. Run \`claude update\` to update.`:null}async function m(){return d()?(await f()).should_show_app_upgrade_message:!1}var h,g,_=e((()=>{o(),s(),l(),u(),h={init_retry_max_attempts:3,init_retry_base_delay_ms:500,init_retry_jitter_fraction:.25,init_retry_max_delay_ms:4e3,http_timeout_ms:1e4,uuid_dedup_buffer_size:2e3,heartbeat_interval_ms:2e4,heartbeat_jitter_fraction:.1,token_refresh_buffer_ms:3e5,teardown_archive_timeout_ms:1500,connect_timeout_ms:15e3,min_version:`0.0.0`,should_show_app_upgrade_message:!1},g=a(()=>t({init_retry_max_attempts:n().int().min(1).max(10).default(3),init_retry_base_delay_ms:n().int().min(100).default(500),init_retry_jitter_fraction:n().min(0).max(1).default(.25),init_retry_max_delay_ms:n().int().min(500).default(4e3),http_timeout_ms:n().int().min(2e3).default(1e4),uuid_dedup_buffer_size:n().int().min(100).max(5e4).default(2e3),heartbeat_interval_ms:n().int().min(5e3).max(3e4).default(2e4),heartbeat_jitter_fraction:n().min(0).max(.5).default(.1),token_refresh_buffer_ms:n().int().min(3e4).max(18e5).default(3e5),teardown_archive_timeout_ms:n().int().min(500).max(2e3).default(1500),connect_timeout_ms:n().int().min(5e3).max(6e4).default(15e3),min_version:r().refine(e=>{try{return c(e,`0.0.0`),!0}catch{return!1}}).default(`0.0.0`),should_show_app_upgrade_message:i().default(!1)}))}));export{m as a,_ as i,p as n,f as r,h as t};
@@ -1 +0,0 @@
1
- import{a as e,i as t}from"./envLessBridgeConfig-B-LKYNvv.js";t();export{e as shouldShowAppUpgradeMessage};
@@ -1 +0,0 @@
1
- import{a as e,n as t,r as n}from"./rolldown-runtime-DaDcL9Zw.js";import{n as r,t as i}from"./memoize-BK3gG5ob.js";import{homedir as a}from"os";import{join as o}from"path";var s=n({checkProtectedNamespace:()=>c}),c,l=t((()=>{c=()=>!1}));function u(e){let t=process.env.NODE_OPTIONS;return t?t.split(/\s+/).includes(e):!1}function d(e){if(!e)return!1;if(typeof e==`boolean`)return e;let t=e.toLowerCase().trim();return[`1`,`true`,`yes`,`on`].includes(t)}function f(e){if(e===void 0)return!1;if(typeof e==`boolean`)return!e;if(!e)return!1;let t=e.toLowerCase().trim();return[`0`,`false`,`no`,`off`].includes(t)}function p(){return d(process.env.CLAUDE_CODE_SIMPLE)||process.argv.includes(`--bare`)}function m(e){let t={};if(e)for(let n of e){let[e,...r]=n.split(`=`);if(!e||r.length===0)throw Error(`Invalid environment variable format: ${n}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);t[e]=r.join(`=`)}return t}function h(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||`us-east-1`}function g(){return process.env.CLOUD_ML_REGION||`us-east5`}function _(){return d(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function v(){return process.env.USER_TYPE===`ant`&&d(process.env.COO_RUNNING_ON_HOMESPACE)}function y(){return process.env.USER_TYPE===`ant`&&(l(),e(s)).checkProtectedNamespace()}function b(e){if(e){let t=S.find(([t])=>e.startsWith(t));if(t)return process.env[t[1]]||g()}return g()}var x,S,C=t((()=>{i(),x=r(()=>(process.env.CLAUDE_CONFIG_DIR??o(a(),`.claude`)).normalize(`NFC`),()=>process.env.CLAUDE_CONFIG_DIR),S=[[`claude-haiku-4-5`,`VERTEX_REGION_CLAUDE_HAIKU_4_5`],[`claude-3-5-haiku`,`VERTEX_REGION_CLAUDE_3_5_HAIKU`],[`claude-3-5-sonnet`,`VERTEX_REGION_CLAUDE_3_5_SONNET`],[`claude-3-7-sonnet`,`VERTEX_REGION_CLAUDE_3_7_SONNET`],[`claude-opus-4-1`,`VERTEX_REGION_CLAUDE_4_1_OPUS`],[`claude-opus-4`,`VERTEX_REGION_CLAUDE_4_0_OPUS`],[`claude-sonnet-4-6`,`VERTEX_REGION_CLAUDE_4_6_SONNET`],[`claude-sonnet-4-5`,`VERTEX_REGION_CLAUDE_4_5_SONNET`],[`claude-sonnet-4`,`VERTEX_REGION_CLAUDE_4_0_SONNET`]]}));export{u as a,f as c,v as d,m as f,b as i,d as l,x as n,C as o,_ as p,g as r,p as s,h as t,y as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{l as r,o as i}from"./envUtils-DSxRz_kt.js";import{n as a,t as o}from"./defineProperty-C-QyHrDq.js";import{E as s,O as c,S as l,i as u,l as d,n as f,s as p,v as m}from"./esm-lWlUmoUA.js";import{C as h,D as g,E as _,I as ee,O as v,S as te,V as ne,_ as re,a as y,d as ie,k as ae,l as oe,n as se,p as ce,s as le,t as ue,w as de,x as fe,y as b}from"./esm-Cb-L4oAk.js";import{a as x,r as pe,t as me}from"./esm-Bx6rTxIs.js";import{C as he,H as ge,R as _e,en as ve,ht as ye,rt as be}from"./state-ix0xIunV.js";import{S as xe,a as Se,w as Ce,z as we}from"./debug-BrXObCdR.js";import{$t as Te,Qt as Ee,Xt as S,Yt as De}from"./settings-BeLFUeie.js";import{_ as Oe,m as ke}from"./git-Do0wJvux.js";import{r as Ae,t as je}from"./execFileNoThrow-D244NytW.js";import{a as Me,n as Ne,o as Pe,r as Fe}from"./platform-BrYefG_2.js";import{An as Ie,Bt as Le,Ft as Re,Gt as ze,_ as Be,jn as Ve,u as He}from"./model-CZViyZnE.js";import{i as Ue,t as We}from"./genericProcessUtils-CdQTApYX.js";import{arch as Ge,hostname as Ke,platform as qe,release as Je}from"os";import{extname as Ye}from"path";import{stat as Xe}from"fs/promises";import{inspect as Ze}from"util";import*as Qe from"process";import{AsyncLocalStorage as $e}from"async_hooks";function et(){return process.platform===`linux`&&r(process.env.CLAUDE_CODE_BUBBLEWRAP)}function tt(){return process.platform===`linux`?C??!1:!1}async function nt(){if(w!==void 0)return w;if(process.platform===`darwin`)return w=null,null;try{let e=await We(process.pid,10);for(let t of e){let e=t.toLowerCase();for(let t of De)if(e.includes(t))return w=t,t}}catch{}return w=null,null}async function rt(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&S.platform!==`darwin`?await nt()||`pycharm`:S.terminal}function it(){return process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&S.platform!==`darwin`?w===void 0?`pycharm`:w||`pycharm`:S.terminal}async function at(){process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`&&await nt()}var ot,C,w,T,st=e((()=>{n(),Te(),i(),Ae(),Ue(),ot=t(async()=>{if(process.platform!==`linux`)return!1;let{code:e}=await je(`test`,[`-f`,`/.dockerenv`]);return e===0}),C=null,process.platform===`linux`&&Xe(`/lib/libc.musl-${process.arch===`x64`?`x86_64`:`aarch64`}.so.1`).then(()=>{C=!0},()=>{C=!1}),T={...S,terminal:it(),getIsDocker:ot,getIsBubblewrapSandbox:et,isMuslEnvironment:tt,getTerminalWithJetBrainsDetectionAsync:rt,initJetBrainsDetection:at}}));function ct(e){return lt?.has(e)??!1}var lt,ut=e((()=>{Se(),we()}));function E(){return D.getStore()}function dt(e,t){return D.run(e,t)}function ft(e){return e?.agentType===`subagent`}function pt(){let e=E();if(!(!ft(e)||!e.subagentName))return e.isBuiltIn?e.subagentName:`user-defined`}function mt(){let e=E();if(!(!e?.invokingRequestId||e.invocationEmitted))return e.invocationEmitted=!0,{invokingRequestId:e.invokingRequestId,invocationKind:e.invocationKind}}var D,ht=e((()=>{D=new $e}));function gt(e){return e.startsWith(`mcp__`)?`mcp_tool`:e}function _t(){return r(process.env.OTEL_LOG_TOOL_DETAILS)}function vt(e,t){return!!(process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`||e===`claudeai-proxy`||t&&ct(t))}function yt(e,t,n){let r=bt(e);return!r||!Ot.has(r.serverName)&&!vt(t,n)?{}:{mcpServerName:r.serverName,mcpToolName:r.mcpToolName}}function bt(e){if(!e.startsWith(`mcp__`))return;let t=e.split(`__`);if(t.length<3)return;let n=t[1],r=t.slice(2).join(`__`);if(!(!n||!r))return{serverName:n,mcpToolName:r}}function xt(e,t){if(e===`Skill`&&typeof t==`object`&&t&&`skill`in t&&typeof t.skill==`string`)return t.skill}function O(e,t=0){if(typeof e==`string`)return e.length>kt?`${e.slice(0,At)}…[${e.length} chars]`:e;if(typeof e==`number`||typeof e==`boolean`||e==null)return e;if(t>=jt)return`<nested>`;if(Array.isArray(e)){let n=e.slice(0,j).map(e=>O(e,t+1));return e.length>j&&n.push(`…[${e.length} items]`),n}if(typeof e==`object`){let n=Object.entries(e).filter(([e])=>!e.startsWith(`_`)),r=n.slice(0,j).map(([e,n])=>[e,O(n,t+1)]);return n.length>j&&r.push([`…`,`${n.length} keys`]),Object.fromEntries(r)}return String(e)}function St(e){if(!_t())return;let t=Ce(O(e));return t.length>A&&(t=t.slice(0,A)+`…[truncated]`),t}function k(e){let t=Ye(e).toLowerCase();if(!t||t===`.`)return;let n=t.slice(1);return n.length>Mt?`other`:n}function Ct(e,t){if(!e.includes(`.`)&&!t)return;let n,r=new Set;if(t){let e=k(t);e&&(r.add(e),n=e)}for(let t of e.split(Pt)){if(!t)continue;let e=t.split(Ft);if(e.length<2)continue;let i=e[0],a=i.lastIndexOf(`/`),o=a>=0?i.slice(a+1):i;if(Nt.has(o))for(let t=1;t<e.length;t++){let i=e[t];if(i.charCodeAt(0)===45)continue;let a=k(i);a&&!r.has(a)&&(r.add(a),n=n?n+`,`+a:a)}}if(n)return n}function wt(){let e=E();if(e)return{agentId:e.agentId,parentSessionId:e.parentSessionId,agentType:e.agentType};let t=process.env.CLAUDE_CODE_AGENT_ID,n=process.env.CLAUDE_CODE_PARENT_SESSION_ID,r=t?`standalone`:void 0;if(t||r||n)return{...t?{agentId:t}:{},...r?{agentType:r}:{},...n?{parentSessionId:n}:{}};let i=be();return i?{parentSessionId:i}:{}}function Tt(){try{let e=process.memoryUsage(),t=process.cpuUsage(),n=Date.now(),r;if(M&&N){let e=n-N;e>0&&(r=(t.user-M.user+(t.system-M.system))/(e*1e3)*100)}return M=t,N=n,{uptime:process.uptime(),rss:e.rss,heapTotal:e.heapTotal,heapUsed:e.heapUsed,external:e.external,arrayBuffers:e.arrayBuffers,constrainedMemory:process.constrainedMemory(),cpuUsage:t,cpuPercent:r}}catch{return}}async function Et(e={}){let t=e.model?String(e.model):He(),n=typeof e.betas==`string`?e.betas:Ie(t).join(`,`),[r,i]=await Promise.all([Lt(),ke()]),a=Tt();return{model:t,sessionId:ye(),userType:process.env.USER_TYPE||``,...n.length>0?{betas:n}:{},envContext:r,...process.env.CLAUDE_CODE_ENTRYPOINT&&{entrypoint:process.env.CLAUDE_CODE_ENTRYPOINT},...process.env.CLAUDE_AGENT_SDK_VERSION&&{agentSdkVersion:process.env.CLAUDE_AGENT_SDK_VERSION},isInteractive:String(_e()),clientType:he(),...a&&{processMetrics:a},sweBenchRunId:process.env.SWE_BENCH_RUN_ID||``,sweBenchInstanceId:process.env.SWE_BENCH_INSTANCE_ID||``,sweBenchTaskId:process.env.SWE_BENCH_TASK_ID||``,...wt(),...Re()&&{subscriptionType:Re()},...ge()?{kairosActive:!0}:{},...i&&{rh:i}}}function Dt(e,t,n={}){let{envContext:r,processMetrics:i,rh:a,kairosActive:o,skillMode:s,observerMode:c,...l}=e,u={platform:r.platform,platform_raw:r.platformRaw,arch:r.arch,node_version:r.nodeVersion,terminal:r.terminal||`unknown`,package_managers:r.packageManagers,runtimes:r.runtimes,is_running_with_bun:r.isRunningWithBun,is_ci:r.isCi,is_claubbit:r.isClaubbit,is_claude_code_remote:r.isClaudeCodeRemote,is_local_agent_mode:r.isLocalAgentMode,is_conductor:r.isConductor,is_github_action:r.isGithubAction,is_claude_code_action:r.isClaudeCodeAction,is_claude_ai_auth:r.isClaudeAiAuth,version:r.version,build_time:r.buildTime,deployment_environment:r.deploymentEnvironment};r.remoteEnvironmentType&&(u.remote_environment_type=r.remoteEnvironmentType),r.claudeCodeContainerId&&(u.claude_code_container_id=r.claudeCodeContainerId),r.claudeCodeRemoteSessionId&&(u.claude_code_remote_session_id=r.claudeCodeRemoteSessionId),r.tags&&(u.tags=r.tags.split(`,`).map(e=>e.trim()).filter(Boolean)),r.githubEventName&&(u.github_event_name=r.githubEventName),r.githubActionsRunnerEnvironment&&(u.github_actions_runner_environment=r.githubActionsRunnerEnvironment),r.githubActionsRunnerOs&&(u.github_actions_runner_os=r.githubActionsRunnerOs),r.githubActionRef&&(u.github_action_ref=r.githubActionRef),r.wslVersion&&(u.wsl_version=r.wslVersion),r.linuxDistroId&&(u.linux_distro_id=r.linuxDistroId),r.linuxDistroVersion&&(u.linux_distro_version=r.linuxDistroVersion),r.linuxKernel&&(u.linux_kernel=r.linuxKernel),r.vcs&&(u.vcs=r.vcs),r.versionBase&&(u.version_base=r.versionBase);let d={session_id:l.sessionId,model:l.model,user_type:l.userType,is_interactive:l.isInteractive===`true`,client_type:l.clientType};if(l.betas&&(d.betas=l.betas),l.entrypoint&&(d.entrypoint=l.entrypoint),l.agentSdkVersion&&(d.agent_sdk_version=l.agentSdkVersion),l.sweBenchRunId&&(d.swe_bench_run_id=l.sweBenchRunId),l.sweBenchInstanceId&&(d.swe_bench_instance_id=l.sweBenchInstanceId),l.sweBenchTaskId&&(d.swe_bench_task_id=l.sweBenchTaskId),l.agentId&&(d.agent_id=l.agentId),l.parentSessionId&&(d.parent_session_id=l.parentSessionId),l.agentType&&(d.agent_type=l.agentType),t.githubActionsMetadata){let e=t.githubActionsMetadata;u.github_actions_metadata={actor_id:e.actorId,repository_id:e.repositoryId,repository_owner_id:e.repositoryOwnerId}}let f;return(t.accountUuid||t.organizationUuid)&&(f={account_uuid:t.accountUuid,organization_uuid:t.organizationUuid}),{env:u,...i&&{process:Buffer.from(Ce(i)).toString(`base64`)},...f&&{auth:f},core:d,additional:{...a&&{rh:a},...o&&{is_assistant_mode:!0},...s&&{skill_mode:s},...c&&{observer_mode:c},...n}}}var Ot,kt,At,A,j,jt,Mt,Nt,Pt,Ft,It,Lt,M,N,Rt=e((()=>{n(),Te(),st(),Ve(),Be(),ve(),i(),ut(),Le(),Oe(),Pe(),ht(),xe(),Ot=new Set,kt=512,At=128,A=4*1024,j=20,jt=2,Mt=10,Nt=new Set([`rm`,`mv`,`cp`,`touch`,`mkdir`,`chmod`,`chown`,`cat`,`head`,`tail`,`sort`,`stat`,`diff`,`wc`,`grep`,`rg`,`sed`]),Pt=/\s*(?:&&|\|\||[;|])\s*/,Ft=/\s+/,It=t(()=>{let e=`0.0.7`.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);return e?e[0]:void 0}),Lt=t(async()=>{let[e,t,n,i]=await Promise.all([S.getPackageManagers(),S.getRuntimes(),Fe(),Ne()]);return{platform:Ee(),platformRaw:process.env.CLAUDE_CODE_HOST_PLATFORM||process.platform,arch:S.arch,nodeVersion:S.nodeVersion,terminal:T.terminal,packageManagers:e.join(`,`),runtimes:t.join(`,`),isRunningWithBun:S.isRunningWithBun(),isCi:r(process.env.CI),isClaubbit:r(process.env.CLAUBBIT),isClaudeCodeRemote:r(process.env.CLAUDE_CODE_REMOTE),isLocalAgentMode:process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`,isConductor:S.isConductor(),...process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE&&{remoteEnvironmentType:process.env.CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE},...process.env.CLAUDE_CODE_CONTAINER_ID&&{claudeCodeContainerId:process.env.CLAUDE_CODE_CONTAINER_ID},...process.env.CLAUDE_CODE_REMOTE_SESSION_ID&&{claudeCodeRemoteSessionId:process.env.CLAUDE_CODE_REMOTE_SESSION_ID},...process.env.CLAUDE_CODE_TAGS&&{tags:process.env.CLAUDE_CODE_TAGS},isGithubAction:r(process.env.GITHUB_ACTIONS),isClaudeCodeAction:r(process.env.CLAUDE_CODE_ACTION),isClaudeAiAuth:ze(),version:`0.0.7`,versionBase:It(),buildTime:`2026-08-11T09:29:34.204Z`,deploymentEnvironment:S.detectDeploymentEnvironment(),...r(process.env.GITHUB_ACTIONS)&&{githubEventName:process.env.GITHUB_EVENT_NAME,githubActionsRunnerEnvironment:process.env.RUNNER_ENVIRONMENT,githubActionsRunnerOs:process.env.RUNNER_OS,githubActionRef:process.env.GITHUB_ACTION_PATH?.includes(`claude-code-action/`)?process.env.GITHUB_ACTION_PATH.split(`claude-code-action/`)[1]:void 0},...Me()&&{wslVersion:Me()},...n??{},...i.length>0?{vcs:i.join(`,`)}:{}}}),M=null,N=null}));function zt(e){return e.setValue(Vt,!0)}function Bt(e){return e.getValue(Vt)===!0}var Vt,P=e((()=>{f(),Vt=c(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`)}));function Ht(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!Ut(n)){p.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Wt(r)){p.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function Ut(e){return typeof e==`string`&&e!==``}function Wt(e){return e==null?!0:Array.isArray(e)?Gt(e):Kt(typeof e)}function Gt(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(Kt(e)){t=e;continue}return!1}return!1}}return!0}function Kt(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}var qt=e((()=>{f()}));function Jt(){return e=>{p.error(Yt(e))}}function Yt(e){return typeof e==`string`?e:JSON.stringify(Xt(e))}function Xt(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var Zt=e((()=>{f()}));function Qt(e){try{$t(e)}catch{}}var $t,en=e((()=>{Zt(),$t=Jt()}));function tn(e){let t=process.env[e];if(t==null||t.trim()===``)return;let n=Number(t);if(isNaN(n)){p.warn(`Unknown value ${Ze(t)} for ${e}, expected a number, using defaults`);return}return n}function F(e){let t=process.env[e];if(!(t==null||t.trim()===``))return t}var nn=e((()=>{f()})),rn,an=e((()=>{rn=`2.9.0`})),on,sn=e((()=>{on=`process.runtime.name`})),I,cn=e((()=>{an(),b(),sn(),I={[g]:`opentelemetry`,[on]:`node`,[_]:ae,[v]:rn}})),L,ln=e((()=>{nn(),cn(),L=performance})),un=e((()=>{ln()}));function R(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*yn)]}function dn(e){return _n(R(L.timeOrigin),R(typeof e==`number`?e:L.now()))}function fn(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=z),[n,r]}function pn(e){return e[0]*1e6+e[1]/1e3}function mn(e){return e[0]+e[1]/z}function hn(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function gn(e){return hn(e)||typeof e==`number`||e instanceof Date}function _n(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=z&&(n[1]-=z,n[0]+=1),n}var vn,yn,z,bn=e((()=>{un(),vn=9,yn=10**6,z=10**vn})),B,xn=e((()=>{(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(B||(B={}))}));function Sn(e){if(!Cn(e)||wn(e)!==Dn)return!1;let t=jn(e);if(t===null)return!0;let n=U.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&V.call(n)===An}function Cn(e){return typeof e==`object`&&!!e}function wn(e){return e==null?e===void 0?kn:On:W&&W in Object(e)?Tn(e):En(e)}function Tn(e){let t=U.call(e,W),n=e[W],r=!1;try{e[W]=void 0,r=!0}catch{}let i=G.call(e);return r&&(t?e[W]=n:delete e[W]),i}function En(e){return G.call(e)}var Dn,On,kn,V,An,jn,H,U,W,G,Mn=e((()=>{Dn=`[object Object]`,On=`[object Null]`,kn=`[object Undefined]`,V=Function.prototype.toString,An=V.call(Object),jn=Object.getPrototypeOf,H=Object.prototype,U=H.hasOwnProperty,W=Symbol?Symbol.toStringTag:void 0,G=H.toString}));function Nn(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Pn(t,e.shift(),0,n);return t}function K(e){return q(e)?e.slice():e}function Pn(e,t,n=0,r){let i;if(!(n>Rn)){if(n++,Y(e)||Y(t)||In(t))i=K(t);else if(q(e)){if(i=e.slice(),q(t))for(let e=0,n=t.length;e<n;e++)i.push(K(t[e]));else if(J(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r===`__proto__`||r===`constructor`||r===`prototype`||(i[r]=K(t[r]))}}}else if(J(e))if(J(t)){if(!Ln(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(Y(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(Fn(e,s,r)||Fn(t,s,r))delete i[s];else{if(J(a)&&J(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=Pn(i[s],c,n,r)}}}}else i=t;return i}}function Fn(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function q(e){return Array.isArray(e)}function In(e){return typeof e==`function`}function J(e){return!Y(e)&&!q(e)&&!In(e)&&typeof e==`object`}function Y(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function Ln(e,t){return!(!Sn(e)||!Sn(t))}var Rn,zn=e((()=>{Mn(),Rn=20})),Bn,Vn=e((()=>{a(),Bn=class{constructor(){o(this,`_promise`,void 0),o(this,`_resolve`,void 0),o(this,`_reject`,void 0),this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}})),Hn,Un=e((()=>{Vn(),a(),Hn=class{constructor(e,t){o(this,`_isCalled`,!1),o(this,`_deferred`,new Bn),o(this,`_callback`,void 0),o(this,`_that`,void 0),this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}}}));function Wn(e,t){return new Promise(n=>{d.with(zt(d.active()),()=>{e.export(t,n)})})}var Gn=e((()=>{f(),P()})),Kn,X=e((()=>{P(),qt(),en(),Zt(),bn(),xn(),un(),zn(),Un(),Gn(),Kn={_export:Wn}}));function qn(){if(Z===void 0)try{let e=globalThis.process.argv0;Z=e?`unknown_service:${e}`:`unknown_service`}catch{Z=`unknown_service`}return Z}var Z,Jn=e((()=>{})),Q,Yn=e((()=>{Q=e=>typeof e==`object`&&!!e&&typeof e.then==`function`}));function Xn(e,t){return tr.FromAttributeList(Object.entries(e),t)}function Zn(){return Xn({[de]:qn(),[_]:I[_],[g]:I[g],[v]:I[v]})}function Qn(e){return e.map(([e,t])=>Q(t)?[e,t.catch(t=>{p.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function $n(e){if(typeof e==`string`||e===void 0)return e;p.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function er(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;p.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var tr,nr=e((()=>{f(),X(),b(),Jn(),Yn(),a(),tr=class e{static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=Qn(t),r._asyncAttributesPending=t.filter(([e,t])=>Q(t)).length>0,r}constructor(e,t){o(this,`_rawAttributes`,void 0),o(this,`_asyncAttributesPending`,!1),o(this,`_schemaUrl`,void 0),o(this,`_memoizedAttributes`,void 0);let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(Q(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=Qn(this._rawAttributes),this._schemaUrl=$n(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,Q(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&p.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,n]of this._rawAttributes){if(Q(n)){p.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??(e[t]=n))}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=er(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}}})),rr,ir,ar=e((()=>{f(),b(),X(),a(),rr=class{constructor(){o(this,`_MAX_LENGTH`,255),o(this,`_COMMA_SEPARATOR`,`,`),o(this,`_LABEL_KEY_VALUE_SPLITTER`,`=`)}detect(e){let t={},n=F(`OTEL_RESOURCE_ATTRIBUTES`),r=F(`OTEL_SERVICE_NAME`);if(n)try{let e=this._parseResourceAttributes(n);Object.assign(t,e)}catch(e){p.debug(`EnvDetector failed: ${e instanceof Error?e.message:e}`)}return r&&(t[de]=r),{attributes:t}}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR).filter(e=>e.trim()!==``);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER);if(n.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${e}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[r,i]=n,a=r.trim(),o=i.trim();if(a.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${e}".`);let s,c;try{s=decodeURIComponent(a),c=decodeURIComponent(o)}catch(t){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${e}": ${t instanceof Error?t.message:t}`,{cause:t})}if(s.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${s}".`);if(c.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${s}".`);t[s]=c}return t}},ir=new rr})),or,sr,cr,lr,ur,dr=e((()=>{or=`host.arch`,sr=`host.id`,cr=`host.name`,lr=`os.type`,ur=`os.version`}));async function fr(){if(!$)switch(Qe.platform){case`darwin`:$=(await import(`./getMachineId-darwin-CsRhaP3y.js`)).getMachineId;break;case`linux`:$=(await import(`./getMachineId-linux-Bd7UBNRQ.js`)).getMachineId;break;case`freebsd`:$=(await import(`./getMachineId-bsd-Cut1kHoA.js`)).getMachineId;break;case`win32`:$=(await import(`./getMachineId-win-DamF2CH_.js`)).getMachineId;break;default:$=(await import(`./getMachineId-unsupported-vFGP8E_8.js`)).getMachineId;break}return $()}var $,pr=e((()=>{})),mr,hr,gr=e((()=>{mr=e=>{switch(e){case`arm`:return`arm32`;case`ppc`:return`ppc32`;case`x64`:return`amd64`;default:return e}},hr=e=>{switch(e){case`sunos`:return`solaris`;case`win32`:return`windows`;default:return e}}})),_r,vr,yr=e((()=>{dr(),pr(),gr(),_r=class{detect(e){return{attributes:{[cr]:Ke(),[or]:mr(Ge()),[sr]:fr()}}}},vr=new _r})),br,xr,Sr=e((()=>{dr(),gr(),br=class{detect(e){return{attributes:{[lr]:hr(qe()),[ur]:Je()}}}},xr=new br})),Cr=e((()=>{yr(),Sr(),dr()})),wr=e((()=>{Cr()})),Tr=e((()=>{ar(),wr()})),Er=e((()=>{nr(),Tr(),Jn()}));function Dr(e){return Or(e,new WeakSet)}function Or(e,t){if(e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e instanceof Uint8Array)return!0;if(typeof e==`object`){if(t.has(e))return!1;if(t.add(e),Array.isArray(e))return e.every(e=>Or(e,t));let n=e;return n.constructor!==Object&&n.constructor!==void 0?!1:Object.values(n).every(e=>Or(e,t))}return!1}var kr=e((()=>{})),Ar,jr=e((()=>{f(),y(),b(),kr(),a(),Ar=class{set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get eventName(){return this._eventName}set eventName(e){this._isLogRecordReadonly()||(this._eventName=e)}get droppedAttributesCount(){return this._droppedAttributesCount}constructor(e,t,n){o(this,`hrTime`,void 0),o(this,`hrTimeObserved`,void 0),o(this,`spanContext`,void 0),o(this,`resource`,void 0),o(this,`instrumentationScope`,void 0),o(this,`attributes`,{}),o(this,`_severityText`,void 0),o(this,`_severityNumber`,void 0),o(this,`_body`,void 0),o(this,`_eventName`,void 0),o(this,`_attributesCount`,0),o(this,`_droppedAttributesCount`,0),o(this,`_isReadonly`,!1),o(this,`_logRecordLimits`,void 0);let{timestamp:r,observedTimestamp:i,eventName:a,severityNumber:s,severityText:c,body:l,attributes:d={},exception:f,context:p}=n,h=Date.now();if(this.hrTime=re(r??h),this.hrTimeObserved=re(i??h),p){let e=u.getSpanContext(p);e&&m(e)&&(this.spanContext=e)}this.severityNumber=s,this.severityText=c,this.body=l,this.resource=e.resource,this.instrumentationScope=t,this._logRecordLimits=e.logRecordLimits,this._eventName=a,this.setAttributes(d),f!=null&&this._setException(f)}setAttribute(e,t){if(this._isLogRecordReadonly())return this;if(e.length===0)return p.warn(`Invalid attribute key: ${e}`),this;if(!Dr(t))return p.warn(`Invalid attribute value set for key: ${e}`),this;let n=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n&&this._attributesCount>=this._logRecordLimits.attributeCountLimit?(this._droppedAttributesCount++,this._droppedAttributesCount===1&&p.warn(`Dropping extra attributes.`),this):(this.attributes[e]=this._truncateToSize(t),n&&this._attributesCount++,this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}setBody(e){return this.body=e,this}setEventName(e){return this.eventName=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){let t=this._logRecordLimits.attributeValueLengthLimit;if(t<=0)return p.warn(`Attribute value limit must be positive, got ${t}`),e;if(e==null)return e;if(typeof e==`string`)return this._truncateToLimitUtil(e,t);if(e instanceof Uint8Array)return e;if(Array.isArray(e))return e.map(e=>this._truncateToSize(e));if(typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))t[n]=this._truncateToSize(r);return t}return e}_setException(e){let t=!1;if(typeof e==`string`||typeof e==`number`)Object.hasOwn(this.attributes,`exception.message`)||this.setAttribute(fe,String(e)),t=!0;else if(e&&typeof e==`object`){let n=e;n.code?(Object.hasOwn(this.attributes,`exception.type`)||this.setAttribute(h,n.code.toString()),t=!0):n.name&&(Object.hasOwn(this.attributes,`exception.type`)||this.setAttribute(h,n.name),t=!0),n.message&&(Object.hasOwn(this.attributes,`exception.message`)||this.setAttribute(fe,n.message),t=!0),n.stack&&(Object.hasOwn(this.attributes,`exception.stacktrace`)||this.setAttribute(te,n.stack),t=!0)}t||p.warn(`Failed to record an exception ${e}`)}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_isLogRecordReadonly(){return this._isReadonly&&p.warn(`Can not execute the operation on emitted log record`),this._isReadonly}}})),Mr,Nr=e((()=>{me(),f(),jr(),a(),Mr=class{constructor(e,t){o(this,`instrumentationScope`,void 0),o(this,`_sharedState`,void 0),o(this,`_loggerConfig`,void 0),this.instrumentationScope=e,this._sharedState=t,this._loggerConfig=this._sharedState.getLoggerConfig(this.instrumentationScope)}emit(e){let t=this._loggerConfig,n=e.context||d.active(),r=e.severityNumber??x.UNSPECIFIED;if(r!==x.UNSPECIFIED&&r<t.minimumSeverity)return;if(t.traceBased){let e=u.getSpanContext(n);if(e&&m(e)&&(e.traceFlags&l.SAMPLED)!==l.SAMPLED)return}let i=new Ar(this._sharedState,this.instrumentationScope,{context:n,...e});this._sharedState.loggerMetrics.emitLog(),this._sharedState.activeProcessor.onEmit(i,n),i._makeReadonly()}enabled(e){let t=this._loggerConfig;if(t.disabled)return!1;let n=e?.severityNumber;if(typeof n==`number`&&n!==x.UNSPECIFIED&&n<t.minimumSeverity)return!1;let r=e?.context||d.active();if(t.traceBased){let e=u.getSpanContext(r);if(e&&m(e)&&(e.traceFlags&l.SAMPLED)!==l.SAMPLED)return!1}let i={context:r,instrumentationScope:this.instrumentationScope,severityNumber:e?.severityNumber,eventName:e?.eventName};for(let e of this._sharedState.processors)if(!e.enabled||e.enabled(i))return!0;return!1}}})),Pr,Fr=e((()=>{Pr=class{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}enabled(e){return!1}}})),Ir,Lr=e((()=>{y(),a(),Ir=class{constructor(e,t){o(this,`processors`,void 0),o(this,`forceFlushTimeoutMillis`,void 0),this.processors=e,this.forceFlushTimeoutMillis=t}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(t=>oe(t.forceFlush(),e)))}onEmit(e,t){this.processors.forEach(n=>n.onEmit(e,t))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}enabled(e){for(let t of this.processors)if(!t.enabled||t.enabled(e))return!0;return!1}}}));function Rr(e){return`${e.name}@${e.version||``}:${e.schemaUrl||``}`}var zr=e((()=>{})),Br,Vr=e((()=>{Br=`otel.sdk.log.created`})),Hr,Ur=e((()=>{Vr(),a(),Hr=class{constructor(e){o(this,`createdLogs`,void 0),this.createdLogs=e.createCounter(Br,{unit:`{log_record}`,description:`The number of logs submitted to enabled SDK Loggers.`})}emitLog(){this.createdLogs.add(1)}}})),Wr,Gr=e((()=>{Wr=`0.215.0`})),Kr,qr,Jr,Yr=e((()=>{f(),me(),Fr(),Lr(),zr(),Ur(),Gr(),a(),Kr={disabled:!1,minimumSeverity:x.UNSPECIFIED,traceBased:!1},qr=()=>({...Kr}),Jr=class{constructor(e,t,n,r,i,a){o(this,`loggers`,new Map),o(this,`activeProcessor`,void 0),o(this,`registeredLogRecordProcessors`,[]),o(this,`resource`,void 0),o(this,`forceFlushTimeoutMillis`,void 0),o(this,`logRecordLimits`,void 0),o(this,`processors`,void 0),o(this,`loggerMetrics`,void 0),o(this,`_loggerConfigurator`,void 0),o(this,`_loggerConfigs`,new Map),this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=n,this.processors=r,r.length>0?(this.registeredLogRecordProcessors=r,this.activeProcessor=new Ir(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new Pr,this._loggerConfigurator=i??qr;let c=a?a.getMeter(`@opentelemetry/sdk-logs`,Wr):s();this.loggerMetrics=new Hr(c)}getLoggerConfig(e){let t=Rr(e),n=this._loggerConfigs.get(t);return n||(n=this._loggerConfigurator(e),this._loggerConfigs.set(t,n),n)}}})),Xr,Zr=e((()=>{f(),me(),ue(),y(),Nr(),Yr(),a(),Xr=class{constructor(e={}){o(this,`_shutdownOnce`,void 0),o(this,`_sharedState`,void 0);let t={resource:e.resource??se(),forceFlushTimeoutMillis:e.forceFlushTimeoutMillis??3e4,logRecordLimits:{attributeCountLimit:e.logRecordLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.logRecordLimits?.attributeValueLengthLimit??1/0},loggerConfigurator:e.loggerConfigurator??qr,processors:e.processors??[],meterProvider:e.meterProvider};this._sharedState=new Jr(t.resource,t.forceFlushTimeoutMillis,t.logRecordLimits,t.processors,t.loggerConfigurator,t.meterProvider),this._shutdownOnce=new le(this._shutdown,this)}getLogger(e,t,n){if(this._shutdownOnce.isCalled)return p.warn(`A shutdown LoggerProvider cannot provide a Logger`),pe;e||p.warn(`Logger requested without instrumentation scope name.`);let r=e||`unknown`,i=`${r}@${t||``}:${n?.schemaUrl||``}`;return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new Mr({name:r,version:t,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)}forceFlush(){return this._shutdownOnce.isCalled?(p.warn(`invalid attempt to force flush after LoggerProvider shutdown`),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(p.warn(`shutdown may only be called once per LoggerProvider`),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}}})),Qr,$r=e((()=>{y(),Qr=class{export(e,t){this._sendLogRecords(e,t)}async forceFlush(){}async shutdown(){}_exportInfo(e){return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,timestamp:ce(e.hrTime),traceId:e.spanContext?.traceId,spanId:e.spanContext?.spanId,traceFlags:e.spanContext?.traceFlags,severityText:e.severityText,severityNumber:e.severityNumber,eventName:e.eventName,body:e.body,attributes:e.attributes}}_sendLogRecords(e,t){for(let t of e)console.dir(this._exportInfo(t),{depth:3});t?.({code:ie.SUCCESS})}}}));async function ei(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];r.resource.asyncAttributesPending&&r.resource.waitForAsyncAttributes&&t.push(r.resource.waitForAsyncAttributes())}t!=null&&t.length>0&&await Promise.all(t)}var ti,ni,ri=e((()=>{f(),y(),a(),ti=class{constructor(e,t,n){o(this,`_exportCompleted`,void 0),o(this,`_exportScheduledPromise`,void 0),o(this,`_exportScheduledResolve`,void 0),this._exportScheduledPromise=new Promise(e=>{this._exportScheduledResolve=e}),this._exportCompleted=this._executeExport(e,t,n)}get exportCompleted(){return this._exportCompleted}get exportScheduled(){return this._exportScheduledPromise}async _executeExport(e,t,n){try{await ei(t),await d.with(ne(d.active()),async()=>this._exportWithTimeout(e,t,n))}catch(e){ee(e),this._exportScheduledResolve()}}async _exportWithTimeout(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>{i(Error(`Timeout`))},n);e.export(t,e=>{clearTimeout(a),e.code===ie.SUCCESS?r():i(e.error??Error(`BatchLogRecordProcessor: log record export failed`))}),this._exportScheduledResolve()})}},ni=class{constructor(e,t){o(this,`_maxExportBatchSize`,void 0),o(this,`_maxQueueSize`,void 0),o(this,`_scheduledDelayMillis`,void 0),o(this,`_exportTimeoutMillis`,void 0),o(this,`_exporter`,void 0),o(this,`_currentExport`,null),o(this,`_finishedLogRecords`,[]),o(this,`_timer`,void 0),o(this,`_shutdownOnce`,void 0),o(this,`_flushing`,!1),this._exporter=e,this._maxExportBatchSize=t?.maxExportBatchSize??512,this._maxQueueSize=t?.maxQueueSize??2048,this._scheduledDelayMillis=t?.scheduledDelayMillis??5e3,this._exportTimeoutMillis=t?.exportTimeoutMillis??3e4,this._shutdownOnce=new le(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(p.warn(`BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize)}onEmit(e){this._shutdownOnce.isCalled||this._addToBuffer(e)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}_addToBuffer(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}async _flushAll(){if(this._flushing)return;this._flushing=!0;let e=this._finishedLogRecords;for(this._finishedLogRecords=[],this._clearTimer(),this._currentExport!==null&&(await this._exporter.forceFlush(),await this._currentExport.exportCompleted,this._currentExport=null);e.length>0;){let t;e.length<=this._maxExportBatchSize?(t=e,e=[]):t=e.splice(0,this._maxExportBatchSize);let n=new ti(this._exporter,t,this._exportTimeoutMillis);this._currentExport=n;try{await n.exportScheduled,await this._exporter.forceFlush(),await n.exportCompleted}catch(e){ee(e)}finally{this._currentExport=null}}this._flushing=!1,this._maybeStartTimer()}_extractBatch(){if(this._finishedLogRecords.length===0)return null;if(this._finishedLogRecords.length<=this._maxExportBatchSize){let e=this._finishedLogRecords;return this._finishedLogRecords=[],e}else return this._finishedLogRecords.splice(0,this._maxExportBatchSize)}_exportOneBatch(){this._clearTimer();let e=this._extractBatch();if(e===null)return;let t=new ti(this._exporter,e,this._exportTimeoutMillis);this._currentExport=t,t.exportCompleted.then(()=>{this._currentExport=null,this._maybeStartTimer()}).catch(e=>{this._currentExport=null,ee(e),this._maybeStartTimer()})}_maybeStartTimer(){if(!this._shutdownOnce.isCalled&&!this._flushing&&this._finishedLogRecords.length!==0&&this._currentExport===null){if(this._finishedLogRecords.length>=this._maxExportBatchSize){this._exportOneBatch();return}this._timer===void 0&&(this._timer=setTimeout(()=>{this._timer=void 0,this._exportOneBatch()},this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}})),ii,ai=e((()=>{ri(),ii=class extends ni{onShutdown(){}}})),oi=e((()=>{ai()})),si=e((()=>{oi()})),ci=e((()=>{Zr(),$r(),si()}));export{Ct as $,mn as A,Qt as B,Nn as C,dn as D,_n as E,ln as F,P as G,qt as H,L as I,bt as J,Bt as K,tn as L,gn as M,hn as N,fn as O,R as P,k as Q,F as R,zn as S,xn as T,Wt as U,en as V,Ht as W,St as X,xt as Y,Et as Z,Xn as _,$r as a,mt as at,Hn as b,Er as c,ht as ct,vr as d,at as dt,Rt as et,yr as f,st as ft,nr as g,Zn as h,Qr as i,Dt as it,bn as j,pn as k,Sr as l,dt as lt,ar as m,ii as n,yt as nt,Xr as o,E as ot,ir as p,zt as q,ai as r,gt as rt,Zr as s,pt as st,ci as t,_t as tt,xr as u,T as ut,X as v,B as w,Un as x,Kn as y,nn as z};
@@ -1 +0,0 @@
1
- var e=()=>{};export{e as startEventLoopStallDetector};
@@ -1 +0,0 @@
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{$S as r,Al as i,Ct as a,DD as o,ED as s,Et as c,ZS as l,kl as u}from"./loadAgentsDir-x3rlgED4.js";import{n as d,t as f}from"./ExitFlow-DnPydE17.js";import{spawnSync as p}from"child_process";function m(){return o(_)??`Goodbye!`}async function h(e){if(i())return e(),p(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let t=a()!==null;return t?(0,g.jsx)(f,{showWorktree:t,onDone:e,onCancel:()=>e()}):(e(m()),await l(0,`prompt_input_exit`),null)}var g,_;e((()=>{s(),t(),d(),u(),r(),c(),g=n(),_=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{h as call};
@@ -1 +0,0 @@
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{Cx as r,wx as i}from"./loadAgentsDir-x3rlgED4.js";import{n as a,t as o}from"./extra-usage-core-DjdaD1qO.js";async function s(e,t){let n=await a();return n.type===`message`?(e(n.value),null):(0,c.jsx)(r,{onDone:()=>{t.onChangeAPIKey(),e(`Login successful`)}})}var c,l=e((()=>{t(),i(),o(),c=n()}));export{l as n,s as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./extra-usage-C7E2Z1p1.js";e();export{t as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./axios-DaWTGg7G.js";import{b as r,c as i,g as a}from"./config-DRDuVyzE.js";import{o,s}from"./log-BMCygSzM.js";import{l as c,u as l}from"./oauth-BqJqV-2M.js";import{Bt as u,Ft as d,ri as f,ti as p}from"./model-CZViyZnE.js";import{a as m,l as h,o as g}from"./api-2cdIPaeq.js";import{n as _,t as v}from"./browser-BmZuQom6.js";import{n as y,t as b}from"./usage-BxVeUt60.js";import{i as x,r as S}from"./overageCreditGrant-Du3dOYVu.js";async function C(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${c().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests`;return(await t.post(a,e,{headers:i})).data}async function w(e,n){let{accessToken:r,orgUUID:i}=await h(),a={...m(r),"x-organization-uuid":i},o=`${c().BASE_API_URL}/api/oauth/organizations/${i}/admin_requests/me?request_type=${e}`;for(let e of n)o+=`&statuses=${e}`;return(await t.get(o,{headers:a})).data}async function T(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${c().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests/eligibility?request_type=${e}`;return(await t.get(a,{headers:i})).data}var E=e((()=>{n(),l(),g()}));async function D(){i().hasVisitedExtraUsage||r(e=>({...e,hasVisitedExtraUsage:!0})),x();let e=d(),t=e===`team`||e===`enterprise`;if(!p()&&t){let e;try{e=(await b())?.extra_usage}catch(e){s(e)}if(e?.is_enabled&&e.monthly_limit===null)return{type:`message`,value:`Your organization already has unlimited extra usage. No request needed.`};try{if((await T(`limit_increase`))?.is_allowed===!1)return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}catch(e){s(e)}try{let e=await w(`limit_increase`,[`pending`,`dismissed`]);if(e&&e.length>0)return{type:`message`,value:`You have already submitted a request for extra usage to your admin.`}}catch(e){s(e)}try{return await C({request_type:`limit_increase`,details:null}),{type:`message`,value:e?.is_enabled?`Request sent to your admin to increase extra usage.`:`Request sent to your admin to enable extra usage.`}}catch(e){s(e)}return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}let n=t?`https://claude.ai/admin-settings/usage`:`https://claude.ai/settings/usage`;try{return{type:`browser-opened`,url:n,opened:await _(n)}}catch(e){return s(e),{type:`message`,value:`Failed to open browser. Please visit ${n} to manage extra usage.`}}}var O=e((()=>{E(),S(),y(),u(),f(),v(),a(),o()}));export{D as n,O as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./extra-usage-core-DjdaD1qO.js";async function r(){let e=await t();return e.type===`message`?{type:`text`,value:e.value}:{type:`text`,value:e.opened?`Browser opened to manage extra usage. If it didn't open, visit: ${e.url}`:`Please visit ${e.url} to manage extra usage.`}}e((()=>{n()}))();export{r as call};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{D as n,Gt as r,I as i,P as a,T as o,fi as s,t as c,x as l}from"./src-CDCSSo0U2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{FS as d,PS as f,Td as p,fx as m,ix as h,px as g,rx as _,wd as v}from"./loadAgentsDir-x3rlgED4.js";import{Bt as y,G as b,Gn as x,Gt as S,Kn as C,_ as w,et as T,nt as E,rt as D,tt as O,x as k}from"./model-CZViyZnE.js";import{u as A}from"./referral-CKmHHxj_.js";import{n as j,t as M}from"./useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js";function N({initial:e,sessionModel:t,onSelect:s,onCancel:c,isStandaloneCommand:u,showFastModeNotice:f,headerText:p}){let g=j(),_=e===null?I:e,[y,S]=(0,P.useState)(_),C=d(e=>D()?e.fastMode:!1),[w,T]=(0,P.useState)(()=>new Set(x(_)?[_.replace(/\[1m\]/i,``)]:[])),A=(0,P.useCallback)(()=>{if(!y||y===I)return;let e=y.replace(/\[1m\]/i,``);T(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[y]),M=(0,P.useMemo)(()=>v(C??!1),[C]),N=(0,P.useMemo)(()=>e!==null&&!M.some(t=>t.value===e)?[...M,{value:e,label:k(e),description:`Current model`}]:M,[M,e]),L=(0,P.useMemo)(()=>N.map(e=>({...e,value:e.value===null?I:e.value})),[N]),R=(0,P.useMemo)(()=>L.some(e=>e.value===_)?_:L[0]?.value??void 0,[L,_]),z=Math.min(10,L.length),B=Math.max(0,L.length-z),V=L.find(e=>e.value===y)?.label,H=y!==void 0&&y!==I&&w.has(y.replace(/\[1m\]/i,``)),U=(0,P.useCallback)(e=>{S(e)},[]);r({"modelPicker:toggle1M":()=>A()},{context:`ModelPicker`});function W(e){if(e===I){s(null);return}let t=e.replace(/\[1m\]/i,``);s(w.has(t)?`${t}[1m]`:t)}let G=(0,F.jsxs)(i,{flexDirection:`column`,children:[(0,F.jsxs)(i,{flexDirection:`column`,children:[(0,F.jsxs)(i,{marginBottom:1,flexDirection:`column`,children:[(0,F.jsx)(a,{color:`remember`,bold:!0,children:`Select model`}),(0,F.jsx)(a,{dimColor:!0,children:p??`Choose a model for this and future sessions. Use Space to toggle 1M context.`}),t&&(0,F.jsxs)(a,{dimColor:!0,children:[`Currently using `,k(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,F.jsxs)(i,{flexDirection:`column`,marginBottom:1,children:[(0,F.jsx)(i,{flexDirection:`column`,children:(0,F.jsx)(h,{defaultValue:_,defaultFocusValue:R,options:L,onChange:W,onFocus:U,onCancel:c??(()=>{}),visibleOptionCount:z})}),B>0&&(0,F.jsx)(i,{paddingLeft:3,children:(0,F.jsxs)(a,{dimColor:!0,children:[`and `,B,` more…`]})})]}),(0,F.jsx)(i,{marginBottom:1,flexDirection:`column`,children:H?(0,F.jsxs)(a,{dimColor:!0,children:[`1M context on`,(0,F.jsx)(a,{color:`subtle`,children:` · Space to toggle`})]}):(0,F.jsxs)(a,{color:`subtle`,children:[`1M context off`,V?` for ${V}`:``,(0,F.jsx)(a,{color:`subtle`,children:` · Space to toggle`})]})}),D()?f?(0,F.jsx)(i,{marginBottom:1,children:(0,F.jsxs)(a,{dimColor:!0,children:[`Fast mode is `,(0,F.jsx)(a,{bold:!0,children:`ON`}),` and available with `,b,` only (/fast). Switching to other models turn off fast mode.`]})}):O()&&!E()?(0,F.jsx)(i,{marginBottom:1,children:(0,F.jsxs)(a,{dimColor:!0,children:[`Use `,(0,F.jsx)(a,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,b,` only).`]})}):null:null]}),u&&(0,F.jsx)(a,{dimColor:!0,italic:!0,children:g.pending?(0,F.jsxs)(F.Fragment,{children:[`Press `,g.keyName,` again to exit`]}):(0,F.jsxs)(o,{children:[(0,F.jsx)(n,{shortcut:`Enter`,action:`confirm`}),(0,F.jsx)(m,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return u?(0,F.jsx)(l,{color:`permission`,children:G}):G}var P,F,I,L=e((()=>{s(),P=t(s(),1),C(),M(),T(),c(),A(),f(),w(),p(),g(),_(),F=u(),I=`__NO_PREFERENCE__`}));function R(e,t,n){if(!S())return!1;if(t)return!0;if(e===null||!x(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var z=e((()=>{y(),C()}));export{L as i,R as n,N as r,z as t};
@@ -1 +0,0 @@
1
- import{Jl as e,Xl as t,Yl as n,ql as r}from"./loadAgentsDir-x3rlgED4.js";t();export{r as drainPendingExtraction,e as executeExtractMemories,n as initExtractMemories};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as n,I as r,Lt as i,P as a,di as o,fi as s,j as c,t as l,ui as u,y as d}from"./src-CDCSSo0U2.js";import{t as f}from"./jsx-runtime-Bb4Xn-E0.js";import{FS as p,LS as m,PS as h}from"./loadAgentsDir-x3rlgED4.js";import{Jt as g,g as _,x as v}from"./settings-BeLFUeie.js";import{c as y,g as b}from"./config-DRDuVyzE.js";import{n as x,r as S}from"./analytics-BotDBGh0.js";import{b as C,u as w}from"./startupProfiler-xa3NmN7Z.js";import{G as T,H as E,J as D,K as O,U as k,W as A,X as j,et as M,it as N,lt as P,q as F,rt as I}from"./model-CZViyZnE.js";import{u as L}from"./referral-CKmHHxj_.js";import{n as R,t as z}from"./systemTheme-Ceakddth.js";function B({cooldown:e}){return e?(0,H.jsx)(a,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(a,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let n=R(y().theme);return t?u.dim(c(`promptBorder`,n)(`↯`)):c(`fastMode`,n)(`↯`)}var H,U=e((()=>{o(),s(),g(),l(),b(),z(),H=f()}));function W(e,t){O(),v(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!N(e.mainLoopModel);return{...e,...t?{mainLoopModel:F(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let o=p(e=>e.mainLoopModel),s=p(e=>e.fastMode),c=m(),[l,u]=(0,J.useState)(s??!1),f=D(),h=f.status===`cooldown`,g=t!==null,_=E(k(!0));function v(){g||(W(l,c),S(`tengu_fast_mode_toggled`,{enabled:l,source:`picker`}),l?e(`${V(l)} Fast mode ON${N(o)?``:` · model set to ${T}`} · ${_}`):(c(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function y(){if(g){s&&W(!1,c),e(`Fast mode OFF`,{display:`system`});return}e(s?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function b(){g||u(e=>!e)}return n({"confirm:yes":v,"confirm:nextField":b,"confirm:next":b,"confirm:previous":b,"confirm:cycleMode":b,"confirm:toggle":b},{context:`Confirmation`}),(0,Y.jsxs)(d,{title:(0,Y.jsxs)(a,{children:[(0,Y.jsx)(B,{cooldown:h}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${T}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:y,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(a,{children:[`Press `,e.keyName,` again to exit`]}):g?(0,Y.jsx)(a,{children:`Esc to cancel`}):(0,Y.jsx)(a,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(r,{marginLeft:2,children:(0,Y.jsx)(a,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(r,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(r,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(a,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(a,{color:l?`fastMode`:void 0,bold:l,children:l?`ON `:`OFF`}),(0,Y.jsx)(a,{dimColor:!0,children:_})]})}),h&&f.status===`cooldown`&&(0,Y.jsx)(r,{marginLeft:2,children:(0,Y.jsxs)(a,{color:`warning`,children:[f.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,w(f.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(a,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(i,{url:`https://code.claude.com/docs/en/fast-mode`,children:`https://code.claude.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=j();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),S(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${N(i)?``:` · model set to ${T}`} · ${E(k(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!I())return null;await P();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=j();return S(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{s(),J=t(s(),1),l(),U(),L(),x(),h(),M(),C(),A(),_(),Y=f()}));export{U as a,V as i,q as n,X as r,G as t};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./fast-C4ZevUNL.js";t();export{n as FastModePicker,e as call};
@@ -1 +0,0 @@
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"./Feedback-SmGiR3mf.js";function a(e,t,n,r=``,a={}){return(0,s.jsx)(i,{abortSignal:t,messages:n,initialDescription:r,onDone:e,backgroundTasks:a})}async function o(e,t,n){let r=n||``;return a(e,t.abortController.signal,t.messages,r)}var s;e((()=>{t(),r(),s=n()}))();export{o as call,a as renderFeedbackComponent};