claude-code-best 2.6.0 → 2.6.6
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.
- package/dist/chunks/{AddWorkspaceDirectory-Cj5bvJgD.js → AddWorkspaceDirectory-Bb6crGWh.js} +1 -1
- package/dist/chunks/{App-2tgSv9lb.js → App-CW0Y4ceR.js} +1 -1
- package/dist/chunks/{ApproveApiKey-DWa-XTLb.js → ApproveApiKey-9rkwQfgT.js} +1 -1
- package/dist/chunks/ApproveApiKey-BhMr2Y5F.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-DF9eeJZS.js → AssistantSessionChooser-XzXZZdiH.js} +1 -1
- package/dist/chunks/BackgroundTasksDialog-BL_dfbZP.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-DlLWAKw2.js +1 -0
- package/dist/chunks/{ClaudeInChromeOnboarding-BW4XHmkw.js → ClaudeInChromeOnboarding-CjGydpBk.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-Bz0JyaOG.js → ClaudeMdExternalIncludesDialog-B04cjDwX.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DPki55Xa.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-D_j1NebK.js +1 -0
- package/dist/chunks/{DesktopHandoff-CcsM_OAS.js → DesktopHandoff-CFBUqcCf.js} +1 -1
- package/dist/chunks/DevChannelsDialog-ByTf41du.js +1 -0
- package/dist/chunks/DiffDialog-CY-8kw_Q.js +3 -0
- package/dist/chunks/Doctor-2D5Wz58o.js +1 -0
- package/dist/chunks/Doctor-CDez_u_U.js +3 -0
- package/dist/chunks/{ExitFlow-C4ybxKPn.js → ExitFlow-BlON8IgH.js} +2 -2
- package/dist/chunks/Feedback-CSeD3k4M.js +2 -0
- package/dist/chunks/Grove-Dwu_0zRw.js +1 -0
- package/dist/chunks/{Grove-CKVpREDU.js → Grove-Tp_UtIMg.js} +1 -1
- package/dist/chunks/{HybridTransport-Byjvz-DL.js → HybridTransport-CAko699F.js} +2 -2
- package/dist/chunks/{ITermBackend-Co9XpeS4.js → ITermBackend-5P3WJumD.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-CNsqbNU3.js → InvalidConfigDialog-CVcdra9v.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-ClnZaN6b.js → InvalidSettingsDialog-CfLdbmSI.js} +1 -1
- package/dist/chunks/MCPConnectionManager-BK_3uwQj.js +1 -0
- package/dist/chunks/{McpParsingWarnings-DZkzoeZf.js → McpParsingWarnings-BOj-T8F3.js} +1 -1
- package/dist/chunks/MessageSelector-BRkxpO1O.js +3 -0
- package/dist/chunks/Messages-wyMyMP7U.js +11 -0
- package/dist/chunks/{Onboarding-BwoGQB4g.js → Onboarding-C06Mxlf-.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-Q5g2YjQw.js → OverageCreditUpsell-abcPm3PB.js} +1 -1
- package/dist/chunks/PluginSettings-DGpIVGvV.js +17 -0
- package/dist/chunks/{PromptInputFooterSuggestions-D4lMVCqj.js → PromptInputFooterSuggestions-ihnbjU0K.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-BvLtS6an.js → PromptInputHelpMenu-CMm8z7Gk.js} +1 -1
- package/dist/chunks/QueryEngine-I3Bqzbiz.js +1 -0
- package/dist/chunks/REPL-BxAsVlx3.js +1 -0
- package/dist/chunks/REPL-CBFcgD4r.js +97 -0
- package/dist/chunks/{RemoteCallout-BV_hoz98.js → RemoteCallout-Cy6lH-CZ.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-Cxoy1ud2.js → RemoteSessionManager-C7iGd5Og.js} +2 -2
- package/dist/chunks/ResumeConversation-AdLtgdVB.js +1 -0
- package/dist/chunks/{SSETransport-pIm26VJq.js → SSETransport-B5xlXeAN.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-BJ8Nx_Nu.js +1 -0
- package/dist/chunks/SentryErrorBoundary-Bs7mtkPb.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-B6EWoJml.js → SentryErrorBoundary-iih9eFpM.js} +1 -1
- package/dist/chunks/Settings-PioHwsvg.js +2 -0
- package/dist/chunks/{TeleportProgress-DPzGpyyM.js → TeleportProgress-BX-uLwuL.js} +1 -1
- package/dist/chunks/TeleportRepoMismatchDialog-D8oPPTWd.js +1 -0
- package/dist/chunks/{TeleportResumeWrapper-DPSO0S49.js → TeleportResumeWrapper-B_CvNDbr.js} +1 -1
- package/dist/chunks/{ThemePicker-DueihHcy.js → ThemePicker-BG1ykSpX.js} +1 -1
- package/dist/chunks/{TmuxBackend-BNaZNAeP.js → TmuxBackend-CnMCWNS4.js} +1 -1
- package/dist/chunks/TrustDialog-Z_maAYj8.js +1 -0
- package/dist/chunks/{ValidationErrorsList-1k1qbsRo.js → ValidationErrorsList-C9swVkZ-.js} +1 -1
- package/dist/chunks/{WelcomeV2-CR6TtXXM.js → WelcomeV2-Au_5ddlT.js} +1 -1
- package/dist/chunks/WindowsTerminalBackend-CGxaYH74.js +2 -0
- package/dist/chunks/{add-dir-DAMizKzF.js → add-dir-Cm9u56YX.js} +1 -1
- package/dist/chunks/{agentDisplay-B9z7i8b_.js → agentDisplay-Bi_bEyEn.js} +1 -1
- package/dist/chunks/{agents-D5u0p1UC.js → agents-CMF9fLzV.js} +7 -7
- package/dist/chunks/{agents-DCh_gEvJ.js → agents-CbjR7hNr.js} +1 -1
- package/dist/chunks/{ant-DRJq-cEg.js → ant-Bu1Gs4WJ.js} +1 -1
- package/dist/chunks/api-CFNGoLoL.js +1 -0
- package/dist/chunks/{api-B6URs6nc.js → api-D_t0nHsS.js} +1 -1
- package/dist/chunks/assistant-BLd4y2FJ.js +1 -0
- package/dist/chunks/{assistant-tPxOUa-Z.js → assistant-C_pfWe2a.js} +1 -1
- package/dist/chunks/{assistant-BRGDWkKB.js → assistant-EA-MHNQ-.js} +1 -1
- package/dist/chunks/{auth-CqURlg4d.js → auth-D7PZvVPf.js} +1 -1
- package/dist/chunks/auth-DGfZCD_B.js +1 -0
- package/dist/chunks/{autoMode-DVt4K4I2.js → autoMode-B8iO05xy.js} +6 -6
- package/dist/chunks/{autonomy-Ffv0QIyl.js → autonomy-CaLvE5N6.js} +12 -12
- package/dist/chunks/{autonomy-BZzW8QJZ.js → autonomy-dQVtSiCJ.js} +1 -1
- package/dist/chunks/{autonomyPanel-MwuzDvv_.js → autonomyPanel-DSswVlCF.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-Ckj8W3RO.js +1 -0
- package/dist/chunks/backgroundHousekeeping-D2_Uopt7.js +17 -0
- package/dist/chunks/{branch-DXefFdDE.js → branch-C7pM8Sjh.js} +1 -1
- package/dist/chunks/{bridge-qr4GQW_c.js → bridge-CTYdzSWg.js} +2 -2
- package/dist/chunks/bridgeConfig-7c07tJm9.js +1 -0
- package/dist/chunks/{bridgeConfig-CJ-KznTS.js → bridgeConfig-Df6uyp3q.js} +1 -1
- package/dist/chunks/{bridgeEnabled-5vsPrjuq.js → bridgeEnabled-A-_xJ94c.js} +1 -1
- package/dist/chunks/bridgeEnabled-Z2S8lk0l.js +1 -0
- package/dist/chunks/bridgeMain-B7FZpvo0.js +68 -0
- package/dist/chunks/bridgeMain-C5UxF8ST.js +1 -0
- package/dist/chunks/{bridgeMessaging-BiE0CTqq.js → bridgeMessaging-DPVLAIzl.js} +1 -1
- package/dist/chunks/{btw-FpimqEqk.js → btw-CqgjLlFN.js} +1 -1
- package/dist/chunks/{buddy-BA3Cr067.js → buddy-DCGBAqF2.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-CSC9p8mO.js → bypassPermissionsKillswitch-CK0jeZTW.js} +1 -1
- package/dist/chunks/{caches-BUBkfP2Q.js → caches-CdVW8fYV.js} +2 -2
- package/dist/chunks/caches-Dt52PedI.js +1 -0
- package/dist/chunks/{ccrClient-BOxUn9EJ.js → ccrClient-B_3AmY7K.js} +1 -1
- package/dist/chunks/changeDetector-uO9CBvut.js +1 -0
- package/dist/chunks/{channelNotification-l3EXKDNB.js → channelNotification-BbDQdLZC.js} +1 -1
- package/dist/chunks/channelNotification-DzTzUrCe.js +1 -0
- package/dist/chunks/{chrome-BnKyWWQL.js → chrome-CGyqsCkL.js} +1 -1
- package/dist/chunks/clear-B_cVk64B.js +1 -0
- package/dist/chunks/client-BcqXgcrx.js +1 -0
- package/dist/chunks/{color-D5MCzz9h.js → color-DEXUx7gE.js} +1 -1
- package/dist/chunks/commands-BX0_wEGw.js +1 -0
- package/dist/chunks/commitAttribution-CSVDcgTO.js +1 -0
- package/dist/chunks/{commitAttribution-BFshsh2H.js → commitAttribution-e0kkanVT.js} +1 -1
- package/dist/chunks/{compact-DWNaf1wR.js → compact-Dh9RewNA.js} +3 -3
- package/dist/chunks/{companion-CyK_Dr1U.js → companion-DVFacTUw.js} +1 -1
- package/dist/chunks/{config-DNz6Eitr.js → config-CkSmYDJY.js} +1 -1
- package/dist/chunks/{config-BdCuh6eA.js → config-DwiVCSrY.js} +1 -1
- package/dist/chunks/{context-BOjdTj0i.js → context-B8VDDHTv.js} +1 -1
- package/dist/chunks/{context-noninteractive-k2ibficU.js → context-noninteractive-IZfWniex.js} +2 -2
- package/dist/chunks/context-noninteractive-SBxqQ3iu.js +1 -0
- package/dist/chunks/conversation-CQBl9Yy2.js +1 -0
- package/dist/chunks/conversation-DVZplNag.js +1 -0
- package/dist/chunks/{copy-B0VUJ2rH.js → copy-CIjrYoFa.js} +2 -2
- package/dist/chunks/{createSSHSession-DqmkCS_k.js → createSSHSession-ArNlbIZB.js} +1 -1
- package/dist/chunks/{createSession-CJEsHz58.js → createSession-CBheIT_G.js} +1 -1
- package/dist/chunks/createSession-DfEQy2dZ.js +1 -0
- package/dist/chunks/cronJitterConfig-DcMGWOa-.js +6 -0
- package/dist/chunks/crossProjectResume-Z-aR2q-d.js +40 -0
- package/dist/chunks/{datadog-Bd1s_VFj.js → datadog-BK8eJz8B.js} +1 -1
- package/dist/chunks/datadog-Uj6FjEuU.js +1 -0
- package/dist/chunks/{desktop-BDowrzvG.js → desktop-B9vWJeRu.js} +1 -1
- package/dist/chunks/{diff-auU5sUOw.js → diff-BTV7_Dca.js} +1 -1
- package/dist/chunks/{doctor-bKPp6AeL.js → doctor-Dpbh0aRz.js} +1 -1
- package/dist/chunks/{effort-BQj2QnnA.js → effort-Czlwa5qF.js} +4 -4
- package/dist/chunks/{entry-CUu6-QhT.js → entry-CdfuWjKu.js} +3 -3
- package/dist/chunks/{envLessBridgeConfig-Ju4W58xf.js → envLessBridgeConfig-BAFYaZ0E.js} +1 -1
- package/dist/chunks/envLessBridgeConfig-DOO9eX07.js +1 -0
- package/dist/chunks/{exit-DijkO8eo.js → exit-DzOm62Dn.js} +1 -1
- package/dist/chunks/{export-DA-bBZkX.js → export-DHOR3z3Z.js} +1 -1
- package/dist/chunks/{exportRenderer-3y4tGdSB.js → exportRenderer-CiNXeNr9.js} +1 -1
- package/dist/chunks/extra-usage-CJcyfVCt.js +1 -0
- package/dist/chunks/{extra-usage-CS6VwKJt.js → extra-usage-DIYR_3ZR.js} +1 -1
- package/dist/chunks/{extra-usage-core-DOgT4u4i.js → extra-usage-core-C3uM9bOP.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-DYnfiRlV.js → extra-usage-noninteractive-Ctz9TfY8.js} +1 -1
- package/dist/chunks/{extraUsage-CfxgfpX_.js → extraUsage-CBwIvl73.js} +1 -1
- package/dist/chunks/extractMemories-C3SU-Osb.js +1 -0
- package/dist/chunks/fast-7iinMwk-.js +1 -0
- package/dist/chunks/{fast-CzRUJBTK.js → fast-BpBwjbSD.js} +1 -1
- package/dist/chunks/{feedback-FoXtdHAV.js → feedback-BkVnsZVx.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-KIwaBY-E.js → firstPartyEventLogger-BCzGkdpd.js} +1 -1
- package/dist/chunks/{flushGate-C2Icy43G.js → flushGate-CQsnMw8g.js} +1 -1
- package/dist/chunks/{gates-CbQLZHtm.js → gates-CxWIWtmd.js} +1 -1
- package/dist/chunks/gates-qgzva-fO.js +1 -0
- package/dist/chunks/{gemini-BrNJGX4k.js → gemini-BbV8D2SS.js} +1 -1
- package/dist/chunks/{generateRecap-B0fvSCjo.js → generateRecap-B3j2nUgh.js} +1 -1
- package/dist/chunks/{generateSessionName-DvRYa39O.js → generateSessionName-aGnXSNgN.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-Dut3d6nn.js → githubRepoPathMapping-DCJLSTLl.js} +1 -1
- package/dist/chunks/{grok-Ftoheab3.js → grok-C4QFXJnR.js} +1 -1
- package/dist/chunks/{growthbook-BynnuVTn.js → growthbook-prtWhMRg.js} +1 -1
- package/dist/chunks/{heapdump-hQ_w0LPC.js → heapdump-Czm-2XiG.js} +1 -1
- package/dist/chunks/{help-DQsHHv6r.js → help-CSAFsN0-.js} +1 -1
- package/dist/chunks/hooks-Ch2vPE8u.js +1 -0
- package/dist/chunks/{hooks-BhVDc8yb.js → hooks-DkbOP-bI.js} +2 -2
- package/dist/chunks/{hostAdapter-D1eWmmhu.js → hostAdapter-BcdDPVTj.js} +1 -1
- package/dist/chunks/{ide-CPmMXLL-.js → ide-BXERRFZF.js} +2 -2
- package/dist/chunks/{inboundAttachments-Bmf6vYsE.js → inboundAttachments-7rXrAtkb.js} +1 -1
- package/dist/chunks/inboundAttachments-C0rkLl2x.js +1 -0
- package/dist/chunks/initReplBridge-tXqkba08.js +1 -0
- package/dist/chunks/{insights-CTlTyvjj.js → insights-DrvqJgF8.js} +25 -25
- package/dist/chunks/{install-IPuD3Lq8.js → install-BGnxwO00.js} +1 -1
- package/dist/chunks/{install-github-app-Bmu_sA9e.js → install-github-app-CIpBHlr9.js} +2 -2
- package/dist/chunks/{install-slack-app-Rfl81Jqo.js → install-slack-app-By4Lh7ww.js} +1 -1
- package/dist/chunks/{instrumentation-DWwmOmr0.js → instrumentation-D9y7Ph_R.js} +3 -3
- package/dist/chunks/{job-BXEt0izn.js → job-BPVIMW_P.js} +1 -1
- package/dist/chunks/{keybindings-DRDgVvqz.js → keybindings-Ce6AHMLI.js} +2 -2
- package/dist/chunks/{lang-D3ZHlfT6.js → lang-DfDG_fSa.js} +1 -1
- package/dist/chunks/language-B1yHC1d6.js +1 -0
- package/dist/chunks/{language-DcSjogBx.js → language-yGoDFP3X.js} +1 -1
- package/dist/chunks/{launchAgentsPlatform-BPm_VMln.js → launchAgentsPlatform-DT01xZM7.js} +1 -1
- package/dist/chunks/launchAutofixPr-DrYd7WVf.js +18 -0
- package/dist/chunks/{launchLocalMemory-D_hBbXKE.js → launchLocalMemory-Bt3tMYVJ.js} +1 -1
- package/dist/chunks/{launchLocalVault-CPzNWvQ9.js → launchLocalVault-jyRHEa_Y.js} +1 -1
- package/dist/chunks/{launchMemoryStores-Djq2KhKb.js → launchMemoryStores-cmXnLAF5.js} +1 -1
- package/dist/chunks/{launchOnboarding-Bh6E7vdc.js → launchOnboarding-BPTNFftb.js} +1 -1
- package/dist/chunks/{launchSchedule-C988bQ-5.js → launchSchedule-141GqGC8.js} +1 -1
- package/dist/chunks/{launchSkillStore-DqrP6Gme.js → launchSkillStore-Bz0lok_o.js} +1 -1
- package/dist/chunks/{launchTeleport-DFhybaq_.js → launchTeleport-BMquJxIq.js} +2 -2
- package/dist/chunks/{launchVault-p_CSK4ZQ.js → launchVault-Bsuwqad6.js} +1 -1
- package/dist/chunks/{loadAgentsDir-Ci5mr0vm.js → loadAgentsDir-D7kapZB5.js} +717 -709
- package/dist/chunks/loadAgentsDir-DxPE2bIO.js +1 -0
- package/dist/chunks/{loadPluginHooks-xYCEZ6t5.js → loadPluginHooks-CL5aGDrb.js} +1 -1
- package/dist/chunks/localSearch-iozuZZhZ.js +1 -0
- package/dist/chunks/{localSearch-Vpn6W5aY.js → localSearch-r1_G8kfV.js} +1 -1
- package/dist/chunks/{login-D9IWjvza.js → login-7MvpaOkt.js} +1 -1
- package/dist/chunks/login-Dxza_KNT.js +1 -0
- package/dist/chunks/{logoV2Utils-SAulcC5x.js → logoV2Utils-DjThKW15.js} +1 -1
- package/dist/chunks/logout-BeGQR78E.js +1 -0
- package/dist/chunks/{magicDocs-BfoeYhin.js → magicDocs-Dy72LHIj.js} +2 -2
- package/dist/chunks/{main-DhMlhVj3.js → main-CF6Im-LV.js} +46 -46
- package/dist/chunks/{mappers-uIrAj-Wd.js → mappers-CkMESMy7.js} +1 -1
- package/dist/chunks/mcp-BTgHgOhR.js +2 -0
- package/dist/chunks/mcp-UJZ22IDJ.js +6 -0
- package/dist/chunks/mcp-fHf8Uc7h.js +1 -0
- package/dist/chunks/{mcpServer-1SnOWb8_.js → mcpServer-BueM5fWI.js} +1 -1
- package/dist/chunks/{mcpServer-DXvS3v4x.js → mcpServer-Dqm2PQQx.js} +1 -1
- package/dist/chunks/{memory-XccPLQLt.js → memory-BNZmqma1.js} +1 -1
- package/dist/chunks/model-D3g2QdU-.js +1 -0
- package/dist/chunks/{model-CbiDGGJU.js → model-DOw7wIKQ.js} +1 -1
- package/dist/chunks/{onChangeAppState-Dp0JIXd8.js → onChangeAppState-Cb9_yIuW.js} +1 -1
- package/dist/chunks/{openai-6KcHd4Hw.js → openai-Bvo0Gcec.js} +3 -3
- package/dist/chunks/{overageCreditGrant-DYiB4sr-.js → overageCreditGrant-BrN7dk3d.js} +1 -1
- package/dist/chunks/{passes-Cbc6T_Tj.js → passes-vgcY8_l8.js} +1 -1
- package/dist/chunks/{paths-Q2255dD7.js → paths-1ngPRtu3.js} +2 -2
- package/dist/chunks/permissions-BDbIjTT6.js +3 -0
- package/dist/chunks/{pipeTransport-D7NIp3aA.js → pipeTransport-KU8psPDI.js} +1 -1
- package/dist/chunks/{plan-DloFVJK7.js → plan-5NVPuxp6.js} +1 -1
- package/dist/chunks/{plugin-XR9IBPMM.js → plugin-t8jMqdsY.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-Cr9hP0zG.js → pluginAutoupdate-CAa4KLro.js} +1 -1
- package/dist/chunks/{pluginBlocklist-CM9uP8CY.js → pluginBlocklist-BG2LkLq1.js} +1 -1
- package/dist/chunks/{pluginCliCommands-BQkrvES5.js → pluginCliCommands-vqAtVibb.js} +1 -1
- package/dist/chunks/{pluginFlagging-CJ1--2Kw.js → pluginFlagging-BFCtv3kY.js} +1 -1
- package/dist/chunks/{pluginOperations-B0rLuSvo.js → pluginOperations-C9XP-mko.js} +2 -2
- package/dist/chunks/pluginStartupCheck-DZp0wnXP.js +1 -0
- package/dist/chunks/{pluginStartupCheck-Bjdc8zhz.js → pluginStartupCheck-RRcAbKfx.js} +1 -1
- package/dist/chunks/plugins-0SyID4Kx.js +4 -0
- package/dist/chunks/policyLimits-Cmmzuv-E.js +1 -0
- package/dist/chunks/{pollConfig-DhptuhFw.js → pollConfig-DTYIJ8lQ.js} +1 -1
- package/dist/chunks/{poor-DF0aqXDx.js → poor-Dw5dMZpM.js} +1 -1
- package/dist/chunks/{poorMode-C5Frra4j.js → poorMode-CsGLI_hm.js} +1 -1
- package/dist/chunks/poorMode-D_hB-rDf.js +1 -0
- package/dist/chunks/{print-CPtR0KTa.js → print-Ct8N4PYT.js} +12 -12
- package/dist/chunks/{privacy-settings-e-7lc7Un.js → privacy-settings-P2r-kg2i.js} +1 -1
- package/dist/chunks/processBashCommand-a8W8aTRu.js +1 -0
- package/dist/chunks/{processSlashCommand-DHRUtZ-C.js → processSlashCommand-BaUdUg3T.js} +3 -3
- package/dist/chunks/prompt-B1Qy8mi4.js +1 -0
- package/dist/chunks/{prompt-DEPUnJdB.js → prompt-BBg3jtfc.js} +1 -1
- package/dist/chunks/prompt-D4kWWEZC.js +1 -0
- package/dist/chunks/{promptEditor-Ci-h04-5.js → promptEditor-CvaugNTt.js} +2 -2
- package/dist/chunks/{protocolHandler-DhqM32qE.js → protocolHandler-DxBaHlaD.js} +1 -1
- package/dist/chunks/{rate-limit-options-B0l29Zx8.js → rate-limit-options-Df_sgE0b.js} +1 -1
- package/dist/chunks/rcDebugLog-CPGWJbI4.js +11 -0
- package/dist/chunks/{referral-ByevBJrE.js → referral-BKeCKnOJ.js} +1 -1
- package/dist/chunks/{refresh-B_CwwIRX.js → refresh-Cjv4jA6L.js} +1 -1
- package/dist/chunks/{registerProtocol-DzhaQH02.js → registerProtocol-DLuRm0mf.js} +1 -1
- package/dist/chunks/{registry-DkHA4cRu.js → registry-DVSgtCq5.js} +1 -1
- package/dist/chunks/{release-notes-CZthYkei.js → release-notes-CZcf8zB7.js} +1 -1
- package/dist/chunks/{releaseNotes-CwKpIsyd.js → releaseNotes-CvfZb3fZ.js} +2 -2
- package/dist/chunks/{reload-plugins-DxWfXvrN.js → reload-plugins-pSlDLk3b.js} +1 -1
- package/dist/chunks/{remote-env-BiRLWIrh.js → remote-env-BH89NuwC.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-nz1fPY1U.js → remoteBridgeCore-CrXlWEL1.js} +1 -1
- package/dist/chunks/{remoteControlServer-FzLUxh2B.js → remoteControlServer-BSOnq4yY.js} +1 -1
- package/dist/chunks/{rename-DmGuyncE.js → rename-DNGvNQm2.js} +1 -1
- package/dist/chunks/{resume-7GeU7RMS.js → resume-6UL38yL3.js} +2 -2
- package/dist/chunks/{runtimeObserver-Duod-ign.js → runtimeObserver-BhvHeiwD.js} +4 -4
- package/dist/chunks/{runtimeObserver-OgM9ZYxZ.js → runtimeObserver-Cp-DN8fP.js} +1 -1
- package/dist/chunks/sandbox-adapter-DGVtPPD0.js +1 -0
- package/dist/chunks/{sandbox-toggle-Cc96R6Ox.js → sandbox-toggle-D19YbI5G.js} +1 -1
- package/dist/chunks/searchExtraTools-DXWkpOIg.js +1 -0
- package/dist/chunks/{sentry-BUHYuYGj.js → sentry-BZmpC-iI.js} +1 -1
- package/dist/chunks/{session-DgLqm7ZI.js → session-lLpGqp0B.js} +2 -2
- package/dist/chunks/{sessionDiscovery-DgNea6qa.js → sessionDiscovery-BX3fjgzD.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-BeuS4m7a.js +1 -0
- package/dist/chunks/sessionMemory-LMOQk90c.js +1 -0
- package/dist/chunks/sessionMemory-UpILj5ww.js +1 -0
- package/dist/chunks/sessionMemoryUtils-DE7AezA0.js +1 -0
- package/dist/chunks/{sessionObserver-CuWMVPlT.js → sessionObserver-CujNIWks.js} +1 -1
- package/dist/chunks/sessionObserver-HqvTXhs9.js +1 -0
- package/dist/chunks/sessionStorage-BN56DAAd.js +1 -0
- package/dist/chunks/{sessionTitle-DzkMzHer.js → sessionTitle-QxXslbJY.js} +1 -1
- package/dist/chunks/{sessionTracing-DTjmc0EF.js → sessionTracing-DognYcDf.js} +1 -1
- package/dist/chunks/{settingsSync-CfYDkakY.js → settingsSync-DEPET5O1.js} +1 -1
- package/dist/chunks/{setup-BKUG46jQ.js → setup-BUBUidOg.js} +1 -1
- package/dist/chunks/setup-BZMVuIIx.js +2 -0
- package/dist/chunks/{setup-CmLngvpJ.js → setup-C6G0lasE.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-DesT0yKM.js → shadowedRuleDetection-CQayPrmM.js} +1 -1
- package/dist/chunks/{sideQuestion-BAq0YyKY.js → sideQuestion-B9EE1vTM.js} +1 -1
- package/dist/chunks/sink-BRrEbL6h.js +1 -0
- package/dist/chunks/{sink-B3uP8Cf8.js → sink-Cugto5We.js} +1 -1
- package/dist/chunks/{sinks-COcy5GnB.js → sinks-B9A94oIj.js} +2 -2
- package/dist/chunks/sinks-CKaSBvU8.js +1 -0
- package/dist/chunks/{skill-learning-DOIMPtWE.js → skill-learning-CroDcatu.js} +1 -1
- package/dist/chunks/skillChangeDetector-DnyEQqe6.js +1 -0
- package/dist/chunks/{skillGapStore-DpEoKhn-.js → skillGapStore-91Mb3xDY.js} +2 -2
- package/dist/chunks/{skillGapStore-CWuw1dYh.js → skillGapStore-LKwap3o4.js} +1 -1
- package/dist/chunks/{skillGenerator-9y3Q4YoO.js → skillGenerator-B9GM0LHk.js} +2 -2
- package/dist/chunks/skillLearning-D6latSKi.js +1 -0
- package/dist/chunks/{skillLearning-BhM09bQD.js → skillLearning-DbOOqb6b.js} +1 -1
- package/dist/chunks/{skillPanel-Dt24mZTZ.js → skillPanel-rIIYgnBE.js} +3 -3
- package/dist/chunks/{skillSearchPanel-gaXN64Fu.js → skillSearchPanel-xAL-6uJF.js} +4 -4
- package/dist/chunks/{skills-Dx3dMHYk.js → skills-Doe47wxK.js} +1 -1
- package/dist/chunks/{sprites-5OAB-Ui2.js → sprites-D11F3i1M.js} +1 -1
- package/dist/chunks/{stats-TUExo9iU.js → stats-WNUyieG-.js} +1 -1
- package/dist/chunks/{status-Dghaz1my.js → status-CjBS9SkF.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-DVZSSXeK.js → statusNoticeHelpers-cnI4TiGw.js} +1 -1
- package/dist/chunks/{tag-ZcVkzFjz.js → tag-Gfb8vTAR.js} +2 -2
- package/dist/chunks/{tasks-DbB33ekt.js → tasks-BwX1rzOD.js} +1 -1
- package/dist/chunks/{teamHelpers-BmN9nKz-.js → teamHelpers-DEgaCpta.js} +1 -1
- package/dist/chunks/teamHelpers-EJxTXoTV.js +1 -0
- package/dist/chunks/teammateModeSnapshot-BgUQ4Phz.js +1 -0
- package/dist/chunks/{teammateModeSnapshot-CPjJJDL1.js → teammateModeSnapshot-Dyukgtp9.js} +1 -1
- package/dist/chunks/teleport-B4p8XlAv.js +1 -0
- package/dist/chunks/{templateJobs-Db630FZD.js → templateJobs-DQXuFnkl.js} +1 -1
- package/dist/chunks/{terminalSetup-ygKHrVKR.js → terminalSetup-CTEIn08j.js} +1 -1
- package/dist/chunks/{terminalSetup-DJqWE8fc.js → terminalSetup-bSbq4LE7.js} +1 -1
- package/dist/chunks/{theme-MmfFhdTD.js → theme-DazaKPy8.js} +1 -1
- package/dist/chunks/thinkback-BOfZP_QG.js +1 -0
- package/dist/chunks/{thinkback-CrNirB0V.js → thinkback-CxWZV2Oz.js} +1 -1
- package/dist/chunks/{thinkback-play-CQ1s7oqg.js → thinkback-play-CHe1x2Hc.js} +1 -1
- package/dist/chunks/{toolEventObserver-BqMplcIk.js → toolEventObserver-D4h-QqVP.js} +1 -1
- package/dist/chunks/{toolEventObserver-DBq2XBYY.js → toolEventObserver-Dfvv2trb.js} +1 -1
- package/dist/chunks/toolPool-BHChMuLr.js +1 -0
- package/dist/chunks/toolPool-C5K43w4_.js +1 -0
- package/dist/chunks/{trustedDevice-DEuQUTbz.js → trustedDevice-CQ9PK-8m.js} +1 -1
- package/dist/chunks/{trustedDevice-C9Zevohz.js → trustedDevice-rdvUkS1W.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-DrlfRrXq.js → ultrareviewCommand-Zf9hO4wr.js} +2 -2
- package/dist/chunks/{undercover-DKn95mh9.js → undercover-DLyKv5TE.js} +1 -1
- package/dist/chunks/undercover-DNS9V_JT.js +1 -0
- package/dist/chunks/{updateCCB-CJ7dCUan.js → updateCCB-7WQRz9lW.js} +4 -4
- package/dist/chunks/{upgrade-Degqbu8S.js → upgrade-ByIumMQe.js} +1 -1
- package/dist/chunks/upgrade-bK4x32Ma.js +1 -0
- package/dist/chunks/{upload-pTZQCPLt.js → upload-CvOMbA9_.js} +1 -1
- package/dist/chunks/{usage-D96a7Cke.js → usage-C_d-Z-eb.js} +1 -1
- package/dist/chunks/{usage-DVQMUMcC.js → usage-DE4PSQiF.js} +1 -1
- package/dist/chunks/useMainLoopModel-Os8Ao8-x.js +1 -0
- package/dist/chunks/{useManagePlugins-BfGzHMvO.js → useManagePlugins-BYBubfHU.js} +1 -1
- package/dist/chunks/{useMergedTools-TemEvCrX.js → useMergedTools-BJAn2i-F.js} +1 -1
- package/dist/chunks/{useSearchInput-B-V4kIa-.js → useSearchInput-CF77X2OV.js} +1 -1
- package/dist/chunks/useSettingsErrors-DD7fQ-fU.js +1 -0
- package/dist/chunks/{useVoice-BuwYDm2U.js → useVoice-DwzMN0fq.js} +1 -1
- package/dist/chunks/{util-CeIKZmj9.js → util-DD30Y4o8.js} +1 -1
- package/dist/chunks/utils-D44M8obg.js +1 -0
- package/dist/chunks/validatePlugin-DpHiJRsT.js +1 -0
- package/dist/chunks/{vim-DUZQCWUP.js → vim-zc9EiMil.js} +1 -1
- package/dist/chunks/{voice-BkRIHZiM.js → voice-BRhZt4jW.js} +2 -2
- package/dist/chunks/{voiceModeEnabled-CPQUE3PU.js → voiceModeEnabled-168-1Ocs.js} +1 -1
- package/dist/chunks/voiceModeEnabled-CTT25yFj.js +1 -0
- package/dist/chunks/{voiceStreamSTT-Dr_wH1Kh.js → voiceStreamSTT-B80UegKG.js} +1 -1
- package/dist/chunks/voiceStreamSTT-BpYhKo2H.js +1 -0
- package/dist/chunks/{workerRegistry-CT7_kjvY.js → workerRegistry-s8nnpmUO.js} +1 -1
- package/dist/chunks/worktree-CkB4jLXK.js +1 -0
- package/dist/chunks/{xml-DD_ldd3X.js → xml-DTMvLcPg.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-SIUwkD8j.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-DXJdube9.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-BOSW4Zdy.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-B8oAAHSI.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-DYhmGSkx.js +0 -1
- package/dist/chunks/DevChannelsDialog-DXRgY00D.js +0 -1
- package/dist/chunks/DiffDialog-PvNZfZby.js +0 -3
- package/dist/chunks/Doctor--B1HUENo.js +0 -1
- package/dist/chunks/Doctor-CE_jL9jC.js +0 -3
- package/dist/chunks/Feedback-B5rPGl_C.js +0 -2
- package/dist/chunks/Grove-C2YjB3zL.js +0 -1
- package/dist/chunks/MCPConnectionManager-CDsa79pu.js +0 -1
- package/dist/chunks/MessageSelector-CkeGQPNM.js +0 -3
- package/dist/chunks/Messages-PfbzLYOU.js +0 -11
- package/dist/chunks/PluginSettings-B2ASJ0Rx.js +0 -17
- package/dist/chunks/QueryEngine-Av0G5fze.js +0 -1
- package/dist/chunks/REPL-DCwqua0C.js +0 -1
- package/dist/chunks/REPL-Dh8vzGmF.js +0 -97
- package/dist/chunks/ResumeConversation-B3WuB8rs.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-D70C-cmA.js +0 -1
- package/dist/chunks/SentryErrorBoundary-oJUBarGg.js +0 -1
- package/dist/chunks/Settings-CreAhCsb.js +0 -2
- package/dist/chunks/TeleportRepoMismatchDialog-DqWQX6j8.js +0 -1
- package/dist/chunks/TrustDialog-CIzAlGn9.js +0 -1
- package/dist/chunks/WindowsTerminalBackend-C5SeTXqC.js +0 -2
- package/dist/chunks/api-Dz_3z1kl.js +0 -1
- package/dist/chunks/assistant-zVegFdAO.js +0 -1
- package/dist/chunks/auth-D4isgfuK.js +0 -1
- package/dist/chunks/backgroundHousekeeping-CYnAG60-.js +0 -17
- package/dist/chunks/backgroundHousekeeping-DUmxC6h0.js +0 -1
- package/dist/chunks/bridgeConfig-CNbOKpAg.js +0 -1
- package/dist/chunks/bridgeEnabled-BUJTCUHY.js +0 -1
- package/dist/chunks/bridgeMain-BimZwc2P.js +0 -68
- package/dist/chunks/bridgeMain-DYL4fl6A.js +0 -1
- package/dist/chunks/caches-CTfNpKhW.js +0 -1
- package/dist/chunks/changeDetector-Y9KV5LgG.js +0 -1
- package/dist/chunks/channelNotification-CC7Xb06W.js +0 -1
- package/dist/chunks/clear-OUVFUt8Z.js +0 -1
- package/dist/chunks/client-B47ZvTMo.js +0 -1
- package/dist/chunks/commands-FJGWgQsa.js +0 -1
- package/dist/chunks/commitAttribution-DSv9FggK.js +0 -1
- package/dist/chunks/context-noninteractive-Bd2HO-vU.js +0 -1
- package/dist/chunks/conversation-BP0phkOY.js +0 -1
- package/dist/chunks/conversation-Ci8O_eZ-.js +0 -1
- package/dist/chunks/createSession-B9MhWusY.js +0 -1
- package/dist/chunks/cronJitterConfig-BzPaa52I.js +0 -6
- package/dist/chunks/crossProjectResume-tWsqBUHc.js +0 -40
- package/dist/chunks/datadog-DJowkWhh.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CixkwbRF.js +0 -1
- package/dist/chunks/extra-usage-DGHEQOrY.js +0 -1
- package/dist/chunks/extractMemories-jvjCvtpC.js +0 -1
- package/dist/chunks/fast-Bbtx_Bs1.js +0 -1
- package/dist/chunks/gates-DSI3vpwO.js +0 -1
- package/dist/chunks/hooks-BLLL4iPv.js +0 -1
- package/dist/chunks/inboundAttachments-D-p91z3w.js +0 -1
- package/dist/chunks/initReplBridge-BiHXpDEY.js +0 -1
- package/dist/chunks/language-B_-BfBT4.js +0 -1
- package/dist/chunks/launchAutofixPr-D2qac07g.js +0 -2
- package/dist/chunks/loadAgentsDir-vB1QEZ7H.js +0 -1
- package/dist/chunks/localSearch-DtVqtfvk.js +0 -1
- package/dist/chunks/login-D-N78G6r.js +0 -1
- package/dist/chunks/logout-CFggVS-9.js +0 -1
- package/dist/chunks/mcp-CAYGNxCb.js +0 -1
- package/dist/chunks/mcp-COQap0SM.js +0 -6
- package/dist/chunks/mcp-DlM0OC6R.js +0 -2
- package/dist/chunks/model-DdbcxKub.js +0 -1
- package/dist/chunks/permissions-BLzPHh_3.js +0 -3
- package/dist/chunks/pluginStartupCheck-Cu2ezD51.js +0 -1
- package/dist/chunks/plugins-BgOP_8TX.js +0 -4
- package/dist/chunks/policyLimits-CKy_gTEt.js +0 -1
- package/dist/chunks/poorMode-DJvjO2nW.js +0 -1
- package/dist/chunks/processBashCommand-D5dC6Mya.js +0 -1
- package/dist/chunks/prompt-CQC-mh6u.js +0 -1
- package/dist/chunks/prompt-DawxLANl.js +0 -1
- package/dist/chunks/rcDebugLog-BbPkkigY.js +0 -11
- package/dist/chunks/sandbox-adapter-CxkhKgaa.js +0 -1
- package/dist/chunks/searchExtraTools-DQ6e601b.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-7Svz-7S-.js +0 -1
- package/dist/chunks/sessionMemory-DIrR3zvb.js +0 -1
- package/dist/chunks/sessionMemory-_dmj8lcH.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BdQtSkRx.js +0 -1
- package/dist/chunks/sessionObserver-_adufOGQ.js +0 -1
- package/dist/chunks/sessionStorage-W7okgAlQ.js +0 -1
- package/dist/chunks/setup-TqJ7-Nxh.js +0 -2
- package/dist/chunks/sink-CaWMZBw_.js +0 -1
- package/dist/chunks/sinks-oFfsKySL.js +0 -1
- package/dist/chunks/skillChangeDetector-CA_Tdx8N.js +0 -1
- package/dist/chunks/skillLearning-_o2D06yM.js +0 -1
- package/dist/chunks/teamHelpers-yeTNtZbb.js +0 -1
- package/dist/chunks/teammateModeSnapshot-CsNIJTKi.js +0 -1
- package/dist/chunks/teleport-JHgpwZIh.js +0 -1
- package/dist/chunks/thinkback-Quc7KPmi.js +0 -1
- package/dist/chunks/toolPool-BkCtTKXz.js +0 -1
- package/dist/chunks/toolPool-C7bOwJfR.js +0 -1
- package/dist/chunks/undercover-CBeHiWUd.js +0 -1
- package/dist/chunks/upgrade-ucJ-lnlY.js +0 -1
- package/dist/chunks/useMainLoopModel-B7ch2o9K.js +0 -1
- package/dist/chunks/useSettingsErrors-B2JGz1s8.js +0 -1
- package/dist/chunks/utils-CwhszpkT.js +0 -1
- package/dist/chunks/validatePlugin-BlVho93x.js +0 -1
- package/dist/chunks/voiceModeEnabled-DB8GCzAF.js +0 -1
- package/dist/chunks/voiceStreamSTT-DgoDscHn.js +0 -1
- package/dist/chunks/worktree-DU3xtwKW.js +0 -1
|
@@ -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{
|
|
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{Bv as o,Lo as s,Wv as c,lo as l}from"./loadAgentsDir-D7kapZB5.js";import{tn as u}from"./prompt-BBg3jtfc.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(),s(),c()}));export{p as a,f as i,y as n,h as o,g as r,_ as s,m as t};
|
|
@@ -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-1ngPRtu3.js";import{E as s,w as c}from"./debug-UI3T040K.js";import{o as l,s as u}from"./log-CzsijfHZ.js";import{G as d,GE as f,Hm as p,K as m,Ku as h,Lo as g,Na as _,Pa as v,TD as y,Vm as b,WE as x,lo as S,nl as C,ou as w,qu as T,su as E,tl as D,wD as O}from"./loadAgentsDir-D7kapZB5.js";import{Bn as k,Vn as A,zn as j}from"./prompt-BBg3jtfc.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(),f(),_(),A(),T(),y(),N(),l(),g(),o(),m(),b(),c(),E(),D();var I=[v];async function L(e,r,o){let c=M(100);p(e);let l=new i({name:`claude/tengu`,version:`2.6.6`},{capabilities:{tools:{}}});l.setRequestHandler(t,async()=>{let e=k(),t=h(e);return{tools:await Promise.all(t.map(async n=>{let r;if(n.outputSchema){let e=C(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:C(n.inputSchema),outputSchema:r}}))}}),l.setRequestHandler(n,async({params:{name:e,arguments:t}})=>{let n=h(k()),i=j(n,e);if(!i)throw Error(`Tool ${e} not found`);let l={abortController:O(),options:{commands:I,tools:n,mainLoopModel:a(),thinkingConfig:{type:`disabled`},mcpClients:[],mcpResources:{},isNonInteractiveSession:!0,debug:r,verbose:o,agentDefinitions:{activeAgents:[],allAgents:[]}},getAppState:()=>x(),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: ${n.message}`);let r=await i.call(t??{},l,d,S({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?w(e):[String(e)]).filter(Boolean).join(`
|
|
2
|
+
`).trim()||`Error`}]}}});async function f(){let e=new F;await l.connect(e)}return await f()}export{L as startMCPServer};
|
|
@@ -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-1ngPRtu3.js";import{V as re,W as _}from"./debug-UI3T040K.js";import{n as ie,r as v}from"./analytics-DqMQntaB.js";import{n as y,o as b}from"./process-DMKLUQIO.js";import{i as x,o as S}from"./platform-CuyedWpe.js";import{s as C,u as w}from"./types-Csi32ZXh.js";import{BC as T,CC as E,Cx as D,DC as ae,MS as oe,NS as O,QC as k,SC as A,TC as j,Tx as M,VC as N,XS as P,YT as F,ZC as I,ZS as L,bC as R,cw as z,dw as B,dy as V,fy as H,hw as U,lw as W,ow as G,oy as K,qT as q,sy as se,tw as J,xC as ce,yx as le}from"./loadAgentsDir-D7kapZB5.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);F(),y(),u(),B(),ne(),L(),H();var Q=d();function fe({servers:e,scope:t,onDone:n}){let r=Object.keys(e),[i,u]=(0,Z.useState)({});(0,Z.useEffect)(()=>{G().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 J(e,n,t),r++}}h(r)}let[p]=a(),h=(0,Z.useCallback)(e=>{b(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)(V,{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)(P,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}u(),se(),ie(),E(),M(),B(),k(),O(),f(),re(),F(),C(),S();async function $(e,t){try{let n=await le(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 _(e)&&X(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-BZMVuIIx.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-BTgHgOhR.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=z(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(ce(e,n),R(e,n))};try{if(t.scope){let n=N(t.scope);v(`tengu_mcp_delete`,{name:e,scope:n}),await U(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),Y(`File modified: ${T(n)}`)}let n=g(),i=h(),{servers:a}=W(`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 U(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),Y(`File modified: ${T(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${I(e)} (${T(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 G();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:D()});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=z(e);t||X(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${I(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`),A(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`),A(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=N(n.scope),i=w(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 j():void 0;await J(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`&&ae(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=N(e.scope);v(`tengu_mcp_add`,{scope:t,platform:x(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-D0S1eq1F.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)(oe,{children:(0,Q.jsx)(K,{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 @@
|
|
|
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-1ngPRtu3.js";import{c as b,s as x}from"./debug-UI3T040K.js";import{BC as S,CC as C,FS as w,NS as T,PS as E,QC as D,XS as O,YC as k,ZS as A,gy as j,kx as M,qC as N,uy as ee,vC as te,vy as P,wC as ne,yC as re}from"./loadAgentsDir-D7kapZB5.js";import{D as ie,O as ae}from"./rcDebugLog-CPGWJbI4.js";import{t as F}from"./useKeybinding-FsOnjW6T.js";import{i as oe,n as I,r as se}from"./MCPConnectionManager-BK_3uwQj.js";import{n as ce,t as le}from"./McpParsingWarnings-BOj-T8F3.js";import{a as ue,c as L,i as R,l as de,n as fe,o as z,r as pe,s as me,t as he,u as B}from"./PluginSettings-DGpIVGvV.js";function ge({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[d,f]=(0,V.useState)(!1),[g,v]=(0,V.useState)(null),[y,b]=(0,V.useState)(null),x=(0,V.useRef)(null);(0,V.useEffect)(()=>()=>x.current?.abort(),[]),p(`confirm:no`,(0,V.useCallback)(()=>{d&&(x.current?.abort(),x.current=null,f(!1),b(null))},[d]),{context:`Confirmation`,isActive:d});let S=(0,V.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 ne(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 te)&&v(e.message)}finally{f(!1),x.current=null}},[e,n]),C=_(String(e.name));if(d)return(0,H.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,H.jsxs)(s,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,H.jsxs)(h,{children:[(0,H.jsx)(j,{}),(0,H.jsx)(s,{children:` A browser window will open for authentication`})]}),y&&(0,H.jsxs)(h,{flexDirection:`column`,children:[(0,H.jsx)(s,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,H.jsx)(i,{url:y})]}),(0,H.jsx)(h,{marginLeft:3,children:(0,H.jsxs)(s,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,H.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let w=[];return e.needsAuth&&w.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),w.push({label:`Back`,value:`back`}),(0,H.jsxs)(c,{title:`${C} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,H.jsxs)(s,{children:[`Press `,e.keyName,` again to exit`]}):(0,H.jsxs)(u,{children:[(0,H.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,H.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,H.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,H.jsxs)(h,{flexDirection:`column`,gap:0,children:[(0,H.jsxs)(h,{children:[(0,H.jsx)(s,{bold:!0,children:`Type: `}),(0,H.jsx)(s,{dimColor:!0,children:e.transport})]}),e.url&&(0,H.jsxs)(h,{children:[(0,H.jsx)(s,{bold:!0,children:`URL: `}),(0,H.jsx)(s,{dimColor:!0,children:e.url})]}),e.command&&(0,H.jsxs)(h,{children:[(0,H.jsx)(s,{bold:!0,children:`Command: `}),(0,H.jsx)(s,{dimColor:!0,children:e.command})]}),(0,H.jsxs)(h,{children:[(0,H.jsx)(s,{bold:!0,children:`Used by: `}),(0,H.jsx)(s,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,H.jsxs)(h,{marginTop:1,children:[(0,H.jsx)(s,{bold:!0,children:`Status: `}),(0,H.jsxs)(s,{children:[m(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,H.jsxs)(h,{children:[(0,H.jsx)(s,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,H.jsxs)(s,{children:[m(`success`,a)(r.tick),` authenticated`]}):(0,H.jsxs)(s,{children:[m(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,H.jsx)(h,{children:(0,H.jsx)(s,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,H.jsx)(h,{children:(0,H.jsxs)(s,{color:`error`,children:[`Error: `,g]})}),(0,H.jsx)(h,{children:(0,H.jsx)(M,{options:w,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var V,H,U=e((()=>{n(),V=t(a(),1),f(),F(),C(),y(),A(),ee(),P(),H=g()}));function W(e){switch(e){case`project`:return{label:`Project MCPs`,path:S(e)};case`user`:return{label:`User MCPs`,path:S(e)};case`local`:return{label:`Local MCPs`,path:S(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function _e(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 ve({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:a,onComplete:f}){let[p]=o(),[g,_]=(0,G.useState)(0),y=G.useMemo(()=>_e(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),x=G.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=G.useMemo(()=>(y.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[y]),C=W(`dynamic`),w=G.useMemo(()=>{let e=[];for(let t of q){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,G.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,G.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),D=e=>w.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),k=b(),A=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let j=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,K.jsxs)(h,{children:[(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,K.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,K.jsx)(s,{dimColor:!n,children:a})]},`${e.name}-${t}`)},M=e=>{let t=D(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,K.jsxs)(h,{children:[(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,K.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,K.jsx)(s,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},N=e.length+t.length;return(0,K.jsxs)(h,{flexDirection:`column`,children:[(0,K.jsx)(le,{}),(0,K.jsx)(c,{title:`Manage MCP servers`,subtitle:`${N} ${v(N,`server`)}`,onCancel:T,hideInputGuide:!0,children:(0,K.jsxs)(h,{flexDirection:`column`,children:[q.map(e=>{let t=y.get(e);if(!t||t.length===0)return null;let n=W(e);return(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsxs)(h,{paddingLeft:2,children:[(0,K.jsx)(s,{bold:!0,children:n.label}),n.path&&(0,K.jsxs)(s,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>j(e))]},e)}),x.length>0&&(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsx)(h,{paddingLeft:2,children:(0,K.jsx)(s,{bold:!0,children:`claude.ai`})}),x.map(e=>j(e))]}),t.length>0&&(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsx)(h,{paddingLeft:2,children:(0,K.jsx)(s,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,K.jsxs)(h,{flexDirection:`column`,marginTop:1,children:[(0,K.jsx)(h,{paddingLeft:2,children:(0,K.jsxs)(s,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>M(e))]},e))]}),S.length>0&&(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsxs)(h,{paddingLeft:2,children:[(0,K.jsx)(s,{bold:!0,children:C.label}),C.path&&(0,K.jsxs)(s,{dimColor:!0,children:[` (`,C.path,`)`]})]}),S.map(e=>j(e))]}),(0,K.jsxs)(h,{flexDirection:`column`,children:[A&&(0,K.jsx)(s,{dimColor:!0,children:k?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,K.jsxs)(s,{dimColor:!0,children:[(0,K.jsx)(i,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,K.jsx)(h,{paddingX:1,children:(0,K.jsx)(s,{dimColor:!0,italic:!0,children:(0,K.jsxs)(u,{children:[(0,K.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,K.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,K.jsx)(O,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var G,K,q,ye=e((()=>{n(),G=t(a(),1),f(),F(),D(),x(),y(),A(),ce(),K=g(),q=[`project`,`local`,`user`,`enterprise`]}));function be({serverName:e,onComplete:t}){let[n]=o(),i=w(),a=se(),[c,l]=(0,J.useState)(!0),[u,d]=(0,J.useState)(null);return(0,J.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,Y.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,Y.jsxs)(s,{color:`text`,children:[`Reconnecting to `,(0,Y.jsx)(s,{bold:!0,children:e})]}),(0,Y.jsxs)(h,{children:[(0,Y.jsx)(j,{}),(0,Y.jsx)(s,{children:` Establishing connection to MCP server`})]})]}):u?(0,Y.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,Y.jsxs)(h,{children:[(0,Y.jsxs)(s,{children:[m(`error`,n)(r.cross),` `]}),(0,Y.jsxs)(s,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,Y.jsxs)(s,{dimColor:!0,children:[`Error: `,u]})]}):null}var J,Y,xe=e((()=>{n(),J=t(a(),1),f(),I(),T(),P(),Y=g()}));function Se({onComplete:e}){let t=E(e=>e.mcp),n=E(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>N(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 re(e.name,e.config).tokens(),r=ie()!==null&&e.type===`connected`,i=e.type===`connected`&&k(t.tools,e.name).length>0;o=!!n||r||i}let s={name:e.name,client:e,scope:n};return a?{...s,transport:`claudeai-proxy`,isAuthenticated:!1,config:e.config}:r?{...s,transport:`sse`,isAuthenticated:o,config:e.config}:i?{...s,transport:`http`,isAuthenticated:o,config:e.config}:{...s,transport:`stdio`,config:e.config}}));e||s(n)}return n(),()=>{e=!0}},[l,t.tools]),(0,X.useEffect)(()=>{o.length===0&&l.length>0||o.length===0&&c.length===0&&e("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.")},[o.length,l.length,c.length,e]),i.type){case`list`:return(0,Z.jsx)(ve,{servers:o,agentServers:c,onSelectServer:e=>a({type:`server-menu`,server:e}),onSelectAgentServer:e=>a({type:`agent-server-menu`,agentServer:e}),onComplete:e,defaultTab:i.defaultTab});case`server-menu`:{let n=k(t.tools,i.server.name),r=i.server.transport===`claudeai-proxy`?`claude.ai`:`Claude Code`;return i.server.transport===`stdio`?(0,Z.jsx)(me,{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)(de,{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)(pe,{server:i.server,onSelectTool:(e,t)=>a({type:`server-tool-detail`,server:i.server,toolIndex:t}),onBack:()=>a({type:`server-menu`,server:i.server})});case`server-tool-detail`:{let e=k(t.tools,i.server.name)[i.toolIndex];return e?(0,Z.jsx)(ue,{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)(ge,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Ce=e((()=>{X=t(a(),1),C(),D(),T(),ae(),U(),ye(),B(),L(),z(),R(),Z=g()})),we=e((()=>{U(),ye(),xe(),B(),Ce(),L(),z(),R()}));function Te({action:e,target:t,onComplete:n}){let r=E(e=>e.mcp.clients),i=oe(),a=(0,Q.useRef)(!1);return(0,Q.useEffect)(()=>{if(a.current)return;a.current=!0;let o=e===`enable`,s=r.filter(e=>e.name!==`ide`),c=t===`all`?s.filter(e=>o?e.type===`disabled`:e.type!==`disabled`):s.filter(e=>e.name===t);if(c.length===0){n(t===`all`?`All MCP servers are already ${o?`enabled`:`disabled`}`:`MCP server "${t}" not found`);return}for(let e of c)i(e.name);n(t===`all`?`${o?`Enabled`:`Disabled`} ${c.length} MCP server(s)`:`MCP server "${t}" ${o?`enabled`:`disabled`}`)},[e,t,r,i,n]),null}async function Ee(e,t,n){if(n){let t=n.trim().split(/\s+/);if(t[0]===`no-redirect`)return(0,$.jsx)(Se,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(be,{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)(he,{onComplete:e,args:`manage`,showMcpRedirectMessage:!0}):(0,$.jsx)(Se,{onComplete:e})}var Q,$;e((()=>{Q=t(a(),1),we(),xe(),I(),T(),fe(),$=g()}))();export{Ee as call};
|
|
@@ -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-
|
|
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-1ngPRtu3.js";import{d as s,s as c}from"./debug-UI3T040K.js";import{r as l,t as u}from"./datadog-BK8eJz8B.js";import{i as d,r as f,t as p}from"./src-BlLavFUS.js";import{i as m,t as h}from"./gates-CxWIWtmd.js";import{n as g,t as _}from"./hostAdapter-BcdDPVTj.js";import{n as v,t as y}from"./stdio-BEEzuxaZ.js";import{r as b,t as x}from"./sink-Cugto5We.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 +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-
|
|
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-1ngPRtu3.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-D7kapZB5.js";import{r as x,t as S}from"./datadog-BK8eJz8B.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-Cugto5We.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 +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-
|
|
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-1ngPRtu3.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 M,x as N}from"./startupProfiler-DnXZaX4A.js";import{Ck as P,Hn as ne,NS as F,PS as I,Wn as L,eu as R,kx as re,lp as z,tu as ie,up as ae,uy as oe,vk as se,xk as B}from"./loadAgentsDir-D7kapZB5.js";import{r as ce,t as le}from"./browser-fLRXxIsQ.js";import{t as V}from"./useKeybinding-FsOnjW6T.js";import{l as H,u as U}from"./referral-BKeCKnOJ.js";import{r as ue,t as de}from"./promptEditor-CvaugNTt.js";import{homedir as fe}from"os";import{join as W,relative as pe}from"path";import{mkdir as G,writeFile as me}from"fs/promises";function he(e){return O(e)!==null}var ge=e((()=>{k()}));function _e({onSelect:e,onCancel:t}){let r=(0,K.use)(B()),a=W(n(),`CLAUDE.md`),o=W(g(),`CLAUDE.md`),s=r.some(e=>e.path===a),u=r.some(e=>e.path===o),d=[...r.filter(e=>e.type!==`AutoMem`&&e.type!==`TeamMem`).map(e=>({...e,exists:!0})),...s?[]:[{path:a,type:`User`,content:``,exists:!1}],...u?[]:[{path:o,type:`Project`,content:``,exists:!1}]],m=new Map,h=d.map(e=>{let t=ee(e.path),n=e.exists?``:` (new)`,r=e.parent?(m.get(e.parent)??0)+1:0;m.set(e.path,r);let i=r>0?` `.repeat(r-1):``,s;s=e.type===`User`&&!e.isNested&&e.path===a?`User memory`:e.type===`Project`&&!e.isNested&&e.path===o?`Project memory`:r>0?`${i}L ${t}${n}`:`${t}`;let c,l=he(g());return c=e.type===`User`&&!e.isNested?`Saved in ~/.claude/CLAUDE.md`:e.type===`Project`&&!e.isNested&&e.path===o?`${l?`Checked in at`:`Saved in`} ./CLAUDE.md`:e.parent?`@-imported`:e.isNested?`dynamically loaded`:``,{label:s,value:e.path,description:c}}),_=[],v=I(e=>e.agentDefinitions);if(x()){_.push({label:`Open auto-memory folder`,value:`${Y}${te()}`,description:``});for(let e of v.activeAgents)if(e.memory){let t=ne(e.agentType,e.memory);_.push({label:`Open ${i.bold(e.agentType)} agent memory`,value:`${Y}${t}`,description:`${e.memory} scope`})}}h.push(..._);let b=J&&h.some(e=>e.value===J)?J:h[0]?.value||``,[S,C]=(0,K.useState)(x),[w,E]=(0,K.useState)(ie),[D]=(0,K.useState)(x),O=I(e=>Object.values(e.tasks).some(e=>e.type===`dream`&&e.status===`running`)),[k,A]=(0,K.useState)(null);(0,K.useEffect)(()=>{D&&ae().then(A)},[D,O]);let j=O?`running`:k===null?``:k===0?`never`:`last ran ${M(new Date(k))}`,[N,P]=(0,K.useState)(null),F=N!==null,L=+!!D;function R(){let e=!S;y(`userSettings`,{autoMemoryEnabled:e}),C(e),T(`tengu_auto_memory_toggled`,{enabled:e})}function z(){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`,()=>{N===0?R():N===1&&z()},{context:`Confirmation`,isActive:F}),f(`select:next`,()=>{P(e=>e!==null&&e<L?e+1:null)},{context:`Select`,isActive:F}),f(`select:previous`,()=>{P(e=>e!==null&&e>0?e-1:e)},{context:`Select`,isActive:F}),(0,q.jsxs)(p,{flexDirection:`column`,width:`100%`,children:[(0,q.jsxs)(p,{flexDirection:`column`,marginBottom:1,children:[(0,q.jsx)(l,{isFocused:N===0,children:(0,q.jsxs)(c,{children:[`Auto-memory: `,S?`on`:`off`]})}),D&&(0,q.jsx)(l,{isFocused:N===1,styled:!1,children:(0,q.jsxs)(c,{color:N===1?`suggestion`:void 0,children:[`Auto-dream: `,w?`on`:`off`,j&&(0,q.jsxs)(c,{dimColor:!0,children:[` · `,j]}),!O&&w&&(0,q.jsx)(c,{dimColor:!0,children:` · /dream to run`})]})})]}),(0,q.jsx)(re,{defaultFocusValue:b,options:h,isDisabled:F,onChange:t=>{if(t.startsWith(Y)){let e=t.slice(15);G(e,{recursive:!0}).catch(()=>{}).then(()=>ce(e));return}J=t,e(t)},onCancel:t,onUpFromFirstItem:()=>P(L)})]})}var K,q,J,Y,X=e((()=>{a(),s(),K=t(s(),1),h(),H(),d(),V(),_(),w(),R(),z(),F(),L(),le(),P(),r(),v(),N(),ge(),b(),oe(),q=m(),Y=`__open_folder__`}));function ve(e){let t=fe(),n=D(),r=e.startsWith(t)?`~`+e.slice(t.length):null,i=e.startsWith(n)?`./`+pe(n,e):null;return r&&i?r.length<=i.length?r:i:r||i||e}var ye=e((()=>{s(),d(),E(),m()}));function be({onDone:e}){let t=async t=>{try{t.includes(n())&&await G(n(),{recursive:!0});try{await me(t,``,{encoding:`utf8`,flag:`wx`})}catch(e){if(S(e)!==`EEXIST`)throw e}await de(t);let r=`default`,i=``;process.env.VISUAL?(r=`$VISUAL`,i=process.env.VISUAL):process.env.EDITOR&&(r=`$EDITOR`,i=process.env.EDITOR);let a=r===`default`?``:`Using ${r}="${i}".`,o=a?`> ${a} To change editor, set $EDITOR or $VISUAL environment variable.`:`> To use a different editor, set the $EDITOR or $VISUAL environment variable.`;e(`Opened memory file at ${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)(_e,{onSelect:t,onCancel:r})}),(0,Q.jsx)(p,{marginTop:1,children:(0,Q.jsxs)(c,{dimColor:!0,children:[`Learn more: `,(0,Q.jsx)(o,{url:`https://code.claude.com/docs/en/memory`})]})})]})})}var Z,Q,$;e((()=>{Z=t(s(),1),d(),X(),ye(),P(),r(),C(),A(),ue(),Q=m(),$=async e=>(se(),await B(),(0,Q.jsx)(be,{onDone:e}))}))();export{$ as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dr as e,Pr as t}from"./paths-1ngPRtu3.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-
|
|
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-1ngPRtu3.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{Df as w,Ef as T,IS as E,Jg as D,Kg as O,NS as k,PS as A,qg as j}from"./loadAgentsDir-D7kapZB5.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-CBwIvl73.js";function I({onDone:e}){let t=A(e=>e.mainLoopModel),r=A(e=>e.mainLoopModelForSession),i=A(e=>e.fastMode),a=E();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=E(),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 w(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(),T(),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-
|
|
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-1ngPRtu3.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-D7kapZB5.js";import{d as v,m as y,p as b}from"./rcDebugLog-CPGWJbI4.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,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-
|
|
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-1ngPRtu3.js";import{d as c,s as l}from"./debug-UI3T040K.js";import{o as u,u as d}from"./proxy-CfZp-wce.js";import{AT as f,FE as p,IE as m,Ko as h,Lo as g,MT as ee,Wo as _,Xc as v,Yc as y,Zc as b,__ as x,bo as S,co as C,fm as te,g_ as ne,gm as w,h_ as T,jT as E,m_ as D,st as O,ut as k}from"./loadAgentsDir-D7kapZB5.js";import{Bn as A,Hn as re,Vn as j,i as ie,r as M,t as N}from"./prompt-BBg3jtfc.js";import{F as ae,I as P,L as F,P as I,R as L,Y as R}from"./rcDebugLog-CPGWJbI4.js";import{r as z,t as B}from"./store-DhI7Lcan.js";import{i as V,n as H,r as U,t as W}from"./openaiShared-D5lOejS1.js";import{randomUUID as G}from"crypto";function K(e){if(!e)return 0;let t=0,n=/(\d+(?:\.\d+)?)(ms|s|m|h|d)/g,r;for(;(r=n.exec(e))!==null;){let e=Number(r[1]);switch(r[2]){case`ms`:t+=e/1e3;break;case`s`:t+=e;break;case`m`:t+=e*60;break;case`h`:t+=e*3600;break;case`d`:t+=e*86400;break}}if(t===0){let n=Number(e);Number.isFinite(n)&&(t=n)}return t<=0?0:Math.floor(Date.now()/1e3)+t}function q(e,t){if(e===null||t===null)return null;let n=Number(e),r=Number(t);if(!Number.isFinite(n)||!Number.isFinite(r)||r<=0)return null;let i=Math.max(0,r-n);return Math.min(1,Math.max(0,i/r))}var J,oe=e((()=>{J={providerId:`openai`,parseHeaders(e){let t=[],n=q(e.get(`x-ratelimit-remaining-requests`),e.get(`x-ratelimit-limit-requests`));n!==null&&t.push({kind:`requests`,label:`RPM`,utilization:n,resetsAt:K(e.get(`x-ratelimit-reset-requests`))||void 0});let r=q(e.get(`x-ratelimit-remaining-tokens`),e.get(`x-ratelimit-limit-tokens`));return r!==null&&t.push({kind:`tokens`,label:`TPM`,utilization:r,resetsAt:K(e.get(`x-ratelimit-reset-tokens`))||void 0}),t}}}));function se(e){return async(...t)=>{let n=await e(...t);try{z(`openai`,J.parseHeaders(n.headers))}catch{}return n}}function ce(e){if(Y)return Y;let t=process.env.OPENAI_API_KEY||``,n=process.env.OPENAI_BASE_URL,r=se(e?.fetchOverride??globalThis.fetch),i=new V({apiKey:t,...n&&{baseURL:n},maxRetries:e?.maxRetries??0,timeout:parseInt(process.env.API_TIMEOUT_MS||`600000`,10),dangerouslyAllowBrowser:!0,...process.env.OPENAI_ORG_ID&&{organization:process.env.OPENAI_ORG_ID},...process.env.OPENAI_PROJECT_ID&&{project:process.env.OPENAI_PROJECT_ID},fetchOptions:u({forAnthropicAPI:!1}),fetch:r});return e?.fetchOverride||(Y=i),i}var Y,le=e((()=>{U(),oe(),B(),d(),Y=null}));function X(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 ue(e){if(typeof e==`string`)return e;if(!Array.isArray(e))return X(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:X(e)}function de(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=X(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:X(e.content)});continue}if(i===`assistant`){let n=X(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:ue(e.content)})}return{input:t,instructions:n.length>0?n.join(`
|
|
3
3
|
|
|
4
4
|
`):void 0}}function fe(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 pe(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 me(e){let{input:t,instructions:n}=de(e.messages),r=fe(e.tools);return{model:e.model,stream:!0,store:!1,input:t,...n?{instructions:n}:{},...r.length>0?{tools:r}:{},...e.toolChoice?{tool_choice:pe(e.toolChoice)}:{},...e.reasoningEffort?{reasoning:{effort:e.reasoningEffort}}:{},parallel_tool_calls:!0}}async function*he(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 ge(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 _e(e){return e?.status===`incomplete`?`max_tokens`:`end_turn`}async function*ve(e,t){let n=`msg_${G().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:_e(e),stop_sequence:null},usage:ge(e)},yield{type:`message_stop`}}}}async function ye(e){let t=await
|
|
10
|
-
`);return i?[S({content:`<available-deferred-tools>\n${i}\n</available-deferred-tools>`,isMeta:!0}),...e]:e}function Ee(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:
|
|
9
|
+
`)}}}function ge(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 _e(e){return e?.status===`incomplete`?`max_tokens`:`end_turn`}async function*ve(e,t){let n=`msg_${G().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:_e(e),stop_sequence:null},usage:ge(e)},yield{type:`message_stop`}}}}async function ye(e){let t=await f(),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 he(i)}var be=e((()=>{E()}));function xe(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 Se(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 Z(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 Ce=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 we(e){let t=process.env.CLAUDE_CODE_EFFORT_LEVEL?.toLowerCase();if(!(t===`auto`||t===`unset`))return Q(t)??Q(e)??`medium`}function Te(e,t,n,r){if(!r||v())return e;let i=t.filter(e=>n.has(e.name)).map(N).sort().join(`
|
|
10
|
+
`);return i?[S({content:`<available-deferred-tools>\n${i}\n</available-deferred-tools>`,isMeta:!0}),...e]:e}function Ee(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:_(l,r,i),usage:a,stop_reason:o,stop_sequence:null},requestId:void 0,type:`assistant`,uuid:G(),timestamp:new Date().toISOString()}),o===`max_tokens`&&c.push(C({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*De(e,t,n,r,a){try{let s=R(a.model),l=h(e,n),u=await b(a.model,n,a.getToolPermissionContext||(async()=>A()),a.agents||[],a.querySource),d=new Set;if(u)for(let e of n)ie(e)&&d.add(e.name);let f=n;u&&d.size>0&&(f=n.filter(e=>!!(!d.has(e.name)||re(e,`SearchExtraTools`))));let p=await Promise.all(f.map(e=>k(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model,deferLoading:u&&d.has(e.name)}))),g=p.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),_=xe(s),v=L(Te(l.filter(Ee),n,d,u),t,{enableThinking:_}),y=F(g),x=P(a.toolChoice),S=we(a.effortValue);if(u){let e=f.filter(e=>d.has(e.name)).length;c(`[OpenAI] Tool search enabled: ${e}/${d.size} deferred tools included, total tools=${y.length}`)}else c(`[OpenAI] Tool search disabled, total tools=${y.length}`);let{upperLimit:C}=o(s),w=Se(C,a.maxOutputTokensOverride);c(`[OpenAI] Calling model=${s}, messages=${v.length}, tools=${y.length}, thinking=${_}`);let E=ee()?ve(await ye({request:me({model:s,messages:v,tools:y,toolChoice:x,reasoningEffort:S}),signal:r,fetchOverride:a.fetchOverride}),s):ae(await ce({maxRetries:0,fetchOverride:a.fetchOverride,source:a.querySource}).chat.completions.create(Z({model:s,messages:v,tools:y,toolChoice:x,enableThinking:_,maxTokens:w,temperatureOverride:a.temperatureOverride}),{signal:r}),s),O={},j=[],M,N=null,I={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},z=0,B=Date.now();for await(let e of E){switch(e.type){case`message_start`:M=e.message,z=Date.now()-B,e.message?.usage&&(I={...I,...e.message.usage});break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?O[t]={...n,input:``}:n.type===`text`?O[t]={...n,text:``}:n.type===`thinking`?O[t]={...n,thinking:``,signature:``}:O[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=O[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&&(I=H(I,t)),e.delta?.stop_reason!=null&&(N=e.delta.stop_reason);break}case`message_stop`:if(M){for(let e of $({partialMessage:M,contentBlocks:O,tools:n,agentId:a.agentId,usage:I,stopReason:N,maxTokens:w}))e.type===`assistant`&&j.push(e),yield e;M=null}I.input_tokens+I.output_tokens>0&&te(i(s,I),I,a.model);break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:z}:void 0}}if(m(a.langfuseTrace??null,{model:s,provider:`openai`,input:D(v),output:T(j),usage:{input_tokens:I.input_tokens,output_tokens:I.output_tokens,cache_creation_input_tokens:I.cache_creation_input_tokens,cache_read_input_tokens:I.cache_read_input_tokens},startTime:new Date(B),endTime:new Date,completionStartTime:z>0?new Date(B+z):void 0,tools:ne(p),..._&&{thinking:{type:`enabled`}}}),M)for(let e of $({partialMessage:M,contentBlocks:O,tools:n,agentId:a.agentId,usage:I,stopReason:N,maxTokens:w}))yield e}catch(e){let t=e instanceof Error?e.message:String(e);c(`[OpenAI] Error: ${t}`,{level:`error`}),yield C({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{le(),W(),I(),E(),be(),g(),O(),j(),l(),w(),a(),Ce(),p(),x(),s(),y(),M()}))();export{De 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-
|
|
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-1ngPRtu3.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-D_t0nHsS.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{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-
|
|
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-1ngPRtu3.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-BKeCKnOJ.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};
|