claude-code-best 2.8.0 → 2.8.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 (453) hide show
  1. package/README.md +3 -0
  2. package/dist/chunks/{AddWorkspaceDirectory-DRO4tbYd.js → AddWorkspaceDirectory-BCCbaWoh.js} +1 -1
  3. package/dist/chunks/{App-DJyiiVKi.js → App-BIAYUFvT.js} +1 -1
  4. package/dist/chunks/{ApproveApiKey-DygOEAkM.js → ApproveApiKey-DRARgWX3.js} +1 -1
  5. package/dist/chunks/ApproveApiKey-Do-Qth0X.js +1 -0
  6. package/dist/chunks/{AssistantSessionChooser-C67mOxVi.js → AssistantSessionChooser-eUrEGDlX.js} +1 -1
  7. package/dist/chunks/{BackgroundTasksDialog-Bqk_Cn3j.js → BackgroundTasksDialog-DSeAqhMC.js} +2 -2
  8. package/dist/chunks/{BypassPermissionsModeDialog-C4z7RkFV.js → BypassPermissionsModeDialog-8z7R5EpU.js} +1 -1
  9. package/dist/chunks/{ClaudeInChromeOnboarding-CyVFdjBe.js → ClaudeInChromeOnboarding-B7mDm5Hb.js} +1 -1
  10. package/dist/chunks/{ClaudeMdExternalIncludesDialog-IpqqBuJs.js → ClaudeMdExternalIncludesDialog-DE9dpWtg.js} +1 -1
  11. package/dist/chunks/ClaudeMdExternalIncludesDialog-DTZS-dek.js +1 -0
  12. package/dist/chunks/ConsoleOAuthFlow-UcQCmIWd.js +1 -0
  13. package/dist/chunks/{DesktopHandoff-CJpa8Xy-.js → DesktopHandoff-Ce0nE7D6.js} +1 -1
  14. package/dist/chunks/{DevChannelsDialog-CfAuHVRL.js → DevChannelsDialog-mt0lA5wR.js} +1 -1
  15. package/dist/chunks/Dialog-91X6ZGg9.js +1 -0
  16. package/dist/chunks/{DiffDialog-CV3brWsG.js → DiffDialog-BfSnz8L-.js} +2 -2
  17. package/dist/chunks/{Doctor-D3GysagF.js → Doctor-BOVjkAKn.js} +1 -1
  18. package/dist/chunks/Doctor-osWC5WVY.js +1 -0
  19. package/dist/chunks/{ExitFlow-L2sh80sm.js → ExitFlow-C3BGvwv-.js} +1 -1
  20. package/dist/chunks/{Feedback-DfkBCvva.js → Feedback-BtZb1A8b.js} +1 -1
  21. package/dist/chunks/Grove-DyC_Wrfx.js +1 -0
  22. package/dist/chunks/{Grove-Bo74aZx-.js → Grove-HpMLktXp.js} +1 -1
  23. package/dist/chunks/{HybridTransport-BItIDJyC.js → HybridTransport-COk7jAC7.js} +1 -1
  24. package/dist/chunks/{ITermBackend-3iS8Bvmo.js → ITermBackend-BlwyeN8U.js} +1 -1
  25. package/dist/chunks/{InvalidConfigDialog-6lPGcuOX.js → InvalidConfigDialog-QVIRDXwA.js} +1 -1
  26. package/dist/chunks/{InvalidSettingsDialog-D8DwHiys.js → InvalidSettingsDialog-CZRZm0oa.js} +1 -1
  27. package/dist/chunks/ListItem-DCQhApdJ.js +1 -0
  28. package/dist/chunks/{MCPConnectionManager-CsPizxTx.js → MCPConnectionManager-2Fulnp8q.js} +1 -1
  29. package/dist/chunks/{McpParsingWarnings-Cepe7RPZ.js → McpParsingWarnings-DWMO0bV6.js} +1 -1
  30. package/dist/chunks/{MessageSelector-BzUQUeDn.js → MessageSelector-B4jJQ-KQ.js} +2 -2
  31. package/dist/chunks/Messages-ltcn1Qkf.js +11 -0
  32. package/dist/chunks/{Onboarding-BZUXID6q.js → Onboarding-CHcND5Tt.js} +1 -1
  33. package/dist/chunks/{OverageCreditUpsell-Dhm7HBuD.js → OverageCreditUpsell-CMBqZrnz.js} +1 -1
  34. package/dist/chunks/{PermissionDialog-BrRBxx5o.js → PermissionDialog-R-Vl4Tk-.js} +1 -1
  35. package/dist/chunks/{PluginSettings-BZ-PX9Tg.js → PluginSettings-DIS_qrVA.js} +1 -1
  36. package/dist/chunks/{PressEnterToContinue-DtA_p3X6.js → PressEnterToContinue-BYdiZwYD.js} +1 -1
  37. package/dist/chunks/{PromptInputFooterSuggestions-Da8Fty6P.js → PromptInputFooterSuggestions-DAFZfAT0.js} +1 -1
  38. package/dist/chunks/{PromptInputHelpMenu-Bz7EPzzq.js → PromptInputHelpMenu-CAwbW7z2.js} +1 -1
  39. package/dist/chunks/{QueryEngine-CmJK27jU.js → QueryEngine-BQs519Rb.js} +1 -1
  40. package/dist/chunks/REPL-DJh_wVWI.js +1 -0
  41. package/dist/chunks/{REPL-DxEJZpIp.js → REPL-Dx3SPe95.js} +13 -13
  42. package/dist/chunks/{RemoteCallout-DONJj8l2.js → RemoteCallout-CwI1mLQ9.js} +1 -1
  43. package/dist/chunks/{RemoteSessionManager-BvvNspY8.js → RemoteSessionManager-BXMBhfQD.js} +1 -1
  44. package/dist/chunks/{ResumeConversation-EpjJdFHu.js → ResumeConversation-BK7L_YBI.js} +1 -1
  45. package/dist/chunks/{SSETransport-D51Jfdaj.js → SSETransport-Co-0nMlR.js} +1 -1
  46. package/dist/chunks/SearchBox-Bu4gYF0J.js +1 -0
  47. package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +1 -0
  48. package/dist/chunks/SentryErrorBoundary-DLML64E_.js +1 -0
  49. package/dist/chunks/{SentryErrorBoundary-nYTimi4l.js → SentryErrorBoundary-kEgE7qeH.js} +1 -1
  50. package/dist/chunks/{Settings-C2vEJjLx.js → Settings-DOve7mW1.js} +2 -2
  51. package/dist/chunks/{TeleportProgress--jgrqIfW.js → TeleportProgress--n-u7MYY.js} +1 -1
  52. package/dist/chunks/{TeleportRepoMismatchDialog-BKDaFT_L.js → TeleportRepoMismatchDialog-CzQzdYb2.js} +1 -1
  53. package/dist/chunks/{TeleportResumeWrapper-CxlpiHIz.js → TeleportResumeWrapper-CtANoO1Z.js} +1 -1
  54. package/dist/chunks/{ThemePicker-CYL4C-F-.js → ThemePicker-kBt6obJb.js} +1 -1
  55. package/dist/chunks/{TmuxBackend-C_N4ww8i.js → TmuxBackend-Q5xdOkW4.js} +1 -1
  56. package/dist/chunks/{TrustDialog-CYdftZ1M.js → TrustDialog-CoCFqyRD.js} +1 -1
  57. package/dist/chunks/{ValidationErrorsList-CaTwOP3f.js → ValidationErrorsList-CL42YlaS.js} +1 -1
  58. package/dist/chunks/{WelcomeV2-5rgKm4Mz.js → WelcomeV2-B0d9sH1c.js} +1 -1
  59. package/dist/chunks/{WindowsTerminalBackend-BzoSs0VA.js → WindowsTerminalBackend-CLSeqqHh.js} +1 -1
  60. package/dist/chunks/{add-dir-RNzFR3XZ.js → add-dir-IrADCHV-.js} +1 -1
  61. package/dist/chunks/{agentDisplay-DgeOQY1E.js → agentDisplay-BUXpQhYh.js} +1 -1
  62. package/dist/chunks/{agents-iMtFurok.js → agents-BqQtaTaM.js} +1 -1
  63. package/dist/chunks/{agents-D7cgzb3f.js → agents-Cx0f6suK.js} +1 -1
  64. package/dist/chunks/{ant-CF1iRpXD.js → ant-BUkS8Em4.js} +1 -1
  65. package/dist/chunks/api-CoBZPEi-.js +1 -0
  66. package/dist/chunks/{api-DMbWqJlK.js → api-Cy1N7XAQ.js} +1 -1
  67. package/dist/chunks/{artifacts-D2kY_AMp.js → artifacts-DH8c2yG0.js} +1 -1
  68. package/dist/chunks/assistant-B2_c5C4T.js +1 -0
  69. package/dist/chunks/{assistant-CZ4VXgzH.js → assistant-BGzd9a5x.js} +1 -1
  70. package/dist/chunks/{assistant-JAqAZqaE.js → assistant-C3dP-BSJ.js} +1 -1
  71. package/dist/chunks/auth-CRVuUNwf.js +1 -0
  72. package/dist/chunks/{auth-BemPA3ot.js → auth-DVtMm7Hj.js} +1 -1
  73. package/dist/chunks/{autoMode-CGovMAzJ.js → autoMode-ThlM20qr.js} +1 -1
  74. package/dist/chunks/{autonomy-BVXyNEj0.js → autonomy-B637YdCF.js} +1 -1
  75. package/dist/chunks/{autonomy-BnAHLZWH.js → autonomy-B_vxYZbV.js} +1 -1
  76. package/dist/chunks/{autonomyPanel-COMI2iR0.js → autonomyPanel-BM2VhTsn.js} +1 -1
  77. package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +1 -0
  78. package/dist/chunks/{backgroundHousekeeping-BRtG20l2.js → backgroundHousekeeping-Cll7XHG1.js} +2 -2
  79. package/dist/chunks/{banner-D_rqe2XQ.js → banner-DUL-7A0b.js} +1 -1
  80. package/dist/chunks/{branch-BnKwIQtC.js → branch-BlH5WYNu.js} +1 -1
  81. package/dist/chunks/{break-cache-CDzQDHwY.js → break-cache-DjCRzxDv.js} +1 -1
  82. package/dist/chunks/{bridge-ChVjEHVq.js → bridge-QRFJRzVG.js} +2 -2
  83. package/dist/chunks/{bridgeConfig-e0MGfed6.js → bridgeConfig-Di9LziJ3.js} +1 -1
  84. package/dist/chunks/bridgeConfig-pVTHa_ED.js +1 -0
  85. package/dist/chunks/bridgeEnabled-c_BeJX3S.js +1 -0
  86. package/dist/chunks/{bridgeEnabled-DR-v8AXw.js → bridgeEnabled-z1fPRzzV.js} +1 -1
  87. package/dist/chunks/bridgeMain-CHk_DCxy.js +1 -0
  88. package/dist/chunks/{bridgeMain-OsR-_PRp.js → bridgeMain-DVoobI7G.js} +11 -11
  89. package/dist/chunks/{bridgeMessaging-BvBnxgD4.js → bridgeMessaging-BG8fNZac.js} +1 -1
  90. package/dist/chunks/{btw-_b16RGoh.js → btw-DpeWZQbf.js} +1 -1
  91. package/dist/chunks/{buddy-DJ3QSQyd.js → buddy-Bni2g0Km.js} +1 -1
  92. package/dist/chunks/{bypassPermissionsKillswitch-OhGSWZrB.js → bypassPermissionsKillswitch-7e56Rquc.js} +1 -1
  93. package/dist/chunks/caches-3byHT6VF.js +1 -0
  94. package/dist/chunks/{caches-Bp4F7tZ5.js → caches-CzEBsMvP.js} +2 -2
  95. package/dist/chunks/{ccrClient-D7pEGzQa.js → ccrClient-iR6zwGb1.js} +1 -1
  96. package/dist/chunks/changeDetector-Cg75mKOu.js +1 -0
  97. package/dist/chunks/channelNotification-BSmZprUZ.js +1 -0
  98. package/dist/chunks/{channelNotification-BZFMAWln.js → channelNotification-CSmLgwtO.js} +1 -1
  99. package/dist/chunks/{chrome-B5IxDA16.js → chrome-BO1vbvZ0.js} +1 -1
  100. package/dist/chunks/clear-CTOCrXv_.js +1 -0
  101. package/dist/chunks/client-BgdjJNnC.js +1 -0
  102. package/dist/chunks/{color-BYVWpzI8.js → color-BP4FmcMn.js} +1 -1
  103. package/dist/chunks/commands-CkfOhzGE.js +1 -0
  104. package/dist/chunks/commitAttribution-DKvggTZx.js +1 -0
  105. package/dist/chunks/{commitAttribution-ClSlXMPG.js → commitAttribution-Djh1ZpYH.js} +1 -1
  106. package/dist/chunks/{compact-B9c12JXf.js → compact-BtAvCkY0.js} +1 -1
  107. package/dist/chunks/{companion-C8e7dVlu.js → companion-C-jfFhlz.js} +1 -1
  108. package/dist/chunks/completionCache-BQgiR45Q.js +1 -0
  109. package/dist/chunks/{completionCache-Br6OwASx.js → completionCache-C7hDqIDL.js} +1 -1
  110. package/dist/chunks/{config-Bxgfx_nO.js → config-CloXpblh.js} +1 -1
  111. package/dist/chunks/{config-C-yz-f4W.js → config-DwsIX0hc.js} +1 -1
  112. package/dist/chunks/{context-Bf5t6C-a.js → context-DdwMoH4j.js} +1 -1
  113. package/dist/chunks/{context-noninteractive-CJu7hZCM.js → context-noninteractive-BWbEqad6.js} +13 -13
  114. package/dist/chunks/context-noninteractive-DNOyQYnM.js +1 -0
  115. package/dist/chunks/{conversation-BYMS5Hqa.js → conversation-DR4MFYYi.js} +1 -1
  116. package/dist/chunks/conversation-DVhyJA1O.js +1 -0
  117. package/dist/chunks/{copy-C0BZ7Gm0.js → copy-tl-41wwU.js} +1 -1
  118. package/dist/chunks/{createSSHSession-DNXCWneI.js → createSSHSession-B_IyqOll.js} +1 -1
  119. package/dist/chunks/createSession-CIM50iEU.js +1 -0
  120. package/dist/chunks/{createSession-DjM6Ev45.js → createSession-Csaqw8kb.js} +1 -1
  121. package/dist/chunks/{cronJitterConfig-CaFkPXKB.js → cronJitterConfig-2sHTXBLu.js} +1 -1
  122. package/dist/chunks/crossProjectResume-C1I0X__e.js +40 -0
  123. package/dist/chunks/{datadog-ClZjR-jM.js → datadog-BzkFYNcv.js} +1 -1
  124. package/dist/chunks/datadog-vQKKqB6Z.js +1 -0
  125. package/dist/chunks/desktop-oTXppB2O.js +1 -0
  126. package/dist/chunks/{diff-D9hjPq4W.js → diff-B23DUoT8.js} +1 -1
  127. package/dist/chunks/{doctor-4-im_J_h.js → doctor-o2MJvjAE.js} +1 -1
  128. package/dist/chunks/{effort-Bz-9GIpe.js → effort-B1X_S_oa.js} +1 -1
  129. package/dist/chunks/entry-BAXMpXJ0.js +14 -0
  130. package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +1 -0
  131. package/dist/chunks/{envLessBridgeConfig-DW4-nPbZ.js → envLessBridgeConfig-YNTOVEqU.js} +1 -1
  132. package/dist/chunks/{exit-DBNDTR4b.js → exit-CwGJifQF.js} +1 -1
  133. package/dist/chunks/{export-CQHUM_Nv.js → export-CqbYdFmJ.js} +1 -1
  134. package/dist/chunks/{exportRenderer-CuIDQBLH.js → exportRenderer-DP_z8YD1.js} +1 -1
  135. package/dist/chunks/extra-usage-1FUBiJOE.js +1 -0
  136. package/dist/chunks/{extra-usage-DTr6gExD.js → extra-usage-BQ5Z1wJb.js} +1 -1
  137. package/dist/chunks/{extra-usage-core-D3CwYO_8.js → extra-usage-core-B1oJoxYa.js} +1 -1
  138. package/dist/chunks/{extra-usage-noninteractive-d-QVg1D5.js → extra-usage-noninteractive-BV_6cpdd.js} +1 -1
  139. package/dist/chunks/{extraUsage-BNRQOkgU.js → extraUsage-Ca_6qcke.js} +1 -1
  140. package/dist/chunks/extractMemories-B-yrLjpP.js +1 -0
  141. package/dist/chunks/{fast-bkGXbuHX.js → fast-BJMGfO_S.js} +1 -1
  142. package/dist/chunks/fast-CFtN26up.js +1 -0
  143. package/dist/chunks/{feedback-BvFgE_FF.js → feedback-O0Gushxg.js} +1 -1
  144. package/dist/chunks/{firstPartyEventLogger-D-ifHvWu.js → firstPartyEventLogger-0s2WJ6SR.js} +1 -1
  145. package/dist/chunks/{flushGate-BA24vFBg.js → flushGate-CLjpgnG6.js} +1 -1
  146. package/dist/chunks/{fpsMetrics-CBFlAGTS.js → fpsMetrics-DH78PzGr.js} +1 -1
  147. package/dist/chunks/gates-4fq2Ws2D.js +1 -0
  148. package/dist/chunks/{gates-C66Nz9b2.js → gates-C5y8P5t9.js} +1 -1
  149. package/dist/chunks/{gemini-DuQl4hTA.js → gemini-D6lfJRGH.js} +1 -1
  150. package/dist/chunks/{generateRecap-CwBU76xi.js → generateRecap-AYujRzfu.js} +1 -1
  151. package/dist/chunks/{generateSessionName-LnmjE9jh.js → generateSessionName-CXg1uVLN.js} +1 -1
  152. package/dist/chunks/{githubRepoPathMapping-DrreQj47.js → githubRepoPathMapping-CdjkMIX3.js} +1 -1
  153. package/dist/chunks/{goal-BIvjF6B7.js → goal-BGr-SlcA.js} +1 -1
  154. package/dist/chunks/{grok-KNLYSRBQ.js → grok-DxyRt4Jq.js} +1 -1
  155. package/dist/chunks/{growthbook-ksjGAskq.js → growthbook-D93ZmHUL.js} +1 -1
  156. package/dist/chunks/{heapdump-Cz8vkcOr.js → heapdump-DZz5qnZg.js} +1 -1
  157. package/dist/chunks/{help-Cx9OordP.js → help-C8HhaC70.js} +1 -1
  158. package/dist/chunks/hooks-CmW7bdtz.js +1 -0
  159. package/dist/chunks/{hooks-BW-d9Bdu.js → hooks-De2yBPig.js} +1 -1
  160. package/dist/chunks/{hostAdapter-DLmaB6eN.js → hostAdapter-CZdJUeS1.js} +1 -1
  161. package/dist/chunks/{ide-CECrIg1r.js → ide-GnSLasRI.js} +1 -1
  162. package/dist/chunks/{inboundAttachments-B0sGIu79.js → inboundAttachments-C8y3D5mp.js} +1 -1
  163. package/dist/chunks/inboundAttachments-DZiITyN8.js +1 -0
  164. package/dist/chunks/{initReplBridge-BAEMZEcg.js → initReplBridge-YGXqLbNZ.js} +1 -1
  165. package/dist/chunks/{insights-DeWggLxC.js → insights-23tyPxXV.js} +1 -1
  166. package/dist/chunks/{install-pxH_HR1p.js → install-BXi4d63r.js} +1 -1
  167. package/dist/chunks/{install-github-app-DqKEiHQ1.js → install-github-app-D2X7BgzJ.js} +1 -1
  168. package/dist/chunks/{install-slack-app-P1L9x-YI.js → install-slack-app-_J1t0kSP.js} +1 -1
  169. package/dist/chunks/{instrumentation-Dx0s2jzr.js → instrumentation-C9WDRy-K.js} +3 -3
  170. package/dist/chunks/{job-CbxxkPgE.js → job-DXX7dNN_.js} +1 -1
  171. package/dist/chunks/{keybindings-BBPC7FAc.js → keybindings-CChhkkE0.js} +1 -1
  172. package/dist/chunks/{lang-CKp0Tn76.js → lang-COIVItM_.js} +1 -1
  173. package/dist/chunks/language-CiMwEWO-.js +1 -0
  174. package/dist/chunks/{language-iERMuOEu.js → language-DzWvcLCu.js} +1 -1
  175. package/dist/chunks/{launchAgentsPlatform-DQvKVtl2.js → launchAgentsPlatform-Du_WvKeU.js} +1 -1
  176. package/dist/chunks/{launchAutofixPr-B7hu9C8h.js → launchAutofixPr-CypNniKH.js} +1 -1
  177. package/dist/chunks/{launchCommand-CJsikSlW.js → launchCommand-9eYsPG7W.js} +1 -1
  178. package/dist/chunks/{launchLocalMemory-Cpz7L5j5.js → launchLocalMemory-GkqB_Gcr.js} +1 -1
  179. package/dist/chunks/{launchLocalVault-XLfOQtP7.js → launchLocalVault-CBihJDzq.js} +1 -1
  180. package/dist/chunks/{launchMemoryStores-Cz04PaDE.js → launchMemoryStores-BkK0wwq0.js} +1 -1
  181. package/dist/chunks/{launchOnboarding-XPbUNdHS.js → launchOnboarding-BubTG5vY.js} +1 -1
  182. package/dist/chunks/{launchSchedule-B1VEe3o-.js → launchSchedule-CkV6Ai-0.js} +1 -1
  183. package/dist/chunks/{launchSkillStore-Cy59z5xx.js → launchSkillStore-DIrFg_WZ.js} +1 -1
  184. package/dist/chunks/{launchTeleport-ZPM_DvzK.js → launchTeleport-DFrgN9sU.js} +1 -1
  185. package/dist/chunks/{launchVault-BhnTOZq8.js → launchVault-CIiNsg91.js} +1 -1
  186. package/dist/chunks/loadAgentsDir-CjhNkoq0.js +1 -0
  187. package/dist/chunks/{loadAgentsDir-CQF8qhne.js → loadAgentsDir-DC4jN6-f.js} +777 -777
  188. package/dist/chunks/{loadPluginHooks-TyULD8KH.js → loadPluginHooks-DukITDP2.js} +1 -1
  189. package/dist/chunks/{localSearch-BNYypHsK.js → localSearch-But4wyLg.js} +1 -1
  190. package/dist/chunks/localSearch-D8FFon8N.js +1 -0
  191. package/dist/chunks/login-B3TV33p4.js +1 -0
  192. package/dist/chunks/{login-CxbcJk9_.js → login-ajsn1Sg7.js} +1 -1
  193. package/dist/chunks/{logoV2Utils-Br_w1z39.js → logoV2Utils-CpeUvaOM.js} +1 -1
  194. package/dist/chunks/logout-BqbTEPv9.js +1 -0
  195. package/dist/chunks/{magicDocs-DnxdS9yV.js → magicDocs-TF6U6QoB.js} +1 -1
  196. package/dist/chunks/{main-FBmdv32j.js → main-bjQRqaUr.js} +31 -31
  197. package/dist/chunks/mappers-Bg-xtimK.js +1 -0
  198. package/dist/chunks/{mcp-BhAGhDQE.js → mcp-DtHGTZUo.js} +1 -1
  199. package/dist/chunks/{mcp-esqdO_lV.js → mcp-Vj0ijoSq.js} +3 -3
  200. package/dist/chunks/{mcp-DbqUZ1Cf.js → mcp-i8lqdWTr.js} +1 -1
  201. package/dist/chunks/{mcpServer-DeL2ADSF.js → mcpServer-CuqaXxiJ.js} +1 -1
  202. package/dist/chunks/{mcpServer-Ct-GVL-y.js → mcpServer-Dr9UfcEd.js} +1 -1
  203. package/dist/chunks/{memory-DwapBEsD.js → memory-DVJxsbcO.js} +1 -1
  204. package/dist/chunks/{mobile-D7MSmMhc.js → mobile-DLGq6g08.js} +1 -1
  205. package/dist/chunks/{modalContext-DxfeT_3m.js → modalContext-CuTwi_eD.js} +1 -1
  206. package/dist/chunks/{mode-B5cmHCvz.js → mode-C9yWWppB.js} +1 -1
  207. package/dist/chunks/model-BYSyXf9-.js +1 -0
  208. package/dist/chunks/{model-BePO0VaC.js → model-Dq-13vaB.js} +1 -1
  209. package/dist/chunks/{onChangeAppState-B3d5iy6T.js → onChangeAppState-Cc4zOnqx.js} +1 -1
  210. package/dist/chunks/{openai-fRhGOIQq.js → openai-DMCGGZts.js} +1 -1
  211. package/dist/chunks/{overageCreditGrant-B6sx7IFi.js → overageCreditGrant-CzkWDmsQ.js} +1 -1
  212. package/dist/chunks/{panel-CAVG5BOM.js → panel-BY6q16am.js} +1 -1
  213. package/dist/chunks/{panel-DU8y_jcf.js → panel-BdRBXAv3.js} +1 -1
  214. package/dist/chunks/panelCall-D36EWzwF.js +1 -0
  215. package/dist/chunks/{passes-CWPPUigp.js → passes-CPAwB9_F.js} +1 -1
  216. package/dist/chunks/{paths-4ZWdjPP4.js → paths-CEAy4QCs.js} +3 -3
  217. package/dist/chunks/{permissions-DW8CRuJp.js → permissions-B39hfy0O.js} +1 -1
  218. package/dist/chunks/{pipeTransport-CUeYRWJn.js → pipeTransport-7auNUakO.js} +1 -1
  219. package/dist/chunks/{plan-Cf-tHvGq.js → plan-pCEs76NM.js} +1 -1
  220. package/dist/chunks/plugin-BSC-7wQh.js +1 -0
  221. package/dist/chunks/{pluginAutoupdate-CdmKzIRf.js → pluginAutoupdate-Cre72Rtf.js} +1 -1
  222. package/dist/chunks/{pluginBlocklist-C9XwbFSo.js → pluginBlocklist-D2Cj4TR2.js} +1 -1
  223. package/dist/chunks/{pluginCliCommands-CmY_maYg.js → pluginCliCommands-CTxmCPph.js} +1 -1
  224. package/dist/chunks/{pluginFlagging-DyzxZolj.js → pluginFlagging-C5EGcjZe.js} +1 -1
  225. package/dist/chunks/{pluginOperations-mr4I7Jw9.js → pluginOperations-DDI1CG0K.js} +1 -1
  226. package/dist/chunks/{pluginStartupCheck-B6OdK29Z.js → pluginStartupCheck-B3QqfRt6.js} +1 -1
  227. package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +1 -0
  228. package/dist/chunks/{plugins-rdPgpjF8.js → plugins-Bz7JxD43.js} +1 -1
  229. package/dist/chunks/policyLimits-C-oHygGe.js +1 -0
  230. package/dist/chunks/{pollConfig-DLbuHBse.js → pollConfig-CyO4Ycwc.js} +1 -1
  231. package/dist/chunks/{poor-pmz2b7zu.js → poor-eRoBwI0Z.js} +1 -1
  232. package/dist/chunks/{poorMode-DD-q_w6Z.js → poorMode-BdNsLBQ-.js} +1 -1
  233. package/dist/chunks/poorMode-D2-4vRxb.js +1 -0
  234. package/dist/chunks/{print-luaON-Cg.js → print-Ogibzjap.js} +4 -4
  235. package/dist/chunks/{privacy-settings-BpigC4oX.js → privacy-settings-Dd7PtKbY.js} +1 -1
  236. package/dist/chunks/{processBashCommand-f_84bSlP.js → processBashCommand-BjdUo_Na.js} +1 -1
  237. package/dist/chunks/{processSlashCommand-BkBqV3Jd.js → processSlashCommand-tetvMLMl.js} +1 -1
  238. package/dist/chunks/projectContext-2CzYVggO.js +1 -0
  239. package/dist/chunks/projectContext-CVk2Ix1r.js +1 -0
  240. package/dist/chunks/prompt-BHI7PZe4.js +227 -0
  241. package/dist/chunks/prompt-DZ1EAUlC.js +1 -0
  242. package/dist/chunks/prompt-DeRHlPn1.js +1 -0
  243. package/dist/chunks/{promptEditor-C___2FFs.js → promptEditor-DoJ-xPi4.js} +1 -1
  244. package/dist/chunks/{protocolHandler-qwll5gSY.js → protocolHandler-Dgzu5UWb.js} +1 -1
  245. package/dist/chunks/{rate-limit-options-nQcTipEp.js → rate-limit-options-B6QH2-xn.js} +1 -1
  246. package/dist/chunks/{rcDebugLog-DOXxIr8l.js → rcDebugLog-C0Bam8V9.js} +1 -1
  247. package/dist/chunks/{referral-CMPZjf3I.js → referral-B10JtHMk.js} +1 -1
  248. package/dist/chunks/{refresh-CP7Dnjp4.js → refresh-DmEsCaJ0.js} +1 -1
  249. package/dist/chunks/{registerProtocol-DCNuqdCC.js → registerProtocol-CQjmvg7a.js} +1 -1
  250. package/dist/chunks/{registry-DLqZJleQ.js → registry-CLaXh4Gk.js} +1 -1
  251. package/dist/chunks/{release-notes-BsDW6T9f.js → release-notes-dxng0ob_.js} +1 -1
  252. package/dist/chunks/{releaseNotes-Tbd018Qz.js → releaseNotes-CS5L5W0H.js} +2 -2
  253. package/dist/chunks/{reload-plugins-iG9ZE9wF.js → reload-plugins-CgzAjBDp.js} +1 -1
  254. package/dist/chunks/{remote-env-BFntnltf.js → remote-env-BasfU8Ra.js} +1 -1
  255. package/dist/chunks/{remoteBridgeCore-Dpko9c-J.js → remoteBridgeCore-IJI5koHz.js} +1 -1
  256. package/dist/chunks/{remoteControlServer-D3P82kVF.js → remoteControlServer-BBCt7ySV.js} +1 -1
  257. package/dist/chunks/{rename-Codm2nfB.js → rename-eEdSZsJ2.js} +1 -1
  258. package/dist/chunks/{resume-BB1ceL_x.js → resume-DjnfattK.js} +1 -1
  259. package/dist/chunks/{runtimeObserver-D6aF77Dq.js → runtimeObserver-ByTBtmBf.js} +2 -2
  260. package/dist/chunks/{runtimeObserver-BpRn0RiL.js → runtimeObserver-COpkJmg-.js} +1 -1
  261. package/dist/chunks/sandbox-adapter-DagBhoTC.js +1 -0
  262. package/dist/chunks/{sandbox-toggle-DZ-8qXDS.js → sandbox-toggle-CQohaYND.js} +1 -1
  263. package/dist/chunks/searchExtraTools-kk-wV-cC.js +1 -0
  264. package/dist/chunks/{sentry-CVdHlmNQ.js → sentry-C0bQlih_.js} +1 -1
  265. package/dist/chunks/{session-B4j1ViVc.js → session-Dx_ODOHl.js} +1 -1
  266. package/dist/chunks/{sessionDiscovery-DkIIFsWX.js → sessionDiscovery-DAqs0Ra6.js} +1 -1
  267. package/dist/chunks/sessionFileAccessHooks-C-Ic-0Ry.js +1 -0
  268. package/dist/chunks/sessionMemory-BMtFup-Y.js +1 -0
  269. package/dist/chunks/{sessionMemory-CnT3-Mj7.js → sessionMemory-Bq3ECr1S.js} +1 -1
  270. package/dist/chunks/sessionMemoryUtils-BU7N_IQG.js +1 -0
  271. package/dist/chunks/sessionObserver-BwAfzGUg.js +1 -0
  272. package/dist/chunks/{sessionObserver-gjdJ91cv.js → sessionObserver-rd6RRTzc.js} +1 -1
  273. package/dist/chunks/sessionStorage-X2u45U9z.js +1 -0
  274. package/dist/chunks/{sessionTitle-CSU5-VK9.js → sessionTitle-1k_2BhFL.js} +1 -1
  275. package/dist/chunks/{sessionTracing-BDN64fWh.js → sessionTracing-DNSDPYdR.js} +1 -1
  276. package/dist/chunks/{settingsSync-Nixbcaox.js → settingsSync-3xG2A_wN.js} +1 -1
  277. package/dist/chunks/{setup-n3Ixr_gs.js → setup-C2V4elOv.js} +2 -2
  278. package/dist/chunks/{setup-CZxLEcQh.js → setup-CY808VaY.js} +1 -1
  279. package/dist/chunks/{setup-9nXlu56r.js → setup-Hlga8GJ_.js} +1 -1
  280. package/dist/chunks/{shadowedRuleDetection-CCS7R7F1.js → shadowedRuleDetection-BdBNo5eP.js} +1 -1
  281. package/dist/chunks/{sideQuestion-MzExGTvn.js → sideQuestion-DWOCUKMh.js} +1 -1
  282. package/dist/chunks/{sink-BL75jACh.js → sink-DCh0VJ4g.js} +1 -1
  283. package/dist/chunks/sink-nZmawD5W.js +1 -0
  284. package/dist/chunks/sinks-BTZnXPr_.js +1 -0
  285. package/dist/chunks/{sinks-C-gxj_Eu.js → sinks-_9T2oPB_.js} +2 -2
  286. package/dist/chunks/{skill-learning-B9Msm4jG.js → skill-learning-CzZFGFZO.js} +2 -2
  287. package/dist/chunks/{skillChangeDetector-DlWPJTny.js → skillChangeDetector-345QNWDp.js} +1 -1
  288. package/dist/chunks/{skillGapStore-CsADiV5a.js → skillGapStore-Bz_qbwI1.js} +2 -2
  289. package/dist/chunks/{skillGapStore-Cpmbwyo3.js → skillGapStore-DJm3SULe.js} +1 -1
  290. package/dist/chunks/{skillGenerator-_khb-Gmc.js → skillGenerator-BcNv-VZ5.js} +2 -2
  291. package/dist/chunks/skillLearning-BJAfTX2G.js +1 -0
  292. package/dist/chunks/skillLearning-DPhuKS4j.js +1 -0
  293. package/dist/chunks/{skillPanel-DQmj3Yh1.js → skillPanel-Q85P-Gg4.js} +3 -3
  294. package/dist/chunks/{skillSearchPanel-6w_zzoI3.js → skillSearchPanel-CMCQDAcX.js} +2 -2
  295. package/dist/chunks/{skills-B3LN9tp9.js → skills-D3eUg3HG.js} +1 -1
  296. package/dist/chunks/{sprites-8JVWnXzp.js → sprites-ChoMSqpa.js} +1 -1
  297. package/dist/chunks/{src-KjMLauwe.js → src-Di342QoJ.js} +1 -1
  298. package/dist/chunks/{src-BJM0zMNO.js → src-poaoYkuc.js} +1 -1
  299. package/dist/chunks/startupProfiler-CBcN1Chw.js +3 -0
  300. package/dist/chunks/startupProfiler-DtTgsdnI.js +1 -0
  301. package/dist/chunks/{staticRender-DboURbK0.js → staticRender-DKFIRhkH.js} +1 -1
  302. package/dist/chunks/{stats-BDlygx5X.js → stats-DdhEa_6-.js} +1 -1
  303. package/dist/chunks/status-CX7Kgn21.js +1 -0
  304. package/dist/chunks/{statusNoticeHelpers-Cd_LDPvn.js → statusNoticeHelpers-AibXOONm.js} +1 -1
  305. package/dist/chunks/{tag-BLPgXlQZ.js → tag-BJ_u3aJm.js} +1 -1
  306. package/dist/chunks/tasks-DeEWOchP.js +1 -0
  307. package/dist/chunks/teamHelpers-CxoQp7OY.js +1 -0
  308. package/dist/chunks/{teamHelpers-B-poMJeE.js → teamHelpers-WmWa_h3B.js} +1 -1
  309. package/dist/chunks/{teammateModeSnapshot-B1_3D1CQ.js → teammateModeSnapshot-DZ6ulELC.js} +1 -1
  310. package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +1 -0
  311. package/dist/chunks/{teleport-CSo3PT05.js → teleport-CuDXJj_f.js} +1 -1
  312. package/dist/chunks/{templateJobs-BVebX2BK.js → templateJobs-nFBp68za.js} +1 -1
  313. package/dist/chunks/{terminalSetup-DZTEKKne.js → terminalSetup-BORjK3qH.js} +1 -1
  314. package/dist/chunks/{terminalSetup-DHWL0gnz.js → terminalSetup-DULcnnWe.js} +1 -1
  315. package/dist/chunks/{theme-BHQSNwSe.js → theme-Bf2QD0ja.js} +1 -1
  316. package/dist/chunks/thinkback-C1nnGg5r.js +1 -0
  317. package/dist/chunks/{thinkback-DOzxcgMy.js → thinkback-DZEhr3Ii.js} +1 -1
  318. package/dist/chunks/{thinkback-play-CK1C_F7G.js → thinkback-play-BtEBESXM.js} +1 -1
  319. package/dist/chunks/{toolEventObserver-XPorjjtG.js → toolEventObserver-CNZy5TpN.js} +1 -1
  320. package/dist/chunks/{toolEventObserver-BIjUIh4k.js → toolEventObserver-DMdrez6V.js} +1 -1
  321. package/dist/chunks/toolPool-DDj2TbY6.js +1 -0
  322. package/dist/chunks/{toolPool-hQlvQn-j.js → toolPool-DHQyHmDY.js} +1 -1
  323. package/dist/chunks/{trustedDevice-D-L5uAor.js → trustedDevice-DWb5CPB_.js} +1 -1
  324. package/dist/chunks/{trustedDevice-CyfQd_GU.js → trustedDevice-Dw2crViN.js} +1 -1
  325. package/dist/chunks/{tui-C7aBeORE.js → tui-DcXIK0fP.js} +1 -1
  326. package/dist/chunks/{ultrareviewCommand-rnMsUWTn.js → ultrareviewCommand-BfN25zni.js} +1 -1
  327. package/dist/chunks/undercover-DSp7SB7e.js +1 -0
  328. package/dist/chunks/{undercover-ClLYK52H.js → undercover-rcR56jZx.js} +1 -1
  329. package/dist/chunks/{updateCCB-pqkACWbs.js → updateCCB-DlTAqQJq.js} +1 -1
  330. package/dist/chunks/{upgrade-DpfZlPyC.js → upgrade-ClLcX7zy.js} +1 -1
  331. package/dist/chunks/upgrade-kf1QWUo7.js +1 -0
  332. package/dist/chunks/{upload-D98tqZnO.js → upload-BqEzK59v.js} +1 -1
  333. package/dist/chunks/{usage-CRquq5_O.js → usage-BgKDh8pQ.js} +1 -1
  334. package/dist/chunks/{usage-BWd5R6DU.js → usage-DW-akzSR.js} +1 -1
  335. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js → useExitOnCtrlCDWithKeybindings-BHi41Ku_.js} +1 -1
  336. package/dist/chunks/useKeybinding-DPOUuymz.js +1 -0
  337. package/dist/chunks/useMainLoopModel-BTpZ8k3k.js +1 -0
  338. package/dist/chunks/{useManagePlugins-DMY74XAk.js → useManagePlugins-z0qezP5r.js} +1 -1
  339. package/dist/chunks/{useMergedTools-NN58Kguw.js → useMergedTools-B78rAreW.js} +1 -1
  340. package/dist/chunks/{useSearchInput-CodP_5SB.js → useSearchInput-CwxF3CHN.js} +1 -1
  341. package/dist/chunks/{useSettingsErrors-BRxaYl6B.js → useSettingsErrors-CjDaon07.js} +1 -1
  342. package/dist/chunks/useTerminalSize-Du-EamDN.js +1 -0
  343. package/dist/chunks/{useVoice-ByU-q_w4.js → useVoice-X5WSnyed.js} +1 -1
  344. package/dist/chunks/{util-SpgBY5_I.js → util-CP-_gsEO.js} +1 -1
  345. package/dist/chunks/utils-CULcnflj.js +1 -0
  346. package/dist/chunks/{validatePlugin-CxCXNV8o.js → validatePlugin-DUuaprqR.js} +1 -1
  347. package/dist/chunks/{vim-ByXlYzf9.js → vim-BfmsdxOa.js} +1 -1
  348. package/dist/chunks/{voice-BnLS_SdQ.js → voice-B3GIfFlB.js} +1 -1
  349. package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +1 -0
  350. package/dist/chunks/{voiceModeEnabled-D070o6QK.js → voiceModeEnabled-C1Q9j5q6.js} +1 -1
  351. package/dist/chunks/{voiceStreamSTT-vkQ-Aop7.js → voiceStreamSTT-BguyxdrW.js} +1 -1
  352. package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +1 -0
  353. package/dist/chunks/{web-tools-1yM0ZBfA.js → web-tools-qf_VwWRn.js} +1 -1
  354. package/dist/chunks/{workerRegistry-7xGv_sNB.js → workerRegistry-SbiLJIsG.js} +1 -1
  355. package/dist/chunks/worktree-Djga1wtm.js +1 -0
  356. package/dist/chunks/{xml-BUaEXGXx.js → xml-D7-jJqSA.js} +1 -1
  357. package/dist/cli.js +1 -1
  358. package/package.json +1 -1
  359. package/dist/chunks/ApproveApiKey-oTZKoMvB.js +0 -1
  360. package/dist/chunks/ClaudeMdExternalIncludesDialog-5FCT81WS.js +0 -1
  361. package/dist/chunks/ConsoleOAuthFlow-BmGziW64.js +0 -1
  362. package/dist/chunks/Dialog-C8eGKH-e.js +0 -1
  363. package/dist/chunks/Doctor-DohPtIKu.js +0 -1
  364. package/dist/chunks/Grove-C_ocvHd3.js +0 -1
  365. package/dist/chunks/ListItem-DDMe4CJ3.js +0 -1
  366. package/dist/chunks/Messages-KmeXIJqL.js +0 -11
  367. package/dist/chunks/REPL-BBmn_itf.js +0 -1
  368. package/dist/chunks/SearchBox-CciJ8giD.js +0 -1
  369. package/dist/chunks/SearchExtraToolsTool-kjVFsFkT.js +0 -1
  370. package/dist/chunks/SentryErrorBoundary-DsrmgmKF.js +0 -1
  371. package/dist/chunks/api-DkgaFAzq.js +0 -1
  372. package/dist/chunks/assistant-CiNV3Q0f.js +0 -1
  373. package/dist/chunks/auth-CbQCc9vz.js +0 -1
  374. package/dist/chunks/backgroundHousekeeping-LYpOamcN.js +0 -1
  375. package/dist/chunks/bridgeConfig-Budgp2Go.js +0 -1
  376. package/dist/chunks/bridgeEnabled-DmvmwuUY.js +0 -1
  377. package/dist/chunks/bridgeMain-KYR5iq6H.js +0 -1
  378. package/dist/chunks/caches-CkH9F-Fd.js +0 -1
  379. package/dist/chunks/ccshareResume-DPP1blaU.js +0 -1
  380. package/dist/chunks/changeDetector-IFbty4jj.js +0 -1
  381. package/dist/chunks/channelNotification-CIyWY0hs.js +0 -1
  382. package/dist/chunks/clear-BVjSQsUL.js +0 -1
  383. package/dist/chunks/client-BUUsZdSe.js +0 -1
  384. package/dist/chunks/commands-pTQdOvN6.js +0 -1
  385. package/dist/chunks/commitAttribution-QPrKt_BF.js +0 -1
  386. package/dist/chunks/completionCache-BB7-y2BX.js +0 -1
  387. package/dist/chunks/context-noninteractive-OUTZ6BKj.js +0 -1
  388. package/dist/chunks/conversation-Bs8l0KNl.js +0 -1
  389. package/dist/chunks/createSession-DpqtD4ML.js +0 -1
  390. package/dist/chunks/crossProjectResume-BCr6jfGz.js +0 -40
  391. package/dist/chunks/datadog-DlzPb5oG.js +0 -1
  392. package/dist/chunks/desktop-WH8s-9-6.js +0 -1
  393. package/dist/chunks/entry-CEBaLwEG.js +0 -14
  394. package/dist/chunks/envLessBridgeConfig-izoVnE8s.js +0 -1
  395. package/dist/chunks/extra-usage-VSASGlte.js +0 -1
  396. package/dist/chunks/extractMemories-hQlhiVOD.js +0 -1
  397. package/dist/chunks/fast-2gWrhEFZ.js +0 -1
  398. package/dist/chunks/gates-dO6m4Hdp.js +0 -1
  399. package/dist/chunks/hooks-BWoN0nQP.js +0 -1
  400. package/dist/chunks/inboundAttachments-D8vq1NQO.js +0 -1
  401. package/dist/chunks/language-CSDpzbTz.js +0 -1
  402. package/dist/chunks/loadAgentsDir-B-4D2dVE.js +0 -1
  403. package/dist/chunks/localSearch-DsFH9yls.js +0 -1
  404. package/dist/chunks/login-CEJEl2mW.js +0 -1
  405. package/dist/chunks/logout-BXr4jzNY.js +0 -1
  406. package/dist/chunks/mappers-BNI_df3v.js +0 -1
  407. package/dist/chunks/model-CgH43-hO.js +0 -1
  408. package/dist/chunks/panelCall-DUQdjDee.js +0 -1
  409. package/dist/chunks/plugin-DXhCgoNC.js +0 -1
  410. package/dist/chunks/pluginStartupCheck-BFuZqpnX.js +0 -1
  411. package/dist/chunks/policyLimits-B3dtp_Fe.js +0 -1
  412. package/dist/chunks/poorMode-BPIUnFFi.js +0 -1
  413. package/dist/chunks/projectContext-2Z2w8AI8.js +0 -1
  414. package/dist/chunks/projectContext-fS1t-xRh.js +0 -1
  415. package/dist/chunks/prompt-CogZQuTN.js +0 -227
  416. package/dist/chunks/prompt-CriAIdkT.js +0 -1
  417. package/dist/chunks/prompt-TGc_H1cL.js +0 -1
  418. package/dist/chunks/sandbox-adapter-DrHD1mch.js +0 -1
  419. package/dist/chunks/searchExtraTools-Dwg6ZafS.js +0 -1
  420. package/dist/chunks/sessionFileAccessHooks-n7HcOfZ7.js +0 -1
  421. package/dist/chunks/sessionMemory-DVq43VXP.js +0 -1
  422. package/dist/chunks/sessionMemoryUtils-BjkdLRvh.js +0 -1
  423. package/dist/chunks/sessionObserver-CrfmnMzL.js +0 -1
  424. package/dist/chunks/sessionStorage-BTbr9wkZ.js +0 -1
  425. package/dist/chunks/sink-CoUVbLFs.js +0 -1
  426. package/dist/chunks/sinks-wuo1yQ_m.js +0 -1
  427. package/dist/chunks/skillLearning-CFnZiM5J.js +0 -1
  428. package/dist/chunks/skillLearning-D6mvGN90.js +0 -1
  429. package/dist/chunks/startupProfiler-BmnoJtfF.js +0 -1
  430. package/dist/chunks/startupProfiler-rCtNuhXz.js +0 -3
  431. package/dist/chunks/status-DlT1tUmc.js +0 -1
  432. package/dist/chunks/tasks-Bf1Nf3WX.js +0 -1
  433. package/dist/chunks/teamHelpers-DeQCfdgu.js +0 -1
  434. package/dist/chunks/teammateModeSnapshot-BRuKcJNr.js +0 -1
  435. package/dist/chunks/thinkback-CVYpxAyO.js +0 -1
  436. package/dist/chunks/toolPool-CDEeuQd2.js +0 -1
  437. package/dist/chunks/undercover-BviGW-bQ.js +0 -1
  438. package/dist/chunks/upgrade-DAuhXFVI.js +0 -1
  439. package/dist/chunks/useKeybinding-DOjEx42R.js +0 -1
  440. package/dist/chunks/useMainLoopModel-BZoZdEdj.js +0 -1
  441. package/dist/chunks/useTerminalSize-mqo2Swmk.js +0 -1
  442. package/dist/chunks/utils-CM5oEyAY.js +0 -1
  443. package/dist/chunks/voiceModeEnabled-B3njLfhA.js +0 -1
  444. package/dist/chunks/voiceStreamSTT-BkeyhhFJ.js +0 -1
  445. package/dist/chunks/worktree-UA9gKCwL.js +0 -1
  446. /package/dist/chunks/{chromeNativeHost-DfYuJafI.js → chromeNativeHost-BldB1Zzi.js} +0 -0
  447. /package/dist/chunks/{claudeDesktop-CEQCLZmG.js → claudeDesktop-BqTW_pbB.js} +0 -0
  448. /package/dist/chunks/{cleanup-DUVwlFl7.js → cleanup-rCLlo4w8.js} +0 -0
  449. /package/dist/chunks/{eventLoopStallDetector-MNrFR4OH.js → eventLoopStallDetector-bYy0fesH.js} +0 -0
  450. /package/dist/chunks/{postCommitAttribution-Br4g4R6h.js → postCommitAttribution-D8MoHFoz.js} +0 -0
  451. /package/dist/chunks/{sdkHeapDumpMonitor-DTHI5WbD.js → sdkHeapDumpMonitor-DLMMNeqo.js} +0 -0
  452. /package/dist/chunks/{sessionDataUploader-BgmJTXQr.js → sessionDataUploader-CsNePsOb.js} +0 -0
  453. /package/dist/chunks/{udsClient-B85rNglp.js → udsClient-CBF_cZFW.js} +0 -0
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Tn as t,wn as n}from"./src-Di342QoJ.js";import{Ct as r,cn as i}from"./state-sIHsFpDu.js";import{et as a}from"./log-DSV4Ht5l.js";import{Uo as o,ho as s,my as c,vy as l}from"./loadAgentsDir-DC4jN6-f.js";import{fn as u}from"./prompt-BHI7PZe4.js";import{randomUUID as d}from"crypto";function f(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:e.message,uuid:e.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case`user`:return[{type:`user`,message:e.message,uuid:e.uuid??d(),timestamp:e.timestamp??new Date().toISOString(),isMeta:e.isSynthetic}];default:return[]}})}function p(e){let t=e.preservedSegment;return{trigger:e.trigger,pre_tokens:e.preTokens,...t&&{preserved_segment:{head_uuid:t.headUuid,anchor_uuid:t.anchorUuid,tail_uuid:t.tailUuid}}}}function m(e){let t=e,n=t.preserved_segment;return{trigger:t.trigger,preTokens:t.pre_tokens,...n&&{preservedSegment:{headUuid:n.head_uuid,anchorUuid:n.anchor_uuid,tailUuid:n.tail_uuid}}}}function h(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:v(e),session_id:r(),parent_tool_use_id:null,uuid:e.uuid,error:e?.error}];case`user`:return[{type:`user`,message:e.message,session_id:r(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly,...e.toolUseResult===void 0?{}:{tool_use_result:e.toolUseResult}}];case`system`:return e.subtype===`compact_boundary`&&e.compactMetadata?[{type:`system`,subtype:`compact_boundary`,session_id:r(),uuid:e.uuid,compact_metadata:p(e.compactMetadata)}]:e.subtype===`local_command`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))?[g(e.content,e.uuid)]:[];default:return[]}})}function g(e,n){let i=s({content:t(e).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,`$1`).replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,`$1`).trim()});return{type:`assistant`,content:i.message?.content,message:i.message,parent_tool_use_id:null,session_id:r(),uuid:n}}function _(e){if(e)return{type:`rate_limit`,status:e.status,...e.resetsAt!==void 0&&{resetsAt:e.resetsAt},...e.rateLimitType!==void 0&&{rateLimitType:e.rateLimitType},...e.utilization!==void 0&&{utilization:e.utilization},...e.overageStatus!==void 0&&{overageStatus:e.overageStatus},...e.overageResetsAt!==void 0&&{overageResetsAt:e.overageResetsAt},...e.overageDisabledReason!==void 0&&{overageDisabledReason:e.overageDisabledReason},...e.isUsingOverage!==void 0&&{isUsingOverage:e.isUsingOverage},...e.surpassedThreshold!==void 0&&{surpassedThreshold:e.surpassedThreshold}}}function v(e){let t=e.message.content;if(!Array.isArray(t))return e.message;let n=t.map(e=>{if(e.type!==`tool_use`)return e;if(e.name===`ExitPlanMode`){let t=c();if(t)return{...e,input:{...e.input,plan:t}}}return e});return{...e.message,content:n}}var y=e((()=>{i(),a(),u(),n(),o(),l()}));export{p as a,f as i,y as n,h as o,g as r,_ as s,m as t};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{Q as i,Rn as a,T as o,b as s,f as c,g as l,h as u,nt as d,t as f,tt as p,v as m,x as h}from"./src-KjMLauwe.js";import{t as g}from"./jsx-runtime-D-D469L8.js";import{l as _,u as v}from"./debug-otxXY3j-.js";import{l as y,n as b,o as x}from"./stringUtils-KZoO4GUd.js";import{$C as S,Cw as C,DC as w,EC as T,JC as E,Ky as D,Ow as O,Ry as ee,Tw as k,Wy as A,YC as j,aS as M,dC as te,ew as ne,gw as N,lC as P,uC as F}from"./loadAgentsDir-CQF8qhne.js";import{D as re,O as ie}from"./rcDebugLog-DOXxIr8l.js";import{t as ae}from"./useKeybinding-DOjEx42R.js";import{i as oe,n as se,r as ce}from"./MCPConnectionManager-CsPizxTx.js";import{n as le,t as ue}from"./McpParsingWarnings-Cepe7RPZ.js";import{a as de,c as I,i as L,l as fe,n as pe,o as R,r as me,s as he,t as ge,u as z}from"./PluginSettings-BZ-PX9Tg.js";function _e({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[d,f]=(0,B.useState)(!1),[g,_]=(0,B.useState)(null),[v,y]=(0,B.useState)(null),x=(0,B.useRef)(null);(0,B.useEffect)(()=>()=>x.current?.abort(),[]),p(`confirm:no`,(0,B.useCallback)(()=>{d&&(x.current?.abort(),x.current=null,f(!1),y(null))},[d]),{context:`Confirmation`,isActive:d});let S=(0,B.useCallback)(async()=>{if(!e.needsAuth||!e.url)return;f(!0),_(null);let t=new AbortController;x.current=t;try{let r={type:e.transport,url:e.url};await ne(e.name,r,y,t.signal),n?.(`Authentication successful for ${e.name}. The server will connect when the agent runs.`)}catch(e){e instanceof Error&&!(e instanceof E)&&_(e.message)}finally{f(!1),x.current=null}},[e,n]),C=b(String(e.name));if(d)return(0,V.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,V.jsxs)(s,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,V.jsxs)(h,{children:[(0,V.jsx)(A,{}),(0,V.jsx)(s,{children:` A browser window will open for authentication`})]}),v&&(0,V.jsxs)(h,{flexDirection:`column`,children:[(0,V.jsx)(s,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,V.jsx)(i,{url:v})]}),(0,V.jsx)(h,{marginLeft:3,children:(0,V.jsxs)(s,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,V.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let w=[];return e.needsAuth&&w.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),w.push({label:`Back`,value:`back`}),(0,V.jsxs)(c,{title:`${C} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,V.jsxs)(s,{children:[`Press `,e.keyName,` again to exit`]}):(0,V.jsxs)(u,{children:[(0,V.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,V.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,V.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,V.jsxs)(h,{flexDirection:`column`,gap:0,children:[(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Type: `}),(0,V.jsx)(s,{dimColor:!0,children:e.transport})]}),e.url&&(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`URL: `}),(0,V.jsx)(s,{dimColor:!0,children:e.url})]}),e.command&&(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Command: `}),(0,V.jsx)(s,{dimColor:!0,children:e.command})]}),(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Used by: `}),(0,V.jsx)(s,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,V.jsxs)(h,{marginTop:1,children:[(0,V.jsx)(s,{bold:!0,children:`Status: `}),(0,V.jsxs)(s,{children:[m(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,V.jsxs)(s,{children:[m(`success`,a)(r.tick),` authenticated`]}):(0,V.jsxs)(s,{children:[m(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,V.jsx)(h,{children:(0,V.jsx)(s,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,V.jsx)(h,{children:(0,V.jsxs)(s,{color:`error`,children:[`Error: `,g]})}),(0,V.jsx)(h,{children:(0,V.jsx)(M,{options:w,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var B,V,H=e((()=>{n(),B=t(a(),1),f(),ae(),S(),x(),w(),ee(),D(),V=g()}));function U(e){switch(e){case`project`:return{label:`Project MCPs`,path:N(e)};case`user`:return{label:`User MCPs`,path:N(e)};case`local`:return{label:`Local MCPs`,path:N(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function ve(e){let t=new Map;for(let n of e){let e=n.scope;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let[,e]of t)e.sort((e,t)=>e.name.localeCompare(t.name));return t}function ye({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:a,onComplete:f}){let[p]=o(),[g,_]=(0,W.useState)(0),b=W.useMemo(()=>ve(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),x=W.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=W.useMemo(()=>(b.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[b]),C=U(`dynamic`),w=W.useMemo(()=>{let e=[];for(let t of K){let n=b.get(t)??[];for(let t of n)e.push({type:`server`,server:t})}for(let t of x)e.push({type:`server`,server:t});for(let n of t)e.push({type:`agent-server`,agentServer:n});for(let t of S)e.push({type:`server`,server:t});return e},[b,x,t,S]),E=(0,W.useCallback)(()=>{f(`MCP dialog dismissed`,{display:`system`})},[f]);d({"confirm:previous":()=>_(e=>e===0?w.length-1:e-1),"confirm:next":()=>_(e=>e===w.length-1?0:e+1),"confirm:yes":(0,W.useCallback)(()=>{let e=w[g];e&&(e.type===`server`?n(e.server):e.type===`agent-server`&&a&&a(e.agentServer))},[w,g,n,a]),"confirm:no":E},{context:`Confirmation`});let D=e=>w.findIndex(t=>t.type===`server`&&t.server===e),O=e=>w.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),ee=v(),k=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let A=e=>{let t=D(e),n=g===t,i=``,a=``;if(e.client.type===`disabled`)i=m(`inactive`,p)(r.radioOff),a=`disabled`;else if(e.client.type===`connected`)i=m(`success`,p)(r.tick),a=`connected`;else if(e.client.type===`pending`){i=m(`inactive`,p)(r.radioOff);let{reconnectAttempt:t,maxReconnectAttempts:n}=e.client;a=t&&n?`reconnecting (${t}/${n})…`:`connecting…`}else e.client.type===`needs-auth`?(i=m(`warning`,p)(r.triangleUpOutline),a=`needs authentication`):(i=m(`error`,p)(r.cross),a=`failed`);return(0,G.jsxs)(h,{children:[(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,G.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,G.jsx)(s,{dimColor:!n,children:a})]},`${e.name}-${t}`)},j=e=>{let t=O(e),n=g===t,i=e.needsAuth?m(`warning`,p)(r.triangleUpOutline):m(`inactive`,p)(r.radioOff),a=e.needsAuth?`may need auth`:`agent-only`;return(0,G.jsxs)(h,{children:[(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,G.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,G.jsx)(s,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},M=e.length+t.length;return(0,G.jsxs)(h,{flexDirection:`column`,children:[(0,G.jsx)(ue,{}),(0,G.jsx)(c,{title:`Manage MCP servers`,subtitle:`${M} ${y(M,`server`)}`,onCancel:E,hideInputGuide:!0,children:(0,G.jsxs)(h,{flexDirection:`column`,children:[K.map(e=>{let t=b.get(e);if(!t||t.length===0)return null;let n=U(e);return(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsxs)(h,{paddingLeft:2,children:[(0,G.jsx)(s,{bold:!0,children:n.label}),n.path&&(0,G.jsxs)(s,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>A(e))]},e)}),x.length>0&&(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(h,{paddingLeft:2,children:(0,G.jsx)(s,{bold:!0,children:`claude.ai`})}),x.map(e=>A(e))]}),t.length>0&&(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(h,{paddingLeft:2,children:(0,G.jsx)(s,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,G.jsxs)(h,{flexDirection:`column`,marginTop:1,children:[(0,G.jsx)(h,{paddingLeft:2,children:(0,G.jsxs)(s,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>j(e))]},e))]}),S.length>0&&(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsxs)(h,{paddingLeft:2,children:[(0,G.jsx)(s,{bold:!0,children:C.label}),C.path&&(0,G.jsxs)(s,{dimColor:!0,children:[` (`,C.path,`)`]})]}),S.map(e=>A(e))]}),(0,G.jsxs)(h,{flexDirection:`column`,children:[k&&(0,G.jsx)(s,{dimColor:!0,children:ee?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,G.jsxs)(s,{dimColor:!0,children:[(0,G.jsx)(i,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,G.jsx)(h,{paddingX:1,children:(0,G.jsx)(s,{dimColor:!0,italic:!0,children:(0,G.jsxs)(u,{children:[(0,G.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,G.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,G.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var W,G,K,be=e((()=>{n(),W=t(a(),1),f(),ae(),O(),_(),x(),w(),le(),G=g(),K=[`project`,`local`,`user`,`enterprise`]}));function xe({serverName:e,onComplete:t}){let[n]=o(),i=te(),a=ce(),[c,l]=(0,q.useState)(!0),[u,d]=(0,q.useState)(null);return(0,q.useEffect)(()=>{async function n(){try{if(!i.getState().mcp.clients.find(t=>t.name===e)){d(`MCP server "${e}" not found`),l(!1),t(`MCP server "${e}" not found`);return}switch((await a(e)).client.type){case`connected`:l(!1),t(`Successfully reconnected to ${e}`);break;case`needs-auth`:d(`${e} requires authentication`),l(!1),t(`${e} requires authentication. Use /mcp to authenticate.`);break;case`pending`:case`failed`:case`disabled`:d(`Failed to reconnect to ${e}`),l(!1),t(`Failed to reconnect to ${e}`);break}}catch(e){let n=e instanceof Error?e.message:String(e);d(n),l(!1),t(`Error: ${n}`)}}n()},[e,a,i,t]),c?(0,J.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,J.jsxs)(s,{color:`text`,children:[`Reconnecting to `,(0,J.jsx)(s,{bold:!0,children:e})]}),(0,J.jsxs)(h,{children:[(0,J.jsx)(A,{}),(0,J.jsx)(s,{children:` Establishing connection to MCP server`})]})]}):u?(0,J.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,J.jsxs)(h,{children:[(0,J.jsxs)(s,{children:[m(`error`,n)(r.cross),` `]}),(0,J.jsxs)(s,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,J.jsxs)(s,{dimColor:!0,children:[`Error: `,u]})]}):null}var q,J,Y=e((()=>{n(),q=t(a(),1),f(),se(),P(),D(),J=g()}));function Se({onComplete:e}){let t=F(e=>e.mcp),n=F(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>C(n.allAgents),[n.allAgents]),l=X.useMemo(()=>r.filter(e=>e.name!==`ide`).sort((e,t)=>e.name.localeCompare(t.name)),[r]);switch(X.useEffect(()=>{let e=!1;async function n(){let n=await Promise.all(l.map(async e=>{let n=e.config.scope,r=e.config.type===`sse`,i=e.config.type===`http`,a=e.config.type===`claudeai-proxy`,o;if(r||i){let n=await new j(e.name,e.config).tokens(),r=re()!==null&&e.type===`connected`,i=e.type===`connected`&&k(t.tools,e.name).length>0;o=!!n||r||i}let s={name:e.name,client:e,scope:n};return a?{...s,transport:`claudeai-proxy`,isAuthenticated:!1,config:e.config}:r?{...s,transport:`sse`,isAuthenticated:o,config:e.config}:i?{...s,transport:`http`,isAuthenticated:o,config:e.config}:{...s,transport:`stdio`,config:e.config}}));e||s(n)}return n(),()=>{e=!0}},[l,t.tools]),(0,X.useEffect)(()=>{o.length===0&&l.length>0||o.length===0&&c.length===0&&e("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.")},[o.length,l.length,c.length,e]),i.type){case`list`:return(0,Z.jsx)(ye,{servers:o,agentServers:c,onSelectServer:e=>a({type:`server-menu`,server:e}),onSelectAgentServer:e=>a({type:`agent-server-menu`,agentServer:e}),onComplete:e,defaultTab:i.defaultTab});case`server-menu`:{let n=k(t.tools,i.server.name),r=i.server.transport===`claudeai-proxy`?`claude.ai`:`Claude Code`;return i.server.transport===`stdio`?(0,Z.jsx)(he,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e}):(0,Z.jsx)(fe,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e})}case`server-tools`:return(0,Z.jsx)(me,{server:i.server,onSelectTool:(e,t)=>a({type:`server-tool-detail`,server:i.server,toolIndex:t}),onBack:()=>a({type:`server-menu`,server:i.server})});case`server-tool-detail`:{let e=k(t.tools,i.server.name)[i.toolIndex];return e?(0,Z.jsx)(de,{tool:e,server:i.server,onBack:()=>a({type:`server-tools`,server:i.server})}):(a({type:`server-tools`,server:i.server}),null)}case`agent-server-menu`:return(0,Z.jsx)(_e,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Ce=e((()=>{X=t(a(),1),S(),O(),P(),ie(),H(),be(),z(),I(),R(),L(),Z=g()})),we=e((()=>{H(),be(),Y(),z(),Ce(),I(),R(),L()}));function Te({action:e,target:t,onComplete:n}){let r=F(e=>e.mcp.clients),i=oe(),a=(0,Q.useRef)(!1);return(0,Q.useEffect)(()=>{if(a.current)return;a.current=!0;let o=e===`enable`,s=r.filter(e=>e.name!==`ide`),c=t===`all`?s.filter(e=>o?e.type===`disabled`:e.type!==`disabled`):s.filter(e=>e.name===t);if(c.length===0){n(t===`all`?`All MCP servers are already ${o?`enabled`:`disabled`}`:`MCP server "${t}" not found`);return}for(let e of c)i(e.name);n(t===`all`?`${o?`Enabled`:`Disabled`} ${c.length} MCP server(s)`:`MCP server "${t}" ${o?`enabled`:`disabled`}`)},[e,t,r,i,n]),null}async function Ee(e,t,n){if(n){let t=n.trim().split(/\s+/);if(t[0]===`no-redirect`)return(0,$.jsx)(Se,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(xe,{serverName:t.slice(1).join(` `),onComplete:e});if(t[0]===`enable`||t[0]===`disable`)return(0,$.jsx)(Te,{action:t[0],target:t.length>1?t.slice(1).join(` `):`all`,onComplete:e})}return process.env.USER_TYPE===`ant`?(0,$.jsx)(ge,{onComplete:e,args:`manage`,showMcpRedirectMessage:!0}):(0,$.jsx)(Se,{onComplete:e})}var Q,$;e((()=>{Q=t(a(),1),we(),Y(),se(),P(),pe(),$=g()}))();export{Ee as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{Q as i,Rn as a,T as o,b as s,f as c,g as l,h as u,nt as d,t as f,tt as p,v as m,x as h}from"./src-Di342QoJ.js";import{t as g}from"./jsx-runtime-D-D469L8.js";import{l as _,u as v}from"./debug-otxXY3j-.js";import{l as y,n as b,o as x}from"./stringUtils-KZoO4GUd.js";import{$C as S,Cw as C,DC as w,EC as T,JC as E,Ky as D,Ow as O,Ry as ee,Tw as k,Wy as A,YC as j,aS as M,dC as te,ew as ne,gw as N,lC as P,uC as F}from"./loadAgentsDir-DC4jN6-f.js";import{D as re,O as ie}from"./rcDebugLog-C0Bam8V9.js";import{t as ae}from"./useKeybinding-DPOUuymz.js";import{i as oe,n as se,r as ce}from"./MCPConnectionManager-2Fulnp8q.js";import{n as le,t as ue}from"./McpParsingWarnings-DWMO0bV6.js";import{a as de,c as I,i as L,l as fe,n as pe,o as R,r as me,s as he,t as ge,u as z}from"./PluginSettings-DIS_qrVA.js";function _e({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[d,f]=(0,B.useState)(!1),[g,_]=(0,B.useState)(null),[v,y]=(0,B.useState)(null),x=(0,B.useRef)(null);(0,B.useEffect)(()=>()=>x.current?.abort(),[]),p(`confirm:no`,(0,B.useCallback)(()=>{d&&(x.current?.abort(),x.current=null,f(!1),y(null))},[d]),{context:`Confirmation`,isActive:d});let S=(0,B.useCallback)(async()=>{if(!e.needsAuth||!e.url)return;f(!0),_(null);let t=new AbortController;x.current=t;try{let r={type:e.transport,url:e.url};await ne(e.name,r,y,t.signal),n?.(`Authentication successful for ${e.name}. The server will connect when the agent runs.`)}catch(e){e instanceof Error&&!(e instanceof E)&&_(e.message)}finally{f(!1),x.current=null}},[e,n]),C=b(String(e.name));if(d)return(0,V.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,V.jsxs)(s,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,V.jsxs)(h,{children:[(0,V.jsx)(A,{}),(0,V.jsx)(s,{children:` A browser window will open for authentication`})]}),v&&(0,V.jsxs)(h,{flexDirection:`column`,children:[(0,V.jsx)(s,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,V.jsx)(i,{url:v})]}),(0,V.jsx)(h,{marginLeft:3,children:(0,V.jsxs)(s,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,V.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let w=[];return e.needsAuth&&w.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),w.push({label:`Back`,value:`back`}),(0,V.jsxs)(c,{title:`${C} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,V.jsxs)(s,{children:[`Press `,e.keyName,` again to exit`]}):(0,V.jsxs)(u,{children:[(0,V.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,V.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,V.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,V.jsxs)(h,{flexDirection:`column`,gap:0,children:[(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Type: `}),(0,V.jsx)(s,{dimColor:!0,children:e.transport})]}),e.url&&(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`URL: `}),(0,V.jsx)(s,{dimColor:!0,children:e.url})]}),e.command&&(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Command: `}),(0,V.jsx)(s,{dimColor:!0,children:e.command})]}),(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Used by: `}),(0,V.jsx)(s,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,V.jsxs)(h,{marginTop:1,children:[(0,V.jsx)(s,{bold:!0,children:`Status: `}),(0,V.jsxs)(s,{children:[m(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,V.jsxs)(h,{children:[(0,V.jsx)(s,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,V.jsxs)(s,{children:[m(`success`,a)(r.tick),` authenticated`]}):(0,V.jsxs)(s,{children:[m(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,V.jsx)(h,{children:(0,V.jsx)(s,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,V.jsx)(h,{children:(0,V.jsxs)(s,{color:`error`,children:[`Error: `,g]})}),(0,V.jsx)(h,{children:(0,V.jsx)(M,{options:w,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var B,V,H=e((()=>{n(),B=t(a(),1),f(),ae(),S(),x(),w(),ee(),D(),V=g()}));function U(e){switch(e){case`project`:return{label:`Project MCPs`,path:N(e)};case`user`:return{label:`User MCPs`,path:N(e)};case`local`:return{label:`Local MCPs`,path:N(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function ve(e){let t=new Map;for(let n of e){let e=n.scope;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let[,e]of t)e.sort((e,t)=>e.name.localeCompare(t.name));return t}function ye({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:a,onComplete:f}){let[p]=o(),[g,_]=(0,W.useState)(0),b=W.useMemo(()=>ve(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),x=W.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=W.useMemo(()=>(b.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[b]),C=U(`dynamic`),w=W.useMemo(()=>{let e=[];for(let t of K){let n=b.get(t)??[];for(let t of n)e.push({type:`server`,server:t})}for(let t of x)e.push({type:`server`,server:t});for(let n of t)e.push({type:`agent-server`,agentServer:n});for(let t of S)e.push({type:`server`,server:t});return e},[b,x,t,S]),E=(0,W.useCallback)(()=>{f(`MCP dialog dismissed`,{display:`system`})},[f]);d({"confirm:previous":()=>_(e=>e===0?w.length-1:e-1),"confirm:next":()=>_(e=>e===w.length-1?0:e+1),"confirm:yes":(0,W.useCallback)(()=>{let e=w[g];e&&(e.type===`server`?n(e.server):e.type===`agent-server`&&a&&a(e.agentServer))},[w,g,n,a]),"confirm:no":E},{context:`Confirmation`});let D=e=>w.findIndex(t=>t.type===`server`&&t.server===e),O=e=>w.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),ee=v(),k=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let A=e=>{let t=D(e),n=g===t,i=``,a=``;if(e.client.type===`disabled`)i=m(`inactive`,p)(r.radioOff),a=`disabled`;else if(e.client.type===`connected`)i=m(`success`,p)(r.tick),a=`connected`;else if(e.client.type===`pending`){i=m(`inactive`,p)(r.radioOff);let{reconnectAttempt:t,maxReconnectAttempts:n}=e.client;a=t&&n?`reconnecting (${t}/${n})…`:`connecting…`}else e.client.type===`needs-auth`?(i=m(`warning`,p)(r.triangleUpOutline),a=`needs authentication`):(i=m(`error`,p)(r.cross),a=`failed`);return(0,G.jsxs)(h,{children:[(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,G.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,G.jsx)(s,{dimColor:!n,children:a})]},`${e.name}-${t}`)},j=e=>{let t=O(e),n=g===t,i=e.needsAuth?m(`warning`,p)(r.triangleUpOutline):m(`inactive`,p)(r.radioOff),a=e.needsAuth?`may need auth`:`agent-only`;return(0,G.jsxs)(h,{children:[(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,G.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,G.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,G.jsx)(s,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},M=e.length+t.length;return(0,G.jsxs)(h,{flexDirection:`column`,children:[(0,G.jsx)(ue,{}),(0,G.jsx)(c,{title:`Manage MCP servers`,subtitle:`${M} ${y(M,`server`)}`,onCancel:E,hideInputGuide:!0,children:(0,G.jsxs)(h,{flexDirection:`column`,children:[K.map(e=>{let t=b.get(e);if(!t||t.length===0)return null;let n=U(e);return(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsxs)(h,{paddingLeft:2,children:[(0,G.jsx)(s,{bold:!0,children:n.label}),n.path&&(0,G.jsxs)(s,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>A(e))]},e)}),x.length>0&&(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(h,{paddingLeft:2,children:(0,G.jsx)(s,{bold:!0,children:`claude.ai`})}),x.map(e=>A(e))]}),t.length>0&&(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(h,{paddingLeft:2,children:(0,G.jsx)(s,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,G.jsxs)(h,{flexDirection:`column`,marginTop:1,children:[(0,G.jsx)(h,{paddingLeft:2,children:(0,G.jsxs)(s,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>j(e))]},e))]}),S.length>0&&(0,G.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsxs)(h,{paddingLeft:2,children:[(0,G.jsx)(s,{bold:!0,children:C.label}),C.path&&(0,G.jsxs)(s,{dimColor:!0,children:[` (`,C.path,`)`]})]}),S.map(e=>A(e))]}),(0,G.jsxs)(h,{flexDirection:`column`,children:[k&&(0,G.jsx)(s,{dimColor:!0,children:ee?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,G.jsxs)(s,{dimColor:!0,children:[(0,G.jsx)(i,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,G.jsx)(h,{paddingX:1,children:(0,G.jsx)(s,{dimColor:!0,italic:!0,children:(0,G.jsxs)(u,{children:[(0,G.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,G.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,G.jsx)(T,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var W,G,K,be=e((()=>{n(),W=t(a(),1),f(),ae(),O(),_(),x(),w(),le(),G=g(),K=[`project`,`local`,`user`,`enterprise`]}));function xe({serverName:e,onComplete:t}){let[n]=o(),i=te(),a=ce(),[c,l]=(0,q.useState)(!0),[u,d]=(0,q.useState)(null);return(0,q.useEffect)(()=>{async function n(){try{if(!i.getState().mcp.clients.find(t=>t.name===e)){d(`MCP server "${e}" not found`),l(!1),t(`MCP server "${e}" not found`);return}switch((await a(e)).client.type){case`connected`:l(!1),t(`Successfully reconnected to ${e}`);break;case`needs-auth`:d(`${e} requires authentication`),l(!1),t(`${e} requires authentication. Use /mcp to authenticate.`);break;case`pending`:case`failed`:case`disabled`:d(`Failed to reconnect to ${e}`),l(!1),t(`Failed to reconnect to ${e}`);break}}catch(e){let n=e instanceof Error?e.message:String(e);d(n),l(!1),t(`Error: ${n}`)}}n()},[e,a,i,t]),c?(0,J.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,J.jsxs)(s,{color:`text`,children:[`Reconnecting to `,(0,J.jsx)(s,{bold:!0,children:e})]}),(0,J.jsxs)(h,{children:[(0,J.jsx)(A,{}),(0,J.jsx)(s,{children:` Establishing connection to MCP server`})]})]}):u?(0,J.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,J.jsxs)(h,{children:[(0,J.jsxs)(s,{children:[m(`error`,n)(r.cross),` `]}),(0,J.jsxs)(s,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,J.jsxs)(s,{dimColor:!0,children:[`Error: `,u]})]}):null}var q,J,Y=e((()=>{n(),q=t(a(),1),f(),se(),P(),D(),J=g()}));function Se({onComplete:e}){let t=F(e=>e.mcp),n=F(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>C(n.allAgents),[n.allAgents]),l=X.useMemo(()=>r.filter(e=>e.name!==`ide`).sort((e,t)=>e.name.localeCompare(t.name)),[r]);switch(X.useEffect(()=>{let e=!1;async function n(){let n=await Promise.all(l.map(async e=>{let n=e.config.scope,r=e.config.type===`sse`,i=e.config.type===`http`,a=e.config.type===`claudeai-proxy`,o;if(r||i){let n=await new j(e.name,e.config).tokens(),r=re()!==null&&e.type===`connected`,i=e.type===`connected`&&k(t.tools,e.name).length>0;o=!!n||r||i}let s={name:e.name,client:e,scope:n};return a?{...s,transport:`claudeai-proxy`,isAuthenticated:!1,config:e.config}:r?{...s,transport:`sse`,isAuthenticated:o,config:e.config}:i?{...s,transport:`http`,isAuthenticated:o,config:e.config}:{...s,transport:`stdio`,config:e.config}}));e||s(n)}return n(),()=>{e=!0}},[l,t.tools]),(0,X.useEffect)(()=>{o.length===0&&l.length>0||o.length===0&&c.length===0&&e("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.")},[o.length,l.length,c.length,e]),i.type){case`list`:return(0,Z.jsx)(ye,{servers:o,agentServers:c,onSelectServer:e=>a({type:`server-menu`,server:e}),onSelectAgentServer:e=>a({type:`agent-server-menu`,agentServer:e}),onComplete:e,defaultTab:i.defaultTab});case`server-menu`:{let n=k(t.tools,i.server.name),r=i.server.transport===`claudeai-proxy`?`claude.ai`:`Claude Code`;return i.server.transport===`stdio`?(0,Z.jsx)(he,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e}):(0,Z.jsx)(fe,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e})}case`server-tools`:return(0,Z.jsx)(me,{server:i.server,onSelectTool:(e,t)=>a({type:`server-tool-detail`,server:i.server,toolIndex:t}),onBack:()=>a({type:`server-menu`,server:i.server})});case`server-tool-detail`:{let e=k(t.tools,i.server.name)[i.toolIndex];return e?(0,Z.jsx)(de,{tool:e,server:i.server,onBack:()=>a({type:`server-tools`,server:i.server})}):(a({type:`server-tools`,server:i.server}),null)}case`agent-server-menu`:return(0,Z.jsx)(_e,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Ce=e((()=>{X=t(a(),1),S(),O(),P(),ie(),H(),be(),z(),I(),R(),L(),Z=g()})),we=e((()=>{H(),be(),Y(),z(),Ce(),I(),R(),L()}));function Te({action:e,target:t,onComplete:n}){let r=F(e=>e.mcp.clients),i=oe(),a=(0,Q.useRef)(!1);return(0,Q.useEffect)(()=>{if(a.current)return;a.current=!0;let o=e===`enable`,s=r.filter(e=>e.name!==`ide`),c=t===`all`?s.filter(e=>o?e.type===`disabled`:e.type!==`disabled`):s.filter(e=>e.name===t);if(c.length===0){n(t===`all`?`All MCP servers are already ${o?`enabled`:`disabled`}`:`MCP server "${t}" not found`);return}for(let e of c)i(e.name);n(t===`all`?`${o?`Enabled`:`Disabled`} ${c.length} MCP server(s)`:`MCP server "${t}" ${o?`enabled`:`disabled`}`)},[e,t,r,i,n]),null}async function Ee(e,t,n){if(n){let t=n.trim().split(/\s+/);if(t[0]===`no-redirect`)return(0,$.jsx)(Se,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(xe,{serverName:t.slice(1).join(` `),onComplete:e});if(t[0]===`enable`||t[0]===`disable`)return(0,$.jsx)(Te,{action:t[0],target:t.length>1?t.slice(1).join(` `):`all`,onComplete:e})}return process.env.USER_TYPE===`ant`?(0,$.jsx)(ge,{onComplete:e,args:`manage`,showMcpRedirectMessage:!0}):(0,$.jsx)(Se,{onComplete:e})}var Q,$;e((()=>{Q=t(a(),1),we(),Y(),se(),P(),pe(),$=g()}))();export{Ee as call};
@@ -1,6 +1,6 @@
1
- import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./p-map-D7WEmnBE.js";import{Mt as r,Rn as i,T as a,b as o,f as s,g as c,h as ee,t as l,v as u,x as d}from"./src-KjMLauwe.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Sc as p,dc as m,lc as h,yc as g}from"./paths-4ZWdjPP4.js";import{K as _,U as v}from"./debug-otxXY3j-.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{n as x,o as S}from"./process-DMKLUQIO.js";import{i as C,o as w}from"./platform-mh9ypxS8.js";import{s as T,u as te}from"./types-KeqFPzY5.js";import{l as E,o as ne}from"./stringUtils-KZoO4GUd.js";import{$C as re,$x as ie,By as ae,DC as oe,Dw as D,EC as O,Fy as k,Gw as A,Iw as j,Ow as M,Py as N,QC as P,Rw as F,SE as I,Vw as L,XC as R,Yx as z,ZC as B,_w as V,cC as H,gw as U,jw as W,lC as G,rw as K,tS as se,tw as ce,wE as q,zw as le,zy as ue}from"./loadAgentsDir-CQF8qhne.js";import{n as J,t as Y}from"./exit-DOBLl8jN.js";import{stat as de}from"fs/promises";import{cwd as fe}from"process";n();var X=e(i(),1);q(),x(),l(),L(),ne(),oe(),ae();var Z=f();function pe({servers:e,scope:t,onDone:n}){let r=Object.keys(e),[i,l]=(0,X.useState)({});(0,X.useEffect)(()=>{j().then(({servers:e})=>l(e))},[]);let f=r.filter(e=>i[e]!==void 0);async function p(n){let r=0;for(let a of n){let n=e[a];if(n){let e=a;if(i[e]!==void 0){let t=1;for(;i[`${a}_${t}`]!==void 0;)t++;e=`${a}_${t}`}await W(e,n,t),r++}}h(r)}let[m]=a(),h=(0,X.useCallback)(e=>{S(e>0?`\n${u(`success`,m)(`Successfully imported ${e} MCP ${E(e,`server`)} to ${t} config.`)}\n`:`
2
- No servers were imported.`),n(),I()},[m,t,n]),g=(0,X.useCallback)(()=>{h(0)},[h]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(s,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${r.length} MCP ${E(r.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:g,hideInputGuide:!0,children:[f.length>0&&(0,Z.jsx)(o,{color:`warning`,children:`Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix.`}),(0,Z.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Z.jsx)(ue,{options:r.map(e=>({label:`${e}${f.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:r.filter(e=>!f.includes(e)),onSubmit:p,onCancel:g,hideIndexes:!0})]}),(0,Z.jsx)(d,{paddingX:1,children:(0,Z.jsx)(o,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(ee,{children:[(0,Z.jsx)(c,{shortcut:`Space`,action:`select`}),(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}l(),k(),y(),re(),se(),L(),M(),G(),g(),v(),q(),T(),w();async function Q(e,t){try{let n=await z(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function me({debug:e,verbose:t}){let n=fe();b(`tengu_mcp_start`,{});try{await de(n)}catch(e){throw _(e)&&Y(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-n3Ixr_gs.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-DbqUZ1Cf.js`);await i(n,e??!1,t??!1)}catch(e){Y(`Error: Failed to start MCP server: ${e}`)}}async function he(e,t){let n=F(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(B(e,n),R(e,n))};try{if(t.scope){let n=V(t.scope);b(`tengu_mcp_delete`,{name:e,scope:n}),await A(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),J(`File modified: ${U(n)}`)}let n=h(),i=m(),{servers:a}=le(`project`),o=!!a[e],s=[];if(n.mcpServers?.[e]&&s.push(`local`),o&&s.push(`project`),i.mcpServers?.[e]&&s.push(`user`),s.length===0)Y(`No MCP server found with name: "${e}"`);else if(s.length===1){let t=s[0];b(`tengu_mcp_delete`,{name:e,scope:t}),await A(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),J(`File modified: ${U(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${D(e)} (${U(e)})\n`)}),process.stderr.write(`
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./p-map-D7WEmnBE.js";import{Mt as r,Rn as i,T as a,b as o,f as s,g as c,h as ee,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Sc as p,dc as m,lc as h,yc as g}from"./paths-CEAy4QCs.js";import{K as _,U as v}from"./debug-otxXY3j-.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{n as x,o as S}from"./process-DMKLUQIO.js";import{i as C,o as w}from"./platform-mh9ypxS8.js";import{s as T,u as te}from"./types-KeqFPzY5.js";import{l as E,o as ne}from"./stringUtils-KZoO4GUd.js";import{$C as re,$x as ie,By as ae,DC as oe,Dw as D,EC as O,Fy as k,Gw as A,Iw as j,Ow as M,Py as N,QC as P,Rw as F,SE as I,Vw as L,XC as R,Yx as z,ZC as B,_w as V,cC as H,gw as U,jw as W,lC as G,rw as K,tS as se,tw as ce,wE as q,zw as le,zy as ue}from"./loadAgentsDir-DC4jN6-f.js";import{n as J,t as Y}from"./exit-DOBLl8jN.js";import{stat as de}from"fs/promises";import{cwd as fe}from"process";n();var X=e(i(),1);q(),x(),l(),L(),ne(),oe(),ae();var Z=f();function pe({servers:e,scope:t,onDone:n}){let r=Object.keys(e),[i,l]=(0,X.useState)({});(0,X.useEffect)(()=>{j().then(({servers:e})=>l(e))},[]);let f=r.filter(e=>i[e]!==void 0);async function p(n){let r=0;for(let a of n){let n=e[a];if(n){let e=a;if(i[e]!==void 0){let t=1;for(;i[`${a}_${t}`]!==void 0;)t++;e=`${a}_${t}`}await W(e,n,t),r++}}h(r)}let[m]=a(),h=(0,X.useCallback)(e=>{S(e>0?`\n${u(`success`,m)(`Successfully imported ${e} MCP ${E(e,`server`)} to ${t} config.`)}\n`:`
2
+ No servers were imported.`),n(),I()},[m,t,n]),g=(0,X.useCallback)(()=>{h(0)},[h]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(s,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${r.length} MCP ${E(r.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:g,hideInputGuide:!0,children:[f.length>0&&(0,Z.jsx)(o,{color:`warning`,children:`Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix.`}),(0,Z.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Z.jsx)(ue,{options:r.map(e=>({label:`${e}${f.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:r.filter(e=>!f.includes(e)),onSubmit:p,onCancel:g,hideIndexes:!0})]}),(0,Z.jsx)(d,{paddingX:1,children:(0,Z.jsx)(o,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(ee,{children:[(0,Z.jsx)(c,{shortcut:`Space`,action:`select`}),(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}l(),k(),y(),re(),se(),L(),M(),G(),g(),v(),q(),T(),w();async function Q(e,t){try{let n=await z(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function me({debug:e,verbose:t}){let n=fe();b(`tengu_mcp_start`,{});try{await de(n)}catch(e){throw _(e)&&Y(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-C2V4elOv.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-i8lqdWTr.js`);await i(n,e??!1,t??!1)}catch(e){Y(`Error: Failed to start MCP server: ${e}`)}}async function he(e,t){let n=F(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(B(e,n),R(e,n))};try{if(t.scope){let n=V(t.scope);b(`tengu_mcp_delete`,{name:e,scope:n}),await A(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),J(`File modified: ${U(n)}`)}let n=h(),i=m(),{servers:a}=le(`project`),o=!!a[e],s=[];if(n.mcpServers?.[e]&&s.push(`local`),o&&s.push(`project`),i.mcpServers?.[e]&&s.push(`user`),s.length===0)Y(`No MCP server found with name: "${e}"`);else if(s.length===1){let t=s[0];b(`tengu_mcp_delete`,{name:e,scope:t}),await A(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),J(`File modified: ${U(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${D(e)} (${U(e)})\n`)}),process.stderr.write(`
3
3
  To remove from a specific scope, use:
4
4
  `),s.forEach(t=>{process.stderr.write(` claude mcp remove "${e}" -s ${t}\n`)}),Y()}catch(e){Y(e.message)}}async function ge(){b(`tengu_mcp_list`,{});let{servers:e}=await j();if(Object.keys(e).length===0)console.log("No MCP servers configured. Use `claude mcp add` to add a server.");else{console.log(`Checking MCP server health...
5
- `);let n=await t(Object.entries(e),async([e,t])=>({name:e,server:t,status:await Q(e,t)}),{concurrency:ie()});for(let{name:e,server:t,status:r}of n)if(t.type===`sse`)console.log(`${e}: ${t.url} (SSE) - ${r}`);else if(t.type===`http`)console.log(`${e}: ${t.url} (HTTP) - ${r}`);else if(t.type===`claudeai-proxy`)console.log(`${e}: ${t.url} - ${r}`);else if(!t.type||t.type===`stdio`){let n=t,i=Array.isArray(n.args)?n.args:[];console.log(`${e}: ${n.command} ${i.join(` `)} - ${r}`)}}await I(0)}async function $(e){b(`tengu_mcp_get`,{name:e});let t=F(e);t||Y(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${D(t.scope)}`);let n=await Q(e,t);if(console.log(` Status: ${n}`),t.type===`sse`){if(console.log(` Type: sse`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),P(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`http`){if(console.log(` Type: http`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),P(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`stdio`){console.log(` Type: stdio`),console.log(` Command: ${t.command}`);let e=Array.isArray(t.args)?t.args:[];if(console.log(` Args: ${e.join(` `)}`),t.env){console.log(` Environment:`);for(let[e,n]of Object.entries(t.env))console.log(` ${e}=${n}`)}}console.log(`\nTo remove this server, run: claude mcp remove "${e}" -s ${t.scope}`),await I(0)}async function _e(e,t,n){try{let r=V(n.scope),i=te(t),a=n.clientSecret&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&`oauth`in i&&i.oauth&&typeof i.oauth==`object`&&`clientId`in i.oauth?await ce():void 0;await W(e,i,r);let o=i&&typeof i==`object`&&`type`in i?String(i.type||`stdio`):`stdio`;a&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&K(e,{type:i.type,url:i.url},a),b(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),J(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){Y(e.message)}}async function ve(e){try{let t=V(e.scope);b(`tengu_mcp_add`,{scope:t,platform:C(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-CEQCLZmG.js`),i=await n();Object.keys(i).length===0&&J(`No MCP servers found in Claude Desktop configuration or configuration file does not exist.`);let{unmount:a}=await r((0,Z.jsx)(H,{children:(0,Z.jsx)(N,{children:(0,Z.jsx)(pe,{servers:i,scope:t,onDone:()=>{a()}})})}),{exitOnCtrlC:!0})}catch(e){Y(e.message)}}async function ye(){b(`tengu_mcp_reset_mcpjson_choices`,{}),p(e=>({...e,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),J(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
5
+ `);let n=await t(Object.entries(e),async([e,t])=>({name:e,server:t,status:await Q(e,t)}),{concurrency:ie()});for(let{name:e,server:t,status:r}of n)if(t.type===`sse`)console.log(`${e}: ${t.url} (SSE) - ${r}`);else if(t.type===`http`)console.log(`${e}: ${t.url} (HTTP) - ${r}`);else if(t.type===`claudeai-proxy`)console.log(`${e}: ${t.url} - ${r}`);else if(!t.type||t.type===`stdio`){let n=t,i=Array.isArray(n.args)?n.args:[];console.log(`${e}: ${n.command} ${i.join(` `)} - ${r}`)}}await I(0)}async function $(e){b(`tengu_mcp_get`,{name:e});let t=F(e);t||Y(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${D(t.scope)}`);let n=await Q(e,t);if(console.log(` Status: ${n}`),t.type===`sse`){if(console.log(` Type: sse`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),P(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`http`){if(console.log(` Type: http`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),P(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`stdio`){console.log(` Type: stdio`),console.log(` Command: ${t.command}`);let e=Array.isArray(t.args)?t.args:[];if(console.log(` Args: ${e.join(` `)}`),t.env){console.log(` Environment:`);for(let[e,n]of Object.entries(t.env))console.log(` ${e}=${n}`)}}console.log(`\nTo remove this server, run: claude mcp remove "${e}" -s ${t.scope}`),await I(0)}async function _e(e,t,n){try{let r=V(n.scope),i=te(t),a=n.clientSecret&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&`oauth`in i&&i.oauth&&typeof i.oauth==`object`&&`clientId`in i.oauth?await ce():void 0;await W(e,i,r);let o=i&&typeof i==`object`&&`type`in i?String(i.type||`stdio`):`stdio`;a&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&K(e,{type:i.type,url:i.url},a),b(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),J(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){Y(e.message)}}async function ve(e){try{let t=V(e.scope);b(`tengu_mcp_add`,{scope:t,platform:C(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-BqTW_pbB.js`),i=await n();Object.keys(i).length===0&&J(`No MCP servers found in Claude Desktop configuration or configuration file does not exist.`);let{unmount:a}=await r((0,Z.jsx)(H,{children:(0,Z.jsx)(N,{children:(0,Z.jsx)(pe,{servers:i,scope:t,onDone:()=>{a()}})})}),{exitOnCtrlC:!0})}catch(e){Y(e.message)}}async function ye(){b(`tengu_mcp_reset_mcpjson_choices`,{}),p(e=>({...e,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),J(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
6
6
  You will be prompted for approval next time you start Claude Code.`)}export{ve as mcpAddFromDesktopHandler,_e as mcpAddJsonHandler,$ as mcpGetHandler,ge as mcpListHandler,he as mcpRemoveHandler,ye as mcpResetChoicesHandler,me as mcpServeHandler};
@@ -1,2 +1,2 @@
1
- import{B as e,M as t,d as n,n as r,t as i}from"./server-DzOdtq8A.js";import{Dr as a,Pr as o}from"./paths-4ZWdjPP4.js";import{E as s,O as c}from"./debug-otxXY3j-.js";import{o as l,s as u}from"./log-DSV4Ht5l.js";import{$D as d,Ba as f,G as p,K as m,Kf as h,Uo as g,Xu as _,Zu as v,bD as y,cl as b,eO as x,ho as S,mh as C,ph as w,qf as T,sl as E,yD as D,za as O}from"./loadAgentsDir-CQF8qhne.js";import{Qn as k,Xn as A,Zn as j}from"./prompt-CogZQuTN.js";import{a as M,o as N}from"./fileStateCache-BhVfo23e.js";import{n as P,t as F}from"./stdio-Cg20AQ5W.js";r(),P(),e(),y(),O(),k(),v(),x(),N(),l(),g(),o(),m(),w(),s(),T(),E();var I=[f];async function L(e,r,o){let s=M(100);C(e);let l=new i({name:`claude/tengu`,version:`2.8.0`},{capabilities:{tools:{}}});l.setRequestHandler(t,async()=>{let e=j(),t=_(e);return{tools:await Promise.all(t.map(async n=>{let r;if(n.outputSchema){let e=b(n.outputSchema);typeof e==`object`&&e&&`type`in e&&e.type===`object`&&(r=e)}return{...n,description:await n.prompt({getToolPermissionContext:async()=>e,tools:t,agents:[]}),inputSchema:b(n.inputSchema),outputSchema:r}}))}}),l.setRequestHandler(n,async({params:{name:e,arguments:t}})=>{let n=_(j()),i=A(n,e);if(!i)throw Error(`Tool ${e} not found`);let l={abortController:d(),options:{commands:I,tools:n,mainLoopModel:a(),thinkingConfig:{type:`disabled`},mcpClients:[],mcpResources:{},isNonInteractiveSession:!0,debug:r,verbose:o,agentDefinitions:{activeAgents:[],allAgents:[]}},getAppState:()=>D(),setAppState:()=>{},messages:[],readFileState:s,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}};try{if(!i.isEnabled())throw Error(`Tool ${e} is not enabled`);let n=await i.validateInput?.(t??{},l);if(n&&!n.result)throw Error(`Tool ${e} input is invalid: ${`message`in n?n.message:String(n)}`);let r=await i.call(t??{},l,p,S({content:[]}));return{content:[{type:`text`,text:typeof r==`string`?r:c(r.data)}]}}catch(e){return u(e),{isError:!0,content:[{type:`text`,text:(e instanceof Error?h(e):[String(e)]).filter(Boolean).join(`
1
+ import{B as e,M as t,d as n,n as r,t as i}from"./server-DzOdtq8A.js";import{Dr as a,Pr as o}from"./paths-CEAy4QCs.js";import{E as s,O as c}from"./debug-otxXY3j-.js";import{o as l,s as u}from"./log-DSV4Ht5l.js";import{$D as d,Ba as f,G as p,K as m,Kf as h,Uo as g,Xu as _,Zu as v,bD as y,cl as b,eO as x,ho as S,mh as C,ph as w,qf as T,sl as E,yD as D,za as O}from"./loadAgentsDir-DC4jN6-f.js";import{Qn as k,Xn as A,Zn as j}from"./prompt-BHI7PZe4.js";import{a as M,o as N}from"./fileStateCache-BhVfo23e.js";import{n as P,t as F}from"./stdio-Cg20AQ5W.js";r(),P(),e(),y(),O(),k(),v(),x(),N(),l(),g(),o(),m(),w(),s(),T(),E();var I=[f];async function L(e,r,o){let s=M(100);C(e);let l=new i({name:`claude/tengu`,version:`2.8.2`},{capabilities:{tools:{}}});l.setRequestHandler(t,async()=>{let e=j(),t=_(e);return{tools:await Promise.all(t.map(async n=>{let r;if(n.outputSchema){let e=b(n.outputSchema);typeof e==`object`&&e&&`type`in e&&e.type===`object`&&(r=e)}return{...n,description:await n.prompt({getToolPermissionContext:async()=>e,tools:t,agents:[]}),inputSchema:b(n.inputSchema),outputSchema:r}}))}}),l.setRequestHandler(n,async({params:{name:e,arguments:t}})=>{let n=_(j()),i=A(n,e);if(!i)throw Error(`Tool ${e} not found`);let l={abortController:d(),options:{commands:I,tools:n,mainLoopModel:a(),thinkingConfig:{type:`disabled`},mcpClients:[],mcpResources:{},isNonInteractiveSession:!0,debug:r,verbose:o,agentDefinitions:{activeAgents:[],allAgents:[]}},getAppState:()=>D(),setAppState:()=>{},messages:[],readFileState:s,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}};try{if(!i.isEnabled())throw Error(`Tool ${e} is not enabled`);let n=await i.validateInput?.(t??{},l);if(n&&!n.result)throw Error(`Tool ${e} input is invalid: ${`message`in n?n.message:String(n)}`);let r=await i.call(t??{},l,p,S({content:[]}));return{content:[{type:`text`,text:typeof r==`string`?r:c(r.data)}]}}catch(e){return u(e),{isError:!0,content:[{type:`text`,text:(e instanceof Error?h(e):[String(e)]).filter(Boolean).join(`
2
2
  `).trim()||`Error`}]}}});async function f(){let e=new F;await l.connect(e)}return await f()}export{L as startMCPServer};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,M as n}from"./server-DzOdtq8A.js";import{M as r,oc as i,yc as a,z as o}from"./paths-4ZWdjPP4.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{r as l,t as u}from"./datadog-ClZjR-jM.js";import{i as d,r as f,t as p}from"./src-Cu58IYYb.js";import{i as m,t as h}from"./gates-C66Nz9b2.js";import{n as g,t as _}from"./hostAdapter-DLmaB6eN.js";import{n as v,t as y}from"./stdio-Cg20AQ5W.js";import{r as b,t as x}from"./sink-BL75jACh.js";import{homedir as S}from"os";function C(e,t){if(k.some(t=>e.startsWith(t)))return!0;if(t){let n=t.endsWith(`/`)?`${t}Applications/`:`${t}/Applications/`;if(e.startsWith(n))return!0}return!1}function w(e){return A.some(t=>t.test(e))}function T(e,t){let n=new Set;return e.map(e=>e.trim()).filter(e=>!e||e.length>N||t&&!M.test(e)||n.has(e)?!1:(n.add(e),!0)).sort((e,t)=>e.localeCompare(t))}function E(e){let t=T(e,!0);return t.length<=P?t:[...t.slice(0,P),`… and ${t.length-P} more`]}function D(e){return T(e,!1)}function O(e,t){let{alwaysKept:n,rest:r}=e.reduce((e,n)=>(j.has(n.bundleId)?e.alwaysKept.push(n.displayName):C(n.path,t)&&!w(n.displayName)&&e.rest.push(n.displayName),e),{alwaysKept:[],rest:[]}),i=D(n),a=new Set(i);return[...i,...E(r).filter(e=>!a.has(e))]}var k,A,j,M,N,P,F=e((()=>{k=[`/Applications/`,`/System/Applications/`],A=[/Helper(?:$|\s\()/,/Agent(?:$|\s\()/,/Service(?:$|\s\()/,/Uninstaller(?:$|\s\()/,/Updater(?:$|\s\()/,/^\./],j=new Set(`com.apple.Safari,com.google.Chrome,com.microsoft.edgemac,org.mozilla.firefox,company.thebrowser.Browser,com.tinyspeck.slackmacgap,us.zoom.xos,com.microsoft.teams2,com.microsoft.teams,com.apple.MobileSMS,com.apple.mail,com.microsoft.Word,com.microsoft.Excel,com.microsoft.Powerpoint,com.microsoft.Outlook,com.apple.iWork.Pages,com.apple.iWork.Numbers,com.apple.iWork.Keynote,com.google.GoogleDocs,notion.id,com.apple.Notes,md.obsidian,com.linear,com.figma.Desktop,com.microsoft.VSCode,com.apple.Terminal,com.googlecode.iterm2,com.github.GitHubDesktop,com.apple.finder,com.apple.iCal,com.apple.systempreferences`.split(`,`)),M=/^[\p{L}\p{M}\p{N}_ .&'()+-]+$/u,N=40,P=50}));async function I(){let e=_().executor.listInstalledApps(),t,n=new Promise(e=>{t=setTimeout(e,z,void 0)}),r=await Promise.race([e,n]).catch(()=>void 0).finally(()=>clearTimeout(t));if(!r){e.catch(()=>{}),c(`[Computer Use MCP] app enumeration exceeded ${z}ms or failed; tool description omits list`);return}return O(r,S())}async function L(){let e=_(),t=h(),r=f(e,t),i=await I(),a=d(e.executor.capabilities,t,i);return r.setRequestHandler(n,async()=>e.isDisabled()?{tools:[]}:{tools:a}),r}async function R(){i(),b();let e=await L(),t=new y,n=!1,r=async()=>{n||(n=!0,await Promise.all([o(),l()]),process.exit(0))};process.stdin.on(`end`,()=>void r()),process.stdin.on(`error`,()=>void r()),c(`[Computer Use MCP] Starting MCP server`),await e.connect(t),c(`[Computer Use MCP] MCP server started`)}var z;e((()=>{p(),x(),v(),t(),u(),r(),a(),s(),F(),m(),g(),z=1e3}))();export{L as createComputerUseMcpServerForCli,R as runComputerUseMcpServer};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,M as n}from"./server-DzOdtq8A.js";import{M as r,oc as i,yc as a,z as o}from"./paths-CEAy4QCs.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{r as l,t as u}from"./datadog-BzkFYNcv.js";import{i as d,r as f,t as p}from"./src-Cu58IYYb.js";import{i as m,t as h}from"./gates-C5y8P5t9.js";import{n as g,t as _}from"./hostAdapter-CZdJUeS1.js";import{n as v,t as y}from"./stdio-Cg20AQ5W.js";import{r as b,t as x}from"./sink-DCh0VJ4g.js";import{homedir as S}from"os";function C(e,t){if(k.some(t=>e.startsWith(t)))return!0;if(t){let n=t.endsWith(`/`)?`${t}Applications/`:`${t}/Applications/`;if(e.startsWith(n))return!0}return!1}function w(e){return A.some(t=>t.test(e))}function T(e,t){let n=new Set;return e.map(e=>e.trim()).filter(e=>!e||e.length>N||t&&!M.test(e)||n.has(e)?!1:(n.add(e),!0)).sort((e,t)=>e.localeCompare(t))}function E(e){let t=T(e,!0);return t.length<=P?t:[...t.slice(0,P),`… and ${t.length-P} more`]}function D(e){return T(e,!1)}function O(e,t){let{alwaysKept:n,rest:r}=e.reduce((e,n)=>(j.has(n.bundleId)?e.alwaysKept.push(n.displayName):C(n.path,t)&&!w(n.displayName)&&e.rest.push(n.displayName),e),{alwaysKept:[],rest:[]}),i=D(n),a=new Set(i);return[...i,...E(r).filter(e=>!a.has(e))]}var k,A,j,M,N,P,F=e((()=>{k=[`/Applications/`,`/System/Applications/`],A=[/Helper(?:$|\s\()/,/Agent(?:$|\s\()/,/Service(?:$|\s\()/,/Uninstaller(?:$|\s\()/,/Updater(?:$|\s\()/,/^\./],j=new Set(`com.apple.Safari,com.google.Chrome,com.microsoft.edgemac,org.mozilla.firefox,company.thebrowser.Browser,com.tinyspeck.slackmacgap,us.zoom.xos,com.microsoft.teams2,com.microsoft.teams,com.apple.MobileSMS,com.apple.mail,com.microsoft.Word,com.microsoft.Excel,com.microsoft.Powerpoint,com.microsoft.Outlook,com.apple.iWork.Pages,com.apple.iWork.Numbers,com.apple.iWork.Keynote,com.google.GoogleDocs,notion.id,com.apple.Notes,md.obsidian,com.linear,com.figma.Desktop,com.microsoft.VSCode,com.apple.Terminal,com.googlecode.iterm2,com.github.GitHubDesktop,com.apple.finder,com.apple.iCal,com.apple.systempreferences`.split(`,`)),M=/^[\p{L}\p{M}\p{N}_ .&'()+-]+$/u,N=40,P=50}));async function I(){let e=_().executor.listInstalledApps(),t,n=new Promise(e=>{t=setTimeout(e,z,void 0)}),r=await Promise.race([e,n]).catch(()=>void 0).finally(()=>clearTimeout(t));if(!r){e.catch(()=>{}),c(`[Computer Use MCP] app enumeration exceeded ${z}ms or failed; tool description omits list`);return}return O(r,S())}async function L(){let e=_(),t=h(),r=f(e,t),i=await I(),a=d(e.executor.capabilities,t,i);return r.setRequestHandler(n,async()=>e.isDisabled()?{tools:[]}:{tools:a}),r}async function R(){i(),b();let e=await L(),t=new y,n=!1,r=async()=>{n||(n=!0,await Promise.all([o(),l()]),process.exit(0))};process.stdin.on(`end`,()=>void r()),process.stdin.on(`error`,()=>void r()),c(`[Computer Use MCP] Starting MCP server`),await e.connect(t),c(`[Computer Use MCP] MCP server started`)}var z;e((()=>{p(),x(),v(),t(),u(),r(),a(),s(),F(),m(),g(),z=1e3}))();export{L as createComputerUseMcpServerForCli,R as runComputerUseMcpServer};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{r,t as i}from"./src-BJz1KAd_.js";import{Cc as a,Jt as o,M as s,S as c,_ as l,dc as u,oc as d,on as f,yc as p,z as m}from"./paths-4ZWdjPP4.js";import{l as h,p as g}from"./debug-otxXY3j-.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{R_ as y,z_ as b}from"./loadAgentsDir-CQF8qhne.js";import{r as x,t as S}from"./datadog-ClZjR-jM.js";import{c as C,i as w,o as T}from"./common-Da57Qwms.js";import{n as E,t as D}from"./stdio-Cg20AQ5W.js";import{r as O,t as k}from"./sink-BL75jACh.js";import{format as A}from"util";function j(e){return z.some(t=>t===e)}function M(){if(process.env.USER_TYPE===`ant`||l(`tengu_copper_bridge`,!1))return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)?`ws://localhost:8765`:n(process.env.USE_STAGING_OAUTH)?`wss://bridge-staging.claudeusercontent.com`:`wss://bridge.claudeusercontent.com`}function N(){return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)}function P(e){let t=new B,n=M();t.info(`Bridge URL: ${n??`none (using native socket)`}`);let r=e?.CLAUDE_CHROME_PERMISSION_MODE??process.env.CLAUDE_CHROME_PERMISSION_MODE,i;return r&&(j(r)?i=r:t.warn(`Invalid CLAUDE_CHROME_PERMISSION_MODE "${r}". Valid values: ${z.join(`, `)}`)),{serverName:`Claude in Chrome`,logger:t,socketPath:T(),getSocketPaths:w,clientTypeId:`claude-code`,onAuthenticationError:()=>{t.warn(`Authentication error occurred. Please ensure you are logged into the Claude browser extension with the same claude.ai account as Claude Code.`)},onToolCallDisconnected:()=>`Browser extension is not connected. Please ensure the Claude browser extension is installed and running (${I}), and that you are logged into claude.ai with the same account as Claude Code. If this is your first time connecting to Chrome, you may need to restart Chrome for the installation to take effect. If you continue to experience issues, please report a bug: ${L}`,onExtensionPaired:(e,n)=>{a(t=>t.chromeExtension?.pairedDeviceId===e&&t.chromeExtension?.pairedDeviceName===n?t:{...t,chromeExtension:{pairedDeviceId:e,pairedDeviceName:n}}),t.info(`Paired with "${n}" (${e.slice(0,8)})`)},getPersistedDeviceId:()=>u().chromeExtension?.pairedDeviceId,...n&&{bridgeConfig:{url:n,getUserId:async()=>u().oauthAccount?.accountUuid,getOAuthToken:async()=>o()?.accessToken??``,...N()&&{devUserId:`dev_user_local`}}},...i&&{initialPermissionMode:i},...process.env.USER_TYPE===`ant`&&{callAnthropicMessages:async e=>{let t=await b({model:e.model,system:e.system,messages:e.messages,max_tokens:e.max_tokens,stop_sequences:e.stop_sequences,signal:e.signal,skipSystemPromptPrefix:!0,tools:[],querySource:`chrome_mcp`}),n=[];for(let e of t.content)e.type===`text`&&n.push({type:`text`,text:e.text});return{content:n,stop_reason:t.stop_reason,usage:{input_tokens:t.usage.input_tokens,output_tokens:t.usage.output_tokens}}}},trackEvent:(e,t)=>{let n={};if(t)for(let[e,r]of Object.entries(t)){let t=e===`status`?`bridge_status`:e;(typeof r==`boolean`||typeof r==`number`||typeof r==`string`&&R.has(t))&&(n[t]=r)}v(e,n)}}}async function F(){d(),O();let e=r(P()),t=new D,n=!1,i=async()=>{n||(n=!0,await m(),await x(),process.exit(0))};process.stdin.on(`end`,()=>void i()),process.stdin.on(`error`,()=>void i()),g(`[Claude in Chrome] Starting MCP server`),await e.connect(t),g(`[Claude in Chrome] MCP server started`)}var I,L,R,z,B;e((()=>{i(),k(),E(),S(),s(),c(),_(),f(),p(),h(),t(),y(),C(),I=`https://claude.ai/chrome`,L=`https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome`,R=new Set([`bridge_status`,`error_type`,`tool_name`]),z=[`ask`,`skip_all_permission_checks`,`follow_a_plan`],B=class{silly(e,t){g(A(e,t??``),{level:`debug`})}debug(e,t){g(A(e,t??``),{level:`debug`})}info(e,t){g(A(e,t??``),{level:`info`})}warn(e,t){g(A(e,t??``),{level:`warn`})}error(e,t){g(A(e,t??``),{level:`error`})}}}))();export{P as createChromeContext,F as runClaudeInChromeMcpServer};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{r,t as i}from"./src-BJz1KAd_.js";import{Cc as a,Jt as o,M as s,S as c,_ as l,dc as u,oc as d,on as f,yc as p,z as m}from"./paths-CEAy4QCs.js";import{l as h,p as g}from"./debug-otxXY3j-.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{R_ as y,z_ as b}from"./loadAgentsDir-DC4jN6-f.js";import{r as x,t as S}from"./datadog-BzkFYNcv.js";import{c as C,i as w,o as T}from"./common-Da57Qwms.js";import{n as E,t as D}from"./stdio-Cg20AQ5W.js";import{r as O,t as k}from"./sink-DCh0VJ4g.js";import{format as A}from"util";function j(e){return z.some(t=>t===e)}function M(){if(process.env.USER_TYPE===`ant`||l(`tengu_copper_bridge`,!1))return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)?`ws://localhost:8765`:n(process.env.USE_STAGING_OAUTH)?`wss://bridge-staging.claudeusercontent.com`:`wss://bridge.claudeusercontent.com`}function N(){return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)}function P(e){let t=new B,n=M();t.info(`Bridge URL: ${n??`none (using native socket)`}`);let r=e?.CLAUDE_CHROME_PERMISSION_MODE??process.env.CLAUDE_CHROME_PERMISSION_MODE,i;return r&&(j(r)?i=r:t.warn(`Invalid CLAUDE_CHROME_PERMISSION_MODE "${r}". Valid values: ${z.join(`, `)}`)),{serverName:`Claude in Chrome`,logger:t,socketPath:T(),getSocketPaths:w,clientTypeId:`claude-code`,onAuthenticationError:()=>{t.warn(`Authentication error occurred. Please ensure you are logged into the Claude browser extension with the same claude.ai account as Claude Code.`)},onToolCallDisconnected:()=>`Browser extension is not connected. Please ensure the Claude browser extension is installed and running (${I}), and that you are logged into claude.ai with the same account as Claude Code. If this is your first time connecting to Chrome, you may need to restart Chrome for the installation to take effect. If you continue to experience issues, please report a bug: ${L}`,onExtensionPaired:(e,n)=>{a(t=>t.chromeExtension?.pairedDeviceId===e&&t.chromeExtension?.pairedDeviceName===n?t:{...t,chromeExtension:{pairedDeviceId:e,pairedDeviceName:n}}),t.info(`Paired with "${n}" (${e.slice(0,8)})`)},getPersistedDeviceId:()=>u().chromeExtension?.pairedDeviceId,...n&&{bridgeConfig:{url:n,getUserId:async()=>u().oauthAccount?.accountUuid,getOAuthToken:async()=>o()?.accessToken??``,...N()&&{devUserId:`dev_user_local`}}},...i&&{initialPermissionMode:i},...process.env.USER_TYPE===`ant`&&{callAnthropicMessages:async e=>{let t=await b({model:e.model,system:e.system,messages:e.messages,max_tokens:e.max_tokens,stop_sequences:e.stop_sequences,signal:e.signal,skipSystemPromptPrefix:!0,tools:[],querySource:`chrome_mcp`}),n=[];for(let e of t.content)e.type===`text`&&n.push({type:`text`,text:e.text});return{content:n,stop_reason:t.stop_reason,usage:{input_tokens:t.usage.input_tokens,output_tokens:t.usage.output_tokens}}}},trackEvent:(e,t)=>{let n={};if(t)for(let[e,r]of Object.entries(t)){let t=e===`status`?`bridge_status`:e;(typeof r==`boolean`||typeof r==`number`||typeof r==`string`&&R.has(t))&&(n[t]=r)}v(e,n)}}}async function F(){d(),O();let e=r(P()),t=new D,n=!1,i=async()=>{n||(n=!0,await m(),await x(),process.exit(0))};process.stdin.on(`end`,()=>void i()),process.stdin.on(`error`,()=>void i()),g(`[Claude in Chrome] Starting MCP server`),await e.connect(t),g(`[Claude in Chrome] MCP server started`)}var I,L,R,z,B;e((()=>{i(),k(),E(),S(),s(),c(),_(),f(),p(),h(),t(),y(),C(),I=`https://claude.ai/chrome`,L=`https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome`,R=new Set([`bridge_status`,`error_type`,`tool_name`]),z=[`ask`,`skip_all_permission_checks`,`follow_a_plan`],B=class{silly(e,t){g(A(e,t??``),{level:`debug`})}debug(e,t){g(A(e,t??``),{level:`debug`})}info(e,t){g(A(e,t??``),{level:`info`})}warn(e,t){g(A(e,t??``),{level:`warn`})}error(e,t){g(A(e,t??``),{level:`error`})}}}))();export{P as createChromeContext,F as runClaudeInChromeMcpServer};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{In as i,Ln as a,Q as o,Rn as s,b as c,d as l,f as u,t as d,tt as f,x as p}from"./src-KjMLauwe.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{cn as h,ot as g}from"./state-sIHsFpDu.js";import{Bc as ee,Uc as _,a as v,lo as y,n as te,oo as b,s as x}from"./paths-4ZWdjPP4.js";import{B as S,U as C}from"./debug-otxXY3j-.js";import{n as w,r as T}from"./analytics-DqMQntaB.js";import{n as E,t as D}from"./cwd--iizewsn.js";import{r as O,v as k}from"./git-C0IuvuIy.js";import{o as A,s as j}from"./log-DSV4Ht5l.js";import{g as ne,x as M}from"./startupProfiler-rCtNuhXz.js";import{Cp as re,Jn as N,Kn as ie,Qk as P,Ry as F,Sp as I,Xk as L,aS as ae,lC as R,ou as oe,qk as se,su as ce,uC as z}from"./loadAgentsDir-CQF8qhne.js";import{r as le,t as B}from"./browser-Bt-ckCaU.js";import{t as V}from"./useKeybinding-DOjEx42R.js";import{n as H,t as U}from"./useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js";import{r as ue,t as de}from"./promptEditor-C___2FFs.js";import{homedir as fe}from"os";import{join as W,relative as pe}from"path";import{mkdir as G,writeFile as me}from"fs/promises";function he(e){return O(e)!==null}var ge=e((()=>{k()}));function _e({onSelect:e,onCancel:t}){let r=(0,K.use)(L()),a=W(n(),`CLAUDE.md`),o=W(g(),`CLAUDE.md`),s=r.some(e=>e.path===a),u=r.some(e=>e.path===o),d=[...r.filter(e=>e.type!==`AutoMem`&&e.type!==`TeamMem`).map(e=>({...e,exists:!0})),...s?[]:[{path:a,type:`User`,content:``,exists:!1}],...u?[]:[{path:o,type:`Project`,content:``,exists:!1}]],m=new Map,h=d.map(e=>{let t=ee(e.path),n=e.exists?``:` (new)`,r=e.parent?(m.get(e.parent)??0)+1:0;m.set(e.path,r);let i=r>0?` `.repeat(r-1):``,s;s=e.type===`User`&&!e.isNested&&e.path===a?`User memory`:e.type===`Project`&&!e.isNested&&e.path===o?`Project memory`:r>0?`${i}L ${t}${n}`:`${t}`;let c,l=he(g());return c=e.type===`User`&&!e.isNested?`Saved in ~/.claude/CLAUDE.md`:e.type===`Project`&&!e.isNested&&e.path===o?`${l?`Checked in at`:`Saved in`} ./CLAUDE.md`:e.parent?`@-imported`:e.isNested?`dynamically loaded`:``,{label:s,value:e.path,description:c}}),_=[],v=z(e=>e.agentDefinitions);if(x()){_.push({label:`Open auto-memory folder`,value:`${Y}${te()}`,description:``});for(let e of v.activeAgents)if(e.memory){let t=ie(e.agentType,e.memory);_.push({label:`Open ${i.bold(e.agentType)} agent memory`,value:`${Y}${t}`,description:`${e.memory} scope`})}}h.push(..._);let b=J&&h.some(e=>e.value===J)?J:h[0]?.value||``,[S,C]=(0,K.useState)(x),[w,E]=(0,K.useState)(ce),[D]=(0,K.useState)(x),O=z(e=>Object.values(e.tasks).some(e=>e.type===`dream`&&e.status===`running`)),[k,A]=(0,K.useState)(null);(0,K.useEffect)(()=>{D&&re().then(A)},[D,O]);let j=O?`running`:k===null?``:k===0?`never`:`last ran ${ne(new Date(k))}`,[M,N]=(0,K.useState)(null),P=M!==null,F=+!!D;function I(){let e=!S;y(`userSettings`,{autoMemoryEnabled:e}),C(e),T(`tengu_auto_memory_toggled`,{enabled:e})}function R(){let e=!w;y(`userSettings`,{autoDreamEnabled:e}),E(e),T(`tengu_auto_dream_toggled`,{enabled:e})}return H(),f(`confirm:no`,t,{context:`Confirmation`}),f(`confirm:yes`,()=>{M===0?I():M===1&&R()},{context:`Confirmation`,isActive:P}),f(`select:next`,()=>{N(e=>e!==null&&e<F?e+1:null)},{context:`Select`,isActive:P}),f(`select:previous`,()=>{N(e=>e!==null&&e>0?e-1:e)},{context:`Select`,isActive:P}),(0,q.jsxs)(p,{flexDirection:`column`,width:`100%`,children:[(0,q.jsxs)(p,{flexDirection:`column`,marginBottom:1,children:[(0,q.jsx)(l,{isFocused:M===0,children:(0,q.jsxs)(c,{children:[`Auto-memory: `,S?`on`:`off`]})}),D&&(0,q.jsx)(l,{isFocused:M===1,styled:!1,children:(0,q.jsxs)(c,{color:M===1?`suggestion`:void 0,children:[`Auto-dream: `,w?`on`:`off`,j&&(0,q.jsxs)(c,{dimColor:!0,children:[` · `,j]}),!O&&w&&(0,q.jsx)(c,{dimColor:!0,children:` · /dream to run`})]})})]}),(0,q.jsx)(ae,{defaultFocusValue:b,options:h,isDisabled:P,onChange:t=>{if(t.startsWith(Y)){let e=t.slice(15);G(e,{recursive:!0}).catch(()=>{}).then(()=>le(e));return}J=t,e(t)},onCancel:t,onUpFromFirstItem:()=>N(F)})]})}var K,q,J,Y,ve=e((()=>{a(),s(),K=t(s(),1),h(),U(),d(),V(),v(),w(),oe(),I(),R(),N(),B(),P(),r(),_(),M(),ge(),b(),F(),q=m(),Y=`__open_folder__`}));function ye(e){let t=fe(),n=D(),r=e.startsWith(t)?`~`+e.slice(t.length):null,i=e.startsWith(n)?`./`+pe(n,e):null;return r&&i?r.length<=i.length?r:i:r||i||e}var X=e((()=>{s(),d(),E(),m()}));function be({onDone:e}){let t=async t=>{try{t.includes(n())&&await G(n(),{recursive:!0});try{await me(t,``,{encoding:`utf8`,flag:`wx`})}catch(e){if(S(e)!==`EEXIST`)throw e}await de(t);let r=`default`,i=``;process.env.VISUAL?(r=`$VISUAL`,i=process.env.VISUAL):process.env.EDITOR&&(r=`$EDITOR`,i=process.env.EDITOR);let a=r===`default`?``:`Using ${r}="${i}".`,o=a?`> ${a} To change editor, set $EDITOR or $VISUAL environment variable.`:`> To use a different editor, set the $EDITOR or $VISUAL environment variable.`;e(`Opened memory file at ${ye(t)}\n\n${o}`,{display:`system`})}catch(t){j(t),e(`Error opening memory file: ${t}`)}},r=()=>{e(`Cancelled memory editing`,{display:`system`})};return(0,Q.jsx)(u,{title:`Memory`,onCancel:r,color:`remember`,children:(0,Q.jsxs)(p,{flexDirection:`column`,children:[(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(_e,{onSelect:t,onCancel:r})}),(0,Q.jsx)(p,{marginTop:1,children:(0,Q.jsxs)(c,{dimColor:!0,children:[`Learn more: `,(0,Q.jsx)(o,{url:`https://code.claude.com/docs/en/memory`})]})})]})})}var Z,Q,$;e((()=>{Z=t(s(),1),d(),ve(),X(),P(),r(),C(),A(),ue(),Q=m(),$=async e=>(se(),await L(),(0,Q.jsx)(be,{onDone:e}))}))();export{$ as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{In as i,Ln as a,Q as o,Rn as s,b as c,d as l,f as u,t as d,tt as f,x as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{cn as h,ot as g}from"./state-sIHsFpDu.js";import{Bc as ee,Uc as _,a as v,lo as y,n as te,oo as b,s as x}from"./paths-CEAy4QCs.js";import{B as S,U as C}from"./debug-otxXY3j-.js";import{n as w,r as T}from"./analytics-DqMQntaB.js";import{n as E,t as D}from"./cwd--iizewsn.js";import{r as O,v as k}from"./git-C0IuvuIy.js";import{o as A,s as j}from"./log-DSV4Ht5l.js";import{b as M,h as ne}from"./startupProfiler-CBcN1Chw.js";import{Cp as re,Jn as N,Kn as ie,Qk as P,Ry as F,Sp as I,Xk as L,aS as ae,lC as R,ou as oe,qk as se,su as ce,uC as z}from"./loadAgentsDir-DC4jN6-f.js";import{r as le,t as B}from"./browser-Bt-ckCaU.js";import{t as V}from"./useKeybinding-DPOUuymz.js";import{n as H,t as U}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{r as ue,t as de}from"./promptEditor-DoJ-xPi4.js";import{homedir as fe}from"os";import{join as W,relative as pe}from"path";import{mkdir as G,writeFile as me}from"fs/promises";function he(e){return O(e)!==null}var ge=e((()=>{k()}));function _e({onSelect:e,onCancel:t}){let r=(0,K.use)(L()),a=W(n(),`CLAUDE.md`),o=W(g(),`CLAUDE.md`),s=r.some(e=>e.path===a),u=r.some(e=>e.path===o),d=[...r.filter(e=>e.type!==`AutoMem`&&e.type!==`TeamMem`).map(e=>({...e,exists:!0})),...s?[]:[{path:a,type:`User`,content:``,exists:!1}],...u?[]:[{path:o,type:`Project`,content:``,exists:!1}]],m=new Map,h=d.map(e=>{let t=ee(e.path),n=e.exists?``:` (new)`,r=e.parent?(m.get(e.parent)??0)+1:0;m.set(e.path,r);let i=r>0?` `.repeat(r-1):``,s;s=e.type===`User`&&!e.isNested&&e.path===a?`User memory`:e.type===`Project`&&!e.isNested&&e.path===o?`Project memory`:r>0?`${i}L ${t}${n}`:`${t}`;let c,l=he(g());return c=e.type===`User`&&!e.isNested?`Saved in ~/.claude/CLAUDE.md`:e.type===`Project`&&!e.isNested&&e.path===o?`${l?`Checked in at`:`Saved in`} ./CLAUDE.md`:e.parent?`@-imported`:e.isNested?`dynamically loaded`:``,{label:s,value:e.path,description:c}}),_=[],v=z(e=>e.agentDefinitions);if(x()){_.push({label:`Open auto-memory folder`,value:`${Y}${te()}`,description:``});for(let e of v.activeAgents)if(e.memory){let t=ie(e.agentType,e.memory);_.push({label:`Open ${i.bold(e.agentType)} agent memory`,value:`${Y}${t}`,description:`${e.memory} scope`})}}h.push(..._);let b=J&&h.some(e=>e.value===J)?J:h[0]?.value||``,[S,C]=(0,K.useState)(x),[w,E]=(0,K.useState)(ce),[D]=(0,K.useState)(x),O=z(e=>Object.values(e.tasks).some(e=>e.type===`dream`&&e.status===`running`)),[k,A]=(0,K.useState)(null);(0,K.useEffect)(()=>{D&&re().then(A)},[D,O]);let j=O?`running`:k===null?``:k===0?`never`:`last ran ${ne(new Date(k))}`,[M,N]=(0,K.useState)(null),P=M!==null,F=+!!D;function I(){let e=!S;y(`userSettings`,{autoMemoryEnabled:e}),C(e),T(`tengu_auto_memory_toggled`,{enabled:e})}function R(){let e=!w;y(`userSettings`,{autoDreamEnabled:e}),E(e),T(`tengu_auto_dream_toggled`,{enabled:e})}return H(),f(`confirm:no`,t,{context:`Confirmation`}),f(`confirm:yes`,()=>{M===0?I():M===1&&R()},{context:`Confirmation`,isActive:P}),f(`select:next`,()=>{N(e=>e!==null&&e<F?e+1:null)},{context:`Select`,isActive:P}),f(`select:previous`,()=>{N(e=>e!==null&&e>0?e-1:e)},{context:`Select`,isActive:P}),(0,q.jsxs)(p,{flexDirection:`column`,width:`100%`,children:[(0,q.jsxs)(p,{flexDirection:`column`,marginBottom:1,children:[(0,q.jsx)(l,{isFocused:M===0,children:(0,q.jsxs)(c,{children:[`Auto-memory: `,S?`on`:`off`]})}),D&&(0,q.jsx)(l,{isFocused:M===1,styled:!1,children:(0,q.jsxs)(c,{color:M===1?`suggestion`:void 0,children:[`Auto-dream: `,w?`on`:`off`,j&&(0,q.jsxs)(c,{dimColor:!0,children:[` · `,j]}),!O&&w&&(0,q.jsx)(c,{dimColor:!0,children:` · /dream to run`})]})})]}),(0,q.jsx)(ae,{defaultFocusValue:b,options:h,isDisabled:P,onChange:t=>{if(t.startsWith(Y)){let e=t.slice(15);G(e,{recursive:!0}).catch(()=>{}).then(()=>le(e));return}J=t,e(t)},onCancel:t,onUpFromFirstItem:()=>N(F)})]})}var K,q,J,Y,ve=e((()=>{a(),s(),K=t(s(),1),h(),U(),d(),V(),v(),w(),oe(),I(),R(),N(),B(),P(),r(),_(),M(),ge(),b(),F(),q=m(),Y=`__open_folder__`}));function ye(e){let t=fe(),n=D(),r=e.startsWith(t)?`~`+e.slice(t.length):null,i=e.startsWith(n)?`./`+pe(n,e):null;return r&&i?r.length<=i.length?r:i:r||i||e}var X=e((()=>{s(),d(),E(),m()}));function be({onDone:e}){let t=async t=>{try{t.includes(n())&&await G(n(),{recursive:!0});try{await me(t,``,{encoding:`utf8`,flag:`wx`})}catch(e){if(S(e)!==`EEXIST`)throw e}await de(t);let r=`default`,i=``;process.env.VISUAL?(r=`$VISUAL`,i=process.env.VISUAL):process.env.EDITOR&&(r=`$EDITOR`,i=process.env.EDITOR);let a=r===`default`?``:`Using ${r}="${i}".`,o=a?`> ${a} To change editor, set $EDITOR or $VISUAL environment variable.`:`> To use a different editor, set the $EDITOR or $VISUAL environment variable.`;e(`Opened memory file at ${ye(t)}\n\n${o}`,{display:`system`})}catch(t){j(t),e(`Error opening memory file: ${t}`)}},r=()=>{e(`Cancelled memory editing`,{display:`system`})};return(0,Q.jsx)(u,{title:`Memory`,onCancel:r,color:`remember`,children:(0,Q.jsxs)(p,{flexDirection:`column`,children:[(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(_e,{onSelect:t,onCancel:r})}),(0,Q.jsx)(p,{marginTop:1,children:(0,Q.jsxs)(c,{dimColor:!0,children:[`Learn more: `,(0,Q.jsx)(o,{url:`https://code.claude.com/docs/en/memory`})]})})]})})}var Z,Q,$;e((()=>{Z=t(s(),1),d(),ve(),X(),P(),r(),C(),A(),ue(),Q=m(),$=async e=>(se(),await L(),(0,Q.jsx)(be,{onDone:e}))}))();export{$ as call};
@@ -1,2 +1,2 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,p as i,t as a,tt as o,x as s}from"./src-KjMLauwe.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{t as l}from"./useKeybinding-DOjEx42R.js";import{t as u}from"./lib-Cf16LgKj.js";function d({onDone:e}){let[t,n]=(0,m.useState)(`ios`),[a,c]=(0,m.useState)({ios:``,android:``}),{url:l}=g[t],u=a[t];(0,m.useEffect)(()=>{async function e(){let[e,t]=await Promise.all([(0,p.toString)(g.ios.url,{type:`utf8`,errorCorrectionLevel:`L`}),(0,p.toString)(g.android.url,{type:`utf8`,errorCorrectionLevel:`L`})]);c({ios:e,android:t})}e().catch(()=>{})},[]),o(`confirm:no`,(0,m.useCallback)(()=>{e()},[e]),{context:`Confirmation`});function d(t){if(t.key===`q`||t.ctrl&&t.key===`c`){t.preventDefault(),e();return}(t.key===`tab`||t.key===`left`||t.key===`right`)&&(t.preventDefault(),n(e=>e===`ios`?`android`:`ios`))}let f=u.split(`
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,p as i,t as a,tt as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{t as l}from"./useKeybinding-DPOUuymz.js";import{t as u}from"./lib-Cf16LgKj.js";function d({onDone:e}){let[t,n]=(0,m.useState)(`ios`),[a,c]=(0,m.useState)({ios:``,android:``}),{url:l}=g[t],u=a[t];(0,m.useEffect)(()=>{async function e(){let[e,t]=await Promise.all([(0,p.toString)(g.ios.url,{type:`utf8`,errorCorrectionLevel:`L`}),(0,p.toString)(g.android.url,{type:`utf8`,errorCorrectionLevel:`L`})]);c({ios:e,android:t})}e().catch(()=>{})},[]),o(`confirm:no`,(0,m.useCallback)(()=>{e()},[e]),{context:`Confirmation`});function d(t){if(t.key===`q`||t.ctrl&&t.key===`c`){t.preventDefault(),e();return}(t.key===`tab`||t.key===`left`||t.key===`right`)&&(t.preventDefault(),n(e=>e===`ios`?`android`:`ios`))}let f=u.split(`
2
2
  `).filter(e=>e.length>0);return(0,h.jsx)(i,{children:(0,h.jsxs)(s,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:d,children:[(0,h.jsx)(r,{children:` `}),(0,h.jsx)(r,{children:` `}),f.map((e,t)=>(0,h.jsx)(r,{children:e},t)),(0,h.jsx)(r,{children:` `}),(0,h.jsx)(r,{children:` `}),(0,h.jsxs)(s,{flexDirection:`row`,gap:2,children:[(0,h.jsxs)(r,{children:[(0,h.jsx)(r,{bold:t===`ios`,underline:t===`ios`,children:`iOS`}),(0,h.jsx)(r,{dimColor:!0,children:` / `}),(0,h.jsx)(r,{bold:t===`android`,underline:t===`android`,children:`Android`})]}),(0,h.jsx)(r,{dimColor:!0,children:`(tab to switch, esc to close)`})]}),(0,h.jsx)(r,{dimColor:!0,children:l})]})})}async function f(e){return(0,h.jsx)(d,{onDone:e})}var p,m,h,g;e((()=>{p=u(),n(),m=t(n(),1),a(),l(),h=c(),g={ios:{url:`https://apps.apple.com/app/claude-by-anthropic/id6473753684`},android:{url:`https://play.google.com/store/apps/details?id=com.anthropic.claude`}}}))();export{f as call};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-KjMLauwe.js";function r(){return(0,a.useContext)(o)!==null}function i(e){let t=(0,a.useContext)(o);return t?{rows:t.rows,columns:t.columns}:e}var a,o,s=e((()=>{a=t(n(),1),o=(0,a.createContext)(null)}));export{i,s as n,r,o as t};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-Di342QoJ.js";function r(){return(0,a.useContext)(o)!==null}function i(e){let t=(0,a.useContext)(o);return t?{rows:t.rows,columns:t.columns}:e}var a,o,s=e((()=>{a=t(n(),1),o=(0,a.createContext)(null)}));export{i,s as n,r,o as t};
@@ -1,2 +1,2 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-KjMLauwe.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{aS as s,gt as c,ht as l,mt as u,oS as d,pt as f}from"./loadAgentsDir-CQF8qhne.js";function p({onDone:e}){let t=l(),n=f(),i=(0,m.useMemo)(()=>t.map(e=>({label:(0,h.jsxs)(r,{children:[e.icon,` `,e.name,` `,(0,h.jsxs)(r,{dimColor:!0,children:[`(`,e.slug,`) — `,e.description]})]}),value:e.slug})),[t]);function o(n){c(n);let r=t.find(e=>e.slug===n);e(`${r?.icon} Mode switched to: ${r?.name} (${r?.slug}) — ${r?.description}`,{display:`system`})}function u(){e(`Mode selection cancelled.`,{display:`system`})}return(0,h.jsxs)(a,{flexDirection:`column`,children:[(0,h.jsxs)(a,{marginBottom:1,flexDirection:`column`,children:[(0,h.jsx)(r,{color:`remember`,bold:!0,children:`Select mode`}),(0,h.jsx)(r,{dimColor:!0,children:`Arrow keys to navigate, Enter to select, Esc to cancel.`})]}),(0,h.jsx)(s,{defaultValue:n,options:i,onChange:o,onCancel:u,visibleOptionCount:t.length})]})}var m,h,g;e((()=>{m=t(n(),1),i(),d(),u(),h=o(),g=async(e,t,n)=>{let r=n?.trim().toLowerCase();if(r){let t=l(),n=t.find(e=>e.slug===r);if(!n){e(`Unknown mode: "${r}"\n\nAvailable modes:\n${t.map(e=>`${e.icon} ${e.slug} — ${e.description}`).join(`
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{aS as s,gt as c,ht as l,mt as u,oS as d,pt as f}from"./loadAgentsDir-DC4jN6-f.js";function p({onDone:e}){let t=l(),n=f(),i=(0,m.useMemo)(()=>t.map(e=>({label:(0,h.jsxs)(r,{children:[e.icon,` `,e.name,` `,(0,h.jsxs)(r,{dimColor:!0,children:[`(`,e.slug,`) — `,e.description]})]}),value:e.slug})),[t]);function o(n){c(n);let r=t.find(e=>e.slug===n);e(`${r?.icon} Mode switched to: ${r?.name} (${r?.slug}) — ${r?.description}`,{display:`system`})}function u(){e(`Mode selection cancelled.`,{display:`system`})}return(0,h.jsxs)(a,{flexDirection:`column`,children:[(0,h.jsxs)(a,{marginBottom:1,flexDirection:`column`,children:[(0,h.jsx)(r,{color:`remember`,bold:!0,children:`Select mode`}),(0,h.jsx)(r,{dimColor:!0,children:`Arrow keys to navigate, Enter to select, Esc to cancel.`})]}),(0,h.jsx)(s,{defaultValue:n,options:i,onChange:o,onCancel:u,visibleOptionCount:t.length})]})}var m,h,g;e((()=>{m=t(n(),1),i(),d(),u(),h=o(),g=async(e,t,n)=>{let r=n?.trim().toLowerCase();if(r){let t=l(),n=t.find(e=>e.slug===r);if(!n){e(`Unknown mode: "${r}"\n\nAvailable modes:\n${t.map(e=>`${e.icon} ${e.slug} — ${e.description}`).join(`
2
2
  `)}`,{display:`system`});return}c(r),e(`${n.icon} Mode switched to: ${n.name} (${n.slug}) — ${n.description}`,{display:`system`});return}return(0,h.jsx)(p,{onDone:e})}}))();export{g as call};
@@ -0,0 +1 @@
1
+ import{Dr as e,Pr as t}from"./paths-CEAy4QCs.js";t();export{e as getMainLoopModel};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i}from"./src-KjMLauwe.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{$r as o,Lr as s,Pr as c,Qr as l,Si as u,Vr as d,Xr as f,Zr as p,ui as m,vi as h,wr as g,xi as _,yi as v}from"./paths-4ZWdjPP4.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{A as x,et as S,j as C}from"./log-DSV4Ht5l.js";import{Lf as w,Rf as T,b_ as E,fC as D,lC as O,uC as k,v_ as A,y_ as j}from"./loadAgentsDir-CQF8qhne.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-BNRQOkgU.js";function I({onDone:e}){let t=k(e=>e.mainLoopModel),r=k(e=>e.mainLoopModelForSession),i=k(e=>e.fastMode),a=D();function o(){b(`tengu_model_command_menu`,{action:`cancel`});let r=H(t);e(`Kept model as ${n.bold(r)}`,{display:`system`})}function c(r,o){b(`tengu_model_command_menu`,{action:r,from_model:t,to_model:r}),a(e=>({...e,mainLoopModel:r,mainLoopModelForSession:null}));let c=`Set model to ${n.bold(H(r))}`;o!==void 0&&(c+=` with ${n.bold(o)} effort`);let l;_()&&(m(),!u(r)&&i?(a(e=>({...e,fastMode:!1})),l=!1):u(r)&&v()&&i&&(c+=` · Fast mode ON`,l=!0)),N(r,l===!0,s())&&(c+=` · Billed as extra usage`),l===!1&&(c+=` · Fast mode OFF`),e(c)}return(0,W.jsx)(P,{initial:t,sessionModel:r,onSelect:c,onCancel:o,isStandaloneCommand:!0,showFastModeNotice:_()&&i&&u(t)&&v()})}function L({args:e,onDone:t}){let r=k(e=>e.fastMode),i=D(),a=e===`default`?null:e;return U.useEffect(()=>{async function e(){if(a&&!p(a)){t(`Model '${a}' is not available. Your organization restricts model selection.`,{display:`system`});return}if(a&&z(a)){t(`Opus 4.7 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(a&&B(a)){t(`Sonnet 4.6 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(!a){o(null);return}if(R(a)){o(a);return}try{let{valid:e,error:n}=await T(a);e?o(a):t(n||`Model '${a}' not found`,{display:`system`})}catch(e){t(`Failed to validate model: ${e.message}`,{display:`system`})}}function o(e){i(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null}));let a=`Set model to ${n.bold(H(e))}`,o;_()&&(m(),!u(e)&&r?(i(e=>({...e,fastMode:!1})),o=!1):u(e)&&r&&(a+=` · Fast mode ON`,o=!0)),N(e,o===!0,s())&&(a+=` · Billed as extra usage`),o===!1&&(a+=` · Fast mode OFF`),t(a)}e()},[a,t,i]),null}function R(e){return l.includes(e.toLowerCase().trim())}function z(e){let t=e.toLowerCase();return!A()&&!s()&&t.includes(`opus`)&&t.includes(`[1m]`)}function B(e){let t=e.toLowerCase();return!j()&&(t.includes(`sonnet[1m]`)||t.includes(`sonnet-4-6[1m]`))}function V({onDone:e}){let t=k(e=>e.mainLoopModel),r=k(e=>e.mainLoopModelForSession),i=k(e=>e.effortValue),a=H(t),o=i===void 0?``:` (effort: ${i})`;return e(r?`Current model: ${n.bold(H(r))} (session override from plan mode)\nBase model: ${a}${o}`:`Current model: ${a}${o}`),null}function H(e){let t=d(e??g());return e===null?`${t} (default)`:t}var U,W,G;e((()=>{r(),U=t(i(),1),M(),S(),y(),O(),F(),h(),o(),E(),c(),f(),w(),W=a(),G=async(e,t,n)=>{if(n=n?.trim()||``,C.includes(n))return b(`tengu_model_command_inline_help`,{args:n}),(0,W.jsx)(V,{onDone:e});if(x.includes(n)){e(`Run /model to open the model selection menu, or /model [modelName] to set the model.`,{display:`system`});return}return n?(b(`tengu_model_command_inline`,{args:n}),(0,W.jsx)(L,{args:n,onDone:e})):(0,W.jsx)(I,{onDone:e})}}))();export{G as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{$r as o,Lr as s,Pr as c,Qr as l,Si as u,Vr as d,Xr as f,Zr as p,ui as m,vi as h,wr as g,xi as _,yi as v}from"./paths-CEAy4QCs.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{A as x,et as S,j as C}from"./log-DSV4Ht5l.js";import{Lf as w,Rf as T,b_ as E,fC as D,lC as O,uC as k,v_ as A,y_ as j}from"./loadAgentsDir-DC4jN6-f.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-Ca_6qcke.js";function I({onDone:e}){let t=k(e=>e.mainLoopModel),r=k(e=>e.mainLoopModelForSession),i=k(e=>e.fastMode),a=D();function o(){b(`tengu_model_command_menu`,{action:`cancel`});let r=H(t);e(`Kept model as ${n.bold(r)}`,{display:`system`})}function c(r,o){b(`tengu_model_command_menu`,{action:r,from_model:t,to_model:r}),a(e=>({...e,mainLoopModel:r,mainLoopModelForSession:null}));let c=`Set model to ${n.bold(H(r))}`;o!==void 0&&(c+=` with ${n.bold(o)} effort`);let l;_()&&(m(),!u(r)&&i?(a(e=>({...e,fastMode:!1})),l=!1):u(r)&&v()&&i&&(c+=` · Fast mode ON`,l=!0)),N(r,l===!0,s())&&(c+=` · Billed as extra usage`),l===!1&&(c+=` · Fast mode OFF`),e(c)}return(0,W.jsx)(P,{initial:t,sessionModel:r,onSelect:c,onCancel:o,isStandaloneCommand:!0,showFastModeNotice:_()&&i&&u(t)&&v()})}function L({args:e,onDone:t}){let r=k(e=>e.fastMode),i=D(),a=e===`default`?null:e;return U.useEffect(()=>{async function e(){if(a&&!p(a)){t(`Model '${a}' is not available. Your organization restricts model selection.`,{display:`system`});return}if(a&&z(a)){t(`Opus 4.7 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(a&&B(a)){t(`Sonnet 4.6 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(!a){o(null);return}if(R(a)){o(a);return}try{let{valid:e,error:n}=await T(a);e?o(a):t(n||`Model '${a}' not found`,{display:`system`})}catch(e){t(`Failed to validate model: ${e.message}`,{display:`system`})}}function o(e){i(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null}));let a=`Set model to ${n.bold(H(e))}`,o;_()&&(m(),!u(e)&&r?(i(e=>({...e,fastMode:!1})),o=!1):u(e)&&r&&(a+=` · Fast mode ON`,o=!0)),N(e,o===!0,s())&&(a+=` · Billed as extra usage`),o===!1&&(a+=` · Fast mode OFF`),t(a)}e()},[a,t,i]),null}function R(e){return l.includes(e.toLowerCase().trim())}function z(e){let t=e.toLowerCase();return!A()&&!s()&&t.includes(`opus`)&&t.includes(`[1m]`)}function B(e){let t=e.toLowerCase();return!j()&&(t.includes(`sonnet[1m]`)||t.includes(`sonnet-4-6[1m]`))}function V({onDone:e}){let t=k(e=>e.mainLoopModel),r=k(e=>e.mainLoopModelForSession),i=k(e=>e.effortValue),a=H(t),o=i===void 0?``:` (effort: ${i})`;return e(r?`Current model: ${n.bold(H(r))} (session override from plan mode)\nBase model: ${a}${o}`:`Current model: ${a}${o}`),null}function H(e){let t=d(e??g());return e===null?`${t} (default)`:t}var U,W,G;e((()=>{r(),U=t(i(),1),M(),S(),y(),O(),F(),h(),o(),E(),c(),f(),w(),W=a(),G=async(e,t,n)=>{if(n=n?.trim()||``,C.includes(n))return b(`tengu_model_command_inline_help`,{args:n}),(0,W.jsx)(V,{onDone:e});if(x.includes(n)){e(`Run /model to open the model selection menu, or /model [modelName] to set the model.`,{display:`system`});return}return n?(b(`tengu_model_command_inline`,{args:n}),(0,W.jsx)(L,{args:n,onDone:e})):(0,W.jsx)(I,{onDone:e})}}))();export{G as call};
@@ -1 +1 @@
1
- import{cn as e,tr as t}from"./state-sIHsFpDu.js";import{As as n,Cc as r,It as i,Lt as a,Rt as o,Ss as s,Ts as c,dc as l,on as u,yc as d}from"./paths-4ZWdjPP4.js";import{J as f,U as p}from"./debug-otxXY3j-.js";import{o as m,s as h}from"./log-DSV4Ht5l.js";import{Ca as g,Ta as _}from"./loadAgentsDir-CQF8qhne.js";import{d as v,m as y,p as b}from"./rcDebugLog-DOXxIr8l.js";e(),u(),d(),p(),m(),_(),s(),v();function x(e){return t=>({...t,...typeof e.permission_mode==`string`?{toolPermissionContext:{...t.toolPermissionContext,mode:c(e.permission_mode)}}:{},...typeof e.is_ultraplan_mode==`boolean`?{isUltraplanMode:e.is_ultraplan_mode}:{}})}function S({newState:e,oldState:s}){let c=s.toolPermissionContext.mode,u=e.toolPermissionContext.mode;if(c!==u){let t=n(c),r=n(u);t!==r&&y({permission_mode:r,is_ultraplan_mode:r===`plan`&&e.isUltraplanMode&&!s.isUltraplanMode?!0:null}),b(u)}if(e.mainLoopModel!==s.mainLoopModel&&t(e.mainLoopModel),e.expandedView!==s.expandedView){let t=e.expandedView===`tasks`,n=e.expandedView===`teammates`;(l().showExpandedTodos!==t||l().showSpinnerTree!==n)&&r(e=>({...e,showExpandedTodos:t,showSpinnerTree:n}))}if(e.verbose!==s.verbose&&l().verbose!==e.verbose){let t=e.verbose;r(e=>({...e,verbose:t}))}if(process.env.USER_TYPE===`ant`&&e.tungstenPanelVisible!==s.tungstenPanelVisible&&e.tungstenPanelVisible!==void 0&&l().tungstenPanelVisible!==e.tungstenPanelVisible){let t=e.tungstenPanelVisible;r(e=>({...e,tungstenPanelVisible:t}))}if(e.settings!==s.settings)try{i(),a(),o(),e.settings.env!==s.settings.env&&g()}catch(e){h(f(e))}}export{S as n,x as t};
1
+ import{cn as e,tr as t}from"./state-sIHsFpDu.js";import{As as n,Cc as r,It as i,Lt as a,Rt as o,Ss as s,Ts as c,dc as l,on as u,yc as d}from"./paths-CEAy4QCs.js";import{J as f,U as p}from"./debug-otxXY3j-.js";import{o as m,s as h}from"./log-DSV4Ht5l.js";import{Ca as g,Ta as _}from"./loadAgentsDir-DC4jN6-f.js";import{d as v,m as y,p as b}from"./rcDebugLog-C0Bam8V9.js";e(),u(),d(),p(),m(),_(),s(),v();function x(e){return t=>({...t,...typeof e.permission_mode==`string`?{toolPermissionContext:{...t.toolPermissionContext,mode:c(e.permission_mode)}}:{},...typeof e.is_ultraplan_mode==`boolean`?{isUltraplanMode:e.is_ultraplan_mode}:{}})}function S({newState:e,oldState:s}){let c=s.toolPermissionContext.mode,u=e.toolPermissionContext.mode;if(c!==u){let t=n(c),r=n(u);t!==r&&y({permission_mode:r,is_ultraplan_mode:r===`plan`&&e.isUltraplanMode&&!s.isUltraplanMode?!0:null}),b(u)}if(e.mainLoopModel!==s.mainLoopModel&&t(e.mainLoopModel),e.expandedView!==s.expandedView){let t=e.expandedView===`tasks`,n=e.expandedView===`teammates`;(l().showExpandedTodos!==t||l().showSpinnerTree!==n)&&r(e=>({...e,showExpandedTodos:t,showSpinnerTree:n}))}if(e.verbose!==s.verbose&&l().verbose!==e.verbose){let t=e.verbose;r(e=>({...e,verbose:t}))}if(process.env.USER_TYPE===`ant`&&e.tungstenPanelVisible!==s.tungstenPanelVisible&&e.tungstenPanelVisible!==void 0&&l().tungstenPanelVisible!==e.tungstenPanelVisible){let t=e.tungstenPanelVisible;r(e=>({...e,tungstenPanelVisible:t}))}if(e.settings!==s.settings)try{i(),a(),o(),e.settings.env!==s.settings.env&&g()}catch(e){h(f(e))}}export{S as n,x as t};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{ai as i,ci as a,cr as o,dr as s}from"./paths-4ZWdjPP4.js";import{l as c,p as l}from"./debug-otxXY3j-.js";import{Eo as u,G_ as d,H_ as f,Hb as p,Qo as m,Tm as ee,U_ as h,Ub as g,Uo as _,W_ as v,Xo as y,aE as b,dD as te,km as x,mo as S,nl as C,oE as w,rl as T,sE as E,st as D,tl as O,uD as k,ut as ne}from"./loadAgentsDir-CQF8qhne.js";import{$n as A,Qn as j,Zn as M,i as N,r as P,t as F}from"./prompt-CogZQuTN.js";import{F as I,I as L,L as R,P as z,R as B,Y as V}from"./rcDebugLog-DOXxIr8l.js";import{n as H,t as U}from"./openaiShared-BkVgd2rZ.js";import{randomUUID as W}from"crypto";function G(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{ai as i,ci as a,cr as o,dr as s}from"./paths-CEAy4QCs.js";import{l as c,p as l}from"./debug-otxXY3j-.js";import{Eo as u,G_ as d,H_ as f,Hb as p,Qo as m,Tm as ee,U_ as h,Ub as g,Uo as _,W_ as v,Xo as y,aE as b,dD as te,km as x,mo as S,nl as C,oE as w,rl as T,sE as E,st as D,tl as O,uD as k,ut as ne}from"./loadAgentsDir-DC4jN6-f.js";import{$n as A,Qn as j,Zn as M,i as N,r as P,t as F}from"./prompt-BHI7PZe4.js";import{F as I,I as L,L as R,P as z,R as B,Y as V}from"./rcDebugLog-C0Bam8V9.js";import{n as H,t as U}from"./openaiShared-BkVgd2rZ.js";import{randomUUID as W}from"crypto";function G(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
2
2
  `):``}function re(e){if(typeof e==`string`)return e;if(!Array.isArray(e))return G(e);let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;if(e.type===`text`&&typeof e.text==`string`)t.push({type:`input_text`,text:e.text});else if(e.type===`image_url`){let n=e.image_url;typeof n?.url==`string`&&t.push({type:`input_image`,image_url:n.url})}}return t.length>0?t:G(e)}function K(e){let t=[],n=[];for(let r of e){if(!r||typeof r!=`object`)continue;let e=r,i=e.role;if(i===`system`||i===`developer`){let t=G(e.content);t&&n.push(t);continue}if(i===`tool`){let n=e.tool_call_id;typeof n==`string`&&t.push({type:`function_call_output`,call_id:n,output:G(e.content)});continue}if(i===`assistant`){let n=G(e.content);n&&t.push({role:`assistant`,content:n});let r=e.tool_calls;if(Array.isArray(r))for(let e of r){if(!e||typeof e!=`object`)continue;let n=e,r=n.function,i=typeof n.id==`string`?n.id:void 0,a=typeof r?.name==`string`?r.name:void 0;!i||!a||t.push({type:`function_call`,call_id:i,name:a,arguments:typeof r?.arguments==`string`?r.arguments:`{}`})}continue}i===`user`&&t.push({role:`user`,content:re(e.content)})}return{input:t,instructions:n.length>0?n.join(`
3
3
 
4
4
  `):void 0}}function q(e){let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n.function,r=typeof e?.name==`string`?e.name:void 0;r&&t.push({type:`function`,name:r,description:typeof e?.description==`string`?e.description:``,parameters:e?.parameters&&typeof e.parameters==`object`?e.parameters:{type:`object`,properties:{}},strict:!1})}return t}function J(e){if(e===`required`)return`required`;if(e===`auto`)return`auto`;if(!e||typeof e!=`object`)return e;let t=e,n=t.function;return t.type===`function`&&typeof n?.name==`string`?{type:`function`,name:n.name}:e}function Y(e){let{input:t,instructions:n}=K(e.messages),r=q(e.tools);return{model:e.model,stream:!0,store:!1,input:t,...n?{instructions:n}:{},...r.length>0?{tools:r}:{},...e.toolChoice?{tool_choice:J(e.toolChoice)}:{},...e.reasoningEffort?{reasoning:{effort:e.reasoningEffort}}:{},parallel_tool_calls:!0}}async function*X(e){if(!e.body)throw Error(`ChatGPT response did not include a body`);let t=e.body.getReader(),n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;r+=n.decode(i,{stream:!0});let a=r.indexOf(`
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Zt as i,dc as a,on as o,yc as s}from"./paths-4ZWdjPP4.js";import{l as c,u as l}from"./oauth-CdZEzMww.js";import{d as u,f as d,o as f,s as p}from"./log-DSV4Ht5l.js";import{a as m,l as h,o as g}from"./api-DMbWqJlK.js";async function _(){try{let{accessToken:e,orgUUID:n}=await h(),r=`${c().BASE_API_URL}/api/oauth/organizations/${n}/overage_credit_grant`;return(await t.get(r,{headers:m(e)})).data}catch(e){return p(e),null}}function v(){let e=i()?.organizationUuid;if(!e)return null;let t=a().overageCreditGrantCache?.[e];return!t||Date.now()-t.timestamp>S?null:t.info}function y(){let e=i()?.organizationUuid;if(!e)return;let t=a().overageCreditGrantCache;!t||!(e in t)||r(t=>{let n={...t.overageCreditGrantCache};return delete n[e],{...t,overageCreditGrantCache:n}})}async function b(){if(d())return;let e=i()?.organizationUuid;if(!e)return;let t=await _();t&&r(n=>{let r=n.overageCreditGrantCache?.[e],i=r?.info,a=i&&i.available===t.available&&i.eligible===t.eligible&&i.granted===t.granted&&i.amount_minor_units===t.amount_minor_units&&i.currency===t.currency;if(a&&r&&Date.now()-r.timestamp<=S)return n;let o={info:a?i:t,timestamp:Date.now()};return{...n,overageCreditGrantCache:{...n.overageCreditGrantCache,[e]:o}}})}function x(e){if(e.amount_minor_units==null||!e.currency)return null;if(e.currency.toUpperCase()===`USD`){let t=e.amount_minor_units/100;return Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`}return null}var S,C=e((()=>{n(),l(),o(),s(),f(),u(),g(),S=3600*1e3}));export{b as a,y as i,v as n,C as r,x as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Zt as i,dc as a,on as o,yc as s}from"./paths-CEAy4QCs.js";import{l as c,u as l}from"./oauth-CdZEzMww.js";import{d as u,f as d,o as f,s as p}from"./log-DSV4Ht5l.js";import{a as m,l as h,o as g}from"./api-Cy1N7XAQ.js";async function _(){try{let{accessToken:e,orgUUID:n}=await h(),r=`${c().BASE_API_URL}/api/oauth/organizations/${n}/overage_credit_grant`;return(await t.get(r,{headers:m(e)})).data}catch(e){return p(e),null}}function v(){let e=i()?.organizationUuid;if(!e)return null;let t=a().overageCreditGrantCache?.[e];return!t||Date.now()-t.timestamp>S?null:t.info}function y(){let e=i()?.organizationUuid;if(!e)return;let t=a().overageCreditGrantCache;!t||!(e in t)||r(t=>{let n={...t.overageCreditGrantCache};return delete n[e],{...t,overageCreditGrantCache:n}})}async function b(){if(d())return;let e=i()?.organizationUuid;if(!e)return;let t=await _();t&&r(n=>{let r=n.overageCreditGrantCache?.[e],i=r?.info,a=i&&i.available===t.available&&i.eligible===t.eligible&&i.granted===t.granted&&i.amount_minor_units===t.amount_minor_units&&i.currency===t.currency;if(a&&r&&Date.now()-r.timestamp<=S)return n;let o={info:a?i:t,timestamp:Date.now()};return{...n,overageCreditGrantCache:{...n.overageCreditGrantCache,[e]:o}}})}function x(e){if(e.amount_minor_units==null||!e.currency)return null;if(e.currency.toUpperCase()===`USD`){let t=e.amount_minor_units/100;return Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`}return null}var S,C=e((()=>{n(),l(),o(),s(),f(),u(),g(),S=3600*1e3}));export{b as a,y as i,v as n,C as r,x as t};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-KjMLauwe.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{o as l,r as u}from"./break-cache-CDzQDHwY.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,n]=(0,m.useState)(0),a=(0,m.useMemo)(()=>[{label:`Status`,description:`Show pending marker, always mode, and break count`,run:()=>void d(`status`,e)},{label:`Once`,description:`Break prompt cache on the next API call only`,run:()=>void d(`once`,e)},{label:`Always`,description:`Break prompt cache on every API call`,run:()=>void d(`always`,e)},{label:`Off`,description:`Disable always mode and clear pending once marker`,run:()=>void d(`off`,e)},{label:`Clear Once`,description:`Cancel the pending one-time cache break`,run:()=>void d(`--clear`,e)}],[e]),c=()=>{let e=a[t];e&&e.run()};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(i,{title:`Break Cache`,subtitle:`${a.length} actions`,onCancel:()=>e(`Break-cache panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,h.jsxs)(o,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(o,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(n(),1),a(),l(),h=c(),g=28}))();export{p as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{o as l,r as u}from"./break-cache-DjCRzxDv.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,n]=(0,m.useState)(0),a=(0,m.useMemo)(()=>[{label:`Status`,description:`Show pending marker, always mode, and break count`,run:()=>void d(`status`,e)},{label:`Once`,description:`Break prompt cache on the next API call only`,run:()=>void d(`once`,e)},{label:`Always`,description:`Break prompt cache on every API call`,run:()=>void d(`always`,e)},{label:`Off`,description:`Disable always mode and clear pending once marker`,run:()=>void d(`off`,e)},{label:`Clear Once`,description:`Cancel the pending one-time cache break`,run:()=>void d(`--clear`,e)}],[e]),c=()=>{let e=a[t];e&&e.run()};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(i,{title:`Break Cache`,subtitle:`${a.length} actions`,onCancel:()=>e(`Break-cache panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,h.jsxs)(o,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(o,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(n(),1),a(),l(),h=c(),g=28}))();export{p as call};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-KjMLauwe.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{n as l,t as u}from"./tui-C7aBeORE.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,n]=(0,m.useState)(0),a=(0,m.useMemo)(()=>[{label:`Status`,description:`Show marker and environment override state`,run:()=>void d(`status`,e)},{label:`Toggle`,description:`Flip persisted TUI mode for the next session`,run:()=>void d(`toggle`,e)},{label:`On`,description:`Enable flicker-free alternate-screen mode`,run:()=>void d(`on`,e)},{label:`Off`,description:`Disable flicker-free alternate-screen mode`,run:()=>void d(`off`,e)}],[e]),c=()=>{let e=a[t];e&&e.run()};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(i,{title:`TUI Mode`,subtitle:`${a.length} actions`,onCancel:()=>e(`TUI mode panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,h.jsxs)(o,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(o,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(n(),1),a(),l(),h=c(),g=24}))();export{p as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{n as l,t as u}from"./tui-DcXIK0fP.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,n]=(0,m.useState)(0),a=(0,m.useMemo)(()=>[{label:`Status`,description:`Show marker and environment override state`,run:()=>void d(`status`,e)},{label:`Toggle`,description:`Flip persisted TUI mode for the next session`,run:()=>void d(`toggle`,e)},{label:`On`,description:`Enable flicker-free alternate-screen mode`,run:()=>void d(`on`,e)},{label:`Off`,description:`Disable flicker-free alternate-screen mode`,run:()=>void d(`off`,e)}],[e]),c=()=>{let e=a[t];e&&e.run()};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(i,{title:`TUI Mode`,subtitle:`${a.length} actions`,onCancel:()=>e(`TUI mode panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,h.jsxs)(o,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(o,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(n(),1),a(),l(),h=c(),g=24}))();export{p as call};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,Rn as r,b as i,f as a,t as o,x as s,xt as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{ed as u,td as d}from"./loadAgentsDir-DC4jN6-f.js";import{n as f,t as p}from"./SentryErrorBoundary-kEgE7qeH.js";function m(e){return e.status===`running`?{mark:`●`,color:`warning`}:e.resultKind===`dead`?{mark:`✗`,color:`error`}:{mark:`✓`,color:`success`}}function h(e){return e?e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e):`0`}function g(e){let t=[];return e.model&&t.push(e.model),t.push(`${h(e.tokenCount)} tok`),t.push(`${e.toolCount??0} tool`),t.join(` · `)}var _,v,y,b,x,S=e((()=>{_={running:`●`,completed:`✓`,failed:`✗`,killed:`■`},v={running:`warning`,completed:`success`,failed:`error`,killed:`subtle`},y={running:`running`,completed:`done`,failed:`failed`,killed:`killed`},b={running:`●`,done:`✓`,pending:`○`},x={running:`warning`,done:`success`,pending:`subtle`}}));function C(e,t){if(e.length<=t)return e;let n=e.match(/#\d+$/);if(!n)return e.slice(0,t);let r=n[0],i=e.slice(0,e.length-r.length),a=t-r.length-1;return`${i.slice(0,a)}…${r}`}function ee({agents:e,selectedIndex:t,focused:r}){let[a,o]=n(E),c=T[Math.floor(o/E)%T.length];return e.length===0?(0,w.jsx)(i,{color:`subtle`,children:`(no agents in this phase)`}):(0,w.jsx)(s,{ref:a,flexDirection:`column`,children:e.map((e,n)=>{let a=m(e),o=n===t&&r,l=e.status===`running`?c:a.mark,u=C(e.label??`agent-${e.id}`,D);return(0,w.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,w.jsxs)(s,{children:[(0,w.jsx)(i,{color:a.color,children:l}),(0,w.jsxs)(i,{children:[` `,u]})]}),(0,w.jsx)(i,{color:`subtle`,children:g(e)})]},e.id)})})}var w,T,E,D,O=e((()=>{r(),o(),S(),w=l(),T=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],E=120,D=18}));function k(e,t){return e?.status===`done`?`done`:t.length>0?t.every(e=>e.status===`done`)?`done`:`running`:e?.status===`running`?`running`:`pending`}function A(e){let t=new Map(e.phases.map(e=>[e.title,e])),n=new Set,r=[],i=i=>{if(n.has(i))return;n.add(i);let a=t.get(i),o=e.agents.filter(e=>e.phase===i);r.push({title:i,status:k(a,o),done:o.filter(e=>e.status===`done`).length,total:o.length})};for(let t of e.declaredPhases)i(t);for(let t of e.phases)i(t.title);for(let t of e.agents)t.phase&&i(t.phase);return r}function j(e,t){return t===void 0||t===`All`?e:e.filter(e=>e.phase===t)}function M(e){return e.filter(e=>e.status===`running`)}function N(e,t){let n=Math.max(0,Math.trunc(t)),r=e.slice(0,n);return{runs:r,overflow:Math.max(0,e.length-r.length)}}function P(e,t){return`${e}#${t.slice(-4)}`}function F(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return n<60?`${n}m${String(r).padStart(2,`0`)}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,`0`)}m`}var I=e((()=>{}));function L({phases:e,agents:t,selectedIndex:r,focused:a}){let[o,c]=n(B),l=z[Math.floor(c/B)%z.length],u=t.length;return(0,R.jsx)(s,{ref:o,flexDirection:`column`,children:[{title:`All`,done:t.filter(e=>e.status===`done`).length,total:u},...e].map((e,t)=>{let n=t===r,o=n&&a,c=e.status===`running`?l:e.status?b[e.status]:` `,u=e.status?x[e.status]:`subtle`;return(0,R.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,R.jsxs)(s,{children:[(0,R.jsx)(i,{color:n?`claude`:void 0,children:o?`>`:` `}),(0,R.jsx)(i,{children:` `}),(0,R.jsx)(i,{color:u,children:c}),(0,R.jsxs)(i,{children:[` `,e.title]})]}),(0,R.jsxs)(i,{color:`subtle`,children:[e.done,`/`,e.total]})]},e.title)})})}var R,z,B,V=e((()=>{r(),o(),S(),I(),R=l(),z=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],B=120}));function H({runs:e,activeRunId:t}){if(e.length===0)return(0,U.jsx)(i,{color:`subtle`,children:`(no runs)`});let{runs:n,overflow:r}=N(e,G);return(0,U.jsxs)(s,{children:[n.map(e=>{let n=e.runId===t,r=C(P(e.workflowName,e.runId),W),a=`═`.repeat(r.length+2);return(0,U.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,U.jsxs)(s,{children:[(0,U.jsx)(i,{color:v[e.status],children:_[e.status]}),(0,U.jsx)(i,{children:` `}),(0,U.jsx)(i,{color:n?`claude`:void 0,bold:n,children:r})]}),(0,U.jsx)(i,{color:n?`claude`:void 0,children:n?a:``})]},e.runId)}),r>0?(0,U.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,U.jsxs)(i,{color:`subtle`,children:[`+`,r]}),(0,U.jsx)(i,{children:` `})]}):null]})}var U,W,G,K=e((()=>{r(),o(),S(),I(),O(),U=l(),W=18,G=6}));function q(e,t,n=`normal`){return n===`confirm`?e===`y`||e===`Y`||t.return?`confirmYes`:e===`n`||e===`N`||t.escape||e===`q`?`confirmNo`:null:t.tab||e===` `?t.shift?`prevTab`:`nextTab`:t.escape||e===`q`?`quit`:e===`K`?`killWorkflow`:e===`x`?`killAgent`:e===`r`?`resume`:e===`n`?`newRun`:t.leftArrow?`focusLeft`:t.rightArrow?`focusRight`:t.upArrow?`moveUp`:t.downArrow?`moveDown`:null}function J(e,t=`normal`){c((n,r)=>{let i=q(n,r,t);if(i!==null)switch(i){case`nextTab`:e.nextTab();break;case`prevTab`:e.prevTab();break;case`focusLeft`:e.focusLeft();break;case`focusRight`:e.focusRight();break;case`moveUp`:e.moveUp();break;case`moveDown`:e.moveDown();break;case`killAgent`:e.killAgent();break;case`killWorkflow`:e.killWorkflow();break;case`resume`:e.resumeFocused();break;case`newRun`:e.newRun();break;case`quit`:e.quit();break;case`confirmYes`:e.confirmYes();break;case`confirmNo`:e.confirmNo();break}})}var te=e((()=>{o()}));function Y(e,t){if(t===0)return 0;let n=Math.trunc(e);return Number.isNaN(n)||n<0?0:Math.min(n,t-1)}function ne(e,t){return!e||!t||e.runId!==t.runId||e.status!==`running`?!1:t.status===`completed`||t.status===`failed`||t.status===`killed`}function re({onDone:e,context:t}){let r=u(),o=(0,X.useSyncExternalStore)(r.subscribe,()=>r.listRuns(),()=>[]),c=M(o),[l,d]=(0,X.useState)(null),[f,p]=(0,X.useState)(`phases`),[m,h]=(0,X.useState)(0),[g,_]=(0,X.useState)(0),[b,x]=(0,X.useState)(null);(0,X.useEffect)(()=>{r.loadPersistedRuns()},[r]),(0,X.useEffect)(()=>{if(c.length===0){l!==null&&d(null);return}c.some(e=>e.runId===l)||d(c[0].runId)},[c,l]);let S=c.find(e=>e.runId===l),C=S?A(S):[],w=C.length+1,T=Y(m,w),E=(0,X.useRef)(null);(0,X.useEffect)(()=>{let t=S?{runId:S.runId,status:S.status}:null,n=E.current;if(E.current=t,!ne(n,t))return;let r=setTimeout(()=>e(),800);return()=>{clearTimeout(r)}},[S?.runId,S?.status,e]);let D=T===0?void 0:C[T-1]?.title,O=S?j(S.agents,D):[],k=Y(g,O.length),N=e=>{d(e),p(`phases`),h(0),_(0)};J({nextTab:()=>{if(c.length===0)return;let e=c[(c.findIndex(e=>e.runId===l)+1)%c.length];N(e.runId)},prevTab:()=>{if(c.length===0)return;let e=c[(c.findIndex(e=>e.runId===l)-1+c.length)%c.length];N(e.runId)},focusLeft:()=>p(`phases`),focusRight:()=>p(`agents`),moveUp:()=>{f===`phases`?h(e=>Y(e-1,w)):_(e=>Y(e-1,O.length))},moveDown:()=>{f===`phases`?h(e=>Y(e+1,w)):_(e=>Y(e+1,O.length))},killAgent:()=>{f!==`agents`||!S||O[k]&&x(`agent`)},killWorkflow:()=>{S&&x(`workflow`)},resumeFocused:()=>{if(!S)return;let n=t.canUseTool;if(!n){e(`resume needs canUseTool context; run /<name> resume from the main session.`);return}r.launch({resumeFromRunId:S.runId,name:S.workflowName},t,n).catch(t=>e(`resume failed: ${t.message}`))},newRun:()=>e(`Tip: start a named workflow with /<name>, or pass name via the Workflow tool.`),quit:()=>{if(b!==null){x(null);return}e()},confirmYes:()=>{if(b===`workflow`&&S){r.kill(S.runId),x(null),e();return}else if(b===`agent`&&S){let e=O[k];e&&r.killAgent(S.runId,e.id)}x(null)},confirmNo:()=>x(null)},b===null?`normal`:`confirm`);let P=o.filter(e=>e.status===`running`).length,I=o.length-P,R=D??`All`,z=S?S.agents.filter(e=>e.status===`done`).length:0,[B]=n(1e3),V=S?Date.now()-S.startedAt:0;return(0,Z.jsxs)(s,{ref:B,flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,paddingX:1,children:[(0,Z.jsxs)(s,{justifyContent:`space-between`,children:[(0,Z.jsx)(i,{bold:!0,children:S?.workflowName??`Workflows`}),S?(0,Z.jsxs)(i,{color:`subtle`,children:[z,`/`,S.agentCount,` agents · `,F(V),` ·`,` `,(0,Z.jsx)(i,{color:v[S.status],children:y[S.status]})]}):(0,Z.jsxs)(i,{color:`subtle`,children:[P,` running · `,I,` done`]})]}),S?.description?(0,Z.jsx)(i,{color:`subtle`,children:S.description}):null,c.length>1?(0,Z.jsx)(s,{marginTop:1,children:(0,Z.jsx)(H,{runs:c,activeRunId:l})}):null,(0,Z.jsxs)(s,{flexDirection:`row`,marginTop:1,children:[(0,Z.jsxs)(s,{width:`25%`,flexDirection:`column`,children:[(0,Z.jsx)(i,{color:f===`phases`?`claude`:`subtle`,bold:!0,children:`Phases`}),(0,Z.jsx)(L,{phases:C,agents:S?.agents??[],selectedIndex:T,focused:f===`phases`})]}),(0,Z.jsx)(i,{color:`subtle`,children:`│`}),(0,Z.jsxs)(s,{flexGrow:1,flexDirection:`column`,children:[(0,Z.jsxs)(i,{color:f===`agents`?`claude`:`subtle`,bold:!0,children:[R,` · `,O.length,` agents`]}),(0,Z.jsx)(ee,{agents:O,selectedIndex:k,focused:f===`agents`})]})]}),(0,Z.jsx)(s,{marginTop:1,children:(0,Z.jsx)(i,{color:`subtle`,children:b===null?`Tab switch run · ←/→ focus · ↑/↓ move · x kill agent · K kill workflow · r resume · q quit`:`Confirm: y kill · n/Esc cancel`})}),b===null?null:(0,Z.jsx)(a,{title:b===`workflow`?`Kill workflow "${S?.workflowName??``}"?`:`Kill agent "${O[k]?.label??``}"?`,subtitle:b===`workflow`?`All in-flight agents will be aborted. Resume will replay from journal.`:`Only this agent aborts; other agents in the workflow keep running.`,onCancel:()=>x(null),color:`warning`,children:(0,Z.jsx)(i,{color:`subtle`,children:`Press y to confirm, or n/Esc to cancel.`})})]})}var X,Z,ie=e((()=>{X=t(r(),1),o(),d(),O(),V(),K(),S(),te(),I(),Z=l()})),Q,$;e((()=>{f(),ie(),Q=l(),$=async(e,t,n)=>(0,Q.jsx)(p,{name:`WorkflowsPanel`,children:(0,Q.jsx)(re,{onDone:e,context:t})})}))();export{$ as call};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,p as a,t as o,tn as s,tt as c,x as l,xt as u}from"./src-KjMLauwe.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Cc as f,Ps as p,dc as m,yc as h}from"./paths-4ZWdjPP4.js";import{n as g,r as _}from"./analytics-DqMQntaB.js";import{o as v,s as y}from"./log-DSV4Ht5l.js";import{b,x}from"./teammate-CbskW5G9.js";import{t as S}from"./useKeybinding-DOjEx42R.js";import{n as C,t as w}from"./useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js";import{i as T,n as E,o as D,r as O,s as k}from"./referral-CMPZjf3I.js";function A({onDone:e}){let[t,r]=(0,j.useState)(!0),[o,d]=(0,j.useState)([]),[f,p]=(0,j.useState)(!1),[m,h]=(0,j.useState)(null),[g,v]=(0,j.useState)(void 0),x=C(()=>e(`Guest passes dialog dismissed`,{display:`system`}));if(c(`confirm:no`,(0,j.useCallback)(()=>{e(`Guest passes dialog dismissed`,{display:`system`})},[e]),{context:`Confirmation`}),u((t,n)=>{n.return&&m&&s(m).then(t=>{t&&process.stdout.write(t),_(`tengu_guest_passes_link_copied`,{}),e(`Referral link copied to clipboard!`)})}),(0,j.useEffect)(()=>{async function e(){try{let e=await T();if(!e||!e.eligible){p(!1),r(!1);return}p(!0),e.referral_code_details?.referral_link&&h(e.referral_code_details.referral_link),v(e.referrer_reward);let t=e.referral_code_details?.campaign??`claude_code_guest_pass`,n;try{n=await E(t)}catch(e){y(e),p(!1),r(!1);return}let i=n.redemptions||[],a=n.limit||3,o=[];for(let e=0;e<a;e++){let t=i[e];o.push({passNumber:e+1,isAvailable:!t})}d(o),r(!1)}catch(e){y(e),p(!1),r(!1)}}e()},[]),t)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`Loading guest pass information…`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});if(!f)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{children:`Guest passes are not currently available.`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});let S=b(o,e=>e.isAvailable),w=[...o].sort((e,t)=>t.isAvailable-+e.isAvailable),D=e=>e.isAvailable?(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{children:`┌──────────┐`}),(0,M.jsxs)(i,{children:[` ) CC `,(0,M.jsx)(i,{color:`claude`,children:`✻`}),` ┊ ( `]}),(0,M.jsx)(i,{children:`└──────────┘`})]},e.passNumber):(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`┌─────────╱`}),(0,M.jsx)(i,{dimColor:!0,children:` ) CC ✻ ┊╱`}),(0,M.jsx)(i,{dimColor:!0,children:`└───────╱`})]},e.passNumber);return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsxs)(i,{color:`permission`,children:[`Guest passes · `,S,` left`]}),(0,M.jsx)(l,{flexDirection:`row`,marginLeft:2,children:w.slice(0,3).map(e=>D(e))}),m&&(0,M.jsx)(l,{marginLeft:2,children:(0,M.jsx)(i,{children:m})}),(0,M.jsx)(l,{flexDirection:`column`,marginLeft:2,children:(0,M.jsxs)(i,{dimColor:!0,children:[g?`Share a free week of Claude Code with friends. If they love it and subscribe, you'll get ${O(g)} of extra usage to keep building. `:`Share a free week of Claude Code with friends. `,(0,M.jsx)(n,{url:g?`https://support.claude.com/en/articles/13456702-claude-code-guest-passes`:`https://support.claude.com/en/articles/12875061-claude-code-guest-passes`,children:`Terms apply.`})]})}),(0,M.jsx)(l,{children:(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Enter to copy link · Esc to cancel`})})})]})})}var j,M,N=e((()=>{r(),j=t(r(),1),p(),w(),o(),S(),g(),k(),x(),v(),M=d()}));async function P(e){let t=!m().hasVisitedPasses;if(t){let e=D();f(t=>({...t,hasVisitedPasses:!0,passesLastSeenRemaining:e??t.passesLastSeenRemaining}))}return _(`tengu_guest_passes_visited`,{is_first_visit:t}),(0,F.jsx)(A,{onDone:e})}var F;e((()=>{r(),N(),g(),k(),h(),F=d()}))();export{P as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,p as a,t as o,tn as s,tt as c,x as l,xt as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Cc as f,Ps as p,dc as m,yc as h}from"./paths-CEAy4QCs.js";import{n as g,r as _}from"./analytics-DqMQntaB.js";import{o as v,s as y}from"./log-DSV4Ht5l.js";import{b,x}from"./teammate-CbskW5G9.js";import{t as S}from"./useKeybinding-DPOUuymz.js";import{n as C,t as w}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{i as T,n as E,o as D,r as O,s as k}from"./referral-B10JtHMk.js";function A({onDone:e}){let[t,r]=(0,j.useState)(!0),[o,d]=(0,j.useState)([]),[f,p]=(0,j.useState)(!1),[m,h]=(0,j.useState)(null),[g,v]=(0,j.useState)(void 0),x=C(()=>e(`Guest passes dialog dismissed`,{display:`system`}));if(c(`confirm:no`,(0,j.useCallback)(()=>{e(`Guest passes dialog dismissed`,{display:`system`})},[e]),{context:`Confirmation`}),u((t,n)=>{n.return&&m&&s(m).then(t=>{t&&process.stdout.write(t),_(`tengu_guest_passes_link_copied`,{}),e(`Referral link copied to clipboard!`)})}),(0,j.useEffect)(()=>{async function e(){try{let e=await T();if(!e||!e.eligible){p(!1),r(!1);return}p(!0),e.referral_code_details?.referral_link&&h(e.referral_code_details.referral_link),v(e.referrer_reward);let t=e.referral_code_details?.campaign??`claude_code_guest_pass`,n;try{n=await E(t)}catch(e){y(e),p(!1),r(!1);return}let i=n.redemptions||[],a=n.limit||3,o=[];for(let e=0;e<a;e++){let t=i[e];o.push({passNumber:e+1,isAvailable:!t})}d(o),r(!1)}catch(e){y(e),p(!1),r(!1)}}e()},[]),t)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`Loading guest pass information…`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});if(!f)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{children:`Guest passes are not currently available.`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});let S=b(o,e=>e.isAvailable),w=[...o].sort((e,t)=>t.isAvailable-+e.isAvailable),D=e=>e.isAvailable?(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{children:`┌──────────┐`}),(0,M.jsxs)(i,{children:[` ) CC `,(0,M.jsx)(i,{color:`claude`,children:`✻`}),` ┊ ( `]}),(0,M.jsx)(i,{children:`└──────────┘`})]},e.passNumber):(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`┌─────────╱`}),(0,M.jsx)(i,{dimColor:!0,children:` ) CC ✻ ┊╱`}),(0,M.jsx)(i,{dimColor:!0,children:`└───────╱`})]},e.passNumber);return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsxs)(i,{color:`permission`,children:[`Guest passes · `,S,` left`]}),(0,M.jsx)(l,{flexDirection:`row`,marginLeft:2,children:w.slice(0,3).map(e=>D(e))}),m&&(0,M.jsx)(l,{marginLeft:2,children:(0,M.jsx)(i,{children:m})}),(0,M.jsx)(l,{flexDirection:`column`,marginLeft:2,children:(0,M.jsxs)(i,{dimColor:!0,children:[g?`Share a free week of Claude Code with friends. If they love it and subscribe, you'll get ${O(g)} of extra usage to keep building. `:`Share a free week of Claude Code with friends. `,(0,M.jsx)(n,{url:g?`https://support.claude.com/en/articles/13456702-claude-code-guest-passes`:`https://support.claude.com/en/articles/12875061-claude-code-guest-passes`,children:`Terms apply.`})]})}),(0,M.jsx)(l,{children:(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Enter to copy link · Esc to cancel`})})})]})})}var j,M,N=e((()=>{r(),j=t(r(),1),p(),w(),o(),S(),g(),k(),x(),v(),M=d()}));async function P(e){let t=!m().hasVisitedPasses;if(t){let e=D();f(t=>({...t,hasVisitedPasses:!0,passesLastSeenRemaining:e??t.passesLastSeenRemaining}))}return _(`tengu_guest_passes_visited`,{is_first_visit:t}),(0,F.jsx)(A,{onDone:e})}var F;e((()=>{r(),N(),g(),k(),h(),F=d()}))();export{P as call};