claude-code-best 2.7.2 → 2.8.0

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 (476) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-V2tF7iCY.js → AddWorkspaceDirectory-DRO4tbYd.js} +1 -1
  2. package/dist/chunks/{App-DLdRpU7c.js → App-DJyiiVKi.js} +1 -1
  3. package/dist/chunks/{ApproveApiKey-DPws3jax.js → ApproveApiKey-DygOEAkM.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-oTZKoMvB.js +1 -0
  5. package/dist/chunks/{AssistantSessionChooser-D6rS0OVe.js → AssistantSessionChooser-C67mOxVi.js} +1 -1
  6. package/dist/chunks/{BackgroundTasksDialog-hGlbm5z5.js → BackgroundTasksDialog-Bqk_Cn3j.js} +1 -1
  7. package/dist/chunks/{BypassPermissionsModeDialog-CuEpdRVd.js → BypassPermissionsModeDialog-C4z7RkFV.js} +1 -1
  8. package/dist/chunks/{ClaudeInChromeOnboarding-CTTKMRbt.js → ClaudeInChromeOnboarding-CyVFdjBe.js} +1 -1
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-5FCT81WS.js +1 -0
  10. package/dist/chunks/{ClaudeMdExternalIncludesDialog-B-GkVoA_.js → ClaudeMdExternalIncludesDialog-IpqqBuJs.js} +1 -1
  11. package/dist/chunks/ConsoleOAuthFlow-BmGziW64.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-BjPylhOT.js → DesktopHandoff-CJpa8Xy-.js} +1 -1
  13. package/dist/chunks/{DevChannelsDialog-c4YVqBX9.js → DevChannelsDialog-CfAuHVRL.js} +1 -1
  14. package/dist/chunks/Dialog-C8eGKH-e.js +1 -0
  15. package/dist/chunks/{DiffDialog-I5wuXw2C.js → DiffDialog-CV3brWsG.js} +1 -1
  16. package/dist/chunks/{Doctor-Cr_MlSPc.js → Doctor-D3GysagF.js} +1 -1
  17. package/dist/chunks/Doctor-DohPtIKu.js +1 -0
  18. package/dist/chunks/{ExitFlow-Bz5grDWv.js → ExitFlow-L2sh80sm.js} +1 -1
  19. package/dist/chunks/{Feedback-COgMI5tY.js → Feedback-DfkBCvva.js} +1 -1
  20. package/dist/chunks/{Grove-m57x4tY1.js → Grove-Bo74aZx-.js} +1 -1
  21. package/dist/chunks/Grove-C_ocvHd3.js +1 -0
  22. package/dist/chunks/{HybridTransport-Bok4-Ptt.js → HybridTransport-BItIDJyC.js} +1 -1
  23. package/dist/chunks/{ITermBackend-BBSP-NNa.js → ITermBackend-3iS8Bvmo.js} +1 -1
  24. package/dist/chunks/{InvalidConfigDialog-uTSuSBvO.js → InvalidConfigDialog-6lPGcuOX.js} +1 -1
  25. package/dist/chunks/{InvalidSettingsDialog-B-Os12-H.js → InvalidSettingsDialog-D8DwHiys.js} +1 -1
  26. package/dist/chunks/ListItem-DDMe4CJ3.js +1 -0
  27. package/dist/chunks/{MCPConnectionManager-y97Inszc.js → MCPConnectionManager-CsPizxTx.js} +1 -1
  28. package/dist/chunks/{McpParsingWarnings-DMFUZw92.js → McpParsingWarnings-Cepe7RPZ.js} +1 -1
  29. package/dist/chunks/{MessageSelector-DwdAC2io.js → MessageSelector-BzUQUeDn.js} +2 -2
  30. package/dist/chunks/{Messages-FEBcX-cT.js → Messages-KmeXIJqL.js} +2 -2
  31. package/dist/chunks/{Onboarding-B8qMJaBh.js → Onboarding-BZUXID6q.js} +1 -1
  32. package/dist/chunks/{OverageCreditUpsell-DnFv5z-z.js → OverageCreditUpsell-Dhm7HBuD.js} +1 -1
  33. package/dist/chunks/{PermissionDialog-_WQPRYHQ.js → PermissionDialog-BrRBxx5o.js} +1 -1
  34. package/dist/chunks/{PluginSettings-B_xVgTTp.js → PluginSettings-BZ-PX9Tg.js} +1 -1
  35. package/dist/chunks/{PressEnterToContinue-BJ58eCFC.js → PressEnterToContinue-DtA_p3X6.js} +1 -1
  36. package/dist/chunks/{PromptInputFooterSuggestions-DhIQ0Nge.js → PromptInputFooterSuggestions-Da8Fty6P.js} +1 -1
  37. package/dist/chunks/{PromptInputHelpMenu-CoMkWchC.js → PromptInputHelpMenu-Bz7EPzzq.js} +1 -1
  38. package/dist/chunks/{QueryEngine-C7r7O-hH.js → QueryEngine-CmJK27jU.js} +1 -1
  39. package/dist/chunks/REPL-BBmn_itf.js +1 -0
  40. package/dist/chunks/{REPL-CmJdJrGO.js → REPL-DxEJZpIp.js} +6 -6
  41. package/dist/chunks/{RemoteCallout-4JOZROfT.js → RemoteCallout-DONJj8l2.js} +1 -1
  42. package/dist/chunks/RemoteSessionManager-BvvNspY8.js +2 -0
  43. package/dist/chunks/{ResumeConversation-CZ2Uedkf.js → ResumeConversation-EpjJdFHu.js} +1 -1
  44. package/dist/chunks/{SSETransport-kEH_p4Yq.js → SSETransport-D51Jfdaj.js} +1 -1
  45. package/dist/chunks/SearchBox-CciJ8giD.js +1 -0
  46. package/dist/chunks/SearchExtraToolsTool-kjVFsFkT.js +1 -0
  47. package/dist/chunks/SentryErrorBoundary-DsrmgmKF.js +1 -0
  48. package/dist/chunks/{SentryErrorBoundary-97iY7Nb7.js → SentryErrorBoundary-nYTimi4l.js} +1 -1
  49. package/dist/chunks/{Settings-CuljH0mu.js → Settings-C2vEJjLx.js} +2 -2
  50. package/dist/chunks/{TeleportProgress-Ctdqi7iS.js → TeleportProgress--jgrqIfW.js} +1 -1
  51. package/dist/chunks/{TeleportRepoMismatchDialog-DyTBg1YD.js → TeleportRepoMismatchDialog-BKDaFT_L.js} +1 -1
  52. package/dist/chunks/{TeleportResumeWrapper-B66clYsG.js → TeleportResumeWrapper-CxlpiHIz.js} +1 -1
  53. package/dist/chunks/{ThemePicker-WKmYvrqz.js → ThemePicker-CYL4C-F-.js} +1 -1
  54. package/dist/chunks/{TmuxBackend-OKX2NP14.js → TmuxBackend-C_N4ww8i.js} +1 -1
  55. package/dist/chunks/{TrustDialog-0anSIf-G.js → TrustDialog-CYdftZ1M.js} +1 -1
  56. package/dist/chunks/{ValidationErrorsList-CfgC1KJb.js → ValidationErrorsList-CaTwOP3f.js} +1 -1
  57. package/dist/chunks/{WelcomeV2-BMHXiNt3.js → WelcomeV2-5rgKm4Mz.js} +1 -1
  58. package/dist/chunks/{WindowsTerminalBackend-fCSGVe4W.js → WindowsTerminalBackend-BzoSs0VA.js} +1 -1
  59. package/dist/chunks/{add-dir-CMtuW667.js → add-dir-RNzFR3XZ.js} +1 -1
  60. package/dist/chunks/{agentDisplay-CgYKW3G7.js → agentDisplay-DgeOQY1E.js} +1 -1
  61. package/dist/chunks/{agents-CdqcGm9o.js → agents-D7cgzb3f.js} +1 -1
  62. package/dist/chunks/{agents-D90TsYOf.js → agents-iMtFurok.js} +1 -1
  63. package/dist/chunks/{ant-DZjimiuz.js → ant-CF1iRpXD.js} +1 -1
  64. package/dist/chunks/{api-CQWbpxLP.js → api-DMbWqJlK.js} +1 -1
  65. package/dist/chunks/api-DkgaFAzq.js +1 -0
  66. package/dist/chunks/artifacts-D2kY_AMp.js +1 -0
  67. package/dist/chunks/{assistant-CyVcFPIR.js → assistant-CZ4VXgzH.js} +1 -1
  68. package/dist/chunks/assistant-CiNV3Q0f.js +1 -0
  69. package/dist/chunks/{assistant-CEmC_DlU.js → assistant-JAqAZqaE.js} +1 -1
  70. package/dist/chunks/{auth-DsQEVs9W.js → auth-BemPA3ot.js} +1 -1
  71. package/dist/chunks/auth-CbQCc9vz.js +1 -0
  72. package/dist/chunks/{autoMode-DEbM9UaE.js → autoMode-CGovMAzJ.js} +1 -1
  73. package/dist/chunks/{autonomy-Clap6Swl.js → autonomy-BVXyNEj0.js} +1 -1
  74. package/dist/chunks/{autonomy-lNpGnyiu.js → autonomy-BnAHLZWH.js} +1 -1
  75. package/dist/chunks/{autonomyPanel-BqEvfI0e.js → autonomyPanel-COMI2iR0.js} +1 -1
  76. package/dist/chunks/{backgroundHousekeeping-KvOpP_4M.js → backgroundHousekeeping-BRtG20l2.js} +2 -2
  77. package/dist/chunks/backgroundHousekeeping-LYpOamcN.js +1 -0
  78. package/dist/chunks/{banner-D9Cq292T.js → banner-D_rqe2XQ.js} +1 -1
  79. package/dist/chunks/{branch-CSYB04xC.js → branch-BnKwIQtC.js} +1 -1
  80. package/dist/chunks/{break-cache-DrIa8RdW.js → break-cache-CDzQDHwY.js} +1 -1
  81. package/dist/chunks/{bridge-DDgASypO.js → bridge-ChVjEHVq.js} +2 -2
  82. package/dist/chunks/bridgeConfig-Budgp2Go.js +1 -0
  83. package/dist/chunks/{bridgeConfig-DjC4oig1.js → bridgeConfig-e0MGfed6.js} +1 -1
  84. package/dist/chunks/{bridgeEnabled-Csn6Ym3k.js → bridgeEnabled-DR-v8AXw.js} +1 -1
  85. package/dist/chunks/bridgeEnabled-DmvmwuUY.js +1 -0
  86. package/dist/chunks/bridgeMain-KYR5iq6H.js +1 -0
  87. package/dist/chunks/{bridgeMain-B5wsmwkN.js → bridgeMain-OsR-_PRp.js} +6 -6
  88. package/dist/chunks/{bridgeMessaging-ChOzzVWj.js → bridgeMessaging-BvBnxgD4.js} +1 -1
  89. package/dist/chunks/{btw-BgjcOoeo.js → btw-_b16RGoh.js} +1 -1
  90. package/dist/chunks/{buddy-C1wE3noR.js → buddy-DJ3QSQyd.js} +1 -1
  91. package/dist/chunks/{bypassPermissionsKillswitch-C0diGLRB.js → bypassPermissionsKillswitch-OhGSWZrB.js} +1 -1
  92. package/dist/chunks/{caches-CIoVGP24.js → caches-Bp4F7tZ5.js} +2 -2
  93. package/dist/chunks/caches-CkH9F-Fd.js +1 -0
  94. package/dist/chunks/{ccrClient-C1msT1E3.js → ccrClient-D7pEGzQa.js} +1 -1
  95. package/dist/chunks/changeDetector-IFbty4jj.js +1 -0
  96. package/dist/chunks/{channelNotification-CWlu9ZWs.js → channelNotification-BZFMAWln.js} +1 -1
  97. package/dist/chunks/channelNotification-CIyWY0hs.js +1 -0
  98. package/dist/chunks/{chrome-Bo9uNZ7s.js → chrome-B5IxDA16.js} +1 -1
  99. package/dist/chunks/clear-BVjSQsUL.js +1 -0
  100. package/dist/chunks/client-BUUsZdSe.js +1 -0
  101. package/dist/chunks/{color-CkzktPHt.js → color-BYVWpzI8.js} +1 -1
  102. package/dist/chunks/commands-pTQdOvN6.js +1 -0
  103. package/dist/chunks/{commitAttribution-csu3NO7Y.js → commitAttribution-ClSlXMPG.js} +1 -1
  104. package/dist/chunks/commitAttribution-QPrKt_BF.js +1 -0
  105. package/dist/chunks/{compact-DNGIVZRN.js → compact-B9c12JXf.js} +1 -1
  106. package/dist/chunks/{companion-Diuav3lA.js → companion-C8e7dVlu.js} +1 -1
  107. package/dist/chunks/completionCache-BB7-y2BX.js +1 -0
  108. package/dist/chunks/{completionCache-C7hDqIDL.js → completionCache-Br6OwASx.js} +1 -1
  109. package/dist/chunks/{config-ODoYZY8i.js → config-Bxgfx_nO.js} +1 -1
  110. package/dist/chunks/{config-B25IrkTA.js → config-C-yz-f4W.js} +1 -1
  111. package/dist/chunks/{context-CZ5enuPE.js → context-Bf5t6C-a.js} +1 -1
  112. package/dist/chunks/{context-noninteractive-62P5EnN5.js → context-noninteractive-CJu7hZCM.js} +1 -1
  113. package/dist/chunks/context-noninteractive-OUTZ6BKj.js +1 -0
  114. package/dist/chunks/{conversation-DyhWeHw2.js → conversation-BYMS5Hqa.js} +1 -1
  115. package/dist/chunks/conversation-Bs8l0KNl.js +1 -0
  116. package/dist/chunks/{copy-9JLr2-Xs.js → copy-C0BZ7Gm0.js} +1 -1
  117. package/dist/chunks/{createSSHSession-B1hTuDpB.js → createSSHSession-DNXCWneI.js} +1 -1
  118. package/dist/chunks/{createSession-fzjzy0aS.js → createSession-DjM6Ev45.js} +1 -1
  119. package/dist/chunks/createSession-DpqtD4ML.js +1 -0
  120. package/dist/chunks/{cronJitterConfig-9OmmYmIT.js → cronJitterConfig-CaFkPXKB.js} +1 -1
  121. package/dist/chunks/{crossProjectResume-B6efoIur.js → crossProjectResume-BCr6jfGz.js} +1 -1
  122. package/dist/chunks/{daemon-BRKR4D1D.js → daemon-Bu0Uy-qG.js} +1 -1
  123. package/dist/chunks/{datadog-SSxsxcC-.js → datadog-ClZjR-jM.js} +1 -1
  124. package/dist/chunks/datadog-DlzPb5oG.js +1 -0
  125. package/dist/chunks/desktop-WH8s-9-6.js +1 -0
  126. package/dist/chunks/{diff-uAwKYa51.js → diff-D9hjPq4W.js} +1 -1
  127. package/dist/chunks/{doctor-CBF0fkBF.js → doctor-4-im_J_h.js} +1 -1
  128. package/dist/chunks/earlyInput-DEZaWwKF.js +1 -0
  129. package/dist/chunks/{effort-F-bhAM2u.js → effort-Bz-9GIpe.js} +1 -1
  130. package/dist/chunks/entry-CEBaLwEG.js +14 -0
  131. package/dist/chunks/{envLessBridgeConfig-Dg0hNsdi.js → envLessBridgeConfig-DW4-nPbZ.js} +1 -1
  132. package/dist/chunks/envLessBridgeConfig-izoVnE8s.js +1 -0
  133. package/dist/chunks/{exit-CqcvZJwI.js → exit-DBNDTR4b.js} +1 -1
  134. package/dist/chunks/{export-c6WoGlsG.js → export-CQHUM_Nv.js} +1 -1
  135. package/dist/chunks/{exportRenderer-CaegIP5N.js → exportRenderer-CuIDQBLH.js} +1 -1
  136. package/dist/chunks/{extra-usage-Cj8fokgc.js → extra-usage-DTr6gExD.js} +1 -1
  137. package/dist/chunks/extra-usage-VSASGlte.js +1 -0
  138. package/dist/chunks/{extra-usage-core-sHzc4eE1.js → extra-usage-core-D3CwYO_8.js} +1 -1
  139. package/dist/chunks/{extra-usage-noninteractive-D0kqrqsg.js → extra-usage-noninteractive-d-QVg1D5.js} +1 -1
  140. package/dist/chunks/{extraUsage-CbkqfG1U.js → extraUsage-BNRQOkgU.js} +1 -1
  141. package/dist/chunks/extractMemories-hQlhiVOD.js +1 -0
  142. package/dist/chunks/fast-2gWrhEFZ.js +1 -0
  143. package/dist/chunks/{fast-DS3iQ1CH.js → fast-bkGXbuHX.js} +1 -1
  144. package/dist/chunks/{feedback-QJynmG5q.js → feedback-BvFgE_FF.js} +1 -1
  145. package/dist/chunks/{firstPartyEventLogger-DlW8BUXq.js → firstPartyEventLogger-D-ifHvWu.js} +1 -1
  146. package/dist/chunks/{flushGate-CK5B9-Zn.js → flushGate-BA24vFBg.js} +1 -1
  147. package/dist/chunks/{fpsMetrics-DKWp7vng.js → fpsMetrics-CBFlAGTS.js} +1 -1
  148. package/dist/chunks/{gates-vlrMjO-X.js → gates-C66Nz9b2.js} +1 -1
  149. package/dist/chunks/gates-dO6m4Hdp.js +1 -0
  150. package/dist/chunks/{gemini-B5ZRjDrh.js → gemini-DuQl4hTA.js} +1 -1
  151. package/dist/chunks/{generateRecap-SgRMdsyN.js → generateRecap-CwBU76xi.js} +1 -1
  152. package/dist/chunks/{generateSessionName-sZFzpwsq.js → generateSessionName-LnmjE9jh.js} +1 -1
  153. package/dist/chunks/{githubRepoPathMapping-DUGvTwPB.js → githubRepoPathMapping-DrreQj47.js} +1 -1
  154. package/dist/chunks/{goal-Dy-GGn9r.js → goal-BIvjF6B7.js} +1 -1
  155. package/dist/chunks/{grok-BG4_buNt.js → grok-KNLYSRBQ.js} +1 -1
  156. package/dist/chunks/{growthbook-Br1dDRtd.js → growthbook-ksjGAskq.js} +1 -1
  157. package/dist/chunks/{heapdump-B9PVKMxa.js → heapdump-Cz8vkcOr.js} +1 -1
  158. package/dist/chunks/{help-BfWF7xij.js → help-Cx9OordP.js} +1 -1
  159. package/dist/chunks/{hooks-KK32pxq3.js → hooks-BW-d9Bdu.js} +1 -1
  160. package/dist/chunks/hooks-BWoN0nQP.js +1 -0
  161. package/dist/chunks/{hostAdapter-TBJav3vX.js → hostAdapter-DLmaB6eN.js} +1 -1
  162. package/dist/chunks/{ide-BU1A79BE.js → ide-CECrIg1r.js} +1 -1
  163. package/dist/chunks/{inboundAttachments-D4tBPCB8.js → inboundAttachments-B0sGIu79.js} +1 -1
  164. package/dist/chunks/inboundAttachments-D8vq1NQO.js +1 -0
  165. package/dist/chunks/{initReplBridge-99sUBVEk.js → initReplBridge-BAEMZEcg.js} +1 -1
  166. package/dist/chunks/{insights-lDHodCMG.js → insights-DeWggLxC.js} +1 -1
  167. package/dist/chunks/{install-github-app-RLbUq5EL.js → install-github-app-DqKEiHQ1.js} +1 -1
  168. package/dist/chunks/{install-Bg4ZgW81.js → install-pxH_HR1p.js} +1 -1
  169. package/dist/chunks/{install-slack-app-CHmIwsbm.js → install-slack-app-P1L9x-YI.js} +1 -1
  170. package/dist/chunks/{instrumentation-BCiV3SKX.js → instrumentation-Dx0s2jzr.js} +3 -3
  171. package/dist/chunks/{job-xOGf0j5Q.js → job-CbxxkPgE.js} +1 -1
  172. package/dist/chunks/{keybindings-DMbReZ4p.js → keybindings-BBPC7FAc.js} +1 -1
  173. package/dist/chunks/{lang-A6LUGP_7.js → lang-CKp0Tn76.js} +1 -1
  174. package/dist/chunks/language-CSDpzbTz.js +1 -0
  175. package/dist/chunks/{language-CGfURU2y.js → language-iERMuOEu.js} +1 -1
  176. package/dist/chunks/{launchAgentsPlatform-Dbpm7Jyo.js → launchAgentsPlatform-DQvKVtl2.js} +1 -1
  177. package/dist/chunks/{launchAutofixPr-RZfqx5eM.js → launchAutofixPr-B7hu9C8h.js} +1 -1
  178. package/dist/chunks/{launchCommand-9eYsPG7W.js → launchCommand-CJsikSlW.js} +1 -1
  179. package/dist/chunks/{launchLocalMemory-DIntbsvg.js → launchLocalMemory-Cpz7L5j5.js} +1 -1
  180. package/dist/chunks/{launchLocalVault-CCUw0ayu.js → launchLocalVault-XLfOQtP7.js} +1 -1
  181. package/dist/chunks/{launchMemoryStores-QJTh8KSP.js → launchMemoryStores-Cz04PaDE.js} +1 -1
  182. package/dist/chunks/{launchOnboarding--Pe30AYd.js → launchOnboarding-XPbUNdHS.js} +1 -1
  183. package/dist/chunks/{launchSchedule-DjN1RbRX.js → launchSchedule-B1VEe3o-.js} +1 -1
  184. package/dist/chunks/{launchSkillStore-CcKmVDz1.js → launchSkillStore-Cy59z5xx.js} +1 -1
  185. package/dist/chunks/{launchTeleport-BKlEo0yF.js → launchTeleport-ZPM_DvzK.js} +1 -1
  186. package/dist/chunks/{launchVault-C7UHA-IG.js → launchVault-BhnTOZq8.js} +1 -1
  187. package/dist/chunks/loadAgentsDir-B-4D2dVE.js +1 -0
  188. package/dist/chunks/{loadAgentsDir-ClTeo0nk.js → loadAgentsDir-CQF8qhne.js} +751 -751
  189. package/dist/chunks/{loadPluginHooks-DVZmzYLl.js → loadPluginHooks-TyULD8KH.js} +1 -1
  190. package/dist/chunks/{localSearch-Koc8naSr.js → localSearch-BNYypHsK.js} +1 -1
  191. package/dist/chunks/localSearch-DsFH9yls.js +1 -0
  192. package/dist/chunks/login-CEJEl2mW.js +1 -0
  193. package/dist/chunks/{login-C3MZQTDL.js → login-CxbcJk9_.js} +1 -1
  194. package/dist/chunks/{logoV2Utils-DAIIwt5R.js → logoV2Utils-Br_w1z39.js} +1 -1
  195. package/dist/chunks/logout-BXr4jzNY.js +1 -0
  196. package/dist/chunks/{magicDocs-C_inI3JJ.js → magicDocs-DnxdS9yV.js} +1 -1
  197. package/dist/chunks/{main-qqcmncHA.js → main-FBmdv32j.js} +139 -60
  198. package/dist/chunks/{mappers-7BSMbYvH.js → mappers-BNI_df3v.js} +1 -1
  199. package/dist/chunks/{mcp-DV8Prhgi.js → mcp-BhAGhDQE.js} +1 -1
  200. package/dist/chunks/{mcp-DRBiobrN.js → mcp-DbqUZ1Cf.js} +1 -1
  201. package/dist/chunks/{mcp-HQ8-nEZ1.js → mcp-esqdO_lV.js} +3 -3
  202. package/dist/chunks/{mcpServer-DS0yRfcu.js → mcpServer-Ct-GVL-y.js} +1 -1
  203. package/dist/chunks/{mcpServer-CLIYAgGs.js → mcpServer-DeL2ADSF.js} +1 -1
  204. package/dist/chunks/{memory-Cz_JaFLF.js → memory-DwapBEsD.js} +1 -1
  205. package/dist/chunks/{mobile-BMglW1NB.js → mobile-D7MSmMhc.js} +1 -1
  206. package/dist/chunks/{modalContext-c5Yqx_CQ.js → modalContext-DxfeT_3m.js} +1 -1
  207. package/dist/chunks/{mode-Kx0kSZkr.js → mode-B5cmHCvz.js} +1 -1
  208. package/dist/chunks/{model-CNXtfiLg.js → model-BePO0VaC.js} +1 -1
  209. package/dist/chunks/model-CgH43-hO.js +1 -0
  210. package/dist/chunks/{onChangeAppState-C4ic-Mib.js → onChangeAppState-B3d5iy6T.js} +1 -1
  211. package/dist/chunks/{openai-CGGSfpPh.js → openai-fRhGOIQq.js} +1 -1
  212. package/dist/chunks/{overageCreditGrant-BqW_6R5v.js → overageCreditGrant-B6sx7IFi.js} +1 -1
  213. package/dist/chunks/{panel-D3wvAEFE.js → panel-CAVG5BOM.js} +1 -1
  214. package/dist/chunks/{panel-BYfvo_mR.js → panel-DU8y_jcf.js} +1 -1
  215. package/dist/chunks/{panelCall-DgPjuhQf.js → panelCall-DUQdjDee.js} +1 -1
  216. package/dist/chunks/{passes-sYE91Vtr.js → passes-CWPPUigp.js} +1 -1
  217. package/dist/chunks/{paths-DO4WOQtD.js → paths-4ZWdjPP4.js} +3 -3
  218. package/dist/chunks/{permissions-BPerbf1I.js → permissions-DW8CRuJp.js} +1 -1
  219. package/dist/chunks/{pipeTransport-CW9zF_UN.js → pipeTransport-CUeYRWJn.js} +1 -1
  220. package/dist/chunks/{plan-CDKBVRw6.js → plan-Cf-tHvGq.js} +1 -1
  221. package/dist/chunks/plugin-DXhCgoNC.js +1 -0
  222. package/dist/chunks/{pluginAutoupdate-BQKtcAhC.js → pluginAutoupdate-CdmKzIRf.js} +1 -1
  223. package/dist/chunks/{pluginBlocklist-B8DKXi0i.js → pluginBlocklist-C9XwbFSo.js} +1 -1
  224. package/dist/chunks/{pluginCliCommands-DWCeXYTl.js → pluginCliCommands-CmY_maYg.js} +1 -1
  225. package/dist/chunks/{pluginFlagging-DFMlWw2P.js → pluginFlagging-DyzxZolj.js} +1 -1
  226. package/dist/chunks/{pluginOperations-CKmwDC3G.js → pluginOperations-mr4I7Jw9.js} +1 -1
  227. package/dist/chunks/{pluginStartupCheck-D6IbyWKe.js → pluginStartupCheck-B6OdK29Z.js} +1 -1
  228. package/dist/chunks/pluginStartupCheck-BFuZqpnX.js +1 -0
  229. package/dist/chunks/{plugins-BwZIRMh_.js → plugins-rdPgpjF8.js} +1 -1
  230. package/dist/chunks/policyLimits-B3dtp_Fe.js +1 -0
  231. package/dist/chunks/{pollConfig-C3NjXYFc.js → pollConfig-DLbuHBse.js} +1 -1
  232. package/dist/chunks/{poor-BHhbua95.js → poor-pmz2b7zu.js} +1 -1
  233. package/dist/chunks/poorMode-BPIUnFFi.js +1 -0
  234. package/dist/chunks/{poorMode-mtlnXU-z.js → poorMode-DD-q_w6Z.js} +1 -1
  235. package/dist/chunks/{print-kxnXkqGc.js → print-luaON-Cg.js} +4 -4
  236. package/dist/chunks/{privacy-settings-DjY1annR.js → privacy-settings-BpigC4oX.js} +1 -1
  237. package/dist/chunks/{processBashCommand-BrqLqSva.js → processBashCommand-f_84bSlP.js} +1 -1
  238. package/dist/chunks/{processSlashCommand-DJGdVGbK.js → processSlashCommand-BkBqV3Jd.js} +1 -1
  239. package/dist/chunks/{projectContext-Cd7V9pES.js → projectContext-fS1t-xRh.js} +1 -1
  240. package/dist/chunks/{prompt-CfM_xGPc.js → prompt-CogZQuTN.js} +1 -1
  241. package/dist/chunks/prompt-CriAIdkT.js +1 -0
  242. package/dist/chunks/prompt-TGc_H1cL.js +1 -0
  243. package/dist/chunks/{promptEditor-FI_ewCpV.js → promptEditor-C___2FFs.js} +1 -1
  244. package/dist/chunks/{protocolHandler-B7ybKpgJ.js → protocolHandler-qwll5gSY.js} +1 -1
  245. package/dist/chunks/{rate-limit-options-DPJMNNou.js → rate-limit-options-nQcTipEp.js} +1 -1
  246. package/dist/chunks/{rcDebugLog-CwU_wJBE.js → rcDebugLog-DOXxIr8l.js} +1 -1
  247. package/dist/chunks/{referral-Da4mpbd3.js → referral-CMPZjf3I.js} +1 -1
  248. package/dist/chunks/{refresh-B6X4xb9r.js → refresh-CP7Dnjp4.js} +1 -1
  249. package/dist/chunks/{registerProtocol-D8fFnceq.js → registerProtocol-DCNuqdCC.js} +1 -1
  250. package/dist/chunks/{registry-y_z3pTg3.js → registry-DLqZJleQ.js} +1 -1
  251. package/dist/chunks/{release-notes--tnd4K56.js → release-notes-BsDW6T9f.js} +1 -1
  252. package/dist/chunks/{releaseNotes-BPA229-J.js → releaseNotes-Tbd018Qz.js} +2 -2
  253. package/dist/chunks/{reload-plugins-yQ7tEUVh.js → reload-plugins-iG9ZE9wF.js} +1 -1
  254. package/dist/chunks/{remote-env-CER5UxTX.js → remote-env-BFntnltf.js} +1 -1
  255. package/dist/chunks/{remoteBridgeCore-Bi31i8gt.js → remoteBridgeCore-Dpko9c-J.js} +1 -1
  256. package/dist/chunks/{remoteControlServer-oUAcWB4i.js → remoteControlServer-D3P82kVF.js} +1 -1
  257. package/dist/chunks/{rename-BTngRRZU.js → rename-Codm2nfB.js} +1 -1
  258. package/dist/chunks/{resume-DZHKfBmm.js → resume-BB1ceL_x.js} +1 -1
  259. package/dist/chunks/{runtimeObserver-B4KekIF0.js → runtimeObserver-BpRn0RiL.js} +1 -1
  260. package/dist/chunks/{runtimeObserver-BUOcYxiK.js → runtimeObserver-D6aF77Dq.js} +2 -2
  261. package/dist/chunks/sandbox-adapter-DrHD1mch.js +1 -0
  262. package/dist/chunks/{sandbox-toggle-DLBL7myN.js → sandbox-toggle-DZ-8qXDS.js} +1 -1
  263. package/dist/chunks/searchExtraTools-Dwg6ZafS.js +1 -0
  264. package/dist/chunks/{sentry-B7ZBc8fA.js → sentry-CVdHlmNQ.js} +1 -1
  265. package/dist/chunks/{session-DWYQk9YN.js → session-B4j1ViVc.js} +1 -1
  266. package/dist/chunks/{sessionDiscovery-BP0nv36F.js → sessionDiscovery-DkIIFsWX.js} +1 -1
  267. package/dist/chunks/sessionFileAccessHooks-n7HcOfZ7.js +1 -0
  268. package/dist/chunks/{sessionMemory-pT4lc1C-.js → sessionMemory-CnT3-Mj7.js} +1 -1
  269. package/dist/chunks/sessionMemory-DVq43VXP.js +1 -0
  270. package/dist/chunks/sessionMemoryUtils-BjkdLRvh.js +1 -0
  271. package/dist/chunks/sessionObserver-CrfmnMzL.js +1 -0
  272. package/dist/chunks/{sessionObserver-D4SV0Ar3.js → sessionObserver-gjdJ91cv.js} +1 -1
  273. package/dist/chunks/sessionStorage-BTbr9wkZ.js +1 -0
  274. package/dist/chunks/{sessionTitle-CkrnWEW1.js → sessionTitle-CSU5-VK9.js} +1 -1
  275. package/dist/chunks/{sessionTracing-Caw-kvQr.js → sessionTracing-BDN64fWh.js} +1 -1
  276. package/dist/chunks/{settingsSync-Dn_lGonC.js → settingsSync-Nixbcaox.js} +1 -1
  277. package/dist/chunks/{setup-Dihjl7jo.js → setup-9nXlu56r.js} +1 -1
  278. package/dist/chunks/{setup-II1titXI.js → setup-CZxLEcQh.js} +1 -1
  279. package/dist/chunks/{setup-DGkOT4DX.js → setup-n3Ixr_gs.js} +3 -2
  280. package/dist/chunks/{shadowedRuleDetection-DASW3j9H.js → shadowedRuleDetection-CCS7R7F1.js} +1 -1
  281. package/dist/chunks/{sideQuestion-C1qbLTAL.js → sideQuestion-MzExGTvn.js} +1 -1
  282. package/dist/chunks/{sink-CqOAfFlL.js → sink-BL75jACh.js} +1 -1
  283. package/dist/chunks/sink-CoUVbLFs.js +1 -0
  284. package/dist/chunks/{sinks-BT_lBY6T.js → sinks-C-gxj_Eu.js} +2 -2
  285. package/dist/chunks/sinks-wuo1yQ_m.js +1 -0
  286. package/dist/chunks/{skill-learning-kh0HKn6u.js → skill-learning-B9Msm4jG.js} +1 -1
  287. package/dist/chunks/{skillChangeDetector-DQuNepIV.js → skillChangeDetector-DlWPJTny.js} +1 -1
  288. package/dist/chunks/{skillGapStore-CFmLJlYm.js → skillGapStore-Cpmbwyo3.js} +1 -1
  289. package/dist/chunks/{skillGapStore-B1gUQXhE.js → skillGapStore-CsADiV5a.js} +2 -2
  290. package/dist/chunks/{skillGenerator-DIAwRpPg.js → skillGenerator-_khb-Gmc.js} +2 -2
  291. package/dist/chunks/skillLearning-CFnZiM5J.js +1 -0
  292. package/dist/chunks/skillLearning-D6mvGN90.js +1 -0
  293. package/dist/chunks/{skillPanel-B9zJLHKV.js → skillPanel-DQmj3Yh1.js} +3 -3
  294. package/dist/chunks/{skillSearchPanel-C1O9sxYS.js → skillSearchPanel-6w_zzoI3.js} +2 -2
  295. package/dist/chunks/{skills-C6_3snFY.js → skills-B3LN9tp9.js} +1 -1
  296. package/dist/chunks/{sprites-59l7vF4l.js → sprites-8JVWnXzp.js} +1 -1
  297. package/dist/chunks/{src-poaoYkuc.js → src-BJM0zMNO.js} +1 -1
  298. package/dist/chunks/{src-Di342QoJ.js → src-KjMLauwe.js} +1 -1
  299. package/dist/chunks/startupProfiler-BmnoJtfF.js +1 -0
  300. package/dist/chunks/{startupProfiler-CAntGAbs.js → startupProfiler-rCtNuhXz.js} +1 -1
  301. package/dist/chunks/{staticRender-C5v46np_.js → staticRender-DboURbK0.js} +1 -1
  302. package/dist/chunks/{stats-BmGdg4nj.js → stats-BDlygx5X.js} +1 -1
  303. package/dist/chunks/status-DlT1tUmc.js +1 -0
  304. package/dist/chunks/{statusNoticeHelpers-DuqyBY-N.js → statusNoticeHelpers-Cd_LDPvn.js} +1 -1
  305. package/dist/chunks/{tag-0vahEnrx.js → tag-BLPgXlQZ.js} +1 -1
  306. package/dist/chunks/tasks-Bf1Nf3WX.js +1 -0
  307. package/dist/chunks/{teamHelpers-CXAmvFco.js → teamHelpers-B-poMJeE.js} +1 -1
  308. package/dist/chunks/teamHelpers-DeQCfdgu.js +1 -0
  309. package/dist/chunks/{teammateModeSnapshot-CdiglTzv.js → teammateModeSnapshot-B1_3D1CQ.js} +1 -1
  310. package/dist/chunks/teammateModeSnapshot-BRuKcJNr.js +1 -0
  311. package/dist/chunks/{teleport-D6PvdjPy.js → teleport-CSo3PT05.js} +1 -1
  312. package/dist/chunks/{templateJobs-Ox5ZTKjW.js → templateJobs-BVebX2BK.js} +1 -1
  313. package/dist/chunks/{terminalSetup-hLCi-2uB.js → terminalSetup-DHWL0gnz.js} +1 -1
  314. package/dist/chunks/{terminalSetup-Dh70ynBX.js → terminalSetup-DZTEKKne.js} +1 -1
  315. package/dist/chunks/{theme-DxgUVq9C.js → theme-BHQSNwSe.js} +1 -1
  316. package/dist/chunks/thinkback-CVYpxAyO.js +1 -0
  317. package/dist/chunks/{thinkback-DWgU7Qhr.js → thinkback-DOzxcgMy.js} +1 -1
  318. package/dist/chunks/{thinkback-play-CDzY6Ux4.js → thinkback-play-CK1C_F7G.js} +1 -1
  319. package/dist/chunks/{toolEventObserver-jO6-mlFU.js → toolEventObserver-BIjUIh4k.js} +1 -1
  320. package/dist/chunks/{toolEventObserver-DPoMAJwr.js → toolEventObserver-XPorjjtG.js} +1 -1
  321. package/dist/chunks/toolPool-CDEeuQd2.js +1 -0
  322. package/dist/chunks/{toolPool-Dgn1Clq8.js → toolPool-hQlvQn-j.js} +1 -1
  323. package/dist/chunks/{trustedDevice-CYR5AgSB.js → trustedDevice-CyfQd_GU.js} +1 -1
  324. package/dist/chunks/{trustedDevice-D35gYkBT.js → trustedDevice-D-L5uAor.js} +1 -1
  325. package/dist/chunks/{tui-DoOiz2RW.js → tui-C7aBeORE.js} +1 -1
  326. package/dist/chunks/{ultrareviewCommand-o4GjzoXK.js → ultrareviewCommand-rnMsUWTn.js} +1 -1
  327. package/dist/chunks/undercover-BviGW-bQ.js +1 -0
  328. package/dist/chunks/{undercover-B4xr62Ux.js → undercover-ClLYK52H.js} +1 -1
  329. package/dist/chunks/{updateCCB-Cthn50OV.js → updateCCB-pqkACWbs.js} +1 -1
  330. package/dist/chunks/upgrade-DAuhXFVI.js +1 -0
  331. package/dist/chunks/{upgrade-D4Id4ebd.js → upgrade-DpfZlPyC.js} +1 -1
  332. package/dist/chunks/{upload-BFDXvdfb.js → upload-D98tqZnO.js} +1 -1
  333. package/dist/chunks/{usage-Csbso5mD.js → usage-BWd5R6DU.js} +1 -1
  334. package/dist/chunks/{usage-DxudeFLL.js → usage-CRquq5_O.js} +1 -1
  335. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-BHi41Ku_.js → useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js} +1 -1
  336. package/dist/chunks/useKeybinding-DOjEx42R.js +1 -0
  337. package/dist/chunks/useMainLoopModel-BZoZdEdj.js +1 -0
  338. package/dist/chunks/{useManagePlugins-BmS3Adja.js → useManagePlugins-DMY74XAk.js} +1 -1
  339. package/dist/chunks/{useMergedTools-wR6Bglqq.js → useMergedTools-NN58Kguw.js} +1 -1
  340. package/dist/chunks/{useSearchInput-BhKAGgEN.js → useSearchInput-CodP_5SB.js} +1 -1
  341. package/dist/chunks/{useSettingsErrors-CjK3P-Ki.js → useSettingsErrors-BRxaYl6B.js} +1 -1
  342. package/dist/chunks/useTerminalSize-mqo2Swmk.js +1 -0
  343. package/dist/chunks/{useVoice-DP1hHBWA.js → useVoice-ByU-q_w4.js} +1 -1
  344. package/dist/chunks/{util-CMSErQoz.js → util-SpgBY5_I.js} +1 -1
  345. package/dist/chunks/utils-CM5oEyAY.js +1 -0
  346. package/dist/chunks/{validatePlugin-_g0AqWZG.js → validatePlugin-CxCXNV8o.js} +1 -1
  347. package/dist/chunks/{vim-8y-2Q09k.js → vim-ByXlYzf9.js} +1 -1
  348. package/dist/chunks/{voice-BJAsr0K-.js → voice-BnLS_SdQ.js} +1 -1
  349. package/dist/chunks/voiceModeEnabled-B3njLfhA.js +1 -0
  350. package/dist/chunks/{voiceModeEnabled-BD9GZhQ3.js → voiceModeEnabled-D070o6QK.js} +1 -1
  351. package/dist/chunks/voiceStreamSTT-BkeyhhFJ.js +1 -0
  352. package/dist/chunks/{voiceStreamSTT-B1T-8adN.js → voiceStreamSTT-vkQ-Aop7.js} +1 -1
  353. package/dist/chunks/{web-tools-DVIvcP41.js → web-tools-1yM0ZBfA.js} +1 -1
  354. package/dist/chunks/{workerRegistry-60_UCyc3.js → workerRegistry-7xGv_sNB.js} +1 -1
  355. package/dist/chunks/worktree-UA9gKCwL.js +1 -0
  356. package/dist/chunks/{xml-CTdKuU6f.js → xml-BUaEXGXx.js} +1 -1
  357. package/dist/cli.js +1 -1
  358. package/package.json +1 -1
  359. package/dist/chunks/ApproveApiKey-B7_TCGwt.js +0 -1
  360. package/dist/chunks/ClaudeMdExternalIncludesDialog-DxJK9NiM.js +0 -1
  361. package/dist/chunks/ConsoleOAuthFlow-LPZ97jsm.js +0 -1
  362. package/dist/chunks/Dialog-91X6ZGg9.js +0 -1
  363. package/dist/chunks/Doctor-hgf3dMAW.js +0 -1
  364. package/dist/chunks/Grove-Bwmghb-e.js +0 -1
  365. package/dist/chunks/ListItem-DCQhApdJ.js +0 -1
  366. package/dist/chunks/REPL-nP7H_-qa.js +0 -1
  367. package/dist/chunks/RemoteSessionManager-jcPnywfY.js +0 -2
  368. package/dist/chunks/SearchBox-CkO4rQ-9.js +0 -1
  369. package/dist/chunks/SearchExtraToolsTool-C64oVFUD.js +0 -1
  370. package/dist/chunks/SentryErrorBoundary-2E2qGV11.js +0 -1
  371. package/dist/chunks/api-quOYYOhi.js +0 -1
  372. package/dist/chunks/assistant-B5_xx00q.js +0 -1
  373. package/dist/chunks/auth-CjtaiRtF.js +0 -1
  374. package/dist/chunks/backgroundHousekeeping-D-jt-ocx.js +0 -1
  375. package/dist/chunks/bridgeConfig-BdZVEqhx.js +0 -1
  376. package/dist/chunks/bridgeEnabled-DLRIH243.js +0 -1
  377. package/dist/chunks/bridgeMain-BN0Sag35.js +0 -1
  378. package/dist/chunks/caches-DMYdTEAr.js +0 -1
  379. package/dist/chunks/changeDetector-DoOBZOt1.js +0 -1
  380. package/dist/chunks/channelNotification-oZ6vG5R5.js +0 -1
  381. package/dist/chunks/clear-BxdX_MUP.js +0 -1
  382. package/dist/chunks/client-BSoJ_vaA.js +0 -1
  383. package/dist/chunks/commands-hyVX9-Lh.js +0 -1
  384. package/dist/chunks/commitAttribution-BwT0TbYF.js +0 -1
  385. package/dist/chunks/completionCache-BQgiR45Q.js +0 -1
  386. package/dist/chunks/context-noninteractive-CjuzL9q5.js +0 -1
  387. package/dist/chunks/conversation-uY-V0SNK.js +0 -1
  388. package/dist/chunks/createSession-Qurw-N4x.js +0 -1
  389. package/dist/chunks/datadog-C-llbwzP.js +0 -1
  390. package/dist/chunks/desktop-CQnMcbex.js +0 -1
  391. package/dist/chunks/earlyInput-D3OhUZ4G.js +0 -1
  392. package/dist/chunks/entry-DHN_Gr1b.js +0 -14
  393. package/dist/chunks/envLessBridgeConfig-CDVtIEWT.js +0 -1
  394. package/dist/chunks/extra-usage-Dk-wcvAu.js +0 -1
  395. package/dist/chunks/extractMemories-BP8Opsbp.js +0 -1
  396. package/dist/chunks/fast-DklfqySb.js +0 -1
  397. package/dist/chunks/gates-6amRNsYl.js +0 -1
  398. package/dist/chunks/hooks-BVrhxysz.js +0 -1
  399. package/dist/chunks/inboundAttachments-DWJplT9p.js +0 -1
  400. package/dist/chunks/language-Bzp5KDCE.js +0 -1
  401. package/dist/chunks/loadAgentsDir-CshktEpX.js +0 -1
  402. package/dist/chunks/localSearch-BtLNJRij.js +0 -1
  403. package/dist/chunks/login-BngE89_j.js +0 -1
  404. package/dist/chunks/logout-CXZBaUen.js +0 -1
  405. package/dist/chunks/model-Bwvn_acH.js +0 -1
  406. package/dist/chunks/plugin-C6US4b8W.js +0 -1
  407. package/dist/chunks/pluginStartupCheck-cYnLsWOs.js +0 -1
  408. package/dist/chunks/policyLimits-CFLBtFh3.js +0 -1
  409. package/dist/chunks/poorMode-CCK7Ek5w.js +0 -1
  410. package/dist/chunks/prompt-BZjXpviP.js +0 -1
  411. package/dist/chunks/prompt-CusKF4-p.js +0 -1
  412. package/dist/chunks/sandbox-adapter-C--j-c76.js +0 -1
  413. package/dist/chunks/searchExtraTools-CBYp5XeI.js +0 -1
  414. package/dist/chunks/sessionFileAccessHooks-DVilA3Mm.js +0 -1
  415. package/dist/chunks/sessionMemory-cMgcTxtP.js +0 -1
  416. package/dist/chunks/sessionMemoryUtils-BgYf2OvX.js +0 -1
  417. package/dist/chunks/sessionObserver-CzyEF7mg.js +0 -1
  418. package/dist/chunks/sessionStorage-CXBgVAx-.js +0 -1
  419. package/dist/chunks/sink-BSPyC453.js +0 -1
  420. package/dist/chunks/sinks-CpuRIC3H.js +0 -1
  421. package/dist/chunks/skillLearning-Bxu1Uzl-.js +0 -1
  422. package/dist/chunks/skillLearning-CxAbHYEk.js +0 -1
  423. package/dist/chunks/startupProfiler-WtUzkMKV.js +0 -1
  424. package/dist/chunks/status-KLPT7uYP.js +0 -1
  425. package/dist/chunks/tasks-zVPemGv7.js +0 -1
  426. package/dist/chunks/teamHelpers-B83RwCCC.js +0 -1
  427. package/dist/chunks/teammateModeSnapshot-AdUFmPGC.js +0 -1
  428. package/dist/chunks/thinkback-C5vFU8dM.js +0 -1
  429. package/dist/chunks/toolPool-BmA-BnAq.js +0 -1
  430. package/dist/chunks/undercover-nakrQDLh.js +0 -1
  431. package/dist/chunks/upgrade-DJTCV8sr.js +0 -1
  432. package/dist/chunks/useKeybinding-DPOUuymz.js +0 -1
  433. package/dist/chunks/useMainLoopModel-CEqP4HOc.js +0 -1
  434. package/dist/chunks/useTerminalSize-Du-EamDN.js +0 -1
  435. package/dist/chunks/utils-CAQfwbv8.js +0 -1
  436. package/dist/chunks/voiceModeEnabled-DZbxaFIg.js +0 -1
  437. package/dist/chunks/voiceStreamSTT-B39XaGOU.js +0 -1
  438. package/dist/chunks/worktree-DNK8NprA.js +0 -1
  439. /package/dist/chunks/{InProcessTransport-B9II3BiO.js → InProcessTransport-DW2ed2Hs.js} +0 -0
  440. /package/dist/chunks/{attributionHooks-VGSpz4mk.js → attributionHooks-COqmxGy1.js} +0 -0
  441. /package/dist/chunks/{attributionTrailer-C8uqiLIb.js → attributionTrailer-Nx8I_ZRK.js} +0 -0
  442. /package/dist/chunks/{autoModeDenials-DlO5g6E9.js → autoModeDenials-BDpcFLb7.js} +0 -0
  443. /package/dist/chunks/{bedrockClient-BUmO2U-X.js → bedrockClient-BfPpXPI0.js} +0 -0
  444. /package/dist/chunks/{ccshareResume-DKwcd0Vc.js → ccshareResume-DPP1blaU.js} +0 -0
  445. /package/dist/chunks/{chromeNativeHost-BldB1Zzi.js → chromeNativeHost-DfYuJafI.js} +0 -0
  446. /package/dist/chunks/{claudeDesktop-BqTW_pbB.js → claudeDesktop-CEQCLZmG.js} +0 -0
  447. /package/dist/chunks/{cleanup-rCLlo4w8.js → cleanup-DUVwlFl7.js} +0 -0
  448. /package/dist/chunks/{connectHeadless-ByewVfOb.js → connectHeadless-DutPm1RT.js} +0 -0
  449. /package/dist/chunks/{dangerousBackend-Dkjtndh1.js → dangerousBackend-BDKHrF6i.js} +0 -0
  450. /package/dist/chunks/{earlyInput-CFYRGxau.js → earlyInput-B3U01GAm.js} +0 -0
  451. /package/dist/chunks/{eventLoopStallDetector-bYy0fesH.js → eventLoopStallDetector-MNrFR4OH.js} +0 -0
  452. /package/dist/chunks/{files-Bdr_PQyV.js → files-BGuNpYgH.js} +0 -0
  453. /package/dist/chunks/{fuse-D3B-UE5Y.js → fuse-D7icKomM.js} +0 -0
  454. /package/dist/chunks/{instinctParser-DOtj1Kni.js → instinctParser-BMtAMLSx.js} +0 -0
  455. /package/dist/chunks/{lockfile-C3JsqLpb.js → lockfile-DEaq0BaL.js} +0 -0
  456. /package/dist/chunks/{main-CfkIGrBF.js → main-SFdnVz-G.js} +0 -0
  457. /package/dist/chunks/{observationStore-rLlDwRtG.js → observationStore-Bi1rRKcD.js} +0 -0
  458. /package/dist/chunks/{openaiShared-C-AuktRP.js → openaiShared-BkVgd2rZ.js} +0 -0
  459. /package/dist/chunks/{output-style-B64-Zum6.js → output-style-F8fBWFZo.js} +0 -0
  460. /package/dist/chunks/{parseConnectUrl-DL390ePs.js → parseConnectUrl-CVT_db9n.js} +0 -0
  461. /package/dist/chunks/{poller-BA1jhG3F.js → poller-DhLgWNxJ.js} +0 -0
  462. /package/dist/chunks/{postCommitAttribution-D8MoHFoz.js → postCommitAttribution-Br4g4R6h.js} +0 -0
  463. /package/dist/chunks/{projectContext-Dn7umMp6.js → projectContext-2Z2w8AI8.js} +0 -0
  464. /package/dist/chunks/{renderOptions-Caca3bCd.js → renderOptions-4HxIPoDZ.js} +0 -0
  465. /package/dist/chunks/{rewind-Djt1zU_3.js → rewind-FKh7loMA.js} +0 -0
  466. /package/dist/chunks/{sanitization-Ds6zRQyx.js → sanitization-B-JlvWcf.js} +0 -0
  467. /package/dist/chunks/{sdkHeapDumpMonitor-DLMMNeqo.js → sdkHeapDumpMonitor-DTHI5WbD.js} +0 -0
  468. /package/dist/chunks/{server-DONKdvGc.js → server-BsxW1FVq.js} +0 -0
  469. /package/dist/chunks/{serverBanner-DIyjgIM-.js → serverBanner-DR3GYXpH.js} +0 -0
  470. /package/dist/chunks/{serverLog-D1N5yx8A.js → serverLog-CH1fCGsD.js} +0 -0
  471. /package/dist/chunks/{sessionDataUploader-CsNePsOb.js → sessionDataUploader-BgmJTXQr.js} +0 -0
  472. /package/dist/chunks/{sessionManager-BOmgJd1l.js → sessionManager-mesT4zIQ.js} +0 -0
  473. /package/dist/chunks/{stickers-DDAm--86.js → stickers-B0P4weWp.js} +0 -0
  474. /package/dist/chunks/{udsClient-CBF_cZFW.js → udsClient-B85rNglp.js} +0 -0
  475. /package/dist/chunks/{upstreamproxy-CLf1UaJv.js → upstreamproxy-D-6vdoIJ.js} +0 -0
  476. /package/dist/chunks/{voice-YtzCcIoM.js → voice-BXg-kzte.js} +0 -0
@@ -1 +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-ClTeo0nk.js";import{fn as u}from"./prompt-CfM_xGPc.js";import{randomUUID as d}from"crypto";function f(e){return e.flatMap(e=>{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=>{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
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Tn as t,wn as n}from"./src-KjMLauwe.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-CQF8qhne.js";import{fn as u}from"./prompt-CogZQuTN.js";import{randomUUID as d}from"crypto";function f(e){return e.flatMap(e=>{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=>{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-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-ClTeo0nk.js";import{D as re,O as ie}from"./rcDebugLog-CwU_wJBE.js";import{t as ae}from"./useKeybinding-DPOUuymz.js";import{i as oe,n as se,r as ce}from"./MCPConnectionManager-y97Inszc.js";import{n as le,t as ue}from"./McpParsingWarnings-DMFUZw92.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-B_xVgTTp.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-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,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-DO4WOQtD.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-ClTeo0nk.js";import{Qn as k,Xn as A,Zn as j}from"./prompt-CfM_xGPc.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.7.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(`
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(`
2
2
  `).trim()||`Error`}]}}});async function f(){let e=new F;await l.connect(e)}return await f()}export{L as startMCPServer};
@@ -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-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-DO4WOQtD.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-ClTeo0nk.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-DGkOT4DX.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-DRBiobrN.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-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(`
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-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.
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.
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 +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-DO4WOQtD.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-ClTeo0nk.js";import{r as x,t as S}from"./datadog-SSxsxcC-.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-CqOAfFlL.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-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 +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-DO4WOQtD.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{r as l,t as u}from"./datadog-SSxsxcC-.js";import{i as d,r as f,t as p}from"./src-Cu58IYYb.js";import{i as m,t as h}from"./gates-vlrMjO-X.js";import{n as g,t as _}from"./hostAdapter-TBJav3vX.js";import{n as v,t as y}from"./stdio-Cg20AQ5W.js";import{r as b,t as x}from"./sink-CqOAfFlL.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-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 +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-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-DO4WOQtD.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-CAntGAbs.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-ClTeo0nk.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-FI_ewCpV.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-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,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-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(`
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(`
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-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
+ 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,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-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-ClTeo0nk.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-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(`
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};
@@ -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-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-DO4WOQtD.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-ClTeo0nk.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-CbkqfG1U.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-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};
@@ -0,0 +1 @@
1
+ import{Dr as e,Pr as t}from"./paths-4ZWdjPP4.js";t();export{e as getMainLoopModel};
@@ -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-DO4WOQtD.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-ClTeo0nk.js";import{d as v,m as y,p as b}from"./rcDebugLog-CwU_wJBE.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-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,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-DO4WOQtD.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-ClTeo0nk.js";import{$n as A,Qn as j,Zn as M,i as N,r as P,t as F}from"./prompt-CfM_xGPc.js";import{F as I,I as L,L as R,P as z,R as B,Y as V}from"./rcDebugLog-CwU_wJBE.js";import{n as H,t as U}from"./openaiShared-C-AuktRP.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-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(`
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-DO4WOQtD.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-CQWbpxLP.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-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 +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-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{o as l,r as u}from"./break-cache-DrIa8RdW.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-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 +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-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{n as l,t as u}from"./tui-DoOiz2RW.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-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 +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-ClTeo0nk.js";import{n as f,t as p}from"./SentryErrorBoundary-97iY7Nb7.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 w({agents:e,selectedIndex:t,focused:r}){let[a,o]=n(D),c=E[Math.floor(o/D)%E.length];return e.length===0?(0,T.jsx)(i,{color:`subtle`,children:`(no agents in this phase)`}):(0,T.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}`,O);return(0,T.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,T.jsxs)(s,{children:[(0,T.jsx)(i,{color:a.color,children:l}),(0,T.jsxs)(i,{children:[` `,u]})]}),(0,T.jsx)(i,{color:`subtle`,children:g(e)})]},e.id)})})}var T,E,D,O,k=e((()=>{r(),o(),S(),T=l(),E=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],D=120,O=18}));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=a?a.status:`pending`,s=e.agents.filter(e=>e.phase===i);r.push({title:i,status:o,done:s.filter(e=>e.status===`done`).length,total:s.length})};for(let t of e.declaredPhases)i(t);for(let t of e.phases)i(t.title);return r}function j(e,t){return t===void 0||t===`All`?e:e.filter(e=>e.phase===t)}function M(e,t){return`${e}#${t.slice(-4)}`}function N(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 P=e((()=>{}));function F({phases:e,agents:t,selectedIndex:r,focused:a}){let[o,c]=n(R),l=L[Math.floor(c/R)%L.length],u=t.length;return(0,I.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,I.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,I.jsxs)(s,{children:[(0,I.jsx)(i,{color:n?`claude`:void 0,children:o?`>`:` `}),(0,I.jsx)(i,{children:` `}),(0,I.jsx)(i,{color:u,children:c}),(0,I.jsxs)(i,{children:[` `,e.title]})]}),(0,I.jsxs)(i,{color:`subtle`,children:[e.done,`/`,e.total]})]},e.title)})})}var I,L,R,z=e((()=>{r(),o(),S(),P(),I=l(),L=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],R=120}));function B({runs:e,activeRunId:t}){return e.length===0?(0,V.jsx)(i,{color:`subtle`,children:`(no runs)`}):(0,V.jsx)(s,{children:e.map(e=>{let n=e.runId===t,r=M(e.workflowName,e.runId),a=`═`.repeat(r.length+2);return(0,V.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,V.jsxs)(s,{children:[(0,V.jsx)(i,{color:v[e.status],children:_[e.status]}),(0,V.jsx)(i,{children:` `}),(0,V.jsx)(i,{color:n?`claude`:void 0,bold:n,children:r})]}),(0,V.jsx)(i,{color:n?`claude`:void 0,children:n?a:``})]},e.runId)})})}var V,H=e((()=>{r(),o(),S(),P(),V=l()}));function U(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 W(e,t=`normal`){c((n,r)=>{let i=U(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 G=e((()=>{o()}));function K(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 q(e,t){return!e||!t||e.runId!==t.runId||e.status!==`running`?!1:t.status===`completed`||t.status===`failed`||t.status===`killed`}function J({onDone:e,context:t}){let r=u(),o=(0,Y.useSyncExternalStore)(r.subscribe,()=>r.listRuns(),()=>[]),[c,l]=(0,Y.useState)(null),[d,f]=(0,Y.useState)(`phases`),[p,m]=(0,Y.useState)(0),[h,g]=(0,Y.useState)(0),[_,b]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{r.loadPersistedRuns()},[r]),(0,Y.useEffect)(()=>{if(o.length===0){c!==null&&l(null);return}o.some(e=>e.runId===c)||l(o[0].runId)},[o,c]);let x=o.find(e=>e.runId===c),S=x?A(x):[],C=S.length+1,T=K(p,C),E=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{let t=x?{runId:x.runId,status:x.status}:null,n=E.current;if(E.current=t,!q(n,t))return;let r=setTimeout(()=>e(),800);return()=>{clearTimeout(r)}},[x?.runId,x?.status,e]);let D=T===0?void 0:S[T-1]?.title,O=x?j(x.agents,D):[],k=K(h,O.length),M=e=>{l(e),f(`phases`),m(0),g(0)};W({nextTab:()=>{if(o.length===0)return;let e=o[(o.findIndex(e=>e.runId===c)+1)%o.length];M(e.runId)},prevTab:()=>{if(o.length===0)return;let e=o[(o.findIndex(e=>e.runId===c)-1+o.length)%o.length];M(e.runId)},focusLeft:()=>f(`phases`),focusRight:()=>f(`agents`),moveUp:()=>{d===`phases`?m(e=>K(e-1,C)):g(e=>K(e-1,O.length))},moveDown:()=>{d===`phases`?m(e=>K(e+1,C)):g(e=>K(e+1,O.length))},killAgent:()=>{d!==`agents`||!x||O[k]&&b(`agent`)},killWorkflow:()=>{x&&b(`workflow`)},resumeFocused:()=>{if(!x)return;let n=t.canUseTool;if(!n){e(`resume needs canUseTool context; run /<name> resume from the main session.`);return}r.launch({resumeFromRunId:x.runId,name:x.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(_!==null){b(null);return}e()},confirmYes:()=>{if(_===`workflow`&&x){r.kill(x.runId),b(null),e();return}else if(_===`agent`&&x){let e=O[k];e&&r.killAgent(x.runId,e.id)}b(null)},confirmNo:()=>b(null)},_===null?`normal`:`confirm`);let P=o.filter(e=>e.status===`running`).length,I=o.length-P,L=D??`All`,R=x?x.agents.filter(e=>e.status===`done`).length:0,[z]=n(1e3),V=x?Date.now()-x.startedAt:0;return(0,X.jsxs)(s,{ref:z,flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,paddingX:1,children:[(0,X.jsxs)(s,{justifyContent:`space-between`,children:[(0,X.jsx)(i,{bold:!0,children:x?.workflowName??`Workflows`}),x?(0,X.jsxs)(i,{color:`subtle`,children:[R,`/`,x.agentCount,` agents · `,N(V),` ·`,` `,(0,X.jsx)(i,{color:v[x.status],children:y[x.status]})]}):(0,X.jsxs)(i,{color:`subtle`,children:[P,` running · `,I,` done`]})]}),x?.description?(0,X.jsx)(i,{color:`subtle`,children:x.description}):null,o.length>1?(0,X.jsx)(s,{marginTop:1,children:(0,X.jsx)(B,{runs:o,activeRunId:c})}):null,(0,X.jsxs)(s,{flexDirection:`row`,marginTop:1,children:[(0,X.jsxs)(s,{width:`25%`,flexDirection:`column`,children:[(0,X.jsx)(i,{color:d===`phases`?`claude`:`subtle`,bold:!0,children:`Phases`}),(0,X.jsx)(F,{phases:S,agents:x?.agents??[],selectedIndex:T,focused:d===`phases`})]}),(0,X.jsx)(i,{color:`subtle`,children:`│`}),(0,X.jsxs)(s,{flexGrow:1,flexDirection:`column`,children:[(0,X.jsxs)(i,{color:d===`agents`?`claude`:`subtle`,bold:!0,children:[L,` · `,O.length,` agents`]}),(0,X.jsx)(w,{agents:O,selectedIndex:k,focused:d===`agents`})]})]}),(0,X.jsx)(s,{marginTop:1,children:(0,X.jsx)(i,{color:`subtle`,children:_===null?`Tab switch run · ←/→ focus · ↑/↓ move · x kill agent · K kill workflow · r resume · q quit`:`Confirm: y kill · n/Esc cancel`})}),_===null?null:(0,X.jsx)(a,{title:_===`workflow`?`Kill workflow "${x?.workflowName??``}"?`:`Kill agent "${O[k]?.label??``}"?`,subtitle:_===`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:()=>b(null),color:`warning`,children:(0,X.jsx)(i,{color:`subtle`,children:`Press y to confirm, or n/Esc to cancel.`})})]})}var Y,X,Z=e((()=>{Y=t(r(),1),o(),d(),k(),z(),H(),S(),G(),P(),X=l()})),Q,$;e((()=>{f(),Z(),Q=l(),$=async(e,t,n)=>(0,Q.jsx)(p,{name:`WorkflowsPanel`,children:(0,Q.jsx)(J,{onDone:e,context:t})})}))();export{$ as call};
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-KjMLauwe.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{ed as u,td as d}from"./loadAgentsDir-CQF8qhne.js";import{n as f,t as p}from"./SentryErrorBoundary-nYTimi4l.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 w({agents:e,selectedIndex:t,focused:r}){let[a,o]=n(D),c=E[Math.floor(o/D)%E.length];return e.length===0?(0,T.jsx)(i,{color:`subtle`,children:`(no agents in this phase)`}):(0,T.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}`,O);return(0,T.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,T.jsxs)(s,{children:[(0,T.jsx)(i,{color:a.color,children:l}),(0,T.jsxs)(i,{children:[` `,u]})]}),(0,T.jsx)(i,{color:`subtle`,children:g(e)})]},e.id)})})}var T,E,D,O,k=e((()=>{r(),o(),S(),T=l(),E=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],D=120,O=18}));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=a?a.status:`pending`,s=e.agents.filter(e=>e.phase===i);r.push({title:i,status:o,done:s.filter(e=>e.status===`done`).length,total:s.length})};for(let t of e.declaredPhases)i(t);for(let t of e.phases)i(t.title);return r}function j(e,t){return t===void 0||t===`All`?e:e.filter(e=>e.phase===t)}function M(e,t){return`${e}#${t.slice(-4)}`}function N(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 P=e((()=>{}));function F({phases:e,agents:t,selectedIndex:r,focused:a}){let[o,c]=n(R),l=L[Math.floor(c/R)%L.length],u=t.length;return(0,I.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,I.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,I.jsxs)(s,{children:[(0,I.jsx)(i,{color:n?`claude`:void 0,children:o?`>`:` `}),(0,I.jsx)(i,{children:` `}),(0,I.jsx)(i,{color:u,children:c}),(0,I.jsxs)(i,{children:[` `,e.title]})]}),(0,I.jsxs)(i,{color:`subtle`,children:[e.done,`/`,e.total]})]},e.title)})})}var I,L,R,z=e((()=>{r(),o(),S(),P(),I=l(),L=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],R=120}));function B({runs:e,activeRunId:t}){return e.length===0?(0,V.jsx)(i,{color:`subtle`,children:`(no runs)`}):(0,V.jsx)(s,{children:e.map(e=>{let n=e.runId===t,r=M(e.workflowName,e.runId),a=`═`.repeat(r.length+2);return(0,V.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,V.jsxs)(s,{children:[(0,V.jsx)(i,{color:v[e.status],children:_[e.status]}),(0,V.jsx)(i,{children:` `}),(0,V.jsx)(i,{color:n?`claude`:void 0,bold:n,children:r})]}),(0,V.jsx)(i,{color:n?`claude`:void 0,children:n?a:``})]},e.runId)})})}var V,H=e((()=>{r(),o(),S(),P(),V=l()}));function U(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 W(e,t=`normal`){c((n,r)=>{let i=U(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 G=e((()=>{o()}));function K(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 q(e,t){return!e||!t||e.runId!==t.runId||e.status!==`running`?!1:t.status===`completed`||t.status===`failed`||t.status===`killed`}function J({onDone:e,context:t}){let r=u(),o=(0,Y.useSyncExternalStore)(r.subscribe,()=>r.listRuns(),()=>[]),[c,l]=(0,Y.useState)(null),[d,f]=(0,Y.useState)(`phases`),[p,m]=(0,Y.useState)(0),[h,g]=(0,Y.useState)(0),[_,b]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{r.loadPersistedRuns()},[r]),(0,Y.useEffect)(()=>{if(o.length===0){c!==null&&l(null);return}o.some(e=>e.runId===c)||l(o[0].runId)},[o,c]);let x=o.find(e=>e.runId===c),S=x?A(x):[],C=S.length+1,T=K(p,C),E=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{let t=x?{runId:x.runId,status:x.status}:null,n=E.current;if(E.current=t,!q(n,t))return;let r=setTimeout(()=>e(),800);return()=>{clearTimeout(r)}},[x?.runId,x?.status,e]);let D=T===0?void 0:S[T-1]?.title,O=x?j(x.agents,D):[],k=K(h,O.length),M=e=>{l(e),f(`phases`),m(0),g(0)};W({nextTab:()=>{if(o.length===0)return;let e=o[(o.findIndex(e=>e.runId===c)+1)%o.length];M(e.runId)},prevTab:()=>{if(o.length===0)return;let e=o[(o.findIndex(e=>e.runId===c)-1+o.length)%o.length];M(e.runId)},focusLeft:()=>f(`phases`),focusRight:()=>f(`agents`),moveUp:()=>{d===`phases`?m(e=>K(e-1,C)):g(e=>K(e-1,O.length))},moveDown:()=>{d===`phases`?m(e=>K(e+1,C)):g(e=>K(e+1,O.length))},killAgent:()=>{d!==`agents`||!x||O[k]&&b(`agent`)},killWorkflow:()=>{x&&b(`workflow`)},resumeFocused:()=>{if(!x)return;let n=t.canUseTool;if(!n){e(`resume needs canUseTool context; run /<name> resume from the main session.`);return}r.launch({resumeFromRunId:x.runId,name:x.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(_!==null){b(null);return}e()},confirmYes:()=>{if(_===`workflow`&&x){r.kill(x.runId),b(null),e();return}else if(_===`agent`&&x){let e=O[k];e&&r.killAgent(x.runId,e.id)}b(null)},confirmNo:()=>b(null)},_===null?`normal`:`confirm`);let P=o.filter(e=>e.status===`running`).length,I=o.length-P,L=D??`All`,R=x?x.agents.filter(e=>e.status===`done`).length:0,[z]=n(1e3),V=x?Date.now()-x.startedAt:0;return(0,X.jsxs)(s,{ref:z,flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,paddingX:1,children:[(0,X.jsxs)(s,{justifyContent:`space-between`,children:[(0,X.jsx)(i,{bold:!0,children:x?.workflowName??`Workflows`}),x?(0,X.jsxs)(i,{color:`subtle`,children:[R,`/`,x.agentCount,` agents · `,N(V),` ·`,` `,(0,X.jsx)(i,{color:v[x.status],children:y[x.status]})]}):(0,X.jsxs)(i,{color:`subtle`,children:[P,` running · `,I,` done`]})]}),x?.description?(0,X.jsx)(i,{color:`subtle`,children:x.description}):null,o.length>1?(0,X.jsx)(s,{marginTop:1,children:(0,X.jsx)(B,{runs:o,activeRunId:c})}):null,(0,X.jsxs)(s,{flexDirection:`row`,marginTop:1,children:[(0,X.jsxs)(s,{width:`25%`,flexDirection:`column`,children:[(0,X.jsx)(i,{color:d===`phases`?`claude`:`subtle`,bold:!0,children:`Phases`}),(0,X.jsx)(F,{phases:S,agents:x?.agents??[],selectedIndex:T,focused:d===`phases`})]}),(0,X.jsx)(i,{color:`subtle`,children:`│`}),(0,X.jsxs)(s,{flexGrow:1,flexDirection:`column`,children:[(0,X.jsxs)(i,{color:d===`agents`?`claude`:`subtle`,bold:!0,children:[L,` · `,O.length,` agents`]}),(0,X.jsx)(w,{agents:O,selectedIndex:k,focused:d===`agents`})]})]}),(0,X.jsx)(s,{marginTop:1,children:(0,X.jsx)(i,{color:`subtle`,children:_===null?`Tab switch run · ←/→ focus · ↑/↓ move · x kill agent · K kill workflow · r resume · q quit`:`Confirm: y kill · n/Esc cancel`})}),_===null?null:(0,X.jsx)(a,{title:_===`workflow`?`Kill workflow "${x?.workflowName??``}"?`:`Kill agent "${O[k]?.label??``}"?`,subtitle:_===`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:()=>b(null),color:`warning`,children:(0,X.jsx)(i,{color:`subtle`,children:`Press y to confirm, or n/Esc to cancel.`})})]})}var Y,X,Z=e((()=>{Y=t(r(),1),o(),d(),k(),z(),H(),S(),G(),P(),X=l()})),Q,$;e((()=>{f(),Z(),Q=l(),$=async(e,t,n)=>(0,Q.jsx)(p,{name:`WorkflowsPanel`,children:(0,Q.jsx)(J,{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-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-DO4WOQtD.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-Da4mpbd3.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-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};