claude-code-best 2.7.0 → 2.7.2

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 (887) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-V2tF7iCY.js +1 -0
  2. package/dist/chunks/App-DLdRpU7c.js +1 -0
  3. package/dist/chunks/ApproveApiKey-B7_TCGwt.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DPws3jax.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-D6rS0OVe.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-hGlbm5z5.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-CuEpdRVd.js +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-CTTKMRbt.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-B-GkVoA_.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-DxJK9NiM.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-LPZ97jsm.js +1 -0
  12. package/dist/chunks/DesktopHandoff-BjPylhOT.js +1 -0
  13. package/dist/chunks/DevChannelsDialog-c4YVqBX9.js +1 -0
  14. package/dist/chunks/DiffDialog-I5wuXw2C.js +3 -0
  15. package/dist/chunks/Doctor-Cr_MlSPc.js +3 -0
  16. package/dist/chunks/Doctor-hgf3dMAW.js +1 -0
  17. package/dist/chunks/ExitFlow-Bz5grDWv.js +2 -0
  18. package/dist/chunks/Feedback-COgMI5tY.js +2 -0
  19. package/dist/chunks/Grove-Bwmghb-e.js +1 -0
  20. package/dist/chunks/Grove-m57x4tY1.js +11 -0
  21. package/dist/chunks/HybridTransport-Bok4-Ptt.js +4 -0
  22. package/dist/chunks/ITermBackend-BBSP-NNa.js +1 -0
  23. package/dist/chunks/InvalidConfigDialog-uTSuSBvO.js +1 -0
  24. package/dist/chunks/InvalidSettingsDialog-B-Os12-H.js +1 -0
  25. package/dist/chunks/MCPConnectionManager-y97Inszc.js +1 -0
  26. package/dist/chunks/McpParsingWarnings-DMFUZw92.js +1 -0
  27. package/dist/chunks/MessageSelector-DwdAC2io.js +3 -0
  28. package/dist/chunks/Messages-FEBcX-cT.js +11 -0
  29. package/dist/chunks/Onboarding-B8qMJaBh.js +1 -0
  30. package/dist/chunks/OverageCreditUpsell-DnFv5z-z.js +1 -0
  31. package/dist/chunks/PluginSettings-B_xVgTTp.js +17 -0
  32. package/dist/chunks/PromptInputFooterSuggestions-DhIQ0Nge.js +1 -0
  33. package/dist/chunks/PromptInputHelpMenu-CoMkWchC.js +1 -0
  34. package/dist/chunks/QueryEngine-C7r7O-hH.js +1 -0
  35. package/dist/chunks/REPL-CmJdJrGO.js +147 -0
  36. package/dist/chunks/REPL-nP7H_-qa.js +1 -0
  37. package/dist/chunks/RemoteCallout-4JOZROfT.js +1 -0
  38. package/dist/chunks/RemoteSessionManager-jcPnywfY.js +2 -0
  39. package/dist/chunks/ResumeConversation-CZ2Uedkf.js +1 -0
  40. package/dist/chunks/SSETransport-kEH_p4Yq.js +4 -0
  41. package/dist/chunks/SearchExtraToolsTool-C64oVFUD.js +1 -0
  42. package/dist/chunks/SentryErrorBoundary-2E2qGV11.js +1 -0
  43. package/dist/chunks/SentryErrorBoundary-97iY7Nb7.js +2 -0
  44. package/dist/chunks/Settings-CuljH0mu.js +2 -0
  45. package/dist/chunks/TeleportProgress-Ctdqi7iS.js +1 -0
  46. package/dist/chunks/TeleportRepoMismatchDialog-DyTBg1YD.js +1 -0
  47. package/dist/chunks/TeleportResumeWrapper-B66clYsG.js +1 -0
  48. package/dist/chunks/ThemePicker-WKmYvrqz.js +1 -0
  49. package/dist/chunks/TmuxBackend-OKX2NP14.js +9 -0
  50. package/dist/chunks/TrustDialog-0anSIf-G.js +1 -0
  51. package/dist/chunks/TungstenTool-B40YHYXC.js +1 -0
  52. package/dist/chunks/ValidationErrorsList-CfgC1KJb.js +2 -0
  53. package/dist/chunks/WelcomeV2-BMHXiNt3.js +1 -0
  54. package/dist/chunks/WindowsTerminalBackend-fCSGVe4W.js +2 -0
  55. package/dist/chunks/add-dir-CMtuW667.js +1 -0
  56. package/dist/chunks/agentDisplay-CgYKW3G7.js +1 -0
  57. package/dist/chunks/agents-CdqcGm9o.js +103 -0
  58. package/dist/chunks/agents-D90TsYOf.js +2 -0
  59. package/dist/chunks/ant-DZjimiuz.js +1 -0
  60. package/dist/chunks/api-CQWbpxLP.js +1 -0
  61. package/dist/chunks/api-quOYYOhi.js +1 -0
  62. package/dist/chunks/asciicast-C_1Pi99k.js +4 -0
  63. package/dist/chunks/asciicast-DA6TudSH.js +1 -0
  64. package/dist/chunks/assistant-B5_xx00q.js +1 -0
  65. package/dist/chunks/assistant-CEmC_DlU.js +1 -0
  66. package/dist/chunks/assistant-CyVcFPIR.js +1 -0
  67. package/dist/chunks/auth-CjtaiRtF.js +1 -0
  68. package/dist/chunks/auth-DsQEVs9W.js +1 -0
  69. package/dist/chunks/autoMode-DEbM9UaE.js +45 -0
  70. package/dist/chunks/autonomy-Clap6Swl.js +1 -0
  71. package/dist/chunks/autonomy-lNpGnyiu.js +19 -0
  72. package/dist/chunks/autonomyPanel-BqEvfI0e.js +1 -0
  73. package/dist/chunks/backgroundHousekeeping-D-jt-ocx.js +1 -0
  74. package/dist/chunks/backgroundHousekeeping-KvOpP_4M.js +17 -0
  75. package/dist/chunks/banner-D9Cq292T.js +2 -0
  76. package/dist/chunks/bg-CngkAkgc.js +1 -0
  77. package/dist/chunks/bg-DgpgS_VU.js +9 -0
  78. package/dist/chunks/branch-CSYB04xC.js +3 -0
  79. package/dist/chunks/break-cache-DrIa8RdW.js +8 -0
  80. package/dist/chunks/bridge-DDgASypO.js +2 -0
  81. package/dist/chunks/bridgeConfig-BdZVEqhx.js +1 -0
  82. package/dist/chunks/bridgeConfig-DjC4oig1.js +1 -0
  83. package/dist/chunks/bridgeEnabled-Csn6Ym3k.js +1 -0
  84. package/dist/chunks/bridgeEnabled-DLRIH243.js +1 -0
  85. package/dist/chunks/bridgeMain-B5wsmwkN.js +68 -0
  86. package/dist/chunks/bridgeMain-BN0Sag35.js +1 -0
  87. package/dist/chunks/bridgeMessaging-ChOzzVWj.js +1 -0
  88. package/dist/chunks/bridgePointer-Clcvh52n.js +1 -0
  89. package/dist/chunks/browser-Bt-ckCaU.js +1 -0
  90. package/dist/chunks/btw-BgjcOoeo.js +1 -0
  91. package/dist/chunks/buddy-C1wE3noR.js +3 -0
  92. package/dist/chunks/bypassPermissionsKillswitch-C0diGLRB.js +1 -0
  93. package/dist/chunks/caches-CIoVGP24.js +3 -0
  94. package/dist/chunks/caches-DMYdTEAr.js +1 -0
  95. package/dist/chunks/ccrClient-C1msT1E3.js +1 -0
  96. package/dist/chunks/changeDetector-DoOBZOt1.js +1 -0
  97. package/dist/chunks/channelNotification-CWlu9ZWs.js +1 -0
  98. package/dist/chunks/channelNotification-oZ6vG5R5.js +1 -0
  99. package/dist/chunks/chrome-Bo9uNZ7s.js +1 -0
  100. package/dist/chunks/chromeNativeHost-BldB1Zzi.js +1 -0
  101. package/dist/chunks/claudeDesktop-BqTW_pbB.js +1 -0
  102. package/dist/chunks/cleanup-rCLlo4w8.js +1 -0
  103. package/dist/chunks/clear-BxdX_MUP.js +1 -0
  104. package/dist/chunks/cliLaunch-Citfs01Q.js +1 -0
  105. package/dist/chunks/client-BSoJ_vaA.js +1 -0
  106. package/dist/chunks/color-CkzktPHt.js +1 -0
  107. package/dist/chunks/commands-hyVX9-Lh.js +1 -0
  108. package/dist/chunks/commitAttribution-BwT0TbYF.js +1 -0
  109. package/dist/chunks/commitAttribution-csu3NO7Y.js +2 -0
  110. package/dist/chunks/common-Bi4yZBkh.js +1 -0
  111. package/dist/chunks/common-Da57Qwms.js +1 -0
  112. package/dist/chunks/common-NEOWMwtB.js +1 -0
  113. package/dist/chunks/compact-DNGIVZRN.js +3 -0
  114. package/dist/chunks/companion-Diuav3lA.js +1 -0
  115. package/dist/chunks/completionCache-BQgiR45Q.js +1 -0
  116. package/dist/chunks/completionCache-C7hDqIDL.js +4 -0
  117. package/dist/chunks/config-B25IrkTA.js +1 -0
  118. package/dist/chunks/config-ODoYZY8i.js +1 -0
  119. package/dist/chunks/context-CZ5enuPE.js +1 -0
  120. package/dist/chunks/context-noninteractive-62P5EnN5.js +54 -0
  121. package/dist/chunks/context-noninteractive-CjuzL9q5.js +1 -0
  122. package/dist/chunks/conversation-DyhWeHw2.js +1 -0
  123. package/dist/chunks/conversation-uY-V0SNK.js +1 -0
  124. package/dist/chunks/copy-9JLr2-Xs.js +7 -0
  125. package/dist/chunks/createSSHSession-B1hTuDpB.js +6 -0
  126. package/dist/chunks/createSession-Qurw-N4x.js +1 -0
  127. package/dist/chunks/createSession-fzjzy0aS.js +1 -0
  128. package/dist/chunks/cron-DwR6OJuW.js +1 -0
  129. package/dist/chunks/cronJitterConfig-9OmmYmIT.js +6 -0
  130. package/dist/chunks/crossProjectResume-B6efoIur.js +40 -0
  131. package/dist/chunks/daemon-BRKR4D1D.js +2 -0
  132. package/dist/chunks/datadog-C-llbwzP.js +1 -0
  133. package/dist/chunks/datadog-SSxsxcC-.js +1 -0
  134. package/dist/chunks/desktop-CQnMcbex.js +1 -0
  135. package/dist/chunks/detached-C_2ZXr7X.js +5 -0
  136. package/dist/chunks/detectRepository-2ICvGD0U.js +1 -0
  137. package/dist/chunks/detectRepository-BLwSmun2.js +1 -0
  138. package/dist/chunks/detection-0mMj--Bt.js +1 -0
  139. package/dist/chunks/detection-95TCHkW8.js +1 -0
  140. package/dist/chunks/diff-uAwKYa51.js +1 -0
  141. package/dist/chunks/directoryCompletion-DqtWZsoW.js +1 -0
  142. package/dist/chunks/doctor-CBF0fkBF.js +1 -0
  143. package/dist/chunks/earlyInput-CFYRGxau.js +2 -0
  144. package/dist/chunks/earlyInput-D3OhUZ4G.js +1 -0
  145. package/dist/chunks/effort-F-bhAM2u.js +9 -0
  146. package/dist/chunks/entry-DHN_Gr1b.js +14 -0
  147. package/dist/chunks/env-C2A9gV_G.js +1 -0
  148. package/dist/chunks/envLessBridgeConfig-CDVtIEWT.js +1 -0
  149. package/dist/chunks/envLessBridgeConfig-Dg0hNsdi.js +1 -0
  150. package/dist/chunks/execFileNoThrow-azCkYhmF.js +1 -0
  151. package/dist/chunks/executor-BVh1PTF-.js +1561 -0
  152. package/dist/chunks/executor-CvTuHx-k.js +1 -0
  153. package/dist/chunks/exit-CqcvZJwI.js +1 -0
  154. package/dist/chunks/export-c6WoGlsG.js +2 -0
  155. package/dist/chunks/exportRenderer-CaegIP5N.js +1 -0
  156. package/dist/chunks/extra-usage-Cj8fokgc.js +1 -0
  157. package/dist/chunks/extra-usage-Dk-wcvAu.js +1 -0
  158. package/dist/chunks/extra-usage-core-sHzc4eE1.js +1 -0
  159. package/dist/chunks/extra-usage-noninteractive-D0kqrqsg.js +1 -0
  160. package/dist/chunks/extraUsage-CbkqfG1U.js +1 -0
  161. package/dist/chunks/extractMemories-BP8Opsbp.js +1 -0
  162. package/dist/chunks/fast-DS3iQ1CH.js +1 -0
  163. package/dist/chunks/fast-DklfqySb.js +1 -0
  164. package/dist/chunks/featureCheck-CUJ2rPM6.js +1 -0
  165. package/dist/chunks/feedback-QJynmG5q.js +1 -0
  166. package/dist/chunks/fileStateCache-BhVfo23e.js +1 -0
  167. package/dist/chunks/files-Bdr_PQyV.js +2 -0
  168. package/dist/chunks/findExecutable-BHQl4NaS.js +1 -0
  169. package/dist/chunks/firstPartyEventLogger-DlW8BUXq.js +1 -0
  170. package/dist/chunks/flushGate-CK5B9-Zn.js +1 -0
  171. package/dist/chunks/gates-6amRNsYl.js +1 -0
  172. package/dist/chunks/gates-vlrMjO-X.js +1 -0
  173. package/dist/chunks/gemini-B5ZRjDrh.js +1 -0
  174. package/dist/chunks/generateRecap-SgRMdsyN.js +1 -0
  175. package/dist/chunks/generateSessionName-sZFzpwsq.js +1 -0
  176. package/dist/chunks/genericProcessUtils-tJxf3yqB.js +23 -0
  177. package/dist/chunks/git-C0IuvuIy.js +6 -0
  178. package/dist/chunks/git-hSvFiuiG.js +1 -0
  179. package/dist/chunks/githubRepoPathMapping-DUGvTwPB.js +1 -0
  180. package/dist/chunks/goal-Dy-GGn9r.js +3 -0
  181. package/dist/chunks/grok-BG4_buNt.js +1 -0
  182. package/dist/chunks/growthbook-Br1dDRtd.js +1 -0
  183. package/dist/chunks/heapdump-B9PVKMxa.js +5 -0
  184. package/dist/chunks/help-BfWF7xij.js +1 -0
  185. package/dist/chunks/hooks-BVrhxysz.js +1 -0
  186. package/dist/chunks/hooks-KK32pxq3.js +79 -0
  187. package/dist/chunks/hostAdapter-TBJav3vX.js +1 -0
  188. package/dist/chunks/hostGuard-DSOEyH-P.js +1 -0
  189. package/dist/chunks/ide-BU1A79BE.js +2 -0
  190. package/dist/chunks/inboundAttachments-D4tBPCB8.js +1 -0
  191. package/dist/chunks/inboundAttachments-DWJplT9p.js +1 -0
  192. package/dist/chunks/initReplBridge-99sUBVEk.js +1 -0
  193. package/dist/chunks/insights-lDHodCMG.js +822 -0
  194. package/dist/chunks/install-Bg4ZgW81.js +1 -0
  195. package/dist/chunks/install-github-app-RLbUq5EL.js +147 -0
  196. package/dist/chunks/install-slack-app-CHmIwsbm.js +1 -0
  197. package/dist/chunks/instrumentation-BCiV3SKX.js +12 -0
  198. package/dist/chunks/job-xOGf0j5Q.js +2 -0
  199. package/dist/chunks/jwtUtils-BQXXBwqW.js +1 -0
  200. package/dist/chunks/keybindings-DMbReZ4p.js +2 -0
  201. package/dist/chunks/lang-A6LUGP_7.js +1 -0
  202. package/dist/chunks/language-Bzp5KDCE.js +1 -0
  203. package/dist/chunks/language-CGfURU2y.js +1 -0
  204. package/dist/chunks/launchAgentsPlatform-Dbpm7Jyo.js +1 -0
  205. package/dist/chunks/launchAutofixPr-RZfqx5eM.js +18 -0
  206. package/dist/chunks/launchLocalMemory-DIntbsvg.js +3 -0
  207. package/dist/chunks/launchLocalVault-CCUw0ayu.js +3 -0
  208. package/dist/chunks/launchMemoryStores-QJTh8KSP.js +1 -0
  209. package/dist/chunks/launchOnboarding--Pe30AYd.js +8 -0
  210. package/dist/chunks/launchSchedule-DjN1RbRX.js +1 -0
  211. package/dist/chunks/launchSkillStore-CcKmVDz1.js +1 -0
  212. package/dist/chunks/launchTeleport-BKlEo0yF.js +3 -0
  213. package/dist/chunks/launchVault-C7UHA-IG.js +1 -0
  214. package/dist/chunks/loadAgentsDir-ClTeo0nk.js +4697 -0
  215. package/dist/chunks/loadAgentsDir-CshktEpX.js +1 -0
  216. package/dist/chunks/loadPluginHooks-DVZmzYLl.js +1 -0
  217. package/dist/chunks/localSearch-BtLNJRij.js +1 -0
  218. package/dist/chunks/localSearch-Koc8naSr.js +1 -0
  219. package/dist/chunks/log-DSV4Ht5l.js +1 -0
  220. package/dist/chunks/login-BngE89_j.js +1 -0
  221. package/dist/chunks/login-C3MZQTDL.js +1 -0
  222. package/dist/chunks/logoV2Utils-DAIIwt5R.js +1 -0
  223. package/dist/chunks/logout-CXZBaUen.js +1 -0
  224. package/dist/chunks/magicDocs-C_inI3JJ.js +57 -0
  225. package/dist/chunks/main-CfkIGrBF.js +31 -0
  226. package/dist/chunks/main-qqcmncHA.js +1312 -0
  227. package/dist/chunks/mappers-7BSMbYvH.js +1 -0
  228. package/dist/chunks/mcp-DRBiobrN.js +2 -0
  229. package/dist/chunks/mcp-DV8Prhgi.js +1 -0
  230. package/dist/chunks/mcp-HQ8-nEZ1.js +6 -0
  231. package/dist/chunks/mcpServer-CLIYAgGs.js +1 -0
  232. package/dist/chunks/mcpServer-DS0yRfcu.js +1 -0
  233. package/dist/chunks/memoize-DJ1XCN-z.js +1 -0
  234. package/dist/chunks/memory-Cz_JaFLF.js +1 -0
  235. package/dist/chunks/mobile-BMglW1NB.js +2 -0
  236. package/dist/chunks/mode-Kx0kSZkr.js +2 -0
  237. package/dist/chunks/model-Bwvn_acH.js +1 -0
  238. package/dist/chunks/model-CNXtfiLg.js +1 -0
  239. package/dist/chunks/onChangeAppState-C4ic-Mib.js +1 -0
  240. package/dist/chunks/openai-CGGSfpPh.js +10 -0
  241. package/dist/chunks/overageCreditGrant-BqW_6R5v.js +1 -0
  242. package/dist/chunks/panel-BYfvo_mR.js +1 -0
  243. package/dist/chunks/panel-D3wvAEFE.js +1 -0
  244. package/dist/chunks/panelCall-DgPjuhQf.js +1 -0
  245. package/dist/chunks/parser-DGXE1uWd.js +1 -0
  246. package/dist/chunks/passes-sYE91Vtr.js +1 -0
  247. package/dist/chunks/path-BE28AJwZ.js +1 -0
  248. package/dist/chunks/paths-DO4WOQtD.js +36 -0
  249. package/dist/chunks/permissions-BE-1pIly.js +1 -0
  250. package/dist/chunks/permissions-BPerbf1I.js +3 -0
  251. package/dist/chunks/pipeTransport-CW9zF_UN.js +1 -0
  252. package/dist/chunks/plan-CDKBVRw6.js +1 -0
  253. package/dist/chunks/platform-mh9ypxS8.js +2 -0
  254. package/dist/chunks/plugin-C6US4b8W.js +1 -0
  255. package/dist/chunks/pluginAutoupdate-BQKtcAhC.js +1 -0
  256. package/dist/chunks/pluginBlocklist-B8DKXi0i.js +1 -0
  257. package/dist/chunks/pluginCliCommands-DWCeXYTl.js +1 -0
  258. package/dist/chunks/pluginFlagging-DFMlWw2P.js +1 -0
  259. package/dist/chunks/pluginOperations-CKmwDC3G.js +2 -0
  260. package/dist/chunks/pluginStartupCheck-D6IbyWKe.js +1 -0
  261. package/dist/chunks/pluginStartupCheck-cYnLsWOs.js +1 -0
  262. package/dist/chunks/plugins-BwZIRMh_.js +4 -0
  263. package/dist/chunks/policyLimits-CFLBtFh3.js +1 -0
  264. package/dist/chunks/pollConfig-C3NjXYFc.js +1 -0
  265. package/dist/chunks/poller-BA1jhG3F.js +1 -0
  266. package/dist/chunks/poor-BHhbua95.js +1 -0
  267. package/dist/chunks/poorMode-CCK7Ek5w.js +1 -0
  268. package/dist/chunks/poorMode-mtlnXU-z.js +1 -0
  269. package/dist/chunks/print-kxnXkqGc.js +39 -0
  270. package/dist/chunks/privacy-settings-DjY1annR.js +1 -0
  271. package/dist/chunks/processBashCommand-BrqLqSva.js +1 -0
  272. package/dist/chunks/processSlashCommand-DJGdVGbK.js +6 -0
  273. package/dist/chunks/projectContext-Cd7V9pES.js +1 -0
  274. package/dist/chunks/prompt-BZjXpviP.js +1 -0
  275. package/dist/chunks/prompt-CfM_xGPc.js +227 -0
  276. package/dist/chunks/prompt-CusKF4-p.js +1 -0
  277. package/dist/chunks/promptEditor-FI_ewCpV.js +4 -0
  278. package/dist/chunks/protocolHandler-B7ybKpgJ.js +13 -0
  279. package/dist/chunks/rate-limit-options-DPJMNNou.js +1 -0
  280. package/dist/chunks/rcDebugLog-CwU_wJBE.js +11 -0
  281. package/dist/chunks/referral-Da4mpbd3.js +1 -0
  282. package/dist/chunks/refresh-B6X4xb9r.js +1 -0
  283. package/dist/chunks/registerProtocol-D8fFnceq.js +36 -0
  284. package/dist/chunks/registry-y_z3pTg3.js +1 -0
  285. package/dist/chunks/release-notes--tnd4K56.js +4 -0
  286. package/dist/chunks/releaseNotes-BPA229-J.js +2 -0
  287. package/dist/chunks/reload-plugins-yQ7tEUVh.js +1 -0
  288. package/dist/chunks/remote-env-CER5UxTX.js +1 -0
  289. package/dist/chunks/remoteBridgeCore-Bi31i8gt.js +1 -0
  290. package/dist/chunks/remoteControlServer-oUAcWB4i.js +3 -0
  291. package/dist/chunks/rename-BTngRRZU.js +1 -0
  292. package/dist/chunks/renderOptions-Caca3bCd.js +1 -0
  293. package/dist/chunks/resume-DZHKfBmm.js +2 -0
  294. package/dist/chunks/ripgrep-Bzwdi5-K.js +5 -0
  295. package/dist/chunks/ripgrep-DEa1djpJ.js +1 -0
  296. package/dist/chunks/runtimeObserver-B4KekIF0.js +1 -0
  297. package/dist/chunks/runtimeObserver-BUOcYxiK.js +10 -0
  298. package/dist/chunks/sandbox-adapter-C--j-c76.js +1 -0
  299. package/dist/chunks/sandbox-toggle-DLBL7myN.js +1 -0
  300. package/dist/chunks/searchExtraTools-CBYp5XeI.js +1 -0
  301. package/dist/chunks/sentry-B7ZBc8fA.js +13 -0
  302. package/dist/chunks/session-DWYQk9YN.js +2 -0
  303. package/dist/chunks/sessionDiscovery-BP0nv36F.js +1 -0
  304. package/dist/chunks/sessionFileAccessHooks-DVilA3Mm.js +1 -0
  305. package/dist/chunks/sessionMemory-cMgcTxtP.js +1 -0
  306. package/dist/chunks/sessionMemory-pT4lc1C-.js +1 -0
  307. package/dist/chunks/sessionMemoryUtils-BgYf2OvX.js +1 -0
  308. package/dist/chunks/sessionObserver-CzyEF7mg.js +1 -0
  309. package/dist/chunks/sessionObserver-D4SV0Ar3.js +20 -0
  310. package/dist/chunks/sessionStorage-CXBgVAx-.js +1 -0
  311. package/dist/chunks/sessionStoragePortable-CJUZrbIq.js +3 -0
  312. package/dist/chunks/sessionTitle-CkrnWEW1.js +14 -0
  313. package/dist/chunks/sessionTracing-Caw-kvQr.js +11 -0
  314. package/dist/chunks/settingsSync-Dn_lGonC.js +1 -0
  315. package/dist/chunks/setup-DGkOT4DX.js +2 -0
  316. package/dist/chunks/setup-Dihjl7jo.js +9 -0
  317. package/dist/chunks/setup-II1titXI.js +1 -0
  318. package/dist/chunks/shadowedRuleDetection-DASW3j9H.js +1 -0
  319. package/dist/chunks/shellQuote-CBjhlaFO.js +1 -0
  320. package/dist/chunks/sideQuestion-C1qbLTAL.js +20 -0
  321. package/dist/chunks/sink-BSPyC453.js +1 -0
  322. package/dist/chunks/sink-CqOAfFlL.js +1 -0
  323. package/dist/chunks/sinks-BT_lBY6T.js +2 -0
  324. package/dist/chunks/sinks-CpuRIC3H.js +1 -0
  325. package/dist/chunks/skill-learning-kh0HKn6u.js +5 -0
  326. package/dist/chunks/skillChangeDetector-DQuNepIV.js +1 -0
  327. package/dist/chunks/skillGapStore-B1gUQXhE.js +5 -0
  328. package/dist/chunks/skillGapStore-CFmLJlYm.js +1 -0
  329. package/dist/chunks/skillGenerator-DIAwRpPg.js +8 -0
  330. package/dist/chunks/skillLearning-Bxu1Uzl-.js +1 -0
  331. package/dist/chunks/skillLearning-CxAbHYEk.js +1 -0
  332. package/dist/chunks/skillPanel-B9zJLHKV.js +28 -0
  333. package/dist/chunks/skillSearchPanel-C1O9sxYS.js +21 -0
  334. package/dist/chunks/skills-C6_3snFY.js +1 -0
  335. package/dist/chunks/sprites-59l7vF4l.js +1 -0
  336. package/dist/chunks/src-BGzuPZ5q.js +26 -0
  337. package/dist/chunks/src-kgpr3s-l.js +1 -0
  338. package/dist/chunks/startupProfiler-CAntGAbs.js +3 -0
  339. package/dist/chunks/startupProfiler-WtUzkMKV.js +1 -0
  340. package/dist/chunks/stats-BmGdg4nj.js +1 -0
  341. package/dist/chunks/status-KLPT7uYP.js +1 -0
  342. package/dist/chunks/statusNoticeHelpers-DuqyBY-N.js +1 -0
  343. package/dist/chunks/stdio-Cg20AQ5W.js +1 -0
  344. package/dist/chunks/stickers-DDAm--86.js +1 -0
  345. package/dist/chunks/stringUtils-KZoO4GUd.js +4 -0
  346. package/dist/chunks/subprocessEnv-D4Cbyl2J.js +1 -0
  347. package/dist/chunks/systemPromptSections-CVpefuSD.js +1 -0
  348. package/dist/chunks/tag-0vahEnrx.js +11 -0
  349. package/dist/chunks/tasks-zVPemGv7.js +1 -0
  350. package/dist/chunks/teamHelpers-B83RwCCC.js +1 -0
  351. package/dist/chunks/teamHelpers-CXAmvFco.js +1 -0
  352. package/dist/chunks/teammateModeSnapshot-AdUFmPGC.js +1 -0
  353. package/dist/chunks/teammateModeSnapshot-CdiglTzv.js +1 -0
  354. package/dist/chunks/teleport-D6PvdjPy.js +1 -0
  355. package/dist/chunks/templateJobs-Ox5ZTKjW.js +12 -0
  356. package/dist/chunks/terminalSetup-Dh70ynBX.js +1 -0
  357. package/dist/chunks/terminalSetup-hLCi-2uB.js +33 -0
  358. package/dist/chunks/theme-DxgUVq9C.js +1 -0
  359. package/dist/chunks/thinkback-C5vFU8dM.js +1 -0
  360. package/dist/chunks/thinkback-DWgU7Qhr.js +1 -0
  361. package/dist/chunks/thinkback-play-CDzY6Ux4.js +1 -0
  362. package/dist/chunks/tmux-DelKEjda.js +1 -0
  363. package/dist/chunks/toolEventObserver-DPoMAJwr.js +1 -0
  364. package/dist/chunks/toolEventObserver-jO6-mlFU.js +1 -0
  365. package/dist/chunks/toolPool-BmA-BnAq.js +1 -0
  366. package/dist/chunks/toolPool-Dgn1Clq8.js +1 -0
  367. package/dist/chunks/trustedDevice-CYR5AgSB.js +1 -0
  368. package/dist/chunks/trustedDevice-D35gYkBT.js +1 -0
  369. package/dist/chunks/tui-DoOiz2RW.js +6 -0
  370. package/dist/chunks/types-BCy5hsQR.js +1 -0
  371. package/dist/chunks/types-KeqFPzY5.js +17 -0
  372. package/dist/chunks/udsClient-CBF_cZFW.js +1 -0
  373. package/dist/chunks/ultrareviewCommand-o4GjzoXK.js +3 -0
  374. package/dist/chunks/undercover-B4xr62Ux.js +31 -0
  375. package/dist/chunks/undercover-nakrQDLh.js +1 -0
  376. package/dist/chunks/up-DaiW-V1N.js +12 -0
  377. package/dist/chunks/updateCCB-Cthn50OV.js +11 -0
  378. package/dist/chunks/upgrade-D4Id4ebd.js +1 -0
  379. package/dist/chunks/upgrade-DJTCV8sr.js +1 -0
  380. package/dist/chunks/upload-BFDXvdfb.js +1 -0
  381. package/dist/chunks/upstreamproxy-CLf1UaJv.js +11 -0
  382. package/dist/chunks/usage-Csbso5mD.js +1 -0
  383. package/dist/chunks/usage-DxudeFLL.js +1 -0
  384. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BHi41Ku_.js +1 -0
  385. package/dist/chunks/useMainLoopModel-CEqP4HOc.js +1 -0
  386. package/dist/chunks/useManagePlugins-BmS3Adja.js +1 -0
  387. package/dist/chunks/useMergedTools-wR6Bglqq.js +1 -0
  388. package/dist/chunks/useSearchInput-BhKAGgEN.js +1 -0
  389. package/dist/chunks/useSettingsErrors-CjK3P-Ki.js +1 -0
  390. package/dist/chunks/useTerminalSize-Du-EamDN.js +1 -0
  391. package/dist/chunks/useVoice-DP1hHBWA.js +1 -0
  392. package/dist/chunks/util-CMSErQoz.js +1 -0
  393. package/dist/chunks/utils-CAQfwbv8.js +1 -0
  394. package/dist/chunks/validatePlugin-_g0AqWZG.js +1 -0
  395. package/dist/chunks/vim-8y-2Q09k.js +1 -0
  396. package/dist/chunks/voice-BJAsr0K-.js +2 -0
  397. package/dist/chunks/voice-YtzCcIoM.js +8 -0
  398. package/dist/chunks/voiceModeEnabled-BD9GZhQ3.js +1 -0
  399. package/dist/chunks/voiceModeEnabled-DZbxaFIg.js +1 -0
  400. package/dist/chunks/voiceStreamSTT-B1T-8adN.js +1 -0
  401. package/dist/chunks/voiceStreamSTT-B39XaGOU.js +1 -0
  402. package/dist/chunks/web-tools-DVIvcP41.js +1 -0
  403. package/dist/chunks/windowsPaths-BeDSnJ23.js +2 -0
  404. package/dist/chunks/windowsPaths-ttHiMKpR.js +1 -0
  405. package/dist/chunks/workerRegistry-60_UCyc3.js +1 -0
  406. package/dist/chunks/worktree-DNK8NprA.js +1 -0
  407. package/dist/chunks/worktreeModeEnabled-RtizNgNg.js +1 -0
  408. package/dist/chunks/xml-CTdKuU6f.js +1 -0
  409. package/dist/cli.js +1 -1
  410. package/package.json +1 -1
  411. package/dist/chunks/AddWorkspaceDirectory-BqR8LhJq.js +0 -1
  412. package/dist/chunks/App-DkBMWXkK.js +0 -1
  413. package/dist/chunks/ApproveApiKey-5xd0lUV7.js +0 -1
  414. package/dist/chunks/ApproveApiKey-Dmr2VaVA.js +0 -1
  415. package/dist/chunks/AssistantSessionChooser-C7rigDkQ.js +0 -1
  416. package/dist/chunks/BackgroundTasksDialog-RtEwbumC.js +0 -2
  417. package/dist/chunks/BypassPermissionsModeDialog-7s3ULbNF.js +0 -1
  418. package/dist/chunks/ClaudeInChromeOnboarding-Bjv-sERa.js +0 -1
  419. package/dist/chunks/ClaudeMdExternalIncludesDialog-BTysDIlI.js +0 -1
  420. package/dist/chunks/ClaudeMdExternalIncludesDialog-DosNL91g.js +0 -1
  421. package/dist/chunks/ConsoleOAuthFlow-Cc1yaM-M.js +0 -1
  422. package/dist/chunks/DesktopHandoff-Cy89ZB_9.js +0 -1
  423. package/dist/chunks/DevChannelsDialog-ws8prcNK.js +0 -1
  424. package/dist/chunks/DiffDialog-BhqgxA7o.js +0 -3
  425. package/dist/chunks/Doctor-BWouB_9X.js +0 -1
  426. package/dist/chunks/Doctor-Ts5k8hn1.js +0 -3
  427. package/dist/chunks/ExitFlow-BBoImtT_.js +0 -2
  428. package/dist/chunks/Feedback-BVbSMBwY.js +0 -2
  429. package/dist/chunks/Grove-CTQrX7WO.js +0 -1
  430. package/dist/chunks/Grove-ZMHK4CBZ.js +0 -11
  431. package/dist/chunks/HybridTransport-B9g074Y1.js +0 -4
  432. package/dist/chunks/ITermBackend-DaFK8DOH.js +0 -1
  433. package/dist/chunks/InvalidConfigDialog-BkZkVKB4.js +0 -1
  434. package/dist/chunks/InvalidSettingsDialog-Lr60eQWj.js +0 -1
  435. package/dist/chunks/MCPConnectionManager-DmJ6dLOp.js +0 -1
  436. package/dist/chunks/McpParsingWarnings-CE2pQPXV.js +0 -1
  437. package/dist/chunks/MessageSelector-BT1FDbwv.js +0 -3
  438. package/dist/chunks/Messages-DT2gDtrJ.js +0 -11
  439. package/dist/chunks/Onboarding-DsqnXQel.js +0 -1
  440. package/dist/chunks/OverageCreditUpsell-UWtCrOmN.js +0 -1
  441. package/dist/chunks/PluginSettings-OJQz3d5V.js +0 -17
  442. package/dist/chunks/PromptInputFooterSuggestions-BImBB6Yk.js +0 -1
  443. package/dist/chunks/PromptInputHelpMenu-CblAb9vk.js +0 -1
  444. package/dist/chunks/QueryEngine-_re1pGHr.js +0 -1
  445. package/dist/chunks/REPL-eBTeslsR.js +0 -147
  446. package/dist/chunks/REPL-wIg0cBqS.js +0 -1
  447. package/dist/chunks/RemoteCallout-DMQai8_P.js +0 -1
  448. package/dist/chunks/RemoteSessionManager-DQmsHvj_.js +0 -2
  449. package/dist/chunks/ResumeConversation-D81hDeTl.js +0 -1
  450. package/dist/chunks/SSETransport-BbeM6bi9.js +0 -4
  451. package/dist/chunks/SearchExtraToolsTool-QbJQCWXd.js +0 -1
  452. package/dist/chunks/SentryErrorBoundary-BQJXHbWh.js +0 -2
  453. package/dist/chunks/SentryErrorBoundary-Cnw74oVG.js +0 -1
  454. package/dist/chunks/Settings-DiXc-_IG.js +0 -2
  455. package/dist/chunks/TeleportProgress-B3oRJlWH.js +0 -1
  456. package/dist/chunks/TeleportRepoMismatchDialog-GPuEipFy.js +0 -1
  457. package/dist/chunks/TeleportResumeWrapper-CcDuR6o9.js +0 -1
  458. package/dist/chunks/ThemePicker-BjSRjA_L.js +0 -1
  459. package/dist/chunks/TmuxBackend-BE3zsPKE.js +0 -9
  460. package/dist/chunks/TrustDialog-B6Qg0xUr.js +0 -1
  461. package/dist/chunks/TungstenTool-C5IqKVr0.js +0 -1
  462. package/dist/chunks/ValidationErrorsList-C5BoLiye.js +0 -2
  463. package/dist/chunks/WelcomeV2-BJAKZYz1.js +0 -1
  464. package/dist/chunks/WindowsTerminalBackend-BcwpxU2Q.js +0 -2
  465. package/dist/chunks/add-dir-OR7-VVcq.js +0 -1
  466. package/dist/chunks/agentDisplay-CMqTUh0A.js +0 -1
  467. package/dist/chunks/agents-DRtgUZ6t.js +0 -103
  468. package/dist/chunks/agents-EolUGDZB.js +0 -2
  469. package/dist/chunks/ant-Bgl31h7a.js +0 -1
  470. package/dist/chunks/api-BpQPVgif.js +0 -1
  471. package/dist/chunks/api-xFvB7WoB.js +0 -1
  472. package/dist/chunks/asciicast-CJObpRg9.js +0 -1
  473. package/dist/chunks/asciicast-Dr_Div_R.js +0 -4
  474. package/dist/chunks/assistant-CENsWvTb.js +0 -1
  475. package/dist/chunks/assistant-CHawoD04.js +0 -1
  476. package/dist/chunks/assistant-s7XNIA76.js +0 -1
  477. package/dist/chunks/auth-DX12yVM8.js +0 -1
  478. package/dist/chunks/auth-h6VL9BbC.js +0 -1
  479. package/dist/chunks/autoMode-BDzVqEPm.js +0 -45
  480. package/dist/chunks/autonomy-CeqOXzJl.js +0 -19
  481. package/dist/chunks/autonomy-D2YudQnH.js +0 -1
  482. package/dist/chunks/autonomyPanel-B0OQV4lv.js +0 -1
  483. package/dist/chunks/backgroundHousekeeping-CvHD981l.js +0 -17
  484. package/dist/chunks/backgroundHousekeeping-DMkk-QoZ.js +0 -1
  485. package/dist/chunks/banner-DNLUJFS_.js +0 -2
  486. package/dist/chunks/bg-D_H-uZDS.js +0 -9
  487. package/dist/chunks/bg-FtpmvQuT.js +0 -1
  488. package/dist/chunks/branch-D44HjlJp.js +0 -3
  489. package/dist/chunks/break-cache-ByJ7U2Ts.js +0 -8
  490. package/dist/chunks/bridge-4sldfa8u.js +0 -2
  491. package/dist/chunks/bridgeConfig-BM7iHryd.js +0 -1
  492. package/dist/chunks/bridgeConfig-CcCNsSBX.js +0 -1
  493. package/dist/chunks/bridgeEnabled-CYddgTU1.js +0 -1
  494. package/dist/chunks/bridgeEnabled-DoT2l1Oj.js +0 -1
  495. package/dist/chunks/bridgeMain-DaO51duk.js +0 -68
  496. package/dist/chunks/bridgeMain-Dc4-ZK69.js +0 -1
  497. package/dist/chunks/bridgeMessaging-IlSWKGmC.js +0 -1
  498. package/dist/chunks/bridgePointer-fFD_tbSk.js +0 -1
  499. package/dist/chunks/browser-DwnUS505.js +0 -1
  500. package/dist/chunks/btw-CrdUyRUP.js +0 -1
  501. package/dist/chunks/buddy-Ci0hdCf9.js +0 -3
  502. package/dist/chunks/bypassPermissionsKillswitch-BWOlc_sK.js +0 -1
  503. package/dist/chunks/caches-BHRJHGlc.js +0 -1
  504. package/dist/chunks/caches-CitduRKp.js +0 -3
  505. package/dist/chunks/ccrClient-yNKhQYnf.js +0 -1
  506. package/dist/chunks/changeDetector-B1tCH9Pa.js +0 -1
  507. package/dist/chunks/channelNotification-D8NPg8I8.js +0 -1
  508. package/dist/chunks/channelNotification-oE3eipDZ.js +0 -1
  509. package/dist/chunks/chrome-CwAwCY0V.js +0 -1
  510. package/dist/chunks/chromeNativeHost-63xqELw-.js +0 -1
  511. package/dist/chunks/claudeDesktop-CX1AsJie.js +0 -1
  512. package/dist/chunks/cleanup-C0gyKaOb.js +0 -1
  513. package/dist/chunks/clear-B5D08sZ0.js +0 -1
  514. package/dist/chunks/cliLaunch-8aeIk2ts.js +0 -1
  515. package/dist/chunks/client-un1k_6md.js +0 -1
  516. package/dist/chunks/color-BtVvrSvq.js +0 -1
  517. package/dist/chunks/commands--qEK1j9j.js +0 -1
  518. package/dist/chunks/commitAttribution-AEb-sE-t.js +0 -1
  519. package/dist/chunks/commitAttribution-HP_CWP0X.js +0 -2
  520. package/dist/chunks/common-BBRP_KzA.js +0 -1
  521. package/dist/chunks/common-BD4Q7osK.js +0 -1
  522. package/dist/chunks/common-C56I-_O3.js +0 -1
  523. package/dist/chunks/compact-BNhxD2UA.js +0 -3
  524. package/dist/chunks/companion-BlhNrZiL.js +0 -1
  525. package/dist/chunks/completionCache-BHSsdkBs.js +0 -1
  526. package/dist/chunks/completionCache-Daqaxlf3.js +0 -4
  527. package/dist/chunks/config-9z8716kz.js +0 -1
  528. package/dist/chunks/config-f8Cx16Z6.js +0 -1
  529. package/dist/chunks/context-BdOjhAmM.js +0 -1
  530. package/dist/chunks/context-noninteractive-CnaDbgvf.js +0 -54
  531. package/dist/chunks/context-noninteractive-DRM7gbFk.js +0 -1
  532. package/dist/chunks/conversation-B9pq-m4L.js +0 -1
  533. package/dist/chunks/conversation-DUxXVrGj.js +0 -1
  534. package/dist/chunks/copy-Cjl0-hg1.js +0 -7
  535. package/dist/chunks/createSSHSession-CYaHalxc.js +0 -6
  536. package/dist/chunks/createSession-DoR2K7ay.js +0 -1
  537. package/dist/chunks/createSession-VlSLvi7J.js +0 -1
  538. package/dist/chunks/cron-DiW7eIPP.js +0 -1
  539. package/dist/chunks/cronJitterConfig-DjSd7nvj.js +0 -6
  540. package/dist/chunks/crossProjectResume-CDWr5DFl.js +0 -40
  541. package/dist/chunks/daemon-FAp0WyY6.js +0 -2
  542. package/dist/chunks/datadog-CahWdK03.js +0 -1
  543. package/dist/chunks/datadog-DPkKCR8M.js +0 -1
  544. package/dist/chunks/desktop-y3mzgaWo.js +0 -1
  545. package/dist/chunks/detached-Brq3-vHi.js +0 -5
  546. package/dist/chunks/detectRepository-CSN3yxkq.js +0 -1
  547. package/dist/chunks/detectRepository-CbR0WgtE.js +0 -1
  548. package/dist/chunks/detection-BPPZCanO.js +0 -1
  549. package/dist/chunks/detection-DrdKrqbQ.js +0 -1
  550. package/dist/chunks/diff-hpp0dp6U.js +0 -1
  551. package/dist/chunks/directoryCompletion-DAc3u1K2.js +0 -1
  552. package/dist/chunks/doctor-B230p0R_.js +0 -1
  553. package/dist/chunks/earlyInput-BFcdUMaX.js +0 -2
  554. package/dist/chunks/earlyInput-vv9abU2L.js +0 -1
  555. package/dist/chunks/effort-D7i2v6vd.js +0 -9
  556. package/dist/chunks/entry-Du3gtq9o.js +0 -14
  557. package/dist/chunks/env-BH-OBzcA.js +0 -1
  558. package/dist/chunks/envLessBridgeConfig-CKD4eOEe.js +0 -1
  559. package/dist/chunks/envLessBridgeConfig-DI0ouryy.js +0 -1
  560. package/dist/chunks/execFileNoThrow-B_aZH_GP.js +0 -1
  561. package/dist/chunks/executor-BJb5d6mo.js +0 -1
  562. package/dist/chunks/executor-Dmn3RTuI.js +0 -1561
  563. package/dist/chunks/exit-fntBGxEC.js +0 -1
  564. package/dist/chunks/export-Dy9M7FnZ.js +0 -2
  565. package/dist/chunks/exportRenderer-Ckv4v0ye.js +0 -1
  566. package/dist/chunks/extra-usage-DLEvlKzs.js +0 -1
  567. package/dist/chunks/extra-usage-core-3KkeQSve.js +0 -1
  568. package/dist/chunks/extra-usage-noninteractive-DUezD54f.js +0 -1
  569. package/dist/chunks/extra-usage-pU11YXHS.js +0 -1
  570. package/dist/chunks/extraUsage-B-l-oe-7.js +0 -1
  571. package/dist/chunks/extractMemories-CXarlmZp.js +0 -1
  572. package/dist/chunks/fast-BzfzSH7K.js +0 -1
  573. package/dist/chunks/fast-CbLu_WYL.js +0 -1
  574. package/dist/chunks/featureCheck-p7OeCYzj.js +0 -1
  575. package/dist/chunks/feedback-DiyZIbov.js +0 -1
  576. package/dist/chunks/fileStateCache-C7-TxF8G.js +0 -1
  577. package/dist/chunks/files-DYvAZGxp.js +0 -2
  578. package/dist/chunks/firstPartyEventLogger-Dig8Mv7_.js +0 -1
  579. package/dist/chunks/flushGate-Ci3NHOV4.js +0 -1
  580. package/dist/chunks/gates-CtkQH6jy.js +0 -1
  581. package/dist/chunks/gates-xscCu8-N.js +0 -1
  582. package/dist/chunks/gemini-BCuY2aYj.js +0 -1
  583. package/dist/chunks/generateRecap-DA0SNyFR.js +0 -1
  584. package/dist/chunks/generateSessionName-BtQ4NGXP.js +0 -1
  585. package/dist/chunks/genericProcessUtils-D-78JZxz.js +0 -23
  586. package/dist/chunks/git-BZEgupMC.js +0 -1
  587. package/dist/chunks/git-DayFjsvj.js +0 -6
  588. package/dist/chunks/githubRepoPathMapping-C5RkiJWj.js +0 -1
  589. package/dist/chunks/goal-B6GHfd9J.js +0 -3
  590. package/dist/chunks/grok-DDM6xYuy.js +0 -1
  591. package/dist/chunks/growthbook-D-Po5Uxl.js +0 -1
  592. package/dist/chunks/heapdump-DHlUfpVV.js +0 -5
  593. package/dist/chunks/help-BulgC9m7.js +0 -1
  594. package/dist/chunks/hooks-D5AcFnD1.js +0 -1
  595. package/dist/chunks/hooks-jxIrev-X.js +0 -79
  596. package/dist/chunks/hostAdapter-BvraKy0o.js +0 -1
  597. package/dist/chunks/hostGuard-CWijeIyE.js +0 -1
  598. package/dist/chunks/ide-tx4qMFln.js +0 -2
  599. package/dist/chunks/inboundAttachments-C93Q7Dvt.js +0 -1
  600. package/dist/chunks/inboundAttachments-DxcFiX4f.js +0 -1
  601. package/dist/chunks/initReplBridge-BEldrf6f.js +0 -1
  602. package/dist/chunks/insights-HEsEDeCQ.js +0 -822
  603. package/dist/chunks/install-DRsM0bJO.js +0 -1
  604. package/dist/chunks/install-github-app-BVK5Z95c.js +0 -147
  605. package/dist/chunks/install-slack-app-DCw3O2J_.js +0 -1
  606. package/dist/chunks/instrumentation-DJ-R1s8C.js +0 -12
  607. package/dist/chunks/job-CUz_OGIq.js +0 -2
  608. package/dist/chunks/jwtUtils-DVyv2jab.js +0 -1
  609. package/dist/chunks/keybindings-Chr5nGBu.js +0 -2
  610. package/dist/chunks/lang-C7kJlPIh.js +0 -1
  611. package/dist/chunks/language-CQXwoDkI.js +0 -1
  612. package/dist/chunks/language-Lx3WlBN6.js +0 -1
  613. package/dist/chunks/launchAgentsPlatform-Fsslu42L.js +0 -1
  614. package/dist/chunks/launchAutofixPr-Cww8uS_5.js +0 -18
  615. package/dist/chunks/launchLocalMemory-BywmyvSJ.js +0 -3
  616. package/dist/chunks/launchLocalVault-BU3a5NV7.js +0 -3
  617. package/dist/chunks/launchMemoryStores-QUCODCJS.js +0 -1
  618. package/dist/chunks/launchOnboarding-BriZ0oIA.js +0 -8
  619. package/dist/chunks/launchSchedule-uLm7zt_B.js +0 -1
  620. package/dist/chunks/launchSkillStore-DMo2bV8X.js +0 -1
  621. package/dist/chunks/launchTeleport-DgQWSfXM.js +0 -3
  622. package/dist/chunks/launchVault-DfnBBFne.js +0 -1
  623. package/dist/chunks/loadAgentsDir-Br5fGLLI.js +0 -4697
  624. package/dist/chunks/loadAgentsDir-DDYPdQKP.js +0 -1
  625. package/dist/chunks/loadPluginHooks-C4soqr6g.js +0 -1
  626. package/dist/chunks/localSearch-CELyiWF6.js +0 -1
  627. package/dist/chunks/localSearch-DhZMcy5t.js +0 -1
  628. package/dist/chunks/log-DS97_rIr.js +0 -1
  629. package/dist/chunks/login-CvvIpkpq.js +0 -1
  630. package/dist/chunks/login-DjgITOAw.js +0 -1
  631. package/dist/chunks/logoV2Utils-BN_HrHSc.js +0 -1
  632. package/dist/chunks/logout-DOFJpZEJ.js +0 -1
  633. package/dist/chunks/magicDocs-2Zr7bYY_.js +0 -57
  634. package/dist/chunks/main-BafHJuKH.js +0 -31
  635. package/dist/chunks/main-D61CvHRy.js +0 -1312
  636. package/dist/chunks/mappers-BCiceNt3.js +0 -1
  637. package/dist/chunks/mcp-BV4m1Gbl.js +0 -2
  638. package/dist/chunks/mcp-CrAgAK9u.js +0 -1
  639. package/dist/chunks/mcp-DK4m73gO.js +0 -6
  640. package/dist/chunks/mcpServer-7zyXl9Wg.js +0 -1
  641. package/dist/chunks/mcpServer-sa9Z183j.js +0 -1
  642. package/dist/chunks/memoize-CPexXTP7.js +0 -1
  643. package/dist/chunks/memory-BrJPVgxn.js +0 -1
  644. package/dist/chunks/mobile-Cydobb55.js +0 -2
  645. package/dist/chunks/mode-Cr-NTlRa.js +0 -2
  646. package/dist/chunks/model-CCjuMV6k.js +0 -1
  647. package/dist/chunks/model-aJS_plgM.js +0 -1
  648. package/dist/chunks/onChangeAppState-C9EvI3EH.js +0 -1
  649. package/dist/chunks/openai-Cvb_-1A-.js +0 -10
  650. package/dist/chunks/overageCreditGrant-cGQilawd.js +0 -1
  651. package/dist/chunks/panel-ByW1omJn.js +0 -1
  652. package/dist/chunks/panel-DO_faHV-.js +0 -1
  653. package/dist/chunks/panelCall-DqZuxAf0.js +0 -1
  654. package/dist/chunks/parser-DbKSpFRq.js +0 -1
  655. package/dist/chunks/passes-DsrceO14.js +0 -1
  656. package/dist/chunks/path-nCzt96pE.js +0 -1
  657. package/dist/chunks/paths-DfGsIjPm.js +0 -39
  658. package/dist/chunks/permissions-CjPIu4IE.js +0 -3
  659. package/dist/chunks/permissions-Ps_D01ZB.js +0 -1
  660. package/dist/chunks/pipeTransport-C5u1K0wu.js +0 -1
  661. package/dist/chunks/plan-YjMAcn6g.js +0 -1
  662. package/dist/chunks/platform-DYZVoA9J.js +0 -2
  663. package/dist/chunks/plugin-Oux5bBQj.js +0 -1
  664. package/dist/chunks/pluginAutoupdate-Dl9U-fbk.js +0 -1
  665. package/dist/chunks/pluginBlocklist-BzI5DNeN.js +0 -1
  666. package/dist/chunks/pluginCliCommands-CExAcsaR.js +0 -1
  667. package/dist/chunks/pluginFlagging-BeqrbhgG.js +0 -1
  668. package/dist/chunks/pluginOperations-s0FQGOBm.js +0 -2
  669. package/dist/chunks/pluginStartupCheck-BVag9B-T.js +0 -1
  670. package/dist/chunks/pluginStartupCheck-BuorUEEf.js +0 -1
  671. package/dist/chunks/plugins-DTQHVJtY.js +0 -4
  672. package/dist/chunks/policyLimits-zoyF_6O4.js +0 -1
  673. package/dist/chunks/pollConfig-C19GiX7i.js +0 -1
  674. package/dist/chunks/poller-DADqVTWi.js +0 -1
  675. package/dist/chunks/poor-Bx5vvamq.js +0 -1
  676. package/dist/chunks/poorMode-BCoeB5zB.js +0 -1
  677. package/dist/chunks/poorMode-CTd_csCl.js +0 -1
  678. package/dist/chunks/print-UXl3rG8y.js +0 -39
  679. package/dist/chunks/privacy-settings-e43D9a4o.js +0 -1
  680. package/dist/chunks/processBashCommand-CvR9-gf8.js +0 -1
  681. package/dist/chunks/processSlashCommand-CB3wyAX7.js +0 -6
  682. package/dist/chunks/projectContext-D3_u80TY.js +0 -1
  683. package/dist/chunks/prompt-53lRY98R.js +0 -1
  684. package/dist/chunks/prompt-B8M-HLIS.js +0 -227
  685. package/dist/chunks/prompt-CooZNM1u.js +0 -1
  686. package/dist/chunks/promptEditor-CHiopfD7.js +0 -4
  687. package/dist/chunks/protocolHandler-DjivYn8H.js +0 -13
  688. package/dist/chunks/rate-limit-options-B-vndk5W.js +0 -1
  689. package/dist/chunks/rcDebugLog-BoroyfjB.js +0 -11
  690. package/dist/chunks/referral-DOqhciQu.js +0 -1
  691. package/dist/chunks/refresh-C8uLznwm.js +0 -1
  692. package/dist/chunks/registerProtocol-4lQ7O4Cc.js +0 -36
  693. package/dist/chunks/registry-q6v98JYd.js +0 -1
  694. package/dist/chunks/release-notes-C7JHshX3.js +0 -4
  695. package/dist/chunks/releaseNotes-CXY-xAja.js +0 -2
  696. package/dist/chunks/reload-plugins-DLS5lQcc.js +0 -1
  697. package/dist/chunks/remote-env-DhHea8yK.js +0 -1
  698. package/dist/chunks/remoteBridgeCore-BhOLhQIA.js +0 -1
  699. package/dist/chunks/remoteControlServer-CI0F83pg.js +0 -3
  700. package/dist/chunks/rename-DiKWWCzB.js +0 -1
  701. package/dist/chunks/renderOptions-DKe32LfM.js +0 -1
  702. package/dist/chunks/resume-DA4ToJFW.js +0 -2
  703. package/dist/chunks/runtimeObserver-BfVC8KK9.js +0 -1
  704. package/dist/chunks/runtimeObserver-DetZ5Tek.js +0 -10
  705. package/dist/chunks/sandbox-adapter-wh4cKN45.js +0 -1
  706. package/dist/chunks/sandbox-toggle-D8MgV0DT.js +0 -1
  707. package/dist/chunks/searchExtraTools-DbPpcAPw.js +0 -1
  708. package/dist/chunks/sentry-C3sL9nhF.js +0 -13
  709. package/dist/chunks/session-Bd-4QCqc.js +0 -2
  710. package/dist/chunks/sessionDiscovery-D_KPF86E.js +0 -1
  711. package/dist/chunks/sessionFileAccessHooks-COne5L2E.js +0 -1
  712. package/dist/chunks/sessionMemory-0Jqo1_MV.js +0 -1
  713. package/dist/chunks/sessionMemory-BDt_8bNB.js +0 -1
  714. package/dist/chunks/sessionMemoryUtils-BFIJ1nqF.js +0 -1
  715. package/dist/chunks/sessionObserver-CEky1SLb.js +0 -1
  716. package/dist/chunks/sessionObserver-CQxIKV8D.js +0 -20
  717. package/dist/chunks/sessionStorage-D1XhqZyW.js +0 -1
  718. package/dist/chunks/sessionStoragePortable-DJZ_6cL8.js +0 -3
  719. package/dist/chunks/sessionTitle-CB0ZEkS_.js +0 -14
  720. package/dist/chunks/sessionTracing-BIKXLTJZ.js +0 -11
  721. package/dist/chunks/settingsSync-pI3L3CeR.js +0 -1
  722. package/dist/chunks/setup-BSi50fkU.js +0 -1
  723. package/dist/chunks/setup-DjsmjRKQ.js +0 -2
  724. package/dist/chunks/setup-Dq0_SRA1.js +0 -9
  725. package/dist/chunks/shadowedRuleDetection-DvAjOOPL.js +0 -1
  726. package/dist/chunks/shellQuote-D8XPeqkc.js +0 -1
  727. package/dist/chunks/sideQuestion-BrTA8ooG.js +0 -20
  728. package/dist/chunks/sink-CqWxcRl9.js +0 -1
  729. package/dist/chunks/sink-Dkat5kH9.js +0 -1
  730. package/dist/chunks/sinks--frMI4-5.js +0 -2
  731. package/dist/chunks/sinks-CvPAVcMY.js +0 -1
  732. package/dist/chunks/skill-learning-2LV0yuwF.js +0 -5
  733. package/dist/chunks/skillChangeDetector-B5CGPl7e.js +0 -1
  734. package/dist/chunks/skillGapStore-Dc29T-OG.js +0 -1
  735. package/dist/chunks/skillGapStore-KzRf6Ezr.js +0 -5
  736. package/dist/chunks/skillGenerator-BdOHsgc4.js +0 -8
  737. package/dist/chunks/skillLearning-CdcVIG14.js +0 -1
  738. package/dist/chunks/skillLearning-DXWMxSA2.js +0 -1
  739. package/dist/chunks/skillPanel-zMY8o-86.js +0 -28
  740. package/dist/chunks/skillSearchPanel-l8aolUP8.js +0 -21
  741. package/dist/chunks/skills-BeMWJPup.js +0 -1
  742. package/dist/chunks/sprites-qel_EgTP.js +0 -1
  743. package/dist/chunks/src-BIPP3_mo.js +0 -26
  744. package/dist/chunks/src-DJXKJavk.js +0 -1
  745. package/dist/chunks/startupProfiler-CnDpob1v.js +0 -3
  746. package/dist/chunks/startupProfiler-TrMfE6Q4.js +0 -1
  747. package/dist/chunks/stats-CEBfahqM.js +0 -1
  748. package/dist/chunks/status-C9KXyfDk.js +0 -1
  749. package/dist/chunks/statusNoticeHelpers-CxoN9oDh.js +0 -1
  750. package/dist/chunks/stdio-BEEzuxaZ.js +0 -1
  751. package/dist/chunks/stickers-eHrGA1W5.js +0 -1
  752. package/dist/chunks/subprocessEnv-CggQWZCx.js +0 -1
  753. package/dist/chunks/systemPromptSections-DB93ZNWP.js +0 -1
  754. package/dist/chunks/tag-Dvl7Us9y.js +0 -11
  755. package/dist/chunks/tasks-BhiwUF0n.js +0 -1
  756. package/dist/chunks/teamHelpers-COQazluD.js +0 -1
  757. package/dist/chunks/teamHelpers-Mgfrv-Jf.js +0 -1
  758. package/dist/chunks/teammateModeSnapshot-8EWjlA-s.js +0 -1
  759. package/dist/chunks/teammateModeSnapshot-BV-P8s5r.js +0 -1
  760. package/dist/chunks/teleport-U5Zgqw3H.js +0 -1
  761. package/dist/chunks/templateJobs-C3idypN_.js +0 -12
  762. package/dist/chunks/terminalSetup-CmAEgt-5.js +0 -33
  763. package/dist/chunks/terminalSetup-mvAN4no7.js +0 -1
  764. package/dist/chunks/theme-BD2H4vJi.js +0 -1
  765. package/dist/chunks/thinkback-BOByXYp2.js +0 -1
  766. package/dist/chunks/thinkback-Dzu2mnNF.js +0 -1
  767. package/dist/chunks/thinkback-play-BX1K2UMY.js +0 -1
  768. package/dist/chunks/tmux-DruHFjDy.js +0 -1
  769. package/dist/chunks/toolEventObserver-B6cLV_dK.js +0 -1
  770. package/dist/chunks/toolEventObserver-i6it3p2_.js +0 -1
  771. package/dist/chunks/toolPool--2gNFbrz.js +0 -1
  772. package/dist/chunks/toolPool-dNV2JxUI.js +0 -1
  773. package/dist/chunks/trustedDevice-DY8OosTr.js +0 -1
  774. package/dist/chunks/trustedDevice-zya_Ml1N.js +0 -1
  775. package/dist/chunks/tui-KoYD82tT.js +0 -6
  776. package/dist/chunks/types-CQ1wrnQ0.js +0 -1
  777. package/dist/chunks/types-D5R26wwH.js +0 -17
  778. package/dist/chunks/udsClient-RkYuzeZC.js +0 -1
  779. package/dist/chunks/ultrareviewCommand-CCkKby4J.js +0 -3
  780. package/dist/chunks/undercover-CIutVLEO.js +0 -1
  781. package/dist/chunks/undercover-D9O2McNG.js +0 -31
  782. package/dist/chunks/up-BPM85EYl.js +0 -12
  783. package/dist/chunks/updateCCB-Bmn3Y63Y.js +0 -11
  784. package/dist/chunks/upgrade-D3rVOeHO.js +0 -1
  785. package/dist/chunks/upgrade-Dq3l14ZY.js +0 -1
  786. package/dist/chunks/upload-1PmElPfW.js +0 -1
  787. package/dist/chunks/upstreamproxy-BBTSJnad.js +0 -11
  788. package/dist/chunks/usage-B5G8FOZ3.js +0 -1
  789. package/dist/chunks/usage-VtTu7beE.js +0 -1
  790. package/dist/chunks/useMainLoopModel-CaQLIr1V.js +0 -1
  791. package/dist/chunks/useManagePlugins-BvoeOnqq.js +0 -1
  792. package/dist/chunks/useMergedTools-C133BfRp.js +0 -1
  793. package/dist/chunks/useSearchInput-CROB7AbC.js +0 -1
  794. package/dist/chunks/useSettingsErrors-DRxtFXoe.js +0 -1
  795. package/dist/chunks/useVoice-BQ9aSFJe.js +0 -1
  796. package/dist/chunks/util-BZnJgF79.js +0 -1
  797. package/dist/chunks/utils-4gsxQpga.js +0 -1
  798. package/dist/chunks/validatePlugin-DlrnBhPA.js +0 -1
  799. package/dist/chunks/vim-BXQCLoFJ.js +0 -1
  800. package/dist/chunks/voice-CeRmLRHT.js +0 -2
  801. package/dist/chunks/voice-QHyDff3f.js +0 -8
  802. package/dist/chunks/voiceModeEnabled-Bq_rttkL.js +0 -1
  803. package/dist/chunks/voiceModeEnabled-CLAVCVLW.js +0 -1
  804. package/dist/chunks/voiceStreamSTT-BDKenO5F.js +0 -1
  805. package/dist/chunks/voiceStreamSTT-CL52x8wZ.js +0 -1
  806. package/dist/chunks/windowsPaths-43st5EQF.js +0 -1
  807. package/dist/chunks/windowsPaths-DerzGPcz.js +0 -2
  808. package/dist/chunks/workerRegistry-BUD3lBk_.js +0 -1
  809. package/dist/chunks/worktree-C0f9Ke-R.js +0 -1
  810. package/dist/chunks/worktreeModeEnabled-THQb19xR.js +0 -1
  811. package/dist/chunks/xml-DvVQHZ1N.js +0 -1
  812. /package/dist/chunks/{Dialog-DYFGqyDs.js → Dialog-91X6ZGg9.js} +0 -0
  813. /package/dist/chunks/{InProcessTransport-B0mmAoxw.js → InProcessTransport-B9II3BiO.js} +0 -0
  814. /package/dist/chunks/{ListItem-OFARanN7.js → ListItem-DCQhApdJ.js} +0 -0
  815. /package/dist/chunks/{PermissionDialog-5MlJf7ew.js → PermissionDialog-_WQPRYHQ.js} +0 -0
  816. /package/dist/chunks/{PressEnterToContinue-BdA9zDGs.js → PressEnterToContinue-BJ58eCFC.js} +0 -0
  817. /package/dist/chunks/{SearchBox-DfOmUoaI.js → SearchBox-CkO4rQ-9.js} +0 -0
  818. /package/dist/chunks/{TungstenTool-V-Bwqlx3.js → TungstenTool-CnAF4y0E.js} +0 -0
  819. /package/dist/chunks/{attributionHooks-DZJjA8p9.js → attributionHooks-VGSpz4mk.js} +0 -0
  820. /package/dist/chunks/{attributionTrailer-CZY9XTcr.js → attributionTrailer-C8uqiLIb.js} +0 -0
  821. /package/dist/chunks/{autoModeDenials-CGAtAGGf.js → autoModeDenials-DlO5g6E9.js} +0 -0
  822. /package/dist/chunks/{bedrockClient-DZgaJTHp.js → bedrockClient-BUmO2U-X.js} +0 -0
  823. /package/dist/chunks/{capacityWake-BXlUpptF.js → capacityWake-DtmDHwEt.js} +0 -0
  824. /package/dist/chunks/{ccshareResume-CZggHNOf.js → ccshareResume-DKwcd0Vc.js} +0 -0
  825. /package/dist/chunks/{computerUseLock-BoEK9xYv.js → computerUseLock-Diig5B8p.js} +0 -0
  826. /package/dist/chunks/{connectHeadless-KNT0Sg7Z.js → connectHeadless-ByewVfOb.js} +0 -0
  827. /package/dist/chunks/{constants-41VpZw2G.js → constants-BljlAJOX.js} +0 -0
  828. /package/dist/chunks/{controlMessageCompat-BJhFiS7u.js → controlMessageCompat-Ds-CF-sM.js} +0 -0
  829. /package/dist/chunks/{dangerousBackend-ByOAEFld.js → dangerousBackend-Dkjtndh1.js} +0 -0
  830. /package/dist/chunks/{debugUtils-CiEnbhiz.js → debugUtils-l8nsUZ6R.js} +0 -0
  831. /package/dist/chunks/{distRoot-CcxmnzqQ.js → distRoot-BNg_iO5-.js} +0 -0
  832. /package/dist/chunks/{escHotkey-DfdC44i7.js → escHotkey-D8WgbSyj.js} +0 -0
  833. /package/dist/chunks/{esm-C-1qL9Mn.js → esm-vlR7mK5b.js} +0 -0
  834. /package/dist/chunks/{eventLoopStallDetector-l83_98VR.js → eventLoopStallDetector-bYy0fesH.js} +0 -0
  835. /package/dist/chunks/{exit-_obETqBv.js → exit-DOBLl8jN.js} +0 -0
  836. /package/dist/chunks/{featureCheck-Cm0YNDXO.js → featureCheck-j7P30mry.js} +0 -0
  837. /package/dist/chunks/{fpsMetrics-DOI_SIeY.js → fpsMetrics-DKWp7vng.js} +0 -0
  838. /package/dist/chunks/{fuse-Bp7rmZ5x.js → fuse-D3B-UE5Y.js} +0 -0
  839. /package/dist/chunks/{hash-BRmOQc3c.js → hash-CaUkS-30.js} +0 -0
  840. /package/dist/chunks/{index.min-BJnb9GQI.js → index.min-BNgJ2wVD.js} +0 -0
  841. /package/dist/chunks/{instinctParser-Bxhe2LOF.js → instinctParser-DOtj1Kni.js} +0 -0
  842. /package/dist/chunks/{intl-Pse97ORk.js → intl-CLeE9DsD.js} +0 -0
  843. /package/dist/chunks/{launchCommand-Du91jxMC.js → launchCommand-9eYsPG7W.js} +0 -0
  844. /package/dist/chunks/{lazySchema-2sOku3cX.js → lazySchema-B0QShMaQ.js} +0 -0
  845. /package/dist/chunks/{lib-B4Q0Nrpb.js → lib-Cf16LgKj.js} +0 -0
  846. /package/dist/chunks/{lockfile-CeCEBLtN.js → lockfile-C3JsqLpb.js} +0 -0
  847. /package/dist/chunks/{modalContext-CmSKRyea.js → modalContext-c5Yqx_CQ.js} +0 -0
  848. /package/dist/chunks/{normalization-Cox8C0dP.js → normalization-BLfP0Kqt.js} +0 -0
  849. /package/dist/chunks/{observationStore-BaPq7CKI.js → observationStore-rLlDwRtG.js} +0 -0
  850. /package/dist/chunks/{openaiShared-Crt0cZLO.js → openaiShared-C-AuktRP.js} +0 -0
  851. /package/dist/chunks/{output-style-BkOnFmfe.js → output-style-B64-Zum6.js} +0 -0
  852. /package/dist/chunks/{parseConnectUrl-BFNiff4c.js → parseConnectUrl-DL390ePs.js} +0 -0
  853. /package/dist/chunks/{parser-BXWr_mLL.js → parser-aIWfAYnt.js} +0 -0
  854. /package/dist/chunks/{permissions-DXLfdE7b.js → permissions-BsVJvaEe.js} +0 -0
  855. /package/dist/chunks/{postCommitAttribution-CA9Z2sqn.js → postCommitAttribution-D8MoHFoz.js} +0 -0
  856. /package/dist/chunks/{projectContext-CwJlxP2Y.js → projectContext-Dn7umMp6.js} +0 -0
  857. /package/dist/chunks/{prompt-4tea6NJQ.js → prompt-IqfIbvg9.js} +0 -0
  858. /package/dist/chunks/{proxy-nPT6a6QY.js → proxy-CF7ZDxaW.js} +0 -0
  859. /package/dist/chunks/{rewind-DTk4TFYB.js → rewind-Djt1zU_3.js} +0 -0
  860. /package/dist/chunks/{rollback-DbSpxmJE.js → rollback-CtS4yEQx.js} +0 -0
  861. /package/dist/chunks/{sanitization-DD414_3t.js → sanitization-Ds6zRQyx.js} +0 -0
  862. /package/dist/chunks/{sdkHeapDumpMonitor-fNRF2fbK.js → sdkHeapDumpMonitor-DLMMNeqo.js} +0 -0
  863. /package/dist/chunks/{semver-Tw0AFar5.js → semver-Di5OaTd5.js} +0 -0
  864. /package/dist/chunks/{server-DTd90dmm.js → server-DONKdvGc.js} +0 -0
  865. /package/dist/chunks/{serverBanner-B7UaaCCl.js → serverBanner-DIyjgIM-.js} +0 -0
  866. /package/dist/chunks/{serverLog-DRvGpDtt.js → serverLog-D1N5yx8A.js} +0 -0
  867. /package/dist/chunks/{sessionDataUploader-BDsz_1Uy.js → sessionDataUploader-CsNePsOb.js} +0 -0
  868. /package/dist/chunks/{sessionManager-Bh-Z-YXy.js → sessionManager-BOmgJd1l.js} +0 -0
  869. /package/dist/chunks/{slashCommandParsing-Cari0pNg.js → slashCommandParsing-BfanVchF.js} +0 -0
  870. /package/dist/chunks/{sleep-8Eb9j_Ly.js → sleep-C6koP5Ka.js} +0 -0
  871. /package/dist/chunks/{src-x7u_sB6m.js → src-BWpNn6Yz.js} +0 -0
  872. /package/dist/chunks/{src-BRAdBA8A.js → src-C-Ho8kYe.js} +0 -0
  873. /package/dist/chunks/{src-BlLavFUS.js → src-Cu58IYYb.js} +0 -0
  874. /package/dist/chunks/{src-CI_jaaBj.js → src-d2UJ68oX.js} +0 -0
  875. /package/dist/chunks/{state-Ce1HlR-H.js → state-BiRT9RAF.js} +0 -0
  876. /package/dist/chunks/{staticRender-Br64h1E1.js → staticRender-C5v46np_.js} +0 -0
  877. /package/dist/chunks/{stdio-D4cT86R0.js → stdio-Oy68T2eE.js} +0 -0
  878. /package/dist/chunks/{store-DhI7Lcan.js → store-DYC8zeL1.js} +0 -0
  879. /package/dist/chunks/{subprocessEnv-DV6q6o6w.js → subprocessEnv-DIeTJ-xE.js} +0 -0
  880. /package/dist/chunks/{systemPromptSections-BcN_XBTx.js → systemPromptSections-DY7epA2Y.js} +0 -0
  881. /package/dist/chunks/{systemTheme-dDbitcxB.js → systemTheme-eRWGHYSL.js} +0 -0
  882. /package/dist/chunks/{teammate-DMYOtLTK.js → teammate-CbskW5G9.js} +0 -0
  883. /package/dist/chunks/{types-RJTEOuIt.js → types-C0nqJFkV.js} +0 -0
  884. /package/dist/chunks/{useKeybinding-FsOnjW6T.js → useKeybinding-DPOUuymz.js} +0 -0
  885. /package/dist/chunks/{workSecret-qRMNrQy2.js → workSecret-DJu7k30X.js} +0 -0
  886. /package/dist/chunks/{worktreeModeEnabled-Db6b_Iy_.js → worktreeModeEnabled-KtHEqeFA.js} +0 -0
  887. /package/dist/chunks/{xdg-CBxMmQux.js → xdg-BFD9ydDV.js} +0 -0
@@ -1,17 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{Cn as o,F as s,Q as c,Rn as l,T as u,Ut as d,_ as f,b as p,f as m,g as h,h as g,n as _,nt as v,p as y,r as b,t as x,tn as ee,tt as te,v as S,x as C,xt as ne}from"./src-Di342QoJ.js";import{t as w}from"./jsx-runtime-D-D469L8.js";import{Ac as T,Do as E,Fc as D,Po as O,Qa as k,Zt as A,as as j,jo as M,lo as re,ls as N,no as P,on as ie,oo as F,os as ae,ws as oe,xs as se}from"./paths-DfGsIjPm.js";import{D as ce,E as le,J as ue,U as I,l as de,p as fe,z as pe}from"./debug-otxXY3j-.js";import{n as me,r as he}from"./analytics-DqMQntaB.js";import{l as ge,u as _e}from"./oauth-CdZEzMww.js";import{c as ve,o as ye,s as be}from"./log-DS97_rIr.js";import{b as xe,x as Se}from"./teammate-DMYOtLTK.js";import{E as Ce,S as we}from"./startupProfiler-CnDpob1v.js";import{$C as Te,$s as Ee,By as De,DC as L,EC as R,Fs as z,Is as Oe,JC as ke,Js as Ae,Jx as je,Jy as Me,Ky as Ne,MA as Pe,Ms as Fe,OA as Ie,Oh as Le,Ow as Re,Rs as ze,Rw as Be,Sw as Ve,Ts as He,Tw as Ue,Vs as We,Vw as Ge,Ws as Ke,Zs as qe,aS as Je,aT as Ye,ac as Xe,aj as Ze,bw as Qe,cT as $e,cc as et,dS as tt,dT as nt,dc as rt,dj as it,eT as at,ew as ot,fC as st,fS as ct,fT as lt,fj as ut,gc as dt,gw as ft,hT as pt,hc as mt,iT as ht,jA as gt,kh as _t,lC as vt,lT as yt,lc as bt,nc as xt,nw as St,oT as Ct,oc as wt,pc as Tt,qs as Et,sT as Dt,sc as Ot,tS as kt,tT as At,tc as jt,uC as Mt,uT as Nt,uc as Pt,vs as Ft,ws as It,ww as Lt,ys as Rt,yw as zt}from"./loadAgentsDir-Br5fGLLI.js";import{i as Bt,o as Vt,p as Ht,u as Ut}from"./xml-DvVQHZ1N.js";import{n as Wt,t as Gt}from"./browser-DwnUS505.js";import{t as Kt}from"./useKeybinding-FsOnjW6T.js";import{l as qt,u as Jt}from"./referral-DOqhciQu.js";import{n as Yt,t as Xt}from"./pluginStartupCheck-BVag9B-T.js";import{a as Zt,d as Qt,f as $t,i as en,l as tn,o as nn,s as rn,u as an}from"./pluginOperations-s0FQGOBm.js";import{a as on,c as sn,i as cn,n as ln,o as un,s as dn,t as fn}from"./validatePlugin-DlrnBhPA.js";import{a as pn,n as mn,o as hn,r as gn}from"./pluginFlagging-BeqrbhgG.js";import{i as _n,n as vn,r as yn}from"./MCPConnectionManager-DmJ6dLOp.js";import{t as bn}from"./SearchBox-DfOmUoaI.js";import{n as xn,t as Sn}from"./useSearchInput-CROB7AbC.js";import{i as Cn,n as wn}from"./pluginAutoupdate-Dl9U-fbk.js";import*as Tn from"path";import*as En from"fs/promises";function Dn({serverToolsCount:e,serverPromptsCount:t,serverResourcesCount:n}){let r=[];return e>0&&r.push(`tools`),n>0&&r.push(`resources`),t>0&&r.push(`prompts`),(0,On.jsxs)(C,{children:[(0,On.jsx)(p,{bold:!0,children:`Capabilities: `}),(0,On.jsx)(p,{color:`text`,children:r.length>0?(0,On.jsx)(g,{children:r}):`none`})]})}var On,kn=e((()=>{l(),x(),On=w()}));function An(e,t){switch(e.client.type){case`connected`:return{message:`Reconnected to ${t}.`,success:!0};case`needs-auth`:return{message:`${t} requires authentication. Use the 'Authenticate' option.`,success:!1};case`failed`:return{message:`Failed to reconnect to ${t}.`,success:!1};default:return{message:`Unknown result when reconnecting to ${t}.`,success:!1}}}function jn(e,t){return`Error reconnecting to ${t}: ${e instanceof Error?e.message:String(e)}`}var Mn=e((()=>{}));function Nn({server:e,serverToolsCount:t,onViewTools:n,onCancel:r,onComplete:i,borderless:o=!1}){let[l]=u(),d=Jt(),{columns:f}=s(),[m,_]=B.useState(!1),[v,y]=B.useState(null),b=Mt(e=>e.mcp),x=st(),[w,T]=B.useState(null),[D,O]=(0,B.useState)(!1),k=(0,B.useRef)(null),[j,M]=(0,B.useState)(!1),[re,N]=(0,B.useState)(null),[P,ie]=(0,B.useState)(!1),[F,ae]=(0,B.useState)(null),[oe,se]=(0,B.useState)(!1),[ce,le]=(0,B.useState)(!1),ue=(0,B.useRef)(void 0),I=(0,B.useRef)(!1),[de,fe]=(0,B.useState)(``),[me,_e]=(0,B.useState)(0),[ye,be]=(0,B.useState)(null);(0,B.useEffect)(()=>()=>{I.current=!0,k.current?.abort(),ue.current!==void 0&&clearTimeout(ue.current)},[]);let xe=e.isAuthenticated||e.client.type===`connected`&&t>0,Se=yn(),Ce=B.useCallback(async()=>{M(!1),N(null),O(!0);try{let t=await Se(e.name),n=t.client.type===`connected`;he(`tengu_claudeai_mcp_auth_completed`,{success:n}),n?i?.(`Authentication successful. Connected to ${e.name}.`):t.client.type===`needs-auth`?i?.(`Authentication successful, but server still requires authentication. You may need to manually restart Claude Code.`):i?.(`Authentication successful, but server reconnection failed. You may need to manually restart Claude Code for the changes to take effect.`)}catch(t){he(`tengu_claudeai_mcp_auth_completed`,{success:!1}),i?.(jn(t,e.name))}finally{O(!1)}},[Se,e.name,i]),we=B.useCallback(async()=>{await je(e.name,{...e.config,scope:e.scope}),x(t=>{let n=t.mcp.clients.map(t=>t.name===e.name?{...t,type:`needs-auth`}:t),r=Ve(t.mcp.tools,e.name),i=zt(t.mcp.commands,e.name),a=Qe(t.mcp.resources,e.name);return{...t,mcp:{...t.mcp,clients:n,tools:r,commands:i,resources:a}}}),he(`tengu_claudeai_mcp_clear_auth_completed`,{}),i?.(`Disconnected from ${e.name}.`),ie(!1),ae(null),se(!1)},[e.name,e.config,e.scope,x,i]);te(`confirm:no`,()=>{k.current?.abort(),k.current=null,_(!1),T(null)},{context:`Confirmation`,isActive:m}),te(`confirm:no`,()=>{M(!1),N(null)},{context:`Confirmation`,isActive:j}),te(`confirm:no`,()=>{ie(!1),ae(null),se(!1)},{context:`Confirmation`,isActive:P}),ne((e,t)=>{if(t.return&&j&&Ce(),t.return&&P)if(oe)we();else{let e=`${ge().CLAUDE_AI_ORIGIN}/settings/connectors`;ae(e),se(!0),Wt(e)}if(e===`c`&&!ce){let e=w||re||F;e&&ee(e).then(e=>{I.current||(e&&process.stdout.write(e),le(!0),ue.current!==void 0&&clearTimeout(ue.current),ue.current=setTimeout(le,2e3,!1))})}});let Te=E(String(e.name)),Ee=Lt(b.commands,e.name).length,De=_n(),L=B.useCallback(async()=>{let t=ge().CLAUDE_AI_ORIGIN,n=A()?.organizationUuid,r;r=n&&e.config.type===`claudeai-proxy`&&e.config.id?`${t}/api/organizations/${n}/mcp/start-auth/${e.config.id.startsWith(`mcprs`)?`mcpsrv`+e.config.id.slice(5):e.config.id}?product_surface=${encodeURIComponent(process.env.CLAUDE_CODE_ENTRYPOINT||`cli`)}`:`${t}/settings/connectors`,N(r),M(!0),he(`tengu_claudeai_mcp_auth_started`,{}),await Wt(r)},[e.config]),z=B.useCallback(()=>{ie(!0),he(`tengu_claudeai_mcp_clear_auth_started`,{})},[]),Oe=B.useCallback(async()=>{let t=e.client.type!==`disabled`;try{await De(e.name),e.config.type===`claudeai-proxy`&&he(`tengu_claudeai_mcp_toggle`,{new_state:t?`disabled`:`enabled`}),r()}catch(n){i?.(`Failed to ${t?`disable`:`enable`} MCP server '${e.name}': ${pe(n)}`)}},[e.client.type,e.config.type,e.name,De,r,i]),Ae=B.useCallback(async()=>{if(e.config.type===`claudeai-proxy`)return;_(!0),y(null);let t=new AbortController;k.current=t;try{if(e.isAuthenticated&&e.config&&await St(e.name,e.config,{preserveStepUpState:!0}),e.config){await ot(e.name,e.config,T,t.signal,{onWaitingForCallback:e=>{be(()=>e)}}),he(`tengu_mcp_auth_config_authenticate`,{wasAuthenticated:e.isAuthenticated});let n=await Se(e.name);if(n.client.type===`connected`){let t=xe?`Authentication successful. Reconnected to ${e.name}.`:`Authentication successful. Connected to ${e.name}.`;i?.(t)}else n.client.type===`needs-auth`?i?.(`Authentication successful, but server still requires authentication. You may need to manually restart Claude Code.`):(ve(e.name,`Reconnection failed after authentication`),i?.(`Authentication successful, but server reconnection failed. You may need to manually restart Claude Code for the changes to take effect.`))}}catch(e){e instanceof Error&&!(e instanceof ke)&&y(e.message)}finally{_(!1),k.current=null,be(null),fe(``)}},[e.isAuthenticated,e.config,e.name,i,Se,xe]),Me=async()=>{e.config.type!==`claudeai-proxy`&&e.config&&(await St(e.name,e.config),he(`tengu_mcp_auth_config_clear`,{}),await je(e.name,{...e.config,scope:e.scope}),x(t=>{let n=t.mcp.clients.map(t=>t.name===e.name?{...t,type:`failed`}:t),r=Ve(t.mcp.tools,e.name),i=zt(t.mcp.commands,e.name),a=Qe(t.mcp.resources,e.name);return{...t,mcp:{...t.mcp,clients:n,tools:r,commands:i,resources:a}}}),i?.(`Authentication cleared for ${e.name}.`))};if(m){let t=e.config.type!==`claudeai-proxy`&&e.config.oauth?.xaa?` Authenticating via your identity provider`:` A browser window will open for authentication`;return(0,V.jsxs)(C,{flexDirection:`column`,gap:1,padding:1,children:[(0,V.jsxs)(p,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,V.jsxs)(C,{children:[(0,V.jsx)(Ne,{}),(0,V.jsx)(p,{children:t})]}),w&&(0,V.jsxs)(C,{flexDirection:`column`,children:[(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually `}),ce?(0,V.jsx)(p,{color:`success`,children:`(Copied!)`}):(0,V.jsx)(p,{dimColor:!0,children:(0,V.jsx)(h,{shortcut:`c`,action:`copy`,parens:!0})})]}),(0,V.jsx)(c,{url:w})]}),m&&w&&ye&&(0,V.jsxs)(C,{flexDirection:`column`,marginTop:1,children:[(0,V.jsx)(p,{dimColor:!0,children:`If the redirect page shows a connection error, paste the URL from your browser's address bar:`}),(0,V.jsxs)(C,{children:[(0,V.jsxs)(p,{dimColor:!0,children:[`URL `,`>`,` `]}),(0,V.jsx)(tt,{value:de,onChange:fe,onSubmit:e=>{ye(e.trim()),fe(``)},cursorOffset:me,onChangeCursorOffset:_e,columns:f-8})]})]}),(0,V.jsx)(C,{marginLeft:3,children:(0,V.jsx)(p,{dimColor:!0,children:`Return here after authenticating in your browser. Press Esc to go back.`})})]})}if(j)return(0,V.jsxs)(C,{flexDirection:`column`,gap:1,padding:1,children:[(0,V.jsxs)(p,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,V.jsxs)(C,{children:[(0,V.jsx)(Ne,{}),(0,V.jsx)(p,{children:` A browser window will open for authentication`})]}),re&&(0,V.jsxs)(C,{flexDirection:`column`,children:[(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually `}),ce?(0,V.jsx)(p,{color:`success`,children:`(Copied!)`}):(0,V.jsx)(p,{dimColor:!0,children:(0,V.jsx)(h,{shortcut:`c`,action:`copy`,parens:!0})})]}),(0,V.jsx)(c,{url:re})]}),(0,V.jsxs)(C,{marginLeft:3,flexDirection:`column`,children:[(0,V.jsxs)(p,{color:`permission`,children:[`Press `,(0,V.jsx)(p,{bold:!0,children:`Enter`}),` after authenticating in your browser.`]}),(0,V.jsx)(p,{dimColor:!0,italic:!0,children:(0,V.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})})]})]});if(P)return(0,V.jsxs)(C,{flexDirection:`column`,gap:1,padding:1,children:[(0,V.jsxs)(p,{color:`claude`,children:[`Clear authentication for `,e.name]}),oe?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p,{children:`Find the MCP server in the browser and click "Disconnect".`}),F&&(0,V.jsxs)(C,{flexDirection:`column`,children:[(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{dimColor:!0,children:`If your browser didn't open automatically, copy this URL manually `}),ce?(0,V.jsx)(p,{color:`success`,children:`(Copied!)`}):(0,V.jsx)(p,{dimColor:!0,children:(0,V.jsx)(h,{shortcut:`c`,action:`copy`,parens:!0})})]}),(0,V.jsx)(c,{url:F})]}),(0,V.jsxs)(C,{marginLeft:3,flexDirection:`column`,children:[(0,V.jsxs)(p,{color:`permission`,children:[`Press `,(0,V.jsx)(p,{bold:!0,children:`Enter`}),` when done.`]}),(0,V.jsx)(p,{dimColor:!0,italic:!0,children:(0,V.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})})]})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p,{children:`This will open claude.ai in the browser. Find the MCP server in the list and click "Disconnect".`}),(0,V.jsxs)(C,{marginLeft:3,flexDirection:`column`,children:[(0,V.jsxs)(p,{color:`permission`,children:[`Press `,(0,V.jsx)(p,{bold:!0,children:`Enter`}),` to open the browser.`]}),(0,V.jsx)(p,{dimColor:!0,italic:!0,children:(0,V.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})})]})]})]});if(D)return(0,V.jsxs)(C,{flexDirection:`column`,gap:1,padding:1,children:[(0,V.jsxs)(p,{color:`text`,children:[`Connecting to `,(0,V.jsx)(p,{bold:!0,children:e.name}),`…`]}),(0,V.jsxs)(C,{children:[(0,V.jsx)(Ne,{}),(0,V.jsx)(p,{children:` Establishing connection to MCP server`})]}),(0,V.jsx)(p,{dimColor:!0,children:`This may take a few moments.`})]});let Pe=[];return e.client.type===`disabled`&&Pe.push({label:`Enable`,value:`toggle-enabled`}),e.client.type===`connected`&&t>0&&Pe.push({label:`View tools`,value:`tools`}),e.config.type===`claudeai-proxy`?e.client.type===`connected`?Pe.push({label:`Clear authentication`,value:`claudeai-clear-auth`}):e.client.type!==`disabled`&&Pe.push({label:`Authenticate`,value:`claudeai-auth`}):(xe&&(Pe.push({label:`Re-authenticate`,value:`reauth`}),Pe.push({label:`Clear authentication`,value:`clear-auth`})),xe||Pe.push({label:`Authenticate`,value:`auth`})),e.client.type!==`disabled`&&(e.client.type!==`needs-auth`&&Pe.push({label:`Reconnect`,value:`reconnectMcpServer`}),Pe.push({label:`Disable`,value:`toggle-enabled`})),Pe.length===0&&Pe.push({label:`Back`,value:`back`}),(0,V.jsxs)(C,{flexDirection:`column`,children:[(0,V.jsxs)(C,{flexDirection:`column`,paddingX:1,borderStyle:o?void 0:`round`,children:[(0,V.jsx)(C,{marginBottom:1,children:(0,V.jsxs)(p,{bold:!0,children:[Te,` MCP Server`]})}),(0,V.jsxs)(C,{flexDirection:`column`,gap:0,children:[(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{bold:!0,children:`Status: `}),e.client.type===`disabled`?(0,V.jsxs)(p,{children:[S(`inactive`,l)(a.radioOff),` disabled`]}):e.client.type===`connected`?(0,V.jsxs)(p,{children:[S(`success`,l)(a.tick),` connected`]}):e.client.type===`pending`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p,{dimColor:!0,children:a.radioOff}),(0,V.jsx)(p,{children:` connecting…`})]}):e.client.type===`needs-auth`?(0,V.jsxs)(p,{children:[S(`warning`,l)(a.triangleUpOutline),` needs authentication`]}):(0,V.jsxs)(p,{children:[S(`error`,l)(a.cross),` failed`]})]}),e.transport!==`claudeai-proxy`&&(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{bold:!0,children:`Auth: `}),xe?(0,V.jsxs)(p,{children:[S(`success`,l)(a.tick),` authenticated`]}):(0,V.jsxs)(p,{children:[S(`error`,l)(a.cross),` not authenticated`]})]}),(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{bold:!0,children:`URL: `}),(0,V.jsx)(p,{dimColor:!0,children:e.config.url})]}),(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{bold:!0,children:`Config location: `}),(0,V.jsx)(p,{dimColor:!0,children:ft(e.scope)})]}),e.client.type===`connected`&&(0,V.jsx)(Dn,{serverToolsCount:t,serverPromptsCount:Ee,serverResourcesCount:b.resources[e.name]?.length||0}),e.client.type===`connected`&&t>0&&(0,V.jsxs)(C,{children:[(0,V.jsx)(p,{bold:!0,children:`Tools: `}),(0,V.jsxs)(p,{dimColor:!0,children:[t,` tools`]})]})]}),v&&(0,V.jsx)(C,{marginTop:1,children:(0,V.jsxs)(p,{color:`error`,children:[`Error: `,v]})}),Pe.length>0&&(0,V.jsx)(C,{marginTop:1,children:(0,V.jsx)(Je,{options:Pe,onChange:async t=>{switch(t){case`tools`:n();break;case`auth`:case`reauth`:await Ae();break;case`clear-auth`:await Me();break;case`claudeai-auth`:await L();break;case`claudeai-clear-auth`:z();break;case`reconnectMcpServer`:O(!0);try{let t=await Se(e.name);e.config.type===`claudeai-proxy`&&he(`tengu_claudeai_mcp_reconnect`,{success:t.client.type===`connected`});let{message:n}=An(t,e.name);i?.(n)}catch(t){e.config.type===`claudeai-proxy`&&he(`tengu_claudeai_mcp_reconnect`,{success:!1}),i?.(jn(t,e.name))}finally{O(!1)}break;case`toggle-enabled`:await Oe();break;case`back`:r();break}},onCancel:r})})]}),(0,V.jsx)(C,{marginTop:1,children:(0,V.jsx)(p,{dimColor:!0,italic:!0,children:d.pending?(0,V.jsxs)(V.Fragment,{children:[`Press `,d.keyName,` again to exit`]}):(0,V.jsxs)(g,{children:[(0,V.jsx)(h,{shortcut:`↑↓`,action:`navigate`}),(0,V.jsx)(h,{shortcut:`Enter`,action:`select`}),(0,V.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})]})}var B,V,Pn=e((()=>{i(),B=t(l(),1),me(),_e(),qt(),pt(),x(),Kt(),Te(),kt(),vn(),Re(),vt(),ie(),Gt(),I(),ye(),M(),L(),De(),Me(),ct(),kn(),Mn(),V=w()}));function Fn({server:e,serverToolsCount:t,onViewTools:n,onCancel:r,onComplete:i,borderless:o=!1}){let[s]=u(),c=Jt(),l=Mt(e=>e.mcp),d=yn(),f=_n(),[m,_]=(0,In.useState)(!1),v=In.useCallback(async()=>{let t=e.client.type!==`disabled`;try{await f(e.name),r()}catch(n){i(`Failed to ${t?`disable`:`enable`} MCP server '${e.name}': ${pe(n)}`)}},[e.client.type,e.name,f,r,i]),y=E(String(e.name)),b=Lt(l.commands,e.name).length,x=[];return e.client.type!==`disabled`&&t>0&&x.push({label:`View tools`,value:`tools`}),e.client.type!==`disabled`&&x.push({label:`Reconnect`,value:`reconnectMcpServer`}),x.push({label:e.client.type===`disabled`?`Enable`:`Disable`,value:`toggle-enabled`}),x.length===0&&x.push({label:`Back`,value:`back`}),m?(0,H.jsxs)(C,{flexDirection:`column`,gap:1,padding:1,children:[(0,H.jsxs)(p,{color:`text`,children:[`Reconnecting to `,(0,H.jsx)(p,{bold:!0,children:e.name})]}),(0,H.jsxs)(C,{children:[(0,H.jsx)(Ne,{}),(0,H.jsx)(p,{children:` Restarting MCP server process`})]}),(0,H.jsx)(p,{dimColor:!0,children:`This may take a few moments.`})]}):(0,H.jsxs)(C,{flexDirection:`column`,children:[(0,H.jsxs)(C,{flexDirection:`column`,paddingX:1,borderStyle:o?void 0:`round`,children:[(0,H.jsx)(C,{marginBottom:1,children:(0,H.jsxs)(p,{bold:!0,children:[y,` MCP Server`]})}),(0,H.jsxs)(C,{flexDirection:`column`,gap:0,children:[(0,H.jsxs)(C,{children:[(0,H.jsx)(p,{bold:!0,children:`Status: `}),e.client.type===`disabled`?(0,H.jsxs)(p,{children:[S(`inactive`,s)(a.radioOff),` disabled`]}):e.client.type===`connected`?(0,H.jsxs)(p,{children:[S(`success`,s)(a.tick),` connected`]}):e.client.type===`pending`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p,{dimColor:!0,children:a.radioOff}),(0,H.jsx)(p,{children:` connecting…`})]}):(0,H.jsxs)(p,{children:[S(`error`,s)(a.cross),` failed`]})]}),(0,H.jsxs)(C,{children:[(0,H.jsx)(p,{bold:!0,children:`Command: `}),(0,H.jsx)(p,{dimColor:!0,children:e.config.command})]}),e.config.args&&e.config.args.length>0&&(0,H.jsxs)(C,{children:[(0,H.jsx)(p,{bold:!0,children:`Args: `}),(0,H.jsx)(p,{dimColor:!0,children:e.config.args.join(` `)})]}),(0,H.jsxs)(C,{children:[(0,H.jsx)(p,{bold:!0,children:`Config location: `}),(0,H.jsx)(p,{dimColor:!0,children:ft(Be(e.name)?.scope??`dynamic`)})]}),e.client.type===`connected`&&(0,H.jsx)(Dn,{serverToolsCount:t,serverPromptsCount:b,serverResourcesCount:l.resources[e.name]?.length||0}),e.client.type===`connected`&&t>0&&(0,H.jsxs)(C,{children:[(0,H.jsx)(p,{bold:!0,children:`Tools: `}),(0,H.jsxs)(p,{dimColor:!0,children:[t,` tools`]})]})]}),x.length>0&&(0,H.jsx)(C,{marginTop:1,children:(0,H.jsx)(Je,{options:x,onChange:async t=>{if(t===`tools`)n();else if(t===`reconnectMcpServer`){_(!0);try{let{message:t}=An(await d(e.name),e.name);i?.(t)}catch(t){i?.(jn(t,e.name))}finally{_(!1)}}else t===`toggle-enabled`?await v():t===`back`&&r()},onCancel:r})})]}),(0,H.jsx)(C,{marginTop:1,children:(0,H.jsx)(p,{dimColor:!0,italic:!0,children:c.pending?(0,H.jsxs)(H.Fragment,{children:[`Press `,c.keyName,` again to exit`]}):(0,H.jsxs)(g,{children:[(0,H.jsx)(h,{shortcut:`↑↓`,action:`navigate`}),(0,H.jsx)(h,{shortcut:`Enter`,action:`select`}),(0,H.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})]})}var In,H,Ln=e((()=>{i(),In=t(l(),1),qt(),x(),Ge(),vn(),Re(),vt(),I(),M(),L(),De(),Me(),kn(),Mn(),H=w()}));function Rn({tool:e,server:t,onBack:n}){let[r,i]=zn.useState(``),a=ae(e.name,t.name),o=j(e.userFacingName?e.userFacingName({}):a),s=e.isReadOnly?.({})??!1,c=e.isDestructive?.({})??!1,l=e.isOpenWorld?.({})??!1;return zn.useEffect(()=>{async function t(){try{i(await e.description({},{isNonInteractiveSession:!1,toolPermissionContext:{mode:`default`,additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!1},tools:[]}))}catch{i(`Failed to load description`)}}t()},[e]),(0,U.jsx)(m,{title:(0,U.jsxs)(U.Fragment,{children:[o,s&&(0,U.jsx)(p,{color:`success`,children:` [read-only]`}),c&&(0,U.jsx)(p,{color:`error`,children:` [destructive]`}),l&&(0,U.jsx)(p,{dimColor:!0,children:` [open-world]`})]}),subtitle:t.name,onCancel:n,inputGuide:e=>e.pending?(0,U.jsxs)(p,{children:[`Press `,e.keyName,` again to exit`]}):(0,U.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`}),children:(0,U.jsxs)(C,{flexDirection:`column`,children:[(0,U.jsxs)(C,{children:[(0,U.jsx)(p,{bold:!0,children:`Tool name: `}),(0,U.jsx)(p,{dimColor:!0,children:a})]}),(0,U.jsxs)(C,{children:[(0,U.jsx)(p,{bold:!0,children:`Full name: `}),(0,U.jsx)(p,{dimColor:!0,children:e.name})]}),r&&(0,U.jsxs)(C,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(p,{bold:!0,children:`Description:`}),(0,U.jsx)(p,{wrap:`wrap`,children:r})]}),e.inputJSONSchema&&e.inputJSONSchema.properties&&Object.keys(e.inputJSONSchema.properties).length>0&&(0,U.jsxs)(C,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(p,{bold:!0,children:`Parameters:`}),(0,U.jsx)(C,{marginLeft:2,flexDirection:`column`,children:Object.entries(e.inputJSONSchema.properties).map(([t,n])=>{let r=(e.inputJSONSchema?.required)?.includes(t);return(0,U.jsxs)(p,{children:[`• `,t,r&&(0,U.jsx)(p,{dimColor:!0,children:` (required)`}),`:`,` `,(0,U.jsx)(p,{dimColor:!0,children:typeof n==`object`&&n&&`type`in n?String(n.type):`unknown`}),typeof n==`object`&&n&&`description`in n&&(0,U.jsxs)(p,{dimColor:!0,children:[` - `,String(n.description)]})]},t)})})]})]})})}var zn,U,Bn=e((()=>{zn=t(l(),1),x(),N(),L(),U=w()}));function Vn({server:e,onSelectTool:t,onBack:n}){let r=Mt(e=>e.mcp.tools),i=Hn.useMemo(()=>e.client.type===`connected`?Ue(r,e.name):[],[e,r]),a=i.map((t,n)=>{let r=ae(t.name,e.name),i=j(t.userFacingName?t.userFacingName({}):r),a=t.isReadOnly?.({})??!1,o=t.isDestructive?.({})??!1,s=t.isOpenWorld?.({})??!1,c=[];return a&&c.push(`read-only`),o&&c.push(`destructive`),s&&c.push(`open-world`),{label:i,value:n.toString(),description:c.length>0?c.join(`, `):void 0,descriptionColor:o?`error`:a?`success`:void 0}});return(0,Un.jsx)(m,{title:`Tools for ${e.name}`,subtitle:`${i.length} ${O(i.length,`tool`)}`,onCancel:n,inputGuide:e=>e.pending?(0,Un.jsxs)(p,{children:[`Press `,e.keyName,` again to exit`]}):(0,Un.jsxs)(g,{children:[(0,Un.jsx)(h,{shortcut:`↑↓`,action:`navigate`}),(0,Un.jsx)(h,{shortcut:`Enter`,action:`select`}),(0,Un.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]}),children:i.length===0?(0,Un.jsx)(p,{dimColor:!0,children:`No tools available`}):(0,Un.jsx)(Je,{options:a,onChange:e=>{let n=parseInt(e,10),r=i[n];r&&t(r,n)},onCancel:n})})}var Hn,Un,Wn=e((()=>{Hn=t(l(),1),x(),N(),Re(),vt(),M(),L(),De(),Un=w()}));function Gn({inputValue:e,setInputValue:t,cursorOffset:n,setCursorOffset:r,error:i,setError:a,result:o,setResult:s,setViewState:c,onAddComplete:l,cliMode:u=!1}){let d=(0,Kn.useRef)(!1),[f,m]=(0,Kn.useState)(!1),[_,v]=(0,Kn.useState)(``),y=async()=>{let t=e.trim();if(!t){a(`Please enter a marketplace source`);return}let n=await on(t);if(!n){a(`Invalid marketplace source format. Try: owner/repo, https://..., or ./path`);return}if(`error`in n){a(n.error);return}a(null);try{m(!0),v(``);let{name:e,resolvedSource:t}=await We(n,e=>{v(e)});jt(e,{source:t}),mt();let r=n.source;n.source===`github`&&(r=n.repo),he(`tengu_marketplace_added`,{source_type:r}),l&&await l(),v(``),m(!1),u?s(`Successfully added marketplace: ${e}`):c({type:`browse-marketplace`,targetMarketplace:e})}catch(e){let t=ue(e);be(t),a(t.message),v(``),m(!1),s(u?`Error: ${t.message}`:null)}};return(0,Kn.useEffect)(()=>{e&&!d.current&&!i&&!o&&(d.current=!0,y())},[]),(0,W.jsxs)(C,{flexDirection:`column`,children:[(0,W.jsxs)(C,{flexDirection:`column`,paddingX:1,borderStyle:`round`,children:[(0,W.jsx)(C,{marginBottom:1,children:(0,W.jsx)(p,{bold:!0,children:`Add Marketplace`})}),(0,W.jsxs)(C,{flexDirection:`column`,children:[(0,W.jsx)(p,{children:`Enter marketplace source:`}),(0,W.jsx)(p,{dimColor:!0,children:`Examples:`}),(0,W.jsx)(p,{dimColor:!0,children:` · owner/repo (GitHub)`}),(0,W.jsx)(p,{dimColor:!0,children:` · git@github.com:owner/repo.git (SSH)`}),(0,W.jsx)(p,{dimColor:!0,children:` · https://example.com/marketplace.json`}),(0,W.jsx)(p,{dimColor:!0,children:` · ./path/to/marketplace`}),(0,W.jsx)(C,{marginTop:1,children:(0,W.jsx)(tt,{value:e,onChange:t,onSubmit:y,columns:80,cursorOffset:n,onChangeCursorOffset:r,focus:!0,showCursor:!0})})]}),f&&(0,W.jsxs)(C,{marginTop:1,children:[(0,W.jsx)(Ne,{}),(0,W.jsx)(p,{children:_||`Adding marketplace to configuration…`})]}),i&&(0,W.jsx)(C,{marginTop:1,children:(0,W.jsx)(p,{color:`error`,children:i})}),o&&(0,W.jsx)(C,{marginTop:1,children:(0,W.jsx)(p,{children:o})})]}),(0,W.jsx)(C,{marginLeft:3,children:(0,W.jsx)(p,{dimColor:!0,italic:!0,children:(0,W.jsxs)(g,{children:[(0,W.jsx)(h,{shortcut:`Enter`,action:`add`}),(0,W.jsx)(R,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})})]})}var Kn,W,qn=e((()=>{l(),Kn=t(l(),1),me(),L(),x(),Me(),ct(),I(),ye(),dt(),Et(),cn(),W=w()}));function Jn(e,t,n,i){let a={};for(let o of e){let e=n[o],s=t[o]??``;if(!(e?.sensitive===!0&&s===``&&i?.[o]!==void 0))if(e?.type===`number`){if(s.trim()===``)continue;let e=Number(s);a[o]=Number.isNaN(e)?s:e}else e?.type===`boolean`?a[o]=r(s):a[o]=s}return a}function Yn({title:e,subtitle:t,configSchema:n,initialValues:r,onSave:i,onCancel:s}){let c=Object.keys(n),l=(0,Xn.useCallback)(e=>{if(n[e]?.sensitive===!0)return``;let t=r?.[e];return t===void 0?``:String(t)},[n,r]),[u,d]=(0,Xn.useState)(0),[f,h]=(0,Xn.useState)({}),[g,_]=(0,Xn.useState)(()=>c[0]?l(c[0]):``),y=c[u],b=y?n[y]:null;if(te(`confirm:no`,s,{context:`Settings`}),v({"confirm:nextField":(0,Xn.useCallback)(()=>{if(u<c.length-1&&y){h(e=>({...e,[y]:g})),d(e=>e+1);let e=c[u+1];_(e?l(e):``)}},[u,c,y,g,l]),"confirm:yes":(0,Xn.useCallback)(()=>{if(!y)return;let e={...f,[y]:g};if(u===c.length-1)i(Jn(c,e,n,r));else{h(e),d(e=>e+1);let t=c[u+1];_(t?l(t):``)}},[y,f,g,u,c,n,i,l,r])},{context:`Confirmation`}),ne((e,t)=>{if(t.backspace||t.delete){_(e=>e.slice(0,-1));return}e&&!t.ctrl&&!t.meta&&!t.tab&&!t.return&&_(t=>t+e)}),!b||!y)return null;let x=b.sensitive===!0,ee=b.required===!0,S=x?`*`.repeat(o(g)):g;return(0,Zn.jsxs)(m,{title:e,subtitle:t,onCancel:s,isCancelActive:!1,children:[(0,Zn.jsxs)(C,{flexDirection:`column`,children:[(0,Zn.jsxs)(p,{bold:!0,children:[b.title||y,ee&&(0,Zn.jsx)(p,{color:`error`,children:` *`})]}),b.description&&(0,Zn.jsx)(p,{dimColor:!0,children:b.description}),(0,Zn.jsxs)(C,{marginTop:1,children:[(0,Zn.jsxs)(p,{children:[a.pointerSmall,` `]}),(0,Zn.jsx)(p,{children:S}),(0,Zn.jsx)(p,{children:`█`})]})]}),(0,Zn.jsxs)(C,{flexDirection:`column`,children:[(0,Zn.jsxs)(p,{dimColor:!0,children:[`Field `,u+1,` of `,c.length]}),u<c.length-1&&(0,Zn.jsx)(p,{dimColor:!0,children:`Tab: Next field · Enter: Save and continue`}),u===c.length-1&&(0,Zn.jsx)(p,{dimColor:!0,children:`Enter: Save configuration`})]})]})}var Xn,Zn,Qn=e((()=>{i(),Xn=t(l(),1),x(),Kt(),n(),Zn=w()}));async function $n(e){let{enabled:t,disabled:n}=await Rt();return[...t,...n].find(t=>t.repository===e||t.source===e)}function er({plugin:e,pluginId:t,onDone:n}){let[r]=tr.useState(()=>{let n=[],r=ht(e);Object.keys(r).length>0&&n.push({key:`top-level`,title:`Configure ${e.name}`,subtitle:`Plugin options`,schema:r,load:()=>Ct(t),save:n=>Dt(t,n,e.manifest.userConfig)});let i=at(e);for(let r of i)n.push({key:`channel:${r.server}`,title:`Configure ${r.displayName}`,subtitle:`Plugin: ${e.name}`,schema:r.configSchema,load:()=>Nt(t,r.server)??void 0,save:e=>lt(t,r.server,e,r.configSchema)});return n}),[i,a]=tr.useState(0),o=tr.useRef(n);if(o.current=n,tr.useEffect(()=>{r.length===0&&o.current(`skipped`)},[r.length]),r.length===0)return null;let s=r[i];function c(e){try{s.save(e)}catch(e){n(`error`,pe(e));return}let t=i+1;t<r.length?a(t):n(`configured`)}return(0,nr.jsx)(Yn,{title:s.title,subtitle:s.subtitle,configSchema:s.schema,initialValues:s.load(),onSave:c,onCancel:()=>n(`skipped`)},s.key)}var tr,nr,rr=e((()=>{tr=t(l(),1),I(),$e(),At(),Ft(),Ye(),Qn(),nr=w()}));function ir(){let e=Pt();return(0,ar.jsxs)(C,{marginBottom:1,children:[(0,ar.jsxs)(p,{color:`claude`,children:[a.warning,` `]}),(0,ar.jsxs)(p,{dimColor:!0,italic:!0,children:[`Make sure you trust a plugin before installing, updating, or using it. Anthropic does not control what MCP servers, files, or other software are included in plugins and cannot verify that they will work as intended or that they won't change. See each plugin's homepage for more information.`,e?` ${e}`:``]})]})}var ar,or=e((()=>{i(),l(),x(),rt(),ar=w()}));function sr(e){return e.entry.source&&typeof e.entry.source==`object`&&`source`in e.entry.source&&e.entry.source.source===`github`&&typeof e.entry.source==`object`&&`repo`in e.entry.source?e.entry.source.repo:null}function cr(e,t){let n=[{label:`Install for you (user scope)`,action:`install-user`},{label:`Install for all collaborators on this repository (project scope)`,action:`install-project`},{label:`Install for you, in this repo only (local scope)`,action:`install-local`}];return e&&n.push({label:`Open homepage`,action:`homepage`}),t&&n.push({label:`View on GitHub`,action:`github`}),n.push({label:`Back to plugin list`,action:`back`}),n}function lr({hasSelection:e}){return(0,ur.jsx)(C,{marginTop:1,children:(0,ur.jsx)(p,{dimColor:!0,italic:!0,children:(0,ur.jsxs)(g,{children:[e&&(0,ur.jsx)(R,{action:`plugin:install`,context:`Plugin`,fallback:`i`,description:`install`,bold:!0}),(0,ur.jsx)(R,{action:`plugin:toggle`,context:`Plugin`,fallback:`Space`,description:`toggle`}),(0,ur.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`details`}),(0,ur.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})}var ur,dr=e((()=>{l(),L(),x(),ur=w()}));function fr({totalItems:e,maxVisible:t=mr,selectedIndex:n=0}){let r=e>t,i=(0,pr.useRef)(0),a=(0,pr.useMemo)(()=>{if(!r)return 0;let a=i.current;if(n<a)return i.current=n,n;if(n>=a+t){let e=n-t+1;return i.current=e,e}let o=Math.max(0,e-t),s=Math.min(a,o);return i.current=s,s},[n,t,r,e]),o=a,s=Math.min(a+t,e),c=(0,pr.useCallback)(e=>r?e.slice(o,s):e,[r,o,s]),l=(0,pr.useCallback)(e=>o+e,[o]),u=(0,pr.useCallback)(e=>e>=o&&e<s,[o,s]),d=(0,pr.useCallback)(e=>{},[]),f=(0,pr.useCallback)(()=>{},[]),p=(0,pr.useCallback)(()=>{},[]),m=(0,pr.useCallback)((t,n)=>{n(Math.max(0,Math.min(t,e-1)))},[e]),h=(0,pr.useCallback)((e,t)=>!1,[]),g=Math.max(1,Math.ceil(e/t));return{currentPage:Math.floor(a/t),totalPages:g,startIndex:o,endIndex:s,needsPagination:r,pageSize:t,getVisibleItems:c,toActualIndex:l,isOnCurrentPage:u,goToPage:d,nextPage:f,prevPage:p,handleSelectionChange:m,handlePageNavigation:h,scrollPosition:{current:n+1,total:e,canScrollUp:a>0,canScrollDown:a+t<e}}}var pr,mr,hr=e((()=>{pr=t(l(),1),mr=5}));function gr({error:e,setError:t,result:n,setResult:r,setViewState:i,onInstallComplete:o,targetMarketplace:s,targetPlugin:c}){let[l,u]=(0,vr.useState)(`marketplace-list`),[d,f]=(0,vr.useState)(null),[m,h]=(0,vr.useState)(null),[_,y]=(0,vr.useState)([]),[b,x]=(0,vr.useState)([]),[ee,S]=(0,vr.useState)(!0),[ne,w]=(0,vr.useState)(null),[T,E]=(0,vr.useState)(0),[D,k]=(0,vr.useState)(new Set),[A,j]=(0,vr.useState)(new Set),M=fr({totalItems:b.length,selectedIndex:T}),[re,N]=(0,vr.useState)(0),[P,ie]=(0,vr.useState)(!1),[F,ae]=(0,vr.useState)(null),[oe,se]=(0,vr.useState)(null);te(`confirm:no`,_r.useCallback(()=>{l===`plugin-list`?s?i({type:`manage-marketplaces`,targetMarketplace:s}):_.length===1?i({type:`menu`}):(u(`marketplace-list`),f(null),k(new Set)):l===`plugin-details`?(u(`plugin-list`),h(null)):i({type:`menu`})},[l,s,i,_.length]),{context:`Confirmation`}),(0,vr.useEffect)(()=>{async function e(){try{let e=await Ae(),{marketplaces:n,failures:r}=await Tt(e),i=[];for(let{name:e,config:t,data:r}of n)if(r){let n=xe(r.plugins,t=>Oe(Xe(t.name,e)));i.push({name:e,totalPlugins:r.plugins.length,installedCount:n,source:bt(t.source)})}i.sort((e,t)=>e.name===`claude-plugin-directory`?-1:+(t.name===`claude-plugin-directory`)),y(i);let a=et(r,xe(n,e=>e.data!==null));if(a)if(a.type===`warning`)se(a.message+`. Showing available marketplaces.`);else throw Error(a.message);if(i.length===1&&!s&&!c){let e=i[0];e&&(f(e.name),u(`plugin-list`))}if(c){let n=null,r=null;for(let[t]of Object.entries(e)){let e=await Ke(t);if(e){let i=e.plugins.find(e=>e.name===c);if(i){let e=Xe(i.name,t);n={entry:i,marketplaceName:t,pluginId:e,isInstalled:z(e)},r=t;break}}}if(n&&r){let e=n.pluginId;z(e)?t(`Plugin '${e}' is already installed globally. Use '/plugin' to manage existing plugins.`):(f(r),h(n),u(`plugin-details`))}else t(`Plugin "${c}" not found in any marketplace`)}else s&&(i.some(e=>e.name===s)?(f(s),u(`plugin-list`)):t(`Marketplace "${s}" not found`))}catch(e){t(e instanceof Error?e.message:`Failed to load marketplaces`)}finally{S(!1)}}e()},[t,s,c]),(0,vr.useEffect)(()=>{if(!d)return;let e=!1;async function n(n){S(!0);try{let t=await Ke(n);if(e)return;if(!t)throw Error(`Failed to load marketplace: ${n}`);let r=[];for(let e of t.plugins){let t=Xe(e.name,n);_t(t)||r.push({entry:e,marketplaceName:n,pluginId:t,isInstalled:z(t)})}try{let t=await dn();if(e)return;w(t),t?r.sort((e,n)=>{let r=t.get(e.pluginId)??0,i=t.get(n.pluginId)??0;return r===i?e.entry.name.localeCompare(n.entry.name):i-r}):r.sort((e,t)=>e.entry.name.localeCompare(t.entry.name))}catch(t){if(e)return;fe(`Failed to fetch install counts: ${pe(t)}`),r.sort((e,t)=>e.entry.name.localeCompare(t.entry.name))}x(r),E(0),k(new Set)}catch(n){if(e)return;t(n instanceof Error?n.message:`Failed to load plugins`)}finally{S(!1)}}return n(d),()=>{e=!0}},[d,t]);let ce=async()=>{if(D.size===0)return;let e=b.filter(e=>D.has(e.pluginId));j(new Set(e.map(e=>e.pluginId)));let n=0,a=0,s=[];for(let t of e){let e=await He({pluginId:t.pluginId,entry:t.entry,marketplaceName:t.marketplaceName,scope:`user`});e.success?n++:(a++,s.push({name:t.entry.name,reason:e.error}))}j(new Set),k(new Set),mt(),a===0?r(`✓ Installed ${n} ${O(n,`plugin`)}. Run /reload-plugins to activate.`):n===0?t(`Failed to install: ${Ot(s,!0)}`):r(`✓ Installed ${n} of ${n+a} plugins. Failed: ${Ot(s,!1)}. Run /reload-plugins to activate successfully installed plugins.`),n>0&&o&&await o(),i({type:`menu`})},le=async(e,t=`user`)=>{ie(!0),ae(null);let n=await He({pluginId:e.pluginId,entry:e.entry,marketplaceName:e.marketplaceName,scope:t});if(n.success){let t=await $n(e.pluginId);if(t){ie(!1),u({type:`plugin-options`,plugin:t,pluginId:e.pluginId});return}r(n.message),o&&await o(),i({type:`menu`})}else ie(!1),ae(n.error)};(0,vr.useEffect)(()=>{e&&r(e)},[e,r]),v({"select:previous":()=>{T>0&&E(T-1)},"select:next":()=>{T<_.length-1&&E(T+1)},"select:accept":()=>{let e=_[T];e&&(f(e.name),u(`plugin-list`))}},{context:`Select`,isActive:l===`marketplace-list`}),v({"select:previous":()=>{T>0&&M.handleSelectionChange(T-1,E)},"select:next":()=>{T<b.length-1&&M.handleSelectionChange(T+1,E)},"select:accept":()=>{if(T===b.length&&D.size>0)ce();else if(T<b.length){let e=b[T];e&&(e.isInstalled?i({type:`manage-plugins`,targetPlugin:e.entry.name,targetMarketplace:e.marketplaceName}):(h(e),u(`plugin-details`),N(0),ae(null)))}}},{context:`Select`,isActive:l===`plugin-list`}),v({"plugin:toggle":()=>{if(T<b.length){let e=b[T];if(e&&!e.isInstalled){let t=new Set(D);t.has(e.pluginId)?t.delete(e.pluginId):t.add(e.pluginId),k(t)}}},"plugin:install":()=>{D.size>0&&ce()}},{context:`Plugin`,isActive:l===`plugin-list`});let ue=_r.useMemo(()=>{if(!m)return[];let e=m.entry.homepage;return cr(e,sr(m))},[m]);if(v({"select:previous":()=>{re>0&&N(re-1)},"select:next":()=>{re<ue.length-1&&N(re+1)},"select:accept":()=>{if(!m)return;let e=ue[re]?.action,t=m.entry.homepage,n=sr(m);e===`install-user`?le(m,`user`):e===`install-project`?le(m,`project`):e===`install-local`?le(m,`local`):e===`homepage`&&t?Wt(t):e===`github`&&n?Wt(`https://github.com/${n}`):e===`back`&&(u(`plugin-list`),h(null))}},{context:`Select`,isActive:l===`plugin-details`&&!!m}),typeof l==`object`&&l.type===`plugin-options`){let{plugin:e,pluginId:t}=l;function n(e){r(e),o&&o(),i({type:`menu`})}return(0,G.jsx)(er,{plugin:e,pluginId:t,onDone:(t,r)=>{switch(t){case`configured`:n(`✓ Installed and configured ${e.name}. Run /reload-plugins to apply.`);break;case`skipped`:n(`✓ Installed ${e.name}. Run /reload-plugins to apply.`);break;case`error`:n(`Installed but failed to save config: ${r}`);break}}})}if(ee)return(0,G.jsx)(p,{children:`Loading…`});if(e)return(0,G.jsx)(p,{color:`error`,children:e});if(l===`marketplace-list`)return _.length===0?(0,G.jsxs)(C,{flexDirection:`column`,children:[(0,G.jsx)(C,{marginBottom:1,children:(0,G.jsx)(p,{bold:!0,children:`Select marketplace`})}),(0,G.jsx)(p,{children:`No marketplaces configured.`}),(0,G.jsxs)(p,{dimColor:!0,children:[`Add a marketplace first using `,`'Add marketplace'`,`.`]}),(0,G.jsx)(C,{marginTop:1,paddingLeft:1,children:(0,G.jsx)(p,{dimColor:!0,children:(0,G.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})})})]}):(0,G.jsxs)(C,{flexDirection:`column`,children:[(0,G.jsx)(C,{marginBottom:1,children:(0,G.jsx)(p,{bold:!0,children:`Select marketplace`})}),oe&&(0,G.jsx)(C,{marginBottom:1,flexDirection:`column`,children:(0,G.jsxs)(p,{color:`warning`,children:[a.warning,` `,oe]})}),_.map((e,t)=>(0,G.jsxs)(C,{flexDirection:`column`,marginBottom:+(t<_.length-1),children:[(0,G.jsx)(C,{children:(0,G.jsxs)(p,{color:T===t?`suggestion`:void 0,children:[T===t?a.pointer:` `,` `,e.name]})}),(0,G.jsx)(C,{marginLeft:2,children:(0,G.jsxs)(p,{dimColor:!0,children:[e.totalPlugins,` `,O(e.totalPlugins,`plugin`),` available`,e.installedCount>0&&` · ${e.installedCount} already installed`,e.source&&` · ${e.source}`]})})]},e.name)),(0,G.jsx)(C,{marginTop:1,children:(0,G.jsx)(p,{dimColor:!0,italic:!0,children:(0,G.jsxs)(g,{children:[(0,G.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`select`}),(0,G.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})})]});if(l===`plugin-details`&&m){let e=m.entry.homepage,t=cr(e,sr(m));return(0,G.jsxs)(C,{flexDirection:`column`,children:[(0,G.jsx)(C,{marginBottom:1,children:(0,G.jsx)(p,{bold:!0,children:`Plugin Details`})}),(0,G.jsxs)(C,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(p,{bold:!0,children:m.entry.name}),m.entry.version&&(0,G.jsxs)(p,{dimColor:!0,children:[`Version: `,m.entry.version]}),m.entry.description&&(0,G.jsx)(C,{marginTop:1,children:(0,G.jsx)(p,{children:m.entry.description})}),m.entry.author&&(0,G.jsx)(C,{marginTop:1,children:(0,G.jsxs)(p,{dimColor:!0,children:[`By:`,` `,typeof m.entry.author==`string`?m.entry.author:m.entry.author.name]})})]}),(0,G.jsxs)(C,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(p,{bold:!0,children:`Will install:`}),m.entry.commands&&(0,G.jsxs)(p,{dimColor:!0,children:[`· Commands:`,` `,Array.isArray(m.entry.commands)?m.entry.commands.join(`, `):Object.keys(m.entry.commands).join(`, `)]}),m.entry.agents&&(0,G.jsxs)(p,{dimColor:!0,children:[`· Agents:`,` `,Array.isArray(m.entry.agents)?m.entry.agents.join(`, `):Object.keys(m.entry.agents).join(`, `)]}),m.entry.hooks&&(0,G.jsxs)(p,{dimColor:!0,children:[`· Hooks: `,Object.keys(m.entry.hooks).join(`, `)]}),m.entry.mcpServers&&(0,G.jsxs)(p,{dimColor:!0,children:[`· MCP Servers:`,` `,Array.isArray(m.entry.mcpServers)?m.entry.mcpServers.join(`, `):typeof m.entry.mcpServers==`object`?Object.keys(m.entry.mcpServers).join(`, `):`configured`]}),!m.entry.commands&&!m.entry.agents&&!m.entry.hooks&&!m.entry.mcpServers&&(0,G.jsx)(G.Fragment,{children:typeof m.entry.source==`object`&&`source`in m.entry.source&&(m.entry.source.source===`github`||m.entry.source.source===`url`||m.entry.source.source===`npm`||m.entry.source.source===`pip`)?(0,G.jsx)(p,{dimColor:!0,children:`· Component summary not available for remote plugin`}):(0,G.jsx)(p,{dimColor:!0,children:`· Components will be discovered at installation`})})]}),(0,G.jsx)(ir,{}),F&&(0,G.jsx)(C,{marginBottom:1,children:(0,G.jsxs)(p,{color:`error`,children:[`Error: `,F]})}),(0,G.jsx)(C,{flexDirection:`column`,children:t.map((e,t)=>(0,G.jsxs)(C,{children:[re===t&&(0,G.jsx)(p,{children:`> `}),re!==t&&(0,G.jsx)(p,{children:` `}),(0,G.jsx)(p,{bold:re===t,children:P&&e.action===`install`?`Installing…`:e.label})]},e.action))}),(0,G.jsx)(C,{marginTop:1,paddingLeft:1,children:(0,G.jsx)(p,{dimColor:!0,children:(0,G.jsxs)(g,{children:[(0,G.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`select`}),(0,G.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})]})}if(b.length===0)return(0,G.jsxs)(C,{flexDirection:`column`,children:[(0,G.jsx)(C,{marginBottom:1,children:(0,G.jsx)(p,{bold:!0,children:`Install plugins`})}),(0,G.jsx)(p,{dimColor:!0,children:`No new plugins available to install.`}),(0,G.jsx)(p,{dimColor:!0,children:`All plugins from this marketplace are already installed.`}),(0,G.jsx)(C,{marginLeft:3,children:(0,G.jsx)(p,{dimColor:!0,italic:!0,children:(0,G.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})})})]});let I=M.getVisibleItems(b);return(0,G.jsxs)(C,{flexDirection:`column`,children:[(0,G.jsx)(C,{marginBottom:1,children:(0,G.jsx)(p,{bold:!0,children:`Install Plugins`})}),M.scrollPosition.canScrollUp&&(0,G.jsx)(C,{children:(0,G.jsxs)(p,{dimColor:!0,children:[` `,a.arrowUp,` more above`]})}),I.map((t,n)=>{let r=T===M.toActualIndex(n),i=D.has(t.pluginId),o=A.has(t.pluginId);return(0,G.jsxs)(C,{flexDirection:`column`,marginBottom:n===I.length-1&&!e?0:1,children:[(0,G.jsxs)(C,{children:[(0,G.jsxs)(p,{color:r?`suggestion`:void 0,children:[r?a.pointer:` `,` `]}),(0,G.jsxs)(p,{color:t.isInstalled?`success`:void 0,children:[t.isInstalled?a.tick:o?a.ellipsis:i?a.radioOn:a.radioOff,` `,t.entry.name,t.entry.category&&(0,G.jsxs)(p,{dimColor:!0,children:[` [`,t.entry.category,`]`]}),t.entry.tags?.includes(`community-managed`)&&(0,G.jsx)(p,{dimColor:!0,children:` [Community Managed]`}),t.isInstalled&&(0,G.jsx)(p,{dimColor:!0,children:` (installed)`}),ne&&d===`claude-plugins-official`&&(0,G.jsxs)(p,{dimColor:!0,children:[` · `,un(ne.get(t.pluginId)??0),` installs`]})]})]}),t.entry.description&&(0,G.jsxs)(C,{marginLeft:4,children:[(0,G.jsx)(p,{dimColor:!0,children:Ce(t.entry.description,60)}),t.entry.version&&(0,G.jsxs)(p,{dimColor:!0,children:[` · v`,t.entry.version]})]})]},t.pluginId)}),M.scrollPosition.canScrollDown&&(0,G.jsx)(C,{children:(0,G.jsxs)(p,{dimColor:!0,children:[` `,a.arrowDown,` more below`]})}),e&&(0,G.jsx)(C,{marginTop:1,children:(0,G.jsxs)(p,{color:`error`,children:[a.cross,` `,e]})}),(0,G.jsx)(lr,{hasSelection:D.size>0})]})}var _r,vr,G,yr=e((()=>{i(),_r=t(l(),1),vr=t(l(),1),L(),x(),Kt(),Se(),Gt(),de(),I(),dt(),sn(),Fe(),rt(),Et(),Ze(),It(),Le(),M(),we(),rr(),or(),dr(),hr(),G=w()}));function br({error:e,setError:t,result:n,setResult:r,setViewState:i,onInstallComplete:o,onSearchModeChange:c,targetPlugin:l}){let[u,m]=(0,K.useState)(`plugin-list`),[h,_]=(0,K.useState)(null),[y,b]=(0,K.useState)([]),[x,ee]=(0,K.useState)(!0),[S,w]=(0,K.useState)(null),[T,E]=(0,K.useState)(!1),D=(0,K.useCallback)(e=>{E(e),c?.(e)},[c]),{query:k,setQuery:A,cursorOffset:j}=xn({isActive:u===`plugin-list`&&T&&!x,onExit:()=>{D(!1)}}),M=d(),{columns:re}=s(),N=(0,K.useMemo)(()=>{if(!k)return y;let e=k.toLowerCase();return y.filter(t=>t.entry.name.toLowerCase().includes(e)||t.entry.description?.toLowerCase().includes(e)||t.marketplaceName.toLowerCase().includes(e))},[y,k]),[P,ie]=(0,K.useState)(0),[F,ae]=(0,K.useState)(new Set),[oe,se]=(0,K.useState)(new Set),ce=fr({totalItems:N.length,selectedIndex:P});(0,K.useEffect)(()=>{ie(0)},[k]);let[le,ue]=(0,K.useState)(0),[I,de]=(0,K.useState)(!1),[me,he]=(0,K.useState)(null),[ge,_e]=(0,K.useState)(null),[ve,ye]=(0,K.useState)(null);(0,K.useEffect)(()=>{async function e(){try{let e=await Ae(),{marketplaces:n,failures:r}=await Tt(e),i=[];for(let{name:e,data:t}of n)if(t)for(let n of t.plugins){let t=Xe(n.name,e);i.push({entry:n,marketplaceName:e,pluginId:t,isInstalled:z(t)})}let a=i.filter(e=>!e.isInstalled&&!_t(e.pluginId));try{let e=await dn();w(e),e?a.sort((t,n)=>{let r=e.get(t.pluginId)??0,i=e.get(n.pluginId)??0;return r===i?t.entry.name.localeCompare(n.entry.name):i-r}):a.sort((e,t)=>e.entry.name.localeCompare(t.entry.name))}catch(e){fe(`Failed to fetch install counts: ${pe(e)}`),a.sort((e,t)=>e.entry.name.localeCompare(t.entry.name))}b(a);let o=Object.keys(e).length;a.length===0&&ye(await wt({configuredMarketplaceCount:o,failedMarketplaceCount:r.length}));let s=et(r,xe(n,e=>e.data!==null));if(s)if(s.type===`warning`)_e(s.message+`. Showing available plugins.`);else throw Error(s.message);if(l){let e=i.find(e=>e.entry.name===l);e?e.isInstalled?t(`Plugin '${e.pluginId}' is already installed. Use '/plugin' to manage existing plugins.`):(_(e),m(`plugin-details`)):t(`Plugin "${l}" not found in any marketplace`)}}catch(e){t(e instanceof Error?e.message:`Failed to load plugins`)}finally{ee(!1)}}e()},[t,l]);let be=async()=>{if(F.size===0)return;let e=y.filter(e=>F.has(e.pluginId));se(new Set(e.map(e=>e.pluginId)));let n=0,a=0,s=[];for(let t of e){let e=await He({pluginId:t.pluginId,entry:t.entry,marketplaceName:t.marketplaceName,scope:`user`});e.success?n++:(a++,s.push({name:t.entry.name,reason:e.error}))}se(new Set),ae(new Set),mt(),a===0?r(`✓ Installed ${n} ${O(n,`plugin`)}. Run /reload-plugins to activate.`):n===0?t(`Failed to install: ${Ot(s,!0)}`):r(`✓ Installed ${n} of ${n+a} plugins. Failed: ${Ot(s,!1)}. Run /reload-plugins to activate successfully installed plugins.`),n>0&&o&&await o(),i({type:`menu`})},Se=async(e,t=`user`)=>{de(!0),he(null);let n=await He({pluginId:e.pluginId,entry:e.entry,marketplaceName:e.marketplaceName,scope:t});if(n.success){let t=await $n(e.pluginId);if(t){de(!1),m({type:`plugin-options`,plugin:t,pluginId:e.pluginId});return}r(n.message),o&&await o(),i({type:`menu`})}else de(!1),he(n.error)};(0,K.useEffect)(()=>{e&&r(e)},[e,r]),te(`confirm:no`,()=>{m(`plugin-list`),_(null)},{context:`Confirmation`,isActive:u===`plugin-details`}),te(`confirm:no`,()=>{i({type:`menu`})},{context:`Confirmation`,isActive:u===`plugin-list`&&!T}),ne((e,t)=>{let n=!t.ctrl&&!t.meta;T||(e===`/`&&n?(D(!0),A(``)):n&&e.length>0&&!/^\s+$/.test(e)&&e!==`j`&&e!==`k`&&e!==`i`&&(D(!0),A(e)))},{isActive:u===`plugin-list`&&!x}),v({"select:previous":()=>{P===0?D(!0):ce.handleSelectionChange(P-1,ie)},"select:next":()=>{P<N.length-1&&ce.handleSelectionChange(P+1,ie)},"select:accept":()=>{if(P===N.length&&F.size>0)be();else if(P<N.length){let e=N[P];e&&(e.isInstalled?i({type:`manage-plugins`,targetPlugin:e.entry.name,targetMarketplace:e.marketplaceName}):(_(e),m(`plugin-details`),ue(0),he(null)))}}},{context:`Select`,isActive:u===`plugin-list`&&!T}),v({"plugin:toggle":()=>{if(P<N.length){let e=N[P];if(e&&!e.isInstalled){let t=new Set(F);t.has(e.pluginId)?t.delete(e.pluginId):t.add(e.pluginId),ae(t)}}},"plugin:install":()=>{F.size>0&&be()}},{context:`Plugin`,isActive:u===`plugin-list`&&!T});let we=Cr.useMemo(()=>{if(!h)return[];let e=h.entry.homepage;return cr(e,sr(h))},[h]);if(v({"select:previous":()=>{le>0&&ue(le-1)},"select:next":()=>{le<we.length-1&&ue(le+1)},"select:accept":()=>{if(!h)return;let e=we[le]?.action,t=h.entry.homepage,n=sr(h);e===`install-user`?Se(h,`user`):e===`install-project`?Se(h,`project`):e===`install-local`?Se(h,`local`):e===`homepage`&&t?Wt(t):e===`github`&&n?Wt(`https://github.com/${n}`):e===`back`&&(m(`plugin-list`),_(null))}},{context:`Select`,isActive:u===`plugin-details`&&!!h}),typeof u==`object`&&u.type===`plugin-options`){let{plugin:e,pluginId:t}=u;function n(e){r(e),o&&o(),i({type:`menu`})}return(0,q.jsx)(er,{plugin:e,pluginId:t,onDone:(t,r)=>{switch(t){case`configured`:n(`✓ Installed and configured ${e.name}. Run /reload-plugins to apply.`);break;case`skipped`:n(`✓ Installed ${e.name}. Run /reload-plugins to apply.`);break;case`error`:n(`Installed but failed to save config: ${r}`);break}}})}if(x)return(0,q.jsx)(p,{children:`Loading…`});if(e)return(0,q.jsx)(p,{color:`error`,children:e});if(u===`plugin-details`&&h){let e=h.entry.homepage,t=cr(e,sr(h));return(0,q.jsxs)(C,{flexDirection:`column`,children:[(0,q.jsx)(C,{marginBottom:1,children:(0,q.jsx)(p,{bold:!0,children:`Plugin details`})}),(0,q.jsxs)(C,{flexDirection:`column`,marginBottom:1,children:[(0,q.jsx)(p,{bold:!0,children:h.entry.name}),(0,q.jsxs)(p,{dimColor:!0,children:[`from `,h.marketplaceName]}),h.entry.version&&(0,q.jsxs)(p,{dimColor:!0,children:[`Version: `,h.entry.version]}),h.entry.description&&(0,q.jsx)(C,{marginTop:1,children:(0,q.jsx)(p,{children:h.entry.description})}),h.entry.author&&(0,q.jsx)(C,{marginTop:1,children:(0,q.jsxs)(p,{dimColor:!0,children:[`By:`,` `,typeof h.entry.author==`string`?h.entry.author:h.entry.author.name]})})]}),(0,q.jsx)(ir,{}),me&&(0,q.jsx)(C,{marginBottom:1,children:(0,q.jsxs)(p,{color:`error`,children:[`Error: `,me]})}),(0,q.jsx)(C,{flexDirection:`column`,children:t.map((e,t)=>(0,q.jsxs)(C,{children:[le===t&&(0,q.jsx)(p,{children:`> `}),le!==t&&(0,q.jsx)(p,{children:` `}),(0,q.jsx)(p,{bold:le===t,children:I&&e.action.startsWith(`install-`)?`Installing…`:e.label})]},e.action))}),(0,q.jsx)(C,{marginTop:1,children:(0,q.jsx)(p,{dimColor:!0,children:(0,q.jsxs)(g,{children:[(0,q.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`select`}),(0,q.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})]})}if(y.length===0)return(0,q.jsxs)(C,{flexDirection:`column`,children:[(0,q.jsx)(C,{marginBottom:1,children:(0,q.jsx)(p,{bold:!0,children:`Discover plugins`})}),(0,q.jsx)(Sr,{reason:ve}),(0,q.jsx)(C,{marginTop:1,children:(0,q.jsx)(p,{dimColor:!0,italic:!0,children:`Esc to go back`})})]});let Te=ce.getVisibleItems(N);return(0,q.jsxs)(C,{flexDirection:`column`,children:[(0,q.jsxs)(C,{children:[(0,q.jsx)(p,{bold:!0,children:`Discover plugins`}),ce.needsPagination&&(0,q.jsxs)(p,{dimColor:!0,children:[` `,`(`,ce.scrollPosition.current,`/`,ce.scrollPosition.total,`)`]})]}),(0,q.jsx)(C,{marginBottom:1,children:(0,q.jsx)(f,{query:k,isFocused:T,isTerminalFocused:M,width:re-4,cursorOffset:j})}),ge&&(0,q.jsx)(C,{marginBottom:1,children:(0,q.jsxs)(p,{color:`warning`,children:[a.warning,` `,ge]})}),N.length===0&&k&&(0,q.jsx)(C,{marginBottom:1,children:(0,q.jsxs)(p,{dimColor:!0,children:[`No plugins match "`,k,`"`]})}),ce.scrollPosition.canScrollUp&&(0,q.jsx)(C,{children:(0,q.jsxs)(p,{dimColor:!0,children:[` `,a.arrowUp,` more above`]})}),Te.map((t,n)=>{let r=P===ce.toActualIndex(n),i=F.has(t.pluginId),o=oe.has(t.pluginId);return(0,q.jsxs)(C,{flexDirection:`column`,marginBottom:n===Te.length-1&&!e?0:1,children:[(0,q.jsxs)(C,{children:[(0,q.jsxs)(p,{color:r&&!T?`suggestion`:void 0,children:[r&&!T?a.pointer:` `,` `]}),(0,q.jsxs)(p,{children:[o?a.ellipsis:i?a.radioOn:a.radioOff,` `,t.entry.name,(0,q.jsxs)(p,{dimColor:!0,children:[` · `,t.marketplaceName]}),t.entry.tags?.includes(`community-managed`)&&(0,q.jsx)(p,{dimColor:!0,children:` [Community Managed]`}),S&&t.marketplaceName===`claude-plugins-official`&&(0,q.jsxs)(p,{dimColor:!0,children:[` · `,un(S.get(t.pluginId)??0),` installs`]})]})]}),t.entry.description&&(0,q.jsx)(C,{marginLeft:4,children:(0,q.jsx)(p,{dimColor:!0,children:Ce(t.entry.description,60)})})]},`${ce.startIndex}-${t.pluginId}`)}),ce.scrollPosition.canScrollDown&&(0,q.jsx)(C,{children:(0,q.jsxs)(p,{dimColor:!0,children:[` `,a.arrowDown,` more below`]})}),e&&(0,q.jsx)(C,{marginTop:1,children:(0,q.jsxs)(p,{color:`error`,children:[a.cross,` `,e]})}),(0,q.jsx)(xr,{hasSelection:F.size>0,canToggle:P<N.length&&!N[P]?.isInstalled})]})}function xr({hasSelection:e,canToggle:t}){return(0,q.jsx)(C,{marginTop:1,children:(0,q.jsx)(p,{dimColor:!0,italic:!0,children:(0,q.jsxs)(g,{children:[e&&(0,q.jsx)(R,{action:`plugin:install`,context:`Plugin`,fallback:`i`,description:`install`,bold:!0}),(0,q.jsx)(p,{children:`type to search`}),t&&(0,q.jsx)(R,{action:`plugin:toggle`,context:`Plugin`,fallback:`Space`,description:`toggle`}),(0,q.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`details`}),(0,q.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})}function Sr({reason:e}){switch(e){case`git-not-installed`:return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(p,{dimColor:!0,children:`Git is required to install marketplaces.`}),(0,q.jsx)(p,{dimColor:!0,children:`Please install git and restart Claude Code.`})]});case`all-blocked-by-policy`:return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(p,{dimColor:!0,children:`Your organization policy does not allow any external marketplaces.`}),(0,q.jsx)(p,{dimColor:!0,children:`Contact your administrator.`})]});case`policy-restricts-sources`:return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(p,{dimColor:!0,children:`Your organization restricts which marketplaces can be added.`}),(0,q.jsx)(p,{dimColor:!0,children:`Switch to the Marketplaces tab to view allowed sources.`})]});case`all-marketplaces-failed`:return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(p,{dimColor:!0,children:`Failed to load marketplace data.`}),(0,q.jsx)(p,{dimColor:!0,children:`Check your network connection.`})]});case`all-plugins-installed`:return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(p,{dimColor:!0,children:`All available plugins are already installed.`}),(0,q.jsx)(p,{dimColor:!0,children:`Check for new plugins later or add more marketplaces.`})]});default:return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(p,{dimColor:!0,children:`No plugins available.`}),(0,q.jsx)(p,{dimColor:!0,children:`Add a marketplace first using the Marketplaces tab.`})]})}}var Cr,K,q,wr=e((()=>{i(),Cr=t(l(),1),K=t(l(),1),L(),bn(),x(),Sn(),pt(),Kt(),Se(),Gt(),de(),I(),dt(),sn(),Fe(),rt(),Et(),Ze(),It(),Le(),M(),we(),rr(),or(),dr(),hr(),q=w()}));function Tr({setViewState:e,error:t,setError:n,setResult:r,exitState:i,onManageComplete:o,targetMarketplace:s,action:c}){let[l,u]=(0,Dr.useState)([]),[d,f]=(0,Dr.useState)(!0),[m,h]=(0,Dr.useState)(0),[_,y]=(0,Dr.useState)(!1),[b,x]=(0,Dr.useState)(null),[ee,S]=(0,Dr.useState)(null),[w,T]=(0,Dr.useState)(null),[E,A]=(0,Dr.useState)(`list`),[j,M]=(0,Dr.useState)(null),[N,P]=(0,Dr.useState)(0),ie=(0,Dr.useRef)(!1);(0,Dr.useEffect)(()=>{async function e(){try{let e=await Ae(),{enabled:r,disabled:i}=await Rt(),a=[...r,...i],{marketplaces:o,failures:l}=await Tt(e),d=[];for(let{name:e,config:t,data:n}of o){let r=a.filter(t=>t.source.endsWith(`@${e}`));d.push({name:e,source:bt(t.source),lastUpdated:t.lastUpdated,pluginCount:n?.plugins.length,installedPlugins:r,pendingUpdate:!1,pendingRemove:!1,autoUpdate:oe(e,t)})}d.sort((e,t)=>e.name===`claude-plugin-directory`?-1:t.name===`claude-plugin-directory`?1:e.name.localeCompare(t.name)),u(d);let f=et(l,xe(o,e=>e.data!==null));if(f)if(f.type===`warning`)x(f.message);else throw Error(f.message);if(s&&!ie.current&&!t){ie.current=!0;let e=d.findIndex(e=>e.name===s);if(e>=0){let t=d[e];if(c){h(e+1);let t=[...d];c===`update`?t[e].pendingUpdate=!0:c===`remove`&&(t[e].pendingRemove=!0),u(t),setTimeout(se,100,t)}else t&&(h(e+1),M(t),A(`details`))}else n&&n(`Marketplace not found: ${s}`)}}catch(e){n&&n(e instanceof Error?e.message:`Failed to load marketplaces`),x(e instanceof Error?e.message:`Failed to load marketplaces`)}finally{f(!1)}}e()},[s,c,t]);let F=()=>l.some(e=>e.pendingUpdate||e.pendingRemove),ae=()=>({updateCount:xe(l,e=>e.pendingUpdate),removeCount:xe(l,e=>e.pendingRemove)}),se=async t=>{let i=t||l,s=E===`details`;y(!0),x(null),S(null),T(null);try{let t=k(`userSettings`),n=0,c=0,l=new Set;for(let e of i){if(e.pendingRemove){if(e.installedPlugins&&e.installedPlugins.length>0){let n={...t?.enabledPlugins};for(let t of e.installedPlugins){let r=Xe(t.name,e.name);n[r]=!1}re(`userSettings`,{enabledPlugins:n})}await Ee(e.name),c++,he(`tengu_marketplace_removed`,{marketplace_name:e.name,plugins_uninstalled:e.installedPlugins?.length||0});continue}e.pendingUpdate&&(await qe(e.name,e=>{T(e)}),n++,l.add(e.name.toLowerCase()),he(`tengu_marketplace_updated`,{marketplace_name:e.name}))}let d=0;l.size>0&&(d=(await Cn(l)).length),mt(),o&&await o();let f=await Ae(),{enabled:p,disabled:m}=await Rt(),h=[...p,...m],{marketplaces:g}=await Tt(f),_=[];for(let{name:e,config:t,data:n}of g){let r=h.filter(t=>t.source.endsWith(`@${e}`));_.push({name:e,source:bt(t.source),lastUpdated:t.lastUpdated,pluginCount:n?.plugins.length,installedPlugins:r,pendingUpdate:!1,pendingRemove:!1,autoUpdate:oe(e,t)})}if(_.sort((e,t)=>e.name===`claude-plugin-directory`?-1:t.name===`claude-plugin-directory`?1:e.name.localeCompare(t.name)),u(_),s&&j){let e=_.find(e=>e.name===j.name);e&&M(e)}let v=[];if(n>0){let e=d>0?` (${d} ${O(d,`plugin`)} bumped)`:``;v.push(`Updated ${n} ${O(n,`marketplace`)}${e}`)}if(c>0&&v.push(`Removed ${c} ${O(c,`marketplace`)}`),v.length>0){let t=`${a.tick} ${v.join(`, `)}`;s?S(t):(r(t),setTimeout(e,2e3,{type:`menu`}))}else s||e({type:`menu`})}catch(e){let t=pe(e);x(t),n&&n(t)}finally{y(!1),T(null)}},ce=async()=>{if(!j)return;let e=l.map(e=>e.name===j.name?{...e,pendingRemove:!0}:e);u(e),await se(e)},le=e=>{if(!e)return[];let t=[{label:`Browse plugins (${e.pluginCount??0})`,value:`browse`},{label:`Update marketplace`,secondaryLabel:e.lastUpdated?`(last updated ${new Date(e.lastUpdated).toLocaleDateString()})`:void 0,value:`update`}];return D()||t.push({label:e.autoUpdate?`Disable auto-update`:`Enable auto-update`,value:`toggle-auto-update`}),t.push({label:`Remove marketplace`,value:`remove`}),t},ue=async e=>{let t=!e.autoUpdate;try{await xt(e.name,t),u(n=>n.map(n=>n.name===e.name?{...n,autoUpdate:t}:n)),M(e=>e&&{...e,autoUpdate:t})}catch(e){x(e instanceof Error?e.message:`Failed to update setting`)}};if(te(`confirm:no`,()=>{A(`list`),P(0)},{context:`Confirmation`,isActive:!_&&(E===`details`||E===`confirm-remove`)}),te(`confirm:no`,()=>{u(e=>e.map(e=>({...e,pendingUpdate:!1,pendingRemove:!1}))),h(0)},{context:`Confirmation`,isActive:!_&&E===`list`&&F()}),te(`confirm:no`,()=>{e({type:`menu`})},{context:`Confirmation`,isActive:!_&&E===`list`&&!F()}),v({"select:previous":()=>h(e=>Math.max(0,e-1)),"select:next":()=>{let e=l.length+1;h(t=>Math.min(e-1,t+1))},"select:accept":()=>{let t=m-1;if(m===0)e({type:`add-marketplace`});else if(F())se();else{let e=l[t];e&&(M(e),A(`details`),P(0))}}},{context:`Select`,isActive:!_&&E===`list`}),ne(e=>{let t=m-1;if((e===`u`||e===`U`)&&t>=0)u(e=>e.map((e,n)=>n===t?{...e,pendingUpdate:!e.pendingUpdate,pendingRemove:e.pendingUpdate?e.pendingRemove:!1}:e));else if((e===`r`||e===`R`)&&t>=0){let e=l[t];e&&(M(e),A(`confirm-remove`))}},{isActive:!_&&E===`list`}),v({"select:previous":()=>P(e=>Math.max(0,e-1)),"select:next":()=>{let e=le(j);P(t=>Math.min(e.length-1,t+1))},"select:accept":()=>{if(!j)return;let t=le(j)[N];if(t?.value===`browse`)e({type:`browse-marketplace`,targetMarketplace:j.name});else if(t?.value===`update`){let e=l.map(e=>e.name===j.name?{...e,pendingUpdate:!0}:e);u(e),se(e)}else t?.value===`toggle-auto-update`?ue(j):t?.value===`remove`&&A(`confirm-remove`)}},{context:`Select`,isActive:!_&&E===`details`}),ne(e=>{e===`y`||e===`Y`?ce():(e===`n`||e===`N`)&&(A(`list`),M(null))},{isActive:!_&&E===`confirm-remove`}),d)return(0,J.jsx)(p,{children:`Loading marketplaces…`});if(l.length===0)return(0,J.jsxs)(C,{flexDirection:`column`,children:[(0,J.jsx)(C,{marginBottom:1,children:(0,J.jsx)(p,{bold:!0,children:`Manage marketplaces`})}),(0,J.jsxs)(C,{flexDirection:`row`,gap:1,children:[(0,J.jsxs)(p,{color:`suggestion`,children:[a.pointer,` +`]}),(0,J.jsx)(p,{bold:!0,color:`suggestion`,children:`Add Marketplace`})]}),(0,J.jsx)(C,{marginLeft:3,children:(0,J.jsx)(p,{dimColor:!0,italic:!0,children:i.pending?(0,J.jsxs)(J.Fragment,{children:[`Press `,i.keyName,` again to go back`]}):(0,J.jsxs)(g,{children:[(0,J.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`select`}),(0,J.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})})]});if(E===`confirm-remove`&&j){let e=j.installedPlugins?.length||0;return(0,J.jsxs)(C,{flexDirection:`column`,children:[(0,J.jsxs)(p,{bold:!0,color:`warning`,children:[`Remove marketplace `,(0,J.jsx)(p,{italic:!0,children:j.name}),`?`]}),(0,J.jsxs)(C,{flexDirection:`column`,children:[e>0&&(0,J.jsx)(C,{marginTop:1,children:(0,J.jsxs)(p,{color:`warning`,children:[`This will also uninstall `,e,` `,O(e,`plugin`),` from this marketplace:`]})}),j.installedPlugins&&j.installedPlugins.length>0&&(0,J.jsx)(C,{flexDirection:`column`,marginTop:1,marginLeft:2,children:j.installedPlugins.map(e=>(0,J.jsxs)(p,{dimColor:!0,children:[`• `,e.name]},e.name))}),(0,J.jsx)(C,{marginTop:1,children:(0,J.jsxs)(p,{children:[`Press `,(0,J.jsx)(p,{bold:!0,children:`y`}),` to confirm or `,(0,J.jsx)(p,{bold:!0,children:`n`}),` to cancel`]})})]})]})}if(E===`details`&&j){let e=j.pendingUpdate||_,t=le(j);return(0,J.jsxs)(C,{flexDirection:`column`,children:[(0,J.jsx)(p,{bold:!0,children:j.name}),(0,J.jsx)(p,{dimColor:!0,children:j.source}),(0,J.jsx)(C,{marginTop:1,children:(0,J.jsxs)(p,{children:[j.pluginCount||0,` available `,O(j.pluginCount||0,`plugin`)]})}),j.installedPlugins&&j.installedPlugins.length>0&&(0,J.jsxs)(C,{flexDirection:`column`,marginTop:1,children:[(0,J.jsxs)(p,{bold:!0,children:[`Installed plugins (`,j.installedPlugins.length,`):`]}),(0,J.jsx)(C,{flexDirection:`column`,marginLeft:1,children:j.installedPlugins.map(e=>(0,J.jsxs)(C,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(p,{children:a.bullet}),(0,J.jsxs)(C,{flexDirection:`column`,children:[(0,J.jsx)(p,{children:e.name}),(0,J.jsx)(p,{dimColor:!0,children:e.manifest.description})]})]},e.name))})]}),e&&(0,J.jsxs)(C,{marginTop:1,flexDirection:`column`,children:[(0,J.jsx)(p,{color:`claude`,children:`Updating marketplace…`}),w&&(0,J.jsx)(p,{dimColor:!0,children:w})]}),!e&&ee&&(0,J.jsx)(C,{marginTop:1,children:(0,J.jsx)(p,{color:`claude`,children:ee})}),!e&&b&&(0,J.jsx)(C,{marginTop:1,children:(0,J.jsx)(p,{color:`error`,children:b})}),!e&&(0,J.jsx)(C,{flexDirection:`column`,marginTop:1,children:t.map((e,t)=>{if(!e)return null;let n=t===N;return(0,J.jsxs)(C,{children:[(0,J.jsxs)(p,{color:n?`suggestion`:void 0,children:[n?a.pointer:` `,` `,e.label]}),e.secondaryLabel&&(0,J.jsxs)(p,{dimColor:!0,children:[` `,e.secondaryLabel]})]},e.value)})}),!e&&!D()&&j.autoUpdate&&(0,J.jsx)(C,{marginTop:1,children:(0,J.jsx)(p,{dimColor:!0,children:`Auto-update enabled. Claude Code will automatically update this marketplace and its installed plugins.`})}),(0,J.jsx)(C,{marginLeft:3,children:(0,J.jsx)(p,{dimColor:!0,italic:!0,children:e?(0,J.jsx)(J.Fragment,{children:`Please wait…`}):(0,J.jsxs)(g,{children:[(0,J.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`select`}),(0,J.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})})]})}let{updateCount:I,removeCount:de}=ae();return(0,J.jsxs)(C,{flexDirection:`column`,children:[(0,J.jsx)(C,{marginBottom:1,children:(0,J.jsx)(p,{bold:!0,children:`Manage marketplaces`})}),(0,J.jsxs)(C,{flexDirection:`row`,gap:1,marginBottom:1,children:[(0,J.jsxs)(p,{color:m===0?`suggestion`:void 0,children:[m===0?a.pointer:` `,` +`]}),(0,J.jsx)(p,{bold:!0,color:m===0?`suggestion`:void 0,children:`Add Marketplace`})]}),(0,J.jsx)(C,{flexDirection:`column`,children:l.map((e,t)=>{let n=t+1===m,r=[];return e.pendingUpdate&&r.push(`UPDATE`),e.pendingRemove&&r.push(`REMOVE`),(0,J.jsxs)(C,{flexDirection:`row`,gap:1,marginBottom:1,children:[(0,J.jsxs)(p,{color:n?`suggestion`:void 0,children:[n?a.pointer:` `,` `,e.pendingRemove?a.cross:a.bullet]}),(0,J.jsxs)(C,{flexDirection:`column`,flexGrow:1,children:[(0,J.jsxs)(C,{flexDirection:`row`,gap:1,children:[(0,J.jsxs)(p,{bold:!0,strikethrough:e.pendingRemove,dimColor:e.pendingRemove,children:[e.name===`claude-plugins-official`&&(0,J.jsx)(p,{color:`claude`,children:`✻ `}),e.name,e.name===`claude-plugins-official`&&(0,J.jsx)(p,{color:`claude`,children:` ✻`})]}),r.length>0&&(0,J.jsxs)(p,{color:`warning`,children:[`[`,r.join(`, `),`]`]})]}),(0,J.jsx)(p,{dimColor:!0,children:e.source}),(0,J.jsxs)(p,{dimColor:!0,children:[e.pluginCount!==void 0&&(0,J.jsxs)(J.Fragment,{children:[e.pluginCount,` available`]}),e.installedPlugins&&e.installedPlugins.length>0&&(0,J.jsxs)(J.Fragment,{children:[` • `,e.installedPlugins.length,` installed`]}),e.lastUpdated&&(0,J.jsxs)(J.Fragment,{children:[` • Updated `,new Date(e.lastUpdated).toLocaleDateString()]})]})]})]},e.name)})}),F()&&(0,J.jsxs)(C,{marginTop:1,flexDirection:`column`,children:[(0,J.jsxs)(p,{children:[(0,J.jsx)(p,{bold:!0,children:`Pending changes:`}),` `,(0,J.jsx)(p,{dimColor:!0,children:`Enter to apply`})]}),I>0&&(0,J.jsxs)(p,{children:[`• Update `,I,` `,O(I,`marketplace`)]}),de>0&&(0,J.jsxs)(p,{color:`warning`,children:[`• Remove `,de,` `,O(de,`marketplace`)]})]}),_&&(0,J.jsx)(C,{marginTop:1,children:(0,J.jsx)(p,{color:`claude`,children:`Processing changes…`})}),b&&(0,J.jsx)(C,{marginTop:1,children:(0,J.jsx)(p,{color:`error`,children:b})}),(0,J.jsx)(Er,{exitState:i,hasPendingActions:F()})]})}function Er({exitState:e,hasPendingActions:t}){return e.pending?(0,J.jsx)(C,{marginTop:1,children:(0,J.jsxs)(p,{dimColor:!0,italic:!0,children:[`Press `,e.keyName,` again to go back`]})}):(0,J.jsx)(C,{marginTop:1,children:(0,J.jsx)(p,{dimColor:!0,italic:!0,children:(0,J.jsxs)(g,{children:[t&&(0,J.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`apply changes`}),!t&&(0,J.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`select`}),!t&&(0,J.jsx)(h,{shortcut:`u`,action:`update`}),!t&&(0,J.jsx)(h,{shortcut:`r`,action:`remove`}),(0,J.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:t?`cancel`:`go back`})]})})})}var Dr,J,Or=e((()=>{i(),l(),Dr=t(l(),1),me(),L(),x(),Kt(),Se(),T(),I(),dt(),rt(),Et(),wn(),Ft(),se(),F(),M(),J=w()}));function kr(e){switch(e.type){case`path-not-found`:return`${e.component} path not found: ${e.path}`;case`git-auth-failed`:return`Git ${e.authType.toUpperCase()} authentication failed for ${e.gitUrl}`;case`git-timeout`:return`Git ${e.operation} timed out for ${e.gitUrl}`;case`network-error`:return`Network error accessing ${e.url}${e.details?`: ${e.details}`:``}`;case`manifest-parse-error`:return`Failed to parse manifest at ${e.manifestPath}: ${e.parseError}`;case`manifest-validation-error`:return`Invalid manifest at ${e.manifestPath}: ${e.validationErrors.join(`, `)}`;case`plugin-not-found`:return`Plugin "${e.pluginId}" not found in marketplace "${e.marketplace}"`;case`marketplace-not-found`:return`Marketplace "${e.marketplace}" not found`;case`marketplace-load-failed`:return`Failed to load marketplace "${e.marketplace}": ${e.reason}`;case`mcp-config-invalid`:return`Invalid MCP server config for "${e.serverName}": ${e.validationError}`;case`mcp-server-suppressed-duplicate`:{let t=e.duplicateOf.startsWith(`plugin:`)?`server provided by plugin "${e.duplicateOf.split(`:`)[1]??`?`}"`:`already-configured "${e.duplicateOf}"`;return`MCP server "${e.serverName}" skipped — same command/URL as ${t}`}case`hook-load-failed`:return`Failed to load hooks from ${e.hookPath}: ${e.reason}`;case`component-load-failed`:return`Failed to load ${e.component} from ${e.path}: ${e.reason}`;case`mcpb-download-failed`:return`Failed to download MCPB from ${e.url}: ${e.reason}`;case`mcpb-extract-failed`:return`Failed to extract MCPB ${e.mcpbPath}: ${e.reason}`;case`mcpb-invalid-manifest`:return`MCPB manifest invalid at ${e.mcpbPath}: ${e.validationError}`;case`marketplace-blocked-by-policy`:return e.blockedByBlocklist?`Marketplace "${e.marketplace}" is blocked by enterprise policy`:`Marketplace "${e.marketplace}" is not in the allowed marketplace list`;case`dependency-unsatisfied`:return e.reason===`not-enabled`?`Dependency "${e.dependency}" is disabled`:`Dependency "${e.dependency}" is not installed`;case`lsp-config-invalid`:return`Invalid LSP server config for "${e.serverName}": ${e.validationError}`;case`lsp-server-start-failed`:return`LSP server "${e.serverName}" failed to start: ${e.reason}`;case`lsp-server-crashed`:return e.signal?`LSP server "${e.serverName}" crashed with signal ${e.signal}`:`LSP server "${e.serverName}" crashed with exit code ${e.exitCode??`unknown`}`;case`lsp-request-timeout`:return`LSP server "${e.serverName}" timed out on ${e.method} after ${e.timeoutMs}ms`;case`lsp-request-failed`:return`LSP server "${e.serverName}" ${e.method} failed: ${e.error}`;case`plugin-cache-miss`:return`Plugin "${e.plugin}" not cached at ${e.installPath}`;case`generic-error`:return e.error}return it(e)}function Ar(e){switch(e.type){case`path-not-found`:return`Check that the path in your manifest or marketplace config is correct`;case`git-auth-failed`:return e.authType===`ssh`?`Configure SSH keys or use HTTPS URL instead`:`Configure credentials or use SSH URL instead`;case`git-timeout`:case`network-error`:return`Check your internet connection and try again`;case`manifest-parse-error`:return`Check manifest file syntax in the plugin directory`;case`manifest-validation-error`:return`Check manifest file follows the required schema`;case`plugin-not-found`:return`Plugin may not exist in marketplace "${e.marketplace}"`;case`marketplace-not-found`:return e.availableMarketplaces.length>0?`Available marketplaces: ${e.availableMarketplaces.join(`, `)}`:`Add the marketplace first using /plugin marketplace add`;case`mcp-config-invalid`:return`Check MCP server configuration in .mcp.json or manifest`;case`mcp-server-suppressed-duplicate`:return e.duplicateOf.startsWith(`plugin:`)?`Disable plugin "${e.duplicateOf.split(`:`)[1]??`the other plugin`}" if you want this plugin's version instead`:`Remove "${e.duplicateOf}" from your MCP config if you want the plugin's version instead`;case`hook-load-failed`:return`Check hooks.json file syntax and structure`;case`component-load-failed`:return`Check ${e.component} directory structure and file permissions`;case`mcpb-download-failed`:return`Check your internet connection and URL accessibility`;case`mcpb-extract-failed`:return`Verify the MCPB file is valid and not corrupted`;case`mcpb-invalid-manifest`:return`Contact the plugin author about the invalid manifest`;case`marketplace-blocked-by-policy`:return e.blockedByBlocklist?`This marketplace source is explicitly blocked by your administrator`:e.allowedSources.length>0?`Allowed sources: ${e.allowedSources.join(`, `)}`:`Contact your administrator to configure allowed marketplace sources`;case`dependency-unsatisfied`:return e.reason===`not-enabled`?`Enable "${e.dependency}" or uninstall "${e.plugin}"`:`Install "${e.dependency}" or uninstall "${e.plugin}"`;case`lsp-config-invalid`:return`Check LSP server configuration in the plugin manifest`;case`lsp-server-start-failed`:case`lsp-server-crashed`:case`lsp-request-timeout`:case`lsp-request-failed`:return`Check LSP server logs with --debug for details`;case`plugin-cache-miss`:return`Run /plugins to refresh the plugin cache`;case`marketplace-load-failed`:case`generic-error`:return null}return null}var jr=e((()=>{ut()}));function Mr({item:e,isSelected:t}){let[n]=u();if(e.type===`plugin`){let r,i;return e.pendingToggle?(r=S(`suggestion`,n)(a.arrowRight),i=e.pendingToggle===`will-enable`?`will enable`:`will disable`):e.errorCount>0?(r=S(`error`,n)(a.cross),i=`${e.errorCount} ${O(e.errorCount,`error`)}`):e.isEnabled?(r=S(`success`,n)(a.tick),i=`enabled`):(r=S(`inactive`,n)(a.radioOff),i=`disabled`),(0,Y.jsxs)(C,{children:[(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:t?`${a.pointer} `:` `}),(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:e.name}),(0,Y.jsxs)(p,{dimColor:!t,children:[` `,(0,Y.jsx)(p,{backgroundColor:`userMessageBackground`,children:`Plugin`})]}),(0,Y.jsxs)(p,{dimColor:!0,children:[` · `,e.marketplace]}),(0,Y.jsxs)(p,{dimColor:!t,children:[` · `,r,` `]}),(0,Y.jsx)(p,{dimColor:!t,children:i})]})}if(e.type===`flagged-plugin`){let r=S(`warning`,n)(a.warning);return(0,Y.jsxs)(C,{children:[(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:t?`${a.pointer} `:` `}),(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:e.name}),(0,Y.jsxs)(p,{dimColor:!t,children:[` `,(0,Y.jsx)(p,{backgroundColor:`userMessageBackground`,children:`Plugin`})]}),(0,Y.jsxs)(p,{dimColor:!0,children:[` · `,e.marketplace]}),(0,Y.jsxs)(p,{dimColor:!t,children:[` · `,r,` `]}),(0,Y.jsx)(p,{dimColor:!t,children:`removed`})]})}if(e.type===`failed-plugin`){let r=S(`error`,n)(a.cross),i=`failed to load · ${e.errorCount} ${O(e.errorCount,`error`)}`;return(0,Y.jsxs)(C,{children:[(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:t?`${a.pointer} `:` `}),(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:e.name}),(0,Y.jsxs)(p,{dimColor:!t,children:[` `,(0,Y.jsx)(p,{backgroundColor:`userMessageBackground`,children:`Plugin`})]}),(0,Y.jsxs)(p,{dimColor:!0,children:[` · `,e.marketplace]}),(0,Y.jsxs)(p,{dimColor:!t,children:[` · `,r,` `]}),(0,Y.jsx)(p,{dimColor:!t,children:i})]})}let r,i;return e.status===`connected`?(r=S(`success`,n)(a.tick),i=`connected`):e.status===`disabled`?(r=S(`inactive`,n)(a.radioOff),i=`disabled`):e.status===`pending`?(r=S(`inactive`,n)(a.radioOff),i=`connecting…`):e.status===`needs-auth`?(r=S(`warning`,n)(a.triangleUpOutline),i=`Enter to auth`):(r=S(`error`,n)(a.cross),i=`failed`),e.indented?(0,Y.jsxs)(C,{children:[(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:t?`${a.pointer} `:` `}),(0,Y.jsx)(p,{dimColor:!t,children:`└ `}),(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:e.name}),(0,Y.jsxs)(p,{dimColor:!t,children:[` `,(0,Y.jsx)(p,{backgroundColor:`userMessageBackground`,children:`MCP`})]}),(0,Y.jsxs)(p,{dimColor:!t,children:[` · `,r,` `]}),(0,Y.jsx)(p,{dimColor:!t,children:i})]}):(0,Y.jsxs)(C,{children:[(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:t?`${a.pointer} `:` `}),(0,Y.jsx)(p,{color:t?`suggestion`:void 0,children:e.name}),(0,Y.jsxs)(p,{dimColor:!t,children:[` `,(0,Y.jsx)(p,{backgroundColor:`userMessageBackground`,children:`MCP`})]}),(0,Y.jsxs)(p,{dimColor:!t,children:[` · `,r,` `]}),(0,Y.jsx)(p,{dimColor:!t,children:i})]})}var Y,Nr=e((()=>{i(),l(),x(),M(),Y=w()}));async function Pr(e){try{return(await En.readdir(e,{withFileTypes:!0})).filter(e=>e.isFile()&&e.name.endsWith(`.md`)).map(e=>Tn.basename(e.name,`.md`))}catch(t){return fe(`Failed to read plugin components from ${e}: ${pe(t)}`,{level:`error`}),be(ue(t)),[]}}async function Fr(e){try{let t=await En.readdir(e,{withFileTypes:!0}),n=[];for(let r of t)if(r.isDirectory()||r.isSymbolicLink()){let t=Tn.join(e,r.name,`SKILL.md`);try{(await En.stat(t)).isFile()&&n.push(r.name)}catch{}}return n}catch(t){return fe(`Failed to read skill directories from ${e}: ${pe(t)}`,{level:`error`}),be(ue(t)),[]}}function Ir({plugin:e,marketplace:t}){let[n,r]=(0,X.useState)(null),[i,a]=(0,X.useState)(!0),[o,s]=(0,X.useState)(null);return(0,X.useEffect)(()=>{async function n(){try{if(t===`builtin`){let t=Ut(e.name);if(t){let e=t.skills?.map(e=>e.name)??[],n=t.hooks?Object.keys(t.hooks):[],i=t.mcpServers?Object.keys(t.mcpServers):[];r({commands:null,agents:null,skills:e.length>0?e:null,hooks:n.length>0?n:null,mcpServers:i.length>0?i:null})}else s(`Built-in plugin ${e.name} not found`);a(!1);return}let n=(await Ke(t)).plugins.find(t=>t.name===e.name);if(n){let t=[];e.commandsPath&&t.push(e.commandsPath),e.commandsPaths&&t.push(...e.commandsPaths);let i=[];for(let e of t)if(typeof e==`string`){let t=await Pr(e);i.push(...t)}let a=[];e.agentsPath&&a.push(e.agentsPath),e.agentsPaths&&a.push(...e.agentsPaths);let o=[];for(let e of a)if(typeof e==`string`){let t=await Pr(e);o.push(...t)}let s=[];e.skillsPath&&s.push(e.skillsPath),e.skillsPaths&&s.push(...e.skillsPaths);let c=[];for(let e of s)if(typeof e==`string`){let t=await Fr(e);c.push(...t)}let l=[];e.hooksConfig&&l.push(Object.keys(e.hooksConfig)),n.hooks&&l.push(n.hooks);let u=[];e.mcpServers&&u.push(Object.keys(e.mcpServers)),n.mcpServers&&u.push(n.mcpServers),r({commands:i.length>0?i:null,agents:o.length>0?o:null,skills:c.length>0?c:null,hooks:l.length>0?l:null,mcpServers:u.length>0?u:null})}else s(`Plugin ${e.name} not found in marketplace`)}catch(e){s(e instanceof Error?e.message:`Failed to load components`)}finally{a(!1)}}n()},[e.name,e.commandsPath,e.commandsPaths,e.agentsPath,e.agentsPaths,e.skillsPath,e.skillsPaths,e.hooksConfig,e.mcpServers,t]),i?null:o?(0,Z.jsxs)(C,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsx)(p,{bold:!0,children:`Components:`}),(0,Z.jsxs)(p,{dimColor:!0,children:[`Error: `,o]})]}):!n||!(n.commands||n.agents||n.skills||n.hooks||n.mcpServers)?null:(0,Z.jsxs)(C,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsx)(p,{bold:!0,children:`Installed components:`}),n.commands?(0,Z.jsxs)(p,{dimColor:!0,children:[`• Commands:`,` `,typeof n.commands==`string`?n.commands:Array.isArray(n.commands)?n.commands.join(`, `):Object.keys(n.commands).join(`, `)]}):null,n.agents?(0,Z.jsxs)(p,{dimColor:!0,children:[`• Agents:`,` `,typeof n.agents==`string`?n.agents:Array.isArray(n.agents)?n.agents.join(`, `):Object.keys(n.agents).join(`, `)]}):null,n.skills?(0,Z.jsxs)(p,{dimColor:!0,children:[`• Skills:`,` `,typeof n.skills==`string`?n.skills:Array.isArray(n.skills)?n.skills.join(`, `):Object.keys(n.skills).join(`, `)]}):null,n.hooks?(0,Z.jsxs)(p,{dimColor:!0,children:[`• Hooks:`,` `,typeof n.hooks==`string`?n.hooks:Array.isArray(n.hooks)?n.hooks.map(String).join(`, `):typeof n.hooks==`object`&&n.hooks!==null?Object.keys(n.hooks).join(`, `):String(n.hooks)]}):null,n.mcpServers?(0,Z.jsxs)(p,{dimColor:!0,children:[`• MCP Servers:`,` `,typeof n.mcpServers==`string`?n.mcpServers:Array.isArray(n.mcpServers)?n.mcpServers.map(String).join(`, `):typeof n.mcpServers==`object`&&n.mcpServers!==null?Object.keys(n.mcpServers).join(`, `):String(n.mcpServers)]}):null]})}async function Lr(e,t){let n=(await Ke(t))?.plugins.find(t=>t.name===e);return n&&typeof n.source==`string`?`Local plugins cannot be updated remotely. To update, modify the source at: ${n.source}`:null}function Rr(e){return e.filter(e=>{let t=e.source.split(`@`)[1]||`local`;return!_t(`${e.name}@${t}`)})}function zr({setViewState:e,setResult:t,onManageComplete:n,onSearchModeChange:r,targetPlugin:i,targetMarketplace:o,action:c}){let l=Mt(e=>e.mcp.clients),u=Mt(e=>e.mcp.tools),m=Mt(e=>e.plugins.errors),h=mn(),[_,y]=(0,X.useState)(!1),b=(0,X.useCallback)(e=>{y(e),r?.(e)},[r]),x=d(),{columns:ee}=s(),[S,w]=(0,X.useState)(`plugin-list`),{query:T,setQuery:E,cursorOffset:D}=xn({isActive:S===`plugin-list`&&_,onExit:()=>{b(!1)}}),[A,j]=(0,X.useState)(null),[M,N]=(0,X.useState)([]),[ie,F]=(0,X.useState)([]),[ae,oe]=(0,X.useState)(!0),[se,le]=(0,X.useState)(new Map),I=(0,X.useRef)(!1),de=(0,X.useRef)(void 0),me=_n();te(`confirm:no`,Br.useCallback(()=>{if(S===`plugin-details`)w(`plugin-list`),j(null),z(null);else if(typeof S==`object`&&S.type===`failed-plugin-details`)w(`plugin-list`),z(null);else if(S===`configuring`)w(`plugin-details`),ke(null);else if(typeof S==`object`&&(S.type===`plugin-options`||S.type===`configuring-options`))w(`plugin-list`),j(null),t(`Plugin enabled. Configuration skipped — run /reload-plugins to apply.`),n&&n();else if(typeof S==`object`&&S.type===`flagged-detail`)w(`plugin-list`),z(null);else if(typeof S==`object`&&S.type===`mcp-detail`)w(`plugin-list`),z(null);else if(typeof S==`object`&&S.type===`mcp-tools`)w({type:`mcp-detail`,client:S.client});else if(typeof S==`object`&&S.type===`mcp-tool-detail`)w({type:`mcp-tools`,client:S.client});else{if(se.size>0){t(`Run /reload-plugins to apply plugin changes.`);return}e({type:`menu`})}},[S,e,se,t]),{context:`Confirmation`,isActive:(S!==`plugin-list`||!_)&&S!==`confirm-project-uninstall`&&!(typeof S==`object`&&S.type===`confirm-data-cleanup`)});let he=e=>e.type===`connected`?`connected`:e.type===`disabled`?`disabled`:e.type===`pending`?`pending`:e.type===`needs-auth`?`needs-auth`:`failed`,ge=(0,X.useMemo)(()=>{let e=P(),t=new Map;for(let e of l)if(e.name.startsWith(`plugin:`)){let n=e.name.split(`:`);if(n.length>=3){let r=n[1],i=n.slice(2).join(`:`),a=t.get(r)||[];a.push({displayName:i,client:e}),t.set(r,a)}}let n=[];for(let r of ie){let i=`${r.plugin.name}@${r.marketplace}`,a=e?.enabledPlugins?.[i]!==!1,o=m.filter(e=>`plugin`in e&&e.plugin===r.plugin.name||e.source===i||e.source.startsWith(`${r.plugin.name}@`)),s=r.plugin.isBuiltin?`builtin`:r.scope||`user`;n.push({item:{type:`plugin`,id:i,name:r.plugin.name,description:r.plugin.manifest.description,marketplace:r.marketplace,scope:s,isEnabled:a,errorCount:o.length,errors:o,plugin:r.plugin,pendingEnable:r.pendingEnable,pendingUpdate:r.pendingUpdate,pendingToggle:se.get(i)},originalScope:s,childMcps:t.get(r.plugin.name)||[]})}let r=new Set(n.map(({item:e})=>e.id)),i=new Set(n.map(({item:e})=>e.name)),a=new Map;for(let e of m){if(r.has(e.source)||`plugin`in e&&typeof e.plugin==`string`&&i.has(e.plugin))continue;let t=a.get(e.source)||[];t.push(e),a.set(e.source,t)}let o=Xt(),s=[];for(let[e,t]of a){if(e in h)continue;let n=Vt(e),r=n.name||e,i=n.marketplace||`unknown`,a=o.get(e),c=a===`flag`||a===void 0?`user`:a;s.push({type:`failed-plugin`,id:e,name:r,marketplace:i,scope:c,errorCount:t.length,errors:t})}let c=[];for(let e of l)e.name!==`ide`&&(e.name.startsWith(`plugin:`)||c.push({type:`mcp`,id:`mcp:${e.name}`,name:e.name,description:void 0,scope:e.config.scope,status:he(e),client:e}));let u={flagged:-1,project:0,local:1,user:2,enterprise:3,managed:4,dynamic:5,builtin:6},d=[],f=new Map;for(let{item:e,originalScope:t,childMcps:r}of n){let n=e.scope;f.has(n)||f.set(n,[]),f.get(n).push(e);for(let{displayName:e,client:n}of r){let r=t===`builtin`?`user`:t;f.has(r)||f.set(r,[]),f.get(r).push({type:`mcp`,id:`mcp:${n.name}`,name:e,description:void 0,scope:r,status:he(n),client:n,indented:!0})}}for(let e of c){let t=e.scope;f.has(t)||f.set(t,[]),f.get(t).push(e)}for(let e of s){let t=e.scope;f.has(t)||f.set(t,[]),f.get(t).push(e)}for(let[e,t]of Object.entries(h)){let n=Vt(e),r=n.name||e,i=n.marketplace||`unknown`;f.has(`flagged`)||f.set(`flagged`,[]),f.get(`flagged`).push({type:`flagged-plugin`,id:e,name:r,marketplace:i,scope:`flagged`,reason:`delisted`,text:`Removed from marketplace`,flaggedAt:t.flaggedAt})}let p=[...f.keys()].sort((e,t)=>(u[e]??99)-(u[t]??99));for(let e of p){let t=f.get(e),n=[],r=[],i=0;for(;i<t.length;){let e=t[i];if(e.type===`plugin`||e.type===`failed-plugin`||e.type===`flagged-plugin`){let r=[e];i++;let a=t[i];for(;a?.type===`mcp`&&a.indented;)r.push(a),i++,a=t[i];n.push(r)}else e.type===`mcp`&&!e.indented&&r.push(e),i++}n.sort((e,t)=>e[0].name.localeCompare(t[0].name)),r.sort((e,t)=>e.name.localeCompare(t.name));for(let e of n)d.push(...e);d.push(...r)}return d},[ie,l,m,se,h]),_e=(0,X.useMemo)(()=>ge.filter(e=>e.type===`flagged-plugin`).map(e=>e.id),[ge]);(0,X.useEffect)(()=>{_e.length>0&&pn(_e)},[_e]);let ve=(0,X.useMemo)(()=>{if(!T)return ge;let e=T.toLowerCase();return ge.filter(t=>t.name.toLowerCase().includes(e)||`description`in t&&t.description?.toLowerCase().includes(e))},[ge,T]),[ye,Se]=(0,X.useState)(0),Ce=fr({totalItems:ve.length,selectedIndex:ye,maxVisible:8}),[we,Te]=(0,X.useState)(0),[Ee,De]=(0,X.useState)(!1),[L,z]=(0,X.useState)(null),[Oe,ke]=(0,X.useState)(null),[Ae,je]=(0,X.useState)(!1),[Me,Ne]=(0,X.useState)(!1);(0,X.useEffect)(()=>{if(!A){Ne(!1);return}async function e(){let e=A.plugin.manifest.mcpServers,t=!1;if(e&&(t=typeof e==`string`&&yt(e)||Array.isArray(e)&&e.some(e=>typeof e==`string`&&yt(e))),!t)try{let e=Tn.join(A.plugin.path,`..`),n=Tn.join(e,`.claude-plugin`,`marketplace.json`),r=ce(await En.readFile(n,`utf-8`)).plugins?.find(e=>e.name===A.plugin.name);if(r?.mcpServers){let e=r.mcpServers;t=typeof e==`string`&&yt(e)||Array.isArray(e)&&e.some(e=>typeof e==`string`&&yt(e))}}catch(e){fe(`Failed to read raw marketplace.json: ${e}`)}Ne(t)}e()},[A]),(0,X.useEffect)(()=>{async function e(){oe(!0);try{let{enabled:e,disabled:t}=await Rt(),n=P(),r=Rr([...e,...t]),i={};for(let e of r){let t=e.source.split(`@`)[1]||`local`;i[t]||(i[t]=[]),i[t].push(e)}let a=[];for(let[e,t]of Object.entries(i)){let r=xe(t,t=>{let r=`${t.name}@${e}`;return n?.enabledPlugins?.[r]!==!1}),i=t.length-r;a.push({name:e,installedPlugins:t,enabledCount:r,disabledCount:i})}a.sort((e,t)=>e.name===`claude-plugin-directory`?-1:t.name===`claude-plugin-directory`?1:e.name.localeCompare(t.name)),N(a);let o=[];for(let e of a)for(let t of e.installedPlugins){let n=`${t.name}@${e.name}`,r=t.isBuiltin?`builtin`:nn(n).scope;o.push({plugin:t,marketplace:e.name,scope:r,pendingEnable:void 0,pendingUpdate:!1})}F(o),Se(0)}finally{oe(!1)}}e()},[]),(0,X.useEffect)(()=>{if(!I.current&&i&&M.length>0&&!ae){let{name:e,marketplace:n}=Vt(i),r=o??n,a=r?M.filter(e=>e.name===r):M;for(let t of a){let n=t.installedPlugins.find(t=>t.name===e);if(n){let{scope:e}=nn(`${n.name}@${t.name}`);j({plugin:n,marketplace:t.name,scope:e,pendingEnable:void 0,pendingUpdate:!1}),w(`plugin-details`),de.current=c,I.current=!0;return}}let s=ge.find(t=>t.type===`failed-plugin`&&t.name===e);s&&s.type===`failed-plugin`&&(w({type:`failed-plugin-details`,plugin:{id:s.id,name:s.name,marketplace:s.marketplace,errors:s.errors,scope:s.scope}}),I.current=!0),!I.current&&c&&(I.current=!0,t(`Plugin "${i}" is not installed in this project`))}},[i,o,M,ae,ge,c,t]);let Fe=async r=>{if(!A)return;let i=A.scope||`user`,a=i===`builtin`;if(a&&(r===`update`||r===`uninstall`)){z(`Built-in plugins cannot be updated or uninstalled.`);return}if(!a&&!tn(i)&&r!==`update`){z(`This plugin is managed by your organization. Contact your admin to disable it.`);return}De(!0),z(null);try{let o=`${A.plugin.name}@${A.marketplace}`,s;switch(r){case`enable`:{let e=await Zt(o);if(!e.success)throw Error(e.message);break}case`disable`:{let e=await en(o);if(!e.success)throw Error(e.message);s=e.reverseDependents;break}case`uninstall`:{if(a||!tn(i))break;if(an(o)){De(!1),w(`confirm-project-uninstall`);return}let e=ze().plugins[o],t=!e||e.length<=1?await Ie(o):null;if(t){De(!1),w({type:`confirm-data-cleanup`,size:t});return}let n=await Qt(o,i);if(!n.success)throw Error(n.message);s=n.reverseDependents;break}case`update`:{if(a)break;let r=await $t(o,i);if(!r.success)throw Error(r.message);if(r.alreadyUpToDate){t(`${A.plugin.name} is already at the latest version (${r.newVersion}).`),n&&await n(),e({type:`menu`});return}break}}mt();let c=`${A.plugin.name}@${A.marketplace}`;if(P()?.enabledPlugins?.[c]!==!1){De(!1),w({type:`plugin-options`});return}let l=r===`enable`?`Enabled`:r===`disable`?`Disabled`:r===`update`?`Updated`:`Uninstalled`,u=s&&s.length>0?` · required by ${s.join(`, `)}`:``;t(`✓ ${l} ${A.plugin.name}${u}. Run /reload-plugins to apply.`),n&&await n(),e({type:`menu`})}catch(e){De(!1),z(`Failed to ${r}: ${e instanceof Error?e.message:String(e)}`),be(ue(e))}},Le=(0,X.useRef)(Fe);Le.current=Fe,(0,X.useEffect)(()=>{if(S===`plugin-details`&&A&&de.current){let e=de.current;de.current=void 0,Le.current(e)}},[S,A]);let Re=Br.useCallback(()=>{if(ye>=ve.length)return;let e=ve[ye];if(e?.type!==`flagged-plugin`)if(e?.type===`plugin`){let t=`${e.plugin.name}@${e.marketplace}`,n=P(),r=se.get(t),i=n?.enabledPlugins?.[t]!==!1,a=e.scope;if(a===`builtin`||tn(a)){let e=new Map(se);r?(e.delete(t),(async()=>{try{r===`will-disable`?await Zt(t):await en(t),mt()}catch(e){be(e)}})()):(e.set(t,i?`will-disable`:`will-enable`),(async()=>{try{i?await en(t):await Zt(t),mt()}catch(e){be(e)}})()),le(e)}}else e?.type===`mcp`&&me(e.client.name)},[ye,ve,se,ie,me]);v({"select:previous":()=>{ye===0?b(!0):Ce.handleSelectionChange(ye-1,Se)},"select:next":()=>{ye<ve.length-1&&Ce.handleSelectionChange(ye+1,Se)},"select:accept":Br.useCallback(()=>{if(ye>=ve.length)return;let e=ve[ye];if(e?.type===`plugin`){let t=ie.find(t=>t.plugin.name===e.plugin.name&&t.marketplace===e.marketplace);t&&(j(t),w(`plugin-details`),Te(0),z(null))}else e?.type===`flagged-plugin`?(w({type:`flagged-detail`,plugin:{id:e.id,name:e.name,marketplace:e.marketplace,reason:e.reason,text:e.text,flaggedAt:e.flaggedAt}}),z(null)):e?.type===`failed-plugin`?(w({type:`failed-plugin-details`,plugin:{id:e.id,name:e.name,marketplace:e.marketplace,errors:e.errors,scope:e.scope}}),Te(0),z(null)):e?.type===`mcp`&&(w({type:`mcp-detail`,client:e.client}),z(null))},[ye,ve,ie])},{context:`Select`,isActive:S===`plugin-list`&&!_}),v({"plugin:toggle":Re},{context:`Plugin`,isActive:S===`plugin-list`&&!_}),v({"select:accept":Br.useCallback(()=>{typeof S!=`object`||S.type!==`flagged-detail`||(hn(S.plugin.id),w(`plugin-list`))},[S])},{context:`Select`,isActive:typeof S==`object`&&S.type===`flagged-detail`});let Be=Br.useMemo(()=>{if(S!==`plugin-details`||!A)return[];let e=P(),t=`${A.plugin.name}@${A.marketplace}`,n=e?.enabledPlugins?.[t]!==!1,r=A.marketplace===`builtin`,i=[];return i.push({label:n?`Disable plugin`:`Enable plugin`,action:()=>void Fe(n?`disable`:`enable`)}),r||(i.push({label:A.pendingUpdate?`Unmark for update`:`Mark for update`,action:async()=>{try{let e=await Lr(A.plugin.name,A.marketplace);if(e){z(e);return}let t=[...ie],n=t.findIndex(e=>e.plugin.name===A.plugin.name&&e.marketplace===A.marketplace);n!==-1&&(t[n].pendingUpdate=!A.pendingUpdate,F(t),j({...A,pendingUpdate:!A.pendingUpdate}))}catch(e){z(e instanceof Error?e.message:`Failed to check plugin update availability`)}}}),Me&&i.push({label:`Configure`,action:async()=>{je(!0);try{let e=A.plugin.manifest.mcpServers,t=null;if(typeof e==`string`&&yt(e))t=e;else if(Array.isArray(e)){for(let n of e)if(typeof n==`string`&&yt(n)){t=n;break}}if(!t){z(`No MCPB file found in plugin`),je(!1);return}let n=`${A.plugin.name}@${A.marketplace}`,r=await nt(t,A.plugin.path,n,void 0,void 0,!0);`status`in r&&r.status===`needs-config`?(ke(r),w(`configuring`)):z(`Failed to load MCPB for configuration`)}catch(e){z(`Failed to load configuration: ${pe(e)}`)}finally{je(!1)}}}),A.plugin.manifest.userConfig&&Object.keys(A.plugin.manifest.userConfig).length>0&&i.push({label:`Configure options`,action:()=>{w({type:`configuring-options`,schema:A.plugin.manifest.userConfig})}}),i.push({label:`Update now`,action:()=>void Fe(`update`)}),i.push({label:`Uninstall`,action:()=>void Fe(`uninstall`)})),A.plugin.manifest.homepage&&i.push({label:`Open homepage`,action:()=>void Wt(A.plugin.manifest.homepage)}),A.plugin.manifest.repository&&i.push({label:`View repository`,action:()=>void Wt(A.plugin.manifest.repository)}),i.push({label:`Back to plugin list`,action:()=>{w(`plugin-list`),j(null),z(null)}}),i},[S,A,Me,ie]);if(v({"select:previous":()=>{we>0&&Te(we-1)},"select:next":()=>{we<Be.length-1&&Te(we+1)},"select:accept":()=>{Be[we]&&Be[we].action()}},{context:`Select`,isActive:S===`plugin-details`&&!!A}),v({"select:accept":()=>{typeof S==`object`&&S.type===`failed-plugin-details`&&(async()=>{De(!0),z(null);let e=S.plugin.id,t=S.plugin.scope,r=tn(t)?await Qt(e,t,!1):await Qt(e,`user`,!1),i=r.success;if(!i){for(let t of[`userSettings`,`projectSettings`,`localSettings`]){let n=k(t);n?.enabledPlugins?.[e]!==void 0&&(re(t,{enabledPlugins:{...n.enabledPlugins,[e]:void 0}}),i=!0)}mt()}i?(n&&await n(),De(!1),w(`plugin-list`)):(De(!1),z(r.message))})()}},{context:`Select`,isActive:typeof S==`object`&&S.type===`failed-plugin-details`&&S.plugin.scope!==`managed`}),v({"confirm:yes":()=>{if(!A)return;De(!0),z(null);let r=`${A.plugin.name}@${A.marketplace}`,{error:i}=re(`localSettings`,{enabledPlugins:{...k(`localSettings`)?.enabledPlugins,[r]:!1}});if(i){De(!1),z(`Failed to write settings: ${i.message}`);return}mt(),t(`✓ Disabled ${A.plugin.name} in .claude/settings.local.json. Run /reload-plugins to apply.`),n&&n(),e({type:`menu`})},"confirm:no":()=>{w(`plugin-details`),z(null)}},{context:`Confirmation`,isActive:S===`confirm-project-uninstall`&&!!A&&!Ee}),ne((r,i)=>{if(!A)return;let o=`${A.plugin.name}@${A.marketplace}`,s=A.scope;if(!s||s===`builtin`||!tn(s))return;let c=async r=>{De(!0),z(null);try{let i=await Qt(o,s,r);if(!i.success)throw Error(i.message);mt();let c=r?``:` · data preserved`;t(`${a.tick} ${i.message}${c}`),n&&n(),e({type:`menu`})}catch(e){De(!1),z(e instanceof Error?e.message:String(e))}};r===`y`||r===`Y`?c(!0):r===`n`||r===`N`?c(!1):i.escape&&(w(`plugin-details`),z(null))},{isActive:typeof S==`object`&&S.type===`confirm-data-cleanup`&&!!A&&!Ee}),Br.useEffect(()=>{Se(0)},[T]),ne((e,t)=>{let n=!t.ctrl&&!t.meta;_||(e===`/`&&n?(b(!0),E(``),Se(0)):n&&e.length>0&&!/^\s+$/.test(e)&&e!==`j`&&e!==`k`&&e!==` `&&(b(!0),E(e),Se(0)))},{isActive:S===`plugin-list`}),ae)return(0,Z.jsx)(p,{children:`Loading installed plugins…`});if(ge.length===0)return(0,Z.jsxs)(C,{flexDirection:`column`,children:[(0,Z.jsx)(C,{marginBottom:1,children:(0,Z.jsx)(p,{bold:!0,children:`Manage plugins`})}),(0,Z.jsx)(p,{children:`No plugins or MCP servers installed.`}),(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{dimColor:!0,children:`Esc to go back`})})]});if(typeof S==`object`&&S.type===`plugin-options`&&A){let r=`${A.plugin.name}@${A.marketplace}`;function i(r){t(r),n&&n(),e({type:`menu`})}return(0,Z.jsx)(er,{plugin:A.plugin,pluginId:r,onDone:(e,t)=>{switch(e){case`configured`:i(`✓ Enabled and configured ${A.plugin.name}. Run /reload-plugins to apply.`);break;case`skipped`:i(`✓ Enabled ${A.plugin.name}. Run /reload-plugins to apply.`);break;case`error`:i(`Failed to save configuration: ${t}`);break}}})}if(typeof S==`object`&&S.type===`configuring-options`&&A){let e=`${A.plugin.name}@${A.marketplace}`;return(0,Z.jsx)(Yn,{title:`Configure ${A.plugin.name}`,subtitle:`Plugin options`,configSchema:S.schema,initialValues:Ct(e),onSave:n=>{try{Dt(e,n,S.schema),mt(),t(`Configuration saved. Run /reload-plugins for changes to take effect.`)}catch(e){z(`Failed to save configuration: ${pe(e)}`)}w(`plugin-details`)},onCancel:()=>w(`plugin-details`)})}if(S===`configuring`&&Oe&&A){let e=`${A.plugin.name}@${A.marketplace}`;async function n(n){if(!(!Oe||!A))try{let r=A.plugin.manifest.mcpServers,i=null;if(typeof r==`string`&&yt(r))i=r;else if(Array.isArray(r)){for(let e of r)if(typeof e==`string`&&yt(e)){i=e;break}}if(!i){z(`No MCPB file found`),w(`plugin-details`);return}await nt(i,A.plugin.path,e,void 0,n),z(null),ke(null),w(`plugin-details`),t(`Configuration saved. Run /reload-plugins for changes to take effect.`)}catch(e){z(`Failed to save configuration: ${pe(e)}`),w(`plugin-details`)}}function r(){ke(null),w(`plugin-details`)}return(0,Z.jsx)(Yn,{title:`Configure ${Oe.manifest.name}`,subtitle:`Plugin: ${A.plugin.name}`,configSchema:Oe.configSchema,initialValues:Oe.existingConfig,onSave:n,onCancel:r})}if(typeof S==`object`&&S.type===`flagged-detail`){let e=S.plugin;return(0,Z.jsxs)(C,{flexDirection:`column`,children:[(0,Z.jsx)(C,{children:(0,Z.jsxs)(p,{bold:!0,children:[e.name,` @ `,e.marketplace]})}),(0,Z.jsxs)(C,{marginBottom:1,children:[(0,Z.jsx)(p,{dimColor:!0,children:`Status: `}),(0,Z.jsx)(p,{color:`error`,children:`Removed`})]}),(0,Z.jsxs)(C,{marginBottom:1,flexDirection:`column`,children:[(0,Z.jsxs)(p,{color:`error`,children:[`Removed from marketplace · reason: `,e.reason]}),(0,Z.jsx)(p,{children:e.text}),(0,Z.jsxs)(p,{dimColor:!0,children:[`Flagged on `,new Date(e.flaggedAt).toLocaleDateString()]})]}),(0,Z.jsx)(C,{marginTop:1,flexDirection:`column`,children:(0,Z.jsxs)(C,{children:[(0,Z.jsxs)(p,{children:[a.pointer,` `]}),(0,Z.jsx)(p,{color:`suggestion`,children:`Dismiss`})]})}),(0,Z.jsxs)(g,{children:[(0,Z.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`dismiss`}),(0,Z.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})]})}if(S===`confirm-project-uninstall`&&A)return(0,Z.jsxs)(C,{flexDirection:`column`,children:[(0,Z.jsxs)(p,{bold:!0,color:`warning`,children:[A.plugin.name,` is enabled in .claude/settings.json (shared with your team)`]}),(0,Z.jsxs)(C,{marginTop:1,flexDirection:`column`,children:[(0,Z.jsx)(p,{children:`Disable it just for you in .claude/settings.local.json?`}),(0,Z.jsx)(p,{dimColor:!0,children:`This has the same effect as uninstalling, without affecting other contributors.`})]}),L&&(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{color:`error`,children:L})}),(0,Z.jsx)(C,{marginTop:1,children:Ee?(0,Z.jsx)(p,{dimColor:!0,children:`Disabling…`}):(0,Z.jsxs)(g,{children:[(0,Z.jsx)(R,{action:`confirm:yes`,context:`Confirmation`,fallback:`y`,description:`disable`}),(0,Z.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]});if(typeof S==`object`&&S.type===`confirm-data-cleanup`&&A)return(0,Z.jsxs)(C,{flexDirection:`column`,children:[(0,Z.jsxs)(p,{bold:!0,children:[A.plugin.name,` has `,S.size.human,` of persistent data`]}),(0,Z.jsxs)(C,{marginTop:1,flexDirection:`column`,children:[(0,Z.jsx)(p,{children:`Delete it along with the plugin?`}),(0,Z.jsx)(p,{dimColor:!0,children:Pe(`${A.plugin.name}@${A.marketplace}`)})]}),L&&(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{color:`error`,children:L})}),(0,Z.jsx)(C,{marginTop:1,children:Ee?(0,Z.jsx)(p,{dimColor:!0,children:`Uninstalling…`}):(0,Z.jsxs)(p,{children:[(0,Z.jsx)(p,{bold:!0,children:`y`}),` to delete · `,(0,Z.jsx)(p,{bold:!0,children:`n`}),` to keep · `,(0,Z.jsx)(p,{bold:!0,children:`esc`}),` to cancel`]})})]});if(S===`plugin-details`&&A){let e=P(),t=`${A.plugin.name}@${A.marketplace}`,n=e?.enabledPlugins?.[t]!==!1,r=m.filter(e=>`plugin`in e&&e.plugin===A.plugin.name||e.source===t||e.source.startsWith(`${A.plugin.name}@`)),i=r.length===0?null:(0,Z.jsxs)(C,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsxs)(p,{bold:!0,color:`error`,children:[r.length,` `,O(r.length,`error`),`:`]}),r.map((e,t)=>{let n=Ar(e);return(0,Z.jsxs)(C,{flexDirection:`column`,marginLeft:2,children:[(0,Z.jsx)(p,{color:`error`,children:kr(e)}),n&&(0,Z.jsxs)(p,{dimColor:!0,italic:!0,children:[a.arrowRight,` `,n]})]},t)})]});return(0,Z.jsxs)(C,{flexDirection:`column`,children:[(0,Z.jsx)(C,{children:(0,Z.jsxs)(p,{bold:!0,children:[A.plugin.name,` @ `,A.marketplace]})}),(0,Z.jsxs)(C,{children:[(0,Z.jsx)(p,{dimColor:!0,children:`Scope: `}),(0,Z.jsx)(p,{children:A.scope||`user`})]}),A.plugin.manifest.version&&(0,Z.jsxs)(C,{children:[(0,Z.jsx)(p,{dimColor:!0,children:`Version: `}),(0,Z.jsx)(p,{children:A.plugin.manifest.version})]}),A.plugin.manifest.description&&(0,Z.jsx)(C,{marginBottom:1,children:(0,Z.jsx)(p,{children:A.plugin.manifest.description})}),A.plugin.manifest.author&&(0,Z.jsxs)(C,{children:[(0,Z.jsx)(p,{dimColor:!0,children:`Author: `}),(0,Z.jsx)(p,{children:A.plugin.manifest.author.name})]}),(0,Z.jsxs)(C,{marginBottom:1,children:[(0,Z.jsx)(p,{dimColor:!0,children:`Status: `}),(0,Z.jsx)(p,{color:n?`success`:`warning`,children:n?`Enabled`:`Disabled`}),A.pendingUpdate&&(0,Z.jsx)(p,{color:`suggestion`,children:` · Marked for update`})]}),(0,Z.jsx)(Ir,{plugin:A.plugin,marketplace:A.marketplace}),i,(0,Z.jsx)(C,{marginTop:1,flexDirection:`column`,children:Be.map((e,t)=>{let n=t===we;return(0,Z.jsxs)(C,{children:[n&&(0,Z.jsxs)(p,{children:[a.pointer,` `]}),!n&&(0,Z.jsx)(p,{children:` `}),(0,Z.jsx)(p,{bold:n,color:e.label.includes(`Uninstall`)?`error`:e.label.includes(`Update`)?`suggestion`:void 0,children:e.label})]},t)})}),Ee&&(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{children:`Processing…`})}),L&&(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{color:`error`,children:L})}),(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(g,{children:[(0,Z.jsx)(R,{action:`select:previous`,context:`Select`,fallback:`↑`,description:`navigate`}),(0,Z.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`select`}),(0,Z.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})]})}if(typeof S==`object`&&S.type===`failed-plugin-details`){let e=S.plugin,t=e.errors[0],n=t?kr(t):`Failed to load`;return(0,Z.jsxs)(C,{flexDirection:`column`,children:[(0,Z.jsxs)(p,{children:[(0,Z.jsx)(p,{bold:!0,children:e.name}),(0,Z.jsxs)(p,{dimColor:!0,children:[` @ `,e.marketplace]}),(0,Z.jsxs)(p,{dimColor:!0,children:[` (`,e.scope,`)`]})]}),(0,Z.jsx)(p,{color:`error`,children:n}),e.scope===`managed`?(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{dimColor:!0,children:`Managed by your organization — contact your admin`})}):(0,Z.jsxs)(C,{marginTop:1,children:[(0,Z.jsxs)(p,{color:`suggestion`,children:[a.pointer,` `]}),(0,Z.jsx)(p,{bold:!0,children:`Remove`})]}),Ee&&(0,Z.jsx)(p,{children:`Processing…`}),L&&(0,Z.jsx)(p,{color:`error`,children:L}),(0,Z.jsx)(C,{marginTop:1,children:(0,Z.jsx)(p,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(g,{children:[e.scope!==`managed`&&(0,Z.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`remove`}),(0,Z.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})]})}if(typeof S==`object`&&S.type===`mcp-detail`){let e=S.client,n=Ue(u,e.name).length,r=()=>{w({type:`mcp-tools`,client:e})},i=()=>{w(`plugin-list`)},a=e=>{e&&t(e),w(`plugin-list`)},o=e.config.scope,s=e.config.type;return s===`stdio`?(0,Z.jsx)(Fn,{server:{name:e.name,client:e,scope:o,transport:`stdio`,config:e.config},serverToolsCount:n,onViewTools:r,onCancel:i,onComplete:a,borderless:!0}):s===`sse`?(0,Z.jsx)(Nn,{server:{name:e.name,client:e,scope:o,transport:`sse`,isAuthenticated:void 0,config:e.config},serverToolsCount:n,onViewTools:r,onCancel:i,onComplete:a,borderless:!0}):s===`http`?(0,Z.jsx)(Nn,{server:{name:e.name,client:e,scope:o,transport:`http`,isAuthenticated:void 0,config:e.config},serverToolsCount:n,onViewTools:r,onCancel:i,onComplete:a,borderless:!0}):s===`claudeai-proxy`?(0,Z.jsx)(Nn,{server:{name:e.name,client:e,scope:o,transport:`claudeai-proxy`,isAuthenticated:void 0,config:e.config},serverToolsCount:n,onViewTools:r,onCancel:i,onComplete:a,borderless:!0}):(w(`plugin-list`),null)}if(typeof S==`object`&&S.type===`mcp-tools`){let e=S.client,t=e.config.scope,n=e.config.type,r;return r=n===`stdio`?{name:e.name,client:e,scope:t,transport:`stdio`,config:e.config}:n===`sse`?{name:e.name,client:e,scope:t,transport:`sse`,isAuthenticated:void 0,config:e.config}:n===`http`?{name:e.name,client:e,scope:t,transport:`http`,isAuthenticated:void 0,config:e.config}:{name:e.name,client:e,scope:t,transport:`claudeai-proxy`,isAuthenticated:void 0,config:e.config},(0,Z.jsx)(Vn,{server:r,onSelectTool:t=>{w({type:`mcp-tool-detail`,client:e,tool:t})},onBack:()=>w({type:`mcp-detail`,client:e})})}if(typeof S==`object`&&S.type===`mcp-tool-detail`){let{client:e,tool:t}=S,n=e.config.scope,r=e.config.type,i;return i=r===`stdio`?{name:e.name,client:e,scope:n,transport:`stdio`,config:e.config}:r===`sse`?{name:e.name,client:e,scope:n,transport:`sse`,isAuthenticated:void 0,config:e.config}:r===`http`?{name:e.name,client:e,scope:n,transport:`http`,isAuthenticated:void 0,config:e.config}:{name:e.name,client:e,scope:n,transport:`claudeai-proxy`,isAuthenticated:void 0,config:e.config},(0,Z.jsx)(Rn,{tool:t,server:i,onBack:()=>w({type:`mcp-tools`,client:e})})}let Ve=Ce.getVisibleItems(ve);return(0,Z.jsxs)(C,{flexDirection:`column`,children:[(0,Z.jsx)(C,{marginBottom:1,children:(0,Z.jsx)(f,{query:T,isFocused:_,isTerminalFocused:x,width:ee-4,cursorOffset:D})}),ve.length===0&&T&&(0,Z.jsx)(C,{marginBottom:1,children:(0,Z.jsxs)(p,{dimColor:!0,children:[`No items match "`,T,`"`]})}),Ce.scrollPosition.canScrollUp&&(0,Z.jsx)(C,{children:(0,Z.jsxs)(p,{dimColor:!0,children:[` `,a.arrowUp,` more above`]})}),Ve.map((e,t)=>{let n=Ce.toActualIndex(t)===ye&&!_,r=t>0?Ve[t-1]:null,i=!r||r.scope!==e.scope;return(0,Z.jsxs)(Br.Fragment,{children:[i&&(0,Z.jsx)(C,{marginTop:+(t>0),paddingLeft:2,children:(0,Z.jsx)(p,{dimColor:e.scope!==`flagged`,color:e.scope===`flagged`?`warning`:void 0,bold:e.scope===`flagged`,children:(e=>{switch(e){case`flagged`:return`Flagged`;case`project`:return`Project`;case`local`:return`Local`;case`user`:return`User`;case`enterprise`:return`Enterprise`;case`managed`:return`Managed`;case`builtin`:return`Built-in`;case`dynamic`:return`Built-in`;default:return e}})(e.scope)})}),(0,Z.jsx)(Mr,{item:e,isSelected:n})]},e.id)}),Ce.scrollPosition.canScrollDown&&(0,Z.jsx)(C,{children:(0,Z.jsxs)(p,{dimColor:!0,children:[` `,a.arrowDown,` more below`]})}),(0,Z.jsx)(C,{marginTop:1,marginLeft:1,children:(0,Z.jsx)(p,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(g,{children:[(0,Z.jsx)(p,{children:`type to search`}),(0,Z.jsx)(R,{action:`plugin:toggle`,context:`Plugin`,fallback:`Space`,description:`toggle`}),(0,Z.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`details`}),(0,Z.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})}),se.size>0&&(0,Z.jsx)(C,{marginLeft:1,children:(0,Z.jsx)(p,{dimColor:!0,italic:!0,children:`Run /reload-plugins to apply changes`})})]})}var Br,X,Z,Vr=e((()=>{i(),Br=t(l(),1),X=t(l(),1),L(),x(),Pn(),Ln(),Bn(),Wn(),bn(),Sn(),pt(),Kt(),Ht(),vn(),Re(),rn(),vt(),Se(),Gt(),de(),I(),ye(),dt(),Fe(),Et(),$e(),gt(),gn(),Bt(),Ft(),Ye(),Le(),Yt(),F(),le(),M(),jr(),Qn(),rr(),Nr(),hr(),Z=w()}));function Hr(e){if(!e)return{type:`menu`};let t=e.trim().split(/\s+/);switch(t[0]?.toLowerCase()){case`help`:case`--help`:case`-h`:return{type:`help`};case`install`:case`i`:{let e=t[1];if(!e)return{type:`install`};if(e.includes(`@`)){let[t,n]=e.split(`@`);return{type:`install`,plugin:t,marketplace:n}}return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`file://`)||e.includes(`/`)||e.includes(`\\`)?{type:`install`,marketplace:e}:{type:`install`,plugin:e}}case`manage`:return{type:`manage`};case`uninstall`:return{type:`uninstall`,plugin:t[1]};case`enable`:return{type:`enable`,plugin:t[1]};case`disable`:return{type:`disable`,plugin:t[1]};case`validate`:return{type:`validate`,path:t.slice(1).join(` `).trim()||void 0};case`marketplace`:case`market`:{let e=t[1]?.toLowerCase(),n=t.slice(2).join(` `);switch(e){case`add`:return{type:`marketplace`,action:`add`,target:n};case`remove`:case`rm`:return{type:`marketplace`,action:`remove`,target:n};case`update`:return{type:`marketplace`,action:`update`,target:n};case`list`:return{type:`marketplace`,action:`list`};default:return{type:`marketplace`}}}default:return{type:`menu`}}}var Ur=e((()=>{}));function Wr({onComplete:e,path:t}){return(0,Gr.useEffect)(()=>{async function n(){if(!t){e(`Usage: /plugin validate <path>
2
-
3
- Validate a plugin or marketplace manifest file or directory.
4
-
5
- Examples:
6
- /plugin validate .claude-plugin/plugin.json
7
- /plugin validate /path/to/plugin-directory
8
- /plugin validate .
9
-
10
- When given a directory, automatically validates .claude-plugin/marketplace.json
11
- or .claude-plugin/plugin.json (prefers marketplace if both exist).
12
-
13
- Or from the command line:
14
- claude plugin validate <path>`);return}try{let n=await ln(t),r=``;r+=`Validating ${n.fileType} manifest: ${n.filePath}\n\n`,n.errors.length>0&&(r+=`${a.cross} Found ${n.errors.length} ${O(n.errors.length,`error`)}:\n\n`,n.errors.forEach(e=>{r+=` ${a.pointer} ${e.path}: ${e.message}\n`}),r+=`
15
- `),n.warnings.length>0&&(r+=`${a.warning} Found ${n.warnings.length} ${O(n.warnings.length,`warning`)}:\n\n`,n.warnings.forEach(e=>{r+=` ${a.pointer} ${e.path}: ${e.message}\n`}),r+=`
16
- `),n.success?(n.warnings.length>0?r+=`${a.tick} Validation passed with warnings\n`:r+=`${a.tick} Validation passed\n`,process.exitCode=0):(r+=`${a.cross} Validation failed\n`,process.exitCode=1),e(r)}catch(t){process.exitCode=2,be(t),e(`${a.cross} Unexpected error during validation: ${pe(t)}`)}}n()},[e,t]),(0,Kr.jsx)(C,{flexDirection:`column`,children:(0,Kr.jsx)(p,{children:`Running validation...`})})}var Gr,Kr,qr=e((()=>{i(),l(),Gr=t(l(),1),x(),I(),ye(),fn(),M(),Kr=w()}));function Jr({onComplete:e}){return(0,Q.useEffect)(()=>{async function t(){try{let t=await Ae(),n=Object.keys(t);n.length===0?e(`No marketplaces configured`):e(`Configured marketplaces:\n${n.map(e=>` • ${e}`).join(`
17
- `)}`)}catch(t){e(`Error loading marketplaces: ${pe(t)}`)}}t()},[e]),(0,$.jsx)(p,{children:`Loading marketplaces...`})}function Yr(){return process.env.USER_TYPE===`ant`?(0,$.jsxs)(C,{flexDirection:`row`,alignItems:`flex-start`,paddingLeft:1,marginTop:1,borderLeft:!0,borderRight:!1,borderTop:!1,borderBottom:!1,borderColor:`permission`,borderStyle:`single`,children:[(0,$.jsx)(C,{flexShrink:0,children:(0,$.jsxs)(p,{bold:!0,italic:!0,color:`permission`,children:[`i`,` `]})}),(0,$.jsx)(p,{children:`[ANT-ONLY] MCP servers are now managed in /plugins. Use /mcp no-redirect to test old UI`})]}):null}function Xr(e){let t=[];for(let{source:n,scope:r}of[{source:`userSettings`,scope:`user`},{source:`projectSettings`,scope:`project`},{source:`localSettings`,scope:`local`}])k(n)?.extraKnownMarketplaces?.[e]&&t.push({source:n,scope:r});return{editableSources:t,isInPolicy:!!k(`policySettings`)?.extraKnownMarketplaces?.[e]}}function Zr(e){let{editableSources:t,isInPolicy:n}=Xr(e);return t.length>0?{kind:`remove-extra-marketplace`,name:e,sources:t}:n?{kind:`managed-only`,name:e}:{kind:`navigate`,tab:`marketplaces`,viewState:{type:`manage-marketplaces`,targetMarketplace:e,action:`remove`}}}function Qr(e){return{kind:`navigate`,tab:`installed`,viewState:{type:`manage-plugins`,targetPlugin:e,action:`uninstall`}}}function $r(e){return si.has(e.type)}function ei(e){if(`pluginId`in e&&e.pluginId)return e.pluginId;if(`plugin`in e&&e.plugin)return e.plugin;if(e.source.includes(`@`))return e.source.split(`@`)[0]}function ti(e,t,n,r,i,a,o){let s=[];for(let e of a){let t=`pluginId`in e?e.pluginId:`plugin`in e?e.plugin:void 0;s.push({label:t??e.source,message:kr(e),guidance:`Restart to retry loading plugins`,action:{kind:`none`}})}let c=new Set;for(let t of e){c.add(t.name);let e=Zr(t.name),n=Xr(t.name),r=n.isInPolicy?`managed`:n.editableSources[0]?.scope;s.push({label:t.name,message:t.error??`Installation failed`,guidance:e.kind===`managed-only`?`Managed by your organization — contact your admin`:void 0,action:e,scope:r})}for(let e of t){let t=`marketplace`in e?e.marketplace:e.source;if(c.has(t))continue;c.add(t);let n=Zr(t),r=Xr(t),i=r.isInPolicy?`managed`:r.editableSources[0]?.scope;s.push({label:t,message:kr(e),guidance:n.kind===`managed-only`?`Managed by your organization — contact your admin`:Ar(e),action:n,scope:i})}for(let e of i)c.has(e.name)||(c.add(e.name),s.push({label:e.name,message:e.error,action:{kind:`remove-installed-marketplace`,name:e.name}}));let l=new Set;for(let e of n){let t=ei(e);if(t&&l.has(t))continue;t&&l.add(t);let n=`marketplace`in e?e.marketplace:void 0,r=t?o.get(e.source)??o.get(t):void 0;s.push({label:t?n?`${t} @ ${n}`:t:e.source,message:kr(e),guidance:Ar(e),action:t?Qr(t):{kind:`none`},scope:r})}for(let e of r)s.push({label:e.source,message:kr(e),guidance:Ar(e),action:{kind:`none`}});return s}function ni(e,t){for(let{source:n}of t){let t=k(n);if(!t)continue;let r={};if(t.extraKnownMarketplaces?.[e]&&(r.extraKnownMarketplaces={...t.extraKnownMarketplaces,[e]:void 0}),t.enabledPlugins){let n=`@${e}`,i=!1,a={...t.enabledPlugins};for(let e in a)e.endsWith(n)&&(a[e]=void 0,i=!0);i&&(r.enabledPlugins=a)}Object.keys(r).length>0&&re(n,r)}}function ri({setViewState:e,setActiveTab:t,markPluginsChanged:n}){let r=Mt(e=>e.plugins.errors),i=Mt(e=>e.plugins.installationStatus),o=st(),[s,c]=(0,Q.useState)(0),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)([]);(0,Q.useEffect)(()=>{(async()=>{try{let{failures:e}=await Tt(await Ae());f(e)}catch{}})()},[]);let m=i.marketplaces.filter(e=>e.status===`failed`),h=new Set(m.map(e=>e.name)),_=r.filter($r),y=ti(m,r.filter(e=>(e.type===`marketplace-not-found`||e.type===`marketplace-load-failed`||e.type===`marketplace-blocked-by-policy`)&&!h.has(e.marketplace)),r.filter(e=>$r(e)||e.type===`marketplace-not-found`||e.type===`marketplace-load-failed`||e.type===`marketplace-blocked-by-policy`?!1:ei(e)!==void 0),r.filter(e=>$r(e)||e.type===`marketplace-not-found`||e.type===`marketplace-load-failed`||e.type===`marketplace-blocked-by-policy`?!1:ei(e)===void 0),d,_,Xt());te(`confirm:no`,()=>{e({type:`menu`})},{context:`Confirmation`}),v({"select:previous":()=>c(e=>Math.max(0,e-1)),"select:next":()=>c(e=>Math.min(y.length-1,e+1)),"select:accept":()=>{let r=y[s];if(!r)return;let{action:i}=r;switch(i.kind){case`navigate`:t(i.tab),e(i.viewState);break;case`remove-extra-marketplace`:{let e=i.sources.map(e=>e.scope).join(`, `);ni(i.name,i.sources),mt(),o(e=>({...e,plugins:{...e.plugins,errors:e.plugins.errors.filter(e=>!(`marketplace`in e&&e.marketplace===i.name)),installationStatus:{...e.plugins.installationStatus,marketplaces:e.plugins.installationStatus.marketplaces.filter(e=>e.name!==i.name)}}})),u(`${a.tick} Removed "${i.name}" from ${e} settings`),n();break}case`remove-installed-marketplace`:(async()=>{try{await Ee(i.name),mt(),f(e=>e.filter(e=>e.name!==i.name)),u(`${a.tick} Removed marketplace "${i.name}"`),n()}catch(e){u(`Failed to remove "${i.name}": ${e instanceof Error?e.message:String(e)}`)}})();break;case`managed-only`:break;case`none`:break}}},{context:`Select`,isActive:y.length>0});let b=Math.min(s,Math.max(0,y.length-1));b!==s&&c(b);let x=y[b]?.action,ee=x&&x.kind!==`none`&&x.kind!==`managed-only`;return y.length===0?(0,$.jsxs)(C,{flexDirection:`column`,children:[(0,$.jsx)(C,{marginLeft:1,children:(0,$.jsx)(p,{dimColor:!0,children:`No plugin errors`})}),(0,$.jsx)(C,{marginTop:1,children:(0,$.jsx)(p,{dimColor:!0,italic:!0,children:(0,$.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})})})]}):(0,$.jsxs)(C,{flexDirection:`column`,children:[y.map((e,t)=>{let n=t===b;return(0,$.jsxs)(C,{marginLeft:1,flexDirection:`column`,marginBottom:1,children:[(0,$.jsxs)(p,{children:[(0,$.jsxs)(p,{color:n?`suggestion`:`error`,children:[n?a.pointer:a.cross,` `]}),(0,$.jsx)(p,{bold:n,children:e.label}),e.scope&&(0,$.jsxs)(p,{dimColor:!0,children:[` (`,e.scope,`)`]})]}),(0,$.jsx)(C,{marginLeft:3,children:(0,$.jsx)(p,{color:`error`,children:e.message})}),e.guidance&&(0,$.jsx)(C,{marginLeft:3,children:(0,$.jsx)(p,{dimColor:!0,italic:!0,children:e.guidance})})]},t)}),l&&(0,$.jsx)(C,{marginTop:1,marginLeft:1,children:(0,$.jsx)(p,{color:`claude`,children:l})}),(0,$.jsx)(C,{marginTop:1,children:(0,$.jsx)(p,{dimColor:!0,italic:!0,children:(0,$.jsxs)(g,{children:[(0,$.jsx)(R,{action:`select:previous`,context:`Select`,fallback:`↑`,description:`navigate`}),ee&&(0,$.jsx)(R,{action:`select:accept`,context:`Select`,fallback:`Enter`,description:`resolve`}),(0,$.jsx)(R,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`back`})]})})})]})}function ii(e){switch(e.type){case`help`:return{type:`help`};case`validate`:return{type:`validate`,path:e.path};case`install`:return e.marketplace?{type:`browse-marketplace`,targetMarketplace:e.marketplace,targetPlugin:e.plugin}:e.plugin?{type:`discover-plugins`,targetPlugin:e.plugin}:{type:`discover-plugins`};case`manage`:return{type:`manage-plugins`};case`uninstall`:return{type:`manage-plugins`,targetPlugin:e.plugin,action:`uninstall`};case`enable`:return{type:`manage-plugins`,targetPlugin:e.plugin,action:`enable`};case`disable`:return{type:`manage-plugins`,targetPlugin:e.plugin,action:`disable`};case`marketplace`:return e.action===`list`?{type:`marketplace-list`}:e.action===`add`?{type:`add-marketplace`,initialValue:e.target}:e.action===`remove`?{type:`manage-marketplaces`,targetMarketplace:e.target,action:`remove`}:e.action===`update`?{type:`manage-marketplaces`,targetMarketplace:e.target,action:`update`}:{type:`marketplace-menu`};default:return{type:`discover-plugins`}}}function ai(e){return e.type===`manage-plugins`?`installed`:e.type===`manage-marketplaces`?`marketplaces`:`discover`}function oi({onComplete:e,args:t,showMcpRedirectMessage:n}){let r=Hr(t),i=ii(r),[a,o]=(0,Q.useState)(i),[s,c]=(0,Q.useState)(ai(i)),[l,u]=(0,Q.useState)(a.type===`add-marketplace`&&a.initialValue||``),[d,f]=(0,Q.useState)(0),[m,h]=(0,Q.useState)(null),[g,v]=(0,Q.useState)(null),[x,ee]=(0,Q.useState)(!1),S=st(),ne=Mt(e=>{let t=e.plugins.errors.length;for(let n of e.plugins.installationStatus.marketplaces)n.status===`failed`&&t++;return t}),w=ne>0?`Errors (${ne})`:`Errors`,T=Jt(),E=r.type===`marketplace`&&r.action===`add`&&r.target!==void 0,D=(0,Q.useCallback)(()=>{S(e=>e.plugins.needsRefresh?e:{...e,plugins:{...e.plugins,needsRefresh:!0}})},[S]),O=(0,Q.useCallback)(e=>{let t=e;switch(c(t),h(null),t){case`discover`:o({type:`discover-plugins`});break;case`installed`:o({type:`manage-plugins`});break;case`marketplaces`:o({type:`manage-marketplaces`});break;case`errors`:break}},[]);return(0,Q.useEffect)(()=>{a.type===`menu`&&!g&&e()},[a.type,g,e]),(0,Q.useEffect)(()=>{a.type===`browse-marketplace`&&s!==`discover`&&c(`discover`)},[a.type,s]),te(`confirm:no`,(0,Q.useCallback)(()=>{c(`marketplaces`),o({type:`manage-marketplaces`}),u(``),h(null)},[]),{context:`Settings`,isActive:a.type===`add-marketplace`}),(0,Q.useEffect)(()=>{g&&e(g)},[g,e]),(0,Q.useEffect)(()=>{a.type===`help`&&e()},[a.type,e]),a.type===`help`?(0,$.jsxs)(C,{flexDirection:`column`,children:[(0,$.jsx)(p,{bold:!0,children:`Plugin Command Usage:`}),(0,$.jsx)(p,{children:` `}),(0,$.jsx)(p,{dimColor:!0,children:`Installation:`}),(0,$.jsx)(p,{children:` /plugin install - Browse and install plugins`}),(0,$.jsx)(p,{children:` /plugin install <marketplace> - Install from specific marketplace`}),(0,$.jsx)(p,{children:` /plugin install <plugin> - Install specific plugin`}),(0,$.jsx)(p,{children:` /plugin install <plugin>@<market> - Install plugin from marketplace`}),(0,$.jsx)(p,{children:` `}),(0,$.jsx)(p,{dimColor:!0,children:`Management:`}),(0,$.jsx)(p,{children:` /plugin manage - Manage installed plugins`}),(0,$.jsx)(p,{children:` /plugin enable <plugin> - Enable a plugin`}),(0,$.jsx)(p,{children:` /plugin disable <plugin> - Disable a plugin`}),(0,$.jsx)(p,{children:` /plugin uninstall <plugin> - Uninstall a plugin`}),(0,$.jsx)(p,{children:` `}),(0,$.jsx)(p,{dimColor:!0,children:`Marketplaces:`}),(0,$.jsx)(p,{children:` /plugin marketplace - Marketplace management menu`}),(0,$.jsx)(p,{children:` /plugin marketplace add - Add a marketplace`}),(0,$.jsx)(p,{children:` /plugin marketplace add <path/url> - Add marketplace directly`}),(0,$.jsx)(p,{children:` /plugin marketplace update - Update marketplaces`}),(0,$.jsx)(p,{children:` /plugin marketplace update <name> - Update specific marketplace`}),(0,$.jsx)(p,{children:` /plugin marketplace remove - Remove a marketplace`}),(0,$.jsx)(p,{children:` /plugin marketplace remove <name> - Remove specific marketplace`}),(0,$.jsx)(p,{children:` /plugin marketplace list - List all marketplaces`}),(0,$.jsx)(p,{children:` `}),(0,$.jsx)(p,{dimColor:!0,children:`Validation:`}),(0,$.jsx)(p,{children:` /plugin validate <path> - Validate a manifest file or directory`}),(0,$.jsx)(p,{children:` `}),(0,$.jsx)(p,{dimColor:!0,children:`Other:`}),(0,$.jsx)(p,{children:` /plugin - Main plugin menu`}),(0,$.jsx)(p,{children:` /plugin help - Show this help`}),(0,$.jsx)(p,{children:` /plugins - Alias for /plugin`})]}):a.type===`validate`?(0,$.jsx)(Wr,{onComplete:e,path:a.path}):a.type===`marketplace-menu`?(o({type:`menu`}),null):a.type===`marketplace-list`?(0,$.jsx)(Jr,{onComplete:e}):a.type===`add-marketplace`?(0,$.jsx)(Gn,{inputValue:l,setInputValue:u,cursorOffset:d,setCursorOffset:f,error:m,setError:h,result:g,setResult:v,setViewState:o,onAddComplete:D,cliMode:E}):(0,$.jsx)(y,{color:`suggestion`,children:(0,$.jsxs)(b,{title:`Plugins`,selectedTab:s,onTabChange:O,color:`suggestion`,disableNavigation:x,banner:n&&s===`installed`?(0,$.jsx)(Yr,{}):void 0,children:[(0,$.jsx)(_,{id:`discover`,title:`Discover`,children:a.type===`browse-marketplace`?(0,$.jsx)(gr,{error:m,setError:h,result:g,setResult:v,setViewState:o,onInstallComplete:D,targetMarketplace:a.targetMarketplace,targetPlugin:a.targetPlugin}):(0,$.jsx)(br,{error:m,setError:h,result:g,setResult:v,setViewState:o,onInstallComplete:D,onSearchModeChange:ee,targetPlugin:a.type===`discover-plugins`?a.targetPlugin:void 0})}),(0,$.jsx)(_,{id:`installed`,title:`Installed`,children:(0,$.jsx)(zr,{setViewState:o,setResult:v,onManageComplete:D,onSearchModeChange:ee,targetPlugin:a.type===`manage-plugins`?a.targetPlugin:void 0,targetMarketplace:a.type===`manage-plugins`?a.targetMarketplace:void 0,action:a.type===`manage-plugins`?a.action:void 0})}),(0,$.jsx)(_,{id:`marketplaces`,title:`Marketplaces`,children:(0,$.jsx)(Tr,{setViewState:o,error:m,setError:h,setResult:v,exitState:T,onManageComplete:D,targetMarketplace:a.type===`manage-marketplaces`?a.targetMarketplace:void 0,action:a.type===`manage-marketplaces`?a.action:void 0})}),(0,$.jsx)(_,{id:`errors`,title:w,children:(0,$.jsx)(ri,{setViewState:o,setActiveTab:c,markPluginsChanged:D})})]})})}var Q,$,si,ci=e((()=>{i(),l(),Q=t(l(),1),L(),x(),qt(),Kt(),vt(),I(),dt(),rt(),Et(),Yt(),F(),qn(),yr(),wr(),Or(),Vr(),jr(),Ur(),qr(),$=w(),si=new Set([`git-auth-failed`,`git-timeout`,`network-error`])}));export{Rn as a,Ln as c,Wn as i,Nn as l,ci as n,Bn as o,Vn as r,Fn as s,oi as t,Pn as u};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Cn as n,F as r,Rn as i,b as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{E as l,w as u,x as d}from"./startupProfiler-CnDpob1v.js";import{hT as f}from"./loadAgentsDir-Br5fGLLI.js";function p(e){return e.startsWith(`file-`)?`+`:e.startsWith(`mcp-resource-`)?`◇`:e.startsWith(`agent-`)?`*`:`+`}function m(e){return e.startsWith(`file-`)||e.startsWith(`mcp-resource-`)||e.startsWith(`agent-`)}function h({suggestions:e,selectedSuggestion:t,maxColumnWidth:i,overlay:a}){let{rows:o}=r(),c=a?5:Math.min(6,Math.max(1,o-3));if(e.length===0)return null;let l=i??Math.max(...e.map(e=>n(e.displayText)))+5,u=Math.max(0,Math.min(t-Math.floor(c/2),e.length-c)),d=Math.min(u+c,e.length),f=e.slice(u,d);return(0,_.jsx)(s,{flexDirection:`column`,justifyContent:a?void 0:`flex-end`,children:f.map(n=>(0,_.jsx)(v,{item:n,maxColumnWidth:l,isSelected:n.id===e[t]?.id},n.id))})}var g,_,v,y,b=e((()=>{g=t(i(),1),f(),o(),d(),_=c(),v=(0,g.memo)(function({item:e,maxColumnWidth:t,isSelected:i}){let o=r().columns;if(m(e.id)){let t=p(e.id),r=i?`suggestion`:void 0,s=!i,c=e.id.startsWith(`file-`),d=e.id.startsWith(`mcp-resource-`),f=e.description?3:0,m;if(c){let t=e.description?Math.min(20,n(e.description)):0,r=o-2-4-f-t;m=u(e.displayText,r)}else m=d?l(e.displayText,30):e.displayText;let h=o-2-n(m)-f-4,g;if(e.description){let n=Math.max(0,h),r=l(e.description.replace(/\s+/g,` `),n);g=`${t} ${m} – ${r}`}else g=`${t} ${m}`;return(0,_.jsx)(a,{color:r,dimColor:s,wrap:`truncate`,children:g})}let s=Math.floor(o*.4),c=Math.min(t??n(e.displayText)+5,s),d=e.color||(i?`suggestion`:void 0),f=!i,h=e.displayText;n(h)>c-2&&(h=l(h,c-2));let g=h+` `.repeat(Math.max(0,c-n(h))),v=e.tag?`[${e.tag}] `:``,y=n(v),b=Math.max(0,o-c-y-4),x=e.description?l(e.description.replace(/\s+/g,` `),b):``;return(0,_.jsxs)(a,{wrap:`truncate`,children:[(0,_.jsx)(a,{color:d,dimColor:f,children:g}),v?(0,_.jsx)(a,{color:e.tag===`local`?`ansi:yellow`:void 0,dimColor:e.tag!==`local`,children:v}):null,(0,_.jsx)(a,{color:i?`suggestion`:void 0,dimColor:!i,children:x})]})}),y=(0,g.memo)(h)}));export{y as n,b as r,h as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{Ac as o,S as s,Sc as c,vi as l,xi as u,yi as d}from"./paths-DfGsIjPm.js";import{a as f,n as p}from"./env-BH-OBzcA.js";import{i as m,o as h}from"./platform-DYZVoA9J.js";import{IT as g,LT as _,OT as v,kT as y}from"./loadAgentsDir-Br5fGLLI.js";import{a as b,i as x,r as S}from"./terminalSetup-CmAEgt-5.js";function C(){return c().editorMode===`vim`}function w(){return p.terminal===`Apple_Terminal`&&process.platform===`darwin`||b()?`shift + ⏎ for newline`:S()?`\\⏎ for newline`:`backslash (\\) + return (⏎) for newline`}function T(e,t){return t.ctrl||t.meta||t.escape||t.return||t.tab||t.backspace||t.delete||t.upArrow||t.downArrow||t.leftArrow||t.rightArrow||t.pageUp||t.pageDown||t.home||t.end?!1:e.length>0&&!/^\s/.test(e)&&!e.startsWith(`\x1B`)}var E=e((()=>{x(),o(),f()}));function D(e){return e.replace(/\+/g,` + `)}function O(e){let{dimColor:t,fixedWidth:r,gap:a,paddingX:o}=e,s=D(y(`app:toggleTranscript`,`Global`,`ctrl+o`)),c=D(y(`app:toggleTodos`,`Global`,`ctrl+t`)),l=D(y(`chat:undo`,`Chat`,`ctrl+_`)),f=D(y(`chat:stash`,`Chat`,`ctrl+s`)),p=D(y(`chat:cycleMode`,`Chat`,`shift+tab`)),h=D(y(`chat:modelPicker`,`Chat`,`alt+p`)),g=D(y(`chat:fastMode`,`Chat`,`alt+o`)),v=D(y(`chat:externalEditor`,`Chat`,`ctrl+g`));D(y(`app:toggleTerminal`,`Global`,`meta+j`));let b=D(y(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,k.jsxs)(i,{paddingX:o,flexDirection:`row`,gap:a,children:[(0,k.jsxs)(i,{flexDirection:`column`,width:r?24:void 0,children:[(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`! for bash mode`})}),(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`/ for commands`})}),(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`@ for file paths`})}),(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`& for background`})}),(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`/btw for side question`})})]}),(0,k.jsxs)(i,{flexDirection:`column`,width:r?35:void 0,children:[(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`double tap esc to clear input`})}),(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[p,` `,process.env.USER_TYPE===`ant`?`to cycle modes`:`to auto-accept edits`]})}),(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[s,` for verbose output`]})}),(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[c,` to toggle tasks`]})}),null,(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:w()})})]}),(0,k.jsxs)(i,{flexDirection:`column`,children:[(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[l,` to undo`]})}),m()!==`windows`&&(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`ctrl + z to suspend`})}),(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[b,` to paste images`]})}),(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[h,` to switch model`]})}),u()&&d()&&(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[g,` to toggle fast mode`]})}),(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[f,` to stash prompt`]})}),(0,k.jsx)(i,{children:(0,k.jsxs)(n,{dimColor:t,children:[v,` to edit in $EDITOR`]})}),_()&&(0,k.jsx)(i,{children:(0,k.jsx)(n,{dimColor:t,children:`/keybindings to customize`})})]})]})}var k,A=e((()=>{t(),r(),h(),g(),v(),s(),l(),E(),k=a()}));export{C as a,T as i,A as n,E as r,O as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-DR8-3Aex.js";import{c as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./defineProperty-80gRi2ZW.js";import{Tn as o,wn as s}from"./src-Di342QoJ.js";import{Ct as c,Lt as l,Nt as u,cn as d,it as f,ln as p}from"./state-sIHsFpDu.js";import{Ac as m,Br as h,Dr as ee,Ll as g,Pr as _,Rl as v,Sc as y,a as b,i as te,pi as x,vi as S}from"./paths-DfGsIjPm.js";import{n as C,t as ne}from"./cwd--iizewsn.js";import{et as w,i as re,o as T}from"./log-DS97_rIr.js";import{Ay as ie,BE as ae,Bj as oe,Dy as se,En as ce,Fr as E,Gk as D,Hl as le,Hn as O,Ny as k,Tn as ue,Uj as de,Uk as A,Un as fe,Uo as j,Vl as M,Wk as N,Xn as P,Zn as pe,aD as me,at as he,bs as ge,co as _e,di as F,do as ve,dt as I,eO as L,ea as ye,ek as be,et as xe,ft as R,hr as z,iD as Se,km as B,lO as Ce,lk as V,mh as we,na as Te,oD as Ee,ph as De,sD as H,sO as U,tO as W,tk as Oe,tt as ke,vs as G,zE as K,zn as Ae}from"./loadAgentsDir-Br5fGLLI.js";import{$n as je,Et as Me,Qn as Ne,kt as Pe}from"./prompt-B8M-HLIS.js";import{i as Fe,o as Ie}from"./fileStateCache-C7-TxF8G.js";import{P as q,X as Le,Z as Re}from"./rcDebugLog-BoroyfjB.js";import{a as ze,n as Be,r as Ve}from"./mappers-BCiceNt3.js";import{c as He,n as Ue,o as We,r as Ge,s as Ke}from"./MessageSelector-BT1FDbwv.js";import{n as qe,t as J}from"./systemTheme-dDbitcxB.js";import{randomUUID as Y}from"crypto";n(),i(),s(),d(),g(),C(),w(),T(),m(),S(),b(),Ne(),Pe(),Ie(),q(),Oe(),Ce(),k(),B(),M(),G(),j(),Te(),E(),P(),ue(),ke(),R(),D(),W(),_(),V(),oe();async function Je({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?I(e,t,n,r):Promise.resolve([]),N(),i===void 0?A():Promise.resolve({})]);return{defaultSystemPrompt:a,userContext:o,systemContext:s}}async function Ye({tools:e,commands:t,mcpClients:n,messages:r,readFileState:i,getAppState:a,setAppState:o,customSystemPrompt:s,appendSystemPrompt:c,thinkingConfig:l,agents:u}){let d=ee(),f=a(),{defaultSystemPrompt:p,userContext:m,systemContext:h}=await Je({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(f.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),g=Le([...s===void 0?p:[s],...c?[c]:[]]),_=r.at(-1),v=_?.type===`assistant`&&_.message.stop_reason===null?r.slice(0,-1):r;return{systemPrompt:g,userContext:m,systemContext:h,toolUseContext:{options:{commands:t,debug:!1,mainLoopModel:d,tools:e,verbose:!1,thinkingConfig:l??(de()===!1?{type:`disabled`}:{type:`adaptive`}),mcpClients:n,mcpResources:{},isNonInteractiveSession:!0,agentDefinitions:{activeAgents:u,allAgents:[]},customSystemPrompt:s,appendSystemPrompt:c},abortController:L(),readFileState:i,getAppState:a,setAppState:o,messages:v,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}},forkContextMessages:v}}W(),_(),De(),V(),J(),oe(),Be(),O(),me();var Xe=()=>{try{return Ge(),e(Ue)}catch{return null}},Ze=(ae(),e(K)).getCoordinatorUserContext,Qe=class{constructor(e){a(this,`config`,void 0),a(this,`mutableMessages`,void 0),a(this,`abortController`,void 0),a(this,`permissionDenials`,void 0),a(this,`totalUsage`,void 0),a(this,`hasHandledOrphanedPermission`,!1),a(this,`readFileState`,void 0),a(this,`discoveredSkillNames`,new Set),a(this,`loadedNestedMemoryPaths`,new Set),this.config=e,this.mutableMessages=e.initialMessages??[],this.abortController=e.abortController??L(),this.permissionDenials=[],this.readFileState=e.readFileCache,this.totalUsage=Re}async*submitMessage(e,n){let{cwd:i,commands:a,tools:s,mcpClients:d,verbose:m=!1,thinkingConfig:g,maxTurns:_,maxBudgetUsd:b,taskBudget:S,canUseTool:C,customSystemPrompt:w,appendSystemPrompt:T,userSpecifiedModel:ae,fallbackModel:oe,jsonSchema:E,getAppState:D,setAppState:O,replayUserMessages:k=!1,includePartialMessages:ue=!1,agents:A=[],setSDKStatus:j,orphanedPermission:M}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],we(i);let N=!p(),P=Date.now(),me=async(e,t,n,r,i,a)=>{let o=await C(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:Ke(e.name),tool_use_id:i,tool_input:t}),o},I=D(),L=ae?h(ae):ee(),R=g||(de()===!1?{type:`disabled`}:{type:`adaptive`});U(`before_getSystemPrompt`);let B=typeof w==`string`?w:void 0,{defaultSystemPrompt:Ce,userContext:V,systemContext:Te}=await Je({tools:s,mainLoopModel:L,additionalWorkingDirectories:Array.from(I.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:d,customSystemPrompt:B});U(`after_getSystemPrompt`);let De={...V,...Ze(d,fe()?Ae():void 0)},W=B!==void 0&&te()?await pe():null,Oe=Le([...B===void 0?Ce:[B],...W?[W]:[],...T?[T]:[]]),ke=s.some(e=>je(e,Me));E&&ke&&ce(O,c());let G={messages:this.mutableMessages,setMessages:e=>{this.mutableMessages=e(this.mutableMessages)},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:s,verbose:m,mainLoopModel:L,thinkingConfig:R,mcpClients:d,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:w,appendSystemPrompt:T,agentDefinitions:{activeAgents:A,allAgents:[]},theme:qe(y().theme),maxBudgetUsd:b},getAppState:D,setAppState:O,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{O(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{O(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:j};if(M&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of Se(M,s,this.mutableMessages,G))yield e}let{messages:K,shouldQuery:Ne,allowedTools:Pe,model:Fe,resultText:Ie}=await He({input:e,mode:`prompt`,setToolJSX:()=>{},context:{...G,messages:this.mutableMessages},messages:this.mutableMessages,uuid:n?.uuid,isMeta:n?.isMeta,querySource:`sdk`});this.mutableMessages.push(...K);let q=[...this.mutableMessages];if(N&&K.length>0){let e=F(q);t()||(await e,(r(process.env.CLAUDE_CODE_EAGER_FLUSH)||r(process.env.CLAUDE_CODE_IS_COWORK))&&await z())}let Be=Xe(),Ue=K.filter(e=>e.type===`user`&&!e.isMeta&&!e.toolUseResult&&(Be?.selectableUserMessagesFilter(e)??!0)||e.type===`system`&&e.subtype===`compact_boundary`),Ge=k?Ue:[];O(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:Pe}}}));let J=Fe??L;G={messages:q,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:s,verbose:m,mainLoopModel:J,thinkingConfig:R,mcpClients:d,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:w,appendSystemPrompt:T,theme:qe(y().theme),agentDefinitions:{activeAgents:A,allAgents:[]},maxBudgetUsd:b},getAppState:D,setAppState:O,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:G.updateFileHistoryState,updateAttributionState:G.updateAttributionState,setSDKStatus:j},U(`before_skills_plugins`);let[Ye,{enabled:Qe}]=await Promise.all([ye(ne()),ge()]);if(U(`after_skills_plugins`),yield We({tools:s,mcpClients:d,model:J,permissionMode:I.toolPermissionContext.mode,commands:a,agents:A,skills:Ye,plugins:Qe,fastMode:I.fastMode}),U(`system_message_yielded`),!Ne){for(let e of K)if(e.type===`user`&&typeof e.message.content==`string`&&(e.message.content.includes(`<local-command-stdout>`)||e.message.content.includes(`<local-command-stderr>`)||e.isCompactSummary)&&(yield{type:`user`,message:{...e.message,content:o(e.message.content)},session_id:c(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!e.isCompactSummary,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly}),e.type===`system`&&e.subtype===`local_command`&&typeof e.content==`string`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))&&(yield Ve(e.content,e.uuid)),e.type===`system`&&e.subtype===`compact_boundary`){let t=e;yield{type:`system`,subtype:`compact_boundary`,session_id:c(),uuid:e.uuid,compact_metadata:ze(t.compactMetadata)}}N&&(await F(q),(r(process.env.CLAUDE_CODE_EAGER_FLUSH)||r(process.env.CLAUDE_CODE_IS_COWORK))&&await z()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-P,duration_api_ms:u(),num_turns:q.length-1,result:Ie??``,stop_reason:null,session_id:c(),total_cost_usd:l(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:x(J,I.fastMode),uuid:Y()};return}if(se()&&N){let e=Xe()?.selectableUserMessagesFilter??(e=>!0);K.filter(e).forEach(e=>{ie(e=>{O(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let X=Re,Z=1,$e=!1,et,Q=null,tt=re().at(-1),nt=E?ve(this.mutableMessages,Me):0;for await(let e of le({messages:q,systemPrompt:Oe,userContext:De,systemContext:Te,canUseTool:me,toolUseContext:G,fallbackModel:oe,querySource:`sdk`,maxTurns:_,taskBudget:S})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(N&&e.type===`system`&&e.subtype===`compact_boundary`){let t=e.compactMetadata?.preservedSegment?.tailUuid;if(t){let e=this.mutableMessages.findLastIndex(e=>e.uuid===t);e!==-1&&await F(this.mutableMessages.slice(0,e+1))}}if(q.push(e),N&&(e.type===`assistant`?F(q):await F(q)),!$e&&Ge.length>0){$e=!0;for(let e of Ge)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:c(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}}switch(e.type===`user`&&Z++,e.type){case`tombstone`:break;case`assistant`:{let t=e,n=t.message?.stop_reason;n!=null&&(Q=n),this.mutableMessages.push(t),yield*H(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),N&&(q.push(t),F(q)),yield*H(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*H(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){X=Re;let e=t.message;X=he(X,e.usage)}if(t.type===`message_delta`){X=he(X,t.usage);let e=t.delta;e.stop_reason!=null&&(Q=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=xe(this.totalUsage,X)),ue&&(yield{type:`stream_event`,event:t,session_id:c(),parent_tool_use_id:null,uuid:Y()});break}case`attachment`:{let t=e;this.mutableMessages.push(t),N&&(q.push(t),F(q));let n=t.attachment;if(n.type===`structured_output`)et=n.data;else if(n.type===`max_turns_reached`){N&&(r(process.env.CLAUDE_CODE_EAGER_FLUSH)||r(process.env.CLAUDE_CODE_IS_COWORK))&&await z(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-P,duration_api_ms:u(),is_error:!0,num_turns:n.turnCount,stop_reason:Q,session_id:c(),total_cost_usd:l(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:x(J,I.fastMode),uuid:Y(),errors:[`Reached maximum number of turns (${n.maxTurns})`]};return}else k&&n.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:n.prompt},session_id:c(),parent_tool_use_id:null,uuid:n.source_uuid||t.uuid,timestamp:t.timestamp,isReplay:!0});break}case`stream_request_start`:break;case`system`:{let t=e,n=this.config.snipReplay?.(t,this.mutableMessages);if(n!==void 0){n.executed&&(this.mutableMessages.length=0,this.mutableMessages.push(...n.messages));break}if(this.mutableMessages.push(t),t.subtype===`compact_boundary`&&t.compactMetadata){let e=t,n=this.mutableMessages.length-1;n>0&&this.mutableMessages.splice(0,n);let r=q.length-1;r>0&&q.splice(0,r),yield{type:`system`,subtype:`compact_boundary`,session_id:c(),uuid:t.uuid,compact_metadata:ze(e.compactMetadata)}}if(t.subtype===`api_error`){let e=t;yield{type:`system`,subtype:`api_retry`,attempt:e.retryAttempt,max_retries:e.maxRetries,retry_delay_ms:e.retryInMs,error_status:e.error.status??null,error:be(e.error),session_id:c(),uuid:t.uuid}}break}case`tool_use_summary`:{let t=e;yield{type:`tool_use_summary`,summary:t.summary,preceding_tool_use_ids:t.precedingToolUseIds,session_id:c(),uuid:t.uuid};break}}if(b!==void 0&&l()>=b){N&&(r(process.env.CLAUDE_CODE_EAGER_FLUSH)||r(process.env.CLAUDE_CODE_IS_COWORK))&&await z(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-P,duration_api_ms:u(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:c(),total_cost_usd:l(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:x(J,I.fastMode),uuid:Y(),errors:[`Reached maximum budget ($${b}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&E){let e=ve(this.mutableMessages,Me)-nt,t=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=t){N&&(r(process.env.CLAUDE_CODE_EAGER_FLUSH)||r(process.env.CLAUDE_CODE_IS_COWORK))&&await z(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-P,duration_api_ms:u(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:c(),total_cost_usd:l(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:x(J,I.fastMode),uuid:Y(),errors:[`Failed to provide valid structured output after ${t} attempts`]};return}}}let $=q.findLast(e=>e.type===`assistant`||e.type===`user`),rt=$?.type??`undefined`,it=$?.type===`assistant`?v($.message.content)?.type??`none`:`n/a`;if(N&&(r(process.env.CLAUDE_CODE_EAGER_FLUSH)||r(process.env.CLAUDE_CODE_IS_COWORK))&&await z(),!Ee($,Q)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-P,duration_api_ms:u(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:c(),total_cost_usd:l(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:x(J,I.fastMode),uuid:Y(),errors:(()=>{let e=re(),t=tt?e.lastIndexOf(tt)+1:0;return[`[ede_diagnostic] result_type=${rt} last_content_type=${it} stop_reason=${Q}`,...e.slice(t).map(e=>e.error)]})()};return}let at=``,ot=!1;if($.type===`assistant`){let e=v($.message.content);e?.type===`text`&&!_e.has(e.text)&&(at=e.text),ot=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:ot,duration_ms:Date.now()-P,duration_api_ms:u(),num_turns:Z,result:at,stop_reason:Q,session_id:c(),total_cost_usd:l(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,structured_output:et,fast_mode_state:x(J,I.fastMode),uuid:Y()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=L()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return c()}setModel(e){this.config.userSpecifiedModel=e}};async function*X({commands:e,prompt:t,promptUuid:n,isMeta:r,cwd:i,tools:a,mcpClients:o,verbose:s=!1,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,canUseTool:f,mutableMessages:p=[],getReadFileCache:m,setReadFileCache:h,customSystemPrompt:ee,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:v,jsonSchema:y,getAppState:b,setAppState:te,abortController:x,replayUserMessages:S=!1,includePartialMessages:C=!1,handleElicitation:ne,agents:w=[],setSDKStatus:re,orphanedPermission:T}){let ie=new Qe({cwd:i,tools:a,commands:e,mcpClients:o,agents:w??[],canUseTool:f,getAppState:b,setAppState:te,initialMessages:p,readFileCache:Fe(m()),customSystemPrompt:ee,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:v,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:y,verbose:s,handleElicitation:ne,replayUserMessages:S,includePartialMessages:C,setSDKStatus:re,abortController:x,orphanedPermission:T});try{yield*ie.submitMessage(t,{uuid:n,isMeta:r})}finally{h(ie.getReadFileState())}}export{X as n,Ye as r,Qe as t};