claude-code-best 2.6.10 → 2.6.12

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 (484) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-DYIf4o0g.js → AddWorkspaceDirectory-LhW1QZFL.js} +1 -1
  2. package/dist/chunks/{App-Bw4stCcv.js → App-DYMNbl0d.js} +1 -1
  3. package/dist/chunks/ApproveApiKey-B1XCQNW6.js +1 -0
  4. package/dist/chunks/{ApproveApiKey-CNBKF9de.js → ApproveApiKey-Bi2Iq_gN.js} +1 -1
  5. package/dist/chunks/{AssistantSessionChooser-DU5OOPwq.js → AssistantSessionChooser-Dv6yYR3s.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-qS15If6H.js +2 -0
  7. package/dist/chunks/{BypassPermissionsModeDialog-UOkwRr3W.js → BypassPermissionsModeDialog-Bhjd2F2o.js} +1 -1
  8. package/dist/chunks/{ClaudeInChromeOnboarding-6UL2_PCg.js → ClaudeInChromeOnboarding-CxBS5xZY.js} +1 -1
  9. package/dist/chunks/{ClaudeMdExternalIncludesDialog-DBfmH_dG.js → ClaudeMdExternalIncludesDialog-CiANFiNV.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-nuKXhM2t.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-C8FzG3uF.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-B-ySC5nP.js → DesktopHandoff-BSpzQF0U.js} +1 -1
  13. package/dist/chunks/{DevChannelsDialog-DZMsKuak.js → DevChannelsDialog-B2xqlZtS.js} +1 -1
  14. package/dist/chunks/{DiffDialog-CeYcqIIw.js → DiffDialog-XmOsaUeN.js} +2 -2
  15. package/dist/chunks/Doctor-C6FXh99k.js +1 -0
  16. package/dist/chunks/Doctor-DLx7Z_sA.js +3 -0
  17. package/dist/chunks/{ExitFlow-gMv13EpM.js → ExitFlow-CHDj7fv7.js} +2 -2
  18. package/dist/chunks/{Feedback-CGRlFB5g.js → Feedback-CUjTJbIh.js} +2 -2
  19. package/dist/chunks/Grove-B8ZQOflC.js +1 -0
  20. package/dist/chunks/{Grove-CnHyPepC.js → Grove-fenDMHVw.js} +1 -1
  21. package/dist/chunks/{HybridTransport-CiY6jyhx.js → HybridTransport-CP63usH9.js} +1 -1
  22. package/dist/chunks/{ITermBackend-CG-a4QYW.js → ITermBackend-Bp_3qpix.js} +1 -1
  23. package/dist/chunks/{InvalidConfigDialog-umJZVrz-.js → InvalidConfigDialog-CgD7HSg0.js} +1 -1
  24. package/dist/chunks/{InvalidSettingsDialog-C62kuhHc.js → InvalidSettingsDialog-pYMa5Fp4.js} +1 -1
  25. package/dist/chunks/MCPConnectionManager-ip1xShU_.js +1 -0
  26. package/dist/chunks/{McpParsingWarnings-DW0d9Lsb.js → McpParsingWarnings-DhobExFM.js} +1 -1
  27. package/dist/chunks/MessageSelector-B2X6zrsb.js +3 -0
  28. package/dist/chunks/Messages-CmsZIA66.js +11 -0
  29. package/dist/chunks/{Onboarding-BRePz3fJ.js → Onboarding-BaoLhLiT.js} +1 -1
  30. package/dist/chunks/{OverageCreditUpsell-DEZsyI6y.js → OverageCreditUpsell-DnLMobAh.js} +1 -1
  31. package/dist/chunks/{PluginSettings-CuZtXDaS.js → PluginSettings-BetzicTb.js} +3 -3
  32. package/dist/chunks/{PromptInputFooterSuggestions-BrpVQJVn.js → PromptInputFooterSuggestions-D-1hRFAD.js} +1 -1
  33. package/dist/chunks/{PromptInputHelpMenu-BlGRpX1Q.js → PromptInputHelpMenu-DnQj3Hpq.js} +1 -1
  34. package/dist/chunks/QueryEngine-BwvqdZVN.js +1 -0
  35. package/dist/chunks/REPL-CCgaPc2g.js +1 -0
  36. package/dist/chunks/{REPL-D-t0XQx2.js → REPL-zS2s1JnV.js} +34 -34
  37. package/dist/chunks/{RemoteCallout-DvOZQWoG.js → RemoteCallout-B9hClSYj.js} +1 -1
  38. package/dist/chunks/{RemoteSessionManager-BlIA65dM.js → RemoteSessionManager-BgLIvi8Z.js} +2 -2
  39. package/dist/chunks/ResumeConversation-DAMMGHGc.js +1 -0
  40. package/dist/chunks/{SSETransport-CIvM80QS.js → SSETransport-CD7R7FfS.js} +1 -1
  41. package/dist/chunks/SearchExtraToolsTool-CP6G9xhL.js +1 -0
  42. package/dist/chunks/{SentryErrorBoundary-BK2HjzVw.js → SentryErrorBoundary-6dQQW6kh.js} +1 -1
  43. package/dist/chunks/SentryErrorBoundary-B2e3QmqR.js +1 -0
  44. package/dist/chunks/Settings-DgW58gbY.js +2 -0
  45. package/dist/chunks/{TeleportProgress-BFlMrsa_.js → TeleportProgress-D_USKi0I.js} +1 -1
  46. package/dist/chunks/TeleportRepoMismatchDialog-C1-iWmRP.js +1 -0
  47. package/dist/chunks/{TeleportResumeWrapper-CHfeyo9J.js → TeleportResumeWrapper-BX9nUVsC.js} +1 -1
  48. package/dist/chunks/{ThemePicker-a5n2EKgk.js → ThemePicker-C0JghXSS.js} +1 -1
  49. package/dist/chunks/{TmuxBackend-Ct9v-J78.js → TmuxBackend-BxPiis2l.js} +1 -1
  50. package/dist/chunks/{TrustDialog-e1nyM-Fp.js → TrustDialog-BZD-KGrA.js} +1 -1
  51. package/dist/chunks/{ValidationErrorsList-BHCepjdO.js → ValidationErrorsList-CTFdkGiH.js} +1 -1
  52. package/dist/chunks/{WelcomeV2-BnyziLbm.js → WelcomeV2-C7F1y8zh.js} +1 -1
  53. package/dist/chunks/{WindowsTerminalBackend-Dw6qjsBu.js → WindowsTerminalBackend-DLxmmXo4.js} +2 -2
  54. package/dist/chunks/{add-dir-CjnY5yfR.js → add-dir-Dhv9aEca.js} +1 -1
  55. package/dist/chunks/{agentDisplay-Dfx-axK9.js → agentDisplay-BoBFMmGh.js} +1 -1
  56. package/dist/chunks/{agents-lM-cxA8_.js → agents-Bt9kYpgi.js} +1 -1
  57. package/dist/chunks/{agents-CICHEOOq.js → agents-CdsfzK3E.js} +7 -7
  58. package/dist/chunks/{ant-JgExUpwJ.js → ant-Bo6XJuE9.js} +1 -1
  59. package/dist/chunks/api-CRPzfBL5.js +1 -0
  60. package/dist/chunks/{api-CClu711S.js → api-CslgFoHj.js} +1 -1
  61. package/dist/chunks/{assistant-D1XefK1z.js → assistant--L1Ll62G.js} +1 -1
  62. package/dist/chunks/assistant-DypEudjI.js +1 -0
  63. package/dist/chunks/{assistant-Bih7t52W.js → assistant-od6Nf6EJ.js} +1 -1
  64. package/dist/chunks/auth-BaaTtn3M.js +1 -0
  65. package/dist/chunks/{auth-CU6ArDos.js → auth-yKNn60lZ.js} +1 -1
  66. package/dist/chunks/{autoMode-DM9eDMmT.js → autoMode-C4b9u7WQ.js} +6 -6
  67. package/dist/chunks/{autonomy-DUfXLZfq.js → autonomy-7nZpCyNC.js} +12 -12
  68. package/dist/chunks/{autonomy-CZCZ9wlx.js → autonomy-rMsykUYN.js} +1 -1
  69. package/dist/chunks/{autonomyPanel-kUZwcjfu.js → autonomyPanel-j0q1dMDj.js} +1 -1
  70. package/dist/chunks/backgroundHousekeeping-DGAYPsK9.js +1 -0
  71. package/dist/chunks/backgroundHousekeeping-KCpR7i2h.js +17 -0
  72. package/dist/chunks/{branch-Ac3HXXs2.js → branch-GL4WvvLa.js} +2 -2
  73. package/dist/chunks/{bridge-Drt-UmFp.js → bridge-BVzpVEsr.js} +2 -2
  74. package/dist/chunks/bridgeConfig-B1OTOi0O.js +1 -0
  75. package/dist/chunks/{bridgeConfig-GQzZVhuF.js → bridgeConfig-C110hgnb.js} +1 -1
  76. package/dist/chunks/{bridgeEnabled-CDoXbe3S.js → bridgeEnabled-DrW-kkAr.js} +1 -1
  77. package/dist/chunks/bridgeEnabled-Zk2slA-p.js +1 -0
  78. package/dist/chunks/bridgeMain-C-MUVlCX.js +68 -0
  79. package/dist/chunks/bridgeMain-L1ScqrgM.js +1 -0
  80. package/dist/chunks/{bridgeMessaging-gRm2WcIE.js → bridgeMessaging-DobCpZGY.js} +1 -1
  81. package/dist/chunks/{btw-B2Tq2ewP.js → btw-CSDRs-n8.js} +1 -1
  82. package/dist/chunks/{buddy-v00QHFZ6.js → buddy-D3Owb2U5.js} +1 -1
  83. package/dist/chunks/{bypassPermissionsKillswitch-DAr5U3Ep.js → bypassPermissionsKillswitch-B_5qku-e.js} +1 -1
  84. package/dist/chunks/caches-CpgRh__l.js +1 -0
  85. package/dist/chunks/{caches-DHUk9KMo.js → caches-Di_WVMtD.js} +2 -2
  86. package/dist/chunks/{ccrClient-1Q3C_3_r.js → ccrClient-CWH1f8Nk.js} +1 -1
  87. package/dist/chunks/changeDetector-DEStinxa.js +1 -0
  88. package/dist/chunks/channelNotification-DxAS15nL.js +1 -0
  89. package/dist/chunks/{channelNotification-d08DSK9u.js → channelNotification-Y5fNpq-B.js} +1 -1
  90. package/dist/chunks/{chrome-CKo0_n71.js → chrome-Cgl-Sq1y.js} +1 -1
  91. package/dist/chunks/clear-Dja0RB_p.js +1 -0
  92. package/dist/chunks/client-DuWXRBa0.js +1 -0
  93. package/dist/chunks/color-tvVGbuuv.js +1 -0
  94. package/dist/chunks/commands-ElmJnxRE.js +1 -0
  95. package/dist/chunks/{commitAttribution-BJvmLsVe.js → commitAttribution-CedoNRL0.js} +1 -1
  96. package/dist/chunks/commitAttribution-D6vYpAMS.js +1 -0
  97. package/dist/chunks/compact-BwsLImWZ.js +3 -0
  98. package/dist/chunks/{companion-C2CBSYiF.js → companion-C3hWMSgF.js} +1 -1
  99. package/dist/chunks/{config-Cht2x9n9.js → config-BHCIawwx.js} +1 -1
  100. package/dist/chunks/{config-DnWYFpDc.js → config-Dh0QGc4B.js} +1 -1
  101. package/dist/chunks/{context-CDz9HqRT.js → context-CSHiU4LG.js} +1 -1
  102. package/dist/chunks/{context-noninteractive-BUIf4IMX.js → context-noninteractive-CKFY_j1P.js} +2 -2
  103. package/dist/chunks/context-noninteractive-DirFwn0d.js +1 -0
  104. package/dist/chunks/conversation-DfIv8Jzc.js +1 -0
  105. package/dist/chunks/conversation-Dyb5kfil.js +1 -0
  106. package/dist/chunks/{copy-BgHTb1Z0.js → copy-BSyDpOx5.js} +2 -2
  107. package/dist/chunks/{createSSHSession-C_mpeqPy.js → createSSHSession-PfzB7zZR.js} +1 -1
  108. package/dist/chunks/{createSession-kVJBXQlZ.js → createSession-Bk6r39b1.js} +1 -1
  109. package/dist/chunks/createSession-DdsaDZoq.js +1 -0
  110. package/dist/chunks/{cronJitterConfig-SI7bYvJj.js → cronJitterConfig-BFVNIkjD.js} +3 -3
  111. package/dist/chunks/crossProjectResume-CdoH1cwH.js +40 -0
  112. package/dist/chunks/{daemon-VYRit6Aq.js → daemon-CCtZ9wY3.js} +1 -1
  113. package/dist/chunks/{datadog-Bd9AgZT-.js → datadog-By0GhDXI.js} +1 -1
  114. package/dist/chunks/datadog-CTRRIaBJ.js +1 -0
  115. package/dist/chunks/{desktop-BeUj2fqu.js → desktop-BV6CI329.js} +1 -1
  116. package/dist/chunks/{diff-BzgXDp1o.js → diff-qDuBFv-P.js} +1 -1
  117. package/dist/chunks/{doctor-HCOexiL5.js → doctor-BtTsew-G.js} +1 -1
  118. package/dist/chunks/earlyInput-RoVleNEN.js +1 -0
  119. package/dist/chunks/{effort-BaJU_k2K.js → effort-DSpAOBeU.js} +2 -2
  120. package/dist/chunks/{entry-BoXZIfxW.js → entry-CYCQJU7M.js} +8 -8
  121. package/dist/chunks/envLessBridgeConfig-B3o52JMX.js +1 -0
  122. package/dist/chunks/{envLessBridgeConfig-CnR1E53G.js → envLessBridgeConfig-BKs6Mk4e.js} +1 -1
  123. package/dist/chunks/exit-BgaIlRuS.js +1 -0
  124. package/dist/chunks/{export-p85q3g8t.js → export-BOQCWSMm.js} +1 -1
  125. package/dist/chunks/{exportRenderer-CUqd8PZM.js → exportRenderer-B-2J3ocI.js} +1 -1
  126. package/dist/chunks/extra-usage-BLVbAE1O.js +1 -0
  127. package/dist/chunks/{extra-usage-pPprHqwq.js → extra-usage-S4WYpDn5.js} +1 -1
  128. package/dist/chunks/{extra-usage-core-B9Fy8_RP.js → extra-usage-core-Sq4JALS7.js} +1 -1
  129. package/dist/chunks/{extra-usage-noninteractive-B4vaWh0y.js → extra-usage-noninteractive-BlJVTTwe.js} +1 -1
  130. package/dist/chunks/{extraUsage-CEHCMe7l.js → extraUsage-CMJ1LEPS.js} +1 -1
  131. package/dist/chunks/extractMemories-BpN0fQF-.js +1 -0
  132. package/dist/chunks/fast-B8a-zz4X.js +1 -0
  133. package/dist/chunks/{fast-CiSIZ5FI.js → fast-OzVowRYW.js} +1 -1
  134. package/dist/chunks/{feedback-C2QLdCfW.js → feedback-BZet1Qu_.js} +1 -1
  135. package/dist/chunks/{firstPartyEventLogger-CozFbFD9.js → firstPartyEventLogger-DeytNcUC.js} +1 -1
  136. package/dist/chunks/{flushGate-LXr8ynSz.js → flushGate-CeFJrqgK.js} +1 -1
  137. package/dist/chunks/{gates-BGfvIJXl.js → gates-Be4ovdxj.js} +1 -1
  138. package/dist/chunks/gates-WmmZ-8JT.js +1 -0
  139. package/dist/chunks/gemini-DExthrur.js +1 -0
  140. package/dist/chunks/{generateRecap-CLla3Ymz.js → generateRecap-BIFrnTIe.js} +1 -1
  141. package/dist/chunks/{generateSessionName-DF4I7gr2.js → generateSessionName-DlC0lhSv.js} +1 -1
  142. package/dist/chunks/{githubRepoPathMapping-C_5RCW_Z.js → githubRepoPathMapping-BKB2G52c.js} +1 -1
  143. package/dist/chunks/grok-BNxCseLh.js +1 -0
  144. package/dist/chunks/{growthbook-C39e6Byf.js → growthbook-B3_MJJ45.js} +1 -1
  145. package/dist/chunks/{heapdump-BRj4tC1y.js → heapdump-sPWpCjXq.js} +1 -1
  146. package/dist/chunks/{help-fH9LNwox.js → help-BuUi6cM0.js} +1 -1
  147. package/dist/chunks/{hooks-D22Uu3Vs.js → hooks-5vDlGpNp.js} +2 -2
  148. package/dist/chunks/hooks-CVJA4uQu.js +1 -0
  149. package/dist/chunks/{hostAdapter-CbXytx4y.js → hostAdapter-BfBHV5nj.js} +1 -1
  150. package/dist/chunks/{ide-DM5Tw70v.js → ide-DvUftvRn.js} +2 -2
  151. package/dist/chunks/inboundAttachments-CQyeysIk.js +1 -0
  152. package/dist/chunks/{inboundAttachments-2QIORKsd.js → inboundAttachments-CiF42Eku.js} +1 -1
  153. package/dist/chunks/initReplBridge-Bzg5Gx97.js +1 -0
  154. package/dist/chunks/{insights-B6ogyLuv.js → insights-CvwFcRQt.js} +64 -64
  155. package/dist/chunks/{install-github-app-CQ7vkhIX.js → install-github-app-DxxG2VlZ.js} +2 -2
  156. package/dist/chunks/{install-slack-app-By9_5YS7.js → install-slack-app-Bc5m1UFG.js} +1 -1
  157. package/dist/chunks/{install-DimDiHha.js → install-tclc0QHM.js} +1 -1
  158. package/dist/chunks/{instrumentation-DbKu2GCL.js → instrumentation-Dn_FDn6G.js} +3 -3
  159. package/dist/chunks/{job-D_DoFtev.js → job-ssZ2ESAX.js} +1 -1
  160. package/dist/chunks/{keybindings-DYRBv1bg.js → keybindings-DVZlobLM.js} +2 -2
  161. package/dist/chunks/{lang-CAMxxG9F.js → lang-BQ--zwb1.js} +1 -1
  162. package/dist/chunks/language-BM5numKK.js +1 -0
  163. package/dist/chunks/{language-CoHgN7rh.js → language-CcxtaVJA.js} +1 -1
  164. package/dist/chunks/{launchAgentsPlatform-9P8K66ku.js → launchAgentsPlatform-CLwlpK5C.js} +1 -1
  165. package/dist/chunks/{launchAutofixPr-BbsqqUMA.js → launchAutofixPr-vGLlC4Jm.js} +3 -3
  166. package/dist/chunks/{launchLocalMemory-K55Yo6JM.js → launchLocalMemory-DJ4pR8a2.js} +2 -2
  167. package/dist/chunks/{launchLocalVault-rrd1Q7jP.js → launchLocalVault-Cl7Dds3W.js} +3 -3
  168. package/dist/chunks/{launchMemoryStores-DMZ8GNQj.js → launchMemoryStores-Czk-a1P6.js} +1 -1
  169. package/dist/chunks/{launchOnboarding-Duz_huXl.js → launchOnboarding-66gN_781.js} +1 -1
  170. package/dist/chunks/{launchSchedule-7VlG_3M6.js → launchSchedule-Tx5efcfv.js} +1 -1
  171. package/dist/chunks/{launchSkillStore-CcJL8RT0.js → launchSkillStore-BGPd1KCD.js} +1 -1
  172. package/dist/chunks/{launchTeleport-C8h_4F_L.js → launchTeleport-DzXrNn2h.js} +2 -2
  173. package/dist/chunks/{launchVault-Bm1EeT2x.js → launchVault-C5djf6XO.js} +1 -1
  174. package/dist/chunks/{loadAgentsDir-HZ19tmOZ.js → loadAgentsDir-DaApSWNv.js} +807 -764
  175. package/dist/chunks/loadAgentsDir-_BePoo3r.js +1 -0
  176. package/dist/chunks/loadPluginHooks-GENkKqO8.js +1 -0
  177. package/dist/chunks/{localSearch-4cz5ia5a.js → localSearch-BQuH38SB.js} +1 -1
  178. package/dist/chunks/localSearch-BSR9byCr.js +1 -0
  179. package/dist/chunks/{login-D6ywctRr.js → login-C64M5OdJ.js} +1 -1
  180. package/dist/chunks/login-dkrrvdEl.js +1 -0
  181. package/dist/chunks/{logoV2Utils-jaFn88oE.js → logoV2Utils-D6ceZmK0.js} +1 -1
  182. package/dist/chunks/logout-BITK5qkB.js +1 -0
  183. package/dist/chunks/{magicDocs-DHGtJq0K.js → magicDocs-KPodA4bi.js} +2 -2
  184. package/dist/chunks/{main-Bv4AvaJk.js → main-wb2H0Xbt.js} +48 -48
  185. package/dist/chunks/{mappers-qcXgNBi5.js → mappers-D54WYYhL.js} +1 -1
  186. package/dist/chunks/mcp-Bgeq8jbd.js +6 -0
  187. package/dist/chunks/mcp-CJvRg7ft.js +2 -0
  188. package/dist/chunks/mcp-Ddvz5we7.js +1 -0
  189. package/dist/chunks/{mcpServer-Do9XTs2J.js → mcpServer-VYXTzAFl.js} +1 -1
  190. package/dist/chunks/{mcpServer-DcSto-Od.js → mcpServer-d0863d94.js} +1 -1
  191. package/dist/chunks/memory-BNyVCuw9.js +1 -0
  192. package/dist/chunks/mode-D_L3DNsz.js +2 -0
  193. package/dist/chunks/model-DevOJk2A.js +1 -0
  194. package/dist/chunks/{model-DwVGG0mc.js → model-Dy_oUo2C.js} +1 -1
  195. package/dist/chunks/{onChangeAppState-CHYSALjM.js → onChangeAppState-GPs10FBm.js} +1 -1
  196. package/dist/chunks/{openai-Brj68CWD.js → openai-C0CrRENO.js} +3 -3
  197. package/dist/chunks/{overageCreditGrant-D5X6-TcP.js → overageCreditGrant-DCiIf_SF.js} +1 -1
  198. package/dist/chunks/{panel-Bz_8td5D.js → panel-s9fbCKfl.js} +1 -1
  199. package/dist/chunks/{passes-B1f6NHWA.js → passes-C9oR06Fa.js} +1 -1
  200. package/dist/chunks/{paths-D8Fx3kUi.js → paths-BZbIj1Z1.js} +3 -3
  201. package/dist/chunks/permissions-DNb8DG22.js +3 -0
  202. package/dist/chunks/{pipeTransport-DAYnzvGK.js → pipeTransport-Cx55TUNu.js} +1 -1
  203. package/dist/chunks/{plan-B7EPetF0.js → plan-D-RJTUxb.js} +1 -1
  204. package/dist/chunks/{plugin-BRWx-_ZS.js → plugin-BV-DabiK.js} +1 -1
  205. package/dist/chunks/{pluginAutoupdate-BwxAsU2F.js → pluginAutoupdate-DPciQRLz.js} +1 -1
  206. package/dist/chunks/pluginBlocklist-CtSUf3sp.js +1 -0
  207. package/dist/chunks/{pluginCliCommands-CXANH43C.js → pluginCliCommands-Cbcc-AQq.js} +1 -1
  208. package/dist/chunks/{pluginFlagging-CBbUoCJ9.js → pluginFlagging-D2d7jd4v.js} +1 -1
  209. package/dist/chunks/pluginOperations-rU56uptC.js +2 -0
  210. package/dist/chunks/{pluginStartupCheck-BNfv-Pf4.js → pluginStartupCheck-DuhCLRbp.js} +1 -1
  211. package/dist/chunks/pluginStartupCheck-DwY7j_Cg.js +1 -0
  212. package/dist/chunks/plugins-LbLpZOhz.js +4 -0
  213. package/dist/chunks/policyLimits-Dl863Z85.js +1 -0
  214. package/dist/chunks/{pollConfig-BWY_xmk6.js → pollConfig-orFqIbGd.js} +1 -1
  215. package/dist/chunks/{poor-Bcu8JaV5.js → poor-2u_yWIRG.js} +1 -1
  216. package/dist/chunks/poorMode-BBr7GGQ3.js +1 -0
  217. package/dist/chunks/{poorMode-CDhhKGBw.js → poorMode-DtQVZvON.js} +1 -1
  218. package/dist/chunks/print-BgLbepaC.js +39 -0
  219. package/dist/chunks/{privacy-settings-CmHUlYoo.js → privacy-settings-CC_FyvjV.js} +1 -1
  220. package/dist/chunks/processBashCommand-DnekNzlT.js +1 -0
  221. package/dist/chunks/processSlashCommand-sLL0pyIW.js +6 -0
  222. package/dist/chunks/{projectContext-0fpRKUeH.js → projectContext-D5FgyE-d.js} +1 -1
  223. package/dist/chunks/{prompt-BxoRdmaw.js → prompt-DHHypkUR.js} +1 -1
  224. package/dist/chunks/prompt-Dexwn9YP.js +1 -0
  225. package/dist/chunks/prompt-DhaPVt1T.js +1 -0
  226. package/dist/chunks/{promptEditor-LQu9NhbN.js → promptEditor-I8ZpszKv.js} +2 -2
  227. package/dist/chunks/{protocolHandler-DYn2E9Yl.js → protocolHandler-CEsrhel_.js} +1 -1
  228. package/dist/chunks/rate-limit-options-B0Iyzr4x.js +1 -0
  229. package/dist/chunks/{rcDebugLog-5XEbz_Yg.js → rcDebugLog-CF73Wofq.js} +1 -1
  230. package/dist/chunks/{referral-BsAvaATn.js → referral-Nz20w4pB.js} +1 -1
  231. package/dist/chunks/refresh-DecpoOX1.js +1 -0
  232. package/dist/chunks/{registerProtocol-COUVHFku.js → registerProtocol-CAoaYyt8.js} +1 -1
  233. package/dist/chunks/registry-BQdQRu-K.js +1 -0
  234. package/dist/chunks/{release-notes-BDdughgu.js → release-notes-C0HeOmQY.js} +1 -1
  235. package/dist/chunks/{releaseNotes-Bd3zxid3.js → releaseNotes-BDzfbUAu.js} +2 -2
  236. package/dist/chunks/{reload-plugins-qUIybHNy.js → reload-plugins-BZ4LTYY3.js} +1 -1
  237. package/dist/chunks/{remote-env-GGlLNGsx.js → remote-env-CPalv-BL.js} +1 -1
  238. package/dist/chunks/{remoteBridgeCore-DpF5alU6.js → remoteBridgeCore-B2yFfG6S.js} +1 -1
  239. package/dist/chunks/{remoteControlServer-C32rxr3F.js → remoteControlServer-CsnLedUv.js} +2 -2
  240. package/dist/chunks/rename-CQPtjj_Q.js +1 -0
  241. package/dist/chunks/{resume-C6ereXig.js → resume-Ycuezjv2.js} +2 -2
  242. package/dist/chunks/{runtimeObserver-DBdzsp_h.js → runtimeObserver-CW0_wm1t.js} +1 -1
  243. package/dist/chunks/{runtimeObserver-jrNSkZU2.js → runtimeObserver-DnhLm9O1.js} +3 -3
  244. package/dist/chunks/sandbox-adapter-BOsa-en7.js +1 -0
  245. package/dist/chunks/{sandbox-toggle-Bfti5GKF.js → sandbox-toggle-Bl5Drxeo.js} +1 -1
  246. package/dist/chunks/searchExtraTools-CgdrY8XO.js +1 -0
  247. package/dist/chunks/{sentry-CZUyEC3A.js → sentry-BN3GTgYM.js} +1 -1
  248. package/dist/chunks/{session-DCIDa5dI.js → session-ULekTZVn.js} +2 -2
  249. package/dist/chunks/{sessionDiscovery-5m_pul65.js → sessionDiscovery-DAmbR6o-.js} +1 -1
  250. package/dist/chunks/sessionFileAccessHooks-C-o5001P.js +1 -0
  251. package/dist/chunks/sessionMemory-Bg458voj.js +1 -0
  252. package/dist/chunks/sessionMemory-DR-esdhZ.js +1 -0
  253. package/dist/chunks/sessionMemoryUtils-DgVGiwjB.js +1 -0
  254. package/dist/chunks/sessionObserver-C5cujEe6.js +1 -0
  255. package/dist/chunks/{sessionObserver-LBqNoak9.js → sessionObserver-CQ3PQWgU.js} +1 -1
  256. package/dist/chunks/sessionStorage-BIDUQ8wo.js +1 -0
  257. package/dist/chunks/{sessionTitle-BIykjtKk.js → sessionTitle-DyexSH43.js} +1 -1
  258. package/dist/chunks/{sessionTracing-Da_r0mIc.js → sessionTracing-gKle2qzF.js} +1 -1
  259. package/dist/chunks/{settingsSync-BE0PQqyo.js → settingsSync-BWW4FOMm.js} +1 -1
  260. package/dist/chunks/{setup-p04XtwYu.js → setup-DX6984LY.js} +1 -1
  261. package/dist/chunks/setup-OvlOCIFL.js +2 -0
  262. package/dist/chunks/{setup-CjA5bW6e.js → setup-n91rSYO2.js} +1 -1
  263. package/dist/chunks/{shadowedRuleDetection-Zqp1M5St.js → shadowedRuleDetection-uYIZBoii.js} +1 -1
  264. package/dist/chunks/{sideQuestion-DzJenEES.js → sideQuestion-DIMsNoEc.js} +2 -2
  265. package/dist/chunks/sink-BBn0HwoH.js +1 -0
  266. package/dist/chunks/{sink-N5XR8Zgp.js → sink-DLRpC2qX.js} +1 -1
  267. package/dist/chunks/{sinks-D8erzS9D.js → sinks-BI1hGD9c.js} +2 -2
  268. package/dist/chunks/sinks-DKGE2sSC.js +1 -0
  269. package/dist/chunks/{skill-learning-CbMQ8IsZ.js → skill-learning-Dz-Zq-xT.js} +1 -1
  270. package/dist/chunks/skillChangeDetector-C2Te20cK.js +1 -0
  271. package/dist/chunks/{skillGapStore-DbiDG9Pd.js → skillGapStore-BFpryJIe.js} +2 -2
  272. package/dist/chunks/{skillGapStore-Bp5IVfOx.js → skillGapStore-CxPjoWci.js} +1 -1
  273. package/dist/chunks/{skillGenerator-Bys7U1l_.js → skillGenerator-BGOIb5p-.js} +2 -2
  274. package/dist/chunks/skillLearning-BRvWwB8E.js +1 -0
  275. package/dist/chunks/skillLearning-DTo7lCKd.js +1 -0
  276. package/dist/chunks/{skillPanel-MIHU1PPp.js → skillPanel-DzYZLnuH.js} +3 -3
  277. package/dist/chunks/{skillSearchPanel-MFB-PzB1.js → skillSearchPanel-DrysL5R-.js} +3 -3
  278. package/dist/chunks/{skills-D4tZYFpd.js → skills-CTfNqisc.js} +1 -1
  279. package/dist/chunks/{sprites-B479AZSz.js → sprites-CHzZCAGE.js} +1 -1
  280. package/dist/chunks/{stats-B-ErfxCJ.js → stats-D2s-hIY8.js} +1 -1
  281. package/dist/chunks/{status-DVACJLsK.js → status-XxrX2kHw.js} +1 -1
  282. package/dist/chunks/statusNoticeHelpers-CUm1pflC.js +1 -0
  283. package/dist/chunks/{tag-YpE2D2ve.js → tag-FV031rKW.js} +2 -2
  284. package/dist/chunks/{tasks-7N7iSiEx.js → tasks-aK2rp8CW.js} +1 -1
  285. package/dist/chunks/{teamHelpers-BFdTH57t.js → teamHelpers-2m66Mr8w.js} +1 -1
  286. package/dist/chunks/teamHelpers-Bg3nHlWr.js +1 -0
  287. package/dist/chunks/{teammateModeSnapshot-CwacsQvD.js → teammateModeSnapshot-BtdUJBKp.js} +1 -1
  288. package/dist/chunks/teammateModeSnapshot-VojvAMbR.js +1 -0
  289. package/dist/chunks/teleport-4x9eIl8c.js +1 -0
  290. package/dist/chunks/{templateJobs-BM98KAEH.js → templateJobs-fEz4DGWh.js} +1 -1
  291. package/dist/chunks/{terminalSetup-CGiIwoIX.js → terminalSetup-Cjdlcznm.js} +1 -1
  292. package/dist/chunks/{terminalSetup-yQ0CoywX.js → terminalSetup-EirH-l0a.js} +1 -1
  293. package/dist/chunks/{theme-C5ULGNRs.js → theme-BjdEyakL.js} +1 -1
  294. package/dist/chunks/thinkback-CrW3VlCR.js +1 -0
  295. package/dist/chunks/thinkback-DHyz-lmU.js +1 -0
  296. package/dist/chunks/thinkback-play-B46ystVF.js +1 -0
  297. package/dist/chunks/{toolEventObserver-CuJbsUL0.js → toolEventObserver-CJ68x4wM.js} +1 -1
  298. package/dist/chunks/{toolEventObserver-CcLqNRcT.js → toolEventObserver-Dak6ETA6.js} +1 -1
  299. package/dist/chunks/toolPool-3CMCh3QU.js +1 -0
  300. package/dist/chunks/toolPool-BHdCDihh.js +1 -0
  301. package/dist/chunks/{trustedDevice-u2HpuTkN.js → trustedDevice-QhApqKq4.js} +1 -1
  302. package/dist/chunks/{trustedDevice-C4tvgByY.js → trustedDevice-oDn6E85N.js} +1 -1
  303. package/dist/chunks/{tui-BVc2q4Xv.js → tui-geoc3zxu.js} +1 -1
  304. package/dist/chunks/{ultrareviewCommand-CWLiiq-z.js → ultrareviewCommand-Ar9zzqz4.js} +2 -2
  305. package/dist/chunks/undercover-D1ieJ54D.js +1 -0
  306. package/dist/chunks/{undercover-CNlN7Xzl.js → undercover-DZq2Tf-o.js} +1 -1
  307. package/dist/chunks/{updateCCB-BWN4mOEz.js → updateCCB-Db3CfFcn.js} +1 -1
  308. package/dist/chunks/upgrade-B28O0zeQ.js +1 -0
  309. package/dist/chunks/{upgrade-CE25mJEk.js → upgrade-BZvNOhEJ.js} +1 -1
  310. package/dist/chunks/{upload-YpyOX2a-.js → upload-DAmbsBq4.js} +1 -1
  311. package/dist/chunks/{usage-Bw-kTwHb.js → usage-COv9UCxX.js} +1 -1
  312. package/dist/chunks/{usage-DNXwr_ep.js → usage-Dtv3YQf8.js} +1 -1
  313. package/dist/chunks/useMainLoopModel-BpM3dlzJ.js +1 -0
  314. package/dist/chunks/{useManagePlugins-hPG7UMWo.js → useManagePlugins-DZ-_Ll9E.js} +1 -1
  315. package/dist/chunks/useMergedTools-INKnp2ij.js +1 -0
  316. package/dist/chunks/{useSearchInput-CR9uhbA7.js → useSearchInput-DobM3JKI.js} +1 -1
  317. package/dist/chunks/useSettingsErrors-DjvaCC5-.js +1 -0
  318. package/dist/chunks/{useVoice-B5DQ5Tay.js → useVoice-exDfbv1t.js} +1 -1
  319. package/dist/chunks/{util-D_BHu06u.js → util-CDzNDmax.js} +1 -1
  320. package/dist/chunks/utils-B0iiiW_p.js +1 -0
  321. package/dist/chunks/validatePlugin-DaLnfLSC.js +1 -0
  322. package/dist/chunks/{vim-BGqKMQxl.js → vim-CPKu15l_.js} +1 -1
  323. package/dist/chunks/{voice-B2MWrkN3.js → voice-gNxUce-I.js} +2 -2
  324. package/dist/chunks/voiceModeEnabled-CwPbMJ9C.js +1 -0
  325. package/dist/chunks/{voiceModeEnabled-if9dV1bW.js → voiceModeEnabled-DEwGjUP6.js} +1 -1
  326. package/dist/chunks/voiceStreamSTT-6b3Oslnl.js +1 -0
  327. package/dist/chunks/{voiceStreamSTT-CWhKAxcp.js → voiceStreamSTT-BjX-mTB_.js} +1 -1
  328. package/dist/chunks/{workerRegistry-BANOcuS2.js → workerRegistry-Bc6t6VlK.js} +1 -1
  329. package/dist/chunks/worktree-NnuvJmoP.js +1 -0
  330. package/dist/chunks/{xml-DZp0WcWT.js → xml-Dg8-vY8G.js} +1 -1
  331. package/dist/cli.js +1 -1
  332. package/package.json +1 -1
  333. package/dist/chunks/ApproveApiKey-CBEOrsej.js +0 -1
  334. package/dist/chunks/BackgroundTasksDialog-ChDZ6M4c.js +0 -2
  335. package/dist/chunks/ClaudeMdExternalIncludesDialog-CG26Jg7h.js +0 -1
  336. package/dist/chunks/ConsoleOAuthFlow-1aq67dJV.js +0 -1
  337. package/dist/chunks/Doctor-ByQrTdef.js +0 -3
  338. package/dist/chunks/Doctor-DOil8Eh7.js +0 -1
  339. package/dist/chunks/Grove-CJn8QGFo.js +0 -1
  340. package/dist/chunks/MCPConnectionManager-BbGFGZTr.js +0 -1
  341. package/dist/chunks/MessageSelector-A-814zUi.js +0 -3
  342. package/dist/chunks/Messages-C4nIAGDL.js +0 -11
  343. package/dist/chunks/QueryEngine-CK9YRTZo.js +0 -1
  344. package/dist/chunks/REPL-DV96-Prr.js +0 -1
  345. package/dist/chunks/ResumeConversation-BTccgPK8.js +0 -1
  346. package/dist/chunks/SearchExtraToolsTool-CmyZbRut.js +0 -1
  347. package/dist/chunks/SentryErrorBoundary-B9sk4zvj.js +0 -1
  348. package/dist/chunks/Settings-D3Kpcb7q.js +0 -2
  349. package/dist/chunks/TeleportRepoMismatchDialog-BUeyIQCH.js +0 -1
  350. package/dist/chunks/api-DgzWK3bh.js +0 -1
  351. package/dist/chunks/assistant-Ojm6Wsb6.js +0 -1
  352. package/dist/chunks/auth-lQWhUjLX.js +0 -1
  353. package/dist/chunks/backgroundHousekeeping-BcLV1-Ap.js +0 -1
  354. package/dist/chunks/backgroundHousekeeping-KGRk7QeA.js +0 -17
  355. package/dist/chunks/bridgeConfig-ByjfIoJz.js +0 -1
  356. package/dist/chunks/bridgeEnabled-C7AI9y8g.js +0 -1
  357. package/dist/chunks/bridgeMain-B0fLyOLC.js +0 -68
  358. package/dist/chunks/bridgeMain-DKQ1u3k_.js +0 -1
  359. package/dist/chunks/caches-DbE9R4Zh.js +0 -1
  360. package/dist/chunks/changeDetector--9sSzU2e.js +0 -1
  361. package/dist/chunks/channelNotification-CLYOd2-R.js +0 -1
  362. package/dist/chunks/clear-Cf1D1WkR.js +0 -1
  363. package/dist/chunks/client-Bzn58Ea4.js +0 -1
  364. package/dist/chunks/color-DqtpdhFx.js +0 -1
  365. package/dist/chunks/commands-CJz20FMO.js +0 -1
  366. package/dist/chunks/commitAttribution-BgNel6QS.js +0 -1
  367. package/dist/chunks/compact-DLYic2Oa.js +0 -3
  368. package/dist/chunks/context-noninteractive-CzuLiIeO.js +0 -1
  369. package/dist/chunks/conversation-CLRfdC_V.js +0 -1
  370. package/dist/chunks/conversation-D2iFk7Te.js +0 -1
  371. package/dist/chunks/createSession-XhPMcSns.js +0 -1
  372. package/dist/chunks/crossProjectResume-BMWSw62A.js +0 -40
  373. package/dist/chunks/datadog-B5oHSyS1.js +0 -1
  374. package/dist/chunks/earlyInput-JGJo1zcC.js +0 -1
  375. package/dist/chunks/envLessBridgeConfig-DgdkC9jO.js +0 -1
  376. package/dist/chunks/exit-B-9k0zjK.js +0 -1
  377. package/dist/chunks/extra-usage-CsJ9Z2G1.js +0 -1
  378. package/dist/chunks/extractMemories-D34FfNYT.js +0 -1
  379. package/dist/chunks/fast-CxPB-PBH.js +0 -1
  380. package/dist/chunks/gates-D-kXXHiv.js +0 -1
  381. package/dist/chunks/gemini-BFBrPtVM.js +0 -1
  382. package/dist/chunks/grok-Dih61WOo.js +0 -1
  383. package/dist/chunks/hooks-Cw-F-1uO.js +0 -1
  384. package/dist/chunks/inboundAttachments-CZN_sUNx.js +0 -1
  385. package/dist/chunks/initReplBridge-D8sWx97P.js +0 -1
  386. package/dist/chunks/language-DB1HIsF8.js +0 -1
  387. package/dist/chunks/loadAgentsDir-DsskgPWe.js +0 -1
  388. package/dist/chunks/loadPluginHooks-DoFtrBWf.js +0 -1
  389. package/dist/chunks/localSearch-CScvVw0c.js +0 -1
  390. package/dist/chunks/login-FdPNsHJs.js +0 -1
  391. package/dist/chunks/logout-CulTqT7V.js +0 -1
  392. package/dist/chunks/mcp-BXPg0RPm.js +0 -1
  393. package/dist/chunks/mcp-iCbCqg7w.js +0 -6
  394. package/dist/chunks/mcp-yDWIJznG.js +0 -2
  395. package/dist/chunks/memory-B0YG4r65.js +0 -1
  396. package/dist/chunks/model-DG0v1297.js +0 -1
  397. package/dist/chunks/permissions-CYrv_WVH.js +0 -3
  398. package/dist/chunks/pluginBlocklist-BiRgxFei.js +0 -1
  399. package/dist/chunks/pluginOperations-B3gcFjVq.js +0 -2
  400. package/dist/chunks/pluginStartupCheck-Ga_XiMnA.js +0 -1
  401. package/dist/chunks/plugins-zHTS03v8.js +0 -4
  402. package/dist/chunks/policyLimits-Dsz-jkpD.js +0 -1
  403. package/dist/chunks/poorMode-BAuBNURJ.js +0 -1
  404. package/dist/chunks/print-DO52Fudu.js +0 -39
  405. package/dist/chunks/processBashCommand-DltW2Ubs.js +0 -1
  406. package/dist/chunks/processSlashCommand-JLJ_vF05.js +0 -6
  407. package/dist/chunks/prompt-D3rBUscf.js +0 -1
  408. package/dist/chunks/prompt-ohTcwieE.js +0 -1
  409. package/dist/chunks/rate-limit-options-OQt6LUP8.js +0 -1
  410. package/dist/chunks/refresh-TlNezXn4.js +0 -1
  411. package/dist/chunks/registry-m7JojEMY.js +0 -1
  412. package/dist/chunks/rename-CCF7A5mG.js +0 -1
  413. package/dist/chunks/sandbox-adapter-CQ0imVO1.js +0 -1
  414. package/dist/chunks/searchExtraTools-Ntz1u-YC.js +0 -1
  415. package/dist/chunks/sessionFileAccessHooks-DD2a-mTZ.js +0 -1
  416. package/dist/chunks/sessionMemory-BQP_RezB.js +0 -1
  417. package/dist/chunks/sessionMemory-hbxplpxs.js +0 -1
  418. package/dist/chunks/sessionMemoryUtils-DlW9hqOH.js +0 -1
  419. package/dist/chunks/sessionObserver-Lb1c5FPy.js +0 -1
  420. package/dist/chunks/sessionStorage-DG68Xvsy.js +0 -1
  421. package/dist/chunks/setup-lxzmZdw5.js +0 -2
  422. package/dist/chunks/sink-BdRlnpoG.js +0 -1
  423. package/dist/chunks/sinks-Bn0FK_Ab.js +0 -1
  424. package/dist/chunks/skillChangeDetector-4XWLpjQl.js +0 -1
  425. package/dist/chunks/skillLearning-702-D6Lq.js +0 -1
  426. package/dist/chunks/skillLearning-Cz7qU9V6.js +0 -1
  427. package/dist/chunks/statusNoticeHelpers-CwSCVvxP.js +0 -1
  428. package/dist/chunks/teamHelpers-CmDn2xyl.js +0 -1
  429. package/dist/chunks/teammateModeSnapshot-DXtG86pG.js +0 -1
  430. package/dist/chunks/teleport-CPB1CHBs.js +0 -1
  431. package/dist/chunks/thinkback-CF_sLFvX.js +0 -1
  432. package/dist/chunks/thinkback-D1Fv1QYl.js +0 -1
  433. package/dist/chunks/thinkback-play-syg_SJm8.js +0 -1
  434. package/dist/chunks/toolPool-C4CO158z.js +0 -1
  435. package/dist/chunks/toolPool-CRq0GSrk.js +0 -1
  436. package/dist/chunks/undercover-jZEIpxrJ.js +0 -1
  437. package/dist/chunks/upgrade-C_0-l0Zo.js +0 -1
  438. package/dist/chunks/useMainLoopModel-DPmF_cMn.js +0 -1
  439. package/dist/chunks/useMergedTools-BSO1NflP.js +0 -1
  440. package/dist/chunks/useSettingsErrors-453j5XuO.js +0 -1
  441. package/dist/chunks/utils--ZdihcLH.js +0 -1
  442. package/dist/chunks/validatePlugin-Dxm-5f8W.js +0 -1
  443. package/dist/chunks/voiceModeEnabled-0NU5pSM-.js +0 -1
  444. package/dist/chunks/voiceStreamSTT-yvcTWD7i.js +0 -1
  445. package/dist/chunks/worktree-CRn2SbHn.js +0 -1
  446. /package/dist/chunks/{InProcessTransport-DB52dh4f.js → InProcessTransport-gJLr5CIx.js} +0 -0
  447. /package/dist/chunks/{attributionHooks-PygdohOh.js → attributionHooks-Br5LZ6bk.js} +0 -0
  448. /package/dist/chunks/{attributionTrailer-BpvhXgRP.js → attributionTrailer-BMTuK4Ax.js} +0 -0
  449. /package/dist/chunks/{autoModeDenials-Cp6VFdsm.js → autoModeDenials-D8eQ1CoM.js} +0 -0
  450. /package/dist/chunks/{banner-CVXH2xts.js → banner-32EBTKI7.js} +0 -0
  451. /package/dist/chunks/{bedrockClient-qi1-JCOK.js → bedrockClient-Ci523Btx.js} +0 -0
  452. /package/dist/chunks/{ccshareResume-DWLjTF22.js → ccshareResume-CqNm2k-J.js} +0 -0
  453. /package/dist/chunks/{chromeNativeHost-4U39yLtd.js → chromeNativeHost-DX8f9Y2L.js} +0 -0
  454. /package/dist/chunks/{claudeDesktop-D0S1eq1F.js → claudeDesktop-C1qQs6os.js} +0 -0
  455. /package/dist/chunks/{cleanup-Bg_gFgcj.js → cleanup-Pv6U3HiI.js} +0 -0
  456. /package/dist/chunks/{connectHeadless-CwsFt-Mh.js → connectHeadless-DFCrE6O4.js} +0 -0
  457. /package/dist/chunks/{dangerousBackend-BU_PHGR2.js → dangerousBackend-Du0K4q5Z.js} +0 -0
  458. /package/dist/chunks/{earlyInput-tRkbxFv2.js → earlyInput-feVuZGzR.js} +0 -0
  459. /package/dist/chunks/{eventLoopStallDetector-Dnh1fc31.js → eventLoopStallDetector-XfubcyMN.js} +0 -0
  460. /package/dist/chunks/{fpsMetrics-DeezdcwV.js → fpsMetrics-CEQt6Tk1.js} +0 -0
  461. /package/dist/chunks/{fuse-Ch_OAlm3.js → fuse-TM-TeOo_.js} +0 -0
  462. /package/dist/chunks/{instinctParser-DHMa8xa0.js → instinctParser-CJPM8VjX.js} +0 -0
  463. /package/dist/chunks/{lockfile-DBwdlC3K.js → lockfile-Y1hwdHrQ.js} +0 -0
  464. /package/dist/chunks/{main-C6be1KFk.js → main-D9fUXJiD.js} +0 -0
  465. /package/dist/chunks/{observationStore-tvkldXUo.js → observationStore-gFvWXJmc.js} +0 -0
  466. /package/dist/chunks/{openaiShared-Bjrci9n8.js → openaiShared-Dy78YERG.js} +0 -0
  467. /package/dist/chunks/{output-style-XDb9-2Kk.js → output-style-BmEQscMd.js} +0 -0
  468. /package/dist/chunks/{parseConnectUrl-BS6i9JPo.js → parseConnectUrl-C6cvMkkH.js} +0 -0
  469. /package/dist/chunks/{poller-Ds0Y6Cir.js → poller-Dbo07OEA.js} +0 -0
  470. /package/dist/chunks/{postCommitAttribution-Ehmwzzuq.js → postCommitAttribution-DhFkZMxJ.js} +0 -0
  471. /package/dist/chunks/{projectContext-eXMSfgdZ.js → projectContext-iWPqcl0Z.js} +0 -0
  472. /package/dist/chunks/{renderOptions-BiyC2rj1.js → renderOptions-rmj4Mkls.js} +0 -0
  473. /package/dist/chunks/{rewind-CXplHgh_.js → rewind-DAn-nNs-.js} +0 -0
  474. /package/dist/chunks/{sanitization-CYp-9DbE.js → sanitization-JYRkZFrK.js} +0 -0
  475. /package/dist/chunks/{sdkHeapDumpMonitor--fevrC5z.js → sdkHeapDumpMonitor-DKtfJW5o.js} +0 -0
  476. /package/dist/chunks/{server-C5XZSlto.js → server-CswFAYwN.js} +0 -0
  477. /package/dist/chunks/{serverBanner-WlSYP-f8.js → serverBanner-CImTYGhY.js} +0 -0
  478. /package/dist/chunks/{serverLog-DtsUvDiY.js → serverLog-Bwt7XEmk.js} +0 -0
  479. /package/dist/chunks/{sessionDataUploader-Ctjo1bgR.js → sessionDataUploader-CKRXCBxI.js} +0 -0
  480. /package/dist/chunks/{sessionManager-Dw72ZUTg.js → sessionManager-Ca2O821f.js} +0 -0
  481. /package/dist/chunks/{stickers-2K05wjSp.js → stickers-BMh2qjgF.js} +0 -0
  482. /package/dist/chunks/{udsClient-BvG_Jip0.js → udsClient-BdPOrL1H.js} +0 -0
  483. /package/dist/chunks/{upstreamproxy-DcLeL2XX.js → upstreamproxy-Ci5T_JCo.js} +0 -0
  484. /package/dist/chunks/{voice-DXiiy8HX.js → voice-BcA5h8ya.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-CzsijfHZ.js";import{Jv as o,Lo as s,Wv as c,lo as l}from"./loadAgentsDir-HZ19tmOZ.js";import{tn as u}from"./prompt-BxoRdmaw.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=l({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(),s(),o()}));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-Di342QoJ.js";import{Ct as r,cn as i}from"./state-sIHsFpDu.js";import{et as a}from"./log-CzsijfHZ.js";import{Jv as o,Qv as s,Vo as c,po as l}from"./loadAgentsDir-DaApSWNv.js";import{tn as u}from"./prompt-DHHypkUR.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=l({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=o();if(t)return{...e,input:{...e.input,plan:t}}}return e});return{...e.message,content:n}}var y=e((()=>{i(),a(),u(),n(),c(),s()}));export{p as a,f as i,y as n,h as o,g as r,_ as s,m as t};
@@ -0,0 +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 l,t as u,v as ee,x as te}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Ac as f,Nc as p,Po as m,Sc as h,bc as g,jo as ne}from"./paths-BZbIj1Z1.js";import{V as re,W as ie}from"./debug-UI3T040K.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{n as y,o as ae}from"./process-DMKLUQIO.js";import{i as b,o as x}from"./platform-CuyedWpe.js";import{s as S,u as C}from"./types-Csi32ZXh.js";import{AC as w,BS as T,Cw as E,Dx as oe,FC as se,JC as D,NC as O,Nx as k,OC as A,VS as j,YC as M,_w as N,aC as P,aw as F,by as I,gw as L,hy as R,iC as z,jC as B,jx as V,kC as H,lw as U,mw as W,my as G,ow as ce,rE as K,tE as q,yw as J,yy as le}from"./loadAgentsDir-DaApSWNv.js";import{n as Y,t as X}from"./exit-_obETqBv.js";import{stat as ue}from"fs/promises";import{cwd as de}from"process";n();var Z=e(i(),1);K(),y(),u(),J(),ne(),P(),I();var Q=d();function fe({servers:e,scope:t,onDone:n}){let r=Object.keys(e),[i,u]=(0,Z.useState)({});(0,Z.useEffect)(()=>{W().then(({servers:e})=>u(e))},[]);let d=r.filter(e=>i[e]!==void 0);async function f(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 U(e,n,t),r++}}h(r)}let[p]=a(),h=(0,Z.useCallback)(e=>{ae(e>0?`\n${ee(`success`,p)(`Successfully imported ${e} MCP ${m(e,`server`)} to ${t} config.`)}\n`:`
2
+ No servers were imported.`),n(),q()},[p,t,n]),g=(0,Z.useCallback)(()=>{h(0)},[h]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(s,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${r.length} MCP ${m(r.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:g,hideInputGuide:!0,children:[d.length>0&&(0,Q.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,Q.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Q.jsx)(le,{options:r.map(e=>({label:`${e}${d.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:r.filter(e=>!d.includes(e)),onSubmit:f,onCancel:g,hideIndexes:!0})]}),(0,Q.jsx)(te,{paddingX:1,children:(0,Q.jsx)(o,{dimColor:!0,italic:!0,children:(0,Q.jsxs)(l,{children:[(0,Q.jsx)(c,{shortcut:`Space`,action:`select`}),(0,Q.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Q.jsx)(z,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}u(),R(),_(),B(),k(),J(),ce(),j(),f(),re(),K(),S(),x();async function $(e,t){try{let n=await oe(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function pe({debug:e,verbose:t}){let n=de();v(`tengu_mcp_start`,{});try{await ue(n)}catch(e){throw ie(e)&&X(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-OvlOCIFL.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-CJvRg7ft.js`);await i(n,e??!1,t??!1)}catch(e){X(`Error: Failed to start MCP server: ${e}`)}}async function me(e,t){let n=L(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(H(e,n),A(e,n))};try{if(t.scope){let n=M(t.scope);v(`tengu_mcp_delete`,{name:e,scope:n}),await E(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),Y(`File modified: ${D(n)}`)}let n=g(),i=h(),{servers:a}=N(`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)X(`No MCP server found with name: "${e}"`);else if(s.length===1){let t=s[0];v(`tengu_mcp_delete`,{name:e,scope:t}),await E(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),Y(`File modified: ${D(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${F(e)} (${D(e)})\n`)}),process.stderr.write(`
3
+ To remove from a specific scope, use:
4
+ `),s.forEach(t=>{process.stderr.write(` claude mcp remove "${e}" -s ${t}\n`)}),X()}catch(e){X(e.message)}}async function he(){v(`tengu_mcp_list`,{});let{servers:e}=await W();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 $(e,t)}),{concurrency:V()});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 q(0)}async function ge(e){v(`tengu_mcp_get`,{name:e});let t=L(e);t||X(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${F(t.scope)}`);let n=await $(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`),w(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`),w(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 q(0)}async function _e(e,t,n){try{let r=M(n.scope),i=C(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 O():void 0;await U(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`&&se(e,{type:i.type,url:i.url},a),v(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),Y(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){X(e.message)}}async function ve(e){try{let t=M(e.scope);v(`tengu_mcp_add`,{scope:t,platform:b(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-C1qQs6os.js`),i=await n();Object.keys(i).length===0&&Y(`No MCP servers found in Claude Desktop configuration or configuration file does not exist.`);let{unmount:a}=await r((0,Q.jsx)(T,{children:(0,Q.jsx)(G,{children:(0,Q.jsx)(fe,{servers:i,scope:t,onDone:()=>{a()}})})}),{exitOnCtrlC:!0})}catch(e){X(e.message)}}async function ye(){v(`tengu_mcp_reset_mcpjson_choices`,{}),p(e=>({...e,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),Y(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
6
+ You will be prompted for approval next time you start Claude Code.`)}export{ve as mcpAddFromDesktopHandler,_e as mcpAddJsonHandler,ge as mcpGetHandler,he as mcpListHandler,me as mcpRemoveHandler,ye as mcpResetChoicesHandler,pe as mcpServeHandler};
@@ -0,0 +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-BZbIj1Z1.js";import{E as s,w as c}from"./debug-UI3T040K.js";import{o as l,s as u}from"./log-CzsijfHZ.js";import{$E as d,G as f,Gm as p,K as m,Km as h,La as g,MD as _,ND as v,QE as y,Ra as b,Vo as x,Xu as S,Zu as C,al as w,du as T,ol as E,po as D,uu as O}from"./loadAgentsDir-DaApSWNv.js";import{Bn as k,Vn as A,zn as j}from"./prompt-DHHypkUR.js";import{a as M,o as N}from"./fileStateCache-C7-TxF8G.js";import{n as P,t as F}from"./stdio-BEEzuxaZ.js";r(),P(),e(),d(),g(),A(),C(),v(),N(),l(),x(),o(),m(),p(),c(),T(),w();var I=[b];async function L(e,r,o){let c=M(100);h(e);let l=new i({name:`claude/tengu`,version:`2.6.12`},{capabilities:{tools:{}}});l.setRequestHandler(t,async()=>{let e=k(),t=S(e);return{tools:await Promise.all(t.map(async n=>{let r;if(n.outputSchema){let e=E(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:E(n.inputSchema),outputSchema:r}}))}}),l.setRequestHandler(n,async({params:{name:e,arguments:t}})=>{let n=S(k()),i=j(n,e);if(!i)throw Error(`Tool ${e} not found`);let l={abortController:_(),options:{commands:I,tools:n,mainLoopModel:a(),thinkingConfig:{type:`disabled`},mcpClients:[],mcpResources:{},isNonInteractiveSession:!0,debug:r,verbose:o,agentDefinitions:{activeAgents:[],allAgents:[]}},getAppState:()=>y(),setAppState:()=>{},messages:[],readFileState:c,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,f,D({content:[]}));return{content:[{type:`text`,text:typeof r==`string`?r:s(r.data)}]}}catch(e){return u(e),{isError:!0,content:[{type:`text`,text:(e instanceof Error?O(e):[String(e)]).filter(Boolean).join(`
2
+ `).trim()||`Error`}]}}});async function d(){let e=new F;await l.connect(e)}return await d()}export{L as startMCPServer};
@@ -0,0 +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{Do as _,Po as v,jo as y}from"./paths-BZbIj1Z1.js";import{c as b,s as x}from"./debug-UI3T040K.js";import{DC as S,EC as C,Ey as w,HS as T,JC as E,Lx as ee,MC as D,US as te,VS as O,aC as k,iC as A,jC as j,ow as ne,rw as M,tw as re,vy as ie,wy as N}from"./loadAgentsDir-DaApSWNv.js";import{D as ae,O as oe}from"./rcDebugLog-CF73Wofq.js";import{t as P}from"./useKeybinding-FsOnjW6T.js";import{i as se,n as F,r as ce}from"./MCPConnectionManager-ip1xShU_.js";import{n as le,t as ue}from"./McpParsingWarnings-DhobExFM.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 _e}from"./PluginSettings-BetzicTb.js";function ve({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[d,f]=(0,z.useState)(!1),[g,v]=(0,z.useState)(null),[y,b]=(0,z.useState)(null),x=(0,z.useRef)(null);(0,z.useEffect)(()=>()=>x.current?.abort(),[]),p(`confirm:no`,(0,z.useCallback)(()=>{d&&(x.current?.abort(),x.current=null,f(!1),b(null))},[d]),{context:`Confirmation`,isActive:d});let S=(0,z.useCallback)(async()=>{if(!e.needsAuth||!e.url)return;f(!0),v(null);let t=new AbortController;x.current=t;try{let r={type:e.transport,url:e.url};await D(e.name,r,b,t.signal),n?.(`Authentication successful for ${e.name}. The server will connect when the agent runs.`)}catch(e){e instanceof Error&&!(e instanceof C)&&v(e.message)}finally{f(!1),x.current=null}},[e,n]),w=_(String(e.name));if(d)return(0,B.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,B.jsxs)(s,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(N,{}),(0,B.jsx)(s,{children:` A browser window will open for authentication`})]}),y&&(0,B.jsxs)(h,{flexDirection:`column`,children:[(0,B.jsx)(s,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,B.jsx)(i,{url:y})]}),(0,B.jsx)(h,{marginLeft:3,children:(0,B.jsxs)(s,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,B.jsx)(A,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let T=[];return e.needsAuth&&T.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),T.push({label:`Back`,value:`back`}),(0,B.jsxs)(c,{title:`${w} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,B.jsxs)(s,{children:[`Press `,e.keyName,` again to exit`]}):(0,B.jsxs)(u,{children:[(0,B.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,B.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,B.jsx)(A,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,B.jsxs)(h,{flexDirection:`column`,gap:0,children:[(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Type: `}),(0,B.jsx)(s,{dimColor:!0,children:e.transport})]}),e.url&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`URL: `}),(0,B.jsx)(s,{dimColor:!0,children:e.url})]}),e.command&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Command: `}),(0,B.jsx)(s,{dimColor:!0,children:e.command})]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Used by: `}),(0,B.jsx)(s,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,B.jsxs)(h,{marginTop:1,children:[(0,B.jsx)(s,{bold:!0,children:`Status: `}),(0,B.jsxs)(s,{children:[m(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,B.jsxs)(s,{children:[m(`success`,a)(r.tick),` authenticated`]}):(0,B.jsxs)(s,{children:[m(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,B.jsx)(h,{children:(0,B.jsx)(s,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,B.jsx)(h,{children:(0,B.jsxs)(s,{color:`error`,children:[`Error: `,g]})}),(0,B.jsx)(h,{children:(0,B.jsx)(ee,{options:T,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var z,B,ye=e((()=>{n(),z=t(a(),1),f(),P(),j(),y(),k(),ie(),w(),B=g()}));function V(e){switch(e){case`project`:return{label:`Project MCPs`,path:E(e)};case`user`:return{label:`User MCPs`,path:E(e)};case`local`:return{label:`Local MCPs`,path:E(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function be(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 xe({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:a,onComplete:f}){let[p]=o(),[g,_]=(0,H.useState)(0),y=H.useMemo(()=>be(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),x=H.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=H.useMemo(()=>(y.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[y]),C=V(`dynamic`),w=H.useMemo(()=>{let e=[];for(let t of W){let n=y.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},[y,x,t,S]),T=(0,H.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,H.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":T},{context:`Confirmation`});let E=e=>w.findIndex(t=>t.type===`server`&&t.server===e),ee=e=>w.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),D=b(),te=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let O=e=>{let t=E(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,U.jsxs)(h,{children:[(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(s,{dimColor:!n,children:a})]},`${e.name}-${t}`)},k=e=>{let t=ee(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,U.jsxs)(h,{children:[(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(s,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},j=e.length+t.length;return(0,U.jsxs)(h,{flexDirection:`column`,children:[(0,U.jsx)(ue,{}),(0,U.jsx)(c,{title:`Manage MCP servers`,subtitle:`${j} ${v(j,`server`)}`,onCancel:T,hideInputGuide:!0,children:(0,U.jsxs)(h,{flexDirection:`column`,children:[W.map(e=>{let t=y.get(e);if(!t||t.length===0)return null;let n=V(e);return(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(h,{paddingLeft:2,children:[(0,U.jsx)(s,{bold:!0,children:n.label}),n.path&&(0,U.jsxs)(s,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>O(e))]},e)}),x.length>0&&(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(h,{paddingLeft:2,children:(0,U.jsx)(s,{bold:!0,children:`claude.ai`})}),x.map(e=>O(e))]}),t.length>0&&(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(h,{paddingLeft:2,children:(0,U.jsx)(s,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,U.jsxs)(h,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(h,{paddingLeft:2,children:(0,U.jsxs)(s,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>k(e))]},e))]}),S.length>0&&(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(h,{paddingLeft:2,children:[(0,U.jsx)(s,{bold:!0,children:C.label}),C.path&&(0,U.jsxs)(s,{dimColor:!0,children:[` (`,C.path,`)`]})]}),S.map(e=>O(e))]}),(0,U.jsxs)(h,{flexDirection:`column`,children:[te&&(0,U.jsx)(s,{dimColor:!0,children:D?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,U.jsxs)(s,{dimColor:!0,children:[(0,U.jsx)(i,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,U.jsx)(h,{paddingX:1,children:(0,U.jsx)(s,{dimColor:!0,italic:!0,children:(0,U.jsxs)(u,{children:[(0,U.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,U.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,U.jsx)(A,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var H,U,W,G=e((()=>{n(),H=t(a(),1),f(),P(),ne(),x(),y(),k(),le(),U=g(),W=[`project`,`local`,`user`,`enterprise`]}));function Se({serverName:e,onComplete:t}){let[n]=o(),i=te(),a=ce(),[c,l]=(0,K.useState)(!0),[u,d]=(0,K.useState)(null);return(0,K.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,q.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(s,{color:`text`,children:[`Reconnecting to `,(0,q.jsx)(s,{bold:!0,children:e})]}),(0,q.jsxs)(h,{children:[(0,q.jsx)(N,{}),(0,q.jsx)(s,{children:` Establishing connection to MCP server`})]})]}):u?(0,q.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(h,{children:[(0,q.jsxs)(s,{children:[m(`error`,n)(r.cross),` `]}),(0,q.jsxs)(s,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,q.jsxs)(s,{dimColor:!0,children:[`Error: `,u]})]}):null}var K,q,J=e((()=>{n(),K=t(a(),1),f(),F(),O(),w(),q=g()}));function Y({onComplete:e}){let t=T(e=>e.mcp),n=T(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>re(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 S(e.name,e.config).tokens(),r=ae()!==null&&e.type===`connected`,i=e.type===`connected`&&M(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)(xe,{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=M(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=M(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)(ve,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Ce=e((()=>{X=t(a(),1),j(),ne(),O(),oe(),ye(),G(),_e(),I(),R(),L(),Z=g()})),we=e((()=>{ye(),G(),J(),_e(),Ce(),I(),R(),L()}));function Te({action:e,target:t,onComplete:n}){let r=T(e=>e.mcp.clients),i=se(),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)(Y,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(Se,{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)(Y,{onComplete:e})}var Q,$;e((()=>{Q=t(a(),1),we(),J(),F(),O(),pe(),$=g()}))();export{Ee as call};
@@ -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{Ac as a,Jt as o,M as s,Pc as c,S as l,Sc as u,_ as d,_c as f,on as p,z as m}from"./paths-D8Fx3kUi.js";import{d as h,s as g}from"./debug-UI3T040K.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{f_ as y,p_ as b}from"./loadAgentsDir-HZ19tmOZ.js";import{r as x,t as S}from"./datadog-Bd9AgZT-.js";import{c as C,i as w,o as T}from"./common-CMCv4N_v.js";import{n as E,t as D}from"./stdio-BEEzuxaZ.js";import{r as O,t as k}from"./sink-N5XR8Zgp.js";import{format as A}from"util";function j(e){return z.some(t=>t===e)}function M(){if(process.env.USER_TYPE===`ant`||d(`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)=>{c(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(){f(),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()),h(`[Claude in Chrome] Starting MCP server`),await e.connect(t),h(`[Claude in Chrome] MCP server started`)}var I,L,R,z,B;e((()=>{i(),k(),E(),S(),s(),l(),_(),p(),a(),g(),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){h(A(e,t??``),{level:`debug`})}debug(e,t){h(A(e,t??``),{level:`debug`})}info(e,t){h(A(e,t??``),{level:`info`})}warn(e,t){h(A(e,t??``),{level:`warn`})}error(e,t){h(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{Ac as a,Jt as o,M as s,Pc as c,S as l,Sc as u,_ as d,_c as f,on as p,z as m}from"./paths-BZbIj1Z1.js";import{d as h,s as g}from"./debug-UI3T040K.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{__ as y,g_ as b}from"./loadAgentsDir-DaApSWNv.js";import{r as x,t as S}from"./datadog-By0GhDXI.js";import{c as C,i as w,o as T}from"./common-CMCv4N_v.js";import{n as E,t as D}from"./stdio-BEEzuxaZ.js";import{r as O,t as k}from"./sink-DLRpC2qX.js";import{format as A}from"util";function j(e){return z.some(t=>t===e)}function M(){if(process.env.USER_TYPE===`ant`||d(`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)=>{c(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 y({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(){f(),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()),h(`[Claude in Chrome] Starting MCP server`),await e.connect(t),h(`[Claude in Chrome] MCP server started`)}var I,L,R,z,B;e((()=>{i(),k(),E(),S(),s(),l(),_(),p(),a(),g(),t(),b(),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){h(A(e,t??``),{level:`debug`})}debug(e,t){h(A(e,t??``),{level:`debug`})}info(e,t){h(A(e,t??``),{level:`info`})}warn(e,t){h(A(e,t??``),{level:`warn`})}error(e,t){h(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{Ac as r,M as i,_c as a,z as o}from"./paths-D8Fx3kUi.js";import{d as s,s as c}from"./debug-UI3T040K.js";import{r as l,t as u}from"./datadog-Bd9AgZT-.js";import{i as d,r as f,t as p}from"./src-BlLavFUS.js";import{i as m,t as h}from"./gates-BGfvIJXl.js";import{n as g,t as _}from"./hostAdapter-CbXytx4y.js";import{n as v,t as y}from"./stdio-BEEzuxaZ.js";import{r as b,t as x}from"./sink-N5XR8Zgp.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(()=>{}),s(`[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(){a(),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()),s(`[Computer Use MCP] Starting MCP server`),await e.connect(t),s(`[Computer Use MCP] MCP server started`)}var z;e((()=>{p(),x(),v(),t(),u(),i(),r(),c(),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{Ac as r,M as i,_c as a,z as o}from"./paths-BZbIj1Z1.js";import{d as s,s as c}from"./debug-UI3T040K.js";import{r as l,t as u}from"./datadog-By0GhDXI.js";import{i as d,r as f,t as p}from"./src-BlLavFUS.js";import{i as m,t as h}from"./gates-Be4ovdxj.js";import{n as g,t as _}from"./hostAdapter-BfBHV5nj.js";import{n as v,t as y}from"./stdio-BEEzuxaZ.js";import{r as b,t as x}from"./sink-DLRpC2qX.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(()=>{}),s(`[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(){a(),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()),s(`[Computer Use MCP] Starting MCP server`),await e.connect(t),s(`[Computer Use MCP] MCP server started`)}var z;e((()=>{p(),x(),v(),t(),u(),i(),r(),c(),F(),m(),g(),z=1e3}))();export{L as createComputerUseMcpServerForCli,R as runComputerUseMcpServer};
@@ -0,0 +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{Zc as ee,a as _,el as v,lo as y,n as te,oo as b,s as x}from"./paths-BZbIj1Z1.js";import{R as S,V as C}from"./debug-UI3T040K.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-CN3qtTb_.js";import{o as A,s as j}from"./log-CzsijfHZ.js";import{g as ne,x as M}from"./startupProfiler-DnXZaX4A.js";import{Ek as N,HS as P,Jn as F,Kn as re,Lx as ie,VS as I,au as ae,iu as L,jk as R,kk as z,mp as oe,pp as se,vy as ce}from"./loadAgentsDir-DaApSWNv.js";import{r as le,t as B}from"./browser-fLRXxIsQ.js";import{t as V}from"./useKeybinding-FsOnjW6T.js";import{l as H,u as U}from"./referral-Nz20w4pB.js";import{r as W,t as ue}from"./promptEditor-I8ZpszKv.js";import{homedir as de}from"os";import{join as G,relative as fe}from"path";import{mkdir as K,writeFile as pe}from"fs/promises";function me(e){return O(e)!==null}var he=e((()=>{k()}));function ge({onSelect:e,onCancel:t}){let r=(0,q.use)(z()),a=G(n(),`CLAUDE.md`),o=G(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=me(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=P(e=>e.agentDefinitions);if(x()){_.push({label:`Open auto-memory folder`,value:`${X}${te()}`,description:``});for(let e of v.activeAgents)if(e.memory){let t=re(e.agentType,e.memory);_.push({label:`Open ${i.bold(e.agentType)} agent memory`,value:`${X}${t}`,description:`${e.memory} scope`})}}h.push(..._);let b=Y&&h.some(e=>e.value===Y)?Y:h[0]?.value||``,[S,C]=(0,q.useState)(x),[w,E]=(0,q.useState)(ae),[D]=(0,q.useState)(x),O=P(e=>Object.values(e.tasks).some(e=>e.type===`dream`&&e.status===`running`)),[k,A]=(0,q.useState)(null);(0,q.useEffect)(()=>{D&&oe().then(A)},[D,O]);let j=O?`running`:k===null?``:k===0?`never`:`last ran ${ne(new Date(k))}`,[M,N]=(0,q.useState)(null),F=M!==null,I=+!!D;function L(){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 U(),f(`confirm:no`,t,{context:`Confirmation`}),f(`confirm:yes`,()=>{M===0?L():M===1&&R()},{context:`Confirmation`,isActive:F}),f(`select:next`,()=>{N(e=>e!==null&&e<I?e+1:null)},{context:`Select`,isActive:F}),f(`select:previous`,()=>{N(e=>e!==null&&e>0?e-1:e)},{context:`Select`,isActive:F}),(0,J.jsxs)(p,{flexDirection:`column`,width:`100%`,children:[(0,J.jsxs)(p,{flexDirection:`column`,marginBottom:1,children:[(0,J.jsx)(l,{isFocused:M===0,children:(0,J.jsxs)(c,{children:[`Auto-memory: `,S?`on`:`off`]})}),D&&(0,J.jsx)(l,{isFocused:M===1,styled:!1,children:(0,J.jsxs)(c,{color:M===1?`suggestion`:void 0,children:[`Auto-dream: `,w?`on`:`off`,j&&(0,J.jsxs)(c,{dimColor:!0,children:[` · `,j]}),!O&&w&&(0,J.jsx)(c,{dimColor:!0,children:` · /dream to run`})]})})]}),(0,J.jsx)(ie,{defaultFocusValue:b,options:h,isDisabled:F,onChange:t=>{if(t.startsWith(X)){let e=t.slice(15);K(e,{recursive:!0}).catch(()=>{}).then(()=>le(e));return}Y=t,e(t)},onCancel:t,onUpFromFirstItem:()=>N(I)})]})}var q,J,Y,X,_e=e((()=>{a(),s(),q=t(s(),1),h(),H(),d(),V(),_(),w(),L(),se(),I(),F(),B(),R(),r(),v(),M(),he(),b(),ce(),J=m(),X=`__open_folder__`}));function ve(e){let t=de(),n=D(),r=e.startsWith(t)?`~`+e.slice(t.length):null,i=e.startsWith(n)?`./`+fe(n,e):null;return r&&i?r.length<=i.length?r:i:r||i||e}var ye=e((()=>{s(),d(),E(),m()}));function be({onDone:e}){let t=async t=>{try{t.includes(n())&&await K(n(),{recursive:!0});try{await pe(t,``,{encoding:`utf8`,flag:`wx`})}catch(e){if(S(e)!==`EEXIST`)throw e}await ue(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 ${ve(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)(ge,{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(),_e(),ye(),R(),r(),C(),A(),W(),Q=m(),$=async e=>(N(),await z(),(0,Q.jsx)(be,{onDone:e}))}))();export{$ as call};
@@ -0,0 +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{Lx as s,Rx as c,gt as l,ht as u,mt as d,pt as f}from"./loadAgentsDir-DaApSWNv.js";function p({onDone:e}){let t=u(),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){l(n);let r=t.find(e=>e.slug===n);e(`${r?.icon} Mode switched to: ${r?.name} (${r?.slug}) — ${r?.description}`,{display:`system`})}function c(){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:c,visibleOptionCount:t.length})]})}var m,h,g;e((()=>{m=t(n(),1),i(),c(),d(),h=o(),g=async(e,t,n)=>{let r=n?.trim().toLowerCase();if(r){let t=u(),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
+ `)}`,{display:`system`});return}l(r),e(`${n.icon} Mode switched to: ${n.name} (${n.slug}) — ${n.description}`,{display:`system`});return}return(0,h.jsx)(p,{onDone:e})}}))();export{g as call};
@@ -0,0 +1 @@
1
+ import{Dr as e,Pr as t}from"./paths-BZbIj1Z1.js";t();export{e as getMainLoopModel};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i}from"./src-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-D8Fx3kUi.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{A as x,et as S,j as C}from"./log-CzsijfHZ.js";import{BS as w,Df as T,Ef as E,Jg as D,Kg as O,LS as k,RS as A,qg as j}from"./loadAgentsDir-HZ19tmOZ.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-CEHCMe7l.js";function I({onDone:e}){let t=A(e=>e.mainLoopModel),r=A(e=>e.mainLoopModelForSession),i=A(e=>e.fastMode),a=w();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=A(e=>e.fastMode),i=w(),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!O()&&!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=A(e=>e.mainLoopModel),r=A(e=>e.mainLoopModelForSession),i=A(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(),k(),F(),h(),o(),D(),c(),f(),E(),W=a(),G=async(e,t,n)=>{if(n=n?.trim()||``,C.includes(n))return b(`tengu_model_command_inline_help`,{args:n}),(0,W.jsx)(V,{onDone:e});if(x.includes(n)){e(`Run /model to open the model selection menu, or /model [modelName] to set the model.`,{display:`system`});return}return n?(b(`tengu_model_command_inline`,{args:n}),(0,W.jsx)(L,{args:n,onDone:e})):(0,W.jsx)(I,{onDone:e})}}))();export{G as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{$r as o,Lr as s,Pr as c,Qr as l,Si as u,Vr as d,Xr as f,Zr as p,ui as m,vi as h,wr as g,xi as _,yi as v}from"./paths-BZbIj1Z1.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{A as x,et as S,j as C}from"./log-CzsijfHZ.js";import{Af as w,HS as T,Qg as E,VS as D,WS as O,Xg as k,Zg as A,jf as j}from"./loadAgentsDir-DaApSWNv.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-CMJ1LEPS.js";function I({onDone:e}){let t=T(e=>e.mainLoopModel),r=T(e=>e.mainLoopModelForSession),i=T(e=>e.fastMode),a=O();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=T(e=>e.fastMode),i=O(),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 j(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!k()&&!s()&&t.includes(`opus`)&&t.includes(`[1m]`)}function B(e){let t=e.toLowerCase();return!A()&&(t.includes(`sonnet[1m]`)||t.includes(`sonnet-4-6[1m]`))}function V({onDone:e}){let t=T(e=>e.mainLoopModel),r=T(e=>e.mainLoopModelForSession),i=T(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(),D(),F(),h(),o(),E(),c(),f(),w(),W=a(),G=async(e,t,n)=>{if(n=n?.trim()||``,C.includes(n))return b(`tengu_model_command_inline_help`,{args:n}),(0,W.jsx)(V,{onDone:e});if(x.includes(n)){e(`Run /model to open the model selection menu, or /model [modelName] to set the model.`,{display:`system`});return}return n?(b(`tengu_model_command_inline`,{args:n}),(0,W.jsx)(L,{args:n,onDone:e})):(0,W.jsx)(I,{onDone:e})}}))();export{G as call};
@@ -1 +1 @@
1
- import{cn as e,tr as t}from"./state-sIHsFpDu.js";import{Ac as n,Is as r,It as i,Lt as a,Ns as o,Pc as s,Rt as c,Sc as l,Vs as u,on as d}from"./paths-D8Fx3kUi.js";import{K as f,V as p}from"./debug-UI3T040K.js";import{o as m,s as h}from"./log-CzsijfHZ.js";import{_a as g,ya as _}from"./loadAgentsDir-HZ19tmOZ.js";import{d as v,m as y,p as b}from"./rcDebugLog-5XEbz_Yg.js";e(),d(),n(),p(),m(),_(),o(),v();function x(e){return t=>({...t,...typeof e.permission_mode==`string`?{toolPermissionContext:{...t.toolPermissionContext,mode:r(e.permission_mode)}}:{},...typeof e.is_ultraplan_mode==`boolean`?{isUltraplanMode:e.is_ultraplan_mode}:{}})}function S({newState:e,oldState:n}){let r=n.toolPermissionContext.mode,o=e.toolPermissionContext.mode;if(r!==o){let t=u(r),i=u(o);t!==i&&y({permission_mode:i,is_ultraplan_mode:i===`plan`&&e.isUltraplanMode&&!n.isUltraplanMode?!0:null}),b(o)}if(e.mainLoopModel!==n.mainLoopModel&&t(e.mainLoopModel),e.expandedView!==n.expandedView){let t=e.expandedView===`tasks`,n=e.expandedView===`teammates`;(l().showExpandedTodos!==t||l().showSpinnerTree!==n)&&s(e=>({...e,showExpandedTodos:t,showSpinnerTree:n}))}if(e.verbose!==n.verbose&&l().verbose!==e.verbose){let t=e.verbose;s(e=>({...e,verbose:t}))}if(process.env.USER_TYPE===`ant`&&e.tungstenPanelVisible!==n.tungstenPanelVisible&&e.tungstenPanelVisible!==void 0&&l().tungstenPanelVisible!==e.tungstenPanelVisible){let t=e.tungstenPanelVisible;s(e=>({...e,tungstenPanelVisible:t}))}if(e.settings!==n.settings)try{i(),a(),c(),e.settings.env!==n.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{Ac as n,Is as r,It as i,Lt as a,Ns as o,Pc as s,Rt as c,Sc as l,Vs as u,on as d}from"./paths-BZbIj1Z1.js";import{K as f,V as p}from"./debug-UI3T040K.js";import{o as m,s as h}from"./log-CzsijfHZ.js";import{Ca as g,xa as _}from"./loadAgentsDir-DaApSWNv.js";import{d as v,m as y,p as b}from"./rcDebugLog-CF73Wofq.js";e(),d(),n(),p(),m(),g(),o(),v();function x(e){return t=>({...t,...typeof e.permission_mode==`string`?{toolPermissionContext:{...t.toolPermissionContext,mode:r(e.permission_mode)}}:{},...typeof e.is_ultraplan_mode==`boolean`?{isUltraplanMode:e.is_ultraplan_mode}:{}})}function S({newState:e,oldState:n}){let r=n.toolPermissionContext.mode,o=e.toolPermissionContext.mode;if(r!==o){let t=u(r),i=u(o);t!==i&&y({permission_mode:i,is_ultraplan_mode:i===`plan`&&e.isUltraplanMode&&!n.isUltraplanMode?!0:null}),b(o)}if(e.mainLoopModel!==n.mainLoopModel&&t(e.mainLoopModel),e.expandedView!==n.expandedView){let t=e.expandedView===`tasks`,n=e.expandedView===`teammates`;(l().showExpandedTodos!==t||l().showSpinnerTree!==n)&&s(e=>({...e,showExpandedTodos:t,showSpinnerTree:n}))}if(e.verbose!==n.verbose&&l().verbose!==e.verbose){let t=e.verbose;s(e=>({...e,verbose:t}))}if(process.env.USER_TYPE===`ant`&&e.tungstenPanelVisible!==n.tungstenPanelVisible&&e.tungstenPanelVisible!==void 0&&l().tungstenPanelVisible!==e.tungstenPanelVisible){let t=e.tungstenPanelVisible;s(e=>({...e,tungstenPanelVisible:t}))}if(e.settings!==n.settings)try{i(),a(),c(),e.settings.env!==n.settings.env&&_()}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-D8Fx3kUi.js";import{d as c,s as l}from"./debug-UI3T040K.js";import{BE as ee,FT as u,IT as d,Ko as f,Lo as p,PT as m,Wo as h,Xc as g,Yc as _,Zc as v,__ as y,b_ as te,bo as b,co as x,fm as S,g_ as C,gm as w,st as T,ut as E,v_ as D,x_ as O,y_ as ne,zE as k}from"./loadAgentsDir-HZ19tmOZ.js";import{Bn as A,Hn as j,Vn as M,i as N,r as P,t as F}from"./prompt-BxoRdmaw.js";import{F as I,I as L,L as R,P as z,R as B,Y as V}from"./rcDebugLog-5XEbz_Yg.js";import{n as H,t as U}from"./openaiShared-Bjrci9n8.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-BZbIj1Z1.js";import{d as c,s as l}from"./debug-UI3T040K.js";import{$c as u,BT as ee,C_ as d,Jo as f,RT as p,S_ as m,T_ as h,UE as g,Vo as _,WE as v,Xo as te,b_ as ne,bm as y,el as b,fo as x,gm as S,st as C,tl as w,ut as T,w_ as E,wo as D,x_ as O,zT as k}from"./loadAgentsDir-DaApSWNv.js";import{Bn as A,Hn as j,Vn as M,i as N,r as P,t as F}from"./prompt-DHHypkUR.js";import{F as I,I as L,L as R,P as z,R as B,Y as V}from"./rcDebugLog-CF73Wofq.js";import{n as H,t as U}from"./openaiShared-Dy78YERG.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(`
@@ -6,5 +6,5 @@ import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,s as n,u as r}from"./envUt
6
6
  `);for(;a>=0;){let e=r.slice(0,a);r=r.slice(a+2);let t=e.split(/\r?\n/).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
7
7
  `);if(t&&t!==`[DONE]`){let e=JSON.parse(t);e&&typeof e==`object`&&(yield e)}a=r.indexOf(`
8
8
 
9
- `)}}}function ie(e){let t=e?.usage,n=t?.input_tokens_details;return{input_tokens:typeof t?.input_tokens==`number`?t.input_tokens:0,output_tokens:typeof t?.output_tokens==`number`?t.output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:typeof n?.cached_tokens==`number`?n.cached_tokens:0}}function ae(e){return e?.status===`incomplete`?`max_tokens`:`end_turn`}async function*oe(e,t){let n=`msg_${W().replace(/-/g,``).slice(0,24)}`,r=new Map,i=!1,a=-1,o=!1,s=!1,c=async function*(){i||(i=!0,yield{type:`message_start`,message:{id:n,type:`message`,role:`assistant`,content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0}}})};for await(let t of e){for await(let e of c())yield e;let e=t.type;if(e===`response.output_text.delta`){o||(s&&(yield{type:`content_block_stop`,index:a},s=!1),a++,o=!0,yield{type:`content_block_start`,index:a,content_block:{type:`text`,text:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`text_delta`,text:String(t.delta??``)}};continue}if(e===`response.reasoning_text.delta`){s||(o&&(yield{type:`content_block_stop`,index:a},o=!1),a++,s=!0,yield{type:`content_block_start`,index:a,content_block:{type:`thinking`,thinking:``,signature:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`thinking_delta`,thinking:String(t.delta??``)}};continue}if(e===`response.output_item.added`){let e=t.item,n=typeof t.output_index==`number`?t.output_index:-1;if(e?.type===`function_call`&&n>=0){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1),a++;let t=String(e.call_id??e.id??`call_${n}`),i=String(e.name??``);r.set(n,{contentIndex:a,open:!0,name:i,id:t}),yield{type:`content_block_start`,index:a,content_block:{type:`tool_use`,id:t,name:i,input:{}}}}continue}if(e===`response.function_call_arguments.delta`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n&&(yield{type:`content_block_delta`,index:n.contentIndex,delta:{type:`input_json_delta`,partial_json:String(t.delta??``)}});continue}if(e===`response.output_item.done`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n?.open&&(yield{type:`content_block_stop`,index:n.contentIndex},n.open=!1);continue}if(e===`response.error`){let e=t.error;throw Error(String(e?.message??`ChatGPT Responses API error`))}if(e===`response.failed`){let e=t.response?.error;throw Error(String(e?.message??`ChatGPT Responses API failed`))}if(e===`response.completed`||e===`response.incomplete`){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1);let e=t.response;yield{type:`message_delta`,delta:{stop_reason:ae(e),stop_sequence:null},usage:ie(e)},yield{type:`message_stop`}}}}async function se(e){let t=await m(),n=e.fetchOverride??globalThis.fetch,r={Authorization:`Bearer ${t.accessToken}`,"Content-Type":`application/json`,Accept:`text/event-stream`,"OpenAI-Beta":`responses=experimental`,Origin:`https://chatgpt.com`,Referer:`https://chatgpt.com/`,originator:`claude-code-best`};t.accountId&&(r[`ChatGPT-Account-Id`]=t.accountId);let i=await n(`https://chatgpt.com/backend-api/codex/responses`,{method:`POST`,headers:r,body:JSON.stringify(e.request),signal:e.signal});if(!i.ok){let e=await i.text().catch(()=>``);throw Error(`ChatGPT Responses API request failed (${i.status})${e?`: ${e.slice(0,500)}`:``}`)}return X(i)}var ce=e((()=>{u()}));function Z(e){if(t(process.env.OPENAI_ENABLE_THINKING))return!1;if(r(process.env.OPENAI_ENABLE_THINKING))return!0;let n=e.toLowerCase();return n.includes(`deepseek`)||n.includes(`mimo`)}function le(e,t){return t??(process.env.OPENAI_MAX_TOKENS&&parseInt(process.env.OPENAI_MAX_TOKENS,10)||void 0)??(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS&&parseInt(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS,10)||void 0)??e}function ue(e){let{model:t,messages:n,tools:r,toolChoice:i,enableThinking:a,maxTokens:o,temperatureOverride:s}=e;return{model:t,messages:n,max_tokens:o,...r.length>0&&{tools:r,...i&&{tool_choice:i}},stream:!0,stream_options:{include_usage:!0},...a&&{thinking:{type:`enabled`},enable_thinking:!0,chat_template_kwargs:{thinking:!0,enable_thinking:!0}},...!a&&s!==void 0&&{temperature:s}}}var de=e((()=>{n()}));function Q(e){if(e===`low`)return`low`;if(e===`medium`)return`medium`;if(e===`high`)return`high`;if(e===`xhigh`||e===`max`)return`xhigh`;if(typeof e==`number`)return`high`}function fe(e){let t=process.env.CLAUDE_CODE_EFFORT_LEVEL?.toLowerCase();if(!(t===`auto`||t===`unset`))return Q(t)??Q(e)??`medium`}function pe(e,t,n,r){if(!r||g())return e;let i=t.filter(e=>n.has(e.name)).map(F).sort().join(`
10
- `);return i?[b({content:`<available-deferred-tools>\n${i}\n</available-deferred-tools>`,isMeta:!0}),...e]:e}function me(e){return e.type===`assistant`||e.type===`user`}function $(e){let{partialMessage:t,contentBlocks:n,tools:r,agentId:i,usage:a,stopReason:o,maxTokens:s}=e,c=[],l=Object.keys(n).sort((e,t)=>Number(e)-Number(t)).map(e=>n[Number(e)]).filter(Boolean);return l.length>0&&c.push({message:{...t,content:h(l,r,i),usage:a,stop_reason:o,stop_sequence:null},requestId:void 0,type:`assistant`,uuid:W(),timestamp:new Date().toISOString()}),o===`max_tokens`&&c.push(x({content:`Output truncated: response exceeded the ${s} token limit. Set OPENAI_MAX_TOKENS or CLAUDE_CODE_MAX_OUTPUT_TOKENS to override.`,apiError:`max_output_tokens`,error:`max_output_tokens`})),c}async function*he(e,t,n,r,a){try{let s=V(a.model),l=f(e,n),u=await v(a.model,n,a.getToolPermissionContext||(async()=>A()),a.agents||[],a.querySource),p=new Set;if(u)for(let e of n)N(e)&&p.add(e.name);let m=n;u&&p.size>0&&(m=n.filter(e=>!!(!p.has(e.name)||j(e,`SearchExtraTools`))));let h=await Promise.all(m.map(e=>E(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model,deferLoading:u&&p.has(e.name)}))),g=h.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),_=Z(s),y=B(pe(l.filter(me),n,p,u),t,{enableThinking:_}),b=R(g),x=L(a.toolChoice),w=fe(a.effortValue);if(u){let e=m.filter(e=>p.has(e.name)).length;c(`[OpenAI] Tool search enabled: ${e}/${p.size} deferred tools included, total tools=${b.length}`)}else c(`[OpenAI] Tool search disabled, total tools=${b.length}`);let{upperLimit:T}=o(s),O=le(T,a.maxOutputTokensOverride);c(`[OpenAI] Calling model=${s}, messages=${y.length}, tools=${b.length}, thinking=${_}`);let k=d()?oe(await se({request:Y({model:s,messages:y,tools:b,toolChoice:x,reasoningEffort:w}),signal:r,fetchOverride:a.fetchOverride}),s):I(await C({maxRetries:0,fetchOverride:a.fetchOverride,source:a.querySource}).chat.completions.create(ue({model:s,messages:y,tools:b,toolChoice:x,enableThinking:_,maxTokens:O,temperatureOverride:a.temperatureOverride}),{signal:r}),s),M={},P=[],F,z=null,U={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},W=0,G=Date.now();for await(let e of k){switch(e.type){case`message_start`:F=e.message,W=Date.now()-G,e.message?.usage&&(U={...U,...e.message.usage});break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:break;case`message_delta`:{let t=e.usage;t&&(U=H(U,t)),e.delta?.stop_reason!=null&&(z=e.delta.stop_reason);break}case`message_stop`:if(F){for(let e of $({partialMessage:F,contentBlocks:M,tools:n,agentId:a.agentId,usage:U,stopReason:z,maxTokens:O}))e.type===`assistant`&&P.push(e),yield e;F=null}U.input_tokens+U.output_tokens>0&&S(i(s,U),U,a.model);break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:W}:void 0}}if(ee(a.langfuseTrace??null,{model:s,provider:`openai`,input:D(y),output:ne(P),usage:{input_tokens:U.input_tokens,output_tokens:U.output_tokens,cache_creation_input_tokens:U.cache_creation_input_tokens,cache_read_input_tokens:U.cache_read_input_tokens},startTime:new Date(G),endTime:new Date,completionStartTime:W>0?new Date(G+W):void 0,tools:te(h),..._&&{thinking:{type:`enabled`}}}),F)for(let e of $({partialMessage:F,contentBlocks:M,tools:n,agentId:a.agentId,usage:U,stopReason:z,maxTokens:O}))yield e}catch(e){let t=e instanceof Error?e.message:String(e);c(`[OpenAI] Error: ${t}`,{level:`error`}),yield x({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{y(),U(),z(),u(),ce(),p(),T(),M(),l(),w(),a(),de(),k(),O(),s(),_(),P()}))();export{he as queryModelOpenAI};
9
+ `)}}}function ie(e){let t=e?.usage,n=t?.input_tokens_details;return{input_tokens:typeof t?.input_tokens==`number`?t.input_tokens:0,output_tokens:typeof t?.output_tokens==`number`?t.output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:typeof n?.cached_tokens==`number`?n.cached_tokens:0}}function ae(e){return e?.status===`incomplete`?`max_tokens`:`end_turn`}async function*oe(e,t){let n=`msg_${W().replace(/-/g,``).slice(0,24)}`,r=new Map,i=!1,a=-1,o=!1,s=!1,c=async function*(){i||(i=!0,yield{type:`message_start`,message:{id:n,type:`message`,role:`assistant`,content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0}}})};for await(let t of e){for await(let e of c())yield e;let e=t.type;if(e===`response.output_text.delta`){o||(s&&(yield{type:`content_block_stop`,index:a},s=!1),a++,o=!0,yield{type:`content_block_start`,index:a,content_block:{type:`text`,text:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`text_delta`,text:String(t.delta??``)}};continue}if(e===`response.reasoning_text.delta`){s||(o&&(yield{type:`content_block_stop`,index:a},o=!1),a++,s=!0,yield{type:`content_block_start`,index:a,content_block:{type:`thinking`,thinking:``,signature:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`thinking_delta`,thinking:String(t.delta??``)}};continue}if(e===`response.output_item.added`){let e=t.item,n=typeof t.output_index==`number`?t.output_index:-1;if(e?.type===`function_call`&&n>=0){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1),a++;let t=String(e.call_id??e.id??`call_${n}`),i=String(e.name??``);r.set(n,{contentIndex:a,open:!0,name:i,id:t}),yield{type:`content_block_start`,index:a,content_block:{type:`tool_use`,id:t,name:i,input:{}}}}continue}if(e===`response.function_call_arguments.delta`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n&&(yield{type:`content_block_delta`,index:n.contentIndex,delta:{type:`input_json_delta`,partial_json:String(t.delta??``)}});continue}if(e===`response.output_item.done`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n?.open&&(yield{type:`content_block_stop`,index:n.contentIndex},n.open=!1);continue}if(e===`response.error`){let e=t.error;throw Error(String(e?.message??`ChatGPT Responses API error`))}if(e===`response.failed`){let e=t.response?.error;throw Error(String(e?.message??`ChatGPT Responses API failed`))}if(e===`response.completed`||e===`response.incomplete`){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1);let e=t.response;yield{type:`message_delta`,delta:{stop_reason:ae(e),stop_sequence:null},usage:ie(e)},yield{type:`message_stop`}}}}async function se(e){let t=await p(),n=e.fetchOverride??globalThis.fetch,r={Authorization:`Bearer ${t.accessToken}`,"Content-Type":`application/json`,Accept:`text/event-stream`,"OpenAI-Beta":`responses=experimental`,Origin:`https://chatgpt.com`,Referer:`https://chatgpt.com/`,originator:`claude-code-best`};t.accountId&&(r[`ChatGPT-Account-Id`]=t.accountId);let i=await n(`https://chatgpt.com/backend-api/codex/responses`,{method:`POST`,headers:r,body:JSON.stringify(e.request),signal:e.signal});if(!i.ok){let e=await i.text().catch(()=>``);throw Error(`ChatGPT Responses API request failed (${i.status})${e?`: ${e.slice(0,500)}`:``}`)}return X(i)}var ce=e((()=>{k()}));function Z(e){if(t(process.env.OPENAI_ENABLE_THINKING))return!1;if(r(process.env.OPENAI_ENABLE_THINKING))return!0;let n=e.toLowerCase();return n.includes(`deepseek`)||n.includes(`mimo`)}function le(e,t){return t??(process.env.OPENAI_MAX_TOKENS&&parseInt(process.env.OPENAI_MAX_TOKENS,10)||void 0)??(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS&&parseInt(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS,10)||void 0)??e}function ue(e){let{model:t,messages:n,tools:r,toolChoice:i,enableThinking:a,maxTokens:o,temperatureOverride:s}=e;return{model:t,messages:n,max_tokens:o,...r.length>0&&{tools:r,...i&&{tool_choice:i}},stream:!0,stream_options:{include_usage:!0},...a&&{thinking:{type:`enabled`},enable_thinking:!0,chat_template_kwargs:{thinking:!0,enable_thinking:!0}},...!a&&s!==void 0&&{temperature:s}}}var de=e((()=>{n()}));function Q(e){if(e===`low`)return`low`;if(e===`medium`)return`medium`;if(e===`high`)return`high`;if(e===`xhigh`||e===`max`)return`xhigh`;if(typeof e==`number`)return`high`}function fe(e){let t=process.env.CLAUDE_CODE_EFFORT_LEVEL?.toLowerCase();if(!(t===`auto`||t===`unset`))return Q(t)??Q(e)??`medium`}function pe(e,t,n,r){if(!r||b())return e;let i=t.filter(e=>n.has(e.name)).map(F).sort().join(`
10
+ `);return i?[D({content:`<available-deferred-tools>\n${i}\n</available-deferred-tools>`,isMeta:!0}),...e]:e}function me(e){return e.type===`assistant`||e.type===`user`}function $(e){let{partialMessage:t,contentBlocks:n,tools:r,agentId:i,usage:a,stopReason:o,maxTokens:s}=e,c=[],l=Object.keys(n).sort((e,t)=>Number(e)-Number(t)).map(e=>n[Number(e)]).filter(Boolean);return l.length>0&&t&&c.push({message:{...t,content:f(l,r,i),usage:a,stop_reason:o,stop_sequence:null},requestId:void 0,type:`assistant`,uuid:W(),timestamp:new Date().toISOString()}),o===`max_tokens`&&c.push(x({content:`Output truncated: response exceeded the ${s} token limit. Set OPENAI_MAX_TOKENS or CLAUDE_CODE_MAX_OUTPUT_TOKENS to override.`,apiError:`max_output_tokens`,error:`max_output_tokens`})),c}async function*he(e,t,n,r,a){try{let s=V(a.model),l=te(e,n),u=await w(a.model,n,a.getToolPermissionContext||(async()=>A()),a.agents||[],a.querySource),f=new Set;if(u)for(let e of n)N(e)&&f.add(e.name);let p=n;u&&f.size>0&&(p=n.filter(e=>!!(!f.has(e.name)||j(e,`SearchExtraTools`))));let h=await Promise.all(p.map(e=>T(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model,deferLoading:u&&f.has(e.name)}))),g=h.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),_=Z(s),y=B(pe(l.filter(me),n,f,u),t,{enableThinking:_}),b=R(g),x=L(a.toolChoice),C=fe(a.effortValue);if(u){let e=p.filter(e=>f.has(e.name)).length;c(`[OpenAI] Tool search enabled: ${e}/${f.size} deferred tools included, total tools=${b.length}`)}else c(`[OpenAI] Tool search disabled, total tools=${b.length}`);let{upperLimit:D}=o(s),O=le(D,a.maxOutputTokensOverride);c(`[OpenAI] Calling model=${s}, messages=${y.length}, tools=${b.length}, thinking=${_}`);let k=ee()?oe(await se({request:Y({model:s,messages:y,tools:b,toolChoice:x,reasoningEffort:C}),signal:r,fetchOverride:a.fetchOverride}),s):I(await ne({maxRetries:0,fetchOverride:a.fetchOverride,source:a.querySource}).chat.completions.create(ue({model:s,messages:y,tools:b,toolChoice:x,enableThinking:_,maxTokens:O,temperatureOverride:a.temperatureOverride}),{signal:r}),s),M={},P=[],F=null,z=null,U={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},W=0,G=Date.now();for await(let e of k){switch(e.type){case`message_start`:F=e.message,W=Date.now()-G,e.message.usage&&(U={...U,...e.message.usage});break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:break;case`message_delta`:{let t=e.usage;t&&(U=H(U,t)),e.delta.stop_reason!=null&&(z=e.delta.stop_reason);break}case`message_stop`:if(F){for(let e of $({partialMessage:F,contentBlocks:M,tools:n,agentId:a.agentId,usage:U,stopReason:z,maxTokens:O}))e.type===`assistant`&&P.push(e),yield e;F=null}U.input_tokens+U.output_tokens>0&&S(i(s,U),U,a.model);break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:W}:void 0}}if(v(a.langfuseTrace??null,{model:s,provider:`openai`,input:m(y),output:d(P),usage:{input_tokens:U.input_tokens,output_tokens:U.output_tokens,cache_creation_input_tokens:U.cache_creation_input_tokens,cache_read_input_tokens:U.cache_read_input_tokens},startTime:new Date(G),endTime:new Date,completionStartTime:W>0?new Date(G+W):void 0,tools:E(h),..._&&{thinking:{type:`enabled`}}}),F)for(let e of $({partialMessage:F,contentBlocks:M,tools:n,agentId:a.agentId,usage:U,stopReason:z,maxTokens:O}))yield e}catch(e){let t=e instanceof Error?e.message:String(e);c(`[OpenAI] Error: ${t}`,{level:`error`}),yield x({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{O(),U(),z(),k(),ce(),_(),C(),M(),l(),y(),a(),de(),g(),h(),s(),u(),P()}))();export{he as queryModelOpenAI};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Ac as r,Pc as i,Sc as a,Zt as o,on as s}from"./paths-D8Fx3kUi.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-CzsijfHZ.js";import{a as m,l as h,o as g}from"./api-CClu711S.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=o()?.organizationUuid;if(!e)return null;let t=a().overageCreditGrantCache?.[e];return!t||Date.now()-t.timestamp>S?null:t.info}function y(){let e=o()?.organizationUuid;if(!e)return;let t=a().overageCreditGrantCache;!t||!(e in t)||i(t=>{let n={...t.overageCreditGrantCache};return delete n[e],{...t,overageCreditGrantCache:n}})}async function b(){if(d())return;let e=o()?.organizationUuid;if(!e)return;let t=await _();t&&i(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(),s(),r(),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{Ac as r,Pc as i,Sc as a,Zt as o,on as s}from"./paths-BZbIj1Z1.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-CzsijfHZ.js";import{a as m,l as h,o as g}from"./api-CslgFoHj.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=o()?.organizationUuid;if(!e)return null;let t=a().overageCreditGrantCache?.[e];return!t||Date.now()-t.timestamp>S?null:t.info}function y(){let e=o()?.organizationUuid;if(!e)return;let t=a().overageCreditGrantCache;!t||!(e in t)||i(t=>{let n={...t.overageCreditGrantCache};return delete n[e],{...t,overageCreditGrantCache:n}})}async function b(){if(d())return;let e=o()?.organizationUuid;if(!e)return;let t=await _();t&&i(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(),s(),r(),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{n as l,t as u}from"./tui-BVc2q4Xv.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,n]=(0,m.useState)(0),a=(0,m.useMemo)(()=>[{label:`Status`,description:`Show marker and environment override state`,run:()=>void d(`status`,e)},{label:`Toggle`,description:`Flip persisted TUI mode for the next session`,run:()=>void d(`toggle`,e)},{label:`On`,description:`Enable flicker-free alternate-screen mode`,run:()=>void d(`on`,e)},{label:`Off`,description:`Disable flicker-free alternate-screen mode`,run:()=>void d(`off`,e)}],[e]),c=()=>{let e=a[t];e&&e.run()};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(i,{title:`TUI Mode`,subtitle:`${a.length} actions`,onCancel:()=>e(`TUI mode panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,h.jsxs)(o,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(o,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(n(),1),a(),l(),h=c(),g=24}))();export{p as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{n as l,t as u}from"./tui-geoc3zxu.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{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{Ac as f,Gs as p,Pc as m,Sc as h}from"./paths-D8Fx3kUi.js";import{n as g,r as _}from"./analytics-DqMQntaB.js";import{o as v,s as y}from"./log-CzsijfHZ.js";import{b,x}from"./teammate-DMYOtLTK.js";import{t as S}from"./useKeybinding-FsOnjW6T.js";import{i as C,l as w,n as T,o as E,r as D,s as O,u as k}from"./referral-BsAvaATn.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=k(()=>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 C();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 T(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),E=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=>E(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 ${D(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(),O(),x(),v(),M=d()}));async function P(e){let t=!h().hasVisitedPasses;if(t){let e=E();m(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(),O(),f(),F=d()}))();export{P as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,p as a,t as o,tn as s,tt as c,x as l,xt as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Ac as f,Gs as p,Pc as m,Sc as h}from"./paths-BZbIj1Z1.js";import{n as g,r as _}from"./analytics-DqMQntaB.js";import{o as v,s as y}from"./log-CzsijfHZ.js";import{b,x}from"./teammate-DMYOtLTK.js";import{t as S}from"./useKeybinding-FsOnjW6T.js";import{i as C,l as w,n as T,o as E,r as D,s as O,u as k}from"./referral-Nz20w4pB.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=k(()=>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 C();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 T(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),E=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=>E(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 ${D(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(),O(),x(),v(),M=d()}));async function P(e){let t=!h().hasVisitedPasses;if(t){let e=E();m(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(),O(),f(),F=d()}))();export{P as call};