@readmagic/workmate 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (512) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-Vmmm7p1c.js +1 -0
  2. package/dist/chunks/App-C2yQjBgY.js +1 -0
  3. package/dist/chunks/ApproveApiKey-CKbv5C1x.js +1 -0
  4. package/dist/chunks/ApproveApiKey-MscC-ssL.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-CL5NWsFL.js +2 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-CLSACUmo.js +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-BqNxQOXJ.js +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-C0-psohX.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-4mOvEer_.js +1 -0
  10. package/dist/chunks/DiffDialog-9AYwtupw.js +6 -0
  11. package/dist/chunks/Doctor-DmgAwce2.js +1 -0
  12. package/dist/chunks/Doctor-jEs9chPk.js +3 -0
  13. package/dist/chunks/ExitFlow-DVKxFdpX.js +2 -0
  14. package/dist/chunks/Grove-B9-hhkZA.js +11 -0
  15. package/dist/chunks/{HybridTransport-BJPOG2wl.js → HybridTransport-MxJ_W_np.js} +3 -3
  16. package/dist/chunks/InvalidConfigDialog-o9DF1REI.js +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-YyQcHocx.js +1 -0
  18. package/dist/chunks/MCPConnectionManager-CUTuaa8T.js +1 -0
  19. package/dist/chunks/MCPToolListView-CvqB4nCw.js +1 -0
  20. package/dist/chunks/McpParsingWarnings-BCpfHaBK.js +1 -0
  21. package/dist/chunks/MessageSelector-BLzw172f.js +3 -0
  22. package/dist/chunks/Messages-4K5sLmNh.js +11 -0
  23. package/dist/chunks/Onboarding-ClwHS5rh.js +1 -0
  24. package/dist/chunks/{PermissionDialog-0ya1CU5k.js → PermissionDialog-Cb3z8OUP.js} +1 -1
  25. package/dist/chunks/{PressEnterToContinue-Dl9Hg9Mf.js → PressEnterToContinue-Dq0Imo9c.js} +1 -1
  26. package/dist/chunks/PromptInputFooterSuggestions-BSA9NrZc.js +1 -0
  27. package/dist/chunks/PromptInputHelpMenu-Bb4KdIX_.js +1 -0
  28. package/dist/chunks/QueryEngine-DPHLSsax.js +1 -0
  29. package/dist/chunks/REPL-Bf46iQCN.js +1 -0
  30. package/dist/chunks/REPL-DIaAo9M9.js +133 -0
  31. package/dist/chunks/RemoteSessionManager-CS6mywIn.js +2 -0
  32. package/dist/chunks/ResumeConversation-Br2KsBoe.js +1 -0
  33. package/dist/chunks/{SSETransport-CrwbKuVt.js → SSETransport-CoxQ8YpH.js} +1 -1
  34. package/dist/chunks/{SearchBox-vfLXEPed.js → SearchBox-C9vUA4IM.js} +1 -1
  35. package/dist/chunks/SearchExtraToolsTool-i_YO3QvV.js +1 -0
  36. package/dist/chunks/Settings-BMXysXIx.js +2 -0
  37. package/dist/chunks/TeleportProgress-Doucj-50.js +1 -0
  38. package/dist/chunks/TeleportRepoMismatchDialog-B5I73j7Y.js +1 -0
  39. package/dist/chunks/TeleportResumeWrapper-D6kpr2c6.js +1 -0
  40. package/dist/chunks/ThemePicker-DrC8tlp0.js +1 -0
  41. package/dist/chunks/{TrustDialog-BukWGvHZ.js → TrustDialog-Fk4m_Sy4.js} +1 -1
  42. package/dist/chunks/{ValidationErrorsList-DokTJQwi.js → ValidationErrorsList-D_OUa4RT.js} +1 -1
  43. package/dist/chunks/WelcomeV2-DvfQHnZY.js +1 -0
  44. package/dist/chunks/add-dir-CZ6Clvq8.js +1 -0
  45. package/dist/chunks/{agentDisplay-DBQYOaOh.js → agentDisplay-B755vMZE.js} +1 -1
  46. package/dist/chunks/{agents-HlKk68Qc.js → agents-CIvP8l0s.js} +1 -1
  47. package/dist/chunks/agents-DHnNg4h6.js +103 -0
  48. package/dist/chunks/allErrors-CU89tF-z.js +1 -0
  49. package/dist/chunks/analytics-DJobLaWP.js +1 -0
  50. package/dist/chunks/api-BSeE6MwB.js +1 -0
  51. package/dist/chunks/{api-CF5IVtj0.js → api-nSHc_GIQ.js} +1 -1
  52. package/dist/chunks/auth-5QB6tsfB.js +15 -0
  53. package/dist/chunks/auth-BIGJth5U.js +1 -0
  54. package/dist/chunks/auth-CDQMhIZP.js +1 -0
  55. package/dist/chunks/{autoMode-Cr0AhS1G.js → autoMode-BnUiK9Cu.js} +4 -4
  56. package/dist/chunks/{autonomy-ARUQt-Lu.js → autonomy-C1aSgWPQ.js} +1 -1
  57. package/dist/chunks/autonomy-Src6sKCp.js +15 -0
  58. package/dist/chunks/{autonomyPanel-BQK9MoeB.js → autonomyPanel-DnHpuiy4.js} +1 -1
  59. package/dist/chunks/backgroundHousekeeping-B-cw0UcS.js +17 -0
  60. package/dist/chunks/backgroundHousekeeping-BS_8z3_x.js +1 -0
  61. package/dist/chunks/{banner-Ca7rki2V.js → banner-D0P7wXdw.js} +1 -1
  62. package/dist/chunks/bg-50rllUNh.js +1 -0
  63. package/dist/chunks/{bg-DxRHF1yn.js → bg-DAPORXF3.js} +2 -2
  64. package/dist/chunks/branch-DFWa4Oxo.js +3 -0
  65. package/dist/chunks/{break-cache-BKvoMOZx.js → break-cache-Chj9i9MP.js} +2 -2
  66. package/dist/chunks/{bridgeConfig-jDEva6Eh.js → bridgeConfig-Bb6URf4Q.js} +1 -1
  67. package/dist/chunks/bridgeConfig-BeqChxJC.js +1 -0
  68. package/dist/chunks/bridgeMessaging-C3huGcR3.js +1 -0
  69. package/dist/chunks/{bridgePointer-DIM0sj0x.js → bridgePointer-DLYyvRKb.js} +1 -1
  70. package/dist/chunks/bridgeStatusUtil-DFMftajD.js +1 -0
  71. package/dist/chunks/btw-DSK9R2C8.js +1 -0
  72. package/dist/chunks/caches-BTQAW9zc.js +1 -0
  73. package/dist/chunks/caches-BVtSCnV1.js +1 -0
  74. package/dist/chunks/{capacityWake-CKOiRELo.js → capacityWake-amzeeBz0.js} +1 -1
  75. package/dist/chunks/{ccrClient-BC2q3k44.js → ccrClient-Bu7Tf1Z5.js} +1 -1
  76. package/dist/chunks/{claudeDesktop-DQXL5bGm.js → claudeDesktop-CsJfF1b-.js} +1 -1
  77. package/dist/chunks/{clear-1etSJhdg.js → clear-ClFDpWVJ.js} +1 -1
  78. package/dist/chunks/{cliLaunch-CQjLYRzM.js → cliLaunch-BWcoyZDP.js} +1 -1
  79. package/dist/chunks/client-BWQ4-rN7.js +1 -0
  80. package/dist/chunks/{client-DQwf_b9o.js → client-DFlE4fYh.js} +1 -1
  81. package/dist/chunks/client-c-3-PW1F.js +1 -0
  82. package/dist/chunks/commands-Bi7k3Wg-.js +1 -0
  83. package/dist/chunks/compact-J-h0Yf4b.js +2 -0
  84. package/dist/chunks/config-CVHMRMwd.js +1 -0
  85. package/dist/chunks/config-Do1870_d.js +3 -0
  86. package/dist/chunks/config-yyFe87vW.js +1 -0
  87. package/dist/chunks/context-Tb1Ca2Q-.js +1 -0
  88. package/dist/chunks/{context-noninteractive-Ct_ttQfP.js → context-noninteractive-D5iQhasu.js} +2 -2
  89. package/dist/chunks/context-noninteractive-soPYKAc9.js +1 -0
  90. package/dist/chunks/conversation-CSEtUxOY.js +1 -0
  91. package/dist/chunks/conversation-Dk1WDQuN.js +1 -0
  92. package/dist/chunks/{createSSHSession-BmHXA2me.js → createSSHSession-CJtzNQdZ.js} +1 -1
  93. package/dist/chunks/{createSession-C4rukWkv.js → createSession-DkT1GL8y.js} +1 -1
  94. package/dist/chunks/createSession-eE8mswkv.js +1 -0
  95. package/dist/chunks/crossProjectResume-04n3Ppy9.js +40 -0
  96. package/dist/chunks/cwd-Cfdf7z7s.js +1 -0
  97. package/dist/chunks/cwd-ClLru_7T.js +1 -0
  98. package/dist/chunks/datadog-DjeJThpV.js +1 -0
  99. package/dist/chunks/{debug-RZ4NuXyS.js → debug-RAynG_nM.js} +4 -4
  100. package/dist/chunks/{debugUtils-D30M1cbN.js → debugUtils-DX0KAXNK.js} +1 -1
  101. package/dist/chunks/{detached-jrVP11oU.js → detached-X_yjYR7x.js} +1 -1
  102. package/dist/chunks/{detectRepository-CFiHe6Rv.js → detectRepository-DgpNd87p.js} +1 -1
  103. package/dist/chunks/detectRepository-ctF9KDbb.js +1 -0
  104. package/dist/chunks/{diff-BKiK3xHv.js → diff-jEJJe58I.js} +1 -1
  105. package/dist/chunks/directoryCompletion-BbXR2bfy.js +1 -0
  106. package/dist/chunks/doctor-B-Wag4C1.js +1 -0
  107. package/dist/chunks/earlyInput-BEjRkAtH.js +1 -0
  108. package/dist/chunks/{earlyInput-BTC_Wucv.js → earlyInput-IghoCjG5.js} +1 -1
  109. package/dist/chunks/entry-oIqjxIjQ.js +14 -0
  110. package/dist/chunks/envUtils-BDhHQY0-.js +1 -0
  111. package/dist/chunks/esm-Cf4nSRjF.js +1 -0
  112. package/dist/chunks/{execFileNoThrow-CCX-JY8h.js → execFileNoThrow-Dwu6psHW.js} +1 -1
  113. package/dist/chunks/{execSyncWrapper-dhRSYGFW.js → execSyncWrapper-BTZJjCuv.js} +1 -1
  114. package/dist/chunks/exit-BtW7LfRX.js +1 -0
  115. package/dist/chunks/extraUsage-Mi66JwFZ.js +1 -0
  116. package/dist/chunks/extractMemories-CUrdiNcr.js +1 -0
  117. package/dist/chunks/fast-BU4iUZ8E.js +1 -0
  118. package/dist/chunks/fast-C60p6AqJ.js +1 -0
  119. package/dist/chunks/featureCheck-D6FjD-nt.js +1 -0
  120. package/dist/chunks/featureCheck-JOur3pHb.js +1 -0
  121. package/dist/chunks/fileSuggestions-BMfQIDdW.js +3 -0
  122. package/dist/chunks/firstPartyEventLogger-B3cXgR67.js +5 -0
  123. package/dist/chunks/firstPartyEventLogger-BfCYN7lt.js +1 -0
  124. package/dist/chunks/flushGate-DgSDVGKZ.js +1 -0
  125. package/dist/chunks/{fpsMetrics-Cf_hdtiJ.js → fpsMetrics-DffAomdg.js} +1 -1
  126. package/dist/chunks/gemini-BwvSxGgn.js +1 -0
  127. package/dist/chunks/generateSessionName-DlrdedOk.js +1 -0
  128. package/dist/chunks/{genericProcessUtils-DVfMHhfy.js → genericProcessUtils-CmsUPyRz.js} +1 -1
  129. package/dist/chunks/{git-BerW9bId.js → git-2c7WlGDL.js} +1 -1
  130. package/dist/chunks/git-XtKbtJMc.js +1 -0
  131. package/dist/chunks/githubRepoPathMapping-DbWG4hFQ.js +1 -0
  132. package/dist/chunks/goal-ZmSRBx4q.js +3 -0
  133. package/dist/chunks/grok-BXMvezWb.js +1 -0
  134. package/dist/chunks/grove-CeOjTaY6.js +7 -0
  135. package/dist/chunks/help-5DNZO6_H.js +1 -0
  136. package/dist/chunks/{hooks-BZJTWD07.js → hooks-C637tFtd.js} +2 -2
  137. package/dist/chunks/hooks-DWg07LmS.js +1 -0
  138. package/dist/chunks/initReplBridge-D1h10vQ9.js +1 -0
  139. package/dist/chunks/{install-BI---dv0.js → install-C-6ItpH0.js} +1 -1
  140. package/dist/chunks/{instrumentation-CcWzhGfE.js → instrumentation-DaiPDUst.js} +4 -4
  141. package/dist/chunks/intl-D2kgJmX7.js +1 -0
  142. package/dist/chunks/{job-B0ftcqPF.js → job-BeYzQUiR.js} +1 -1
  143. package/dist/chunks/{jwtUtils-C0cE-1Ey.js → jwtUtils-CUPXdX3W.js} +1 -1
  144. package/dist/chunks/keybindings-DgIPdBy9.js +2 -0
  145. package/dist/chunks/launchLocalMemory-CE4J98xO.js +3 -0
  146. package/dist/chunks/launchOnboarding-BfTdC6vp.js +8 -0
  147. package/dist/chunks/{loadAgentsDir-ByO8eJqU.js → loadAgentsDir-C7lOqvfh.js} +2233 -2454
  148. package/dist/chunks/loadAgentsDir-zikjxLvn.js +1 -0
  149. package/dist/chunks/loadPluginHooks-Cp8MSwAc.js +1 -0
  150. package/dist/chunks/{localSearch-CHHCH16D.js → localSearch-BKrznW5x.js} +1 -1
  151. package/dist/chunks/localSearch-ZFyFy5FN.js +1 -0
  152. package/dist/chunks/log-CezCRpAN.js +1 -0
  153. package/dist/chunks/logoV2Utils-BkQfyQ1-.js +1 -0
  154. package/dist/chunks/{magicDocs-C5i5ruuU.js → magicDocs-BpVcON9o.js} +3 -3
  155. package/dist/chunks/main-9r5gLzUW.js +605 -0
  156. package/dist/chunks/{main-BLD4QAQg.js → main-CvOv59-7.js} +4 -4
  157. package/dist/chunks/managedEnv-B61yLpwp.js +1 -0
  158. package/dist/chunks/{managedEnv-C-9XSN14.js → managedEnv-DhWRJ5DK.js} +1 -1
  159. package/dist/chunks/{mappers-CHRFic5q.js → mappers-bOab8ipV.js} +1 -1
  160. package/dist/chunks/mcp-BckPBjaM.js +6 -0
  161. package/dist/chunks/mcp-CS1DA3JL.js +1 -0
  162. package/dist/chunks/mcp-VcGPYCkW.js +2 -0
  163. package/dist/chunks/{memoize-B8hfb1JN.js → memoize-DsqYrbeR.js} +1 -1
  164. package/dist/chunks/memory-C5ohwh-T.js +1 -0
  165. package/dist/chunks/{modalContext-DFjKLCB6.js → modalContext-CUThy6Ph.js} +1 -1
  166. package/dist/chunks/mode-DlKnUM8l.js +2 -0
  167. package/dist/chunks/model-BGu1AGq0.js +1 -0
  168. package/dist/chunks/model-BsZ4sP_H.js +1 -0
  169. package/dist/chunks/model-D19IIcll.js +1 -0
  170. package/dist/chunks/modelOptions-CxP067Qv.js +1 -0
  171. package/dist/chunks/nativeInstaller-QB8cEJ18.js +1 -0
  172. package/dist/chunks/oauth-BN2I0_jl.js +1 -0
  173. package/dist/chunks/oauth-C9VBDB0Y.js +1 -0
  174. package/dist/chunks/omit-DDUIPHnl.js +1 -0
  175. package/dist/chunks/onChangeAppState-RBl6H7ho.js +1 -0
  176. package/dist/chunks/{openai-DPH6rXOZ.js → openai-B9C2XN5Q.js} +3 -3
  177. package/dist/chunks/{panel-mD094ALT.js → panel-KW-wmEvU.js} +1 -1
  178. package/dist/chunks/{parser-dbHRgXb8.js → parser-BwPXQomy.js} +1 -1
  179. package/dist/chunks/parser-xSBaQRLH.js +1 -0
  180. package/dist/chunks/partition-D-UhsUCx.js +1 -0
  181. package/dist/chunks/permissions-BoLXYN1j.js +3 -0
  182. package/dist/chunks/pidLock-nJHbufJN.js +3 -0
  183. package/dist/chunks/plan-CyU2zrCK.js +1 -0
  184. package/dist/chunks/{platform-DCXXznJg.js → platform-BMPbglug.js} +1 -1
  185. package/dist/chunks/plugin-C6-GQke5.js +17 -0
  186. package/dist/chunks/pluginAutoupdate-SlRFJlTT.js +1 -0
  187. package/dist/chunks/{pluginBlocklist-PwHHD3nj.js → pluginBlocklist-n6Imlh3y.js} +1 -1
  188. package/dist/chunks/pluginCliCommands-Bd96zSOQ.js +1 -0
  189. package/dist/chunks/{pluginFlagging-pBxSselw.js → pluginFlagging-DZaYzecY.js} +1 -1
  190. package/dist/chunks/pluginOperations-D90IRawu.js +2 -0
  191. package/dist/chunks/pluginStartupCheck-Bxkxpm4k.js +1 -0
  192. package/dist/chunks/{pluginStartupCheck-Di4LjHXf.js → pluginStartupCheck-CB2q2dLv.js} +1 -1
  193. package/dist/chunks/plugins-B9eSjLSA.js +4 -0
  194. package/dist/chunks/poorMode-BAnubpn1.js +1 -0
  195. package/dist/chunks/{poorMode-CYXmr_mU.js → poorMode-DEwQOAJt.js} +1 -1
  196. package/dist/chunks/print-eCRv_Li-.js +26 -0
  197. package/dist/chunks/processBashCommand-B5F2Cl7K.js +1 -0
  198. package/dist/chunks/processSlashCommand-BC_D3cH5.js +5 -0
  199. package/dist/chunks/{projectContext-D9MDwJUF.js → projectContext-CIxul6vA.js} +1 -1
  200. package/dist/chunks/{projectContext-BaDZBAoK.js → projectContext-RUMJB798.js} +1 -1
  201. package/dist/chunks/prompt-C1JPqinc.js +1 -0
  202. package/dist/chunks/prompt-DZhBz_Vu.js +1 -0
  203. package/dist/chunks/prompt-M2lu8_Oa.js +139 -0
  204. package/dist/chunks/promptEditor-DhcZY-iu.js +4 -0
  205. package/dist/chunks/{protocolHandler-RNKkhq91.js → protocolHandler-CkFaJKKo.js} +1 -1
  206. package/dist/chunks/{proxy-BmtEnJ02.js → proxy-CuMaO_YV.js} +1 -1
  207. package/dist/chunks/reconciler-B4GDm_iC.js +1 -0
  208. package/dist/chunks/refresh-DBVizOzg.js +1 -0
  209. package/dist/chunks/{registerProtocol-DoKqmqu2.js → registerProtocol-CsNYRZKr.js} +1 -1
  210. package/dist/chunks/reload-plugins-B7JAE3b4.js +1 -0
  211. package/dist/chunks/{remoteBridgeCore-Cddqv2WW.js → remoteBridgeCore-CFLJhsB6.js} +1 -1
  212. package/dist/chunks/remoteManagedSettings-xh_MViZH.js +1 -0
  213. package/dist/chunks/rename-BCp2Vtqu.js +1 -0
  214. package/dist/chunks/{renderOptions-ChLwxtVu.js → renderOptions-Q5oCLFIC.js} +1 -1
  215. package/dist/chunks/resume-DVCSzKvv.js +2 -0
  216. package/dist/chunks/{ripgrep-gaT9Njwi.js → ripgrep-DvOOsDMv.js} +1 -1
  217. package/dist/chunks/ripgrep-e-iewvTf.js +1 -0
  218. package/dist/chunks/{runtimeObserver-Dbxxw4ls.js → runtimeObserver-CS_3BDNo.js} +4 -4
  219. package/dist/chunks/{runtimeObserver-CsIwinzh.js → runtimeObserver-DYUva6g-.js} +1 -1
  220. package/dist/chunks/sandbox-adapter-BFZFHplu.js +1 -0
  221. package/dist/chunks/sandbox-toggle--zNSKce_.js +1 -0
  222. package/dist/chunks/searchExtraTools-ui5y2VSE.js +1 -0
  223. package/dist/chunks/session-CO3gEqQP.js +2 -0
  224. package/dist/chunks/sessionFileAccessHooks-CZvCqQJ6.js +1 -0
  225. package/dist/chunks/sessionObserver-Ba7um95p.js +1 -0
  226. package/dist/chunks/{sessionObserver-DoYc0ZOP.js → sessionObserver-YkRHC-Aa.js} +2 -2
  227. package/dist/chunks/sessionState-Bifmu95-.js +11 -0
  228. package/dist/chunks/sessionStorage-CedwLLQs.js +1 -0
  229. package/dist/chunks/{sessionStoragePortable-Cx6JQ5Ye.js → sessionStoragePortable-JZnGwqUM.js} +1 -1
  230. package/dist/chunks/sessionTitle-COBSgSXS.js +14 -0
  231. package/dist/chunks/sessionTracing-BrNx1k2V.js +11 -0
  232. package/dist/chunks/settings-DkDH7WQT.js +1 -0
  233. package/dist/chunks/settings-DnptdP79.js +20 -0
  234. package/dist/chunks/settingsSync-PmU7SmkU.js +1 -0
  235. package/dist/chunks/setup-BEsBuzsk.js +3 -0
  236. package/dist/chunks/shadowedRuleDetection-DEaw-X5j.js +1 -0
  237. package/dist/chunks/{shellQuote-BUVKMu_P.js → shellQuote-BYeOv3Ip.js} +1 -1
  238. package/dist/chunks/{sideQuestion-C780iYwd.js → sideQuestion-D0OKljee.js} +3 -3
  239. package/dist/chunks/sinks-BJHgxz6Y.js +1 -0
  240. package/dist/chunks/sinks-D5-yhcgU.js +2 -0
  241. package/dist/chunks/skillChangeDetector-Dd0WPdkO.js +1 -0
  242. package/dist/chunks/{skillGapStore-Dc1arohs.js → skillGapStore-N_kmvXML.js} +2 -2
  243. package/dist/chunks/{skillLifecycle-DP6mY1Kp.js → skillLifecycle-C4F5RXuh.js} +2 -2
  244. package/dist/chunks/{skillSearchPanel-CpLTImaL.js → skillSearchPanel-CftorvAM.js} +4 -4
  245. package/dist/chunks/skills-C4CTRN9o.js +1 -0
  246. package/dist/chunks/{src-CDCSSo0U2.js → src-P_wYS_NJ2.js} +1 -1
  247. package/dist/chunks/{src-CST_jFnT.js → src-r6ZFgWPx2.js} +1 -1
  248. package/dist/chunks/startupProfiler-D4FBdEQr.js +1 -0
  249. package/dist/chunks/{startupProfiler-DCn_NxMH.js → startupProfiler-L_UWZ03w.js} +3 -3
  250. package/dist/chunks/{state-Cn_m2NOf.js → state-BAGmpVBn.js} +1 -1
  251. package/dist/chunks/state-BemZdQIl.js +1 -0
  252. package/dist/chunks/state-D_lk6z-C.js +1 -0
  253. package/dist/chunks/{staticRender-BIxpgNUq.js → staticRender-DrU6eWoq.js} +1 -1
  254. package/dist/chunks/{stats-Duk7_xjQ.js → stats-IzV0_vEc.js} +1 -1
  255. package/dist/chunks/{status-peiVB_2j.js → status-CeVP_uDT.js} +1 -1
  256. package/dist/chunks/status-Dzuw3hBv.js +2 -0
  257. package/dist/chunks/statusNoticeHelpers-Bb9gxdSt.js +1 -0
  258. package/dist/chunks/{stringUtils-B6FudhoZ.js → stringUtils-C84IJ91d.js} +1 -1
  259. package/dist/chunks/subprocessEnv-CZkA9Cdp.js +1 -0
  260. package/dist/chunks/{subprocessEnv-vrwzMgKn.js → subprocessEnv-Ci8VV_bi.js} +1 -1
  261. package/dist/chunks/switcher-4KzBvuKH.js +1 -0
  262. package/dist/chunks/{switcher-BAMqSX7Z.js → switcher-CCs9xl1z.js} +1 -1
  263. package/dist/chunks/{syncCache-Zl9kZRRl.js → syncCache-CBRiRU5x.js} +1 -1
  264. package/dist/chunks/tasks-DZDhgx0w.js +1 -0
  265. package/dist/chunks/teleport-Bw0jSxe9.js +1 -0
  266. package/dist/chunks/{templateJobs-DR5fKFiO.js → templateJobs-CrNPEKkh.js} +1 -1
  267. package/dist/chunks/{terminalSetup-DgRBt-JJ.js → terminalSetup-CBqcwQll.js} +1 -1
  268. package/dist/chunks/terminalSetup-D-N8YPiQ.js +33 -0
  269. package/dist/chunks/{theme-Bz6esfST.js → theme-Dazsirbw.js} +1 -1
  270. package/dist/chunks/{tmux-DSU9tYIo.js → tmux-DewYVEBm.js} +1 -1
  271. package/dist/chunks/{toolEventObserver-BSekCkM2.js → toolEventObserver-lnHJ9fLQ.js} +1 -1
  272. package/dist/chunks/toolPool-CkXFlqsn.js +1 -0
  273. package/dist/chunks/{trustedDevice-B0x9X0fb.js → trustedDevice-CFf5yaG-.js} +1 -1
  274. package/dist/chunks/trustedDevice-CuwSv8dG.js +1 -0
  275. package/dist/chunks/{types-D7_37tP2.js → types-3j8PS-Du.js} +1 -1
  276. package/dist/chunks/{udsClient-CHoMMH28.js → udsClient-e9dIkwVA.js} +1 -1
  277. package/dist/chunks/updateCCB-BPe9_FW6.js +11 -0
  278. package/dist/chunks/{upstreamproxy-Hmq-n8fw.js → upstreamproxy-DF00RzGG.js} +1 -1
  279. package/dist/chunks/useExitOnCtrlCDWithKeybindings-ChqBs9Lr.js +1 -0
  280. package/dist/chunks/useMainLoopModel-2-eujv0n.js +1 -0
  281. package/dist/chunks/useManagePlugins-CYBIkaB1.js +1 -0
  282. package/dist/chunks/useMergedTools-Dk5cPqLc.js +1 -0
  283. package/dist/chunks/useSearchInput-C7Y1I9P9.js +1 -0
  284. package/dist/chunks/useSettingsErrors-DAEO7AyB.js +1 -0
  285. package/dist/chunks/{userAgent-BxTG7IMk.js → userAgent-CIq27vUR.js} +1 -1
  286. package/dist/chunks/util-VO98TdOz.js +1 -0
  287. package/dist/chunks/{validatePlugin-AHl-g4ct.js → validatePlugin-Kk6pxnO2.js} +1 -1
  288. package/dist/chunks/vim-EYQn94Kx.js +1 -0
  289. package/dist/chunks/{which-CHLNJmtJ.js → which-DzFN5TNM.js} +1 -1
  290. package/dist/chunks/{windowsPaths-o62uq6LF.js → windowsPaths-BU3yQWTB.js} +1 -1
  291. package/dist/chunks/windowsPaths-DgZ3YY4a.js +1 -0
  292. package/dist/chunks/{workSecret-DG9shvG0.js → workSecret-DUqdPy44.js} +1 -1
  293. package/dist/chunks/workerRegistry-C07BcZIw.js +6 -0
  294. package/dist/chunks/worktree-dFUkhVE_.js +1 -0
  295. package/dist/cli.js +1 -1
  296. package/package.json +1 -1
  297. package/dist/chunks/AddWorkspaceDirectory-CwLtQld4.js +0 -1
  298. package/dist/chunks/App-Ba52HvYC.js +0 -1
  299. package/dist/chunks/ApproveApiKey-CEIfuUh0.js +0 -1
  300. package/dist/chunks/ApproveApiKey-D2MLQu2P.js +0 -1
  301. package/dist/chunks/BackgroundTasksDialog-IGDrkbWl.js +0 -2
  302. package/dist/chunks/BypassPermissionsModeDialog-GYhq--JR.js +0 -1
  303. package/dist/chunks/ClaudeMdExternalIncludesDialog-C-CTa-95.js +0 -1
  304. package/dist/chunks/ClaudeMdExternalIncludesDialog-Catv6BCJ.js +0 -1
  305. package/dist/chunks/ConsoleOAuthFlow-BeQXqUtX.js +0 -1
  306. package/dist/chunks/DiffDialog-AC5DSJrq.js +0 -6
  307. package/dist/chunks/Doctor-B9Rxsoy0.js +0 -1
  308. package/dist/chunks/Doctor-lhUBhEy5.js +0 -3
  309. package/dist/chunks/ExitFlow-Cu8SoQHs.js +0 -2
  310. package/dist/chunks/Grove-Bc4CofEj.js +0 -11
  311. package/dist/chunks/InvalidConfigDialog-BI13il58.js +0 -1
  312. package/dist/chunks/InvalidSettingsDialog-CtOheV1K.js +0 -1
  313. package/dist/chunks/MCPConnectionManager-ao-P3xSA.js +0 -1
  314. package/dist/chunks/MCPToolListView-dkofcJs4.js +0 -1
  315. package/dist/chunks/McpParsingWarnings-BS4JoR5l.js +0 -1
  316. package/dist/chunks/MessageSelector-B88b2ypw.js +0 -3
  317. package/dist/chunks/Messages-BPeI7lLV.js +0 -11
  318. package/dist/chunks/Onboarding-c2fQ8Io_.js +0 -1
  319. package/dist/chunks/PromptInputFooterSuggestions-D1cH9sDX.js +0 -1
  320. package/dist/chunks/PromptInputHelpMenu-DDD5WuK0.js +0 -1
  321. package/dist/chunks/QueryEngine-Cv_meCam.js +0 -1
  322. package/dist/chunks/REPL-BXhAQOXb.js +0 -139
  323. package/dist/chunks/REPL-YqjLnr3A.js +0 -1
  324. package/dist/chunks/RemoteSessionManager-CT7T8BaR.js +0 -2
  325. package/dist/chunks/ResumeConversation-CIZCjms9.js +0 -1
  326. package/dist/chunks/SearchExtraToolsTool-Dx6093yw.js +0 -1
  327. package/dist/chunks/Settings-CyUm0AtU.js +0 -2
  328. package/dist/chunks/TeleportProgress-C3qyp5zy.js +0 -1
  329. package/dist/chunks/TeleportRepoMismatchDialog-BV--nyYn.js +0 -1
  330. package/dist/chunks/TeleportResumeWrapper-Blo2cZg-.js +0 -1
  331. package/dist/chunks/ThemePicker-EQ6hPUeI.js +0 -1
  332. package/dist/chunks/WelcomeV2-Ci9VwPYh.js +0 -1
  333. package/dist/chunks/add-dir-DPQV0qml.js +0 -1
  334. package/dist/chunks/agents-DmybpgDN.js +0 -103
  335. package/dist/chunks/allErrors-BPn_2TrB.js +0 -1
  336. package/dist/chunks/analytics-CkYUHW_U.js +0 -1
  337. package/dist/chunks/ant-DjdvlLOo.js +0 -1
  338. package/dist/chunks/api-AMgj1zf_.js +0 -1
  339. package/dist/chunks/asciicast-BJNYO5sh.js +0 -4
  340. package/dist/chunks/asciicast-CH6hdK0a.js +0 -1
  341. package/dist/chunks/attributionTrailer-oKKrF3z8.js +0 -1
  342. package/dist/chunks/auth-CNjDn1VY.js +0 -15
  343. package/dist/chunks/auth-CZzP483s.js +0 -1
  344. package/dist/chunks/auth-DDSBm_Yj.js +0 -1
  345. package/dist/chunks/autonomy-D4xZLOdJ.js +0 -15
  346. package/dist/chunks/backgroundHousekeeping--eBgphcg.js +0 -17
  347. package/dist/chunks/backgroundHousekeeping-VV1V_Y2Z.js +0 -1
  348. package/dist/chunks/bg-BK_9J6F6.js +0 -1
  349. package/dist/chunks/branch-BYq0zpzT.js +0 -3
  350. package/dist/chunks/bridgeConfig-C82un7rJ.js +0 -1
  351. package/dist/chunks/bridgeMessaging-YqYdl6ej.js +0 -1
  352. package/dist/chunks/btw-CUV3nRrE.js +0 -1
  353. package/dist/chunks/caches-BZ59_En6.js +0 -1
  354. package/dist/chunks/caches-Cg-HtWKG.js +0 -1
  355. package/dist/chunks/client-DQXvVKND.js +0 -1
  356. package/dist/chunks/client-DkgC-mFB.js +0 -1
  357. package/dist/chunks/color-CBsNbt1s.js +0 -1
  358. package/dist/chunks/commands-qM5z_Uld.js +0 -1
  359. package/dist/chunks/compact-BclJiRJe.js +0 -2
  360. package/dist/chunks/completionCache-BMHAktkM.js +0 -1
  361. package/dist/chunks/config-CE058cvr.js +0 -3
  362. package/dist/chunks/config-D81avYye.js +0 -1
  363. package/dist/chunks/config-DpOOllGk.js +0 -1
  364. package/dist/chunks/context-noninteractive-DJb8H_hN.js +0 -1
  365. package/dist/chunks/context-sR9fJmXE.js +0 -1
  366. package/dist/chunks/conversation-D48Kt3ar.js +0 -1
  367. package/dist/chunks/conversation-fOFTa7k5.js +0 -1
  368. package/dist/chunks/createSession-CSwlW2T2.js +0 -1
  369. package/dist/chunks/crossProjectResume-lDFB2ZcY.js +0 -40
  370. package/dist/chunks/cwd-5Xr-Qka6.js +0 -1
  371. package/dist/chunks/cwd-C5ce-7WB.js +0 -1
  372. package/dist/chunks/daemon-ZtpTZWgQ.js +0 -2
  373. package/dist/chunks/datadog-BJn5ECIu.js +0 -1
  374. package/dist/chunks/detectRepository-DqQvyj_a.js +0 -1
  375. package/dist/chunks/directoryCompletion-BagQcynj.js +0 -1
  376. package/dist/chunks/doctor-BEHYm34V.js +0 -1
  377. package/dist/chunks/earlyInput-xcoTbKQn.js +0 -1
  378. package/dist/chunks/entry-BzL1MFQG.js +0 -14
  379. package/dist/chunks/envUtils-DSxRz_kt.js +0 -1
  380. package/dist/chunks/esm-BLPbfHQd.js +0 -1
  381. package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +0 -1
  382. package/dist/chunks/exit-DE2YiAhQ.js +0 -1
  383. package/dist/chunks/extraUsage-Dw7AXiH7.js +0 -1
  384. package/dist/chunks/extractMemories-DxTUMiv3.js +0 -1
  385. package/dist/chunks/fast-CHmMkIpE.js +0 -1
  386. package/dist/chunks/fast-uQASHWqR.js +0 -1
  387. package/dist/chunks/featureCheck-CrJeuheQ.js +0 -1
  388. package/dist/chunks/featureCheck-HslM03dr.js +0 -1
  389. package/dist/chunks/fileSuggestions-Dyu2kQtE.js +0 -3
  390. package/dist/chunks/firstPartyEventLogger-D5ohKbIe.js +0 -5
  391. package/dist/chunks/firstPartyEventLogger-LsNY6yOt.js +0 -1
  392. package/dist/chunks/flushGate-Cnsu4HET.js +0 -1
  393. package/dist/chunks/gemini-Cudre91e.js +0 -1
  394. package/dist/chunks/generateRecap-CiFxXlmH.js +0 -1
  395. package/dist/chunks/generateSessionName-DitoBxJT.js +0 -1
  396. package/dist/chunks/git-D6dOU2mT.js +0 -1
  397. package/dist/chunks/githubRepoPathMapping-DGr0kJ8D.js +0 -1
  398. package/dist/chunks/goal-DuUayfDg.js +0 -3
  399. package/dist/chunks/grok-tRbmZzEh.js +0 -1
  400. package/dist/chunks/grove-Cv19v6Sv.js +0 -7
  401. package/dist/chunks/help-DkqxbFDM.js +0 -1
  402. package/dist/chunks/hooks-CsP42iOp.js +0 -1
  403. package/dist/chunks/initReplBridge-DdsSWVqN.js +0 -1
  404. package/dist/chunks/intl-cKc-V6Mq.js +0 -1
  405. package/dist/chunks/keybindings-DZU3vwo3.js +0 -2
  406. package/dist/chunks/language-DHhXLb_Y.js +0 -1
  407. package/dist/chunks/language-s-dLbdVz.js +0 -1
  408. package/dist/chunks/launchLocalMemory-twLxpPvg.js +0 -3
  409. package/dist/chunks/launchOnboarding-BWz2XSb9.js +0 -8
  410. package/dist/chunks/lib-rQZENxQg.js +0 -8
  411. package/dist/chunks/loadAgentsDir-CMNFLt7R.js +0 -1
  412. package/dist/chunks/loadPluginHooks-BPnxcgrL.js +0 -1
  413. package/dist/chunks/localSearch-DzQODFap.js +0 -1
  414. package/dist/chunks/log-CZ0zYP_c.js +0 -1
  415. package/dist/chunks/logoV2Utils-CGUJ-5gY.js +0 -1
  416. package/dist/chunks/main-D4Uk-WUs.js +0 -862
  417. package/dist/chunks/managedEnv-DLVRBaA9.js +0 -1
  418. package/dist/chunks/mcp-BMVdGknC.js +0 -1
  419. package/dist/chunks/mcp-COS5RJFS.js +0 -6
  420. package/dist/chunks/mcp-tGsOW1GN.js +0 -2
  421. package/dist/chunks/memory-DR6poqeH.js +0 -1
  422. package/dist/chunks/mode-QV-NW1Wd.js +0 -2
  423. package/dist/chunks/model-BF_4ebyl.js +0 -1
  424. package/dist/chunks/model-BNU_ulDJ.js +0 -1
  425. package/dist/chunks/model-CwO-g1RW.js +0 -1
  426. package/dist/chunks/nativeInstaller-B-lNJjM-.js +0 -1
  427. package/dist/chunks/oauth-BqJqV-2M.js +0 -1
  428. package/dist/chunks/oauth-C8X_p8Gc.js +0 -1
  429. package/dist/chunks/omit-DZCEXri5.js +0 -1
  430. package/dist/chunks/onChangeAppState-BmfM5g-D.js +0 -1
  431. package/dist/chunks/p-map-B1EeBuI8.js +0 -1
  432. package/dist/chunks/p-map-HKDr3iDo.js +0 -1
  433. package/dist/chunks/panelCall-SbffM7G4.js +0 -1
  434. package/dist/chunks/parser-DrBC8nWp.js +0 -1
  435. package/dist/chunks/partition-DKuAFJkc.js +0 -1
  436. package/dist/chunks/path-Cv9QMBAX.js +0 -1
  437. package/dist/chunks/permissions-ey-bfanE.js +0 -3
  438. package/dist/chunks/pidLock-DJnS_38v.js +0 -3
  439. package/dist/chunks/pipeTransport-DVOKR4c_.js +0 -1
  440. package/dist/chunks/plan-Brg9XnRr.js +0 -1
  441. package/dist/chunks/plugin-CRwa39Y1.js +0 -17
  442. package/dist/chunks/pluginAutoupdate-D0LIP7cy.js +0 -1
  443. package/dist/chunks/pluginCliCommands-BJM5Bdpf.js +0 -1
  444. package/dist/chunks/pluginOperations-C7p_Qr2r.js +0 -2
  445. package/dist/chunks/pluginStartupCheck-C0HqhG6D.js +0 -1
  446. package/dist/chunks/plugins-DUKNjLq6.js +0 -4
  447. package/dist/chunks/poorMode-CejPNCp-.js +0 -1
  448. package/dist/chunks/print-gyTOCJzk.js +0 -23
  449. package/dist/chunks/processBashCommand-Cze9vCm6.js +0 -1
  450. package/dist/chunks/processSlashCommand-BRajh1v7.js +0 -5
  451. package/dist/chunks/prompt-B7joRiqj.js +0 -139
  452. package/dist/chunks/prompt-DqSMh2x9.js +0 -1
  453. package/dist/chunks/prompt-Eysh8Et_.js +0 -1
  454. package/dist/chunks/promptEditor-R_acDAgI.js +0 -4
  455. package/dist/chunks/reconciler-BfkO6X2X.js +0 -4
  456. package/dist/chunks/refresh-C1X3sptR.js +0 -1
  457. package/dist/chunks/reload-plugins-C0osFcNh.js +0 -1
  458. package/dist/chunks/remoteManagedSettings-B1mnRDmA.js +0 -1
  459. package/dist/chunks/rename-B3tf-YiD.js +0 -1
  460. package/dist/chunks/replBridgeHandle-CNwNIijW.js +0 -1
  461. package/dist/chunks/resume-Be1G_GBL.js +0 -2
  462. package/dist/chunks/ripgrep-C2PhTJDh.js +0 -1
  463. package/dist/chunks/rollback-BPWRKlIZ.js +0 -11
  464. package/dist/chunks/sandbox-adapter-C6GBuJPB.js +0 -1
  465. package/dist/chunks/sandbox-toggle-jEySONTW.js +0 -1
  466. package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +0 -1
  467. package/dist/chunks/searchExtraTools-C_UTryh_.js +0 -1
  468. package/dist/chunks/session-DDI1Eb2x.js +0 -2
  469. package/dist/chunks/sessionDataUploader-CaCjwsA2.js +0 -1
  470. package/dist/chunks/sessionFileAccessHooks-DfJ7Htfl.js +0 -1
  471. package/dist/chunks/sessionMemory-CQBxPkTQ.js +0 -1
  472. package/dist/chunks/sessionMemory-s0ALUHvc.js +0 -1
  473. package/dist/chunks/sessionMemoryUtils-xt7dTHGC.js +0 -1
  474. package/dist/chunks/sessionObserver-C2sYqWL3.js +0 -1
  475. package/dist/chunks/sessionState-CjNY991n.js +0 -11
  476. package/dist/chunks/sessionStorage-DqsY-7pi.js +0 -1
  477. package/dist/chunks/sessionTitle-B0OYf5nM.js +0 -14
  478. package/dist/chunks/sessionTracing-CwsXt_uA.js +0 -11
  479. package/dist/chunks/settings-BWtOA9A7.js +0 -1
  480. package/dist/chunks/settings-hQDLwPVj.js +0 -20
  481. package/dist/chunks/settingsSync-DdFagwHV.js +0 -1
  482. package/dist/chunks/setup-DzC22EkN.js +0 -3
  483. package/dist/chunks/shadowedRuleDetection-C86PTj1m.js +0 -1
  484. package/dist/chunks/sinks-5G_xhc1Q.js +0 -1
  485. package/dist/chunks/sinks-Cftq7Es0.js +0 -2
  486. package/dist/chunks/skillChangeDetector-plLveEbf.js +0 -1
  487. package/dist/chunks/skills-zGYaYfFV.js +0 -1
  488. package/dist/chunks/startupProfiler-JbpAkfNE.js +0 -1
  489. package/dist/chunks/state-C2OSZkV1.js +0 -1
  490. package/dist/chunks/state-DU9lRJ9x.js +0 -1
  491. package/dist/chunks/status-CFw-FpZM.js +0 -2
  492. package/dist/chunks/statusNoticeHelpers-B5U5c9PE.js +0 -1
  493. package/dist/chunks/subprocessEnv-BSQSomcK.js +0 -1
  494. package/dist/chunks/switcher-hgBgVzLb.js +0 -1
  495. package/dist/chunks/tasks-BxpyRhmD.js +0 -1
  496. package/dist/chunks/teleport-CwxeD5vL.js +0 -1
  497. package/dist/chunks/terminalSetup-DlaFWI81.js +0 -33
  498. package/dist/chunks/toolPool-B7SIoDw5.js +0 -1
  499. package/dist/chunks/trustedDevice-CjHQtVkO.js +0 -1
  500. package/dist/chunks/up-B8wBSpLg.js +0 -12
  501. package/dist/chunks/updateCCB-D_kGQKPT.js +0 -11
  502. package/dist/chunks/useExitOnCtrlCDWithKeybindings-Cce612uS.js +0 -1
  503. package/dist/chunks/useMainLoopModel-BICP6_Fi.js +0 -1
  504. package/dist/chunks/useManagePlugins-DtbY_vPL.js +0 -1
  505. package/dist/chunks/useMergedTools-Ckx2IEhF.js +0 -1
  506. package/dist/chunks/useSearchInput-BAgljZUl.js +0 -1
  507. package/dist/chunks/useSettingsErrors-CAJR_wpd.js +0 -1
  508. package/dist/chunks/util-DDtmyq_r.js +0 -1
  509. package/dist/chunks/vim-kg-mRVbu.js +0 -1
  510. package/dist/chunks/windowsPaths-Pmx8LDR6.js +0 -1
  511. package/dist/chunks/workerRegistry-C7H_lsQX.js +0 -6
  512. package/dist/chunks/worktree-O2p-mJdF.js +0 -1
@@ -1,20 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,i as n,n as r,r as i,s as a,t as o}from"./isObject-C6qM3WEW.js";import{d as s,f as c,g as ee,h as l,l as u,n as d,t as f,u as p}from"./memoize-BK3gG5ob.js";import{l as m,n as h,o as te}from"./envUtils-DSxRz_kt.js";import{n as ne,t as re}from"./defineProperty-C-QyHrDq.js";import{i as ie,r as ae}from"./isSymbol-BO6cdPI7.js";import{A as g,B as oe,C as _,D as se,E as ce,M as le,O as v,b as y,d as ue,g as de,j as b,k as fe,l as x,m as S,o as pe,p as C,s as me,w,y as he}from"./external-CEp-aPkt.js";import{i as ge,n as T,r as E,t as D}from"./lazySchema-B4D4qJVE.js";import{$t as _e,Ai as ve,Cr as ye,Dr as be,Er as xe,Fr as Se,Gt as Ce,Hi as we,Ii as Te,Li as Ee,M as De,N as Oe,Or as ke,Pr as Ae,Sr as je,Tr as Me,Ui as Ne,_i as Pe,ai as Fe,bi as Ie,ci as Le,di as Re,gi as ze,ii as Be,ji as Ve,jr as He,kr as Ue,li as We,ni as Ge,oi as Ke,ri as qe,si as Je,tt as Ye,ui as Xe,v as Ze,vi as Qe,wr as $e,xi as et,yi as tt}from"./state-C2OSZkV1.js";import{n as nt,t as rt}from"./cwd-C5ce-7WB.js";import{C as it,H as at,I as ot,S as st,V as ct,_ as lt,a as ut,d as O,l as k,p as A,w as dt,x as ft,z as pt}from"./debug-RZ4NuXyS.js";import{O as mt,k as ht,m as gt,t as _t}from"./git-BerW9bId.js";import{n as vt,r as yt}from"./execFileNoThrow-CCX-JY8h.js";import{o as bt,s as j}from"./log-CZ0zYP_c.js";import{n as xt,t as St}from"./which-CHLNJmtJ.js";import{i as Ct,o as wt}from"./platform-DCXXznJg.js";import{i as Tt,n as Et}from"./path-Cv9QMBAX.js";import{a as Dt,f as Ot,p as kt,r as At,s as jt,u as M}from"./types-D7_37tP2.js";import{n as Mt,r as Nt}from"./analytics-CkYUHW_U.js";import{i as Pt,n as Ft}from"./startupProfiler-DCn_NxMH.js";import{c as It,u as Lt}from"./oauth-BqJqV-2M.js";import{r as Rt,t as zt}from"./bundledMode--fG1S62b.js";import{f as Bt,l as Vt,n as Ht,o as Ut,p as Wt}from"./stringUtils-B6FudhoZ.js";import{homedir as Gt,userInfo as Kt}from"os";import{basename as qt,dirname as N,extname as Jt,isAbsolute as Yt,join as P,normalize as Xt,relative as Zt,resolve as F,sep as I}from"path";import{chmodSync as Qt,existsSync as $t,writeFileSync as en}from"fs";import{appendFile as tn,mkdir as nn,readFile as rn,realpath as an,stat as on,writeFile as sn}from"fs/promises";import{execFile as cn}from"child_process";var ln,un=e((()=>{c(),ln=function(){try{var e=s(Object,`defineProperty`);return e({},``,{}),e}catch{}}()}));function dn(e,t,n){t==`__proto__`&&ln?ln(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var fn=e((()=>{un()}));function pn(e,t,n){var r=e[t];(!(mn.call(e,t)&&u(r,n))||n===void 0&&!(t in e))&&dn(e,t,n)}var mn,hn=e((()=>{fn(),p(),mn=Object.prototype.hasOwnProperty}));function gn(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?dn(n,s,c):pn(n,s,c)}return n}var _n=e((()=>{hn(),fn()}));function vn(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var yn=e((()=>{}));function bn(e){if(!r(e))return vn(e);var t=Je(e),n=[];for(var i in e)i==`constructor`&&(t||!xn.call(e,i))||n.push(i);return n}var xn,Sn=e((()=>{o(),Ke(),yn(),xn=Object.prototype.hasOwnProperty}));function Cn(e){return qe(e)?Le(e,!0):bn(e)}var wn=e((()=>{We(),Sn(),Ge()}));function Tn(e,t){if(t)return e.slice();var n=e.length,r=kn?kn(n):new e.constructor(n);return e.copy(r),r}var En,Dn,On,kn,An=e((()=>{a(),En=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Dn=En&&typeof module==`object`&&module&&!module.nodeType&&module,On=Dn&&Dn.exports===En?t.Buffer:void 0,kn=On?On.allocUnsafe:void 0}));function jn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Mn=e((()=>{})),Nn,Pn=e((()=>{Be(),Nn=Fe(Object.getPrototypeOf,Object)}));function Fn(e){var t=new e.constructor(e.byteLength);return new Te(t).set(new Te(e)),t}var In=e((()=>{Ee()}));function Ln(e,t){var n=t?Fn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Rn=e((()=>{In()})),zn,Bn,Vn=e((()=>{o(),zn=Object.create,Bn=function(){function e(){}return function(t){if(!r(t))return{};if(zn)return zn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function Hn(e){return typeof e.constructor==`function`&&!Je(e)?Bn(Nn(e)):{}}var Un=e((()=>{Vn(),Pn(),Ke()}));function Wn(e,t,n){(n!==void 0&&!u(e[t],n)||n===void 0&&!(t in e))&&dn(e,t,n)}var Gn=e((()=>{fn(),p()}));function Kn(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var qn=e((()=>{})),Jn,Yn=e((()=>{qn(),Jn=Kn()}));function Xn(e){return ie(e)&&qe(e)}var Zn=e((()=>{Ge(),ae()}));function Qn(e){if(!ie(e)||i(e)!=$n)return!1;var t=Nn(e);if(t===null)return!0;var n=rr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&nr.call(n)==ir}var $n,er,tr,nr,rr,ir,ar=e((()=>{n(),Pn(),ae(),$n=`[object Object]`,er=Function.prototype,tr=Object.prototype,nr=er.toString,rr=tr.hasOwnProperty,ir=nr.call(Object)}));function or(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var sr=e((()=>{}));function cr(e){return gn(e,Cn(e))}var lr=e((()=>{_n(),wn()}));function ur(e,t,n,i,a,o,s){var c=or(e,n),l=or(t,n),u=s.get(l);if(u){Wn(e,n,u);return}var d=o?o(c,l,n+``,e,t,s):void 0,f=d===void 0;if(f){var p=Ve(l),m=!p&&tt(l),h=!p&&!m&&Re(l);d=l,p||m||h?Ve(c)?d=c:Xn(c)?d=jn(c):m?(f=!1,d=Tn(l,!0)):h?(f=!1,d=Ln(l,!0)):d=[]:Qn(l)||et(l)?(d=c,et(c)?d=cr(c):(!r(c)||ee(c))&&(d=Hn(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),Wn(e,n,d)}var dr=e((()=>{Gn(),An(),Rn(),Mn(),Un(),Ie(),ve(),Zn(),Qe(),l(),o(),ar(),Xe(),sr(),lr()}));function fr(e,t,n,i,a){e!==t&&Jn(t,function(o,s){if(a||(a=new we),r(o))ur(e,t,s,n,fr,i,a);else{var c=i?i(or(e,s),o,s+``,e,t,a):void 0;c===void 0&&(c=o),Wn(e,s,c)}},Cn)}var pr=e((()=>{Ne(),Gn(),Yn(),dr(),o(),wn(),sr()}));function mr(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var hr=e((()=>{}));function gr(e,t,n){return t=_r(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=_r(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),mr(e,this,s)}}var _r,vr=e((()=>{hr(),_r=Math.max}));function yr(e){return function(){return e}}var br=e((()=>{})),xr,Sr=e((()=>{br(),un(),Se(),xr=ln?function(e,t){return ln(e,`toString`,{configurable:!0,enumerable:!1,value:yr(t),writable:!0})}:Ae}));function Cr(e){var t=0,n=0;return function(){var r=Er(),i=Tr-(r-n);if(n=r,i>0){if(++t>=wr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var wr,Tr,Er,Dr=e((()=>{wr=800,Tr=16,Er=Date.now})),Or,kr=e((()=>{Sr(),Dr(),Or=Cr(xr)}));function Ar(e,t){return Or(gr(e,t,Ae),e+``)}var jr=e((()=>{Se(),vr(),kr()}));function Mr(e,t,n){if(!r(n))return!1;var i=typeof t;return(i==`number`?qe(n)&&Pe(t,n.length):i==`string`&&t in n)?u(n[t],e):!1}var Nr=e((()=>{p(),Ge(),ze(),o()}));function Pr(e){return Ar(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Mr(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Fr=e((()=>{jr(),Nr()})),L,Ir=e((()=>{pr(),Fr(),L=Pr(function(e,t,n,r){fr(e,t,n,r)})}));function Lr(e){let{buffer:t,bytesRead:n}=O().readSync(e,{length:4096});return n===0?`utf8`:n>=2&&t[0]===255&&t[1]===254?`utf16le`:(n>=3&&t[0]===239&&t[1]===187&&t[2],`utf8`)}function Rr(e){let t=0,n=0;for(let r=0;r<e.length;r++)e[r]===`
2
- `&&(r>0&&e[r-1]===`\r`?t++:n++);return t>n?`CRLF`:`LF`}function zr(e){let t=O(),{resolvedPath:n,isSymlink:r}=lt(t,e);r&&k(`Reading through symlink: ${e} -> ${n}`);let i=Lr(n),a=t.readFileSync(n,{encoding:i}),o=Rr(a.slice(0,4096));return{content:a.replaceAll(`\r
3
- `,`
4
- `),encoding:i,lineEndings:o}}function R(e){return zr(e).content}var Br=e((()=>{ut(),A()}));function Vr(e){z=e}function Hr(){z=null,Jr=void 0}function Ur(e){return Jr=e,e}function Wr(){return P(h(),qr)}function Gr(){try{let e=it(kt(R(Wr())));return!e||typeof e!=`object`||Array.isArray(e)?null:e}catch{return null}}function Kr(){if(Jr!==!0)return null;if(z)return z;let e=Gr();return e?(z=e,be(),e):null}var qr,z,Jr,Yr=e((()=>{te(),Br(),Ot(),xe(),st(),qr=`remote-settings.json`,z=null}));function Xr(e,t){return e.flatMap((e,n)=>n?[t(n),e]:[e])}function Zr(e,t){let n=0;for(let r of e)n+=+!!t(r);return n}function Qr(e){return[...new Set(e)]}var $r=e((()=>{})),ei,ti,ni=e((()=>{Ei(),A(),ne(),ei=class{constructor(){re(this,`cache`,new Map),re(this,`maxCacheSize`,1e3)}readFile(e){let t=O(),n;try{n=t.statSync(e)}catch(t){throw this.cache.delete(e),t}let r=e,i=this.cache.get(r);if(i&&i.mtime===n.mtimeMs)return{content:i.content,encoding:i.encoding};let a=ci(e),o=t.readFileSync(e,{encoding:a}).replaceAll(`\r
5
- `,`
6
- `);if(this.cache.set(r,{content:o,encoding:a,mtime:n.mtimeMs}),this.cache.size>this.maxCacheSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}return{content:o,encoding:a}}clear(){this.cache.clear()}invalidate(e){this.cache.delete(e)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}},ti=new ei}));async function ri(e){try{return await on(e),!0}catch{return!1}}function ii(e){try{return O().readFileSync(e,{encoding:`utf8`})}catch(e){return j(e),null}}function ai(e){let t=O();return Math.floor(t.statSync(e).mtimeMs)}async function oi(e){let t=await O().stat(e);return Math.floor(t.mtimeMs)}function si(e,t,n,r){let i=t;r===`CRLF`&&(i=t.replaceAll(`\r
7
- `,`
8
- `).split(`
9
- `).join(`\r
10
- `)),bi(e,i,{encoding:n})}function ci(e){try{let{resolvedPath:t}=lt(O(),e);return Lr(t)}catch(e){return at(e)?k(`detectFileEncoding failed for expected reason: ${e.code}`,{level:`debug`}):j(e),`utf8`}}function li(e,t=`utf8`){try{let n=O(),{resolvedPath:r}=lt(n,e),{buffer:i,bytesRead:a}=n.readSync(r,{length:4096});return Rr(i.toString(t,0,a))}catch(e){return j(e),`LF`}}function ui(e){return e.includes(` `)?e.replace(/^\t+/gm,e=>` `.repeat(e.length)):e}function di(e){let t=e?Et(e):void 0;return{absolutePath:t,relativePath:t?Zt(rt(),t):void 0}}function fi(e){let{relativePath:t}=di(e);if(t&&!t.startsWith(`..`))return t;let n=Gt();return e.startsWith(n+I)?`~`+e.slice(n.length):e}function pi(e){let t=O();try{let n=N(e),r=qt(e,Jt(e)),i=t.readdirSync(n).filter(t=>qt(t.name,Jt(t.name))===r&&P(n,t.name)!==e)[0];return i?i.name:void 0}catch(e){ct(e)||j(e);return}}async function mi(e){let t=rt(),n=N(t),r=e;try{r=P(await an(N(e)),qt(e))}catch{}let i=n===I?I:n+I;if(!r.startsWith(i)||r.startsWith(t+I)||r===t)return;let a=P(t,Zt(n,r));try{return await on(a),a}catch{return}}function hi(){return!0}function gi({content:e,startLine:t}){if(!e)return``;let n=e.split(/\r?\n/);return hi()?n.map((e,n)=>`${n+t}\t${e}`).join(`
11
- `):n.map((e,n)=>{let r=String(n+t);return r.length>=6?`${r}→${e}`:`${r.padStart(6,` `)}→${e}`}).join(`
12
- `)}function _i(e){return e.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??e}function vi(e){try{return O().isDirEmptySync(e)}catch(e){return ct(e)}}function yi(e){let{content:t}=ti.readFile(e);return t}function bi(e,t,n={encoding:`utf-8`}){let r=O(),i=e;try{let t=r.readlinkSync(e);i=Yt(t)?t:F(N(e),t),k(`Writing through symlink: ${e} -> ${i}`)}catch{}let a=`${i}.tmp.${process.pid}.${Date.now()}`,o,s=!1;try{o=r.statSync(i).mode,s=!0,k(`Preserving file permissions: ${o.toString(8)}`)}catch(e){if(!ct(e))throw e;n.mode!==void 0&&(o=n.mode,k(`Setting permissions for new file: ${o.toString(8)}`))}try{k(`Writing to temp file: ${a}`);let e={encoding:n.encoding,flush:!0};!s&&n.mode!==void 0&&(e.mode=n.mode),en(a,t,e),k(`Temp file written successfully, size: ${t.length} bytes`),s&&o!==void 0&&(Qt(a,o),k(`Applied original permissions to temp file`)),k(`Renaming ${a} to ${i}`),r.renameSync(a,i),k(`File ${i} written atomically`)}catch(e){k(`Failed to write file atomically: ${e}`,{level:`error`}),Nt(`tengu_atomic_write_error`,{});try{k(`Cleaning up temp file: ${a}`),r.unlinkSync(a)}catch(e){k(`Failed to clean up temp file: ${e}`)}k(`Falling back to non-atomic write for ${i}`);try{let e={encoding:n.encoding,flush:!0};!s&&n.mode!==void 0&&(e.mode=n.mode),en(i,t,e),k(`File ${i} written successfully with non-atomic fallback`)}catch(e){throw k(`Non-atomic write also failed: ${e}`),e}}}function xi(e,t=wi){try{return O().statSync(e).size<=t}catch{return!1}}function Si(e){let t=Xt(e);return t=t.replace(/\\/g,`/`),Ct()===`windows`&&(t=t.toLowerCase()),t}function Ci(e,t){return Si(e)===Si(t)}var wi,Ti,Ei=e((()=>{Mt(),nt(),ut(),pt(),Br(),ni(),A(),bt(),Tt(),wt(),wi=.25*1024*1024,Ti=`Note: your current working directory is`}));async function Di(e,t){let{code:n}=await vt(`git`,[`check-ignore`,e],{preserveOutputOnError:!1,cwd:t});return n===0}function Oi(){return P(Gt(),`.config`,`git`,`ignore`)}async function ki(e,t=rt()){try{if(!await _t(t))return;let n=`**/${e}`;if(await Di(e.endsWith(`/`)?`${e}sample-file.txt`:e,t))return;let r=Oi();await nn(N(r),{recursive:!0});try{if((await rn(r,{encoding:`utf-8`})).includes(n))return;await tn(r,`\n${n}\n`)}catch(e){if(ot(e)===`ENOENT`)await sn(r,`${n}\n`,`utf-8`);else throw e}}catch(e){j(e)}}var Ai=e((()=>{nt(),pt(),yt(),gt(),bt()}));function ji(e){switch(e){case`userSettings`:return`user`;case`projectSettings`:return`project`;case`localSettings`:return`project, gitignored`;case`flagSettings`:return`cli flag`;case`policySettings`:return`managed`}}function Mi(e){switch(e){case`userSettings`:return`User`;case`projectSettings`:return`Project`;case`localSettings`:return`Local`;case`flagSettings`:return`Flag`;case`policySettings`:return`Managed`;case`plugin`:return`Plugin`;case`built-in`:return`Built-in`}}function Ni(e){switch(e){case`userSettings`:return`user settings`;case`projectSettings`:return`shared project settings`;case`localSettings`:return`project local settings`;case`flagSettings`:return`command line arguments`;case`policySettings`:return`enterprise managed settings`;case`cliArg`:return`CLI argument`;case`command`:return`command configuration`;case`session`:return`current session`}}function Pi(e){switch(e){case`userSettings`:return`User settings`;case`projectSettings`:return`Shared project settings`;case`localSettings`:return`Project local settings`;case`flagSettings`:return`Command line arguments`;case`policySettings`:return`Enterprise managed settings`;case`cliArg`:return`CLI argument`;case`command`:return`Command configuration`;case`session`:return`Current session`}}function Fi(e){if(e===``)return[];let t=e.split(`,`).map(e=>e.trim()),n=[];for(let e of t)switch(e){case`user`:n.push(`userSettings`);break;case`project`:n.push(`projectSettings`);break;case`local`:n.push(`localSettings`);break;default:throw Error(`Invalid setting source: ${e}. Valid options are: user, project, local`)}return n}function Ii(){let e=Ze(),t=new Set(e);return t.add(`policySettings`),t.add(`flagSettings`),Array.from(t)}function Li(e){return Ii().includes(e)}var Ri,zi,Bi,Vi=e((()=>{_e(),Ri=[`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`],zi=[`localSettings`,`projectSettings`,`userSettings`],Bi=`https://json.schemastore.org/claude-code-settings.json`}));function Hi(e){Gi.set(e,Date.now())}function Ui(e,t){let n=Gi.get(e);return n!==void 0&&Date.now()-n<t?(Gi.delete(e),!0):!1}function Wi(){Gi.clear()}var Gi,Ki=e((()=>{Gi=new Map})),qi,Ji,Yi=e((()=>{f(),wt(),qi=d(function(){if(process.env.USER_TYPE===`ant`&&process.env.CLAUDE_CODE_MANAGED_SETTINGS_PATH)return process.env.CLAUDE_CODE_MANAGED_SETTINGS_PATH;switch(Ct()){case`macos`:return`/Library/Application Support/ClaudeCode`;case`windows`:return`C:\\Program Files\\ClaudeCode`;default:return`/etc/claude-code`}}),Ji=d(function(){return P(qi(),`managed-settings.d`)})})),Xi,Zi,Qi,$i=e((()=>{E(),D(),Xi=T(()=>w({allowedDomains:C(g()).optional(),allowManagedDomainsOnly:S().optional().describe(`When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources.`),allowUnixSockets:C(g()).optional().describe(`macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path).`),allowAllUnixSockets:S().optional().describe(`If true, allow all Unix sockets (disables blocking on both platforms).`),allowLocalBinding:S().optional(),httpProxyPort:_().optional(),socksProxyPort:_().optional()}).optional()),Zi=T(()=>w({allowWrite:C(g()).optional().describe(`Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules.`),denyWrite:C(g()).optional().describe(`Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules.`),denyRead:C(g()).optional().describe(`Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules.`),allowRead:C(g()).optional().describe(`Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths.`),allowManagedReadPathsOnly:S().optional().describe(`When true (set in managed settings), only allowRead paths from policySettings are used.`)}).optional()),Qi=T(()=>w({enabled:S().optional(),failIfUnavailable:S().optional().describe(`Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate.`),autoAllowBashIfSandboxed:S().optional(),allowUnsandboxedCommands:S().optional().describe(`Allow commands to run outside the sandbox via the dangerouslyDisableSandbox parameter. When false, the dangerouslyDisableSandbox parameter is completely ignored and all commands must run sandboxed. Default: true.`),network:Xi(),filesystem:Zi(),ignoreViolations:v(g(),C(g())).optional(),enableWeakerNestedSandbox:S().optional(),enableWeakerNetworkIsolation:S().optional().describe(`macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. **Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false`),excludedCommands:C(g()).optional(),ripgrep:w({command:g(),args:C(g()).optional()}).optional().describe(`Custom ripgrep configuration for bundled ripgrep support`)}).passthrough())}));async function B(e){try{return!!await xt(e)}catch{return!1}}function ea(){return process.env.__CFBundleIdentifier===`com.conductor.app`}function ta(){if(process.env.CURSOR_TRACE_ID||process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`cursor`))return`cursor`;if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`windsurf`))return`windsurf`;if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`antigravity`))return`antigravity`;let e=process.env.__CFBundleIdentifier?.toLowerCase();if(e?.includes(`vscodium`))return`codium`;if(e?.includes(`windsurf`))return`windsurf`;if(e?.includes(`com.google.android.studio`))return`androidstudio`;if(e){for(let t of ua)if(e.includes(t))return t}if(process.env.VisualStudioVersion)return`visualstudio`;if(process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`)return process.platform,`pycharm`;if(process.env.TERM===`xterm-ghostty`)return`ghostty`;if(process.env.TERM?.includes(`kitty`))return`kitty`;if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return`tmux`;if(process.env.STY)return`screen`;if(process.env.KONSOLE_VERSION)return`konsole`;if(process.env.GNOME_TERMINAL_SERVICE)return`gnome-terminal`;if(process.env.XTERM_VERSION)return`xterm`;if(process.env.VTE_VERSION)return`vte-based`;if(process.env.TERMINATOR_UUID)return`terminator`;if(process.env.KITTY_WINDOW_ID)return`kitty`;if(process.env.ALACRITTY_LOG)return`alacritty`;if(process.env.TILIX_ID)return`tilix`;if(process.env.WT_SESSION)return`windows-terminal`;if(process.env.SESSIONNAME&&process.env.TERM===`cygwin`)return`cygwin`;if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return`conemu`;if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(na())return`ssh-session`;if(process.env.TERM){let e=process.env.TERM;return e.includes(`alacritty`)?`alacritty`:e.includes(`rxvt`)?`rxvt`:e.includes(`termite`)?`termite`:process.env.TERM}return process.stdout.isTTY?null:`non-interactive`}function na(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function ra(){let e=process.env.CLAUDE_CODE_HOST_PLATFORM;return e===`win32`||e===`darwin`||e===`linux`?e:V.platform}var ia,aa,oa,sa,ca,la,ua,da,V,fa=e((()=>{f(),Lt(),zt(),te(),Wt(),A(),St(),ia=d(()=>{if(O().existsSync(P(h(),`.config.json`)))return P(h(),`.config.json`);let e=`.claude${It()}.json`;return P(process.env.CLAUDE_CONFIG_DIR||Gt(),e)}),aa=d(async()=>{try{let{default:e}=await import(`./axios-BHBm_hhU.js`);return await e.head(`http://1.1.1.1`,{signal:AbortSignal.timeout(1e3)}),!0}catch{return!1}}),oa=d(async()=>{let e=[];return await B(`npm`)&&e.push(`npm`),await B(`yarn`)&&e.push(`yarn`),await B(`pnpm`)&&e.push(`pnpm`),e}),sa=d(async()=>{let e=[];return await B(`bun`)&&e.push(`bun`),await B(`deno`)&&e.push(`deno`),await B(`node`)&&e.push(`node`),e}),ca=d(()=>{try{return O().existsSync(`/proc/sys/fs/binfmt_misc/WSLInterop`)}catch{return!1}}),la=d(()=>{try{if(!ca())return!1;let{cmd:e}=Bt(`npm`,[]);return e.startsWith(`/mnt/c/`)}catch{return!1}}),ua=[`pycharm`,`intellij`,`webstorm`,`phpstorm`,`rubymine`,`clion`,`goland`,`rider`,`datagrip`,`appcode`,`dataspell`,`aqua`,`gateway`,`fleet`,`jetbrains`,`androidstudio`],da=d(()=>{if(m(process.env.CODESPACES))return`codespaces`;if(process.env.GITPOD_WORKSPACE_ID)return`gitpod`;if(process.env.REPL_ID||process.env.REPL_SLUG)return`replit`;if(process.env.PROJECT_DOMAIN)return`glitch`;if(m(process.env.VERCEL))return`vercel`;if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return`railway`;if(m(process.env.RENDER))return`render`;if(m(process.env.NETLIFY))return`netlify`;if(process.env.DYNO)return`heroku`;if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return`fly.io`;if(m(process.env.CF_PAGES))return`cloudflare-pages`;if(process.env.DENO_DEPLOYMENT_ID)return`deno-deploy`;if(process.env.AWS_LAMBDA_FUNCTION_NAME)return`aws-lambda`;if(process.env.AWS_EXECUTION_ENV===`AWS_ECS_FARGATE`)return`aws-fargate`;if(process.env.AWS_EXECUTION_ENV===`AWS_ECS_EC2`)return`aws-ecs`;try{if(O().readFileSync(`/sys/hypervisor/uuid`,{encoding:`utf8`}).trim().toLowerCase().startsWith(`ec2`))return`aws-ec2`}catch{}if(process.env.K_SERVICE)return`gcp-cloud-run`;if(process.env.GOOGLE_CLOUD_PROJECT)return`gcp`;if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return`azure-app-service`;if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return`azure-functions`;if(process.env.APP_URL?.includes(`ondigitalocean.app`))return`digitalocean-app-platform`;if(process.env.SPACE_CREATOR_USER_ID)return`huggingface-spaces`;if(m(process.env.GITHUB_ACTIONS))return`github-actions`;if(m(process.env.GITLAB_CI))return`gitlab-ci`;if(process.env.CIRCLECI)return`circleci`;if(process.env.BUILDKITE)return`buildkite`;if(m(process.env.CI))return`ci`;if(process.env.KUBERNETES_SERVICE_HOST)return`kubernetes`;try{if(O().existsSync(`/.dockerenv`))return`docker`}catch{}return V.platform===`darwin`?`unknown-darwin`:V.platform===`linux`?`unknown-linux`:V.platform===`win32`?`unknown-win32`:`unknown`}),V={hasInternetAccess:aa,isCI:m(process.env.CI),platform:[`win32`,`darwin`].includes(process.platform)?process.platform:`linux`,arch:process.arch,nodeVersion:process.version,terminal:ta(),isSSH:na,getPackageManagers:oa,getRuntimes:sa,isRunningWithBun:d(Rt),isWslEnvironment:ca,isNpmFromWindowsPath:la,isConductor:ea,detectDeploymentEnvironment:da}})),pa,ma,ha=e((()=>{fa(),pa=V.platform===`darwin`?`⏺`:`●`,ma=`·✔︎·`})),ga,_a,va,ya=e((()=>{ga=[`acceptEdits`,`bypassPermissions`,`default`,`dontAsk`,`plan`],_a=[...ga,`auto`],va=_a}));function ba(e){return process.env.USER_TYPE!==`ant`||e!==`auto`&&e!==`bubble`}function xa(e){return Aa[e]??Aa.default}function Sa(e){return xa(e).external}function Ca(e){return va.includes(e)?e:`default`}function wa(e){return xa(e).title}function Ta(e){return e==="default"||e===void 0}function Ea(e){return xa(e).shortTitle}function Da(e){return xa(e).symbol}function Oa(e){return xa(e).color}var ka,Aa,ja=e((()=>{E(),ha(),ya(),D(),T(()=>ge.enum(va)),ka=T(()=>ge.enum(ga)),Aa={default:{title:`Default`,shortTitle:`Default`,symbol:``,color:`text`,external:`default`},plan:{title:`Plan Mode`,shortTitle:`Plan`,symbol:`⏸`,color:`planMode`,external:`plan`},acceptEdits:{title:`Accept edits`,shortTitle:`Accept`,symbol:`⏵⏵`,color:`autoAccept`,external:`acceptEdits`},bypassPermissions:{title:`Bypass`,shortTitle:`Bypass`,symbol:`⏵⏵`,color:`error`,external:`bypassPermissions`},dontAsk:{title:`Don't Ask`,shortTitle:`DontAsk`,symbol:`⏵⏵`,color:`error`,external:`dontAsk`},auto:{title:`Auto`,shortTitle:`Auto`,symbol:`⏵⏵`,color:`warning`,external:`default`}}})),Ma,Na=e((()=>{Ma=`PreToolUse.PostToolUse.PostToolUseFailure.Notification.UserPromptSubmit.SessionStart.SessionEnd.Stop.StopFailure.SubagentStart.SubagentStop.PreCompact.PostCompact.PermissionRequest.PermissionDenied.Setup.TeammateIdle.TaskCreated.TaskCompleted.Elicitation.ElicitationResult.ConfigChange.WorktreeCreate.WorktreeRemove.InstructionsLoaded.CwdChanged.FileChanged`.split(`.`)})),Pa,Fa,Ia=e((()=>{Pa=[`bash`,`powershell`],Fa=`bash`}));function La(){return{BashCommandHookSchema:w({type:y(`command`).describe(`Shell command hook type`),command:g().describe(`Shell command to execute`),if:Ra(),shell:x(Pa).optional().describe(`Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash.`),timeout:_().positive().optional().describe(`Timeout in seconds for this specific command`),statusMessage:g().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`),async:S().optional().describe(`If true, hook runs in background without blocking`),asyncRewake:S().optional().describe(`If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.`)}),PromptHookSchema:w({type:y(`prompt`).describe(`LLM prompt hook type`),prompt:g().describe(`Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON.`),if:Ra(),timeout:_().positive().optional().describe(`Timeout in seconds for this specific prompt evaluation`),model:g().optional().describe(`Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.`),statusMessage:g().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`)}),HttpHookSchema:w({type:y(`http`).describe(`HTTP hook type`),url:g().url().describe(`URL to POST the hook input JSON to`),if:Ra(),timeout:_().positive().optional().describe(`Timeout in seconds for this specific request`),headers:v(g(),g()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:C(g()).optional().describe(`Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work.`),statusMessage:g().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`)}),AgentHookSchema:w({type:y(`agent`).describe(`Agentic verifier hook type`),prompt:g().describe(`Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.`),if:Ra(),timeout:_().positive().optional().describe(`Timeout in seconds for agent execution (default 60)`),model:g().optional().describe(`Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.`),statusMessage:g().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`)})}}var Ra,za,Ba,H,Va=e((()=>{Na(),E(),D(),Ia(),Ra=T(()=>g().optional().describe(`Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.`)),za=T(()=>{let{BashCommandHookSchema:e,PromptHookSchema:t,AgentHookSchema:n,HttpHookSchema:r}=La();return de(`type`,[e,t,n,r])}),Ba=T(()=>w({matcher:g().optional().describe(`String pattern to match (e.g. tool names like "Write")`),hooks:C(za()).describe(`List of hooks to execute when the matcher matches`)})),H=T(()=>ce(x(Ma),C(Ba())))}));function Ha(e,t){let n=e.toLowerCase();return t.autoUpdate??(U.has(n)&&!qa.has(n))}function Ua(e){return U.has(e.toLowerCase())?!1:Ya.test(e)?!0:Ja.test(e)}function Wa(e,t){let n=e.toLowerCase();if(!U.has(n))return null;if(t.source===`github`)return(t.repo||``).toLowerCase().startsWith(`anthropics/`)?null:`The name '${e}' is reserved for official marketplaces. Only repositories from 'github.com/${Xa}/' can use this name.`;if(t.source===`git`&&t.url){let n=t.url.toLowerCase(),r=n.includes(`github.com/anthropics/`),i=n.includes(`git@github.com:anthropics/`);return r||i?null:`The name '${e}' is reserved for official marketplaces. Only repositories from 'github.com/${Xa}/' can use this name.`}return`The name '${e}' is reserved for official marketplaces and can only be used with GitHub sources from the '${Xa}' organization.`}function Ga(e){return typeof e==`string`&&e.startsWith(`./`)}function Ka(e){return e.source===`file`||e.source===`directory`}var U,qa,Ja,Ya,Xa,W,G,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,K,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo=e((()=>{E(),Va(),Dt(),D(),U=new Set([`claude-code-marketplace`,`claude-code-plugins`,`claude-plugins-official`,`anthropic-marketplace`,`anthropic-plugins`,`agent-skills`,`life-sciences`,`knowledge-work-plugins`]),qa=new Set([`knowledge-work-plugins`]),Ja=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,Ya=/[^\u0020-\u007E]/,Xa=`anthropics`,W=T(()=>g().startsWith(`./`)),G=T(()=>W().endsWith(`.json`)),Za=T(()=>b([W().refine(e=>e.endsWith(`.mcpb`)||e.endsWith(`.dxt`),{message:`MCPB file path must end with .mcpb or .dxt`}).describe(`Path to MCPB file relative to plugin root`),g().url().refine(e=>e.endsWith(`.mcpb`)||e.endsWith(`.dxt`),{message:`MCPB URL must end with .mcpb or .dxt`}).describe(`URL to MCPB file`)])),Qa=T(()=>W().endsWith(`.md`)),$a=T(()=>b([Qa(),W()])),eo=T(()=>g().min(1,`Marketplace must have a name`).refine(e=>!e.includes(` `),{message:`Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")`}).refine(e=>!e.includes(`/`)&&!e.includes(`\\`)&&!e.includes(`..`)&&e!==`.`,{message:`Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."`}).refine(e=>!Ua(e),{message:`Marketplace name impersonates an official marketplace`}).refine(e=>e.toLowerCase()!==`inline`,{message:`Marketplace name "inline" is reserved for --plugin-dir session plugins`}).refine(e=>e.toLowerCase()!==`builtin`,{message:`Marketplace name "builtin" is reserved for built-in plugins`})),to=T(()=>w({name:g().min(1,`Author name cannot be empty`).describe(`Display name of the plugin author or organization`),email:g().optional().describe(`Contact email for support or feedback`),url:g().optional().describe(`Website, GitHub profile, or organization URL`)})),no=T(()=>w({name:g().min(1,`Plugin name cannot be empty`).refine(e=>!e.includes(` `),{message:`Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")`}).describe(`Unique identifier for the plugin, used for namespacing (prefer kebab-case)`),version:g().optional().describe(`Semantic version (e.g., 1.2.3) following semver.org specification`),description:g().optional().describe(`Brief, user-facing explanation of what the plugin provides`),author:to().optional().describe(`Information about the plugin creator or maintainer`),homepage:g().url().optional().describe(`Plugin homepage or documentation URL`),repository:g().optional().describe(`Source code repository URL`),license:g().optional().describe(`SPDX license identifier (e.g., MIT, Apache-2.0)`),keywords:C(g()).optional().describe(`Tags for plugin discovery and categorization`),dependencies:C(ko()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)})),ro=T(()=>w({description:g().optional().describe(`Brief, user-facing explanation of what these hooks provide`),hooks:he(()=>H()).describe(`The hooks provided by the plugin, in the same format as the one used for settings`)})),io=T(()=>w({hooks:b([G().describe(`Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root`),he(()=>H()).describe(`Additional hooks (in addition to those in hooks/hooks.json, if it exists)`),C(b([G().describe(`Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root`),he(()=>H()).describe(`Additional hooks (in addition to those in hooks/hooks.json, if it exists)`)]))])})),ao=T(()=>w({source:$a().optional().describe(`Path to command markdown file, relative to plugin root`),content:g().optional().describe(`Inline markdown content for the command`),description:g().optional().describe(`Command description override`),argumentHint:g().optional().describe(`Hint for command arguments (e.g., "[file]")`),model:g().optional().describe(`Default model for this command`),allowedTools:C(g()).optional().describe(`Tools allowed when command runs`)}).refine(e=>e.source&&!e.content||!e.source&&e.content,{message:`Command must have either "source" (file path) or "content" (inline markdown), but not both`})),oo=T(()=>w({commands:b([$a().describe(`Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root`),C($a().describe(`Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional command files or skill directories`),v(g(),ao()).describe(`Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")`)])})),so=T(()=>w({agents:b([Qa().describe(`Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root`),C(Qa().describe(`Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional agent files`)])})),co=T(()=>w({skills:b([W().describe(`Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root`),C(W().describe(`Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional skill directories`)])})),lo=T(()=>w({outputStyles:b([W().describe(`Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root`),C(W().describe(`Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional output styles directories or files`)])})),uo=T(()=>g().min(1)),fo=T(()=>g().min(2).refine(e=>e.startsWith(`.`),{message:`File extensions must start with dot (e.g., ".ts", not "ts")`})),po=T(()=>w({mcpServers:b([G().describe(`MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)`),Za().describe(`Path or URL to MCPB file containing MCP server configuration`),v(g(),At()).describe(`MCP server configurations keyed by server name`),C(b([G().describe(`Path to MCP servers configuration file`),Za().describe(`Path or URL to MCPB file`),v(g(),At()).describe(`Inline MCP server configurations`)])).describe(`Array of MCP server configurations (paths, MCPB files, or inline definitions)`)])})),mo=T(()=>w({type:x([`string`,`number`,`boolean`,`directory`,`file`]).describe(`Type of the configuration value`),title:g().describe(`Human-readable label shown in the config dialog`),description:g().describe(`Help text shown beneath the field in the config dialog`),required:S().optional().describe(`If true, validation fails when this field is empty`),default:b([g(),_(),S(),C(g())]).optional().describe(`Default value used when the user provides nothing`),multiple:S().optional().describe(`For string type: allow an array of strings`),sensitive:S().optional().describe(`If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json`),min:_().optional().describe(`Minimum value (number type only)`),max:_().optional().describe(`Maximum value (number type only)`)}).strict()),ho=T(()=>w({userConfig:v(g().regex(/^[A-Za-z_]\w*$/,`Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks`),mo()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage (macOS keychain or .credentials.json). Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. Note: sensitive values share a single keychain entry with OAuth tokens — keep secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")})),go=T(()=>w({channels:C(w({server:g().min(1).describe(`Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers.`),displayName:g().optional().describe(`Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.`),userConfig:v(g(),mo()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe(`Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.`)})),_o=T(()=>fe({command:g().min(1).refine(e=>!(e.includes(` `)&&!e.startsWith(`/`)),{message:`Command should not contain spaces. Use args array for arguments.`}).describe(`Command to execute the LSP server (e.g., "typescript-language-server")`),args:C(uo()).optional().describe(`Command-line arguments to pass to the server`),extensionToLanguage:v(fo(),uo()).refine(e=>Object.keys(e).length>0,{message:`extensionToLanguage must have at least one mapping`}).describe(`Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping.`),transport:x([`stdio`,`socket`]).default(`stdio`).describe(`Communication transport mechanism`),env:v(g(),g()).optional().describe(`Environment variables to set when starting the server`),initializationOptions:le().optional().describe(`Initialization options passed to the server during initialization`),settings:le().optional().describe(`Settings passed to the server via workspace/didChangeConfiguration`),workspaceFolder:g().optional().describe(`Workspace folder path to use for the server`),startupTimeout:_().int().positive().optional().describe(`Maximum time to wait for server startup (milliseconds)`),shutdownTimeout:_().int().positive().optional().describe(`Maximum time to wait for graceful shutdown (milliseconds)`),restartOnCrash:S().optional().describe(`Whether to restart the server if it crashes`),maxRestarts:_().int().nonnegative().optional().describe(`Maximum number of restart attempts before giving up`)})),vo=T(()=>w({lspServers:b([G().describe(`Path to .lsp.json configuration file relative to plugin root`),v(g(),_o()).describe(`LSP server configurations keyed by server name`),C(b([G().describe(`Path to LSP configuration file`),v(g(),_o()).describe(`Inline LSP server configurations`)])).describe(`Array of LSP server configurations (paths or inline definitions)`)])})),yo=T(()=>g().refine(e=>!e.includes(`..`)&&!e.includes(`//`),`Package name cannot contain path traversal patterns`).refine(e=>/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/.test(e)||/^[a-z0-9][a-z0-9-._]*$/.test(e),`Invalid npm package name format`)),bo=T(()=>w({settings:v(g(),le()).optional().describe(`Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)`)})),xo=T(()=>w({...no().shape,...io().partial().shape,...oo().partial().shape,...so().partial().shape,...co().partial().shape,...lo().partial().shape,...go().partial().shape,...po().partial().shape,...vo().partial().shape,...bo().partial().shape,...ho().partial().shape})),So=T(()=>de(`source`,[w({source:y(`url`),url:g().url().describe(`Direct URL to marketplace.json file`),headers:v(g(),g()).optional().describe(`Custom HTTP headers (e.g., for authentication)`)}),w({source:y(`github`),repo:g().describe(`GitHub repository in owner/repo format`),ref:g().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),path:g().optional().describe(`Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)`),sparsePaths:C(g()).optional().describe(`Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.`)}),w({source:y(`git`),url:g().describe(`Full git repository URL`),ref:g().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),path:g().optional().describe(`Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)`),sparsePaths:C(g()).optional().describe(`Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.`)}),w({source:y(`npm`),package:yo().describe(`NPM package containing marketplace.json`)}),w({source:y(`file`),path:g().describe(`Local file path to marketplace.json`)}),w({source:y(`directory`),path:g().describe(`Local directory containing .claude-plugin/marketplace.json`)}),w({source:y(`hostPattern`),hostPattern:g().describe(`Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").`)}),w({source:y(`pathPattern`),pathPattern:g().describe(`Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.`)}),w({source:y(`settings`),name:eo().refine(e=>!U.has(e.toLowerCase()),{message:`Reserved official marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false.`}).describe(`Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation as PluginMarketplaceSchema plus reserved-name rejection — validateOfficialNameSource runs after the disk write, too late to clean up.`),plugins:C(To()).describe(`Plugin entries declared inline in settings.json`),owner:to().optional()}).describe(`Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).`)])),Co=T(()=>g().length(40).regex(/^[a-f0-9]{40}$/,`Must be a full 40-character lowercase git commit SHA`)),wo=T(()=>b([W().describe(`Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)`),w({source:y(`npm`),package:yo().or(g()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:g().optional().describe(`Specific version or version range (e.g., ^1.0.0, ~2.1.0)`),registry:g().url().optional().describe(`Custom NPM registry URL (defaults to using system default, likely npmjs.org)`)}).describe(`NPM package as plugin source`),w({source:y(`pip`),package:g().describe(`Python package name as it appears on PyPI`),version:g().optional().describe(`Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)`),registry:g().url().optional().describe(`Custom PyPI registry URL (defaults to using system default, likely pypi.org)`)}).describe(`Python package as plugin source`),w({source:y(`url`),url:g().describe(`Full git repository URL (https:// or git@)`),ref:g().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),sha:Co().optional().describe(`Specific commit SHA to use`)}),w({source:y(`github`),repo:g().describe(`GitHub repository in owner/repo format`),ref:g().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),sha:Co().optional().describe(`Specific commit SHA to use`)}),w({source:y(`git-subdir`),url:g().describe(`Git repository: GitHub owner/repo shorthand, https://, or git@ URL`),path:g().min(1).describe(`Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.`),ref:g().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),sha:Co().optional().describe(`Specific commit SHA to use`)}).describe(`Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.`)])),To=T(()=>w({name:g().min(1,`Plugin name cannot be empty`).refine(e=>!e.includes(` `),{message:`Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")`}).describe(`Plugin name as it appears in the target repository`),source:wo().describe(`Where to fetch the plugin from. Must be a remote source — relative paths have no marketplace repository to resolve against.`),description:g().optional(),version:g().optional(),strict:S().optional()}).refine(e=>typeof e.source!=`string`,{message:`Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, pip). Relative-path sources like "./foo" have no marketplace repository to resolve against.`})),Eo=T(()=>xo().partial().extend({name:g().min(1,`Plugin name cannot be empty`).refine(e=>!e.includes(` `),{message:`Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")`}).describe(`Unique identifier matching the plugin name`),source:wo().describe(`Where to fetch the plugin from`),category:g().optional().describe(`Category for organizing plugins (e.g., "productivity", "development")`),tags:C(g()).optional().describe(`Tags for searchability and discovery`),strict:S().optional().default(!0).describe(`Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.`)})),Do=T(()=>w({name:eo(),owner:to().describe(`Marketplace maintainer or curator information`),plugins:C(Eo()).describe(`Collection of available plugins in this marketplace`),forceRemoveDeletedPlugins:S().optional().describe(`When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users`),metadata:w({pluginRoot:g().optional().describe(`Base path for relative plugin sources`),version:g().optional().describe(`Marketplace version`),description:g().optional().describe(`Marketplace description`)}).optional().describe(`Optional marketplace metadata`),allowCrossMarketplaceDependenciesOn:C(g()).optional().describe(`Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.`)})),K=T(()=>g().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,`Plugin ID must be in format: plugin@marketplace`)),Oo=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,ko=T(()=>b([g().regex(Oo,`Dependency must be a plugin name, optionally qualified with @marketplace`).transform(e=>e.replace(/@\^[^@]*$/,``)),w({name:g().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:g().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform(e=>e.marketplace?`${e.name}@${e.marketplace}`:e.name)])),T(()=>b([K(),w({id:K().describe(`Plugin identifier (e.g., "formatter@tools")`),version:g().optional().describe(`Version constraint (e.g., "^2.0.0")`),required:S().optional().describe(`If true, cannot be disabled`),config:v(g(),le()).optional().describe(`Plugin-specific configuration`)})])),Ao=T(()=>w({version:g().describe(`Currently installed version`),installedAt:g().describe(`ISO 8601 timestamp of installation`),lastUpdated:g().optional().describe(`ISO 8601 timestamp of last update`),installPath:g().describe(`Absolute path to the installed plugin directory`),gitCommitSha:g().optional().describe(`Git commit SHA for git-based plugins (for version tracking)`)})),jo=T(()=>w({version:y(1).describe(`Schema version 1`),plugins:v(K(),Ao()).describe(`Map of plugin IDs to their installation metadata`)})),Mo=T(()=>x([`managed`,`user`,`project`,`local`])),No=T(()=>w({scope:Mo().describe(`Installation scope`),projectPath:g().optional().describe(`Project path (required for project/local scopes)`),installPath:g().describe(`Absolute path to the versioned plugin directory`),version:g().optional().describe(`Currently installed version`),installedAt:g().optional().describe(`ISO 8601 timestamp of installation`),lastUpdated:g().optional().describe(`ISO 8601 timestamp of last update`),gitCommitSha:g().optional().describe(`Git commit SHA for git-based plugins`)})),Po=T(()=>w({version:y(2).describe(`Schema version 2`),plugins:v(K(),C(No())).describe(`Map of plugin IDs to arrays of installation entries`)})),T(()=>b([jo(),Po()])),Fo=T(()=>w({source:So().describe(`Where to fetch the marketplace from`),installLocation:g().describe(`Local cache path where marketplace manifest is stored`),lastUpdated:g().describe(`ISO 8601 timestamp of last marketplace refresh`),autoUpdate:S().optional().describe(`Whether to automatically update this marketplace and its installed plugins on startup`)})),Io=T(()=>v(g(),Fo()))}));function Ro(e){let t=e.replace(/[^a-zA-Z0-9_-]/g,`_`);return e.startsWith(zo)&&(t=t.replace(/_+/g,`_`).replace(/^_|_$/g,``)),t}var zo,Bo=e((()=>{zo=`claude.ai `}));function Vo(e){let[t,n,...r]=e.split(`__`);return t!==`mcp`||!n?null:{serverName:n,toolName:r.length>0?r.join(`__`):void 0}}function Ho(e){return`mcp__${Ro(e)}__`}function Uo(e,t){return`${Ho(e)}${Ro(t)}`}function Wo(e){return e.mcpInfo?Uo(e.mcpInfo.serverName,e.mcpInfo.toolName):e.name}function Go(e,t){let n=`mcp__${Ro(t)}__`;return e.replace(n,``)}function Ko(e){let t=e.replace(/\s*\(MCP\)\s*$/,``);t=t.trim();let n=t.indexOf(` - `);return n===-1?t:t.substring(n+3).trim()}var qo=e((()=>{Bo()})),Jo,Yo,Xo,Zo,Qo=e((()=>{Jo=`Agent`,Yo=`Task`,Xo=`verification`,Zo=new Set([`Explore`,`Plan`])})),$o,es=e((()=>{$o=`TaskOutput`})),ts,ns,rs=e((()=>{ts=`TaskStop`,ns=`
13
- - Stops a running background task by its ID
14
- - Takes a task_id parameter identifying the task to stop
15
- - Returns a success or failure status
16
- - Use this tool when you need to terminate a long-running task
17
- `}));function q(e){return ds[e]??e}function is(e){let t=[];for(let[n,r]of Object.entries(ds))r===e&&t.push(n);return t}function as(e){return e.replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)}function os(e){return e.replace(/\\\(/g,`(`).replace(/\\\)/g,`)`).replace(/\\\\/g,`\\`)}function ss(e){let t=ls(e,`(`);if(t===-1)return{toolName:q(e)};let n=us(e,`)`);if(n===-1||n<=t||n!==e.length-1)return{toolName:q(e)};let r=e.substring(0,t),i=e.substring(t+1,n);if(!r)return{toolName:q(e)};if(i===``||i===`*`)return{toolName:q(r)};let a=os(i);return{toolName:q(r),ruleContent:a}}function cs(e){if(!e.ruleContent)return e.toolName;let t=as(e.ruleContent);return`${e.toolName}(${t})`}function ls(e,t){for(let n=0;n<e.length;n++)if(e[n]===t){let t=0,r=n-1;for(;r>=0&&e[r]===`\\`;)t++,r--;if(t%2==0)return n}return-1}function us(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]===t){let t=0,r=n-1;for(;r>=0&&e[r]===`\\`;)t++,r--;if(t%2==0)return n}return-1}var ds,fs=e((()=>{Qo(),es(),rs(),ds={Task:Jo,KillShell:ts,AgentOutputTool:$o,BashOutputTool:$o}}));function ps(e){return gs.filePatternTools.includes(e)}function ms(e){return gs.bashPrefixTools.includes(e)}function hs(e){return gs.customValidation[e]}var gs,_s=e((()=>{gs={filePatternTools:[`Read`,`Write`,`Edit`,`Glob`,`NotebookRead`,`NotebookEdit`],bashPrefixTools:[`Bash`],customValidation:{WebSearch:e=>e.includes(`*`)||e.includes(`?`)?{valid:!1,error:`WebSearch does not support wildcards`,suggestion:`Use exact search terms without * or ?`,examples:[`WebSearch(claude ai)`,`WebSearch(typescript tutorial)`]}:{valid:!0},WebFetch:e=>e.includes(`://`)||e.startsWith(`http`)?{valid:!1,error:`WebFetch permissions use domain format, not URLs`,suggestion:`Use "domain:hostname" format`,examples:[`WebFetch(domain:example.com)`,`WebFetch(domain:github.com)`]}:e.startsWith(`domain:`)?{valid:!0}:{valid:!1,error:`WebFetch permissions must use "domain:" prefix`,suggestion:`Use "domain:hostname" format`,examples:[`WebFetch(domain:example.com)`,`WebFetch(domain:*.google.com)`]}}}}));function vs(e,t){let n=0,r=t-1;for(;r>=0&&e[r]===`\\`;)n++,r--;return n%2!=0}function ys(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&!vs(e,r)&&n++;return n}function bs(e){for(let t=0;t<e.length-1;t++)if(e[t]===`(`&&e[t+1]===`)`&&!vs(e,t))return!0;return!1}function xs(e,t){if(!e||e.trim()===``)return{valid:!1,error:`Permission rule cannot be empty`};if(ys(e,`(`)!==ys(e,`)`))return{valid:!1,error:`Mismatched parentheses`,suggestion:`Ensure all opening parentheses have matching closing parentheses`};if(bs(e)){let t=e.substring(0,e.indexOf(`(`));return t?{valid:!1,error:`Empty parentheses`,suggestion:`Either specify a pattern or use just "${t}" without parentheses`,examples:[`${t}`,`${t}(some-pattern)`]}:{valid:!1,error:`Empty parentheses with no tool name`,suggestion:`Specify a tool name before the parentheses`}}let n=ss(e),r=Vo(n.toolName);if(r)return n.ruleContent!==void 0||ys(e,`(`)>0?{valid:!1,error:`MCP rules do not support patterns in parentheses`,suggestion:`Use "${n.toolName}" without parentheses, or use "mcp__${r.serverName}__*" for all tools`,examples:[`mcp__${r.serverName}`,`mcp__${r.serverName}__*`,r.toolName&&r.toolName!==`*`?`mcp__${r.serverName}__${r.toolName}`:void 0].filter(Boolean)}:{valid:!0};if(!n.toolName||n.toolName.length===0)return{valid:!1,error:`Tool name cannot be empty`};if(n.toolName[0]!==n.toolName[0]?.toUpperCase())return{valid:!1,error:`Tool names must start with uppercase`,suggestion:`Use "${Ht(String(n.toolName))}"`};let i=hs(n.toolName);if(i&&n.ruleContent!==void 0){let e=i(n.ruleContent);if(!e.valid)return e}if(ms(n.toolName)&&n.ruleContent!==void 0){let e=n.ruleContent;if(e.includes(`:*`)&&!e.endsWith(`:*`))return{valid:!1,error:`The :* pattern must be at the end`,suggestion:`Move :* to the end for prefix matching, or use * for wildcard matching`,examples:[`Bash(npm run:*) - prefix matching (legacy)`,`Bash(npm run *) - wildcard matching`]};if(e===`:*`)return{valid:!1,error:`Prefix cannot be empty before :*`,suggestion:`Specify a command prefix before :*`,examples:[`Bash(npm:*)`,`Bash(git:*)`]}}if(ps(n.toolName)&&n.ruleContent!==void 0){let e=n.ruleContent;if(e.includes(`:*`))return{valid:!1,error:`The ":*" syntax is only for Bash prefix rules`,suggestion:`Use glob patterns like "*" or "**" for file matching`,examples:[`${n.toolName}(*.ts) - matches .ts files`,`${n.toolName}(src/**) - matches all files in src`,`${n.toolName}(**/*.test.ts) - matches test files`]};if(e.includes(`*`)&&!e.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!e.includes(`**`))return{valid:!1,error:`Wildcard placement might be incorrect`,suggestion:`Wildcards are typically used at path boundaries`,examples:[`${n.toolName}(*.js) - all .js files`,`${n.toolName}(src/*) - all files directly in src`,`${n.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var Ss,Cs=e((()=>{E(),qo(),D(),fs(),Ut(),_s(),Ss=T(()=>g().superRefine((e,t)=>{let n=xs(e);if(!n.valid){let r=n.error;n.suggestion&&(r+=`. ${n.suggestion}`),n.examples&&n.examples.length>0&&(r+=`. Examples: ${n.examples.join(`, `)}`),t.addIssue({code:me.custom,message:r,params:{received:e}})}}))}));function ws(e){return`serverName`in e&&e.serverName!==void 0}function Ts(e){return`serverCommand`in e&&e.serverCommand!==void 0}function Es(e){return`serverUrl`in e&&e.serverUrl!==void 0}var Ds,Os,ks,As,js,Ms,J,Ns=e((()=>{E(),$i(),te(),D(),ja(),Lo(),Vi(),Cs(),Va(),$r(),Ds=T(()=>v(g(),pe())),Os=T(()=>w({allow:C(Ss()).optional().describe(`List of permission rules for allowed operations`),deny:C(Ss()).optional().describe(`List of permission rules for denied operations`),ask:C(Ss()).optional().describe(`List of permission rules that should always prompt for confirmation`),defaultMode:x(va).optional().describe(`Default permission mode when Work Mate needs access`),disableBypassPermissionsMode:x([`disable`]).optional().describe(`Disable the ability to bypass permission prompts`),disableAutoMode:x([`disable`]).optional().describe(`Disable auto mode`),additionalDirectories:C(g()).optional().describe(`Additional directories to include in the permission scope`)}).passthrough()),ks=T(()=>w({source:So().describe(`Where to fetch the marketplace from`),installLocation:g().optional().describe(`Local cache path where marketplace manifest is stored (auto-generated if not provided)`),autoUpdate:S().optional().describe(`Whether to automatically update this marketplace and its installed plugins on startup`)})),As=T(()=>w({serverName:g().regex(/^[a-zA-Z0-9_-]+$/,`Server name can only contain letters, numbers, hyphens, and underscores`).optional().describe(`Name of the MCP server that users are allowed to configure`),serverCommand:C(g()).min(1,`Server command must have at least one element (the command)`).optional().describe(`Command array [command, ...args] to match exactly for allowed stdio servers`),serverUrl:g().optional().describe(`URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers`)}).refine(e=>Zr([e.serverName!==void 0,e.serverCommand!==void 0,e.serverUrl!==void 0],Boolean)===1,{message:`Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"`})),js=T(()=>w({serverName:g().regex(/^[a-zA-Z0-9_-]+$/,`Server name can only contain letters, numbers, hyphens, and underscores`).optional().describe(`Name of the MCP server that is explicitly blocked`),serverCommand:C(g()).min(1,`Server command must have at least one element (the command)`).optional().describe(`Command array [command, ...args] to match exactly for blocked stdio servers`),serverUrl:g().optional().describe(`URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers`)}).refine(e=>Zr([e.serverName!==void 0,e.serverCommand!==void 0,e.serverUrl!==void 0],Boolean)===1,{message:`Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"`})),Ms=[`skills`,`agents`,`hooks`,`mcp`],J=T(()=>w({$schema:y(Bi).optional().describe(`JSON Schema reference for Work Mate settings`),apiKeyHelper:g().optional().describe(`Path to a script that outputs authentication values`),awsCredentialExport:g().optional().describe(`Path to a script that exports AWS credentials`),awsAuthRefresh:g().optional().describe(`Path to a script that refreshes AWS authentication`),gcpAuthRefresh:g().optional().describe(`Command to refresh GCP authentication (e.g., gcloud auth application-default login)`),...m(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:w({issuer:g().url().describe(`IdP issuer URL for OIDC discovery`),clientId:g().describe(`Work Mate's client_id registered at the IdP`),callbackPort:_().int().positive().optional().describe(`Fixed loopback callback port for the IdP OIDC login. Only needed if the IdP does not honor RFC 8252 port-any matching.`)}).optional().describe(`XAA (SEP-990) IdP connection. Configure once; all XAA-enabled MCP servers reuse this.`)}:{},fileSuggestion:w({type:y(`command`),command:g()}).optional().describe(`Custom file suggestion configuration for @ mentions`),respectGitignore:S().optional().describe(`Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected.`),cleanupPeriodDays:_().nonnegative().int().optional().describe(`Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup.`),env:Ds().optional().describe(`Environment variables to set for Work Mate sessions`),attribution:w({commit:g().optional().describe(`Attribution text for git commits, including any trailers. Empty string hides attribution.`),pr:g().optional().describe(`Attribution text for pull request descriptions. Empty string hides attribution.`)}).optional().describe(`Customize attribution text for commits and PRs. Each field defaults to the standard Work Mate attribution if not set.`),includeCoAuthoredBy:S().optional().describe(`Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)`),includeGitInstructions:S().optional().describe(`Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)`),permissions:Os().optional().describe(`Tool usage permissions configuration`),modelType:x([`anthropic`,`openai`,`gemini`,`grok`]).optional().describe(`API provider type. "anthropic" uses the first-party API (default), "openai" uses the OpenAI Chat Completions API, "gemini" uses the Gemini API, and "grok" uses the xAI Grok API (OpenAI-compatible). When set to "openai", configure OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL. When set to "gemini", configure GEMINI_API_KEY and optional GEMINI_BASE_URL. When set to "grok", configure GROK_API_KEY (or XAI_API_KEY), optional GROK_BASE_URL, GROK_MODEL, and GROK_MODEL_MAP.`),activeProviderId:g().optional().describe(`Currently active API provider id (set by /provider use <id>). Authoritative source for the active-provider marker in /provider list.`),model:g().optional().describe(`Override the default model used by Work Mate`),availableModels:C(g()).optional().describe(`Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.`),modelOverrides:v(g(),g()).optional().describe(`Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.`),enableAllProjectMcpServers:S().optional().describe(`Whether to automatically approve all MCP servers in the project`),enabledMcpjsonServers:C(g()).optional().describe(`List of approved MCP servers from .mcp.json`),disabledMcpjsonServers:C(g()).optional().describe(`List of rejected MCP servers from .mcp.json`),allowedMcpServers:C(As()).optional().describe(`Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied.`),deniedMcpServers:C(js()).optional().describe(`Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied.`),hooks:H().optional().describe(`Custom commands to run before/after tool executions`),worktree:w({symlinkDirectories:C(g()).optional().describe(`Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"`),sparsePaths:C(g()).optional().describe(`Directories to include when creating worktrees, via git sparse-checkout (cone mode). Dramatically faster in large monorepos — only the listed paths are written to disk.`)}).optional().describe(`Git worktree configuration for --worktree flag.`),disableAllHooks:S().optional().describe(`Disable all hooks and statusLine execution`),defaultShell:x([`bash`,`powershell`]).optional().describe(`Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip).`),allowManagedHooksOnly:S().optional().describe(`When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored.`),allowedHttpHookUrls:C(g()).optional().describe(`Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).`),httpHookAllowedEnvVars:C(g()).optional().describe(`Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers).`),allowManagedPermissionRulesOnly:S().optional().describe(`When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored.`),allowManagedMcpServersOnly:S().optional().describe(`When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies.`),strictPluginOnlyCustomization:se(e=>Array.isArray(e)?e.filter(e=>Ms.includes(e)):e,b([S(),C(x(Ms))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by marketplace allowlist, everything else blocked here.'),statusLine:w({type:y(`command`),command:g(),padding:_().optional(),refreshInterval:_().optional()}).optional().describe(`Custom status line display configuration`),statusLineEnabled:S().optional().describe(`Whether to render the fork built-in status line (model + ctx + 5h/7d limits + cost + cache pill). Toggled with /statusline.`),enabledPlugins:v(g(),b([C(g()),S(),ue()])).optional().describe(`Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.`),extraKnownMarketplaces:v(g(),ks()).check(e=>{for(let[t,n]of Object.entries(e.value))n.source.source===`settings`&&n.source.name!==t&&e.issues.push({code:`custom`,input:n.source.name,path:[t,`source`,`name`],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${t}" but source.name "${n.source.name}")`})}).optional().describe(`Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources.`),strictKnownMarketplaces:C(So()).optional().describe(`Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. Note: this is a policy gate only — it does NOT register marketplaces. To pre-register allowed marketplaces for users, also set extraKnownMarketplaces.`),blockedMarketplaces:C(So()).optional().describe(`Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem.`),forceLoginMethod:x([`claudeai`,`console`]).optional().describe(`Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing`),forceLoginOrgUUID:g().optional().describe(`Organization UUID to use for OAuth login`),otelHeadersHelper:g().optional().describe(`Path to a script that outputs OpenTelemetry headers`),outputStyle:g().optional().describe(`Controls the output style for assistant responses`),language:g().optional().describe(`Preferred language for Claude responses (e.g., "japanese", "spanish")`),skipWebFetchPreflight:S().optional().describe(`Skip the WebFetch blocklist check for enterprise environments with restrictive security policies`),webSearchAdapter:x([`api`,`bing`,`brave`,`exa`,`tavily`]).optional().describe(`Web search backend adapter. "tavily" uses Tavily Search API (default), "api" uses Anthropic server-side search, "bing" scrapes Bing HTML, "brave" uses Brave Search API, "exa" uses Exa AI.`),webFetchAdapter:x([`tavily`,`http`]).optional().describe(`Web fetch backend. "tavily" uses Tavily Extract API which returns Markdown directly (default), "http" fetches the URL directly via HTTP.`),tavilyEndpointUrl:g().optional().describe(`Custom Tavily API endpoint URL. Defaults to https://tavily.readmagic.workmate.win. Used by both WebSearch and WebFetch when tavily adapter is selected.`),braveApiKey:g().optional().describe(`Brave Search API key. Required when using the brave web search adapter.`),webFetchHttpTimeoutMs:_().int().positive().optional().describe(`HTTP timeout in milliseconds for the HTTP direct web fetch backend. Defaults to 60000 (60s).`),exaApiKey:g().optional().describe(`Exa AI API key. Required when using the exa web search adapter.`),exaEndpointUrl:g().optional().describe(`Custom Exa AI MCP endpoint URL. Defaults to https://mcp.exa.ai/mcp.`),sandbox:Qi().optional(),feedbackSurveyRate:_().min(0).max(1).optional().describe(`Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point.`),spinnerTipsEnabled:S().optional().describe(`Whether to show tips in the spinner`),spinnerVerbs:w({mode:x([`append`,`replace`]),verbs:C(g())}).optional().describe(`Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.`),spinnerTipsOverride:w({excludeDefault:S().optional(),tips:C(g())}).optional().describe(`Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false).`),syntaxHighlightingDisabled:S().optional().describe(`Whether to disable syntax highlighting in diffs`),terminalTitleFromRename:S().optional().describe(`Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles.`),alwaysThinkingEnabled:S().optional().describe(`When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models.`),advisorModel:g().optional().describe(`Advisor model for the server-side advisor tool.`),fastMode:S().optional().describe(`When true, fast mode is enabled. When absent or false, fast mode is off.`),fastModePerSessionOptIn:S().optional().describe(`When true, fast mode does not persist across sessions. Each session starts with fast mode off.`),promptSuggestionEnabled:S().optional().describe(`When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled.`),poorMode:S().optional().describe(`When true, poor mode is active — extract_memories and prompt_suggestion are disabled to save tokens.`),showClearContextOnPlanAccept:S().optional().describe(`When true, the plan-approval dialog offers a "clear context" option. Defaults to false.`),agent:g().optional().describe(`Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model.`),companyAnnouncements:C(g()).optional().describe(`Company announcements to display at startup (one will be randomly selected if multiple are provided)`),pluginConfigs:v(g(),w({mcpServers:v(g(),v(g(),b([g(),_(),S(),C(g())]))).optional().describe(`User configuration values for MCP servers keyed by server name`),options:v(g(),b([g(),_(),S(),C(g())])).optional().describe(`Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.`)})).optional().describe(`Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)`),remote:w({defaultEnvironmentId:g().optional().describe(`Default environment ID to use for remote sessions`)}).optional().describe(`Remote session configuration`),autoUpdatesChannel:x([`latest`,`stable`]).optional().describe(`Release channel for auto-updates (latest or stable)`),disableDeepLinkRegistration:x([`disable`]).optional().describe(`Prevent claude-cli:// protocol handler registration with the OS`),minimumVersion:g().optional().describe(`Minimum version to stay on - prevents downgrades when switching to stable channel`),plansDirectory:g().optional().describe(`Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/`),...process.env.USER_TYPE===`ant`?{classifierPermissionsEnabled:S().optional().describe(`Enable AI-based classification for Bash(prompt:...) permission rules`)}:{},minSleepDurationMs:_().nonnegative().int().optional().describe(`Minimum duration in milliseconds that the Sleep tool must sleep for. Useful for throttling proactive tick frequency.`),maxSleepDurationMs:_().int().min(-1).optional().describe(`Maximum duration in milliseconds that the Sleep tool can sleep for. Set to -1 for indefinite sleep (waits for user input). Useful for limiting idle time in remote/managed environments.`),channelsEnabled:S().optional().describe(`Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels.`),allowedChannelPlugins:C(w({marketplace:g(),plugin:g()})).optional().describe(`Teams/Enterprise allowlist of channel plugins. When set, replaces the default allowlist — admins decide which plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true.`),prefersReducedMotion:S().optional().describe(`Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)`),autoMemoryEnabled:S().optional().describe(`Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory.`),autoMemoryDirectory:g().optional().describe(`Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/.`),autoDreamEnabled:S().optional().describe(`Enable background memory consolidation (auto-dream). When set, overrides the server-side default.`),showThinkingSummaries:S().optional().describe(`Show thinking summaries in the transcript view (ctrl+o). Default: false.`),skipDangerousModePermissionPrompt:S().optional().describe(`Whether the user has accepted the bypass permissions mode dialog`),skipAutoPermissionPrompt:S().optional().describe(`Whether the user has accepted the auto mode opt-in dialog`),useAutoModeDuringPlan:S().optional().describe(`Whether plan mode uses auto mode semantics when auto mode is available (default: true)`),autoMode:w({allow:C(g()).optional().describe(`Rules for the auto mode classifier allow section`),soft_deny:C(g()).optional().describe(`Rules for the auto mode classifier deny section`),...process.env.USER_TYPE===`ant`?{deny:C(g()).optional()}:{},environment:C(g()).optional().describe(`Entries for the auto mode classifier environment section`)}).optional().describe(`Auto mode classifier prompt customization`),disableAutoMode:x([`disable`]).optional().describe(`Disable auto mode`),sshConfigs:C(w({id:g().describe(`Unique identifier for this SSH config. Used to match configs across settings sources.`),name:g().describe(`Display name for the SSH connection`),sshHost:g().describe(`SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config`),sshPort:_().int().optional().describe(`SSH port (default: 22)`),sshIdentityFile:g().optional().describe(`Path to SSH identity file (private key)`),startDirectory:g().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe(`SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members.`),claudeMdExcludes:C(g()).optional().describe(`Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"`),cacheThreshold:_().int().min(0).max(100).optional().describe(`Prompt cache hit rate threshold (0-100). Warnings shown when cache hit rate falls below this percentage. Default: 80.`),cacheWarningEnabled:S().optional().describe(`Whether to show cache hit rate warnings in the message flow when the rate falls below cacheThreshold. Default: true.`),pluginTrustMessage:g().optional().describe(`Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").`),workspaceApiKey:g().optional().describe(`Workspace API key (sk-ant-api03-*) saved via /login UI. Stored in plaintext — keep this file gitignored and restrict its permissions. ANTHROPIC_API_KEY environment variable takes precedence when both are set.`)}).passthrough())}));function Ps(){return dt(oe(J(),{unrepresentable:`any`}),null,2)}var Fs=e((()=>{E(),st(),Ns()}));function Is(e){let t=Ls.find(t=>t.matches(e));if(!t)return null;let n={...t.tip};if(e.code===`invalid_value`&&e.enumValues&&!n.suggestion&&(n.suggestion=`Valid values: ${e.enumValues.map(e=>`"${e}"`).join(`, `)}`),!n.docLink&&e.path){let t=e.path.split(`.`)[0];t&&(n.docLink=Rs[t])}return n}var Y,Ls,Rs,zs=e((()=>{Y=`https://code.claude.com/docs/en`,Ls=[{matches:e=>e.path===`permissions.defaultMode`&&e.code===`invalid_value`,tip:{suggestion:`Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)`,docLink:`${Y}/iam#permission-modes`}},{matches:e=>e.path===`apiKeyHelper`&&e.code===`invalid_type`,tip:{suggestion:`Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"`}},{matches:e=>e.path===`cleanupPeriodDays`&&e.code===`too_small`&&e.expected===`0`,tip:{suggestion:`Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup.`}},{matches:e=>e.path.startsWith(`env.`)&&e.code===`invalid_type`,tip:{suggestion:`Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"`,docLink:`${Y}/settings#environment-variables`}},{matches:e=>(e.path===`permissions.allow`||e.path===`permissions.deny`)&&e.code===`invalid_type`&&e.expected===`array`,tip:{suggestion:`Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.`}},{matches:e=>e.path.includes(`hooks`)&&e.code===`invalid_type`,tip:{suggestion:`Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}`}},{matches:e=>e.code===`invalid_type`&&e.expected===`boolean`,tip:{suggestion:`Use true or false without quotes. Example: "includeCoAuthoredBy": true`}},{matches:e=>e.code===`unrecognized_keys`,tip:{suggestion:`Check for typos or refer to the documentation for valid fields`,docLink:`${Y}/settings`}},{matches:e=>e.code===`invalid_value`&&e.enumValues!==void 0,tip:{suggestion:void 0}},{matches:e=>e.code===`invalid_type`&&e.expected===`object`&&e.received===null&&e.path===``,tip:{suggestion:`Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error.`}},{matches:e=>e.path===`permissions.additionalDirectories`&&e.code===`invalid_type`,tip:{suggestion:`Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command`,docLink:`${Y}/iam#working-directories`}}],Rs={permissions:`${Y}/iam#configuring-permissions`,env:`${Y}/settings#environment-variables`,hooks:`${Y}/hooks`}}));function Bs(e){return e.code===`invalid_type`}function Vs(e){return e.code===`invalid_value`}function Hs(e){return e.code===`unrecognized_keys`}function Us(e){return e.code===`too_small`}function Ws(e){return e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:typeof e}function Gs(e){let t=e.match(/received (\w+)/);return t?t[1]:void 0}function Ks(e,t){return e.issues.map(e=>{let n=e.path.map(String).join(`.`),r=e.message,i,a,o,s,c;if(Vs(e))a=e.values.map(e=>String(e)),o=a.join(` | `),s=void 0,c=void 0;else if(Bs(e)){o=e.expected;let t=Gs(e.message);s=t??Ws(e.input),c=t??Ws(e.input)}else Us(e)?o=String(e.minimum):e.code===`custom`&&`params`in e&&(s=e.params.received,c=s);let ee=Is({path:n,code:e.code,expected:o,received:s,enumValues:a,message:e.message,value:s});if(Vs(e))i=a?.map(e=>`"${e}"`).join(`, `),r=`Invalid value. Expected one of: ${i}`;else if(Bs(e)){let t=Gs(e.message)??Ws(e.input);r=e.expected===`object`&&t===`null`&&n===``?`Invalid or malformed JSON`:`Expected ${e.expected}, but received ${t}`}else if(Hs(e)){let t=e.keys.join(`, `);r=`Unrecognized ${Vt(e.keys.length,`field`)}: ${t}`}else Us(e)&&(r=`Number must be greater than or equal to ${e.minimum}`,i=String(e.minimum));return{file:t,path:n,message:r,expected:i,invalidValue:c,suggestion:ee?.suggestion,docLink:ee?.docLink}})}function qs(e){try{let t=it(e),n=J().strict().safeParse(t);return n.success?{isValid:!0}:{isValid:!1,error:`Settings validation failed:
18
- `+Ks(n.error,`settings`).map(e=>`- ${e.path}: ${e.message}`).join(`
19
- `),fullSchema:Ps()}}catch(e){return{isValid:!1,error:`Invalid JSON: ${e instanceof Error?e.message:`Unknown parsing error`}`,fullSchema:Ps()}}}function Js(e,t){if(!e||typeof e!=`object`)return[];let n=e;if(!n.permissions||typeof n.permissions!=`object`)return[];let r=n.permissions,i=[];for(let e of[`allow`,`deny`,`ask`]){let n=r[e];Array.isArray(n)&&(r[e]=n.filter(n=>{if(typeof n!=`string`)return i.push({file:t,path:`permissions.${e}`,message:`Non-string value in ${e} array was removed`,invalidValue:n}),!1;let r=xs(n,e);if(!r.valid){let a=`Invalid permission rule "${n}" was skipped`;return r.error&&(a+=`: ${r.error}`),r.suggestion&&(a+=`. ${r.suggestion}`),i.push({file:t,path:`permissions.${e}`,message:a,invalidValue:n}),!1}return!0}))}return i}var Ys=e((()=>{st(),Ut(),Cs(),Fs(),Ns(),zs()}));function Xs(){let e=``;try{e=Kt().username}catch{}let t=[];return e&&t.push({path:`/Library/Managed Preferences/${e}/${Zs}.plist`,label:`per-user managed preferences`}),t.push({path:`/Library/Managed Preferences/${Zs}.plist`,label:`device-level managed preferences`}),process.env.USER_TYPE===`ant`&&t.push({path:P(Gt(),`Library`,`Preferences`,`${Zs}.plist`),label:`user preferences (ant-only)`}),t}var Zs,Qs,$s,ec,tc,nc,rc,ic=e((()=>{Zs=`com.anthropic.claudecode`,Qs=`HKLM\\SOFTWARE\\Policies\\ClaudeCode`,$s=`HKCU\\SOFTWARE\\Policies\\ClaudeCode`,ec=`Settings`,tc=`/usr/bin/plutil`,nc=[`-convert`,`json`,`-o`,`-`,`--`],rc=5e3}));function ac(e,t){return new Promise(n=>{cn(e,t,{encoding:`utf-8`,timeout:rc},(e,t)=>{n({stdout:t??``,code:+!!e})})})}function oc(){return(async()=>{if(process.platform===`darwin`){let e=Xs(),t=(await Promise.all(e.map(async({path:e,label:t})=>{if(!$t(e))return{stdout:``,label:t,ok:!1};let{stdout:n,code:r}=await ac(tc,[...nc,e]);return{stdout:n,label:t,ok:r===0&&!!n}}))).find(e=>e.ok);return{plistStdouts:t?[{stdout:t.stdout,label:t.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform===`win32`){let[e,t]=await Promise.all([ac(`reg`,[`query`,Qs,`/v`,ec]),ac(`reg`,[`query`,$s,`/v`,ec])]);return{plistStdouts:null,hklmStdout:e.code===0?e.stdout:null,hkcuStdout:t.code===0?t.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function sc(){lc||(lc=oc())}function cc(){return lc}var lc,uc=e((()=>{ic(),lc=null}));function dc(){Cc||(Cc=(async()=>{Pt(`mdm_load_start`);let e=Date.now(),{mdm:t,hkcu:n}=yc(await(cc()??oc()));xc=t,Sc=n,Pt(`mdm_load_end`);let r=Date.now()-e;if(k(`MDM settings load completed in ${r}ms`),Object.keys(t.settings).length>0){k(`MDM settings found: ${Object.keys(t.settings).join(`, `)}`);try{ht(`info`,`mdm_settings_loaded`,{duration_ms:r,key_count:Object.keys(t.settings).length,error_count:t.errors.length})}catch{}}})())}async function fc(){Cc||dc(),await Cc}function pc(){return xc??X}function mc(){return Sc??X}function hc(e,t){xc=e,Sc=t}async function gc(){return yc(await oc())}function _c(e,t){let n=M(e,!1);if(!n||typeof n!=`object`)return{settings:{},errors:[]};let r=Js(n,t),i=J().safeParse(n);if(!i.success){let e=Ks(i.error,t);return{settings:{},errors:[...r,...e]}}return{settings:i.data,errors:r}}function vc(e,t=`Settings`){let n=e.split(/\r?\n/),r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=RegExp(`^\\s+${r}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,`i`);for(let e of n){let t=e.match(i);if(t&&t[1])return t[1].trimEnd()}return null}function yc(e){if(e.plistStdouts&&e.plistStdouts.length>0){let{stdout:t,label:n}=e.plistStdouts[0],r=_c(t,n);if(Object.keys(r.settings).length>0)return{mdm:r,hkcu:X}}if(e.hklmStdout){let t=vc(e.hklmStdout);if(t){let e=_c(t,`Registry: ${Qs}\\${ec}`);if(Object.keys(e.settings).length>0)return{mdm:e,hkcu:X}}}if(bc())return{mdm:X,hkcu:X};if(e.hkcuStdout){let t=vc(e.hkcuStdout);if(t){let e=_c(t,`Registry: ${$s}\\${ec}`);return{mdm:X,hkcu:e}}}return{mdm:X,hkcu:X}}function bc(){try{let e=M(R(P(qi(),`managed-settings.json`)),!1);if(e&&typeof e==`object`&&Object.keys(e).length>0)return!0}catch{}try{let e=Ji(),t=O().readdirSync(e);for(let n of t)if(!(!(n.isFile()||n.isSymbolicLink())||!n.name.endsWith(`.json`)||n.name.startsWith(`.`)))try{let t=M(R(P(e,n.name)),!1);if(t&&typeof t==`object`&&Object.keys(t).length>0)return!0}catch{}}catch{}return!1}var X,xc,Sc,Cc,wc=e((()=>{ut(),mt(),Br(),A(),jt(),Ft(),Yi(),Ns(),Ys(),ic(),uc(),X=Object.freeze({settings:{},errors:[]}),xc=null,Sc=null,Cc=null}));function Tc(){return P(qi(),`managed-settings.json`)}function Ec(){let e=[],t={},n=!1,{settings:r,errors:i}=Z(Tc());e.push(...i),r&&Object.keys(r).length>0&&(t=L(t,r,$),n=!0);let a=Ji();try{let r=O().readdirSync(a).filter(e=>(e.isFile()||e.isSymbolicLink())&&e.name.endsWith(`.json`)&&!e.name.startsWith(`.`)).map(e=>e.name).sort();for(let i of r){let{settings:r,errors:o}=Z(P(a,i));e.push(...o),r&&Object.keys(r).length>0&&(t=L(t,r,$),n=!0)}}catch(e){let t=ot(e);t!==`ENOENT`&&t!==`ENOTDIR`&&j(e)}return{settings:n?t:null,errors:e}}function Dc(){let{settings:e}=Z(Tc()),t=!!e&&Object.keys(e).length>0,n=!1,r=Ji();try{n=O().readdirSync(r).some(e=>(e.isFile()||e.isSymbolicLink())&&e.name.endsWith(`.json`)&&!e.name.startsWith(`.`))}catch{}return{hasBase:t,hasDropIns:n}}function Oc(e,t){typeof e==`object`&&e&&`code`in e&&e.code===`ENOENT`?k(`Broken symlink or missing file encountered for settings.json at path: ${t}`):j(e)}function Z(e){let t=je(e);if(t)return{settings:t.settings?ft(t.settings):null,errors:t.errors};let n=kc(e);return ke(e,n),{settings:n.settings?ft(n.settings):null,errors:n.errors}}function kc(e){try{let{resolvedPath:t}=lt(O(),e),n=R(t);if(n.trim()===``)return{settings:{},errors:[]};let r=M(n,!1),i=Js(r,e),a=J().safeParse(r);if(!a.success){let t=Ks(a.error,e);return{settings:null,errors:[...i,...t]}}return{settings:a.data,errors:i}}catch(t){return Oc(t,e),{settings:null,errors:[]}}}function Ac(e){switch(e){case`userSettings`:return F(h());case`policySettings`:case`projectSettings`:case`localSettings`:return F(Ye());case`flagSettings`:{let e=Oe();return e?N(F(e)):F(Ye())}}}function jc(){return Ce()||m(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS)?`cowork_settings.json`:`settings.json`}function Mc(e){switch(e){case`userSettings`:return P(Ac(e),jc());case`projectSettings`:case`localSettings`:return P(Ac(e),Nc(e));case`policySettings`:return Tc();case`flagSettings`:return Oe()}}function Nc(e){switch(e){case`projectSettings`:return P(`.claude`,`settings.json`);case`localSettings`:return P(`.claude`,`settings.local.json`)}}function Q(e){let t=ye(e);if(t!==void 0)return t;let n=Pc(e);return Ue(e,n),n}function Pc(e){if(e===`policySettings`){let e=Kr();if(e&&Object.keys(e).length>0)return e;let t=pc();if(Object.keys(t.settings).length>0)return t.settings;let{settings:n}=Ec();if(n)return n;let r=mc();return Object.keys(r.settings).length>0?r.settings:null}let t=Mc(e),{settings:n}=t?Z(t):{settings:null};if(e===`flagSettings`){let e=De();if(e){let t=J().safeParse(e);if(t.success)return L(n||{},t.data,$)}}return n}function Fc(){let e=Kr();if(e&&Object.keys(e).length>0)return`remote`;let t=pc();if(Object.keys(t.settings).length>0)return Ct()===`macos`?`plist`:`hklm`;let{settings:n}=Ec();if(n)return`file`;let r=mc();return Object.keys(r.settings).length>0?`hkcu`:null}function Ic(e,t){if(e===`policySettings`||e===`flagSettings`)return{error:null};let n=Mc(e);if(!n)return{error:null};try{O().mkdirSync(N(n));let r=Pc(e);if(!r){let e=null;try{e=R(n)}catch(e){if(!ct(e))throw e}if(e!==null){let t=M(e);if(t===null)return{error:Error(`Invalid JSON syntax in settings file at ${n}`)};t&&typeof t==`object`&&(r=t,k(`Using raw settings from ${n} due to validation failure`))}}let i=L(r||{},t,(e,t,n,r)=>{if(t===void 0&&r&&typeof n==`string`){delete r[n];return}if(Array.isArray(t))return t});Hi(n),bi(n,dt(i,null,2)+`
20
- `),be(),e===`localSettings`&&ki(Nc(`localSettings`),Ye())}catch(e){let t=Error(`Failed to read raw settings from ${n}: ${e}`);return j(t),{error:t}}return{error:null}}function Lc(e,t){return Qr([...e,...t])}function $(e,t){if(Array.isArray(e)&&Array.isArray(t))return Lc(e,t)}function Rc(e){let t=J().strip().parse(e),n=[`permissions`,`sandbox`,`hooks`],r=[],i={permissions:new Set([`allow`,`deny`,`ask`,`defaultMode`,`disableBypassPermissionsMode`,`disableAutoMode`,`additionalDirectories`]),sandbox:new Set([`enabled`,`failIfUnavailable`,`allowUnsandboxedCommands`,`network`,`filesystem`,`ignoreViolations`,`excludedCommands`,`autoAllowBashIfSandboxed`,`enableWeakerNestedSandbox`,`enableWeakerNetworkIsolation`,`ripgrep`]),hooks:new Set([`PreToolUse`,`PostToolUse`,`Notification`,`UserPromptSubmit`,`SessionStart`,`SessionEnd`,`Stop`,`SubagentStop`,`PreCompact`,`PostCompact`,`TeammateIdle`,`TaskCreated`,`TaskCompleted`])};for(let e of Object.keys(t))if(n.includes(e)&&t[e]&&typeof t[e]==`object`){let n=t[e],a=i[e];if(a)for(let t of Object.keys(n))a.has(t)&&r.push(`${e}.${t}`)}else r.push(e);return r.sort()}function zc(){if(Jc)return{settings:{},errors:[]};let e=Date.now();Pt(`loadSettingsFromDisk_start`),ht(`info`,`settings_load_started`),Jc=!0;try{let t=$e(),n={};t&&(n=L(n,t,$));let r=[],i=new Set,a=new Set;for(let e of Ii()){if(e===`policySettings`){let e=null,t=[],a=Kr();if(a&&Object.keys(a).length>0){let n=J().safeParse(a);n.success?e=n.data:t.push(...Ks(n.error,`remote managed settings`))}if(!e){let n=pc();Object.keys(n.settings).length>0&&(e=n.settings),t.push(...n.errors)}if(!e){let{settings:n,errors:r}=Ec();n&&(e=n),t.push(...r)}if(!e){let n=mc();Object.keys(n.settings).length>0&&(e=n.settings),t.push(...n.errors)}e&&(n=L(n,e,$));for(let e of t){let t=`${e.file}:${e.path}:${e.message}`;i.has(t)||(i.add(t),r.push(e))}continue}let t=Mc(e);if(t){let e=F(t);if(!a.has(e)){a.add(e);let{settings:o,errors:s}=Z(t);for(let e of s){let t=`${e.file}:${e.path}:${e.message}`;i.has(t)||(i.add(t),r.push(e))}o&&(n=L(n,o,$))}}if(e===`flagSettings`){let e=De();if(e){let t=J().safeParse(e);t.success&&(n=L(n,t.data,$))}}}return ht(`info`,`settings_load_completed`,{duration_ms:Date.now()-e,source_count:a.size,error_count:r.length}),{settings:n,errors:r}}finally{Jc=!1}}function Bc(){let{settings:e}=Hc();return e||{}}function Vc(){be();let e=[];for(let t of Ii()){let n=Q(t);n&&Object.keys(n).length>0&&e.push({source:t,settings:n})}return{effective:Bc(),sources:e}}function Hc(){let e=Me();if(e!==null)return e;let t=zc();return Pt(`loadSettingsFromDisk_end`),He(t),t}function Uc(){return!!(Q(`userSettings`)?.skipDangerousModePermissionPrompt||Q(`localSettings`)?.skipDangerousModePermissionPrompt||Q(`flagSettings`)?.skipDangerousModePermissionPrompt||Q(`policySettings`)?.skipDangerousModePermissionPrompt)}function Wc(){return!0}function Gc(){return Q(`policySettings`)?.useAutoModeDuringPlan!==!1&&Q(`flagSettings`)?.useAutoModeDuringPlan!==!1&&Q(`userSettings`)?.useAutoModeDuringPlan!==!1&&Q(`localSettings`)?.useAutoModeDuringPlan!==!1}function Kc(){{let e=w({allow:C(g()).optional(),soft_deny:C(g()).optional(),deny:C(g()).optional(),environment:C(g()).optional()}),t=[],n=[],r=[];for(let i of[`userSettings`,`localSettings`,`flagSettings`,`policySettings`]){let a=Q(i);if(!a)continue;let o=e.safeParse(a.autoMode);o.success&&(o.data.allow&&t.push(...o.data.allow),o.data.soft_deny&&n.push(...o.data.soft_deny),process.env.USER_TYPE===`ant`&&o.data.deny&&n.push(...o.data.deny),o.data.environment&&r.push(...o.data.environment))}if(t.length>0||n.length>0||r.length>0)return{...t.length>0&&{allow:t},...n.length>0&&{soft_deny:n},...r.length>0&&{environment:r}}}}function qc(e){for(let t of Ii()){if(t===`policySettings`)continue;let n=Mc(t);if(n)try{let{resolvedPath:t}=lt(O(),n),r=R(t);if(!r.trim())continue;let i=M(r,!1);if(i&&typeof i==`object`&&e in i)return!0}catch(e){Oc(e,n)}}return!1}var Jc,Yc,Xc=e((()=>{Ir(),E(),_e(),Yr(),$r(),ut(),mt(),te(),pt(),Ei(),Br(),A(),Ai(),jt(),bt(),wt(),st(),Ft(),Vi(),Ki(),Yi(),wc(),xe(),Ns(),Ys(),Jc=!1,Yc=Bc}));export{Uo as $,gr as $n,Ui as $t,Ys as A,ii as An,Oa as At,q as B,Kr as Bn,ya as Bt,mc as C,Ei as Cn,fn as Cr,H as Ct,hc as D,Si as Dn,Ma as Dt,gc as E,xi as En,Ia as Et,Ts as F,si as Fn,Ea as Ft,rs as G,Vr as Gn,V as Gt,cs as H,Yr as Hn,ma as Ht,ws as I,Zr as In,Da as It,Jo as J,R as Jn,fa as Jt,$o as K,Lr as Kn,ia as Kt,Es as L,$r as Ln,wa as Lt,Ms as M,_i as Mn,Ta as Mt,J as N,mi as Nn,ba as Nt,uc as O,ri as On,Na as Ot,Ns as P,bi as Pn,Ca as Pt,Qo as Q,vr as Qn,Wi as Qt,is as R,Xr as Rn,Sa as Rt,fc as S,oi as Sn,dn as Sr,Wa as St,wc as T,vi as Tn,Fa as Tt,ns as U,Hr as Un,ha as Ut,ss as V,Wr as Vn,pa as Vt,ts as W,Ur as Wn,ua as Wt,Zo as X,kr as Xn,Ji as Xt,Yo as Y,zr as Yn,qi as Yt,Xo as Z,Or as Zn,Yi as Zt,Ec as _,ci as _n,Cn as _r,Do as _t,Fc as a,Ni as an,Un as ar,Vo as at,$ as b,fi as bn,pn as br,Ga as bt,Q as c,Vi as cn,Fn as cr,U as ct,Vc as d,Ai as dn,Pn as dr,Io as dt,Ki as en,ar as er,Ko as et,Yc as f,Di as fn,jn as fr,_o as ft,Xc as g,ui as gn,wn as gr,Eo as gt,Uc as h,gi as hn,An as hr,xo as ht,Rc as i,Pi as in,Hn as ir,qo as it,qs as j,yi as jn,ja as jt,sc as k,Ci as kn,ka as kt,Ac as l,Li as ln,In as lr,jo as lt,Wc as m,wi as mn,Tn as mr,K as mt,Bc as n,zi as nn,Jn as nr,Ho as nt,Nc as o,ji as on,Ln as or,Bo as ot,Gc as p,Ti as pn,Mn as pr,ro as pt,es as q,Br as qn,ra as qt,Dc as r,Ii as rn,Yn as rr,Wo as rt,Mc as s,Mi as sn,Rn as sr,Ro as st,Kc as t,Ri as tn,Qn as tr,Go as tt,Hc as u,Fi as un,Nn as ur,Po as ut,Z as v,li as vn,gn as vr,Lo as vt,pc as w,hi as wn,Va as wt,Ic as x,ai as xn,hn as xr,Ha as xt,qc as y,pi as yn,_n as yr,Ka as yt,fs as z,Qr as zn,va as zt};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{A as t,C as n,O as r,w as i}from"./external-CEp-aPkt.js";import{n as a,r as o,t as s}from"./lazySchema-B4D4qJVE.js";import{$t as c}from"./state-C2OSZkV1.js";import{Wx as l,xb as u}from"./loadAgentsDir-ByO8eJqU.js";import{z as d}from"./debug-RZ4NuXyS.js";import{g as f}from"./settings-hQDLwPVj.js";import{g as p}from"./config-CE058cvr.js";import{O as m,m as h}from"./git-BerW9bId.js";import{u as g}from"./oauth-BqJqV-2M.js";import{Bt as _,bi as v}from"./model-CwO-g1RW.js";import"path";import"fs/promises";var y,b=e((()=>{o(),s(),y=a(()=>i({entries:r(t(),t())})),a(()=>i({userId:t(),version:n(),lastModified:t(),checksum:t(),content:y()}))})),x=e((()=>{c(),g(),_(),l(),p(),m(),d(),h(),v(),f(),u(),b()}));export{x as t};
@@ -1,3 +0,0 @@
1
- import{l as e,o as t,s as n}from"./envUtils-DSxRz_kt.js";import{di as r,ui as i}from"./src-CDCSSo0U2.js";import{$t as a,Yn as o,Zn as s,at as c,gr as ee,mt as l,z as u}from"./state-C2OSZkV1.js";import{Bv as d,Ci as f,Et as p,Fv as m,Iv as h,Mv as g,Pt as _,Rv as v,St as y,Ty as b,UT as x,VT as S,Wi as te,Wx as C,Yi as w,bt as T,jr as E,jv as D,vn as O,wy as k,yn as A,yt as j,zv as M,zx as N}from"./loadAgentsDir-ByO8eJqU.js";import{n as P,t as F}from"./cwd-C5ce-7WB.js";import{F as I,z as L}from"./debug-RZ4NuXyS.js";import{Gt as R,Jt as z}from"./settings-hQDLwPVj.js";import{g as B,o as V}from"./config-CE058cvr.js";import{O as H,k as U,l as W,m as G,n as K,r as q}from"./git-BerW9bId.js";import{o as ne,s as J}from"./log-CZ0zYP_c.js";import{n as Y,r as X}from"./analytics-CkYUHW_U.js";import{i as Z,n as re}from"./startupProfiler-DCn_NxMH.js";import{Bt as ie,rn as ae}from"./model-CwO-g1RW.js";import{ft as oe,ut as Q}from"./esm-BLPbfHQd.js";import{h as se,l as ce,p as le,u as ue}from"./terminalSetup-DlaFWI81.js";import{l as de,s as fe}from"./logoV2Utils-CGUJ-5gY.js";import{c as pe,t as $}from"./nativeInstaller-B-lNJjM-.js";import{n as me,r as he}from"./sessionMemory-CQBxPkTQ.js";import{i as ge,r as _e}from"./runtimeObserver-Dbxxw4ls.js";import{t as ve}from"./sinks-Cftq7Es0.js";r(),Y(),P(),D(),a(),w(),he(),ge(),b(),ue(),ie(),C(),B(),H(),z(),oe(),t(),L(),G(),m(),M(),A(),ne(),de(),$(),le(),x(),E(),re(),p();async function ye(t,r,a,p,m,b,x,C,w){U(`info`,`setup_started`);let E=process.version.match(/^v(\d+)\./)?.[1];if((!E||parseInt(E,10)<18)&&(console.error(i.bold.red(`Error: Work Mate requires Node.js version 18 or higher.`)),process.exit(1)),x&&ee(k(x)),n(),!u())try{let e=await ce();e.status===`restored`?console.log(i.yellow(`Detected an interrupted Terminal.app setup. Your original settings have been restored. You may need to restart Terminal.app for the changes to take effect.`)):e.status===`failed`&&console.error(i.red(`Failed to restore Terminal.app settings. Please manually restore your original settings with: defaults import com.apple.Terminal ${e.backupPath}.`))}catch(e){J(e)}g(t);let D=Date.now();if(v(),U(`info`,`setup_hooks_captured`,{duration_ms:Date.now()-D}),h(t),p){let e=O(),n=await W();!e&&!n&&(process.stderr.write(i.red(`Error: Can only use --worktree in a git repository, but ${i.bold(t)} is not a git repository. Configure a WorktreeCreate hook in settings.json to use --worktree with other VCS systems.\n`)),process.exit(1));let r=C?`pr-${C}`:m??S(),a;if(n){let e=K(F());e||(process.stderr.write(i.red(`Error: Could not determine the main git repository root.
2
- `)),process.exit(1)),e!==(q(F())??F())&&(U(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),g(e)),a=b?y(e,_(r)):void 0}else a=b?y(F(),_(r)):void 0;let c;try{c=await T(l(),r,a,C?{prNumber:C}:void 0)}catch(e){process.stderr.write(i.red(`Error creating worktree: ${I(e)}\n`)),process.exit(1)}if(X(`tengu_worktree_created`,{tmux_enabled:b}),b&&a){let e=await j(a,c.worktreePath);e.created?console.log(i.green(`Created tmux session: ${i.bold(a)}\nTo attach: ${i.bold(`tmux attach -t ${a}`)}`)):console.error(i.yellow(`Warning: Failed to create tmux session: ${e.error}`))}process.chdir(c.worktreePath),g(c.worktreePath),o(F()),s(F()),f(c),N(),d()}U(`info`,`setup_background_jobs_starting`),n()||(me(),_e()),pe(),U(`info`,`setup_background_jobs_launched`),Z(`setup_before_prefetch`),U(`info`,`setup_prefetch_starting`);let A=u()&&e(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||n();if(A||te(c()),import(`./loadPluginHooks-BPnxcgrL.js`).then(e=>{A||(e.loadPluginHooks(),e.setupPluginHookHotReload())}),n()||(setImmediate(()=>{import(`./attributionHooks-CUAoGkU6.js`).then(({registerAttributionHooks:e})=>{e()})}),import(`./sessionFileAccessHooks-DfJ7Htfl.js`).then(e=>e.registerSessionFileAccessHooks())),ve(),X(`tengu_started`,{}),ae(u()),Z(`setup_after_prefetch`),!n()&&se()&&await fe(),r===`bypassPermissions`||a){if(process.platform!==`win32`&&typeof process.getuid==`function`&&process.getuid()===0&&process.env.IS_SANDBOX!==`1`&&!e(process.env.CLAUDE_CODE_BUBBLEWRAP))if(process.stdin.isTTY){console.error(i.bold.red(`WARNING: Running as root/sudo with bypass permissions mode is dangerous.`)),console.error(i.yellow(`Bypass mode skips ALL permission checks. Combined with root, any command (rm -rf /, chmod, dd) executes without review.`));let e=(await import(`readline`)).createInterface({input:process.stdin,output:process.stdout}),t=await new Promise(t=>{e.question(`
3
- I understand the risks. Continue? [y/N] `,t)});e.close(),t.trim().toLowerCase()!==`y`&&(console.error(`Aborted.`),process.exit(1))}else console.error(`--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons`),process.exit(1);if(process.env.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`claude-desktop`){let[e,t]=await Promise.all([Q.getIsDocker(),R.hasInternetAccess()]),n=Q.getIsBubblewrapSandbox(),r=process.env.IS_SANDBOX===`1`;(!(e||n||r)||t)&&(console.error(`--dangerously-skip-permissions can only be used in Docker/sandbox containers with no internet access but got Docker: ${e}, Bubblewrap: ${n}, IS_SANDBOX: ${r}, hasInternet: ${t}`),process.exit(1))}}let M=V();M.lastCost!==void 0&&M.lastDuration!==void 0&&X(`tengu_exit`,{last_session_cost:M.lastCost,last_session_api_duration:M.lastAPIDuration,last_session_tool_duration:M.lastToolDuration,last_session_duration:M.lastDuration,last_session_lines_added:M.lastLinesAdded,last_session_lines_removed:M.lastLinesRemoved,last_session_total_input_tokens:M.lastTotalInputTokens,last_session_total_output_tokens:M.lastTotalOutputTokens,last_session_total_cache_creation_input_tokens:M.lastTotalCacheCreationInputTokens,last_session_total_cache_read_input_tokens:M.lastTotalCacheReadInputTokens,last_session_fps_average:M.lastFpsAverage,last_session_fps_low_1_pct:M.lastFpsLow1Pct,last_session_id:M.lastSessionId,...M.lastSessionMetrics})}export{ye as setup};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{G as t,H as n,K as r,U as i,V as a}from"./loadAgentsDir-ByO8eJqU.js";import{gn as o}from"./prompt-B7joRiqj.js";function s(e){return e===`projectSettings`||e===`policySettings`||e===`command`}function c(e){return r(e)}function l(e,t,n){let r=c(t.source),i=c(n.source),a=t.ruleValue.toolName;return e===`deny`?`Remove the "${a}" deny rule from ${r}, or remove the specific allow rule from ${i}`:`Remove the "${a}" ask rule from ${r}, or remove the specific allow rule from ${i}`}function u(e,t,n){let{toolName:r,ruleContent:i}=e.ruleValue;if(i===void 0)return{shadowed:!1};let a=t.find(e=>e.ruleValue.toolName===r&&e.ruleValue.ruleContent===void 0);return!a||r===`Bash`&&n.sandboxAutoAllowEnabled&&!s(a.source)?{shadowed:!1}:{shadowed:!0,shadowedBy:a,shadowType:`ask`}}function d(e,t){let{toolName:n,ruleContent:r}=e.ruleValue;if(r===void 0)return{shadowed:!1};let i=t.find(e=>e.ruleValue.toolName===n&&e.ruleValue.ruleContent===void 0);return i?{shadowed:!0,shadowedBy:i,shadowType:`deny`}:{shadowed:!1}}function f(e,t){let r=[],o=a(e),s=n(e),f=i(e);for(let e of o){let n=d(e,f);if(n.shadowed){let t=c(n.shadowedBy.source);r.push({rule:e,reason:`Blocked by "${n.shadowedBy.ruleValue.toolName}" deny rule (from ${t})`,shadowedBy:n.shadowedBy,shadowType:`deny`,fix:l(`deny`,n.shadowedBy,e)});continue}let i=u(e,s,t);if(i.shadowed){let t=c(i.shadowedBy.source);r.push({rule:e,reason:`Shadowed by "${i.shadowedBy.ruleValue.toolName}" ask rule (from ${t})`,shadowedBy:i.shadowedBy,shadowType:`ask`,fix:l(`ask`,i.shadowedBy,e)})}}return r}var p=e((()=>{o(),t()}));export{p as n,f as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./sinks-Cftq7Es0.js";export{e as initSinks};
@@ -1,2 +0,0 @@
1
- import{n as e,t}from"./axios-DaWTGg7G.js";import{$t as n,mt as r}from"./state-C2OSZkV1.js";import{S as i,a,at as o,d as s,l as c,nt as l,ot as u,p as d,rt as f,w as p}from"./debug-RZ4NuXyS.js";import{o as m,r as h,t as g,v as _,y as v}from"./log-CZ0zYP_c.js";import{i as y,n as b,t as x}from"./analytics-CkYUHW_U.js";import{a as S,n as C,o as w}from"./firstPartyEventLogger-D5ohKbIe.js";import{r as T,t as E}from"./datadog-BJn5ECIu.js";import{dirname as D,join as O}from"path";t(),n(),u(),v(),l(),a(),d(),m(),i();var k=h(new Date);function A(){return O(_.errors(),k+`.jsonl`)}function j(e){return O(_.mcpLogs(e),k+`.jsonl`)}function M(e){let t=o(e);return{write(e){t.write(p(e)+`
2
- `)},flush:t.flush,dispose:t.dispose}}var N=new Map;function P(e){let t=N.get(e);if(!t){let n=D(e);t=M({writeFn:t=>{try{s().appendFileSync(e,t)}catch{s().mkdirSync(n),s().appendFileSync(e,t)}},flushIntervalMs:1e3,maxBufferSize:50}),N.set(e,t),f(async()=>t?.dispose())}return t}function F(e,t){if(process.env.USER_TYPE!==`ant`)return;let n={timestamp:new Date().toISOString(),...t,cwd:s().cwd(),userType:process.env.USER_TYPE,sessionId:r(),version:`0.0.8`};P(e).write(n)}function I(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e;if(typeof t.message==`string`)return t.message;if(typeof t.error==`object`&&t.error&&`message`in t.error&&typeof t.error.message==`string`)return t.error.message}}function L(t){let n=t.stack||t.message,r=``;if(e.isAxiosError(t)&&t.config?.url){let e=[`url=${t.config.url}`];t.response?.status!==void 0&&e.push(`status=${t.response.status}`);let n=I(t.response?.data);n&&e.push(`body=${n}`),r=`[${e.join(`,`)}] `}c(`${t.name}: ${r}${n}`,{level:`error`}),F(A(),{error:`${r}${n}`})}function R(e,t){c(`MCP server "${e}" ${t}`,{level:`error`});let n=j(e),i={error:t instanceof Error?t.stack||t.message:String(t),timestamp:new Date().toISOString(),sessionId:r(),cwd:s().cwd()};P(n).write(i)}function z(e,t){c(`MCP server "${e}": ${t}`);let n=j(e),i={debug:t,timestamp:new Date().toISOString(),sessionId:r(),cwd:s().cwd()};P(n).write(i)}function B(){g({logError:L,logMCPError:R,logMCPDebug:z,getErrorsPath:A,getMCPLogsPath:j}),c(`Error log sink initialized`)}E(),C(),b();function V(){return!1}function H(e,t){let n=w(e);if(n===0)return;let r=n===null?t:{...t,sample_rate:n};V()&&T(e,y(r)),S(e,r)}function U(e,t){return H(e,t),Promise.resolve()}function W(){x({logEvent:H,logEventAsync:U})}function G(){B(),W()}export{G as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$t as t,Hn as n,Vn as r,Y as i,Yn as a,br as o,gr as ee,h as s,mt as c,yr as l}from"./state-C2OSZkV1.js";import{$g as u,CD as te,C_ as ne,Ci as d,Ct as f,DD as re,ED as ie,Et as ae,HT as p,It as oe,Jn as se,Lc as ce,ME as m,Mc as le,Mt as h,Mv as g,Ri as ue,Sl as de,Ty as fe,UT as pe,Us as me,Ws as he,Wx as ge,Yi as _e,Zg as ve,bi as ye,cg as be,cy as _,dx as v,e_ as y,fi as b,fx as x,gn as S,jE as C,jr as w,jv as T,nE as E,oy as D,pi as O,sg as k,tE as A,t_ as j,ti as M,w_ as N,wy as xe,xl as Se,yn as Ce,zi as we,zx as P}from"./loadAgentsDir-ByO8eJqU.js";import{n as Te,t as F}from"./cwd-C5ce-7WB.js";import{a as I,d as Ee,l as L,nt as De,p as Oe,rt as ke}from"./debug-RZ4NuXyS.js";import{n as Ae,r as je}from"./analytics-CkYUHW_U.js";import{C as Me,_ as Ne}from"./model-CwO-g1RW.js";import{zt as R}from"./prompt-B7joRiqj.js";import{r as Pe}from"./asciicast-BJNYO5sh.js";import*as z from"path";import{dirname as Fe}from"path";t(),be(),v(),R(),fe(),ge(),ie(),le(),Te(),I(),_(),Ne(),pe(),T(),w(),A(),N(),ae();function Ie(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.type!==`assistant`)continue;let r=n.message.content.find(e=>e.type===`tool_use`&&e.name===`TodoWrite`);if(!r||r.type!==`tool_use`)continue;let i=r.input;if(typeof i!=`object`||!i)return[];let a=ne().safeParse(i.todos);return a.success?a.data:[]}return[]}function Le(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&D(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),e.attributionSnapshots&&e.attributionSnapshots.length>0&&te(e.attributionSnapshots,e=>{t(t=>({...t,attribution:e}))}),!E()&&e.messages&&e.messages.length>0){let n=Ie(e.messages);if(n.length>0){let e=c();t(t=>({...t,todos:{...t.todos,[e]:n}}))}}}function Re(e){if(e.attributionSnapshots&&e.attributionSnapshots.length>0)return re(e.attributionSnapshots)}function B(e,t){if(!(!e&&!t))return{name:e??``,color:t==="default"?void 0:t}}function V(e,t,a){if(t)return{agentDefinition:t,agentType:void 0};if(!e)return n(void 0),{agentDefinition:void 0,agentType:void 0};let o=a.activeAgents.find(t=>t.agentType===e);return o?(n(o.agentType),!i()&&o.model&&o.model!==`inherit`&&r(Me(o.model)),{agentDefinition:o,agentType:o.agentType}):(L(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),n(void 0),{agentDefinition:void 0,agentType:void 0})}function H(e){let t=f();if(t){d(t);return}if(e){try{process.chdir(e.worktreePath)}catch{d(null);return}g(e.worktreePath),a(F()),h(e),P(),k(),p.cache.clear?.()}}function ze(){let e=f();if(e){h(null),P(),k(),p.cache.clear?.();try{process.chdir(e.originalCwd)}catch{return}g(e.originalCwd),a(F())}}async function Be(t,n,r){if(n.forkSession)t.contentReplacements?.length&&await M(t.contentReplacements);else{let e=n.sessionIdOverride??t.sessionId;e&&(ee(xe(e),n.transcriptPath?Fe(n.transcriptPath):null),await Pe(),await b(),x(e))}if(O(n.forkSession?{...t,worktreeSession:void 0}:t),t.goal){let{hydrateGoalFromTranscript:r}=(de(),e(Se)),i=new Map,a=n.sessionIdOverride??t.sessionId??c();i.set(a,t.goal),r(i,a)}n.forkSession||(H(t.worktreeSession),se());let{agentDefinition:i,agentType:a}=V(t.agentSetting,r.mainThreadAgentDefinition,r.agentDefinitions);ye(`normal`);let o=n.includeAttribution?Re(t):void 0,s=B(t.agentName,t.agentColor);ce(t.agentName);let l=r.agentDefinitions;return{messages:t.messages,fileHistorySnapshots:t.fileHistorySnapshots,contentReplacements:t.contentReplacements,agentName:t.agentName,agentColor:t.agentColor==="default"?void 0:t.agentColor,restoredAgentDef:i,initialState:{...r.initialState,...a&&{agent:a},...o&&{attribution:o},...s&&{standaloneAgentContext:s},agentDefinitions:l}}}m(),t(),_e(),Ae(),y(),me(),De(),I(),Oe(),Ce(),o();var Ve=1e3,He=500,Ue=300,We=2e3,Ge=typeof Bun<`u`,U=null,W=null,G=new Set,K=!1,q=!1,J=!1,Y=null,X=l(),Z=null;async function Ke(){if(K||q)return;K=!0,J||(J=!0,j(()=>{ue(),X.emit()}));let e=await Je();e.length!==0&&(L(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),U=C.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Z?.stabilityThreshold??Ve,pollInterval:Z?.pollInterval??He},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(z.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Ge,interval:Z?.chokidarInterval??We,atomic:!0}),U.on(`add`,$),U.on(`change`,$),U.on(`unlink`,$),Y=ke(async()=>{await Q()}))}function Q(){q=!0,Y&&(Y(),Y=null);let e=Promise.resolve();return U&&(e=U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),e}var qe=X.subscribe;async function Je(){let e=Ee(),t=[],n=u(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=u(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=u(`projectSettings`,`skills`);if(i)try{let n=z.resolve(i);await e.stat(n),t.push(n)}catch{}let a=u(`projectSettings`,`commands`);if(a)try{let n=z.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of s()){let r=z.join(n,`.claude`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){L(`Detected skill change: ${e}`),je(`tengu_skill_file_changed`,{source:`chokidar`}),Ye(e)}function Ye(e){G.add(e),W&&clearTimeout(W),W=setTimeout(async()=>{W=null;let e=[...G];if(G.clear(),S(await oe(`skills`,e[0]))){L(`ConfigChange hook blocked skill reload (${e.length} paths)`);return}ve(),we(),he(),X.emit()},Z?.reloadDebounce??Ue)}async function Xe(e){U&&(await U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),K=!1,q=!1,Z=e??null}var Ze={initialize:Ke,dispose:Q,subscribe:qe,resetForTesting:Xe};export{V as a,Be as i,B as n,Le as o,ze as r,H as s,Ze as t};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,h as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{Jp as l,Qg as u,Yi as d,Zi as f,e_ as p,qp as m}from"./loadAgentsDir-ByO8eJqU.js";import{cn as h,on as g}from"./settings-hQDLwPVj.js";import{v as _,y as v}from"./startupProfiler-DCn_NxMH.js";import{l as y,o as b}from"./stringUtils-B6FudhoZ.js";function x(e,t){let n=t.trim();if(n===``)return e.slice();let r=n.toLowerCase().split(/\s+/);return e.filter(e=>{let t=`${e.name} ${e.description}`.toLowerCase();return r.every(e=>t.includes(e))})}var S=e((()=>{}));function C(e){return e===`plugin`?`plugin`:e===`mcp`?`mcp`:g(e)}function w({onExit:e,commands:t}){let[i,o]=(0,T.useState)(``),c=(0,T.useMemo)(()=>t.filter(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`commands_DEPRECATED`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)),[t]),l=(0,T.useMemo)(()=>x(c.map(e=>({...e,name:f(e),description:e.description??``})),i),[c,i]),d=(0,T.useMemo)(()=>{let e={policySettings:[],userSettings:[],projectSettings:[],localSettings:[],flagSettings:[],plugin:[],mcp:[]};for(let t of l){let n=t.source;n in e&&e[n].push(t)}for(let t of Object.values(e))t.sort((e,t)=>f(e).localeCompare(f(t)));return e},[l]),p=()=>{e(`Skills dialog dismissed`,{display:`system`})};if(c.length===0)return(0,E.jsxs)(s,{title:`Skills`,subtitle:`No skills found`,onCancel:p,hideInputGuide:!0,children:[(0,E.jsx)(r,{dimColor:!0,children:`Create skills in .claude/skills/ or ~/.claude/skills/`}),(0,E.jsx)(r,{dimColor:!0,italic:!0,children:(0,E.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`close`})})]});let h=e=>{switch(e){case`projectSettings`:case`localSettings`:return{label:`local`,color:`yellow`};case`userSettings`:return{label:`global`,color:`cyan`};case`policySettings`:return{label:`managed`,color:`magenta`};default:return}},g=(e,t)=>{let i=`~${_(u(e))}`,a=e.source===`plugin`?e.pluginInfo?.pluginManifest.name:void 0,o=h(e.source);return(0,E.jsxs)(n,{children:[(0,E.jsx)(r,{color:t?`suggestion`:void 0,children:f(e)}),o&&(0,E.jsxs)(r,{color:o.color,children:[` [`,o.label,`]`]}),(0,E.jsxs)(r,{dimColor:!0,children:[a?` · ${a}`:``,` · `,C(e.source),` · `,i,` tokens`]})]})};return(0,E.jsx)(a,{title:`Skills`,placeholder:`Type to filter skills…`,items:(0,T.useMemo)(()=>D.flatMap(e=>d[e]),[d]),getKey:e=>`${e.name}-${e.source}`,visibleCount:12,direction:`down`,onQueryChange:o,onSelect:t=>{e(`/${f(t)}`,{display:`user`})},onCancel:p,emptyMessage:e=>e.trim()?`No skills matching "${e.trim()}"`:`No skills found`,matchLabel:i.trim()===``?`${c.length} ${y(c.length,`skill`)}`:`${l.length}/${c.length} ${y(c.length,`skill`)}`,selectAction:`invoke skill`,renderItem:(e,t)=>g(e,t)})}var T,E,D,O=e((()=>{i(),T=t(i(),1),d(),o(),p(),v(),h(),b(),l(),S(),E=c(),D=[`projectSettings`,`localSettings`,`userSettings`,`flagSettings`,`policySettings`,`plugin`,`mcp`]}));async function k(e,t){return(0,A.jsx)(w,{onExit:e,commands:t.options.commands})}var A;e((()=>{i(),O(),A=c()}))();export{k as call};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./startupProfiler-DCn_NxMH.js";t();export{e as profileCheckpoint};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./isObject-C6qM3WEW.js";import{a as d,c as f,d as p,f as m,g as h,h as g,i as _,l as v,m as y,n as ee,o as te,p as ne,r as re,s as ie,t as ae,u as oe}from"./memoize-BK3gG5ob.js";import{i as b,n as se,r as x,t as ce}from"./isSymbol-BO6cdPI7.js";import{realpathSync as le}from"fs";import{randomUUID as ue}from"crypto";import{cwd as de}from"process";function fe(){this.__data__=new ie,this.size=0}var pe=e((()=>{f()}));function me(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var he=e((()=>{}));function ge(e){return this.__data__.get(e)}var _e=e((()=>{}));function ve(e){return this.__data__.has(e)}var ye=e((()=>{}));function be(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!d||r.length<xe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this}var xe,Se=e((()=>{f(),te(),_(),xe=200}));function S(e){var t=this.__data__=new ie(e);this.size=t.size}var Ce=e((()=>{f(),pe(),he(),_e(),ye(),Se(),S.prototype.clear=fe,S.prototype.delete=me,S.prototype.get=ge,S.prototype.has=ve,S.prototype.set=be}));function we(e){return this.__data__.set(e,Te),this}var Te,Ee=e((()=>{Te=`__lodash_hash_undefined__`}));function De(e){return this.__data__.has(e)}var Oe=e((()=>{}));function C(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new re;++t<n;)this.add(e[t])}var ke=e((()=>{_(),Ee(),Oe(),C.prototype.add=C.prototype.push=we,C.prototype.has=De}));function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var je=e((()=>{}));function Me(e,t){return e.has(t)}var Ne=e((()=>{}));function Pe(e,t,n,r,i,a){var o=n&Fe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Ie?new C:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ae(t,function(e,t){if(!Me(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Fe,Ie,Le=e((()=>{ke(),je(),Ne(),Fe=1,Ie=2})),w,Re=e((()=>{c(),w=n.Uint8Array}));function ze(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var Be=e((()=>{}));function Ve(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var He=e((()=>{}));function Ue(e,t,n,r,i,a,o){switch(n){case nt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tt:return!(e.byteLength!=t.byteLength||!a(new w(e),new w(t)));case Ke:case qe:case Xe:return v(+e,+t);case Je:return e.name==t.name&&e.message==t.message;case Ze:case $e:return e==t+``;case Ye:var s=ze;case Qe:var c=r&We;if(s||(s=Ve),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Ge,o.set(e,t);var u=Pe(s(e),s(t),r,i,a,o);return o.delete(e),u;case et:if(T)return T.call(e)==T.call(t)}return!1}var We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,T,it=e((()=>{o(),Re(),oe(),Le(),Be(),He(),We=1,Ge=2,Ke=`[object Boolean]`,qe=`[object Date]`,Je=`[object Error]`,Ye=`[object Map]`,Xe=`[object Number]`,Ze=`[object RegExp]`,Qe=`[object Set]`,$e=`[object String]`,et=`[object Symbol]`,tt=`[object ArrayBuffer]`,nt=`[object DataView]`,rt=t?t.prototype:void 0,T=rt?rt.valueOf:void 0}));function at(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ot=e((()=>{})),E,D=e((()=>{E=Array.isArray}));function st(e,t,n){var r=t(e);return E(e)?r:at(r,n(e))}var ct=e((()=>{ot(),D()}));function lt(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var ut=e((()=>{}));function dt(){return[]}var ft=e((()=>{})),pt,mt,ht,gt=e((()=>{ut(),ft(),pt=Object.prototype.propertyIsEnumerable,mt=Object.getOwnPropertySymbols,ht=mt?function(e){return e==null?[]:(e=Object(e),lt(mt(e),function(t){return pt.call(e,t)}))}:dt}));function _t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vt=e((()=>{}));function yt(e){return b(e)&&s(e)==bt}var bt,xt=e((()=>{r(),x(),bt=`[object Arguments]`})),St,Ct,wt,O,Tt=e((()=>{xt(),x(),St=Object.prototype,Ct=St.hasOwnProperty,wt=St.propertyIsEnumerable,O=yt(function(){return arguments}())?yt:function(e){return b(e)&&Ct.call(e,`callee`)&&!wt.call(e,`callee`)}}));function Et(){return!1}var Dt=e((()=>{})),Ot,kt,At,k,jt=e((()=>{c(),Dt(),Ot=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kt=Ot&&typeof module==`object`&&module&&!module.nodeType&&module,At=kt&&kt.exports===Ot?n.Buffer:void 0,k=(At?At.isBuffer:void 0)||Et}));function Mt(e,t){var n=typeof e;return t=t??Nt,!!t&&(n==`number`||n!=`symbol`&&Pt.test(e))&&e>-1&&e%1==0&&e<t}var Nt,Pt,Ft=e((()=>{Nt=9007199254740991,Pt=/^(?:0|[1-9]\d*)$/}));function It(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Lt}var Lt,Rt=e((()=>{Lt=9007199254740991}));function zt(e){return b(e)&&It(e.length)&&!!A[s(e)]}var Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,A,dn=e((()=>{r(),Rt(),x(),Bt=`[object Arguments]`,Vt=`[object Array]`,Ht=`[object Boolean]`,Ut=`[object Date]`,Wt=`[object Error]`,Gt=`[object Function]`,Kt=`[object Map]`,qt=`[object Number]`,Jt=`[object Object]`,Yt=`[object RegExp]`,Xt=`[object Set]`,Zt=`[object String]`,Qt=`[object WeakMap]`,$t=`[object ArrayBuffer]`,en=`[object DataView]`,tn=`[object Float32Array]`,nn=`[object Float64Array]`,rn=`[object Int8Array]`,an=`[object Int16Array]`,on=`[object Int32Array]`,sn=`[object Uint8Array]`,cn=`[object Uint8ClampedArray]`,ln=`[object Uint16Array]`,un=`[object Uint32Array]`,A={},A[tn]=A[nn]=A[rn]=A[an]=A[on]=A[sn]=A[cn]=A[ln]=A[un]=!0,A[Bt]=A[Vt]=A[$t]=A[Ht]=A[en]=A[Ut]=A[Wt]=A[Gt]=A[Kt]=A[qt]=A[Jt]=A[Yt]=A[Xt]=A[Zt]=A[Qt]=!1}));function fn(e){return function(t){return e(t)}}var pn=e((()=>{})),mn,j,M,N,hn=e((()=>{u(),mn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,j=mn&&typeof module==`object`&&module&&!module.nodeType&&module,M=j&&j.exports===mn&&i.process,N=function(){try{return j&&j.require&&j.require(`util`).types||M&&M.binding&&M.binding(`util`)}catch{}}()})),gn,P,F=e((()=>{dn(),pn(),hn(),gn=N&&N.isTypedArray,P=gn?fn(gn):zt}));function _n(e,t){var n=E(e),r=!n&&O(e),i=!n&&!r&&k(e),a=!n&&!r&&!i&&P(e),o=n||r||i||a,s=o?_t(e.length,String):[],c=s.length;for(var l in e)(t||vn.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Mt(l,c)))&&s.push(l);return s}var vn,yn=e((()=>{vt(),Tt(),D(),jt(),Ft(),F(),vn=Object.prototype.hasOwnProperty}));function bn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||xn)}var xn,Sn=e((()=>{xn=Object.prototype}));function Cn(e,t){return function(n){return e(t(n))}}var wn=e((()=>{})),Tn,En=e((()=>{wn(),Tn=Cn(Object.keys,Object)}));function Dn(e){if(!bn(e))return Tn(e);var t=[];for(var n in Object(e))On.call(e,n)&&n!=`constructor`&&t.push(n);return t}var On,kn=e((()=>{Sn(),En(),On=Object.prototype.hasOwnProperty}));function An(e){return e!=null&&It(e.length)&&!h(e)}var jn=e((()=>{g(),Rt()}));function I(e){return An(e)?_n(e):Dn(e)}var Mn=e((()=>{yn(),kn(),jn()}));function Nn(e){return st(e,I,ht)}var Pn=e((()=>{ct(),gt(),Mn()}));function Fn(e,t,n,r,i,a){var o=n&In,s=Nn(e),c=s.length;if(c!=Nn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Ln.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var In,Ln,Rn=e((()=>{Pn(),In=1,Ln=Object.prototype.hasOwnProperty})),L,zn=e((()=>{m(),c(),L=p(n,`DataView`)})),R,Bn=e((()=>{m(),c(),R=p(n,`Promise`)})),z,Vn=e((()=>{m(),c(),z=p(n,`Set`)})),B,Hn=e((()=>{m(),c(),B=p(n,`WeakMap`)})),Un,Wn,Gn,Kn,V,qn,Jn,Yn,Xn,Zn,Qn,H,U,$n=e((()=>{zn(),te(),Bn(),Vn(),Hn(),r(),ne(),Un=`[object Map]`,Wn=`[object Object]`,Gn=`[object Promise]`,Kn=`[object Set]`,V=`[object WeakMap]`,qn=`[object DataView]`,Jn=y(L),Yn=y(d),Xn=y(R),Zn=y(z),Qn=y(B),H=s,(L&&H(new L(new ArrayBuffer(1)))!=qn||d&&H(new d)!=Un||R&&H(R.resolve())!=Gn||z&&H(new z)!=Kn||B&&H(new B)!=V)&&(H=function(e){var t=s(e),n=t==Wn?e.constructor:void 0,r=n?y(n):``;if(r)switch(r){case Jn:return qn;case Yn:return Un;case Xn:return Gn;case Zn:return Kn;case Qn:return V}return t}),U=H}));function er(e,t,n,r,i,a){var o=E(e),s=E(t),c=o?rr:U(e),l=s?rr:U(t);c=c==nr?W:c,l=l==nr?W:l;var u=c==W,d=l==W,f=c==l;if(f&&k(e)){if(!k(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new S),o||P(e)?Pe(e,t,n,r,i,a):Ue(e,t,c,n,r,i,a);if(!(n&tr)){var p=u&&ir.call(e,`__wrapped__`),m=d&&ir.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new S),i(h,g,n,r,a)}}return f?(a||(a=new S),Fn(e,t,n,r,i,a)):!1}var tr,nr,rr,W,ir,ar=e((()=>{Ce(),Le(),it(),Rn(),$n(),D(),jt(),F(),tr=1,nr=`[object Arguments]`,rr=`[object Array]`,W=`[object Object]`,ir=Object.prototype.hasOwnProperty}));function G(e,t,n,r,i){return e===t?!0:e==null||t==null||!b(e)&&!b(t)?e!==e&&t!==t:er(e,t,n,r,G,i)}var or=e((()=>{ar(),x()}));function sr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new S;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?G(u,l,cr|lr,r,d):f))return!1}}return!0}var cr,lr,ur=e((()=>{Ce(),or(),cr=1,lr=2}));function dr(e){return e===e&&!a(e)}var fr=e((()=>{l()}));function pr(e){for(var t=I(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,dr(i)]}return t}var mr=e((()=>{fr(),Mn()}));function hr(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var gr=e((()=>{}));function _r(e){var t=pr(e);return t.length==1&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||sr(n,e,t)}}var vr=e((()=>{ur(),mr(),gr()}));function yr(e,t){if(E(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||se(e)?!0:xr.test(e)||!br.test(e)||t!=null&&e in Object(t)}var br,xr,Sr=e((()=>{D(),ce(),br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xr=/^\w*$/}));function Cr(e){var t=ee(e,function(e){return n.size===wr&&n.clear(),e}),n=t.cache;return t}var wr,Tr=e((()=>{ae(),wr=500})),Er,Dr,Or,kr=e((()=>{Tr(),Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Or=Cr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Er,function(e,n,r,i){t.push(r?i.replace(Dr,`$1`):n||e)}),t})}));function Ar(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var jr=e((()=>{}));function Mr(e){if(typeof e==`string`)return e;if(E(e))return Ar(e,Mr)+``;if(se(e))return Fr?Fr.call(e):``;var t=e+``;return t==`0`&&1/e==-Nr?`-0`:t}var Nr,Pr,Fr,Ir=e((()=>{o(),jr(),D(),ce(),Nr=1/0,Pr=t?t.prototype:void 0,Fr=Pr?Pr.toString:void 0}));function Lr(e){return e==null?``:Mr(e)}var Rr=e((()=>{Ir()}));function zr(e,t){return E(e)?e:yr(e,t)?[e]:Or(Lr(e))}var Br=e((()=>{D(),Sr(),kr(),Rr()}));function K(e){if(typeof e==`string`||se(e))return e;var t=e+``;return t==`0`&&1/e==-Vr?`-0`:t}var Vr,q=e((()=>{ce(),Vr=1/0}));function Hr(e,t){t=zr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[K(t[n++])];return n&&n==r?e:void 0}var Ur=e((()=>{Br(),q()}));function Wr(e,t,n){var r=e==null?void 0:Hr(e,t);return r===void 0?n:r}var Gr=e((()=>{Ur()}));function Kr(e,t){return e!=null&&t in Object(e)}var qr=e((()=>{}));function Jr(e,t,n){t=zr(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=K(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&It(i)&&Mt(o,i)&&(E(e)||O(e)))}var Yr=e((()=>{Br(),Tt(),D(),Ft(),Rt(),q()}));function Xr(e,t){return e!=null&&Jr(e,t,Kr)}var Zr=e((()=>{qr(),Yr()}));function Qr(e,t){return yr(e)&&dr(t)?hr(K(e),t):function(n){var r=Wr(n,e);return r===void 0&&r===t?Xr(n,e):G(t,r,$r|ei)}}var $r,ei,ti=e((()=>{or(),Gr(),Zr(),Sr(),fr(),gr(),q(),$r=1,ei=2}));function ni(e){return e}var ri=e((()=>{}));function ii(e){return function(t){return t?.[e]}}var ai=e((()=>{}));function oi(e){return function(t){return Hr(t,e)}}var si=e((()=>{Ur()}));function ci(e){return yr(e)?ii(K(e)):oi(e)}var li=e((()=>{ai(),si(),Sr(),q()}));function ui(e){return typeof e==`function`?e:e==null?ni:typeof e==`object`?E(e)?Qr(e[0],e[1]):_r(e):ci(e)}var di=e((()=>{vr(),ti(),ri(),D(),li()}));function fi(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==void 0&&(n=n===void 0?a:n+a)}return n}var pi=e((()=>{}));function J(e,t){return e&&e.length?fi(e,ui(t,2)):0}var mi=e((()=>{di(),pi()})),hi=e((()=>{}));function gi(){return Y}function _i(e){Y=e}function vi(e){return X.has(e)?X.get(e):void 0}function yi(e,t){X.set(e,t)}function bi(e){return Z.get(e)}function xi(e,t){Z.set(e,t)}function Si(){Y=null,X.clear(),Z.clear()}function Ci(){return Ei}function wi(e){Ei=e}function Ti(){Ei=void 0}var Y,X,Z,Ei,Di=e((()=>{Y=null,X=new Map,Z=new Map}));function Oi(){let e=new Set;return{subscribe(t){return e.add(t),()=>{e.delete(t)}},emit(...t){for(let n of e)n(...t)},clear(){e.clear()}}}var ki=e((()=>{}));function Ai(){let e=``;if(typeof process<`u`&&typeof process.cwd==`function`&&typeof le==`function`){let t=de();try{e=le(t).normalize(`NFC`)}catch{e=t.normalize(`NFC`)}}return{originalCwd:e,projectRoot:e,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:e,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:`cli`,sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:[`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:ue(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,...process.env.USER_TYPE===`ant`?{replBridgeActive:!1}:{},directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function ji(){return Q.sessionId}function Mi(e={}){return e.setCurrentAsParent&&(Q.parentSessionId=Q.sessionId),Q.planSlugCache.delete(Q.sessionId),Q.sessionId=ue(),Q.sessionProjectDir=null,Q.sessionId}function Ni(){return Q.parentSessionId}function Pi(e,t=null){Q.planSlugCache.delete(Q.sessionId),Q.sessionId=e,Q.sessionProjectDir=t,Ys.emit(e)}function Fi(){return Q.sessionProjectDir}function Ii(){return Q.originalCwd}function Li(){return Q.projectRoot}function Ri(e){Q.originalCwd=e.normalize(`NFC`)}function zi(e){Q.projectRoot=e.normalize(`NFC`)}function Bi(){return Q.cwd}function Vi(e){Q.cwd=e.normalize(`NFC`)}function Hi(){return Q.directConnectServerUrl}function Ui(e){Q.directConnectServerUrl=e}function Wi(e,t){Q.totalAPIDuration+=e,Q.totalAPIDurationWithoutRetries+=t}function Gi(e,t,n){Q.modelUsage[n]=t,Q.totalCostUSD+=e}function Ki(){return Q.totalCostUSD}function qi(){return Q.totalAPIDuration}function Ji(){return Date.now()-Q.startTime}function Yi(){return Q.totalAPIDurationWithoutRetries}function Xi(){return Q.totalToolDuration}function Zi(e){Q.totalToolDuration+=e,Q.turnToolDurationMs+=e,Q.turnToolCount++}function Qi(){return Q.turnHookDurationMs}function $i(e){Q.turnHookDurationMs+=e,Q.turnHookCount++}function ea(){Q.turnHookDurationMs=0,Q.turnHookCount=0}function ta(){return Q.turnHookCount}function na(){return Q.turnToolDurationMs}function ra(){Q.turnToolDurationMs=0,Q.turnToolCount=0}function ia(){return Q.turnToolCount}function aa(){return Q.turnClassifierDurationMs}function oa(e){Q.turnClassifierDurationMs+=e,Q.turnClassifierCount++}function sa(){Q.turnClassifierDurationMs=0,Q.turnClassifierCount=0}function ca(){return Q.turnClassifierCount}function la(){return Q.statsStore}function ua(e){Q.statsStore=e}function da(e){e?fa():Zs=!0}function fa(){Q.lastInteractionTime=Date.now(),Zs=!1}function pa(e,t){Q.totalLinesAdded+=e,Q.totalLinesRemoved+=t}function ma(){return Q.totalLinesAdded}function ha(){return Q.totalLinesRemoved}function ga(){return J(Object.values(Q.modelUsage),`inputTokens`)}function _a(){return J(Object.values(Q.modelUsage),`outputTokens`)}function va(){return J(Object.values(Q.modelUsage),`cacheReadInputTokens`)}function ya(){return J(Object.values(Q.modelUsage),`cacheCreationInputTokens`)}function ba(){return J(Object.values(Q.modelUsage),`webSearchRequests`)}function xa(){return _a()-Qs}function Sa(){return $s}function Ca(e){Qs=_a(),$s=e,$=0}function wa(){return $}function Ta(){$++}function Ea(){Q.hasUnknownModelCost=!0}function Da(){return Q.hasUnknownModelCost}function Oa(){return Q.lastMainRequestId}function ka(e){Q.lastMainRequestId=e}function Aa(){return Q.lastApiCompletionTimestamp}function ja(e){Q.lastApiCompletionTimestamp=e}function Ma(){Q.pendingPostCompaction=!0}function Na(){let e=Q.pendingPostCompaction;return Q.pendingPostCompaction=!1,e}function Pa(){return Q.lastInteractionTime}function Fa(){return ec}async function Ia(){for(;ec;)await new Promise(e=>setTimeout(e,tc).unref?.())}function La(){return Q.modelUsage}function Ra(e){return Q.modelUsage[e]}function za(){return Q.mainLoopModelOverride}function Ba(){return Q.initialMainLoopModel}function Va(e){Q.mainLoopModelOverride=e}function Ha(e){Q.initialMainLoopModel=e}function Ua(){return Q.sdkBetas}function Wa(e){Q.sdkBetas=e}function Ga(){Q.totalCostUSD=0,Q.totalAPIDuration=0,Q.totalAPIDurationWithoutRetries=0,Q.totalToolDuration=0,Q.startTime=Date.now(),Q.totalLinesAdded=0,Q.totalLinesRemoved=0,Q.hasUnknownModelCost=!1,Q.modelUsage={},Q.promptId=null}function Ka({totalCostUSD:e,totalAPIDuration:t,totalAPIDurationWithoutRetries:n,totalToolDuration:r,totalLinesAdded:i,totalLinesRemoved:a,lastDuration:o,modelUsage:s}){Q.totalCostUSD=e,Q.totalAPIDuration=t,Q.totalAPIDurationWithoutRetries=n,Q.totalToolDuration=r,Q.totalLinesAdded=i,Q.totalLinesRemoved=a,s&&(Q.modelUsage=s),o&&(Q.startTime=Date.now()-o)}function qa(){return Q.modelStrings}function Ja(e){Q.modelStrings=e}function Ya(e,t){Q.meter=e,Q.sessionCounter=t(`claude_code.session.count`,{description:`Count of CLI sessions started`}),Q.locCounter=t(`claude_code.lines_of_code.count`,{description:`Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed`}),Q.prCounter=t(`claude_code.pull_request.count`,{description:`Number of pull requests created`}),Q.commitCounter=t(`claude_code.commit.count`,{description:`Number of git commits created`}),Q.costCounter=t(`claude_code.cost.usage`,{description:`Cost of the Work Mate session`,unit:`USD`}),Q.tokenCounter=t(`claude_code.token.usage`,{description:`Number of tokens used`,unit:`tokens`}),Q.codeEditToolDecisionCounter=t(`claude_code.code_edit_tool.decision`,{description:`Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools`}),Q.activeTimeCounter=t(`claude_code.active_time.total`,{description:`Total active time in seconds`,unit:`s`})}function Xa(){return Q.sessionCounter}function Za(){return Q.locCounter}function Qa(){return Q.prCounter}function $a(){return Q.commitCounter}function eo(){return Q.costCounter}function to(){return Q.tokenCounter}function no(){return Q.codeEditToolDecisionCounter}function ro(){return Q.activeTimeCounter}function io(){return Q.loggerProvider}function ao(e){Q.loggerProvider=e}function oo(){return Q.eventLogger}function so(e){Q.eventLogger=e}function co(){return Q.meterProvider}function lo(e){Q.meterProvider=e}function uo(){return Q.tracerProvider}function fo(e){Q.tracerProvider=e}function po(){return!Q.isInteractive}function mo(){return Q.isInteractive}function ho(e){Q.isInteractive=e}function go(){return Q.clientType}function _o(e){Q.clientType=e}function vo(){return Q.sdkAgentProgressSummariesEnabled}function yo(e){Q.sdkAgentProgressSummariesEnabled=e}function bo(){return Q.kairosActive}function xo(){return Q.strictToolResultPairing}function So(){return Q.userMsgOptIn}function Co(e){Q.userMsgOptIn=e}function wo(e){Q.sessionSource=e}function To(){return Q.questionPreviewFormat}function Eo(e){Q.questionPreviewFormat=e}function Do(){return Q.agentColorMap}function Oo(){return Q.flagSettingsPath}function ko(e){Q.flagSettingsPath=e}function Ao(){return Q.flagSettingsInline}function jo(e){Q.flagSettingsInline=e}function Mo(){return Q.sessionIngressToken}function No(e){Q.sessionIngressToken=e}function Po(){return Q.oauthTokenFromFd}function Fo(e){Q.oauthTokenFromFd=e}function Io(){return Q.apiKeyFromFd}function Lo(e){Q.apiKeyFromFd=e}function Ro(e){Q.lastAPIRequest=e}function zo(e){Q.lastAPIRequestMessages=e}function Bo(e){Q.lastClassifierRequests=e}function Vo(e){Q.cachedClaudeMdContent=e}function Ho(){return Q.cachedClaudeMdContent}function Uo(){return Q.allowedSettingSources}function Wo(e){Q.allowedSettingSources=e}function Go(){return po()&&Q.clientType!==`claude-vscode`}function Ko(e){Q.inlinePlugins=e}function qo(){return Q.inlinePlugins}function Jo(e){Q.useCoworkPlugins=e,Si()}function Yo(){return Q.useCoworkPlugins}function Xo(e){Q.sessionBypassPermissionsMode=e}function Zo(e){Q.sessionTrustAccepted=e}function Qo(){return Q.sessionTrustAccepted}function $o(e){Q.sessionPersistenceDisabled=e}function es(){return Q.sessionPersistenceDisabled}function ts(){return Q.hasExitedPlanMode}function ns(e){Q.hasExitedPlanMode=e}function rs(){return Q.needsPlanModeExitAttachment}function is(e){Q.needsPlanModeExitAttachment=e}function as(e,t){t===`plan`&&e!==`plan`&&(Q.needsPlanModeExitAttachment=!1),e===`plan`&&t!==`plan`&&(Q.needsPlanModeExitAttachment=!0)}function os(){return Q.needsAutoModeExitAttachment}function ss(e){Q.needsAutoModeExitAttachment=e}function cs(e,t){if(e===`auto`&&t===`plan`||e===`plan`&&t===`auto`)return;let n=e===`auto`,r=t===`auto`;r&&!n&&(Q.needsAutoModeExitAttachment=!1),n&&!r&&(Q.needsAutoModeExitAttachment=!0)}function ls(){return Q.lspRecommendationShownThisSession}function us(e){Q.lspRecommendationShownThisSession=e}function ds(e){Q.initJsonSchema=e}function fs(){return Q.initJsonSchema}function ps(e){Q.registeredHooks||(Q.registeredHooks={});for(let[t,n]of Object.entries(e)){let e=t;Q.registeredHooks[e]||(Q.registeredHooks[e]=[]),Q.registeredHooks[e].push(...n??[])}}function ms(){return Q.registeredHooks}function hs(){if(!Q.registeredHooks)return;let e={};for(let[t,n]of Object.entries(Q.registeredHooks)){let r=(n??[]).filter(e=>!(`pluginRoot`in e));r.length>0&&(e[t]=r)}Q.registeredHooks=Object.keys(e).length>0?e:null}function gs(){return Q.planSlugCache}function _s(e,t){if(Q.planSlugCache.size>=50){let e=Q.planSlugCache.keys().next().value;e!==void 0&&Q.planSlugCache.delete(e)}Q.planSlugCache.set(e,t)}function vs(e){Q.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:e.sessionId}}function ys(){return Q.teleportedSessionInfo}function bs(){Q.teleportedSessionInfo&&(Q.teleportedSessionInfo.hasLoggedFirstMessage=!0)}function xs(e,t,n,r=null){let i=`${r??``}:${e}`;Q.invokedSkills.set(i,{skillName:e,skillPath:t,content:n,invokedAt:Date.now(),agentId:r})}function Ss(e){let t=e??null,n=new Map;for(let[e,r]of Q.invokedSkills)r.agentId===t&&n.set(e,r);return n}function Cs(e){if(!e||e.size===0){Q.invokedSkills.clear();return}for(let[t,n]of Q.invokedSkills)(n.agentId===null||!e.has(n.agentId))&&Q.invokedSkills.delete(t)}function ws(e){for(let[t,n]of Q.invokedSkills)n.agentId===e&&Q.invokedSkills.delete(t)}function Ts(){if(Q.slowOperations.length===0)return rc;let e=Date.now();return Q.slowOperations.some(t=>e-t.timestamp>=nc)&&(Q.slowOperations=Q.slowOperations.filter(t=>e-t.timestamp<nc),Q.slowOperations.length===0)?rc:Q.slowOperations}function Es(){return Q.mainThreadAgentType}function Ds(e){Q.mainThreadAgentType=e}function Os(){return Q.isRemoteMode}function ks(e){Q.isRemoteMode=e}function As(){return Q.systemPromptSectionCache}function js(e,t){if(Q.systemPromptSectionCache.size>=100){let e=Q.systemPromptSectionCache.keys().next().value;e!==void 0&&Q.systemPromptSectionCache.delete(e)}Q.systemPromptSectionCache.set(e,t)}function Ms(){Q.systemPromptSectionCache.clear()}function Ns(){return Q.lastEmittedDate}function Ps(e){Q.lastEmittedDate=e}function Fs(){return Q.additionalDirectoriesForClaudeMd}function Is(e){Q.additionalDirectoriesForClaudeMd=e}function Ls(){return Q.promptCache1hAllowlist}function Rs(e){Q.promptCache1hAllowlist=e}function zs(){return Q.promptCache1hEligible}function Bs(e){Q.promptCache1hEligible=e}function Vs(){return Q.afkModeHeaderLatched}function Hs(e){Q.afkModeHeaderLatched=e}function Us(){return Q.fastModeHeaderLatched}function Ws(e){Q.fastModeHeaderLatched=e}function Gs(){return Q.cacheEditingHeaderLatched}function Ks(){Q.afkModeHeaderLatched=null,Q.fastModeHeaderLatched=null,Q.cacheEditingHeaderLatched=null}function qs(){return Q.promptId}function Js(e){Q.promptId=e}var Q,Ys,Xs,Zs,Qs,$s,$,ec,tc,nc,rc,ic=e((()=>{mi(),hi(),Di(),ki(),Q=Ai(),Ys=Oi(),Xs=Ys.subscribe,Qs=0,$s=null,$=0,ec=!1,tc=150,nc=1e4,rc=[]}));export{La as $,Bs as $n,Pn as $r,ic as $t,oo as A,D as Ai,Ko as An,wi as Ar,ga as At,Os as B,C as Bi,us as Bn,zr as Br,Qi as Bt,go as C,gt as Ci,Ws as Cn,vi as Cr,to as Ct,Sa as D,ut as Di,Ea as Dn,Si as Dr,va as Dt,eo as E,lt as Ei,ns as En,Di as Er,ya as Et,Ba as F,Ve as Fi,ja as Fn,ri as Fr,ba as Ft,Pa as G,Ja as Gn,jr as Gr,Yo as Gt,bo as H,S as Hi,Ds as Hn,Rr as Hr,ia as Ht,qo as I,w as Ii,Bo as In,Hr as Ir,uo as It,io as J,Fo as Jn,U as Jr,as as Jt,Oa as K,ss as Kn,G as Kr,So as Kt,Ss as L,Re as Li,Ps as Ln,Ur as Lr,ca as Lt,Ao as M,at as Mi,ks as Mn,ui as Mr,ha as Mt,Oo as N,ot as Ni,Ro as Nn,di as Nr,_a as Nt,Bi as O,st as Oi,ds as On,xi as Or,Ki as Ot,fs as P,He as Pi,zo as Pn,ni as Pr,Xi as Pt,qa as Q,Rs as Qn,Nn as Qr,Ta as Qt,mo as R,Me as Ri,ka as Rn,q as Rr,aa as Rt,Ho as S,ht as Si,so as Sn,bi as Sr,ys as St,$a as T,dt as Ti,ko as Tn,gi as Tr,Yi as Tt,Aa as U,Ce as Ui,Ya as Un,Lr as Ur,na as Ut,Fa as V,ke as Vi,Va as Vn,Br as Vr,xa as Vt,Ns as W,lo as Wn,Ar as Wr,Ra as Wt,Es as X,_s as Xn,z as Xr,ls as Xt,za as Y,Ri as Yn,$n as Yr,ts as Yt,co as Z,zi as Zn,Vn as Zr,Da as Zt,Do as _,Mt as _i,Vo as _n,da as _r,Qo as _t,pa as a,Cn as ai,Xs as an,No as ar,Li as at,wa as b,Tt as bi,Vi as bn,ki as br,xo as bt,Ks as c,_n as ci,ps as cn,Zo as cr,qs as ct,hs as d,P as di,ea as dn,vs as dr,vo as dt,Mn as ei,es as en,Js as er,Po as et,Ms as f,hn as fi,ra as fn,fo as fr,Ua as ft,Vs as g,Ft as gi,Lo as gn,Pi as gr,Fi as gt,Fs as h,pn as hi,Wo as hn,Ca as hr,Mo as ht,Wi as i,wn as ii,rs as in,Xo as ir,Qa as it,Us as j,E as ji,ho as jn,_i as jr,ma as jt,Hi as k,ct as ki,Ha as kn,yi as kr,Ji as kt,Cs as l,yn as li,Ga as ln,ua as lr,To as lt,ro as m,fn as mi,Hs as mn,Co as mr,ji as mt,Zi as n,jn as ni,Ma as nn,yo as nr,Ni as nt,oa as o,Sn as oi,Go as on,$o as or,Ls as ot,Na as p,N as pi,Is as pn,Jo as pr,Xa as pt,Za as q,is as qn,or as qr,cs as qt,Gi as r,An as ri,os as rn,Wa as rr,gs as rt,$i as s,bn as si,Mi as sn,wo as sr,zs as st,xs as t,I as ti,bs as tn,Eo as tr,Ii as tt,ws as u,F as ui,sa as un,js as ur,ms as ut,Uo as v,jt as vi,_o as vn,Ia as vr,Ts as vt,no as w,ft as wi,jo as wn,Ci as wr,qi as wt,Gs as x,O as xi,Ui as xn,Ti as xr,As as xt,Io as y,k as yi,Ka as yn,Oi as yr,la as yt,po as z,Ne as zi,ao as zn,K as zr,ta as zt};
@@ -1 +0,0 @@
1
- import{$t as e,Yn as t,bn as n,mt as r,t as i}from"./state-C2OSZkV1.js";e();export{i as addInvokedSkill,r as getSessionId,n as setCwdState,t as setOriginalCwd};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,r,t as i}from"./envUtils-DSxRz_kt.js";import{n as a,t as o}from"./figures-5ThXQEtq.js";import{P as ee,di as s,fi as te,j as c,t as l,ui as u}from"./src-CDCSSo0U2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{Hx as f,Rx as p,SE as m,TE as h,Vx as g,Wx as _,hS as v,iS as y,sS as b,uS as x}from"./loadAgentsDir-ByO8eJqU.js";import{Cn as S,a as C,bn as w,c as T,cn as E,g as D,in as O,r as k,rn as A}from"./settings-hQDLwPVj.js";import{p as j,y as M}from"./startupProfiler-DCn_NxMH.js";import{Bt as ne,Gt as N,_ as P,bi as F,bt as I,i as L,vi as R,x as z}from"./model-CwO-g1RW.js";import{h as B,l as V,o as H,p as U}from"./proxy-BmtEnJ02.js";import{d as W,u as G}from"./pidLock-DJnS_38v.js";import{n as K,t as q}from"./nativeInstaller-B-lNJjM-.js";import{n as J,t as Y}from"./allErrors-BPn_2TrB.js";function X(){return process.env.USER_TYPE===`ant`?[{label:`Bash Sandbox`,value:m.isSandboxingEnabled()?`Enabled`:`Disabled`}]:[]}function Z(e,t=null,n){let r=e?.find(e=>e.name===`ide`);if(t){let e=v(t.ideType),i=x(t.ideType)?`plugin`:`extension`;if(t.error)return[{label:`IDE`,value:(0,$.jsxs)(ee,{children:[c(`error`,n)(o.cross),` Error installing `,e,` `,i,`:`,` `,t.error,`
2
- `,`Please restart your IDE and try again.`]})}];if(t.installed)return r&&r.type===`connected`?t.installedVersion===r.serverInfo?.version?[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion}`}]:[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion} (server version: ${r.serverInfo?.version})`}]:[{label:`IDE`,value:`Installed ${e} ${i}`}]}else if(r){let e=y(r)??`IDE`;return r.type===`connected`?[{label:`IDE`,value:`Connected to ${e} extension`}]:[{label:`IDE`,value:`${c(`error`,n)(o.cross)} Not connected to ${e}`}]}return[]}function re(e=[],t){let n=e.filter(e=>e.name!==`ide`);if(!n.length)return[];let r={connected:0,pending:0,needsAuth:0,failed:0};for(let e of n)e.type===`connected`?r.connected++:e.type===`pending`?r.pending++:e.type===`needs-auth`?r.needsAuth++:r.failed++;let i=[];return r.connected&&i.push(c(`success`,t)(`${r.connected} connected`)),r.needsAuth&&i.push(c(`warning`,t)(`${r.needsAuth} need auth`)),r.pending&&i.push(c(`inactive`,t)(`${r.pending} pending`)),r.failed&&i.push(c(`error`,t)(`${r.failed} failed`)),[{label:`MCP servers`,value:`${i.join(`, `)} ${c(`inactive`,t)(`· /mcp`)}`}]}async function ie(){let e=g(await f()),t=[];return e.forEach(e=>{let n=w(e.path);t.push(`Large ${n} will impact performance (${j(e.content.length)} chars > ${j(p)})`)}),t}function ae(){return[{label:`Setting sources`,value:A().filter(e=>{let t=T(e);return t!==null&&Object.keys(t).length>0}).map(e=>{if(e===`policySettings`){let e=C();if(e===null)return null;switch(e){case`remote`:return`Enterprise managed settings (remote)`;case`plist`:return`Enterprise managed settings (plist)`;case`hklm`:return`Enterprise managed settings (HKLM)`;case`file`:{let{hasBase:e,hasDropIns:t}=k();return e&&t?`Enterprise managed settings (file + drop-ins)`:t?`Enterprise managed settings (drop-ins)`:`Enterprise managed settings (file)`}case`hkcu`:return`Enterprise managed settings (HKCU)`}}return O(e)}).filter(e=>e!==null)}]}async function oe(){return(await K()).map(e=>e.message)}async function se(){let e=await G(),t=[],{errors:n}=Y();if(n.length>0){let e=Array.from(new Set(n.map(e=>e.file))).join(`, `);t.push(`Found invalid settings files: ${e}. They will be ignored.`)}return e.warnings.forEach(e=>{t.push(e.issue)}),e.hasUpdatePermissions===!1&&t.push(`No write permissions for auto-updates (requires sudo)`),t}function Q(){let e=I();if(!e)return[];let t=[];return e.subscription&&t.push({label:`Login method`,value:`${e.subscription} Account`}),e.tokenSource&&t.push({label:`Auth token`,value:e.tokenSource}),e.apiKeySource&&t.push({label:`API key`,value:e.apiKeySource}),e.organization&&!process.env.IS_DEMO&&t.push({label:`Organization`,value:e.organization}),e.email&&!process.env.IS_DEMO&&t.push({label:`Email`,value:e.email}),t}function ce(){let e=R(),n=[];if(e!==`firstParty`){let t={bedrock:`AWS Bedrock`,vertex:`Google Vertex AI`,foundry:`Microsoft Foundry`,gemini:`Gemini API`,grok:`Grok API`,openai:`OpenAI API`}[e];n.push({label:`API provider`,value:t})}if(e===`firstParty`){let e=process.env.ANTHROPIC_BASE_URL;e&&n.push({label:`API base URL`,value:e})}else if(e===`bedrock`){let e=process.env.BEDROCK_BASE_URL;e&&n.push({label:`Bedrock base URL`,value:e}),n.push({label:`AWS region`,value:i()}),t(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&n.push({value:`AWS auth skipped`})}else if(e===`vertex`){let e=process.env.VERTEX_BASE_URL;e&&n.push({label:`Vertex base URL`,value:e});let i=process.env.ANTHROPIC_VERTEX_PROJECT_ID;i&&n.push({label:`GCP project`,value:i}),n.push({label:`Default region`,value:r()}),t(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)&&n.push({value:`GCP auth skipped`})}else if(e===`foundry`){let e=process.env.ANTHROPIC_FOUNDRY_BASE_URL;e&&n.push({label:`Microsoft Foundry base URL`,value:e});let r=process.env.ANTHROPIC_FOUNDRY_RESOURCE;r&&n.push({label:`Microsoft Foundry resource`,value:r}),t(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH)&&n.push({value:`Microsoft Foundry auth skipped`})}else if(e===`gemini`){let e=process.env.GEMINI_BASE_URL||`https://generativelanguage.googleapis.com/v1beta`;n.push({label:`Gemini base URL`,value:e})}else if(e===`grok`){let e=process.env.GROK_BASE_URL;n.push({label:`Grok base URL`,value:e})}else if(e===`openai`){let e=process.env.OPENAI_BASE_URL;n.push({label:`OpenAI base URL`,value:e})}let a=H();a&&n.push({label:`Proxy`,value:a});let o=U();return process.env.NODE_EXTRA_CA_CERTS&&n.push({label:`Additional CA cert(s)`,value:process.env.NODE_EXTRA_CA_CERTS}),o&&(o.cert&&process.env.CLAUDE_CODE_CLIENT_CERT&&n.push({label:`mTLS client cert`,value:process.env.CLAUDE_CODE_CLIENT_CERT}),o.key&&process.env.CLAUDE_CODE_CLIENT_KEY&&n.push({label:`mTLS client key`,value:process.env.CLAUDE_CODE_CLIENT_KEY})),n}function le(e){let t=z(e);if(e===null&&N()){let e=L();t=`${u.bold(`Default`)} ${e}`}return t}var $,ue=e((()=>{s(),a(),te(),l(),ne(),_(),W(),n(),S(),M(),b(),P(),F(),B(),q(),V(),h(),J(),E(),D(),$=d()}));export{se as a,X as c,ue as d,oe as i,ae as l,Q as n,re as o,Z as r,ie as s,ce as t,le as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fa as t,pa as n}from"./loadAgentsDir-ByO8eJqU.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,t)=>e+n(`${t.agentType}: ${t.whenToUse}`),0):0}var i,a=e((()=>{t(),i=15e3}));export{r as n,a as r,i as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./subprocessEnv-vrwzMgKn.js";t();export{e as registerUpstreamProxyEnvFn};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./switcher-BAMqSX7Z.js";e();export{t as restoreActiveProvider};
@@ -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"./BackgroundTasksDialog-IGDrkbWl.js";async function a(e,t){return(0,o.jsx)(i,{toolUseContext:t,onDone:e})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
@@ -1 +0,0 @@
1
- import{Bf as e,Gf as t,Jf as n,Uf as r,Vf as i}from"./loadAgentsDir-ByO8eJqU.js";i();export{e as checkOutTeleportedSessionBranch,r as processMessagesForTeleportResume,t as teleportResumeCodeSession,n as validateGitState};
@@ -1,33 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{Bt as r,di as i,j as a,t as o,ui as s}from"./src-CDCSSo0U2.js";import{n as c,t as l}from"./cwd-C5ce-7WB.js";import{C as u,H as d,S as ee,d as f,p as te,w as ne,z as p}from"./debug-RZ4NuXyS.js";import{Cn as re,Gt as m,Jt as h,Tn as ie}from"./settings-hQDLwPVj.js";import{b as g,c as _,g as v,o as y,y as b}from"./config-CE058cvr.js";import{r as x,t as S}from"./execFileNoThrow-CCX-JY8h.js";import{o as C,s as w}from"./log-CZ0zYP_c.js";import{i as ae,o as oe}from"./platform-DCXXznJg.js";import{d as se,o as T,s as ce}from"./types-D7_37tP2.js";import{homedir as E,platform as D}from"os";import{dirname as le,join as O}from"path";import{randomBytes as k}from"crypto";import{copyFile as A,mkdir as j,readFile as M,stat as N,writeFile as P}from"fs/promises";import{pathToFileURL as ue}from"url";function F(){let e=f().existsSync(O(l(),`CLAUDE.md`)),t=ie(l());return[{key:`workspace`,text:`Ask Claude to create a new app or clone a repository`,isComplete:!1,isCompletable:!0,isEnabled:t},{key:`claudemd`,text:`Run /init to create a CLAUDE.md file with instructions for Claude`,isComplete:e,isCompletable:!0,isEnabled:!t}]}function I(){return F().filter(({isCompletable:e,isEnabled:t})=>e&&t).every(({isComplete:e})=>e)}function L(){y().hasCompletedProjectOnboarding||I()&&b(e=>({...e,hasCompletedProjectOnboarding:!0}))}function de(){b(e=>({...e,projectOnboardingSeenCount:e.projectOnboardingSeenCount+1}))}var R,z=e((()=>{n(),v(),c(),re(),te(),R=t(()=>{let e=y();return e.hasCompletedProjectOnboarding||e.projectOnboardingSeenCount>=4||process.env.IS_DEMO?!1:!I()})}));function B(e){g(t=>({...t,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:e}))}function V(){g(e=>({...e,appleTerminalSetupInProgress:!1}))}function fe(){let e=_();return{inProgress:e.appleTerminalSetupInProgress??!1,backupPath:e.appleTerminalBackupPath||null}}function H(){return O(E(),`Library`,`Preferences`,`com.apple.Terminal.plist`)}async function pe(){let e=H(),t=`${e}.bak`;try{let{code:n}=await S(`defaults`,[`export`,`com.apple.Terminal`,e]);if(n!==0)return null;try{await N(e)}catch{return null}return await S(`defaults`,[`export`,`com.apple.Terminal`,t]),B(t),t}catch(e){return w(e),null}}async function U(){let{inProgress:e,backupPath:t}=fe();if(!e)return{status:`no_backup`};if(!t)return V(),{status:`no_backup`};try{await N(t)}catch{return V(),{status:`no_backup`}}try{let{code:e}=await S(`defaults`,[`import`,`com.apple.Terminal`,t]);return e===0?(await S(`killall`,[`cfprefsd`]),V(),{status:`restored`}):{status:`failed`,backupPath:t}}catch(e){return w(Error(`Failed to restore Terminal.app settings with: ${e}`)),V(),{status:`failed`,backupPath:t}}}var W=e((()=>{v(),x(),C()}));function me(){let e=process.env.VSCODE_GIT_ASKPASS_MAIN??``,t=process.env.PATH??``;return e.includes(`.vscode-server`)||e.includes(`.cursor-server`)||e.includes(`.windsurf-server`)||t.includes(`.vscode-server`)||t.includes(`.cursor-server`)||t.includes(`.windsurf-server`)}function he(){return!m.terminal||!(m.terminal in $)?null:$[m.terminal]??null}function G(e){return r()?`\x1b]8;;${ue(e).href}\x07${e}\x1b]8;;\x07`:e}function K(){return D()===`darwin`&&m.terminal===`Apple_Terminal`||m.terminal===`vscode`||m.terminal===`cursor`||m.terminal===`windsurf`||m.terminal===`alacritty`||m.terminal===`zed`}async function q(e){let t=``;switch(m.terminal){case`Apple_Terminal`:t=await ye(e);break;case`vscode`:t=await Y(`VSCode`,e);break;case`cursor`:t=await Y(`Cursor`,e);break;case`windsurf`:t=await Y(`Windsurf`,e);break;case`alacritty`:t=await be(e);break;case`zed`:t=await xe(e);break;case null:break}return g(e=>[`vscode`,`cursor`,`windsurf`,`alacritty`,`zed`].includes(m.terminal??``)?e.shiftEnterKeyBindingInstalled===!0?e:{...e,shiftEnterKeyBindingInstalled:!0}:m.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled===!0?e:{...e,optionAsMetaKeyInstalled:!0}:e),L(),t}function ge(){return _().shiftEnterKeyBindingInstalled===!0}function _e(){return _().hasUsedBackslashReturn===!0}function ve(){_().hasUsedBackslashReturn||g(e=>({...e,hasUsedBackslashReturn:!0}))}async function J(e,t,n){if(m.terminal&&m.terminal in $)return e(`Shift+Enter is natively supported in ${$[m.terminal]}.
2
-
3
- No configuration needed. Just use Shift+Enter to add newlines.`),null;if(!K()){let t=m.terminal||`your current terminal`,n=ae(),r=``;return n===`macos`?r=` • macOS: Apple Terminal
4
- `:n===`windows`&&(r=` • Windows: Windows Terminal
5
- `),e(`Terminal setup cannot be run from ${t}.
6
-
7
- This command configures a convenient Shift+Enter shortcut for multi-line prompts.
8
- ${s.dim(`Note: You can already use backslash (\\\\) + return to add newlines.`)}
9
-
10
- To set up the shortcut (optional):
11
- 1. Exit tmux/screen temporarily
12
- 2. Run /terminal-setup directly in one of these terminals:
13
- ${r} • IDE: VSCode, Cursor, Windsurf, Zed
14
- • Other: Alacritty
15
- 3. Return to tmux/screen - settings will persist
16
-
17
- ${s.dim(`Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter natively.`)}`),null}return e(await q(t.options.theme)),null}async function Y(e=`VSCode`,t){if(me())return`${a(`warning`,t)(`Cannot install keybindings from a remote ${e} session.`)}${Q}${Q}${e} keybindings must be installed on your local machine, not the remote server.${Q}${Q}To install the Shift+Enter keybinding:${Q}1. Open ${e} on your local machine (not connected to remote)${Q}2. Open the Command Palette (Cmd/Ctrl+Shift+P) → "Preferences: Open Keyboard Shortcuts (JSON)"${Q}3. Add this keybinding (the file must be a JSON array):${Q}${Q}${s.dim(`[
18
- {
19
- "key": "shift+enter",
20
- "command": "workbench.action.terminal.sendSequence",
21
- "args": { "text": "\\u001b\\r" },
22
- "when": "terminalFocus"
23
- }
24
- ]`)}${Q}`;let n=e===`VSCode`?`Code`:e,r=O(E(),D()===`win32`?O(`AppData`,`Roaming`,n,`User`):D()===`darwin`?O(`Library`,`Application Support`,n,`User`):O(`.config`,n,`User`)),i=O(r,`keybindings.json`);try{await j(r,{recursive:!0});let n=`[]`,o=[],c=!1;try{n=await M(i,{encoding:`utf-8`}),c=!0,o=se(n)??[]}catch(e){if(!d(e))throw e}if(c){let n=`${i}.${k(4).toString(`hex`)}.bak`;try{await A(i,n)}catch{return`${a(`warning`,t)(`Error backing up existing ${e} terminal keybindings. Bailing out.`)}${Q}${s.dim(`See ${G(i)}`)}${Q}${s.dim(`Backup path: ${G(n)}`)}${Q}`}}return o.find(e=>e.key===`shift+enter`&&e.command===`workbench.action.terminal.sendSequence`&&e.when===`terminalFocus`)?`${a(`warning`,t)(`Found existing ${e} terminal Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${G(i)}`)}${Q}`:(await P(i,T(n,{key:`shift+enter`,command:`workbench.action.terminal.sendSequence`,args:{text:`\x1B\r`},when:`terminalFocus`}),{encoding:`utf-8`}),`${a(`success`,t)(`Installed ${e} terminal Shift+Enter key binding`)}${Q}${s.dim(`See ${G(i)}`)}${Q}`)}catch(t){throw w(t),Error(`Failed to install ${e} terminal Shift+Enter key binding`)}}async function X(e){let{code:t}=await S(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':useOptionAsMetaKey bool true`,H()]);if(t!==0){let{code:t}=await S(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':useOptionAsMetaKey true`,H()]);if(t!==0)return w(Error(`Failed to enable Option as Meta key for Terminal.app profile: ${e}`)),!1}return!0}async function Z(e){let{code:t}=await S(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':Bell bool false`,H()]);if(t!==0){let{code:t}=await S(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':Bell false`,H()]);if(t!==0)return w(Error(`Failed to disable audio bell for Terminal.app profile: ${e}`)),!1}return!0}async function ye(e){try{if(!await pe())throw Error(`Failed to create backup of Terminal.app preferences, bailing out`);let{stdout:t,code:n}=await S(`defaults`,[`read`,`com.apple.Terminal`,`Default Window Settings`]);if(n!==0||!t.trim())throw Error(`Failed to read default Terminal.app profile`);let{stdout:r,code:i}=await S(`defaults`,[`read`,`com.apple.Terminal`,`Startup Window Settings`]);if(i!==0||!r.trim())throw Error(`Failed to read startup Terminal.app profile`);let o=!1,c=t.trim(),l=await X(c),u=await Z(c);(l||u)&&(o=!0);let d=r.trim();if(d!==c){let e=await X(d),t=await Z(d);(e||t)&&(o=!0)}if(!o)throw Error(`Failed to enable Option as Meta key or disable audio bell for any Terminal.app profile`);return await S(`killall`,[`cfprefsd`]),V(),`${a(`success`,e)(`Configured Terminal.app settings:`)}${Q}${a(`success`,e)(`- Enabled "Use Option as Meta key"`)}${Q}${a(`success`,e)(`- Switched to visual bell`)}${Q}${s.dim(`Option+Enter will now enter a newline.`)}${Q}${s.dim(`You must restart Terminal.app for changes to take effect.`,e)}${Q}`}catch(e){w(e);let t=await U(),n=`Failed to enable Option as Meta key for Terminal.app.`;throw t.status===`restored`?Error(`${n} Your settings have been restored from backup.`):t.status===`failed`?Error(`${n} Restoring from backup failed, try manually with: defaults import com.apple.Terminal ${t.backupPath}`):Error(`${n} No backup was available to restore from.`)}}async function be(e){let t=[],n=process.env.XDG_CONFIG_HOME;if(n?t.push(O(n,`alacritty`,`alacritty.toml`)):t.push(O(E(),`.config`,`alacritty`,`alacritty.toml`)),D()===`win32`){let e=process.env.APPDATA;e&&t.push(O(e,`alacritty`,`alacritty.toml`))}let r=null,i=``,o=!1;for(let e of t)try{i=await M(e,{encoding:`utf-8`}),r=e,o=!0;break}catch(e){if(!d(e))throw e}if(r||(r=t[0]??null),!r)throw Error(`No valid config path found for Alacritty`);try{if(o){if(i.includes(`mods = "Shift"`)&&i.includes(`key = "Return"`))return`${a(`warning`,e)(`Found existing Alacritty Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${G(r)}`)}${Q}`;let t=k(4).toString(`hex`),n=`${r}.${t}.bak`;try{await A(r,n)}catch{return`${a(`warning`,e)(`Error backing up existing Alacritty config. Bailing out.`)}${Q}${s.dim(`See ${G(r)}`)}${Q}${s.dim(`Backup path: ${G(n)}`)}${Q}`}}else await j(le(r),{recursive:!0});let t=i;return i&&!i.endsWith(`
25
- `)&&(t+=`
26
- `),t+=`
27
- [[keyboard.bindings]]
28
- key = "Return"
29
- mods = "Shift"
30
- chars = "\\u001B\\r"
31
- `,await P(r,t,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Alacritty Shift+Enter key binding`)}${Q}${a(`success`,e)(`You may need to restart Alacritty for changes to take effect`)}${Q}${s.dim(`See ${G(r)}`)}${Q}`}catch(e){throw w(e),Error(`Failed to install Alacritty Shift+Enter key binding`)}}async function xe(e){let t=O(E(),`.config`,`zed`),n=O(t,`keymap.json`);try{await j(t,{recursive:!0});let r=`[]`,i=!1;try{r=await M(n,{encoding:`utf-8`}),i=!0}catch(e){if(!d(e))throw e}if(i){if(r.includes(`shift-enter`))return`${a(`warning`,e)(`Found existing Zed Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${G(n)}`)}${Q}`;let t=`${n}.${k(4).toString(`hex`)}.bak`;try{await A(n,t)}catch{return`${a(`warning`,e)(`Error backing up existing Zed keymap. Bailing out.`)}${Q}${s.dim(`See ${G(n)}`)}${Q}${s.dim(`Backup path: ${G(t)}`)}${Q}`}}let o;try{o=u(r),Array.isArray(o)||(o=[])}catch{o=[]}return o.push({context:`Terminal`,bindings:{"shift-enter":[`terminal::SendText`,`\x1B\r`]}}),await P(n,ne(o,null,2)+`
32
- `,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Zed Shift+Enter key binding`)}${Q}${s.dim(`See ${G(n)}`)}${Q}`}catch(e){throw w(e),Error(`Failed to install Zed Shift+Enter key binding`)}}var Q,$,Se=e((()=>{i(),o(),z(),W(),v(),h(),p(),x(),ce(),C(),oe(),ee(),Q=`
33
- `,$={ghostty:`Ghostty`,kitty:`Kitty`,"iTerm.app":`iTerm2`,WezTerm:`WezTerm`,WarpTerminal:`Warp`}}));export{ge as a,K as c,F as d,de as f,R as h,Se as i,U as l,L as m,he as n,ve as o,z as p,_e as r,q as s,J as t,W as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{DC as t,IE as n,LE as r,OC as i}from"./loadAgentsDir-ByO8eJqU.js";import{n as a,t as o}from"./partition-DKuAFJkc.js";function s(e,t,n){let[o,s]=a(r([...e,...t],`name`),i),c=(e,t)=>e.name.localeCompare(t.name);return[...s.sort(c),...o.sort(c)]}var c=e((()=>{o(),n(),t()}));export{s as n,c as t};
@@ -1 +0,0 @@
1
- import{r as e,t}from"./trustedDevice-B0x9X0fb.js";export{t as clearTrustedDeviceToken,e as enrollTrustedDevice};
@@ -1,12 +0,0 @@
1
- import{m as e,r as t}from"./git-BerW9bId.js";import{join as n}from"path";import{readFileSync as r}from"fs";import{spawnSync as i}from"child_process";e();async function a(){let e=process.cwd(),a=t(e),s=a?[a,e]:[e],c=null;for(let e of s){let t=n(e,`CLAUDE.md`);try{if(c=o(r(t,`utf-8`)),c){console.log(`Found "# claude up" in ${t}`);break}}catch{}}if(!c){console.log(`No "# claude up" section found in CLAUDE.md.
2
- Add a section like:
3
-
4
- # claude up
5
- \`\`\`bash
6
- npm install
7
- npm run build
8
- \`\`\``);return}console.log(`Running:
9
- `),console.log(c),console.log();let l=i(`bash`,[`-c`,c],{cwd:e,stdio:`inherit`});l.status===0?console.log(`
10
- claude up completed successfully.`):(console.error(`\nclaude up failed with exit code ${l.status}`),process.exitCode=l.status??1)}function o(e){let t=e.split(`
11
- `),n=!1,r=[];for(let e of t){if(/^#\s+claude\s+up\b/i.test(e)){n=!0;continue}if(n&&/^#\s/.test(e))break;n&&r.push(e)}if(r.length===0)return null;let i=r.join(`
12
- `).trim();return i=i.replace(/^```\w*\n?/,``).replace(/\n?```\s*$/,``),i.trim()||null}export{a as up};
@@ -1,11 +0,0 @@
1
- import{di as e,ui as t}from"./src-CDCSSo0U2.js";import{Jm as n,Km as r}from"./loadAgentsDir-ByO8eJqU.js";import{a as i,l as a}from"./debug-RZ4NuXyS.js";import{n as o,o as s}from"./process-gEbdy6uY.js";import{n as c,r as l}from"./execFileNoThrow-CCX-JY8h.js";import{l as u,u as d}from"./ripgrep-gaT9Njwi.js";import{join as f}from"node:path";import{execSync as p}from"node:child_process";import{existsSync as m,readFileSync as h}from"node:fs";import{homedir as g}from"node:os";e(),i(),d(),l(),n(),o();var _=`@readmagic/workmate`;function v(){try{let e=f(u,`..`,`package.json`);if(m(e)){let t=JSON.parse(h(e,`utf-8`));if(t.version)return t.version}}catch{}return`0.0.8`}function y(e){try{return p(`which ${e} 2>/dev/null`,{stdio:`pipe`}),!0}catch{return!1}}function b(){return!!(process.execPath.includes(`bun`)||m(f(f(g(),`.bun`,`install`,`global`),`node_modules`,_)))}async function x(){let e=await c(`npm`,[`view`,`${_}@latest`,`version`,`--prefer-online`],{abortSignal:AbortSignal.timeout(1e4),cwd:g()});return e.code===0?e.stdout.trim():(a(`npm view failed: ${e.stderr}`),null)}function S(e,t){let n=e=>e.replace(/^\D/,``).split(`.`).map(Number),r=n(e),i=n(t);for(let e=0;e<3;e++){if((r[e]??0)>(i[e]??0))return!0;if((r[e]??0)<(i[e]??0))return!1}return!0}async function C(){let e=v();s(`Current version: ${e}\n`);let n=y(`bun`),i=b()&&n?`bun`:`npm`;s(`Package manager: ${i}\n`),s(`Checking for updates...
2
- `);let a=await x();if(!a){process.stderr.write(t.red(`Failed to check for updates`)+`
3
- `),process.stderr.write(`Unable to fetch latest version from npm registry.
4
- `),await r(1);return}if(a===e||S(e,a)){s(t.green(`ccb is up to date (${e})`)+`
5
- `),await r(0);return}s(`New version available: ${a} (current: ${e})\n`),s(`Installing update via ${i}...\n`);try{p(i===`bun`?`bun install -g ${_}@latest`:`npm install -g ${_}@latest`,{stdio:`inherit`,cwd:g(),timeout:12e4}),s(t.green(`Successfully updated from ${e} to ${a}`)+`
6
- `)}catch(e){process.stderr.write(t.red(`Update failed`)+`
7
- `),process.stderr.write(`${e}\n`),process.stderr.write(`
8
- `),process.stderr.write(`Try manually updating with:
9
- `),i===`bun`?process.stderr.write(t.bold(` bun install -g ${_}@latest`)+`
10
- `):process.stderr.write(t.bold(` npm install -g ${_}@latest`)+`
11
- `),await r(1)}await r(0)}export{C as updateCCB};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as n,et as r,fi as i,t as a,vt as o}from"./src-CDCSSo0U2.js";import{Pw as s,dm as c}from"./loadAgentsDir-ByO8eJqU.js";function l(e,t,n,i=!0){let{exit:a}=o(),[s,c]=(0,u.useState)({pending:!1,keyName:null}),l=(0,u.useMemo)(()=>n??a,[n,a]),d=r(e=>c({pending:e,keyName:`Ctrl-C`}),l),f=r(e=>c({pending:e,keyName:`Ctrl-D`}),l),p=(0,u.useCallback)(()=>{t?.()||d()},[d,t]),m=(0,u.useCallback)(()=>{f()},[f]);return e((0,u.useMemo)(()=>({"app:interrupt":p,"app:exit":m}),[p,m]),{context:`Global`,isActive:i}),s}var u,d=e((()=>{u=t(i(),1),a(),c()}));function f(e,t,r){return l(n,t,e,r)}var p=e((()=>{s(),d()}));export{f as n,p as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_v as t,vv as n}from"./loadAgentsDir-ByO8eJqU.js";import{C as r,_ as i,s as a}from"./model-CwO-g1RW.js";function o(){let e=n(e=>e.mainLoopModel);return r(n(e=>e.mainLoopModelForSession)??e??a())}var s=e((()=>{t(),i()}));export{o as n,s as t};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{Cd as n,Cg as r,Do as i,Gm as a,Is as o,Ls as s,Oo as c,Rs as l,Wm as u,_v as d,bv as f,ew as p,tw as m,vv as h,wd as g,wg as _,xd as v,yd as y,zs as b}from"./loadAgentsDir-ByO8eJqU.js";import{W as x,a as S,l as C,z as w}from"./debug-RZ4NuXyS.js";import{In as T,Ln as E}from"./settings-hQDLwPVj.js";import{O as D,k as O}from"./git-BerW9bId.js";import{o as k,s as A}from"./log-CZ0zYP_c.js";import{n as j,r as M}from"./analytics-CkYUHW_U.js";import{n as N,r as P}from"./pluginFlagging-pBxSselw.js";import{t as F}from"./pluginBlocklist-PwHHD3nj.js";var I=e(t(),1);u(),j(),y(),d(),E(),S(),D(),w(),k(),l(),s(),r(),n(),p(),P(),i();function L({enabled:e=!0}={}){let t=f(),n=h(e=>e.plugins.needsRefresh),{addNotification:r}=a(),i=(0,I.useCallback)(async()=>{try{let{enabled:e,disabled:n,errors:i}=await c();await F();let a=N();Object.keys(a).length>0&&r({key:`plugin-delisted-flagged`,text:`Plugins flagged. Check /plugins`,color:`warning`,priority:`high`});let s=[],l=[];try{s=await o()}catch(e){let t=e instanceof Error?e.message:String(e);i.push({type:`generic-error`,source:`plugin-commands`,error:`Failed to load plugin commands: ${t}`})}try{l=await b()}catch(e){let t=e instanceof Error?e.message:String(e);i.push({type:`generic-error`,source:`plugin-agents`,error:`Failed to load plugin agents: ${t}`})}try{await _()}catch(e){let t=e instanceof Error?e.message:String(e);i.push({type:`generic-error`,source:`plugin-hooks`,error:`Failed to load plugin hooks: ${t}`})}let u=(await Promise.all(e.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await m(e,i);return t&&(e.mcpServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0),d=(await Promise.all(e.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await g(e,i);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0);v(),t(t=>{let r=t.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),a=new Set(i.map(e=>e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`)),o=[...r.filter(e=>{let t=e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`;return!a.has(t)}),...i];return{...t,plugins:{...t.plugins,enabled:e,disabled:n,commands:s,errors:o}}}),C(`Loaded plugins - Enabled: ${e.length}, Disabled: ${n.length}, Commands: ${s.length}, Agents: ${l.length}, Errors: ${i.length}`);let f=e.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return{enabled_count:e.length,disabled_count:n.length,inline_count:T(e,e=>e.source.endsWith(`@inline`)),marketplace_count:T(e,e=>!e.source.endsWith(`@inline`)),error_count:i.length,skill_count:s.length,agent_count:l.length,hook_count:f,mcp_count:u,lsp_count:d,ant_enabled_names:process.env.USER_TYPE===`ant`&&e.length>0?e.map(e=>e.name).sort().join(`,`):void 0}}catch(e){let n=x(e);return A(n),C(`Error loading plugins: ${e}`),t(e=>{let t=e.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r={type:`generic-error`,source:`plugin-system`,error:n.message};return{...e,plugins:{...e.plugins,enabled:[],disabled:[],commands:[],errors:[...t,r]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[t,r]);(0,I.useEffect)(()=>{e&&i().then(e=>{let{ant_enabled_names:t,...n}=e,r={...n,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};M(`tengu_plugins_loaded`,{...r,...t!==void 0&&{enabled_names:t}}),O(`info`,`tengu_plugins_loaded`,r)})},[i,e]),(0,I.useEffect)(()=>{!e||!n||r({key:`plugin-reload-pending`,text:`Plugins changed. Run /reload-plugins to activate.`,color:`suggestion`,priority:`low`})},[e,n,r])}export{L as t};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as n}from"./src-CDCSSo0U2.js";import{dl as r,hl as i}from"./loadAgentsDir-ByO8eJqU.js";import{n as a,t as o}from"./toolPool-B7SIoDw5.js";function s(e,t,n){return(0,c.useMemo)(()=>a(e,r(n,t),n.mode),[e,t,n,!1,!1])}var c,l=e((()=>{c=t(n(),1),i(),o()}));export{s as n,l as t};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Vn as n,fi as r,hn as i,ot as a,t as o}from"./src-CDCSSo0U2.js";import{Cm as s,Sm as c,bm as l,fm as u,mm as d,pm as f,vm as p,xm as m,xw as h,ym as g}from"./loadAgentsDir-ByO8eJqU.js";function _(e){return!!(e.ctrl&&(e.key===`k`||e.key===`u`||e.key===`w`)||e.meta&&e.key===`backspace`)}function v(e){return(e.ctrl||e.meta)&&e.key===`y`}function y({isActive:e,onExit:t,onCancel:r,onExitUp:o,columns:d,passthroughCtrlKeys:h=[],initialQuery:y=``,backspaceExitsOnEmpty:S=!0}){let{columns:C}=a(),w=d??C,[T,E]=(0,b.useState)(y),[D,O]=(0,b.useState)(y.length),k=(0,b.useCallback)(e=>{E(e),O(e.length)},[]),A=n=>{if(!e)return;let i=u.fromText(T,w,D);if(!(n.ctrl&&h.includes(n.key.toLowerCase()))){if(_(n)||l(),v(n)||m(),n.key===`return`||n.key===`down`){n.preventDefault(),t();return}if(n.key===`up`){n.preventDefault(),o&&o();return}if(n.key===`escape`){n.preventDefault(),r?r():T.length>0?(E(``),O(0)):t();return}if(n.key===`backspace`){if(n.preventDefault(),n.meta){let{cursor:e,killed:t}=i.deleteWordBefore();p(t,`prepend`),E(e.text),O(e.offset);return}if(T.length===0){S&&(r??t)();return}let e=i.backspace();E(e.text),O(e.offset);return}if(n.key===`delete`){n.preventDefault();let e=i.del();E(e.text),O(e.offset);return}if(n.key===`left`&&(n.ctrl||n.meta||n.fn)){n.preventDefault();let e=i.prevWord();O(e.offset);return}if(n.key===`right`&&(n.ctrl||n.meta||n.fn)){n.preventDefault();let e=i.nextWord();O(e.offset);return}if(n.key===`left`){n.preventDefault();let e=i.left();O(e.offset);return}if(n.key===`right`){n.preventDefault();let e=i.right();O(e.offset);return}if(n.key===`home`){n.preventDefault(),O(0);return}if(n.key===`end`){n.preventDefault(),O(T.length);return}if(n.ctrl){switch(n.preventDefault(),n.key.toLowerCase()){case`a`:O(0);return;case`e`:O(T.length);return;case`b`:O(i.left().offset);return;case`f`:O(i.right().offset);return;case`d`:{if(T.length===0){(r??t)();return}let e=i.del();E(e.text),O(e.offset);return}case`h`:{if(T.length===0){S&&(r??t)();return}let e=i.backspace();E(e.text),O(e.offset);return}case`k`:{let{cursor:e,killed:t}=i.deleteToLineEnd();p(t,`append`),E(e.text),O(e.offset);return}case`u`:{let{cursor:e,killed:t}=i.deleteToLineStart();p(t,`prepend`),E(e.text),O(e.offset);return}case`w`:{let{cursor:e,killed:t}=i.deleteWordBefore();p(t,`prepend`),E(e.text),O(e.offset);return}case`y`:{let e=f();if(e.length>0){let t=i.offset,n=i.insert(e);g(t,e.length),E(n.text),O(n.offset)}return}case`g`:case`c`:if(r){r();return}}return}if(n.meta){switch(n.preventDefault(),n.key.toLowerCase()){case`b`:O(i.prevWord().offset);return;case`f`:O(i.nextWord().offset);return;case`d`:{let e=i.deleteWordAfter();E(e.text),O(e.offset);return}case`y`:{let e=s();if(e){let{text:t,start:n,length:r}=e,i=T.slice(0,n),a=T.slice(n+r),o=i+t+a,s=n+t.length;c(t.length),E(o),O(s)}return}}return}if(n.key!==`tab`&&n.key.length>=1&&!x.has(n.key)){n.preventDefault();let e=i.insert(n.key);E(e.text),O(e.offset)}}};return i((e,t,r)=>{A(new n(r.keypress))},{isActive:e}),{query:T,setQuery:k,cursorOffset:D,handleKeyDown:A}}var b,x,S=e((()=>{b=t(r(),1),o(),d(),h(),x=new Set([`pageup`,`pagedown`,`insert`,`wheelup`,`wheeldown`,`mouse`,`f1`,`f2`,`f3`,`f4`,`f5`,`f6`,`f7`,`f8`,`f9`,`f10`,`f11`,`f12`])}));export{y as n,S as t};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as n}from"./src-CDCSSo0U2.js";import{$t as r,B as i}from"./state-C2OSZkV1.js";import{Dv as a,Ev as o,Gm as s,Wm as c}from"./loadAgentsDir-ByO8eJqU.js";import{n as l,t as u}from"./allErrors-BPn_2TrB.js";function d(){let{addNotification:e,removeNotification:t}=s(),[n,r]=(0,f.useState)(()=>{let{errors:e}=u();return e});return a((0,f.useCallback)(()=>{let{errors:e}=u();r(e)},[])),(0,f.useEffect)(()=>{if(!i())if(n.length>0){let t=`Found ${n.length} settings ${n.length===1?`issue`:`issues`} · /doctor for details`;e({key:p,text:t,color:`warning`,priority:`high`,timeoutMs:6e4})}else t(p)},[n,e,t]),n}var f,p,m=e((()=>{f=t(n(),1),c(),r(),l(),o(),p=`settings-errors`}));export{d as n,m as t};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,fi as r,t as i}from"./src-CDCSSo0U2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{_v as o,gv as s,op as c,sp as l}from"./loadAgentsDir-ByO8eJqU.js";import{n as u,r as d}from"./analytics-CkYUHW_U.js";import{Bt as f,Ht as p}from"./model-CwO-g1RW.js";import{t as m}from"./WelcomeV2-Ci9VwPYh.js";import{t as h}from"./useManagePlugins-DtbY_vPL.js";import{n as g,t as _}from"./MCPConnectionManager-ao-P3xSA.js";import{n as v}from"./onChangeAppState-BmfM5g-D.js";import{cwd as y}from"process";var b=e(r(),1);i(),l(),u(),g(),o(),f();var x=a();async function S(e){d(`tengu_setup_token_command`,{});let r=!p(),{ConsoleOAuthFlow:i}=await import(`./ConsoleOAuthFlow-BeQXqUtX.js`);await new Promise(a=>{e.render((0,x.jsx)(s,{onChangeAppState:v,children:(0,x.jsx)(c,{children:(0,x.jsxs)(t,{flexDirection:`column`,gap:1,children:[(0,x.jsx)(m,{}),r&&(0,x.jsxs)(t,{flexDirection:`column`,children:[(0,x.jsx)(n,{color:`warning`,children:`Warning: You already have authentication configured via environment variable or API key helper.`}),(0,x.jsx)(n,{color:`warning`,children:`The setup-token command will create a new OAuth token which you can use instead.`})]}),(0,x.jsx)(i,{onDone:()=>{a()}})]})})}))}),e.unmount(),process.exit(0)}var C=b.lazy(()=>import(`./Doctor-B9Rxsoy0.js`).then(e=>({default:e.Doctor})));function w({onDone:e}){return h(),(0,x.jsx)(b.Suspense,{fallback:null,children:(0,x.jsx)(C,{onDone:e})})}async function T(e){d(`tengu_doctor_command`,{}),await new Promise(t=>{e.render((0,x.jsx)(s,{children:(0,x.jsx)(c,{children:(0,x.jsx)(_,{dynamicMcpConfig:void 0,isStrictMcpConfig:!1,children:(0,x.jsx)(w,{onDone:()=>{t()}})})})}))}),e.unmount(),process.exit(0)}async function E(e,t){let{setup:n}=await import(`./setup-DzC22EkN.js`);await n(y(),`default`,!1,!1,void 0,!1);let{install:r}=await import(`./install-BI---dv0.js`);await new Promise(n=>{let i=[];e&&i.push(e),t.force&&i.push(`--force`),r.call(e=>{n(),process.exit(+!!e.includes(`failed`))},{},i)})}export{T as doctorHandler,E as installHandler,S as setupTokenHandler};