claude-code-best 2.6.10 → 2.6.11
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-DYIf4o0g.js → AddWorkspaceDirectory-CGKtPsTK.js} +1 -1
- package/dist/chunks/{App-Bw4stCcv.js → App-DF28Bpg9.js} +1 -1
- package/dist/chunks/ApproveApiKey-BtiWOryM.js +1 -0
- package/dist/chunks/{ApproveApiKey-CNBKF9de.js → ApproveApiKey-D21kbmQj.js} +1 -1
- package/dist/chunks/{AssistantSessionChooser-DU5OOPwq.js → AssistantSessionChooser-CDfwNVi5.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-ChDZ6M4c.js → BackgroundTasksDialog-5RpkAbJz.js} +1 -1
- package/dist/chunks/{BypassPermissionsModeDialog-UOkwRr3W.js → BypassPermissionsModeDialog-BDWFw61G.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-6UL2_PCg.js → ClaudeInChromeOnboarding-CpN0yIU_.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-DBfmH_dG.js → ClaudeMdExternalIncludesDialog-CWRHpy22.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-Dje7A0F2.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DQf3dmj6.js +1 -0
- package/dist/chunks/{DesktopHandoff-B-ySC5nP.js → DesktopHandoff-CKHLXiwc.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-DZMsKuak.js → DevChannelsDialog-BwMFW7Wt.js} +1 -1
- package/dist/chunks/{DiffDialog-CeYcqIIw.js → DiffDialog-oA1v0BMo.js} +1 -1
- package/dist/chunks/Doctor-ButdpAkf.js +1 -0
- package/dist/chunks/{Doctor-ByQrTdef.js → Doctor-QVMo0fIh.js} +1 -1
- package/dist/chunks/{ExitFlow-gMv13EpM.js → ExitFlow-DJLYN-Bd.js} +1 -1
- package/dist/chunks/{Feedback-CGRlFB5g.js → Feedback-CpfhqIEv.js} +1 -1
- package/dist/chunks/{Grove-CnHyPepC.js → Grove-BugC6ssx.js} +1 -1
- package/dist/chunks/Grove-CmdRVv9F.js +1 -0
- package/dist/chunks/{HybridTransport-CiY6jyhx.js → HybridTransport-PeXWuYfl.js} +1 -1
- package/dist/chunks/{ITermBackend-CG-a4QYW.js → ITermBackend-dcs68DGS.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-umJZVrz-.js → InvalidConfigDialog-DdB9_Ve0.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-C62kuhHc.js → InvalidSettingsDialog-BL8nxwWQ.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-BbGFGZTr.js → MCPConnectionManager-D2eAGUME.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-DW0d9Lsb.js → McpParsingWarnings-BYPXpmte.js} +1 -1
- package/dist/chunks/{MessageSelector-A-814zUi.js → MessageSelector-Bzq8CYAH.js} +1 -1
- package/dist/chunks/{Messages-C4nIAGDL.js → Messages-uRxxAMW-.js} +2 -2
- package/dist/chunks/{Onboarding-BRePz3fJ.js → Onboarding-ByLnHSnW.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-DEZsyI6y.js → OverageCreditUpsell-CVNfTSKG.js} +1 -1
- package/dist/chunks/{PluginSettings-CuZtXDaS.js → PluginSettings-h9Lj0vW6.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-BrpVQJVn.js → PromptInputFooterSuggestions-CYWSLCgA.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-BlGRpX1Q.js → PromptInputHelpMenu-BsYNhZCw.js} +1 -1
- package/dist/chunks/{QueryEngine-CK9YRTZo.js → QueryEngine-CxP2S3qi.js} +1 -1
- package/dist/chunks/{REPL-D-t0XQx2.js → REPL-CV12-ns7.js} +6 -6
- package/dist/chunks/REPL-h1bwm8ee.js +1 -0
- package/dist/chunks/{RemoteCallout-DvOZQWoG.js → RemoteCallout-WWO84za-.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-BlIA65dM.js → RemoteSessionManager-Dx2skKnM.js} +1 -1
- package/dist/chunks/{ResumeConversation-BTccgPK8.js → ResumeConversation-CagiCg7-.js} +1 -1
- package/dist/chunks/{SSETransport-CIvM80QS.js → SSETransport-BHdzk1HO.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-BJ2d8mtx.js +1 -0
- package/dist/chunks/SentryErrorBoundary-CYiFofRZ.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-BK2HjzVw.js → SentryErrorBoundary-CmewX8Dv.js} +1 -1
- package/dist/chunks/{Settings-D3Kpcb7q.js → Settings-BcgtW60l.js} +2 -2
- package/dist/chunks/{TeleportProgress-BFlMrsa_.js → TeleportProgress-BmbhZlOg.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-BUeyIQCH.js → TeleportRepoMismatchDialog-BAwtgUhR.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-CHfeyo9J.js → TeleportResumeWrapper-BlkvOdYn.js} +1 -1
- package/dist/chunks/{ThemePicker-a5n2EKgk.js → ThemePicker-v_3lh136.js} +1 -1
- package/dist/chunks/{TmuxBackend-Ct9v-J78.js → TmuxBackend-B7Nabc5t.js} +1 -1
- package/dist/chunks/{TrustDialog-e1nyM-Fp.js → TrustDialog-CHu5eoeR.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-BHCepjdO.js → ValidationErrorsList-BSMetgqr.js} +1 -1
- package/dist/chunks/{WelcomeV2-BnyziLbm.js → WelcomeV2-DZfBSTu5.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-Dw6qjsBu.js → WindowsTerminalBackend-CeSoQ_Nk.js} +1 -1
- package/dist/chunks/{add-dir-CjnY5yfR.js → add-dir-7UeFZkdv.js} +1 -1
- package/dist/chunks/{agentDisplay-Dfx-axK9.js → agentDisplay-DJgsfIlm.js} +1 -1
- package/dist/chunks/{agents-lM-cxA8_.js → agents-DD7gQVZD.js} +1 -1
- package/dist/chunks/{agents-CICHEOOq.js → agents-DK0y9jId.js} +1 -1
- package/dist/chunks/{ant-JgExUpwJ.js → ant-PhgMZT08.js} +1 -1
- package/dist/chunks/api-D4aCzJS-.js +1 -0
- package/dist/chunks/{api-CClu711S.js → api-nHsRf03G.js} +1 -1
- package/dist/chunks/{assistant-Bih7t52W.js → assistant-BJbeizyH.js} +1 -1
- package/dist/chunks/{assistant-D1XefK1z.js → assistant-DO7RAhd3.js} +1 -1
- package/dist/chunks/assistant-Dvx-UrTi.js +1 -0
- package/dist/chunks/auth-Cp7Nt0ik.js +1 -0
- package/dist/chunks/{auth-CU6ArDos.js → auth-DxRiJwZ-.js} +1 -1
- package/dist/chunks/{autoMode-DM9eDMmT.js → autoMode-BswSpjo5.js} +1 -1
- package/dist/chunks/{autonomy-CZCZ9wlx.js → autonomy-CNJQwoAQ.js} +1 -1
- package/dist/chunks/{autonomy-DUfXLZfq.js → autonomy-Lc78acHX.js} +1 -1
- package/dist/chunks/{autonomyPanel-kUZwcjfu.js → autonomyPanel-DxcumRp-.js} +1 -1
- package/dist/chunks/{backgroundHousekeeping-KGRk7QeA.js → backgroundHousekeeping-BkfWgzIP.js} +2 -2
- package/dist/chunks/backgroundHousekeeping-BxBI2KkX.js +1 -0
- package/dist/chunks/{branch-Ac3HXXs2.js → branch-BPsUW1dk.js} +1 -1
- package/dist/chunks/{bridge-Drt-UmFp.js → bridge-DcOGvDbb.js} +2 -2
- package/dist/chunks/{bridgeConfig-GQzZVhuF.js → bridgeConfig-CvKdNJOg.js} +1 -1
- package/dist/chunks/bridgeConfig-Dkn5GGec.js +1 -0
- package/dist/chunks/bridgeEnabled-CjaYKTo5.js +1 -0
- package/dist/chunks/{bridgeEnabled-CDoXbe3S.js → bridgeEnabled-D01faWms.js} +1 -1
- package/dist/chunks/{bridgeMain-B0fLyOLC.js → bridgeMain-Bu2oOX31.js} +6 -6
- package/dist/chunks/bridgeMain-CEpOBx8Z.js +1 -0
- package/dist/chunks/{bridgeMessaging-gRm2WcIE.js → bridgeMessaging-BZMDSZAN.js} +1 -1
- package/dist/chunks/{btw-B2Tq2ewP.js → btw-B8s-X_cm.js} +1 -1
- package/dist/chunks/{buddy-v00QHFZ6.js → buddy-DkB1xU1o.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-DAr5U3Ep.js → bypassPermissionsKillswitch-B9Qz9zKO.js} +1 -1
- package/dist/chunks/{caches-DHUk9KMo.js → caches-BuSzLvN9.js} +2 -2
- package/dist/chunks/caches-Bvl2jdxF.js +1 -0
- package/dist/chunks/{ccrClient-1Q3C_3_r.js → ccrClient-CMZXfu9P.js} +1 -1
- package/dist/chunks/changeDetector-DTXMv7gH.js +1 -0
- package/dist/chunks/channelNotification-B7s1OoRK.js +1 -0
- package/dist/chunks/{channelNotification-d08DSK9u.js → channelNotification-t6Kgu-vX.js} +1 -1
- package/dist/chunks/{chrome-CKo0_n71.js → chrome-Cvkozg2F.js} +1 -1
- package/dist/chunks/clear-C9pufI6F.js +1 -0
- package/dist/chunks/client-CqJ5gRGj.js +1 -0
- package/dist/chunks/{color-DqtpdhFx.js → color-AYeAYKyq.js} +1 -1
- package/dist/chunks/commands-LcLR5Vgx.js +1 -0
- package/dist/chunks/commitAttribution-BZupnGMc.js +1 -0
- package/dist/chunks/{commitAttribution-BJvmLsVe.js → commitAttribution-CUqUEjsh.js} +1 -1
- package/dist/chunks/{compact-DLYic2Oa.js → compact-BF0-0_qh.js} +1 -1
- package/dist/chunks/{companion-C2CBSYiF.js → companion-Cf_kYtOD.js} +1 -1
- package/dist/chunks/{config-Cht2x9n9.js → config-45GLd-lt.js} +1 -1
- package/dist/chunks/{config-DnWYFpDc.js → config-JGm0O-ZQ.js} +1 -1
- package/dist/chunks/{context-CDz9HqRT.js → context-Bl5VUX5M.js} +1 -1
- package/dist/chunks/context-noninteractive-BtzPsJ8k.js +1 -0
- package/dist/chunks/{context-noninteractive-BUIf4IMX.js → context-noninteractive-DdPFYYO9.js} +1 -1
- package/dist/chunks/{conversation-CLRfdC_V.js → conversation-C3NWyOB3.js} +1 -1
- package/dist/chunks/conversation-oX932vBQ.js +1 -0
- package/dist/chunks/{copy-BgHTb1Z0.js → copy-CbhxPqw4.js} +1 -1
- package/dist/chunks/{createSSHSession-C_mpeqPy.js → createSSHSession-Dq2nMChz.js} +1 -1
- package/dist/chunks/createSession-1ewHG3eq.js +1 -0
- package/dist/chunks/{createSession-kVJBXQlZ.js → createSession-DTHPUie-.js} +1 -1
- package/dist/chunks/{cronJitterConfig-SI7bYvJj.js → cronJitterConfig-IGWCRDrv.js} +1 -1
- package/dist/chunks/{crossProjectResume-BMWSw62A.js → crossProjectResume-WmabPBTO.js} +1 -1
- package/dist/chunks/datadog-Da7KYZNF.js +1 -0
- package/dist/chunks/{datadog-Bd9AgZT-.js → datadog-FKvRNyFi.js} +1 -1
- package/dist/chunks/{desktop-BeUj2fqu.js → desktop-ZASE3YWy.js} +1 -1
- package/dist/chunks/{diff-BzgXDp1o.js → diff-QP-TbxuD.js} +1 -1
- package/dist/chunks/{doctor-HCOexiL5.js → doctor-DVkgmkRb.js} +1 -1
- package/dist/chunks/{effort-BaJU_k2K.js → effort-DbryQCua.js} +1 -1
- package/dist/chunks/{entry-BoXZIfxW.js → entry-D8y42iuM.js} +5 -5
- package/dist/chunks/envLessBridgeConfig-CpW0G4Eh.js +1 -0
- package/dist/chunks/{envLessBridgeConfig-CnR1E53G.js → envLessBridgeConfig-D4bSwf7w.js} +1 -1
- package/dist/chunks/{exit-B-9k0zjK.js → exit-BsNW67F9.js} +1 -1
- package/dist/chunks/{export-p85q3g8t.js → export-C9A9nOA1.js} +1 -1
- package/dist/chunks/{exportRenderer-CUqd8PZM.js → exportRenderer-CyTuZFFF.js} +1 -1
- package/dist/chunks/{extra-usage-pPprHqwq.js → extra-usage-C6s5mXW0.js} +1 -1
- package/dist/chunks/extra-usage-DL2C0_BM.js +1 -0
- package/dist/chunks/{extra-usage-core-B9Fy8_RP.js → extra-usage-core-BFCwz3XM.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-B4vaWh0y.js → extra-usage-noninteractive-IHq7s6wm.js} +1 -1
- package/dist/chunks/{extraUsage-CEHCMe7l.js → extraUsage-CIrG_Lbw.js} +1 -1
- package/dist/chunks/extractMemories-CA2eJwHy.js +1 -0
- package/dist/chunks/fast-B01NO2uA.js +1 -0
- package/dist/chunks/{fast-CiSIZ5FI.js → fast-NEKXVZqQ.js} +1 -1
- package/dist/chunks/{feedback-C2QLdCfW.js → feedback-D5iWO16P.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-CozFbFD9.js → firstPartyEventLogger-Dr3TK3IU.js} +1 -1
- package/dist/chunks/{flushGate-LXr8ynSz.js → flushGate-DygHyqmB.js} +1 -1
- package/dist/chunks/gates-BSpXbh9s.js +1 -0
- package/dist/chunks/{gates-BGfvIJXl.js → gates-Dyz_t5zJ.js} +1 -1
- package/dist/chunks/{gemini-BFBrPtVM.js → gemini-BEmbnRQR.js} +1 -1
- package/dist/chunks/{generateRecap-CLla3Ymz.js → generateRecap-DZiXeYWn.js} +1 -1
- package/dist/chunks/{generateSessionName-DF4I7gr2.js → generateSessionName-EbB2vl9t.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-C_5RCW_Z.js → githubRepoPathMapping-dky2fPeU.js} +1 -1
- package/dist/chunks/{grok-Dih61WOo.js → grok-BM6ZJ4w2.js} +1 -1
- package/dist/chunks/{growthbook-C39e6Byf.js → growthbook-JD-WW3yV.js} +1 -1
- package/dist/chunks/{heapdump-BRj4tC1y.js → heapdump-8vyFTWly.js} +1 -1
- package/dist/chunks/{help-fH9LNwox.js → help-C2DM0p8U.js} +1 -1
- package/dist/chunks/{hooks-D22Uu3Vs.js → hooks-CMh0a2pT.js} +1 -1
- package/dist/chunks/hooks-QXGwOfWj.js +1 -0
- package/dist/chunks/{hostAdapter-CbXytx4y.js → hostAdapter-CmbGfgNV.js} +1 -1
- package/dist/chunks/{ide-DM5Tw70v.js → ide-Bn8R7397.js} +1 -1
- package/dist/chunks/{inboundAttachments-2QIORKsd.js → inboundAttachments-BweY9sYo.js} +1 -1
- package/dist/chunks/inboundAttachments-N5DKbZSl.js +1 -0
- package/dist/chunks/{initReplBridge-D8sWx97P.js → initReplBridge-3CfmzjJL.js} +1 -1
- package/dist/chunks/{insights-B6ogyLuv.js → insights-NOl_PxhN.js} +1 -1
- package/dist/chunks/{install-DimDiHha.js → install-BoT2GIcz.js} +1 -1
- package/dist/chunks/{install-github-app-CQ7vkhIX.js → install-github-app-SD4PvrTR.js} +1 -1
- package/dist/chunks/{install-slack-app-By9_5YS7.js → install-slack-app-DLQXpOCt.js} +1 -1
- package/dist/chunks/{instrumentation-DbKu2GCL.js → instrumentation-BXJk0mxI.js} +3 -3
- package/dist/chunks/{job-D_DoFtev.js → job-CnlMlm3t.js} +1 -1
- package/dist/chunks/{keybindings-DYRBv1bg.js → keybindings-BjaRqcbD.js} +1 -1
- package/dist/chunks/{lang-CAMxxG9F.js → lang-BI8CzjL6.js} +1 -1
- package/dist/chunks/{language-CoHgN7rh.js → language-CRIdgj2F.js} +1 -1
- package/dist/chunks/language-DmbRGIs8.js +1 -0
- package/dist/chunks/{launchAgentsPlatform-9P8K66ku.js → launchAgentsPlatform-Bg9guiqy.js} +1 -1
- package/dist/chunks/{launchAutofixPr-BbsqqUMA.js → launchAutofixPr-BMfXGXwN.js} +1 -1
- package/dist/chunks/{launchLocalMemory-K55Yo6JM.js → launchLocalMemory-lgnXOi6U.js} +1 -1
- package/dist/chunks/{launchLocalVault-rrd1Q7jP.js → launchLocalVault-C0Oz-lto.js} +1 -1
- package/dist/chunks/{launchMemoryStores-DMZ8GNQj.js → launchMemoryStores-Bw11ruRi.js} +1 -1
- package/dist/chunks/{launchOnboarding-Duz_huXl.js → launchOnboarding-WEW34cnl.js} +1 -1
- package/dist/chunks/{launchSchedule-7VlG_3M6.js → launchSchedule-X0rcM_kM.js} +1 -1
- package/dist/chunks/{launchSkillStore-CcJL8RT0.js → launchSkillStore-DpxSlMCU.js} +1 -1
- package/dist/chunks/{launchTeleport-C8h_4F_L.js → launchTeleport-uOtMsYcI.js} +1 -1
- package/dist/chunks/{launchVault-Bm1EeT2x.js → launchVault-CJyJaPqH.js} +1 -1
- package/dist/chunks/{loadAgentsDir-HZ19tmOZ.js → loadAgentsDir-D-xcJ22-.js} +45 -45
- package/dist/chunks/loadAgentsDir-ILQxk_4G.js +1 -0
- package/dist/chunks/{loadPluginHooks-DoFtrBWf.js → loadPluginHooks-BC1Ea7_D.js} +1 -1
- package/dist/chunks/{localSearch-4cz5ia5a.js → localSearch-B6Ho7Vfj.js} +1 -1
- package/dist/chunks/localSearch-COyJeP9E.js +1 -0
- package/dist/chunks/login-Cf89biEK.js +1 -0
- package/dist/chunks/{login-D6ywctRr.js → login-uOvq1xN_.js} +1 -1
- package/dist/chunks/{logoV2Utils-jaFn88oE.js → logoV2Utils-C2cdcgtp.js} +1 -1
- package/dist/chunks/logout-CEXwTlEX.js +1 -0
- package/dist/chunks/{magicDocs-DHGtJq0K.js → magicDocs-BBjAhGN1.js} +1 -1
- package/dist/chunks/{main-Bv4AvaJk.js → main-DGsAUuG_.js} +15 -15
- package/dist/chunks/{mappers-qcXgNBi5.js → mappers-CO6koWDa.js} +1 -1
- package/dist/chunks/{mcp-iCbCqg7w.js → mcp-BrN_Tbq5.js} +2 -2
- package/dist/chunks/{mcp-BXPg0RPm.js → mcp-CZltNml5.js} +1 -1
- package/dist/chunks/{mcp-yDWIJznG.js → mcp-D6JOqdT8.js} +1 -1
- package/dist/chunks/{mcpServer-Do9XTs2J.js → mcpServer-C-0K3Azg.js} +1 -1
- package/dist/chunks/{mcpServer-DcSto-Od.js → mcpServer-C_aDoLMg.js} +1 -1
- package/dist/chunks/{memory-B0YG4r65.js → memory-BYYOgo4e.js} +1 -1
- package/dist/chunks/model-CHgqwg6N.js +1 -0
- package/dist/chunks/{model-DwVGG0mc.js → model-CrAPXYZA.js} +1 -1
- package/dist/chunks/{onChangeAppState-CHYSALjM.js → onChangeAppState-C6ZIU1SD.js} +1 -1
- package/dist/chunks/{openai-Brj68CWD.js → openai-Cm4gozk8.js} +1 -1
- package/dist/chunks/{overageCreditGrant-D5X6-TcP.js → overageCreditGrant-Pe7C_4Qi.js} +1 -1
- package/dist/chunks/{passes-B1f6NHWA.js → passes-BpI6azLG.js} +1 -1
- package/dist/chunks/{paths-D8Fx3kUi.js → paths-D9CVAtXU.js} +2 -2
- package/dist/chunks/{permissions-CYrv_WVH.js → permissions-C7wcAYOc.js} +1 -1
- package/dist/chunks/{pipeTransport-DAYnzvGK.js → pipeTransport-wjeyTgon.js} +1 -1
- package/dist/chunks/{plan-B7EPetF0.js → plan-DA8IRpHQ.js} +1 -1
- package/dist/chunks/{plugin-BRWx-_ZS.js → plugin-N2pTkzOz.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-BwxAsU2F.js → pluginAutoupdate-DCc5qDvo.js} +1 -1
- package/dist/chunks/{pluginBlocklist-BiRgxFei.js → pluginBlocklist-C_Veew3p.js} +1 -1
- package/dist/chunks/{pluginCliCommands-CXANH43C.js → pluginCliCommands-BN7loc5T.js} +1 -1
- package/dist/chunks/{pluginFlagging-CBbUoCJ9.js → pluginFlagging-Dpu1cvMo.js} +1 -1
- package/dist/chunks/{pluginOperations-B3gcFjVq.js → pluginOperations-CP6NFNog.js} +1 -1
- package/dist/chunks/pluginStartupCheck-BF0xUEJG.js +1 -0
- package/dist/chunks/{pluginStartupCheck-BNfv-Pf4.js → pluginStartupCheck-DvWHwNnD.js} +1 -1
- package/dist/chunks/{plugins-zHTS03v8.js → plugins-BHoniP5f.js} +1 -1
- package/dist/chunks/policyLimits-sh7ywop0.js +1 -0
- package/dist/chunks/{pollConfig-BWY_xmk6.js → pollConfig-xYxAmuXi.js} +1 -1
- package/dist/chunks/{poor-Bcu8JaV5.js → poor-C0KwfFF0.js} +1 -1
- package/dist/chunks/{poorMode-CDhhKGBw.js → poorMode-D7WXWZtJ.js} +1 -1
- package/dist/chunks/poorMode-DZQXZ_zu.js +1 -0
- package/dist/chunks/{print-DO52Fudu.js → print-BcRG8gkQ.js} +4 -4
- package/dist/chunks/{privacy-settings-CmHUlYoo.js → privacy-settings-DT3LGgsH.js} +1 -1
- package/dist/chunks/{processBashCommand-DltW2Ubs.js → processBashCommand-DPfJ9lrj.js} +1 -1
- package/dist/chunks/{processSlashCommand-JLJ_vF05.js → processSlashCommand-DyPCeZux.js} +1 -1
- package/dist/chunks/{prompt-BxoRdmaw.js → prompt-C69iv9cI.js} +1 -1
- package/dist/chunks/prompt-DaIJzI1P.js +1 -0
- package/dist/chunks/prompt-DnLsyywj.js +1 -0
- package/dist/chunks/{promptEditor-LQu9NhbN.js → promptEditor-BZqpLrcZ.js} +1 -1
- package/dist/chunks/{protocolHandler-DYn2E9Yl.js → protocolHandler-CfmBTg36.js} +1 -1
- package/dist/chunks/{rate-limit-options-OQt6LUP8.js → rate-limit-options-P7oQuwrl.js} +1 -1
- package/dist/chunks/{rcDebugLog-5XEbz_Yg.js → rcDebugLog-CTOZ2K3E.js} +1 -1
- package/dist/chunks/{referral-BsAvaATn.js → referral-D26orIXE.js} +1 -1
- package/dist/chunks/{refresh-TlNezXn4.js → refresh-BeSXaVya.js} +1 -1
- package/dist/chunks/{registerProtocol-COUVHFku.js → registerProtocol-DSQh-I21.js} +1 -1
- package/dist/chunks/{registry-m7JojEMY.js → registry-Dp5W2V8B.js} +1 -1
- package/dist/chunks/{release-notes-BDdughgu.js → release-notes-Cg85UVo8.js} +1 -1
- package/dist/chunks/{releaseNotes-Bd3zxid3.js → releaseNotes-Dps4SeVh.js} +2 -2
- package/dist/chunks/{reload-plugins-qUIybHNy.js → reload-plugins-Bo-R1CF3.js} +1 -1
- package/dist/chunks/{remote-env-GGlLNGsx.js → remote-env-ChQuV3rO.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-DpF5alU6.js → remoteBridgeCore-BXtygJA-.js} +1 -1
- package/dist/chunks/{remoteControlServer-C32rxr3F.js → remoteControlServer-sqW_JLwC.js} +1 -1
- package/dist/chunks/{rename-CCF7A5mG.js → rename-Bigaipiq.js} +1 -1
- package/dist/chunks/{resume-C6ereXig.js → resume-CtOI2pOJ.js} +1 -1
- package/dist/chunks/{runtimeObserver-jrNSkZU2.js → runtimeObserver-CJ955XSo.js} +2 -2
- package/dist/chunks/{runtimeObserver-DBdzsp_h.js → runtimeObserver-DojpbVgU.js} +1 -1
- package/dist/chunks/sandbox-adapter-BbrJOJNZ.js +1 -0
- package/dist/chunks/{sandbox-toggle-Bfti5GKF.js → sandbox-toggle-B9dn09gt.js} +1 -1
- package/dist/chunks/searchExtraTools-Denn1c1E.js +1 -0
- package/dist/chunks/{sentry-CZUyEC3A.js → sentry-B6tWUNGj.js} +1 -1
- package/dist/chunks/{session-DCIDa5dI.js → session-C5yIf_zV.js} +1 -1
- package/dist/chunks/{sessionDiscovery-5m_pul65.js → sessionDiscovery-CQ3iMN4s.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-1IAwziOQ.js +1 -0
- package/dist/chunks/sessionMemory-3TAJyNuJ.js +1 -0
- package/dist/chunks/{sessionMemory-BQP_RezB.js → sessionMemory-HZNzEOLd.js} +1 -1
- package/dist/chunks/sessionMemoryUtils-BAkA4sGG.js +1 -0
- package/dist/chunks/sessionObserver-DqLMFMLM.js +1 -0
- package/dist/chunks/{sessionObserver-LBqNoak9.js → sessionObserver-MQA9_wZw.js} +1 -1
- package/dist/chunks/sessionStorage-CFfMypMQ.js +1 -0
- package/dist/chunks/{sessionTitle-BIykjtKk.js → sessionTitle-BafqFHLc.js} +1 -1
- package/dist/chunks/{sessionTracing-Da_r0mIc.js → sessionTracing-_obALZbi.js} +1 -1
- package/dist/chunks/{settingsSync-BE0PQqyo.js → settingsSync-DBWi-NXU.js} +1 -1
- package/dist/chunks/{setup-CjA5bW6e.js → setup-C_GrS0Rd.js} +1 -1
- package/dist/chunks/{setup-lxzmZdw5.js → setup-D1sQnli9.js} +2 -2
- package/dist/chunks/{setup-p04XtwYu.js → setup-DIxsjw17.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-Zqp1M5St.js → shadowedRuleDetection-CwMwv9uM.js} +1 -1
- package/dist/chunks/{sideQuestion-DzJenEES.js → sideQuestion-CI5pyoQF.js} +1 -1
- package/dist/chunks/{sink-N5XR8Zgp.js → sink-BSTUubjl.js} +1 -1
- package/dist/chunks/sink-fGBOXJab.js +1 -0
- package/dist/chunks/{sinks-D8erzS9D.js → sinks-B9EsWFeb.js} +2 -2
- package/dist/chunks/sinks-BCl9slVM.js +1 -0
- package/dist/chunks/{skill-learning-CbMQ8IsZ.js → skill-learning-DThetLpo.js} +1 -1
- package/dist/chunks/{skillChangeDetector-4XWLpjQl.js → skillChangeDetector-BOH-fyEn.js} +1 -1
- package/dist/chunks/{skillGapStore-DbiDG9Pd.js → skillGapStore-BmjCK9ZR.js} +2 -2
- package/dist/chunks/{skillGapStore-Bp5IVfOx.js → skillGapStore-ax0GuSmd.js} +1 -1
- package/dist/chunks/{skillGenerator-Bys7U1l_.js → skillGenerator-Dj3xInwG.js} +2 -2
- package/dist/chunks/skillLearning-BDsjN-u-.js +1 -0
- package/dist/chunks/skillLearning-CXUsWxdi.js +1 -0
- package/dist/chunks/{skillPanel-MIHU1PPp.js → skillPanel-CJ4tvX7A.js} +3 -3
- package/dist/chunks/{skillSearchPanel-MFB-PzB1.js → skillSearchPanel-hwZvXKZ4.js} +2 -2
- package/dist/chunks/{skills-D4tZYFpd.js → skills-BVWDDcD9.js} +1 -1
- package/dist/chunks/{sprites-B479AZSz.js → sprites-B-V9otkt.js} +1 -1
- package/dist/chunks/{stats-B-ErfxCJ.js → stats-DcS6ZnsX.js} +1 -1
- package/dist/chunks/{status-DVACJLsK.js → status-DZKjK9CE.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-CwSCVvxP.js → statusNoticeHelpers-reCcymMR.js} +1 -1
- package/dist/chunks/{tag-YpE2D2ve.js → tag-B5b-waIf.js} +1 -1
- package/dist/chunks/{tasks-7N7iSiEx.js → tasks-vXM-vULI.js} +1 -1
- package/dist/chunks/teamHelpers-BBhol4dD.js +1 -0
- package/dist/chunks/{teamHelpers-BFdTH57t.js → teamHelpers-CbFFdvPw.js} +1 -1
- package/dist/chunks/{teammateModeSnapshot-CwacsQvD.js → teammateModeSnapshot-DkkMv2-b.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-W5G22rwQ.js +1 -0
- package/dist/chunks/{teleport-CPB1CHBs.js → teleport-Da0rKwCo.js} +1 -1
- package/dist/chunks/{templateJobs-BM98KAEH.js → templateJobs-BLQqrGjb.js} +1 -1
- package/dist/chunks/{terminalSetup-yQ0CoywX.js → terminalSetup-BKfVYk3w.js} +1 -1
- package/dist/chunks/{terminalSetup-CGiIwoIX.js → terminalSetup-BLU99dau.js} +1 -1
- package/dist/chunks/{theme-C5ULGNRs.js → theme-BM2CXWYE.js} +1 -1
- package/dist/chunks/{thinkback-CF_sLFvX.js → thinkback-Cd1g_2A9.js} +1 -1
- package/dist/chunks/thinkback-ChP6pvCS.js +1 -0
- package/dist/chunks/{thinkback-play-syg_SJm8.js → thinkback-play-Cg8Ys2dq.js} +1 -1
- package/dist/chunks/{toolEventObserver-CcLqNRcT.js → toolEventObserver-71WYUega.js} +1 -1
- package/dist/chunks/{toolEventObserver-CuJbsUL0.js → toolEventObserver-nxcfjaur.js} +1 -1
- package/dist/chunks/{toolPool-CRq0GSrk.js → toolPool-CN1cPGQz.js} +1 -1
- package/dist/chunks/toolPool-CygNb5cr.js +1 -0
- package/dist/chunks/{trustedDevice-C4tvgByY.js → trustedDevice-Brc9B8cZ.js} +1 -1
- package/dist/chunks/{trustedDevice-u2HpuTkN.js → trustedDevice-C0KJ0qiK.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-CWLiiq-z.js → ultrareviewCommand-BY0T8Pzl.js} +1 -1
- package/dist/chunks/undercover-bx8TwG9W.js +1 -0
- package/dist/chunks/{undercover-CNlN7Xzl.js → undercover-j27F8p49.js} +1 -1
- package/dist/chunks/{updateCCB-BWN4mOEz.js → updateCCB-Dgb2ed9v.js} +1 -1
- package/dist/chunks/upgrade-BkHztwGA.js +1 -0
- package/dist/chunks/{upgrade-CE25mJEk.js → upgrade-zs7K9UkG.js} +1 -1
- package/dist/chunks/{upload-YpyOX2a-.js → upload-Df84yCBz.js} +1 -1
- package/dist/chunks/{usage-Bw-kTwHb.js → usage-DKENFl_k.js} +1 -1
- package/dist/chunks/{usage-DNXwr_ep.js → usage-lTILrQJV.js} +1 -1
- package/dist/chunks/{useMainLoopModel-DPmF_cMn.js → useMainLoopModel-X1PW9z5A.js} +1 -1
- package/dist/chunks/{useManagePlugins-hPG7UMWo.js → useManagePlugins-DDKeDfIv.js} +1 -1
- package/dist/chunks/{useMergedTools-BSO1NflP.js → useMergedTools-CC3XwtOR.js} +1 -1
- package/dist/chunks/{useSearchInput-CR9uhbA7.js → useSearchInput-DNpNG36H.js} +1 -1
- package/dist/chunks/{useSettingsErrors-453j5XuO.js → useSettingsErrors-vGzCYpIA.js} +1 -1
- package/dist/chunks/{useVoice-B5DQ5Tay.js → useVoice-DmObXoAh.js} +1 -1
- package/dist/chunks/{util-D_BHu06u.js → util-9vJ9WIeZ.js} +1 -1
- package/dist/chunks/utils-Dg0S2Vfn.js +1 -0
- package/dist/chunks/{validatePlugin-Dxm-5f8W.js → validatePlugin-_Z4zhjSx.js} +1 -1
- package/dist/chunks/{vim-BGqKMQxl.js → vim-CK7lReJi.js} +1 -1
- package/dist/chunks/{voice-B2MWrkN3.js → voice-BLVF7E3Q.js} +1 -1
- package/dist/chunks/{voiceModeEnabled-if9dV1bW.js → voiceModeEnabled-BpLBjY2-.js} +1 -1
- package/dist/chunks/voiceModeEnabled-BqFYzoXw.js +1 -0
- package/dist/chunks/voiceStreamSTT-C0pkuXGm.js +1 -0
- package/dist/chunks/{voiceStreamSTT-CWhKAxcp.js → voiceStreamSTT-i4tUq3Hu.js} +1 -1
- package/dist/chunks/{workerRegistry-BANOcuS2.js → workerRegistry-Bg7dWLHf.js} +1 -1
- package/dist/chunks/worktree-Cg4p1J__.js +1 -0
- package/dist/chunks/{xml-DZp0WcWT.js → xml-K_hNNh2b.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-CBEOrsej.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CG26Jg7h.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1aq67dJV.js +0 -1
- package/dist/chunks/Doctor-DOil8Eh7.js +0 -1
- package/dist/chunks/Grove-CJn8QGFo.js +0 -1
- package/dist/chunks/REPL-DV96-Prr.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-CmyZbRut.js +0 -1
- package/dist/chunks/SentryErrorBoundary-B9sk4zvj.js +0 -1
- package/dist/chunks/api-DgzWK3bh.js +0 -1
- package/dist/chunks/assistant-Ojm6Wsb6.js +0 -1
- package/dist/chunks/auth-lQWhUjLX.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BcLV1-Ap.js +0 -1
- package/dist/chunks/bridgeConfig-ByjfIoJz.js +0 -1
- package/dist/chunks/bridgeEnabled-C7AI9y8g.js +0 -1
- package/dist/chunks/bridgeMain-DKQ1u3k_.js +0 -1
- package/dist/chunks/caches-DbE9R4Zh.js +0 -1
- package/dist/chunks/changeDetector--9sSzU2e.js +0 -1
- package/dist/chunks/channelNotification-CLYOd2-R.js +0 -1
- package/dist/chunks/clear-Cf1D1WkR.js +0 -1
- package/dist/chunks/client-Bzn58Ea4.js +0 -1
- package/dist/chunks/commands-CJz20FMO.js +0 -1
- package/dist/chunks/commitAttribution-BgNel6QS.js +0 -1
- package/dist/chunks/context-noninteractive-CzuLiIeO.js +0 -1
- package/dist/chunks/conversation-D2iFk7Te.js +0 -1
- package/dist/chunks/createSession-XhPMcSns.js +0 -1
- package/dist/chunks/datadog-B5oHSyS1.js +0 -1
- package/dist/chunks/envLessBridgeConfig-DgdkC9jO.js +0 -1
- package/dist/chunks/extra-usage-CsJ9Z2G1.js +0 -1
- package/dist/chunks/extractMemories-D34FfNYT.js +0 -1
- package/dist/chunks/fast-CxPB-PBH.js +0 -1
- package/dist/chunks/gates-D-kXXHiv.js +0 -1
- package/dist/chunks/hooks-Cw-F-1uO.js +0 -1
- package/dist/chunks/inboundAttachments-CZN_sUNx.js +0 -1
- package/dist/chunks/language-DB1HIsF8.js +0 -1
- package/dist/chunks/loadAgentsDir-DsskgPWe.js +0 -1
- package/dist/chunks/localSearch-CScvVw0c.js +0 -1
- package/dist/chunks/login-FdPNsHJs.js +0 -1
- package/dist/chunks/logout-CulTqT7V.js +0 -1
- package/dist/chunks/model-DG0v1297.js +0 -1
- package/dist/chunks/pluginStartupCheck-Ga_XiMnA.js +0 -1
- package/dist/chunks/policyLimits-Dsz-jkpD.js +0 -1
- package/dist/chunks/poorMode-BAuBNURJ.js +0 -1
- package/dist/chunks/prompt-D3rBUscf.js +0 -1
- package/dist/chunks/prompt-ohTcwieE.js +0 -1
- package/dist/chunks/sandbox-adapter-CQ0imVO1.js +0 -1
- package/dist/chunks/searchExtraTools-Ntz1u-YC.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-DD2a-mTZ.js +0 -1
- package/dist/chunks/sessionMemory-hbxplpxs.js +0 -1
- package/dist/chunks/sessionMemoryUtils-DlW9hqOH.js +0 -1
- package/dist/chunks/sessionObserver-Lb1c5FPy.js +0 -1
- package/dist/chunks/sessionStorage-DG68Xvsy.js +0 -1
- package/dist/chunks/sink-BdRlnpoG.js +0 -1
- package/dist/chunks/sinks-Bn0FK_Ab.js +0 -1
- package/dist/chunks/skillLearning-702-D6Lq.js +0 -1
- package/dist/chunks/skillLearning-Cz7qU9V6.js +0 -1
- package/dist/chunks/teamHelpers-CmDn2xyl.js +0 -1
- package/dist/chunks/teammateModeSnapshot-DXtG86pG.js +0 -1
- package/dist/chunks/thinkback-D1Fv1QYl.js +0 -1
- package/dist/chunks/toolPool-C4CO158z.js +0 -1
- package/dist/chunks/undercover-jZEIpxrJ.js +0 -1
- package/dist/chunks/upgrade-C_0-l0Zo.js +0 -1
- package/dist/chunks/utils--ZdihcLH.js +0 -1
- package/dist/chunks/voiceModeEnabled-0NU5pSM-.js +0 -1
- package/dist/chunks/voiceStreamSTT-yvcTWD7i.js +0 -1
- package/dist/chunks/worktree-CRn2SbHn.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-DR8-3Aex.js";import{n as o,t as s}from"./memoize-DNnuA2aU.js";import{c,d as l,f as u,o as d,p as f,s as p,u as m}from"./envUtils-BWeoiL4Y.js";import{n as ee,t as h}from"./defineProperty-80gRi2ZW.js";import{n as g,t as te}from"./axios-DhfaybwJ.js";import{i as ne,t as re}from"./src-BJz1KAd_.js";import{Ln as _,Mn as ie,Mr as ae,Tt as oe,Xn as se,Yn as v,vt as y,wn as ce,xt as le}from"./schemas-BGAvj1T4.js";import{t as ue}from"./v4-f1i_CNUT.js";import{C as de,In as b,Jt as fe,Ln as pe,Q as me,Rn as he,S as ge,b as _e,dn as ve,f as ye,g as be,h as x,t as xe,x as Se}from"./src-Di342QoJ.js";import{t as S}from"./jsx-runtime-D-D469L8.js";import{An as Ce,Cn as we,Cr as Te,Ct as Ee,En as De,Er as Oe,Gn as ke,Hn as Ae,Hr as je,Kn as Me,Ln as Ne,Mn as Pe,Nn as Fe,Rn as Ie,Sr as C,Tn as Le,U as Re,Un as ze,Vr as w,Wn as Be,bt as Ve,cn as T,et as He,hr as Ue,jr as We,kn as Ge,kr as Ke,lr as qe,nr as Je,ot as Ye,rr as Xe,tn as Ze,tr as Qe,vr as $e,vt as et,wr as tt,xr as nt,y as rt,yr as it,z as at}from"./state-sIHsFpDu.js";import{$o as ot,Aa as st,Ac as E,Al as ct,At as lt,Br as ut,C as dt,Cr as ft,D as pt,Di as mt,Dl as ht,Fa as D,Fl as gt,Fr as _t,Gn as vt,Il as yt,Ja as bt,Jt as xt,Ka as St,Ko as Ct,Ln as wt,Lr as Tt,Ma as O,Mc as Et,Na as k,Nc as Dt,Nl as Ot,Nn as kt,Nr as At,Ns as jt,Oc as Mt,Oi as Nt,Ol as Pt,Pc as A,Pl as Ft,Po as It,Pr as Lt,Qa as Rt,Rn as zt,S as Bt,Sc as j,So as Vt,T as Ht,Tn as Ut,Tt as Wt,Vt as Gt,Xi as Kt,Yn as qt,Za as Jt,Zi as Yt,_ as Xt,_c as Zt,_o as Qt,_t as $t,a as M,an as en,ao as tn,bc as nn,bl as rn,bn as an,ct as N,dn as on,dr as sn,eo as cn,gc as ln,gn as un,go as dn,hi as fn,ic as pn,it as mn,jc as hn,jo as gn,jt as _n,kl as vn,lo as P,lt as yn,mr as bn,n as xn,nc as Sn,no as Cn,on as wn,oo as F,or as Tn,ot as I,pa as En,po as Dn,pr as On,qo as kn,rs as An,rt as jn,s as Mn,st as Nn,tn as Pn,ua as Fn,uo as In,vi as Ln,vt as Rn,wn as zn,wt as Bn,x as Vn,xc as Hn,xi as Un,xo as Wn,yl as Gn,yn as Kn,yt as qn,zn as Jn,zr as Yn}from"./paths-D8Fx3kUi.js";import{E as Xn,F as Zn,K as Qn,L,O as $n,R as er,T as tr,U as nr,V as rr,X as ir,Y as ar,d as R,f as or,h as sr,i as cr,j as lr,p as ur,s as dr,t as fr,w as pr,y as mr}from"./debug-UI3T040K.js";import{n as z,r as B}from"./analytics-DqMQntaB.js";import{n as hr,t as gr}from"./cwd--iizewsn.js";import{a as _r,n as vr,r as yr}from"./process-DMKLUQIO.js";import{F as V,P as br,f as xr,g as Sr,i as Cr,m as wr,r as Tr,v as Er}from"./git-CN3qtTb_.js";import{l as Dr,s as Or,u as kr}from"./oauth-CdZEzMww.js";import{n as Ar,t as jr}from"./bundledMode-kSQejuY4.js";import{r as Mr,t as Nr}from"./execa-CGue6Z3n.js";import{n as Pr,t as Fr}from"./which-DqSAIvp2.js";import{d as Ir,f as Lr,o as Rr,s as H}from"./log-CzsijfHZ.js";import{i as zr,o as Br}from"./platform-CuyedWpe.js";import{i as Vr,n as Hr}from"./windowsPaths-swxCp7bX.js";import{s as Ur,u as Wr}from"./types-Csi32ZXh.js";import{C as Gr,b as Kr,l as qr,x as Jr}from"./teammate-DMYOtLTK.js";import{a as U,f as Yr,n as Xr,o as Zr,x as Qr}from"./startupProfiler-DnXZaX4A.js";import{n as $r,t as ei}from"./lazySchema-2sOku3cX.js";import{r as ti}from"./permissions-DXLfdE7b.js";import{g as ni,n as ri,p as ii,u as ai}from"./proxy-CfZp-wce.js";import{$T as oi,$f as si,$g as ci,A as li,Ar as ui,Av as di,Ax as fi,BC as pi,BT as mi,B_ as hi,Ba as gi,Bf as _i,Bi as vi,Ci as yi,Ck as bi,DC as xi,Dk as Si,Dl as Ci,Ds as wi,E as Ti,El as Ei,Es as Di,FC as Oi,Fc as ki,Fp as Ai,GA as ji,GC as Mi,Gi as Ni,HC as Pi,HT as Fi,Ha as Ii,Hm as Li,IC as Ri,IE as zi,IS as Bi,Ib as Vi,Ip as Hi,JC as Ui,JE as Wi,JT as Gi,J_ as Ki,KC as qi,Ka as Ji,Kl as Yi,Ku as Xi,L as Zi,LC as Qi,LS as $i,LT as ea,Lb as ta,Lc as na,Lo as ra,M as ia,MC as aa,Mi as oa,NC as sa,NO as ca,Ni as la,Nn as ua,Nx as da,Oo as fa,Ot as pa,Ov as ma,Ox as ha,P as ga,PC as _a,QT as va,RC as ya,RT as ba,Ra as xa,Rk as Sa,Rn as Ca,SA as wa,SE as Ta,Si as Ea,St as Da,Sv as Oa,Sw as ka,Sx as Aa,T as ja,Tk as Ma,Ts as Na,Tt as Pa,Tv as Fa,UE as Ia,Ua as La,VC as Ra,VE as za,VT as Ba,V_ as Va,Va as Ha,Vm as Ua,WA as Wa,WC as Ga,XO as Ka,X_ as qa,Xg as Ja,Xi as Ya,Xk as Xa,YE as Za,Y_ as Qa,Yg as $a,Yr as eo,ZE as to,ZT as W,Zg as no,Zn as ro,_a as io,_h as ao,_j as oo,_k as so,_o as co,_v as lo,_w as uo,aA as fo,aE as po,af as mo,aw as ho,b as go,bS as _o,bo as vo,br as yo,bv as bo,cc as xo,cd as So,cj as Co,cs as wo,ct as To,cv as Eo,cw as Do,dE as Oo,dT as ko,dp as Ao,dv as jo,dw as Mo,dy as No,eA as Po,eC as Fo,eD as Io,e_ as Lo,ek as Ro,ep as zo,ew as Bo,fE as Vo,fs as Ho,gT as Uo,ga as G,gv as Wo,gy as Go,hA as Ko,hT as qo,ha as K,hh as Jo,hi as Yo,hv as Xo,hw as Zo,hy as Qo,i as $o,iE as es,iw as ts,jC as ns,jO as rs,jd as is,k as as,kC as os,kk as ss,kv as cs,kx as ls,lp as us,lv as ds,lw as fs,mA as ps,mE as ms,mS as hs,mT as gs,mh as _s,mj as vs,ms as ys,mw as bs,my as xs,nE as Ss,ns as Cs,nw as ws,o as Ts,oE as Es,of as Ds,ow as Os,p as ks,pE as As,pT as js,pd as Ms,pw as Ns,qC as Ps,qE as Fs,qT as Is,qi as Ls,ql as Rs,qu as zs,r as Bs,rA as Vs,rE as Hs,rj as Us,s as Ws,sA as Gs,sd as Ks,st as qs,sw as Js,tC as Ys,tE as Xs,t_ as Zs,tj as Qs,ts as $s,uA as ec,uT as tc,uc as nc,ud as rc,uy as ic,vA as ac,vT as oc,va as sc,vi as cc,vk as lc,vv as uc,vw as dc,w as fc,wr as pc,ws as mc,wt as hc,wv as gc,ww as _c,xE as vc,xv as yc,y as bc,yT as xc,ya as Sc,yk as Cc,yv as wc,zC as Tc,zT as Ec,za as Dc,zf as Oc,zk as kc,zn as Ac}from"./loadAgentsDir-HZ19tmOZ.js";import{$t as jc,D as Mc,E as Nc,Kt as Pc,M as Fc,Mt as Ic,P as Lc,Qt as Rc,S as zc,Xt as Bc,Zt as Vc,_t as Hc,jt as Uc,tn as Wc,vt as Gc,w as Kc,yt as qc}from"./prompt-BxoRdmaw.js";import{h as Jc,p as Yc}from"./xml-DZp0WcWT.js";import{C as Xc,D as Zc,O as Qc,y as $c}from"./rcDebugLog-5XEbz_Yg.js";import{D as el,O as tl,_ as nl,v as rl}from"./sessionTracing-Da_r0mIc.js";import{l as il,r as al}from"./commitAttribution-BJvmLsVe.js";import{C as ol,P as sl,S as cl}from"./teamHelpers-BFdTH57t.js";import{a as ll,n as ul,r as dl,s as fl}from"./detectRepository-CBk3S2zv.js";import{l as pl,o as ml,r as hl}from"./api-CClu711S.js";import{i as gl,r as _l}from"./sentry-CZUyEC3A.js";import{c as vl,l as yl,t as bl}from"./common-CMCv4N_v.js";import{c as xl,s as Sl}from"./referral-BsAvaATn.js";import{n as Cl,t as wl}from"./worktreeModeEnabled-Db6b_Iy_.js";import{a as Tl}from"./teammateModeSnapshot-CwacsQvD.js";import{a as El,r as Dl,t as Ol}from"./prompt-4tea6NJQ.js";import{i as kl,t as Al}from"./assistant-Bih7t52W.js";import{i as jl,t as Ml}from"./cliLaunch-BQa48gsr.js";import{c as Nl,l as Pl}from"./releaseNotes-Bd3zxid3.js";import{n as Fl,t as q}from"./exit-_obETqBv.js";import{n as Il,t as Ll}from"./pluginOperations-B3gcFjVq.js";import"./pluginCliCommands-CXANH43C.js";import{n as Rl}from"./onChangeAppState-CHYSALjM.js";import{n as zl}from"./asciicast-DIsaWcsJ.js";import{i as Bl,t as Vl}from"./skillChangeDetector-4XWLpjQl.js";import{a as Hl,i as Ul,r as Wl,t as Gl}from"./setup-CjA5bW6e.js";import{n as Kl}from"./stats-B-ErfxCJ.js";import{t as ql}from"./renderOptions-BiyC2rj1.js";import{i as Jl,n as Yl,t as Xl}from"./githubRepoPathMapping-C_5RCW_Z.js";import{i as Zl,n as Ql}from"./earlyInput-tRkbxFv2.js";import{c as $l,d as eu,n as tu,r as nu,u as ru}from"./RemoteSessionManager-BlIA65dM.js";import{n as iu,t as au}from"./sink-N5XR8Zgp.js";import{t as ou}from"./banner-CVXH2xts.js";import{posix as su,relative as cu,resolve as lu,win32 as uu}from"path";import{appendFileSync as du,readFileSync as fu}from"fs";import{open as pu,stat as mu}from"fs/promises";var hu=a((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),gu=a((e=>{var{InvalidArgumentError:t}=hu(),n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)===`...`&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._concatValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),_u=a((e=>{var{humanReadableArgName:t}=gu(),n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(`, `)})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));s.length>0&&(a=a.concat([t.styleTitle(`Arguments:`),...s,``]));let c=t.visibleOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));if(c.length>0&&(a=a.concat([t.styleTitle(`Options:`),...c,``])),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));n.length>0&&(a=a.concat([t.styleTitle(`Global Options:`),...n,``]))}let l=t.visibleCommands(e).map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));return l.length>0&&(a=a.concat([t.styleTitle(`Commands:`),...l,``])),a.join(`
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-DR8-3Aex.js";import{n as o,t as s}from"./memoize-DNnuA2aU.js";import{c,d as l,f as u,o as d,p as f,s as p,u as m}from"./envUtils-BWeoiL4Y.js";import{n as ee,t as h}from"./defineProperty-80gRi2ZW.js";import{n as g,t as te}from"./axios-DhfaybwJ.js";import{i as ne,t as re}from"./src-BJz1KAd_.js";import{Ln as _,Mn as ie,Mr as ae,Tt as oe,Xn as se,Yn as v,vt as y,wn as ce,xt as le}from"./schemas-BGAvj1T4.js";import{t as ue}from"./v4-f1i_CNUT.js";import{C as de,In as b,Jt as fe,Ln as pe,Q as me,Rn as he,S as ge,b as _e,dn as ve,f as ye,g as be,h as x,t as xe,x as Se}from"./src-Di342QoJ.js";import{t as S}from"./jsx-runtime-D-D469L8.js";import{An as Ce,Cn as we,Cr as Te,Ct as Ee,En as De,Er as Oe,Gn as ke,Hn as Ae,Hr as je,Kn as Me,Ln as Ne,Mn as Pe,Nn as Fe,Rn as Ie,Sr as C,Tn as Le,U as Re,Un as ze,Vr as w,Wn as Be,bt as Ve,cn as T,et as He,hr as Ue,jr as We,kn as Ge,kr as Ke,lr as qe,nr as Je,ot as Ye,rr as Xe,tn as Ze,tr as Qe,vr as $e,vt as et,wr as tt,xr as nt,y as rt,yr as it,z as at}from"./state-sIHsFpDu.js";import{$o as ot,Aa as st,Ac as E,Al as ct,At as lt,Br as ut,C as dt,Cr as ft,D as pt,Di as mt,Dl as ht,Fa as D,Fl as gt,Fr as _t,Gn as vt,Il as yt,Ja as bt,Jt as xt,Ka as St,Ko as Ct,Ln as wt,Lr as Tt,Ma as O,Mc as Et,Na as k,Nc as Dt,Nl as Ot,Nn as kt,Nr as At,Ns as jt,Oc as Mt,Oi as Nt,Ol as Pt,Pc as A,Pl as Ft,Po as It,Pr as Lt,Qa as Rt,Rn as zt,S as Bt,Sc as j,So as Vt,T as Ht,Tn as Ut,Tt as Wt,Vt as Gt,Xi as Kt,Yn as qt,Za as Jt,Zi as Yt,_ as Xt,_c as Zt,_o as Qt,_t as $t,a as M,an as en,ao as tn,bc as nn,bl as rn,bn as an,ct as N,dn as on,dr as sn,eo as cn,gc as ln,gn as un,go as dn,hi as fn,ic as pn,it as mn,jc as hn,jo as gn,jt as _n,kl as vn,lo as P,lt as yn,mr as bn,n as xn,nc as Sn,no as Cn,on as wn,oo as F,or as Tn,ot as I,pa as En,po as Dn,pr as On,qo as kn,rs as An,rt as jn,s as Mn,st as Nn,tn as Pn,ua as Fn,uo as In,vi as Ln,vt as Rn,wn as zn,wt as Bn,x as Vn,xc as Hn,xi as Un,xo as Wn,yl as Gn,yn as Kn,yt as qn,zn as Jn,zr as Yn}from"./paths-D9CVAtXU.js";import{E as Xn,F as Zn,K as Qn,L,O as $n,R as er,T as tr,U as nr,V as rr,X as ir,Y as ar,d as R,f as or,h as sr,i as cr,j as lr,p as ur,s as dr,t as fr,w as pr,y as mr}from"./debug-UI3T040K.js";import{n as z,r as B}from"./analytics-DqMQntaB.js";import{n as hr,t as gr}from"./cwd--iizewsn.js";import{a as _r,n as vr,r as yr}from"./process-DMKLUQIO.js";import{F as V,P as br,f as xr,g as Sr,i as Cr,m as wr,r as Tr,v as Er}from"./git-CN3qtTb_.js";import{l as Dr,s as Or,u as kr}from"./oauth-CdZEzMww.js";import{n as Ar,t as jr}from"./bundledMode-kSQejuY4.js";import{r as Mr,t as Nr}from"./execa-CGue6Z3n.js";import{n as Pr,t as Fr}from"./which-DqSAIvp2.js";import{d as Ir,f as Lr,o as Rr,s as H}from"./log-CzsijfHZ.js";import{i as zr,o as Br}from"./platform-CuyedWpe.js";import{i as Vr,n as Hr}from"./windowsPaths-swxCp7bX.js";import{s as Ur,u as Wr}from"./types-Csi32ZXh.js";import{C as Gr,b as Kr,l as qr,x as Jr}from"./teammate-DMYOtLTK.js";import{a as U,f as Yr,n as Xr,o as Zr,x as Qr}from"./startupProfiler-DnXZaX4A.js";import{n as $r,t as ei}from"./lazySchema-2sOku3cX.js";import{r as ti}from"./permissions-DXLfdE7b.js";import{g as ni,n as ri,p as ii,u as ai}from"./proxy-CfZp-wce.js";import{$T as oi,$f as si,$g as ci,A as li,Ar as ui,Av as di,Ax as fi,BC as pi,BT as mi,B_ as hi,Ba as gi,Bf as _i,Bi as vi,Ci as yi,Ck as bi,DC as xi,Dk as Si,Dl as Ci,Ds as wi,E as Ti,El as Ei,Es as Di,FC as Oi,Fc as ki,Fp as Ai,GA as ji,GC as Mi,Gi as Ni,HC as Pi,HT as Fi,Ha as Ii,Hm as Li,IC as Ri,IE as zi,IS as Bi,Ib as Vi,Ip as Hi,JC as Ui,JE as Wi,JT as Gi,J_ as Ki,KC as qi,Ka as Ji,Kl as Yi,Ku as Xi,L as Zi,LC as Qi,LS as $i,LT as ea,Lb as ta,Lc as na,Lo as ra,M as ia,MC as aa,Mi as oa,NC as sa,NO as ca,Ni as la,Nn as ua,Nx as da,Oo as fa,Ot as pa,Ov as ma,Ox as ha,P as ga,PC as _a,QT as va,RC as ya,RT as ba,Ra as xa,Rk as Sa,Rn as Ca,SA as wa,SE as Ta,Si as Ea,St as Da,Sv as Oa,Sw as ka,Sx as Aa,T as ja,Tk as Ma,Ts as Na,Tt as Pa,Tv as Fa,UE as Ia,Ua as La,VC as Ra,VE as za,VT as Ba,V_ as Va,Va as Ha,Vm as Ua,WA as Wa,WC as Ga,XO as Ka,X_ as qa,Xg as Ja,Xi as Ya,Xk as Xa,YE as Za,Y_ as Qa,Yg as $a,Yr as eo,ZE as to,ZT as W,Zg as no,Zn as ro,_a as io,_h as ao,_j as oo,_k as so,_o as co,_v as lo,_w as uo,aA as fo,aE as po,af as mo,aw as ho,b as go,bS as _o,bo as vo,br as yo,bv as bo,cc as xo,cd as So,cj as Co,cs as wo,ct as To,cv as Eo,cw as Do,dE as Oo,dT as ko,dp as Ao,dv as jo,dw as Mo,dy as No,eA as Po,eC as Fo,eD as Io,e_ as Lo,ek as Ro,ep as zo,ew as Bo,fE as Vo,fs as Ho,gT as Uo,ga as G,gv as Wo,gy as Go,hA as Ko,hT as qo,ha as K,hh as Jo,hi as Yo,hv as Xo,hw as Zo,hy as Qo,i as $o,iE as es,iw as ts,jC as ns,jO as rs,jd as is,k as as,kC as os,kk as ss,kv as cs,kx as ls,lp as us,lv as ds,lw as fs,mA as ps,mE as ms,mS as hs,mT as gs,mh as _s,mj as vs,ms as ys,mw as bs,my as xs,nE as Ss,ns as Cs,nw as ws,o as Ts,oE as Es,of as Ds,ow as Os,p as ks,pE as As,pT as js,pd as Ms,pw as Ns,qC as Ps,qE as Fs,qT as Is,qi as Ls,ql as Rs,qu as zs,r as Bs,rA as Vs,rE as Hs,rj as Us,s as Ws,sA as Gs,sd as Ks,st as qs,sw as Js,tC as Ys,tE as Xs,t_ as Zs,tj as Qs,ts as $s,uA as ec,uT as tc,uc as nc,ud as rc,uy as ic,vA as ac,vT as oc,va as sc,vi as cc,vk as lc,vv as uc,vw as dc,w as fc,wr as pc,ws as mc,wt as hc,wv as gc,ww as _c,xE as vc,xv as yc,y as bc,yT as xc,ya as Sc,yk as Cc,yv as wc,zC as Tc,zT as Ec,za as Dc,zf as Oc,zk as kc,zn as Ac}from"./loadAgentsDir-D-xcJ22-.js";import{$t as jc,D as Mc,E as Nc,Kt as Pc,M as Fc,Mt as Ic,P as Lc,Qt as Rc,S as zc,Xt as Bc,Zt as Vc,_t as Hc,jt as Uc,tn as Wc,vt as Gc,w as Kc,yt as qc}from"./prompt-C69iv9cI.js";import{h as Jc,p as Yc}from"./xml-K_hNNh2b.js";import{C as Xc,D as Zc,O as Qc,y as $c}from"./rcDebugLog-CTOZ2K3E.js";import{D as el,O as tl,_ as nl,v as rl}from"./sessionTracing-_obALZbi.js";import{l as il,r as al}from"./commitAttribution-CUqUEjsh.js";import{C as ol,P as sl,S as cl}from"./teamHelpers-CbFFdvPw.js";import{a as ll,n as ul,r as dl,s as fl}from"./detectRepository-CBk3S2zv.js";import{l as pl,o as ml,r as hl}from"./api-nHsRf03G.js";import{i as gl,r as _l}from"./sentry-B6tWUNGj.js";import{c as vl,l as yl,t as bl}from"./common-CMCv4N_v.js";import{c as xl,s as Sl}from"./referral-D26orIXE.js";import{n as Cl,t as wl}from"./worktreeModeEnabled-Db6b_Iy_.js";import{a as Tl}from"./teammateModeSnapshot-DkkMv2-b.js";import{a as El,r as Dl,t as Ol}from"./prompt-4tea6NJQ.js";import{i as kl,t as Al}from"./assistant-BJbeizyH.js";import{i as jl,t as Ml}from"./cliLaunch-BQa48gsr.js";import{c as Nl,l as Pl}from"./releaseNotes-Dps4SeVh.js";import{n as Fl,t as q}from"./exit-_obETqBv.js";import{n as Il,t as Ll}from"./pluginOperations-CP6NFNog.js";import"./pluginCliCommands-BN7loc5T.js";import{n as Rl}from"./onChangeAppState-C6ZIU1SD.js";import{n as zl}from"./asciicast-DIsaWcsJ.js";import{i as Bl,t as Vl}from"./skillChangeDetector-BOH-fyEn.js";import{a as Hl,i as Ul,r as Wl,t as Gl}from"./setup-C_GrS0Rd.js";import{n as Kl}from"./stats-DcS6ZnsX.js";import{t as ql}from"./renderOptions-BiyC2rj1.js";import{i as Jl,n as Yl,t as Xl}from"./githubRepoPathMapping-dky2fPeU.js";import{i as Zl,n as Ql}from"./earlyInput-tRkbxFv2.js";import{c as $l,d as eu,n as tu,r as nu,u as ru}from"./RemoteSessionManager-Dx2skKnM.js";import{n as iu,t as au}from"./sink-BSTUubjl.js";import{t as ou}from"./banner-CVXH2xts.js";import{posix as su,relative as cu,resolve as lu,win32 as uu}from"path";import{appendFileSync as du,readFileSync as fu}from"fs";import{open as pu,stat as mu}from"fs/promises";var hu=a((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),gu=a((e=>{var{InvalidArgumentError:t}=hu(),n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)===`...`&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._concatValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),_u=a((e=>{var{humanReadableArgName:t}=gu(),n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(`, `)})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));s.length>0&&(a=a.concat([t.styleTitle(`Arguments:`),...s,``]));let c=t.visibleOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));if(c.length>0&&(a=a.concat([t.styleTitle(`Options:`),...c,``])),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));n.length>0&&(a=a.concat([t.styleTitle(`Global Options:`),...n,``]))}let l=t.visibleCommands(e).map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));return l.length>0&&(a=a.concat([t.styleTitle(`Commands:`),...l,``])),a.join(`
|
|
2
2
|
`)}displayWidth(e){return r(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
|
|
3
3
|
`+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
|
|
4
4
|
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),vu=a((e=>{var{InvalidArgumentError:t}=hu(),n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._concatValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?i(this.name().replace(/^no-/,``)):i(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r===void 0?!1:r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
|
|
@@ -16,8 +16,8 @@ Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
16
16
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
17
17
|
- ${t?`searched for local subcommand relative to directory '${t}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`}`;throw Error(r)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function c(e,t){let n=i.resolve(e,t);if(a.existsSync(n))return n;if(s.includes(i.extname(t)))return;let r=s.find(e=>a.existsSync(`${n}${e}`));if(r)return`${n}${r}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||``;if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch{e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,u);if(!t&&!e._executableFile&&this._scriptPath){let n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u));let f;o.platform===`win32`?(this._checkForMissingExecutable(u,d,e._name),t.unshift(u),t=h(o.execArgv).concat(t),f=r.spawn(o.execPath,t,{stdio:`inherit`})):n?(t.unshift(u),t=h(o.execArgv).concat(t),f=r.spawn(o.argv[0],t,{stdio:`inherit`})):f=r.spawn(u,t,{stdio:`inherit`}),f.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{o.on(e,()=>{f.killed===!1&&f.exitCode===null&&f.kill(e)})});let p=this._exitCallback;f.on(`close`,e=>{e=e??1,p?p(new l(e,`commander.executeSubCommandAsync`,`(close)`)):o.exit(e)}),f.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(u,d,e._name);else if(t.code===`EACCES`)throw Error(`'${u}' not executable`);if(!p)o.exit(1);else{let e=new l(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,p(e)}}),this.runningCommand=f}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent&&this.parent.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)===void 0?!1:this.getOptionValueSource(t)!==`default`});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t,i=e.slice();function a(e){return e.length>1&&e[0]===`-`}let o=null;for(;i.length;){let e=i.shift();if(e===`--`){r===n&&r.push(e),r.push(...i);break}if(o&&!a(e)){this.emit(`option:${o.name()}`,e);continue}if(o=null,a(e)){let t=this._findOption(e);if(t){if(t.required){let e=i.shift();e===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;i.length>0&&!a(i[0])&&(e=i.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(e.length>2&&e[0]===`-`&&e[1]!==`-`){let t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),i.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){let t=e.indexOf(`=`),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(a(e)&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(e)){t.push(e),i.length>0&&n.push(...i);break}else if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e),i.length>0&&t.push(...i);break}else if(this._defaultCommandName){n.push(e),i.length>0&&n.push(...i);break}}if(this._passThroughOptions){r.push(e),i.length>0&&r.push(...i);break}r.push(e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
18
18
|
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in o.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,o.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new p(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=m(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=m(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||`-V, --version`,n=n||`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>c(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e=e||{};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??`-h, --help`,t=t??`display help for command`,this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=Number(o.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
19
|
-
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function h(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function g(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}e.Command=ee,e.useColor=g})),xu=a((e=>{var{Argument:t}=gu(),{Command:n}=bu(),{CommanderError:r,InvalidArgumentError:i}=hu(),{Help:a}=_u(),{Option:o}=vu();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i})),Su=a(((e,t)=>{var n=xu();e=t.exports={},e.program=new n.Command,e.Argument=n.Argument,e.Command=n.Command,e.CommanderError=n.CommanderError,e.Help=n.Help,e.InvalidArgumentError=n.InvalidArgumentError,e.InvalidOptionArgumentError=n.InvalidArgumentError,e.Option=n.Option,e.createCommand=e=>new n.Command(e),e.createOption=(e,t)=>new n.Option(e,t),e.createArgument=(e,t)=>new n.Argument(e,t)}));s(),p(),ee(),w(),T(),z(),ar(),rr(),pr(),sr(),vr(),dr(),Xr(),dn(),zt();var{program:Cu,createCommand:wu,createArgument:Tu,createOption:Eu,CommanderError:Du,InvalidArgumentError:Ou,InvalidOptionArgumentError:ku,Command:Au,Argument:ju,Option:J,Help:Mu}=r(Su(),1).default;te(),ue();var Nu=r(he(),1);pe();var Y=S();xe(),gt(),Ot(),vn(),Gn(),hr(),br(),jr(),Mr(),Fr(),Rr(),Br(),Hr(),Er(),Ur(),E(),Jr(),Qr(),Sn(),ei(),jt(),An(),gn(),Vt(),Dn(),F(),ni(),ai(),D(),O(),Fn(),Kt(),Lt(),On(),sn(),qt(),wn(),_n(),Bn(),Rn(),N(),jn(),Bt(),M(),Wa(),Yc(),ac(),Ko(),fo(),Wc(),Bc(),Gc(),Si(),Cc(),Ta(),Vo(),sl(),gl(),oi(),ea(),vl(),_c(),Zo(),ws(),ya(),xi(),Qc(),ls(),hi(),no(),_s(),wl(),So(),zs(),Di(),Na(),Ho(),ra(),xa(),K(),Ya(),la(),ui(),Ca(),qs(),kr(),Ir();var Pu=!1;function Fu(){if(Pu||(Pu=!0,Lr())||m(process.env.CLAUDE_CODE_USE_BEDROCK)||m(process.env.CLAUDE_CODE_USE_VERTEX)||m(process.env.CLAUDE_CODE_USE_FOUNDRY)||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||process.env.ANTHROPIC_UNIX_SOCKET||process.env.CLAUDE_CODE_CLIENT_CERT||process.env.CLAUDE_CODE_CLIENT_KEY)return;let e=process.env.ANTHROPIC_BASE_URL||Dr().BASE_API_URL;fetch(e,{method:`HEAD`,signal:AbortSignal.timeout(1e4)}).catch(()=>{})}function Iu(){if(process.env.NODE_EXTRA_CA_CERTS)return;let e=Lu();e&&(process.env.NODE_EXTRA_CA_CERTS=e,R(`CA certs: Applied NODE_EXTRA_CA_CERTS from config to process.env: ${e}`))}function Lu(){try{let e=j()?.env,t=Rt(`userSettings`)?.env;R(`CA certs: Config fallback - globalEnv keys: ${e?Object.keys(e).join(`,`):`none`}, settingsEnv keys: ${t?Object.keys(t).join(`,`):`none`}`);let n=t?.NODE_EXTRA_CA_CERTS||e?.NODE_EXTRA_CA_CERTS;return n&&R(`CA certs: Found NODE_EXTRA_CA_CERTS in config/settings: ${n}`),n}catch(e){R(`CA certs: Config fallback failed: ${e}`,{level:`error`});return}}E(),dr(),ll(),Nn(),p(),Sc(),nl(),tl(),zi();var Ru=!1,zu=o(async()=>{let e=Date.now();V(`info`,`init_started`),U(`init_function_start`);try{let t=Date.now();Zt(),de({loadTheme:()=>j().theme,saveTheme:e=>A(t=>({...t,theme:e}))}),V(`info`,`init_configs_enabled`,{duration_ms:Date.now()-t}),U(`init_configs_enabled`);let n=Date.now();sc(),Iu(),V(`info`,`init_safe_env_vars_applied`,{duration_ms:Date.now()-n}),U(`init_safe_env_vars_applied`),Xs(),U(`init_after_graceful_shutdown`),Promise.all([import(`./firstPartyEventLogger-CozFbFD9.js`),import(`./growthbook-C39e6Byf.js`)]).then(([e,t])=>{e.initialize1PEventLogging(),t.onGrowthBookRefresh(()=>{e.reinitialize1PEventLoggingIfConfigChanged()})}),U(`init_after_1p_event_logging`),import(`./poller-Ds0Y6Cir.js`).then(e=>e.startBalancePolling()),U(`init_after_balance_polling`),En(),U(`init_after_oauth_populate`),I(),U(`init_after_jetbrains_detection`),ul(),Ec()&&ba(),Ha()&&Dc(),U(`init_after_remote_settings_check`),Et();let r=Date.now();R(`[init] configureGlobalMTLS starting`),ii(),V(`info`,`init_mtls_configured`,{duration_ms:Date.now()-r}),R(`[init] configureGlobalMTLS complete`);let i=Date.now();if(R(`[init] configureGlobalAgents starting`),ri(),V(`info`,`init_proxy_configured`,{duration_ms:Date.now()-i}),R(`[init] configureGlobalAgents complete`),U(`init_network_configured`),_l(),await $t(),za(),ir(Ia),Fu(),m(process.env.CLAUDE_CODE_REMOTE))try{let{initUpstreamProxy:e,getUpstreamProxyEnv:t}=await import(`./upstreamproxy-DcLeL2XX.js`),{registerUpstreamProxyEnvFn:n}=await import(`./subprocessEnv-CggQWZCx.js`);n(t),await e()}catch(e){R(`[init] upstreamproxy init failed: ${e instanceof Error?e.message:String(e)}; continuing without proxy`,{level:`warn`})}if(Vr(),ir(ao),ir(async()=>{let{cleanupSessionTeams:e}=await import(`./teamHelpers-CmDn2xyl.js`);await e()}),Ac()){let e=Date.now();await ua(),V(`info`,`init_scratchpad_created`,{duration_ms:Date.now()-e})}V(`info`,`init_completed`,{duration_ms:Date.now()-e}),U(`init_function_end`)}catch(e){if(e instanceof lr){if(Re()){process.stderr.write(`Configuration error in ${e.filePath}: ${e.message}\n`),va(1);return}return import(`./InvalidConfigDialog-umJZVrz-.js`).then(t=>t.showInvalidConfigDialog({error:e}))}else throw e}});function Bu(){Ec()?(Re()&&rl()&&Vu().catch(e=>{R(`[3P telemetry] Eager telemetry init failed (beta tracing): ${L(e)}`,{level:`error`})}),R(`[3P telemetry] Waiting for remote managed settings before telemetry init`),Fi().then(async()=>{R(`[3P telemetry] Remote managed settings loaded, initializing telemetry`),io(),await Vu()}).catch(e=>{R(`[3P telemetry] Telemetry init failed (remote settings path): ${L(e)}`,{level:`error`})})):Vu().catch(e=>{R(`[3P telemetry] Telemetry init failed: ${L(e)}`,{level:`error`})})}async function Vu(){if(!Ru){if(!m(process.env.CLAUDE_CODE_ENABLE_TELEMETRY)){Ru=!0,R(`[3P telemetry] Skipped — CLAUDE_CODE_ENABLE_TELEMETRY not set`);return}Ru=!0;try{await Hu()}catch(e){throw Ru=!1,e}}}async function Hu(){let{initializeTelemetry:e}=await import(`./instrumentation-DbKu2GCL.js`),t=await e();t&&(Xe(t,(e,n)=>{let r=t?.createCounter(e,n);return{add(e,t={}){let n={...el(),...t};r?.add(e,n)}}}),Ve()?.add(1))}_o();async function Uu(e,t,n,r){let{App:i}=await import(`./App-Bw4stCcv.js`),{SentryErrorBoundary:a}=await import(`./SentryErrorBoundary-B9sk4zvj.js`),{REPL:o}=await import(`./REPL-DV96-Prr.js`);await r(e,(0,Y.jsx)(a,{name:`RootREPLBoundary`,children:(0,Y.jsx)(i,{...t,children:(0,Y.jsx)(o,{...n})})}))}kr(),E(),dr(),Ir();var Wu=$r(()=>ce({client_data:ie(_(),se()).nullish(),additional_model_options:oe(ce({model:_(),name:_(),description:_()}).transform(({model:e,name:t,description:n})=>({value:e,label:t,description:n}))).nullish()}));async function Gu(){if(Lr())return R(`[Bootstrap] Skipped: Nonessential traffic disabled`),null;if(k()!==`firstParty`)return R(`[Bootstrap] Skipped: 3P provider`),null;let e=Gt();if(!(xt()?.accessToken&&en())&&!e)return R(`[Bootstrap] Skipped: no usable OAuth or API key`),null;let t=`${Dr().BASE_API_URL}/api/claude_cli/bootstrap`;try{return await Wt(async()=>{let n=xt()?.accessToken,r;if(n&&en())r={Authorization:`Bearer ${n}`,"anthropic-beta":Or};else if(e)r={"x-api-key":e};else return R(`[Bootstrap] No auth available on retry, aborting`),null;R(`[Bootstrap] Fetching`);let i=await g.get(t,{headers:{"Content-Type":`application/json`,"User-Agent":lt(),...r},timeout:5e3}),a=Wu().safeParse(i.data);return a.success?(R(`[Bootstrap] Fetch ok`),a.data):(R(`[Bootstrap] Response failed validation: ${a.error.message}`),null)})}catch(e){throw R(`[Bootstrap] Fetch failed: ${g.isAxiosError(e)?e.response?.status??e.code:`unknown`}`),e}}async function Ku(){try{let e=await Gu();if(!e)return;let t=e.client_data??null,n=e.additional_model_options??[],r=j();if(yt(r.clientDataCache,t)&&yt(r.additionalModelOptionsCache,n)){R(`[Bootstrap] Cache unchanged, skipping write`);return}R(`[Bootstrap] Cache updated, persisting to disk`),A(e=>({...e,clientDataCache:t,additionalModelOptionsCache:n}))}catch(e){H(e)}}Ln(),vs(),Us(),ml(),yc(),Sl(),dr(),p();var qu=new Map;function Ju(){let e=process.argv[1]||``,t=process.execPath||process.argv[0]||``;zr()===`windows`&&(e=e.split(uu.sep).join(su.sep),t=t.split(uu.sep).join(su.sep));let n=[e,t],r=[`/build-ant/`,`/build-external/`,`/build-external-native/`,`/build-ant-native/`];return n.some(e=>r.some(t=>e.includes(t)))}var Yu=[/MaxListenersExceededWarning.*AbortSignal/,/MaxListenersExceededWarning.*EventTarget/];function Xu(e){let t=`${e.name}: ${e.message}`;return Yu.some(e=>e.test(t))}var Zu=null;function Qu(){let e=process.listeners(`warning`);Zu&&e.includes(Zu)||(Ju()||process.removeAllListeners(`warning`),Zu=e=>{try{let t=`${e.name}: ${e.message.slice(0,50)}`,n=qu.get(t)||0;(qu.has(t)||qu.size<1e3)&&qu.set(t,n+1);let r=Xu(e);B(`tengu_node_warning`,{is_internal:+!!r,occurrence_count:n+1,classname:e.name,...process.env.USER_TYPE===`ant`&&{message:e.message}}),m(process.env.CLAUDE_DEBUG)&&R(`${r?`[Internal Warning]`:`[Warning]`} ${e.toString()}`,{level:`warn`})}catch{}},process.on(`warning`,Zu))}Is(),xc(),tc(),Go(),xs(),No(),au(),xe();function $u(){return(0,Y.jsxs)(_e,{children:[`MCP servers may execute code or access system resources. All tool calls require approval. Learn more in the`,` `,(0,Y.jsx)(me,{url:`https://code.claude.com/docs/en/mcp`,children:`MCP documentation`}),`.`]})}z(),F(),xe();function ed({serverName:e,onDone:t}){function n(n){switch(B(`tengu_mcp_dialog_choice`,{choice:n}),n){case`yes`:case`yes_all`:{let r=(Cn()||{}).enabledMcpjsonServers||[];r.includes(e)||P(`localSettings`,{enabledMcpjsonServers:[...r,e]}),n===`yes_all`&&P(`localSettings`,{enableAllProjectMcpServers:!0}),t();break}case`no`:{let n=(Cn()||{}).disabledMcpjsonServers||[];n.includes(e)||P(`localSettings`,{disabledMcpjsonServers:[...n,e]}),t();break}}}return(0,Y.jsxs)(ye,{title:`New MCP server found in .mcp.json: ${e}`,color:`warning`,onCancel:()=>n(`no`),children:[(0,Y.jsx)($u,{}),(0,Y.jsx)(da,{options:[{label:`Use this and all future MCP servers in this project`,value:`yes_all`},{label:`Use this MCP server`,value:`yes`},{label:`Continue without using this MCP server`,value:`no`}],onChange:e=>n(e),onCancel:()=>n(`no`)})]})}ht(),z(),xe(),F(),Ys();function td({serverNames:e,onDone:t}){function n(n){let r=Cn()||{},i=r.enabledMcpjsonServers||[],a=r.disabledMcpjsonServers||[],[o,s]=Pt(e,e=>n.includes(e));B(`tengu_mcp_multidialog_choice`,{approved:o.length,rejected:s.length}),o.length>0&&P(`localSettings`,{enabledMcpjsonServers:[...new Set([...i,...o])]}),s.length>0&&P(`localSettings`,{disabledMcpjsonServers:[...new Set([...a,...s])]}),t()}let r=(0,Nu.useCallback)(()=>{let n=(Cn()||{}).disabledMcpjsonServers||[];P(`localSettings`,{disabledMcpjsonServers:[...new Set([...n,...e])]}),t()},[e,t]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(ye,{title:`${e.length} new MCP servers found in .mcp.json`,subtitle:`Select any you wish to enable.`,color:`warning`,onCancel:r,hideInputGuide:!0,children:[(0,Y.jsx)($u,{}),(0,Y.jsx)(Qo,{options:e.map(e=>({label:e,value:e})),defaultValue:e,onSubmit:n,onCancel:r,hideIndexes:!0})]}),(0,Y.jsx)(Se,{paddingX:1,children:(0,Y.jsx)(_e,{dimColor:!0,italic:!0,children:(0,Y.jsxs)(x,{children:[(0,Y.jsx)(be,{shortcut:`Space`,action:`select`}),(0,Y.jsx)(be,{shortcut:`Enter`,action:`confirm`}),(0,Y.jsx)(Fo,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`reject all`})]})})})]})}$i();async function nd(e){let{servers:t}=Ns(`project`),n=Object.keys(t).filter(e=>Bo(e)===`pending`);n.length!==0&&await new Promise(t=>{let r=()=>void t();if(n.length===1&&n[0]!==void 0){let t=n[0];e.render((0,Y.jsx)(Bi,{children:(0,Y.jsx)(ic,{children:(0,Y.jsx)(ed,{serverName:t,onDone:r})})}))}else e.render((0,Y.jsx)(Bi,{children:(0,Y.jsx)(ic,{children:(0,Y.jsx)(td,{serverNames:n,onDone:r})})}))})}kc(),ca(),to(),il(),Za(),fc(),E(),dr();var rd={iterm:`iTerm`,"iterm.app":`iTerm`,ghostty:`Ghostty`,kitty:`kitty`,alacritty:`Alacritty`,wezterm:`WezTerm`,apple_terminal:`Terminal`};function id(){if(process.platform!==`darwin`)return;let e=process.env.TERM_PROGRAM;if(!e)return;let t=rd[e.toLowerCase()];t&&j().deepLinkTerminal!==t&&(A(e=>({...e,deepLinkTerminal:t})),R(`Stored deep link terminal preference: ${t}`))}var ad=class{constructor(){h(this,`frameDurations`,[]),h(this,`firstRenderTime`,void 0),h(this,`lastRenderTime`,void 0)}record(e){let t=performance.now();this.firstRenderTime===void 0&&(this.firstRenderTime=t),this.lastRenderTime=t,this.frameDurations.push(e)}getMetrics(){if(this.frameDurations.length===0||this.firstRenderTime===void 0||this.lastRenderTime===void 0)return;let e=this.lastRenderTime-this.firstRenderTime;if(e<=0)return;let t=this.frameDurations.length/(e/1e3),n=this.frameDurations.slice().sort((e,t)=>t-e),r=n[Math.max(0,Math.ceil(n.length*.01)-1)],i=r>0?1e3/r:0;return{averageFps:Math.round(t*100)/100,low1PctFps:Math.round(i*100)/100}}};z(),oi(),T(),xe(),No(),$i(),E(),p(),Sc(),ta(),F();function od(){A(e=>({...e,hasCompletedOnboarding:!0,lastOnboardingVersion:`2.6.10`}))}function sd(e,t){return new Promise(n=>{e.render(t(e=>void n(e)))})}async function X(e,t,n){return cd(e,t,{color:`error`,beforeExit:n})}async function cd(e,t,n){let{Text:r}=await import(`./src-poaoYkuc.js`),i=n?.color,a=n?.exitCode??1;e.render(i?(0,Y.jsx)(r,{color:i,children:t}):(0,Y.jsx)(r,{children:t})),e.unmount(),await n?.beforeExit?.(),process.exit(a)}function Z(e,t,n){return sd(e,e=>(0,Y.jsx)(ge,{initialState:j().theme,onThemeSave:e=>A(t=>({...t,theme:e})),children:(0,Y.jsx)(Bi,{onChangeAppState:n?.onChangeAppState,children:(0,Y.jsx)(ic,{children:t(e)})})}))}async function ld(e,t){e.render(t),kp(),await e.waitUntilExit(),await W(0)}async function ud(e,t,n,r,i,a){if(m(!1)||process.env.IS_DEMO)return!1;let o=j(),s=!1;if(!o.theme||!o.hasCompletedOnboarding){s=!0;let{Onboarding:t}=await import(`./Onboarding-BRePz3fJ.js`);await Z(e,e=>(0,Y.jsx)(t,{onDone:()=>{od(),e()}}),{onChangeAppState:Rl})}if(!m(process.env.CLAUBBIT)){if(!ln()){let{TrustDialog:t}=await import(`./TrustDialog-e1nyM-Fp.js`);await Z(e,e=>(0,Y.jsx)(t,{commands:r,onDone:e}))}Te(!0),pt(),dt(),so();let{errors:t}=Vi();if(t.length===0&&await nd(e),await ss()){let t=bi(await Ma(!0)),{ClaudeMdExternalIncludesDialog:n}=await import(`./ClaudeMdExternalIncludesDialog-CG26Jg7h.js`);await Z(e,e=>(0,Y.jsx)(n,{onDone:e,isStandaloneDialog:!0,externalIncludes:t}))}}if(Jl(),id(),io(),setImmediate(()=>Bu()),await Gi()){let{GroveDialog:t}=await import(`./Grove-CJn8QGFo.js`);if(await Z(e,e=>(0,Y.jsx)(t,{showIfAlreadyViewed:!1,location:s?`onboarding`:`policy_update_modal`,onDone:e}))===`escape`)return B(`tengu_grove_policy_exited`,{}),va(0),!1}if(process.env.ANTHROPIC_API_KEY&&!u()){let t=Yt(process.env.ANTHROPIC_API_KEY);if(Hn(t)===`new`){let{ApproveApiKey:n}=await import(`./ApproveApiKey-CBEOrsej.js`);await Z(e,e=>(0,Y.jsx)(n,{customApiKeyTruncated:t,onDone:e}),{onChangeAppState:Rl})}}if((t===`bypassPermissions`||n)&&!tn()){let{BypassPermissionsModeDialog:t}=await import(`./BypassPermissionsModeDialog-UOkwRr3W.js`);await Z(e,e=>(0,Y.jsx)(t,{onAccept:e}))}if(a&&a.length>0){let{DevChannelsDialog:t}=await import(`./DevChannelsDialog-DZMsKuak.js`);await Z(e,e=>(0,Y.jsx)(t,{channels:a,onAccept:()=>{Le([...rt(),...a.map(e=>({...e,dev:!0}))]),Ie(!0),e()}}))}if(i&&!j().hasCompletedClaudeInChromeOnboarding){let{ClaudeInChromeOnboarding:t}=await import(`./ClaudeInChromeOnboarding-6UL2_PCg.js`);await Z(e,e=>(0,Y.jsx)(t,{onDone:e}))}return s}function dd(e){let t=0,n=ql(e);n.stdin&&B(`tengu_stdin_interactive`,{});let r=new ad,i=Kl();tt(i);let a=process.env.CLAUDE_CODE_FRAME_TIMING_LOG;return{getFpsMetrics:()=>r.getMetrics(),stats:i,renderOptions:{...n,onFrame:e=>{if(r.record(e.durationMs),i.observe(`frame_duration_ms`,e.durationMs),a&&e.phases&&du(a,JSON.stringify({total:e.durationMs,...e.phases,rss:process.memoryUsage.rss(),cpu:process.cpuUsage()})+`
|
|
20
|
-
`),!fe())for(let n of e.flickers){if(n.reason===`resize`)continue;let e=Date.now();e-t<1e3&&B(`tengu_flicker`,{desiredHeight:n.desiredHeight,actualHeight:n.availableHeight,reason:n.reason}),t=e}}}}}No();async function fd(e,t){let{InvalidSettingsDialog:n}=await import(`./InvalidSettingsDialog-
|
|
19
|
+
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function h(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function g(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}e.Command=ee,e.useColor=g})),xu=a((e=>{var{Argument:t}=gu(),{Command:n}=bu(),{CommanderError:r,InvalidArgumentError:i}=hu(),{Help:a}=_u(),{Option:o}=vu();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i})),Su=a(((e,t)=>{var n=xu();e=t.exports={},e.program=new n.Command,e.Argument=n.Argument,e.Command=n.Command,e.CommanderError=n.CommanderError,e.Help=n.Help,e.InvalidArgumentError=n.InvalidArgumentError,e.InvalidOptionArgumentError=n.InvalidArgumentError,e.Option=n.Option,e.createCommand=e=>new n.Command(e),e.createOption=(e,t)=>new n.Option(e,t),e.createArgument=(e,t)=>new n.Argument(e,t)}));s(),p(),ee(),w(),T(),z(),ar(),rr(),pr(),sr(),vr(),dr(),Xr(),dn(),zt();var{program:Cu,createCommand:wu,createArgument:Tu,createOption:Eu,CommanderError:Du,InvalidArgumentError:Ou,InvalidOptionArgumentError:ku,Command:Au,Argument:ju,Option:J,Help:Mu}=r(Su(),1).default;te(),ue();var Nu=r(he(),1);pe();var Y=S();xe(),gt(),Ot(),vn(),Gn(),hr(),br(),jr(),Mr(),Fr(),Rr(),Br(),Hr(),Er(),Ur(),E(),Jr(),Qr(),Sn(),ei(),jt(),An(),gn(),Vt(),Dn(),F(),ni(),ai(),D(),O(),Fn(),Kt(),Lt(),On(),sn(),qt(),wn(),_n(),Bn(),Rn(),N(),jn(),Bt(),M(),Wa(),Yc(),ac(),Ko(),fo(),Wc(),Bc(),Gc(),Si(),Cc(),Ta(),Vo(),sl(),gl(),oi(),ea(),vl(),_c(),Zo(),ws(),ya(),xi(),Qc(),ls(),hi(),no(),_s(),wl(),So(),zs(),Di(),Na(),Ho(),ra(),xa(),K(),Ya(),la(),ui(),Ca(),qs(),kr(),Ir();var Pu=!1;function Fu(){if(Pu||(Pu=!0,Lr())||m(process.env.CLAUDE_CODE_USE_BEDROCK)||m(process.env.CLAUDE_CODE_USE_VERTEX)||m(process.env.CLAUDE_CODE_USE_FOUNDRY)||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||process.env.ANTHROPIC_UNIX_SOCKET||process.env.CLAUDE_CODE_CLIENT_CERT||process.env.CLAUDE_CODE_CLIENT_KEY)return;let e=process.env.ANTHROPIC_BASE_URL||Dr().BASE_API_URL;fetch(e,{method:`HEAD`,signal:AbortSignal.timeout(1e4)}).catch(()=>{})}function Iu(){if(process.env.NODE_EXTRA_CA_CERTS)return;let e=Lu();e&&(process.env.NODE_EXTRA_CA_CERTS=e,R(`CA certs: Applied NODE_EXTRA_CA_CERTS from config to process.env: ${e}`))}function Lu(){try{let e=j()?.env,t=Rt(`userSettings`)?.env;R(`CA certs: Config fallback - globalEnv keys: ${e?Object.keys(e).join(`,`):`none`}, settingsEnv keys: ${t?Object.keys(t).join(`,`):`none`}`);let n=t?.NODE_EXTRA_CA_CERTS||e?.NODE_EXTRA_CA_CERTS;return n&&R(`CA certs: Found NODE_EXTRA_CA_CERTS in config/settings: ${n}`),n}catch(e){R(`CA certs: Config fallback failed: ${e}`,{level:`error`});return}}E(),dr(),ll(),Nn(),p(),Sc(),nl(),tl(),zi();var Ru=!1,zu=o(async()=>{let e=Date.now();V(`info`,`init_started`),U(`init_function_start`);try{let t=Date.now();Zt(),de({loadTheme:()=>j().theme,saveTheme:e=>A(t=>({...t,theme:e}))}),V(`info`,`init_configs_enabled`,{duration_ms:Date.now()-t}),U(`init_configs_enabled`);let n=Date.now();sc(),Iu(),V(`info`,`init_safe_env_vars_applied`,{duration_ms:Date.now()-n}),U(`init_safe_env_vars_applied`),Xs(),U(`init_after_graceful_shutdown`),Promise.all([import(`./firstPartyEventLogger-Dr3TK3IU.js`),import(`./growthbook-JD-WW3yV.js`)]).then(([e,t])=>{e.initialize1PEventLogging(),t.onGrowthBookRefresh(()=>{e.reinitialize1PEventLoggingIfConfigChanged()})}),U(`init_after_1p_event_logging`),import(`./poller-Ds0Y6Cir.js`).then(e=>e.startBalancePolling()),U(`init_after_balance_polling`),En(),U(`init_after_oauth_populate`),I(),U(`init_after_jetbrains_detection`),ul(),Ec()&&ba(),Ha()&&Dc(),U(`init_after_remote_settings_check`),Et();let r=Date.now();R(`[init] configureGlobalMTLS starting`),ii(),V(`info`,`init_mtls_configured`,{duration_ms:Date.now()-r}),R(`[init] configureGlobalMTLS complete`);let i=Date.now();if(R(`[init] configureGlobalAgents starting`),ri(),V(`info`,`init_proxy_configured`,{duration_ms:Date.now()-i}),R(`[init] configureGlobalAgents complete`),U(`init_network_configured`),_l(),await $t(),za(),ir(Ia),Fu(),m(process.env.CLAUDE_CODE_REMOTE))try{let{initUpstreamProxy:e,getUpstreamProxyEnv:t}=await import(`./upstreamproxy-DcLeL2XX.js`),{registerUpstreamProxyEnvFn:n}=await import(`./subprocessEnv-CggQWZCx.js`);n(t),await e()}catch(e){R(`[init] upstreamproxy init failed: ${e instanceof Error?e.message:String(e)}; continuing without proxy`,{level:`warn`})}if(Vr(),ir(ao),ir(async()=>{let{cleanupSessionTeams:e}=await import(`./teamHelpers-BBhol4dD.js`);await e()}),Ac()){let e=Date.now();await ua(),V(`info`,`init_scratchpad_created`,{duration_ms:Date.now()-e})}V(`info`,`init_completed`,{duration_ms:Date.now()-e}),U(`init_function_end`)}catch(e){if(e instanceof lr){if(Re()){process.stderr.write(`Configuration error in ${e.filePath}: ${e.message}\n`),va(1);return}return import(`./InvalidConfigDialog-DdB9_Ve0.js`).then(t=>t.showInvalidConfigDialog({error:e}))}else throw e}});function Bu(){Ec()?(Re()&&rl()&&Vu().catch(e=>{R(`[3P telemetry] Eager telemetry init failed (beta tracing): ${L(e)}`,{level:`error`})}),R(`[3P telemetry] Waiting for remote managed settings before telemetry init`),Fi().then(async()=>{R(`[3P telemetry] Remote managed settings loaded, initializing telemetry`),io(),await Vu()}).catch(e=>{R(`[3P telemetry] Telemetry init failed (remote settings path): ${L(e)}`,{level:`error`})})):Vu().catch(e=>{R(`[3P telemetry] Telemetry init failed: ${L(e)}`,{level:`error`})})}async function Vu(){if(!Ru){if(!m(process.env.CLAUDE_CODE_ENABLE_TELEMETRY)){Ru=!0,R(`[3P telemetry] Skipped — CLAUDE_CODE_ENABLE_TELEMETRY not set`);return}Ru=!0;try{await Hu()}catch(e){throw Ru=!1,e}}}async function Hu(){let{initializeTelemetry:e}=await import(`./instrumentation-BXJk0mxI.js`),t=await e();t&&(Xe(t,(e,n)=>{let r=t?.createCounter(e,n);return{add(e,t={}){let n={...el(),...t};r?.add(e,n)}}}),Ve()?.add(1))}_o();async function Uu(e,t,n,r){let{App:i}=await import(`./App-DF28Bpg9.js`),{SentryErrorBoundary:a}=await import(`./SentryErrorBoundary-CYiFofRZ.js`),{REPL:o}=await import(`./REPL-h1bwm8ee.js`);await r(e,(0,Y.jsx)(a,{name:`RootREPLBoundary`,children:(0,Y.jsx)(i,{...t,children:(0,Y.jsx)(o,{...n})})}))}kr(),E(),dr(),Ir();var Wu=$r(()=>ce({client_data:ie(_(),se()).nullish(),additional_model_options:oe(ce({model:_(),name:_(),description:_()}).transform(({model:e,name:t,description:n})=>({value:e,label:t,description:n}))).nullish()}));async function Gu(){if(Lr())return R(`[Bootstrap] Skipped: Nonessential traffic disabled`),null;if(k()!==`firstParty`)return R(`[Bootstrap] Skipped: 3P provider`),null;let e=Gt();if(!(xt()?.accessToken&&en())&&!e)return R(`[Bootstrap] Skipped: no usable OAuth or API key`),null;let t=`${Dr().BASE_API_URL}/api/claude_cli/bootstrap`;try{return await Wt(async()=>{let n=xt()?.accessToken,r;if(n&&en())r={Authorization:`Bearer ${n}`,"anthropic-beta":Or};else if(e)r={"x-api-key":e};else return R(`[Bootstrap] No auth available on retry, aborting`),null;R(`[Bootstrap] Fetching`);let i=await g.get(t,{headers:{"Content-Type":`application/json`,"User-Agent":lt(),...r},timeout:5e3}),a=Wu().safeParse(i.data);return a.success?(R(`[Bootstrap] Fetch ok`),a.data):(R(`[Bootstrap] Response failed validation: ${a.error.message}`),null)})}catch(e){throw R(`[Bootstrap] Fetch failed: ${g.isAxiosError(e)?e.response?.status??e.code:`unknown`}`),e}}async function Ku(){try{let e=await Gu();if(!e)return;let t=e.client_data??null,n=e.additional_model_options??[],r=j();if(yt(r.clientDataCache,t)&&yt(r.additionalModelOptionsCache,n)){R(`[Bootstrap] Cache unchanged, skipping write`);return}R(`[Bootstrap] Cache updated, persisting to disk`),A(e=>({...e,clientDataCache:t,additionalModelOptionsCache:n}))}catch(e){H(e)}}Ln(),vs(),Us(),ml(),yc(),Sl(),dr(),p();var qu=new Map;function Ju(){let e=process.argv[1]||``,t=process.execPath||process.argv[0]||``;zr()===`windows`&&(e=e.split(uu.sep).join(su.sep),t=t.split(uu.sep).join(su.sep));let n=[e,t],r=[`/build-ant/`,`/build-external/`,`/build-external-native/`,`/build-ant-native/`];return n.some(e=>r.some(t=>e.includes(t)))}var Yu=[/MaxListenersExceededWarning.*AbortSignal/,/MaxListenersExceededWarning.*EventTarget/];function Xu(e){let t=`${e.name}: ${e.message}`;return Yu.some(e=>e.test(t))}var Zu=null;function Qu(){let e=process.listeners(`warning`);Zu&&e.includes(Zu)||(Ju()||process.removeAllListeners(`warning`),Zu=e=>{try{let t=`${e.name}: ${e.message.slice(0,50)}`,n=qu.get(t)||0;(qu.has(t)||qu.size<1e3)&&qu.set(t,n+1);let r=Xu(e);B(`tengu_node_warning`,{is_internal:+!!r,occurrence_count:n+1,classname:e.name,...process.env.USER_TYPE===`ant`&&{message:e.message}}),m(process.env.CLAUDE_DEBUG)&&R(`${r?`[Internal Warning]`:`[Warning]`} ${e.toString()}`,{level:`warn`})}catch{}},process.on(`warning`,Zu))}Is(),xc(),tc(),Go(),xs(),No(),au(),xe();function $u(){return(0,Y.jsxs)(_e,{children:[`MCP servers may execute code or access system resources. All tool calls require approval. Learn more in the`,` `,(0,Y.jsx)(me,{url:`https://code.claude.com/docs/en/mcp`,children:`MCP documentation`}),`.`]})}z(),F(),xe();function ed({serverName:e,onDone:t}){function n(n){switch(B(`tengu_mcp_dialog_choice`,{choice:n}),n){case`yes`:case`yes_all`:{let r=(Cn()||{}).enabledMcpjsonServers||[];r.includes(e)||P(`localSettings`,{enabledMcpjsonServers:[...r,e]}),n===`yes_all`&&P(`localSettings`,{enableAllProjectMcpServers:!0}),t();break}case`no`:{let n=(Cn()||{}).disabledMcpjsonServers||[];n.includes(e)||P(`localSettings`,{disabledMcpjsonServers:[...n,e]}),t();break}}}return(0,Y.jsxs)(ye,{title:`New MCP server found in .mcp.json: ${e}`,color:`warning`,onCancel:()=>n(`no`),children:[(0,Y.jsx)($u,{}),(0,Y.jsx)(da,{options:[{label:`Use this and all future MCP servers in this project`,value:`yes_all`},{label:`Use this MCP server`,value:`yes`},{label:`Continue without using this MCP server`,value:`no`}],onChange:e=>n(e),onCancel:()=>n(`no`)})]})}ht(),z(),xe(),F(),Ys();function td({serverNames:e,onDone:t}){function n(n){let r=Cn()||{},i=r.enabledMcpjsonServers||[],a=r.disabledMcpjsonServers||[],[o,s]=Pt(e,e=>n.includes(e));B(`tengu_mcp_multidialog_choice`,{approved:o.length,rejected:s.length}),o.length>0&&P(`localSettings`,{enabledMcpjsonServers:[...new Set([...i,...o])]}),s.length>0&&P(`localSettings`,{disabledMcpjsonServers:[...new Set([...a,...s])]}),t()}let r=(0,Nu.useCallback)(()=>{let n=(Cn()||{}).disabledMcpjsonServers||[];P(`localSettings`,{disabledMcpjsonServers:[...new Set([...n,...e])]}),t()},[e,t]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(ye,{title:`${e.length} new MCP servers found in .mcp.json`,subtitle:`Select any you wish to enable.`,color:`warning`,onCancel:r,hideInputGuide:!0,children:[(0,Y.jsx)($u,{}),(0,Y.jsx)(Qo,{options:e.map(e=>({label:e,value:e})),defaultValue:e,onSubmit:n,onCancel:r,hideIndexes:!0})]}),(0,Y.jsx)(Se,{paddingX:1,children:(0,Y.jsx)(_e,{dimColor:!0,italic:!0,children:(0,Y.jsxs)(x,{children:[(0,Y.jsx)(be,{shortcut:`Space`,action:`select`}),(0,Y.jsx)(be,{shortcut:`Enter`,action:`confirm`}),(0,Y.jsx)(Fo,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`reject all`})]})})})]})}$i();async function nd(e){let{servers:t}=Ns(`project`),n=Object.keys(t).filter(e=>Bo(e)===`pending`);n.length!==0&&await new Promise(t=>{let r=()=>void t();if(n.length===1&&n[0]!==void 0){let t=n[0];e.render((0,Y.jsx)(Bi,{children:(0,Y.jsx)(ic,{children:(0,Y.jsx)(ed,{serverName:t,onDone:r})})}))}else e.render((0,Y.jsx)(Bi,{children:(0,Y.jsx)(ic,{children:(0,Y.jsx)(td,{serverNames:n,onDone:r})})}))})}kc(),ca(),to(),il(),Za(),fc(),E(),dr();var rd={iterm:`iTerm`,"iterm.app":`iTerm`,ghostty:`Ghostty`,kitty:`kitty`,alacritty:`Alacritty`,wezterm:`WezTerm`,apple_terminal:`Terminal`};function id(){if(process.platform!==`darwin`)return;let e=process.env.TERM_PROGRAM;if(!e)return;let t=rd[e.toLowerCase()];t&&j().deepLinkTerminal!==t&&(A(e=>({...e,deepLinkTerminal:t})),R(`Stored deep link terminal preference: ${t}`))}var ad=class{constructor(){h(this,`frameDurations`,[]),h(this,`firstRenderTime`,void 0),h(this,`lastRenderTime`,void 0)}record(e){let t=performance.now();this.firstRenderTime===void 0&&(this.firstRenderTime=t),this.lastRenderTime=t,this.frameDurations.push(e)}getMetrics(){if(this.frameDurations.length===0||this.firstRenderTime===void 0||this.lastRenderTime===void 0)return;let e=this.lastRenderTime-this.firstRenderTime;if(e<=0)return;let t=this.frameDurations.length/(e/1e3),n=this.frameDurations.slice().sort((e,t)=>t-e),r=n[Math.max(0,Math.ceil(n.length*.01)-1)],i=r>0?1e3/r:0;return{averageFps:Math.round(t*100)/100,low1PctFps:Math.round(i*100)/100}}};z(),oi(),T(),xe(),No(),$i(),E(),p(),Sc(),ta(),F();function od(){A(e=>({...e,hasCompletedOnboarding:!0,lastOnboardingVersion:`2.6.11`}))}function sd(e,t){return new Promise(n=>{e.render(t(e=>void n(e)))})}async function X(e,t,n){return cd(e,t,{color:`error`,beforeExit:n})}async function cd(e,t,n){let{Text:r}=await import(`./src-poaoYkuc.js`),i=n?.color,a=n?.exitCode??1;e.render(i?(0,Y.jsx)(r,{color:i,children:t}):(0,Y.jsx)(r,{children:t})),e.unmount(),await n?.beforeExit?.(),process.exit(a)}function Z(e,t,n){return sd(e,e=>(0,Y.jsx)(ge,{initialState:j().theme,onThemeSave:e=>A(t=>({...t,theme:e})),children:(0,Y.jsx)(Bi,{onChangeAppState:n?.onChangeAppState,children:(0,Y.jsx)(ic,{children:t(e)})})}))}async function ld(e,t){e.render(t),kp(),await e.waitUntilExit(),await W(0)}async function ud(e,t,n,r,i,a){if(m(!1)||process.env.IS_DEMO)return!1;let o=j(),s=!1;if(!o.theme||!o.hasCompletedOnboarding){s=!0;let{Onboarding:t}=await import(`./Onboarding-ByLnHSnW.js`);await Z(e,e=>(0,Y.jsx)(t,{onDone:()=>{od(),e()}}),{onChangeAppState:Rl})}if(!m(process.env.CLAUBBIT)){if(!ln()){let{TrustDialog:t}=await import(`./TrustDialog-CHu5eoeR.js`);await Z(e,e=>(0,Y.jsx)(t,{commands:r,onDone:e}))}Te(!0),pt(),dt(),so();let{errors:t}=Vi();if(t.length===0&&await nd(e),await ss()){let t=bi(await Ma(!0)),{ClaudeMdExternalIncludesDialog:n}=await import(`./ClaudeMdExternalIncludesDialog-Dje7A0F2.js`);await Z(e,e=>(0,Y.jsx)(n,{onDone:e,isStandaloneDialog:!0,externalIncludes:t}))}}if(Jl(),id(),io(),setImmediate(()=>Bu()),await Gi()){let{GroveDialog:t}=await import(`./Grove-CmdRVv9F.js`);if(await Z(e,e=>(0,Y.jsx)(t,{showIfAlreadyViewed:!1,location:s?`onboarding`:`policy_update_modal`,onDone:e}))===`escape`)return B(`tengu_grove_policy_exited`,{}),va(0),!1}if(process.env.ANTHROPIC_API_KEY&&!u()){let t=Yt(process.env.ANTHROPIC_API_KEY);if(Hn(t)===`new`){let{ApproveApiKey:n}=await import(`./ApproveApiKey-BtiWOryM.js`);await Z(e,e=>(0,Y.jsx)(n,{customApiKeyTruncated:t,onDone:e}),{onChangeAppState:Rl})}}if((t===`bypassPermissions`||n)&&!tn()){let{BypassPermissionsModeDialog:t}=await import(`./BypassPermissionsModeDialog-BDWFw61G.js`);await Z(e,e=>(0,Y.jsx)(t,{onAccept:e}))}if(a&&a.length>0){let{DevChannelsDialog:t}=await import(`./DevChannelsDialog-BwMFW7Wt.js`);await Z(e,e=>(0,Y.jsx)(t,{channels:a,onAccept:()=>{Le([...rt(),...a.map(e=>({...e,dev:!0}))]),Ie(!0),e()}}))}if(i&&!j().hasCompletedClaudeInChromeOnboarding){let{ClaudeInChromeOnboarding:t}=await import(`./ClaudeInChromeOnboarding-CpN0yIU_.js`);await Z(e,e=>(0,Y.jsx)(t,{onDone:e}))}return s}function dd(e){let t=0,n=ql(e);n.stdin&&B(`tengu_stdin_interactive`,{});let r=new ad,i=Kl();tt(i);let a=process.env.CLAUDE_CODE_FRAME_TIMING_LOG;return{getFpsMetrics:()=>r.getMetrics(),stats:i,renderOptions:{...n,onFrame:e=>{if(r.record(e.durationMs),i.observe(`frame_duration_ms`,e.durationMs),a&&e.phases&&du(a,JSON.stringify({total:e.durationMs,...e.phases,rss:process.memoryUsage.rss(),cpu:process.cpuUsage()})+`
|
|
20
|
+
`),!fe())for(let n of e.flickers){if(n.reason===`resize`)continue;let e=Date.now();e-t<1e3&&B(`tengu_flicker`,{desiredHeight:n.desiredHeight,actualHeight:n.availableHeight,reason:n.reason}),t=e}}}}}No();async function fd(e,t){let{InvalidSettingsDialog:n}=await import(`./InvalidSettingsDialog-BL8nxwWQ.js`);return Z(e,e=>(0,Y.jsx)(n,{settingsErrors:t.settingsErrors,onContinue:e,onExit:t.onExit}))}async function pd(e,t){let{AssistantSessionChooser:n}=await import(`./AssistantSessionChooser-CDfwNVi5.js`);return Z(e,e=>(0,Y.jsx)(n,{sessions:t.sessions,onSelect:t=>e(t),onCancel:()=>e(null)}))}async function md(e){let{NewInstallWizard:t,computeDefaultInstallDir:n}=await import(`./assistant-DO7RAhd3.js`),r=await n(),i,a=new Promise((e,t)=>{i=t}),o=Z(e,e=>(0,Y.jsx)(t,{defaultDir:r,onInstalled:t=>e(t),onCancel:()=>e(null),onError:e=>i(Error(`Installation failed: ${e}`))}));return Promise.race([o,a])}async function hd(e){let{TeleportResumeWrapper:t}=await import(`./TeleportResumeWrapper-BlkvOdYn.js`);return Z(e,e=>(0,Y.jsx)(t,{onComplete:e,onCancel:()=>e(null),source:`cliArg`}))}async function gd(e,t){let{TeleportRepoMismatchDialog:n}=await import(`./TeleportRepoMismatchDialog-BAwtgUhR.js`);return Z(e,e=>(0,Y.jsx)(n,{targetRepo:t.targetRepo,initialPaths:t.initialPaths,onSelectPath:e,onCancel:()=>e(null)}))}async function _d(e,t,n,r){let[i,{ResumeConversation:a},{App:o}]=await Promise.all([n,import(`./ResumeConversation-CagiCg7-.js`),import(`./App-DF28Bpg9.js`)]);await ld(e,(0,Y.jsx)(o,{getFpsMetrics:t.getFpsMetrics,stats:t.stats,initialState:t.initialState,children:(0,Y.jsx)(ic,{children:(0,Y.jsx)(a,{...r,worktreePaths:i})})}))}jl();function vd(){let e=Ml([`weixin`,`serve`]);Jc({name:`weixin`,description:"WeChat channel integration. Enables inbound WeChat messages via channels and provides reply/send_typing MCP tools. Configure with `ccb weixin login` and enable for a session with `--channels plugin:weixin@builtin`.",version:`2.6.11`,defaultEnabled:!0,mcpServers:{weixin:{type:`stdio`,command:e.execPath,args:e.args}}})}function yd(){vd()}re(),El(),Gl(),Rc(),Ic();var bd=5,xd=30,Sd=`After you finish implementing the change:
|
|
21
21
|
1. **Simplify** — Invoke the \`${Uc}\` tool with \`skill: "simplify"\` to review and clean up your changes.
|
|
22
22
|
2. **Run unit tests** — Run the project's test suite (check for package.json scripts, Makefile targets, or common commands like \`npm test\`, \`bun test\`, \`pytest\`, \`go test\`). If tests fail, fix them.
|
|
23
23
|
3. **Test end-to-end** — Follow the e2e test recipe from the coordinator's prompt (below). If the recipe says to skip e2e for this unit, skip it.
|
|
@@ -1068,10 +1068,10 @@ Examples:
|
|
|
1068
1068
|
Usage: claude mcp add <name> <command> [args...]`):q(`Error: Server name is required.
|
|
1069
1069
|
Usage: claude mcp add <name> <command> [args...]`);try{let t=Mi(r.scope),n=qi(r.transport);r.xaa&&!Tc()&&q(`Error: --xaa requires CLAUDE_CODE_ENABLE_XAA=1 in your environment`);let o=!!r.xaa;if(o){let e=[];r.clientId||e.push(`--client-id`),r.clientSecret||e.push(`--client-secret`),Qi()||e.push(`'claude mcp xaa setup' (settings.xaaIdp not configured)`),e.length&&q(`Error: --xaa requires: ${e.join(`, `)}`)}let s=r.transport!==void 0,c=i.startsWith(`http://`)||i.startsWith(`https://`)||i.startsWith(`localhost`)||i.endsWith(`/sse`)||i.endsWith(`/mcp`);if(B(`tengu_mcp_add`,{type:n,scope:t,source:`command`,transport:n,transportExplicit:s,looksLikeUrl:c}),n===`sse`){i||q(`Error: URL is required for SSE transport.`);let n=r.header?ts(r.header):void 0,a=r.callbackPort?parseInt(r.callbackPort,10):void 0,s=r.clientId||a||o?{...r.clientId?{clientId:r.clientId}:{},...a?{callbackPort:a}:{},...o?{xaa:!0}:{}}:void 0,c=r.clientSecret&&r.clientId?await os():void 0,l={type:`sse`,url:i,headers:n,oauth:s};await ho(e,l,t),c&&ns(e,l,c),process.stdout.write(`Added SSE MCP server ${e} with URL: ${i} to ${t} config\n`),n&&process.stdout.write(`Headers: ${Xn(n,null,2)}\n`)}else if(n===`http`){i||q(`Error: URL is required for HTTP transport.`);let n=r.header?ts(r.header):void 0,a=r.callbackPort?parseInt(r.callbackPort,10):void 0,s=r.clientId||a||o?{...r.clientId?{clientId:r.clientId}:{},...a?{callbackPort:a}:{},...o?{xaa:!0}:{}}:void 0,c=r.clientSecret&&r.clientId?await os():void 0,l={type:`http`,url:i,headers:n,oauth:s};await ho(e,l,t),c&&ns(e,l,c),process.stdout.write(`Added HTTP MCP server ${e} with URL: ${i} to ${t} config\n`),n&&process.stdout.write(`Headers: ${Xn(n,null,2)}\n`)}else (r.clientId||r.clientSecret||r.callbackPort||r.xaa)&&process.stderr.write(`Warning: --client-id, --client-secret, --callback-port, and --xaa are only supported for HTTP/SSE transports and will be ignored for stdio.
|
|
1070
1070
|
`),!s&&c&&(process.stderr.write(`\nWarning: The command "${i}" looks like a URL, but is being interpreted as a stdio server as --transport was not specified.\n`),process.stderr.write(`If this is an HTTP server, use: claude mcp add --transport http ${e} ${i}\n`),process.stderr.write(`If this is an SSE server, use: claude mcp add --transport sse ${e} ${i}\n`)),await ho(e,{type:`stdio`,command:i,args:a,env:f(r.env)},t),process.stdout.write(`Added stdio MCP server ${e} with command: ${i} ${a.join(` `)} to ${t} config\n`);Fl(`File modified: ${Ga(t)}`)}catch(e){q(e.message)}})}ya(),rr(),F();function Zf(e){let t=e.command(`xaa`).description(`Manage the XAA (SEP-990) IdP connection`);t.command(`setup`).description(`Configure the IdP connection (one-time setup for all XAA-enabled servers)`).requiredOption(`--issuer <url>`,`IdP issuer URL (OIDC discovery)`).requiredOption(`--client-id <id>`,`Claude Code's client_id at the IdP`).option(`--client-secret`,`Read IdP client secret from MCP_XAA_IDP_CLIENT_SECRET env var`).option(`--callback-port <port>`,`Fixed loopback callback port (only if IdP does not honor RFC 8252 port-any matching)`).action(e=>{let t;try{t=new URL(e.issuer)}catch{return q(`Error: --issuer must be a valid URL (got "${e.issuer}")`)}if(t.protocol!==`https:`&&!(t.protocol===`http:`&&(t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`)))return q(`Error: --issuer must use https:// (got "${t.protocol}//${t.host}")`);let n=e.callbackPort?parseInt(e.callbackPort,10):void 0;if(n!==void 0&&(!Number.isInteger(n)||n<=0))return q(`Error: --callback-port must be a positive integer`);let r=e.clientSecret?process.env.MCP_XAA_IDP_CLIENT_SECRET:void 0;if(e.clientSecret&&!r)return q(`Error: --client-secret requires MCP_XAA_IDP_CLIENT_SECRET env var`);let i=Qi(),a=i?.issuer,o=i?.clientId,{error:s}=P(`userSettings`,{xaaIdp:{issuer:e.issuer,clientId:e.clientId,callbackPort:n}});if(s)return q(`Error writing settings: ${s.message}`);if(a&&(pi(a)===pi(e.issuer)?o!==e.clientId&&(_a(a),sa(a)):(_a(a),sa(a))),r){let{success:t,warning:n}=Ra(e.issuer,r);if(!t)return q(`Error: settings written but keychain save failed${n?` — ${n}`:``}. Re-run with --client-secret once keychain is available.`)}Fl(`XAA IdP connection configured for ${e.issuer}`)}),t.command(`login`).description(`Cache an IdP id_token so XAA-enabled MCP servers authenticate silently. Default: run the OIDC browser login. With --id-token: write a pre-obtained JWT directly (used by conformance/e2e tests where the mock IdP does not serve /authorize).`).option(`--force`,`Ignore any cached id_token and re-login (useful after IdP-side revocation)`).option(`--id-token <jwt>`,`Write this pre-obtained id_token directly to cache, skipping the OIDC browser login`).action(async e=>{let t=Qi();if(!t)return q(`Error: no XAA IdP connection. Run 'claude mcp xaa setup' first.`);if(e.idToken){let n=Pi(t.issuer,e.idToken);return Fl(`id_token cached for ${t.issuer} (expires ${new Date(n).toISOString()})`)}if(e.force&&_a(t.issuer),Oi(t.issuer)!==void 0)return Fl(`Already logged in to ${t.issuer} (cached id_token still valid). Use --force to re-login.`);process.stdout.write(`Opening browser for IdP login at ${t.issuer}…\n`);try{await aa({idpIssuer:t.issuer,idpClientId:t.clientId,idpClientSecret:Ri(t.issuer),callbackPort:t.callbackPort,onAuthorizationUrl:e=>{process.stdout.write(`If the browser did not open, visit:\n ${e}\n`)}}),Fl(`Logged in. MCP servers with --xaa will now authenticate silently.`)}catch(e){q(`IdP login failed: ${L(e)}`)}}),t.command(`show`).description(`Show the current IdP connection config`).action(()=>{let e=Qi();if(!e)return Fl(`No XAA IdP connection configured.`);let t=Ri(e.issuer)!==void 0,n=Oi(e.issuer)!==void 0;process.stdout.write(`Issuer: ${e.issuer}\n`),process.stdout.write(`Client ID: ${e.clientId}\n`),e.callbackPort!==void 0&&process.stdout.write(`Callback port: ${e.callbackPort}\n`),process.stdout.write(`Client secret: ${t?`(stored in keychain)`:`(not set — PKCE-only)`}\n`),process.stdout.write(`Logged in: ${n?`yes (id_token cached)`:`no — run 'claude mcp xaa login'`}\n`),Fl()}),t.command(`clear`).description(`Clear the IdP connection config and cached id_token`).action(()=>{let e=Qi(),{error:t}=P(`userSettings`,{xaaIdp:void 0});if(t)return q(`Error writing settings: ${t.message}`);e&&(_a(e.issuer),sa(e.issuer)),Fl(`XAA IdP connection cleared`)})}Ei();function Qf(e,t=process.argv){for(let n=0;n<t.length;n++){let r=t[n];if(r?.startsWith(`${e}=`))return r.slice(e.length+1);if(r===e&&n+1<t.length)return t[n+1]}}ec(),Ua(),ki(),z(),E(),Rr(),F();function $f(){if(j().bypassPermissionsModeAccepted)try{tn()||P(`userSettings`,{skipDangerousModePermissionPrompt:!0}),B(`tengu_migrate_bypass_permissions_accepted`,{}),A(e=>{if(!(`bypassPermissionsModeAccepted`in e))return e;let{bypassPermissionsModeAccepted:t,...n}=e;return n})}catch(e){H(Error(`Failed to migrate bypass permissions accepted: ${e}`))}}z(),E(),Rr(),F();function ep(){let e=nn(),t=e.enableAllProjectMcpServers!==void 0,n=e.enabledMcpjsonServers&&e.enabledMcpjsonServers.length>0,r=e.disabledMcpjsonServers&&e.disabledMcpjsonServers.length>0;if(!(!t&&!n&&!r))try{let i=Rt(`localSettings`)||{},a={},o=[];if(t&&i.enableAllProjectMcpServers===void 0?(a.enableAllProjectMcpServers=e.enableAllProjectMcpServers,o.push(`enableAllProjectMcpServers`)):t&&o.push(`enableAllProjectMcpServers`),n&&e.enabledMcpjsonServers){let t=i.enabledMcpjsonServers||[];a.enabledMcpjsonServers=[...new Set([...t,...e.enabledMcpjsonServers])],o.push(`enabledMcpjsonServers`)}if(r&&e.disabledMcpjsonServers){let t=i.disabledMcpjsonServers||[];a.disabledMcpjsonServers=[...new Set([...t,...e.disabledMcpjsonServers])],o.push(`disabledMcpjsonServers`)}Object.keys(a).length>0&&P(`localSettings`,a),(o.includes(`enableAllProjectMcpServers`)||o.includes(`enabledMcpjsonServers`)||o.includes(`disabledMcpjsonServers`))&&Dt(e=>{let{enableAllProjectMcpServers:t,enabledMcpjsonServers:n,disabledMcpjsonServers:r,...i}=e;return i}),B(`tengu_migrate_mcp_approval_fields_success`,{migratedCount:o.length})}catch(e){H(e),B(`tengu_migrate_mcp_approval_fields_error`,{})}}F();function tp(){if(process.env.USER_TYPE!==`ant`)return;let e=Rt(`userSettings`)?.model;typeof e==`string`&&(e.startsWith(`fennec-latest[1m]`)?P(`userSettings`,{model:`opus[1m]`}):e.startsWith(`fennec-latest`)?P(`userSettings`,{model:`opus`}):(e.startsWith(`fennec-fast-latest`)||e.startsWith(`opus-4-5-fast`))&&P(`userSettings`,{model:`opus[1m]`,fastMode:!0}))}z(),E(),D(),F();function np(){if(k()!==`firstParty`||!_t())return;let e=Rt(`userSettings`)?.model;e!==`claude-opus-4-20250514`&&e!==`claude-opus-4-1-20250805`&&e!==`claude-opus-4-0`&&e!==`claude-opus-4-1`||(P(`userSettings`,{model:`opus`}),A(e=>({...e,legacyOpusMigrationTimestamp:Date.now()})),B(`tengu_legacy_opus_migration`,{from_model:e}))}z(),Lt();function rp(){Tt()&&B(`tengu_opus_to_opus1m_migration`,{skipped:!0})}E();function ip(){A(e=>{let t=e.replBridgeEnabled;if(t===void 0||e.remoteControlAtStartup!==void 0)return e;let n={...e,remoteControlAtStartup:!!t};return delete n.replBridgeEnabled,n})}T(),E(),F();function ap(){j().sonnet1m45MigrationComplete||(Rt(`userSettings`)?.model===`sonnet[1m]`&&P(`userSettings`,{model:`sonnet-4-5-20250929[1m]`}),He()===`sonnet[1m]`&&Qe(`sonnet-4-5-20250929[1m]`),A(e=>({...e,sonnet1m45MigrationComplete:!0})))}z(),wn(),E(),D(),F();function op(){if(k()!==`firstParty`||!Kn()&&!un()&&!an())return;let e=Rt(`userSettings`)?.model;if(e!==`claude-sonnet-4-5-20250929`&&e!==`claude-sonnet-4-5-20250929[1m]`&&e!==`sonnet-4-5-20250929`&&e!==`sonnet-4-5-20250929[1m]`)return;let t=e.endsWith(`[1m]`);P(`userSettings`,{model:t?`sonnet[1m]`:`sonnet`}),j().numStartups>1&&A(e=>({...e,sonnet45To46MigrationTimestamp:Date.now()})),B(`tengu_sonnet45_to_46_migration`,{from_model:e,has_1m:t})}z(),E(),Rr(),F();function sp(){if(!j().hasResetAutoModeOptInForDefaultOffer&&bc()===`enabled`)try{let e=Rt(`userSettings`);e?.skipAutoPermissionPrompt&&e?.permissions?.defaultMode!==`auto`&&(P(`userSettings`,{skipAutoPermissionPrompt:void 0}),B(`tengu_migrate_reset_auto_opt_in_for_default_offer`,{})),A(e=>e.hasResetAutoModeOptInForDefaultOffer?e:{...e,hasResetAutoModeOptInForDefaultOffer:!0})}catch(e){H(Error(`Failed to reset auto mode opt-in: ${e}`))}}z(),wn(),E(),D(),F();function cp(){if(!j().opusProMigrationComplete){if(k()!==`firstParty`||!Kn()){A(e=>({...e,opusProMigrationComplete:!0})),B(`tengu_reset_pro_to_opus_default`,{skipped:!0});return}if(Cn()?.model===void 0){let e=Date.now();A(t=>({...t,opusProMigrationComplete:!0,opusProMigrationTimestamp:e})),B(`tengu_reset_pro_to_opus_default`,{skipped:!1,had_custom_model:!1})}else A(e=>({...e,opusProMigrationComplete:!0})),B(`tengu_reset_pro_to_opus_default`,{skipped:!1,had_custom_model:!0})}}ue(),ei();var lp=$r(()=>ce({session_id:_(),ws_url:_(),work_dir:_().optional()}));rr(),pr();var up=class extends Error{constructor(e){super(e),this.name=`DirectConnectError`}};async function dp({serverUrl:e,authToken:t,cwd:n,dangerouslySkipPermissions:r}){let i={"content-type":`application/json`};t&&(i.authorization=`Bearer ${t}`);let a;try{a=await fetch(`${e}/sessions`,{method:`POST`,headers:i,body:Xn({cwd:n,...r&&{dangerously_skip_permissions:!0}})})}catch(t){throw new up(`Failed to connect to server at ${e}: ${L(t)}`)}if(!a.ok)throw new up(`Failed to create session: ${a.status} ${a.statusText}`);let o=lp().safeParse(await a.json());if(!o.success)throw new up(`Invalid session response: ${o.error.message}`);let s=o.data;return{config:{serverUrl:e,sessionId:s.session_id,wsUrl:s.ws_url,authToken:t},workDir:s.work_dir}}var fp=i({isKairosEnabled:()=>pp});async function pp(){return!!Xt(`tengu_kairos_assistant`,!1)}var mp=n((()=>{Bt()}));Xr(),kr(),Cc(),Bt(),xa(),ea(),wn(),E(),Sc(),ra(),Br(),pr(),z(),T(),Ya(),xe(),El(),Gl(),p(),Er(),Rr(),Lt(),fc(),ui(),F(),Zo(),ws(),ya(),ar(),dr(),rr(),oi(),_s(),br(),Nl(),ds(),Rn(),hc(),U(`main_tsx_entry`),Qt(),Jn();var hp=()=>qr(),gp=()=>is(),_p=()=>Tl(),vp=(ms(),e(As)),yp=(kl(),e(Al)),bp=(mp(),e(fp)),xp=(_i(),e(Oc));U(`main_tsx_imports_loaded`);function Sp(){try{let e=Rt(`policySettings`);if(e){let t=bt(e);B(`tengu_managed_settings_loaded`,{keyCount:t.length,keys:t.join(`,`)})}}catch{}}function Cp(){let e=ut(at()??ft());Yf(gr(),Tn(e,et())),ys().then(({enabled:e,errors:t})=>{let n=mc();qa(e,n,Vs()),Qa(t,n)}).catch(e=>H(e))}function wp(){let e={};return process.env.NODE_EXTRA_CA_CERTS&&(e.has_node_extra_ca_certs=!0),process.env.CLAUDE_CODE_CLIENT_CERT&&(e.has_client_cert=!0),d(`--use-system-ca`)&&(e.has_use_system_ca=!0),d(`--use-openssl-ca`)&&(e.has_use_openssl_ca=!0),e}async function Tp(){if(yn())return;let[e,t,n]=await Promise.all([xr(),Sr(),Jf()]);B(`tengu_startup_telemetry`,{is_git:e,worktree_count:t,gh_auth_status:n,sandbox_enabled:Gs.isSandboxingEnabled(),are_unsandboxed_commands_allowed:Gs.areUnsandboxedCommandsAllowed(),is_auto_bash_allowed_if_sandbox_enabled:Gs.isAutoAllowBashIfSandboxedEnabled(),auto_updater_disabled:hn(),prefers_reduced_motion:St().prefersReducedMotion??!1,...wp()})}var Ep=11;function Dp(){j().migrationVersion!==Ep&&($f(),ep(),cp(),ap(),np(),op(),rp(),ip(),sp(),process.env.USER_TYPE===`ant`&&tp(),A(e=>e.migrationVersion===Ep?e:{...e,migrationVersion:Ep})),Pl().catch(()=>{})}function Op(){if(Re()){V(`info`,`prefetch_system_context_non_interactive`),so();return}ln()?(V(`info`,`prefetch_system_context_has_trust`),so()):V(`info`,`prefetch_system_context_skipped_no_trust`)}function kp(){m(process.env.CLAUDE_CODE_EXIT_AFTER_FIRST_RENDER)||c()||($t(),lc(),Op(),nu(),m(process.env.CLAUDE_CODE_USE_BEDROCK)&&!m(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&zn(),m(process.env.CLAUDE_CODE_USE_VERTEX)&&!m(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)&&Ut(),ps(gr(),AbortSignal.timeout(3e3),[]),iu(),bn(),wa.initialize(),c()||Vl.initialize(),process.env.USER_TYPE===`ant`&&import(`./eventLoopStallDetector-Dnh1fc31.js`).then(e=>e.startEventLoopStallDetector()))}function Ap(e){try{let t=e.trim(),n=t.startsWith(`{`)&&t.endsWith(`}`),r;if(n)Wr(t)||(process.stderr.write(b.red(`Error: Invalid JSON provided to --settings
|
|
1071
|
-
`)),process.exit(1)),r=uc(`claude-settings`,`.json`,{contentHash:t}),$n(r,t,`utf8`);else{let{resolvedPath:t}=mr(ur(),e);try{fu(t,`utf8`)}catch(e){throw nr(e)&&(process.stderr.write(b.red(`Error: Settings file not found: ${t}\n`)),process.exit(1)),e}r=t}Ne(r),je()}catch(e){e instanceof Error&&H(e),process.stderr.write(b.red(`Error processing settings: ${L(e)}\n`)),process.exit(1)}}function jp(e){try{De(pn(e)),je()}catch(e){e instanceof Error&&H(e),process.stderr.write(b.red(`Error processing --setting-sources: ${L(e)}\n`)),process.exit(1)}}function Mp(){U(`eagerLoadSettings_start`);let e=Qf(`--settings`);e&&Ap(e);let t=Qf(`--setting-sources`);t!==void 0&&jp(t),U(`eagerLoadSettings_end`)}function Np(e){if(process.env.CLAUDE_CODE_ENTRYPOINT)return;let t=process.argv.slice(2),n=t.indexOf(`mcp`);if(n!==-1&&t[n+1]===`serve`){process.env.CLAUDE_CODE_ENTRYPOINT=`mcp`;return}if(m(process.env.CLAUDE_CODE_ACTION)){process.env.CLAUDE_CODE_ENTRYPOINT=`claude-code-github-action`;return}process.env.CLAUDE_CODE_ENTRYPOINT=e?`sdk-cli`:`cli`}var Q={url:void 0,authToken:void 0,dangerouslySkipPermissions:!1},Pp={sessionId:void 0,discover:!1},$={host:void 0,cwd:void 0,permissionMode:void 0,dangerouslySkipPermissions:!1,local:!1,extraCliArgs:[],remoteBin:void 0};async function Fp(){U(`main_function_start`),process.env.NoDefaultCurrentDirectoryInExePath=`1`,Qu(),process.on(`exit`,()=>{Vp()}),process.on(`SIGINT`,()=>{process.argv.includes(`-p`)||process.argv.includes(`--print`)||process.exit(0)}),U(`main_warning_handler_initialized`);{let e=process.argv.slice(2),t=e.findIndex(e=>e.startsWith(`cc://`)||e.startsWith(`cc+unix://`));if(t!==-1&&Q){let n=e[t],{parseConnectUrl:r}=await import(`./parseConnectUrl-BS6i9JPo.js`),i=r(n);if(Q.dangerouslySkipPermissions=e.includes(`--dangerously-skip-permissions`),e.includes(`-p`)||e.includes(`--print`)){let r=e.filter((e,n)=>n!==t),i=r.indexOf(`--dangerously-skip-permissions`);i!==-1&&r.splice(i,1),process.argv=[process.argv[0],process.argv[1],`open`,n,...r]}else{Q.url=i.serverUrl,Q.authToken=i.authToken;let n=e.filter((e,n)=>n!==t),r=n.indexOf(`--dangerously-skip-permissions`);r!==-1&&n.splice(r,1),process.argv=[process.argv[0],process.argv[1],...n]}}}{let e=process.argv.indexOf(`--handle-uri`);if(e!==-1&&process.argv[e+1]){let{enableConfigs:t}=await import(`./config-
|
|
1071
|
+
`)),process.exit(1)),r=uc(`claude-settings`,`.json`,{contentHash:t}),$n(r,t,`utf8`);else{let{resolvedPath:t}=mr(ur(),e);try{fu(t,`utf8`)}catch(e){throw nr(e)&&(process.stderr.write(b.red(`Error: Settings file not found: ${t}\n`)),process.exit(1)),e}r=t}Ne(r),je()}catch(e){e instanceof Error&&H(e),process.stderr.write(b.red(`Error processing settings: ${L(e)}\n`)),process.exit(1)}}function jp(e){try{De(pn(e)),je()}catch(e){e instanceof Error&&H(e),process.stderr.write(b.red(`Error processing --setting-sources: ${L(e)}\n`)),process.exit(1)}}function Mp(){U(`eagerLoadSettings_start`);let e=Qf(`--settings`);e&&Ap(e);let t=Qf(`--setting-sources`);t!==void 0&&jp(t),U(`eagerLoadSettings_end`)}function Np(e){if(process.env.CLAUDE_CODE_ENTRYPOINT)return;let t=process.argv.slice(2),n=t.indexOf(`mcp`);if(n!==-1&&t[n+1]===`serve`){process.env.CLAUDE_CODE_ENTRYPOINT=`mcp`;return}if(m(process.env.CLAUDE_CODE_ACTION)){process.env.CLAUDE_CODE_ENTRYPOINT=`claude-code-github-action`;return}process.env.CLAUDE_CODE_ENTRYPOINT=e?`sdk-cli`:`cli`}var Q={url:void 0,authToken:void 0,dangerouslySkipPermissions:!1},Pp={sessionId:void 0,discover:!1},$={host:void 0,cwd:void 0,permissionMode:void 0,dangerouslySkipPermissions:!1,local:!1,extraCliArgs:[],remoteBin:void 0};async function Fp(){U(`main_function_start`),process.env.NoDefaultCurrentDirectoryInExePath=`1`,Qu(),process.on(`exit`,()=>{Vp()}),process.on(`SIGINT`,()=>{process.argv.includes(`-p`)||process.argv.includes(`--print`)||process.exit(0)}),U(`main_warning_handler_initialized`);{let e=process.argv.slice(2),t=e.findIndex(e=>e.startsWith(`cc://`)||e.startsWith(`cc+unix://`));if(t!==-1&&Q){let n=e[t],{parseConnectUrl:r}=await import(`./parseConnectUrl-BS6i9JPo.js`),i=r(n);if(Q.dangerouslySkipPermissions=e.includes(`--dangerously-skip-permissions`),e.includes(`-p`)||e.includes(`--print`)){let r=e.filter((e,n)=>n!==t),i=r.indexOf(`--dangerously-skip-permissions`);i!==-1&&r.splice(i,1),process.argv=[process.argv[0],process.argv[1],`open`,n,...r]}else{Q.url=i.serverUrl,Q.authToken=i.authToken;let n=e.filter((e,n)=>n!==t),r=n.indexOf(`--dangerously-skip-permissions`);r!==-1&&n.splice(r,1),process.argv=[process.argv[0],process.argv[1],...n]}}}{let e=process.argv.indexOf(`--handle-uri`);if(e!==-1&&process.argv[e+1]){let{enableConfigs:t}=await import(`./config-JGm0O-ZQ.js`);t();let n=process.argv[e+1],{handleDeepLinkUri:r}=await import(`./protocolHandler-CfmBTg36.js`),i=await r(n);process.exit(i)}if(process.platform===`darwin`&&process.env.__CFBundleIdentifier===`com.anthropic.claude-code-url-handler`){let{enableConfigs:e}=await import(`./config-JGm0O-ZQ.js`);e();let{handleUrlSchemeLaunch:t}=await import(`./protocolHandler-CfmBTg36.js`),n=await t();process.exit(n??1)}}if(Pp){let e=process.argv.slice(2);if(e[0]===`assistant`){let t=e[1];t&&!t.startsWith(`-`)?(Pp.sessionId=t,e.splice(0,2),process.argv=[process.argv[0],process.argv[1],...e]):t||(Pp.discover=!0,e.splice(0,1),process.argv=[process.argv[0],process.argv[1],...e])}}if($){let e=process.argv.slice(2);if(e[0]===`ssh`){let t=e.indexOf(`--local`);t!==-1&&($.local=!0,e.splice(t,1));let n=e.indexOf(`--dangerously-skip-permissions`);n!==-1&&($.dangerouslySkipPermissions=!0,e.splice(n,1));let r=e.indexOf(`--permission-mode`);r!==-1&&e[r+1]&&!e[r+1].startsWith(`-`)&&($.permissionMode=e[r+1],e.splice(r,2));let i=e.findIndex(e=>e.startsWith(`--permission-mode=`));i!==-1&&($.permissionMode=e[i].split(`=`)[1],e.splice(i,1));let a=(t,n={})=>{let r=e.indexOf(t);if(r!==-1){$.extraCliArgs.push(n.as??t);let i=e[r+1];n.hasValue&&i&&!i.startsWith(`-`)?($.extraCliArgs.push(i),e.splice(r,2)):e.splice(r,1)}let i=e.findIndex(e=>e.startsWith(`${t}=`));i!==-1&&($.extraCliArgs.push(n.as??t,e[i].slice(t.length+1)),e.splice(i,1))},o=e.indexOf(`--remote-bin`);o!==-1&&e[o+1]&&!e[o+1].startsWith(`-`)&&($.remoteBin=e[o+1],e.splice(o,2));let s=e.findIndex(e=>e.startsWith(`--remote-bin=`));s!==-1&&($.remoteBin=e[s].split(`=`).slice(1).join(`=`),e.splice(s,1)),a(`-c`,{as:`--continue`}),a(`--continue`),a(`--resume`,{hasValue:!0}),a(`--model`,{hasValue:!0})}if(e[0]===`ssh`&&e[1]&&!e[1].startsWith(`-`)){$.host=e[1];let t=2;e[2]&&!e[2].startsWith(`-`)&&($.cwd=e[2],t=3);let n=e.slice(t);if(n.includes(`-p`)||n.includes(`--print`)){process.stderr.write(`Error: headless (-p/--print) mode is not supported with claude ssh
|
|
1072
1072
|
`),va(1);return}process.argv=[process.argv[0],process.argv[1],...n]}}let e=process.argv.slice(2),t=e.includes(`-p`)||e.includes(`--print`),n=e.includes(`--init-only`),r=e.some(e=>e.startsWith(`--sdk-url`)),i=m(process.env.CLAUDE_CODE_FORCE_INTERACTIVE),a=t||n||r||!i&&!process.stdout.isTTY;a&&Zl(),Be(!a),Np(a);let o=(()=>{if(m(process.env.GITHUB_ACTIONS))return`github-action`;if(process.env.CLAUDE_CODE_ENTRYPOINT===`sdk-ts`)return`sdk-typescript`;if(process.env.CLAUDE_CODE_ENTRYPOINT===`sdk-py`)return`sdk-python`;if(process.env.CLAUDE_CODE_ENTRYPOINT===`sdk-cli`)return`sdk-cli`;if(process.env.CLAUDE_CODE_ENTRYPOINT===`claude-vscode`)return`claude-vscode`;if(process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`)return`local-agent`;if(process.env.CLAUDE_CODE_ENTRYPOINT===`claude-desktop`)return`claude-desktop`;let e=process.env.CLAUDE_CODE_SESSION_ACCESS_TOKEN||process.env.CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR;return process.env.CLAUDE_CODE_ENTRYPOINT===`remote`||e?`remote`:`cli`})();Ce(o);let s=process.env.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT;s===`markdown`||s===`html`?Ue(s):!o.startsWith(`sdk-`)&&o!==`claude-desktop`&&o!==`local-agent`&&o!==`remote`&&Ue(`markdown`),process.env.CLAUDE_CODE_ENVIRONMENT_KIND===`bridge`&&C(`remote-control`),U(`main_client_type_determined`),Mp(),U(`main_before_run`),await Lp(),U(`main_after_run`)}async function Ip(e,t){if(!process.stdin.isTTY&&!process.argv.includes(`mcp`)){if(t===`stream-json`)return process.stdin;process.stdin.setEncoding(`utf8`);let n=``,r=e=>{n+=e};process.stdin.on(`data`,r);let i=await yr(process.stdin,3e3);return process.stdin.off(`data`,r),i&&process.stderr.write(`Warning: no stdin data received in 3s, proceeding without it. If piping from a slow command, redirect stdin explicitly: < /dev/null to skip, or wait longer.
|
|
1073
1073
|
`),[e,n].filter(Boolean).join(`
|
|
1074
|
-
`)}return e}async function Lp(){U(`run_function_start`);function t(){let e=e=>e.long?.replace(/^--/,``)??e.short?.replace(/^-/,``)??``;return Object.assign({sortSubcommands:!0,sortOptions:!0},{compareOptions:(t,n)=>e(t).localeCompare(e(n))})}let n=new Au().configureHelp(t()).enablePositionalOptions();U(`run_commander_initialized`),n.hook(`preAction`,async e=>{U(`preAction_start`),await Promise.all([In(),wt()]),U(`preAction_after_mdm`),await zu(),U(`preAction_after_init`),m(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE)||(process.title=`claude`);let{initSinks:t}=await import(`./sinks-Bn0FK_Ab.js`);t(),U(`preAction_after_sinks`);let n=e.getOptionValue(`pluginDir`);Array.isArray(n)&&n.length>0&&n.every(e=>typeof e==`string`)&&(ze(n),wo(`preAction: --plugin-dir inline plugins`)),Dp(),U(`preAction_after_migrations`),mi(),Ii(),U(`preAction_after_remote_settings`),U(`preAction_after_settings_sync`)}),n.name(`claude`).description(`Claude Code - starts an interactive session by default, use -p/--print for non-interactive output`).argument(`[prompt]`,`Your prompt`,String).helpOption(`-h, --help`,`Display help for command`).option(`-d, --debug [filter]`,`Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file")`,e=>!0).addOption(new J(`--debug-to-stderr`,`Enable debug mode (to stderr)`).argParser(Boolean).hideHelp()).option(`--debug-file <path>`,`Write debug logs to a specific file path (implicitly enables debug mode)`,()=>!0).option(`--verbose`,`Override verbose mode setting from config`,()=>!0).option(`-p, --print`,`Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when Claude is run with the -p mode. Only use this flag in directories you trust.`,()=>!0).option(`--bare`,`Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CLAUDE.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials. Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file], --append-system-prompt[-file], --add-dir (CLAUDE.md dirs), --mcp-config, --settings, --agents, --plugin-dir.`,()=>!0).addOption(new J(`--init`,`Run Setup hooks with init trigger, then continue`).hideHelp()).addOption(new J(`--init-only`,`Run Setup and SessionStart:startup hooks, then exit`).hideHelp()).addOption(new J(`--maintenance`,`Run Setup hooks with maintenance trigger, then continue`).hideHelp()).addOption(new J(`--output-format <format>`,`Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming)`).choices([`text`,`json`,`stream-json`])).addOption(new J(`--json-schema <schema>`,`JSON Schema for structured output validation. Example: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}`).argParser(String)).option(`--include-hook-events`,`Include all hook lifecycle events in the output stream (only works with --output-format=stream-json)`,()=>!0).option(`--include-partial-messages`,`Include partial message chunks as they arrive (only works with --print and --output-format=stream-json)`,()=>!0).addOption(new J(`--input-format <format>`,`Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input)`).choices([`text`,`stream-json`])).option(`--mcp-debug`,`[DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors)`,()=>!0).option(`--dangerously-skip-permissions`,`Bypass all permission checks. Recommended only for sandboxes with no internet access.`,()=>!0).option(`--allow-dangerously-skip-permissions`,`Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for sandboxes with no internet access.`,()=>!0).addOption(new J(`--thinking <mode>`,`Thinking mode: enabled (equivalent to adaptive), disabled`).choices([`enabled`,`adaptive`,`disabled`]).hideHelp()).addOption(new J(`--max-thinking-tokens <tokens>`,`[DEPRECATED. Use --thinking instead for newer models] Maximum number of thinking tokens (only works with --print)`).argParser(Number).hideHelp()).addOption(new J(`--max-turns <turns>`,`Maximum number of agentic turns in non-interactive mode. This will early exit the conversation after the specified number of turns. (only works with --print)`).argParser(Number).hideHelp()).addOption(new J(`--max-budget-usd <amount>`,`Maximum dollar amount to spend on API calls (only works with --print)`).argParser(e=>{let t=Number(e);if(isNaN(t)||t<=0)throw Error(`--max-budget-usd must be a positive number greater than 0`);return t})).addOption(new J(`--task-budget <tokens>`,`API-side task budget in tokens (output_config.task_budget)`).argParser(e=>{let t=Number(e);if(isNaN(t)||t<=0||!Number.isInteger(t))throw Error(`--task-budget must be a positive integer`);return t}).hideHelp()).option(`--replay-user-messages`,`Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and --output-format=stream-json)`,()=>!0).addOption(new J(`--enable-auth-status`,`Enable auth status messages in SDK mode`).default(!1).hideHelp()).option(`--allowedTools, --allowed-tools <tools...>`,`Comma or space-separated list of tool names to allow (e.g. "Bash(git:*) Edit")`).option(`--tools <tools...>`,`Specify the list of available tools from the built-in set. Use "" to disable all tools, "default" to use all tools, or specify tool names (e.g. "Bash,Edit,Read").`).option(`--disallowedTools, --disallowed-tools <tools...>`,`Comma or space-separated list of tool names to deny (e.g. "Bash(git:*) Edit")`).option(`--mcp-config <configs...>`,`Load MCP servers from JSON files or strings (space-separated)`).addOption(new J(`--permission-prompt-tool <tool>`,`MCP tool to use for permission prompts (only works with --print)`).argParser(String).hideHelp()).addOption(new J(`--system-prompt <prompt>`,`System prompt to use for the session`).argParser(String)).addOption(new J(`--system-prompt-file <file>`,`Read system prompt from a file`).argParser(String).hideHelp()).addOption(new J(`--append-system-prompt <prompt>`,`Append a system prompt to the default system prompt`).argParser(String)).addOption(new J(`--append-system-prompt-file <file>`,`Read system prompt from a file and append to the default system prompt`).argParser(String).hideHelp()).addOption(new J(`--permission-mode <mode>`,`Permission mode to use for the session`).argParser(String).choices(ti)).option(`-c, --continue`,`Continue the most recent conversation in the current directory`,()=>!0).option(`-r, --resume [value]`,`Resume a conversation by session ID, or open interactive picker with optional search term`,e=>e||!0).option(`--fork-session`,`When resuming, create a new session ID instead of reusing the original (use with --resume or --continue)`,()=>!0).addOption(new J(`--prefill <text>`,`Pre-fill the prompt input with text without submitting it`).hideHelp()).addOption(new J(`--deep-link-origin`,`Signal that this session was launched from a deep link`).hideHelp()).addOption(new J(`--deep-link-repo <slug>`,`Repo slug the deep link ?repo= parameter resolved to the current cwd`).hideHelp()).addOption(new J(`--deep-link-last-fetch <ms>`,`FETCH_HEAD mtime in epoch ms, precomputed by the deep link trampoline`).argParser(e=>{let t=Number(e);return Number.isFinite(t)?t:void 0}).hideHelp()).option(`--from-pr [value]`,`Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term`,e=>e||!0).option(`--no-session-persistence`,`Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print)`).addOption(new J(`--resume-session-at <message id>`,`When resuming, only messages up to and including the assistant message with <message.id> (use with --resume in print mode)`).argParser(String).hideHelp()).addOption(new J(`--rewind-files <user-message-id>`,`Restore files to state at the specified user message and exit (requires --resume)`).hideHelp()).option(`--model <model>`,`Model for the current session. Provide an alias for the latest model (e.g. 'sonnet' or 'opus') or a model's full name (e.g. 'claude-sonnet-4-6').`).addOption(new J(`--effort <level>`,`Effort level for the current session (low, medium, high, max)`).argParser(e=>{let t=e.toLowerCase(),n=[`low`,`medium`,`high`,`max`];if(!n.includes(t))throw new Ou(`It must be one of: ${n.join(`, `)}`);return t})).option(`--agent <agent>`,`Agent for the current session. Overrides the 'agent' setting.`).option(`--betas <betas...>`,`Beta headers to include in API requests (API key users only)`).option(`--fallback-model <model>`,`Enable automatic fallback to specified model when default model is overloaded (only works with --print)`).addOption(new J(`--workload <tag>`,`Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)`).hideHelp()).option(`--settings <file-or-json>`,`Path to a settings JSON file or a JSON string to load additional settings from`).option(`--add-dir <directories...>`,`Additional directories to allow tool access to`).option(`--ide`,`Automatically connect to IDE on startup if exactly one valid IDE is available`,()=>!0).option(`--strict-mcp-config`,`Only use MCP servers from --mcp-config, ignoring all other MCP configurations`,()=>!0).option(`--session-id <uuid>`,`Use a specific session ID for the conversation (must be a valid UUID)`).option(`-n, --name <name>`,`Set a display name for this session (shown in /resume and terminal title)`).option(`--agents <json>`,`JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option(`--setting-sources <sources>`,`Comma-separated list of setting sources to load (user, project, local).`).option(`--plugin-dir <path>`,`Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)`,(e,t)=>[...t,e],[]).option(`--disable-slash-commands`,`Disable all skills`,()=>!0).option(`--chrome`,`Enable Claude in Chrome integration`).option(`--no-chrome`,`Disable Claude in Chrome integration`).option(`--file <specs...>`,`File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)`).action(async(t,n)=>{U(`action_handler_start`),n.bare&&(process.env.CLAUDE_CODE_SIMPLE=`1`),t===`code`&&(B(`tengu_code_prompt_ignored`,{}),console.warn(b.yellow("Tip: You can launch Claude Code with just `claude`")),t=void 0),t&&typeof t==`string`&&!/\s/.test(t)&&t.length>0&&B(`tengu_single_word_prompt`,{length:t.length});let r=!1,i;if(n.assistant&&yp&&yp.markAssistantForced(),yp&&(yp.isAssistantForced()||n.assistant===!0)&&!n.agentId&&bp){if(!ln())console.warn(b.yellow(`Assistant mode disabled: directory is not trusted. Accept the trust dialog and restart.`));else if(r=yp.isAssistantForced()||await bp.isKairosEnabled(),r){let e=n;e.brief=!0,Me(!0),i=await yp.initializeAssistantTeam()}}let{debug:a=!1,debugToStderr:o=!1,dangerouslySkipPermissions:s,allowDangerouslySkipPermissions:l=!1,tools:u=[],allowedTools:d=[],disallowedTools:f=[],mcpConfig:p=[],permissionMode:ee,addDir:h=[],fallbackModel:g,betas:te=[],ide:ne=!1,sessionId:re,includeHookEvents:_,includePartialMessages:ie}=n;n.prefill&&Ql(n.prefill);let ae,oe=n.agents,se=n.agent;se&&(process.env.CLAUDE_CODE_AGENT=se);let v=n.outputFormat,y=n.inputFormat,ce=n.verbose??j().verbose,le=n.print,ue=n.init??!1,de=n.initOnly??!1,fe=n.maintenance??!1,pe=n.disableSlashCommands||!1,me=process.env.USER_TYPE===`ant`&&n.tasks,he=me?typeof me==`string`?me:cl:void 0;process.env.USER_TYPE===`ant`&&he&&(process.env.CLAUDE_CODE_TASK_LIST_ID=he);let ge=Cl()?n.worktree:void 0,_e=typeof ge==`string`?ge:void 0,ve=ge!==void 0,ye;if(_e){let e=pa(_e);e!==null&&(ye=e,_e=void 0)}let be=Cl()&&n.tmux===!0;be&&(ve||(process.stderr.write(b.red(`Error: --tmux requires --worktree
|
|
1074
|
+
`)}return e}async function Lp(){U(`run_function_start`);function t(){let e=e=>e.long?.replace(/^--/,``)??e.short?.replace(/^-/,``)??``;return Object.assign({sortSubcommands:!0,sortOptions:!0},{compareOptions:(t,n)=>e(t).localeCompare(e(n))})}let n=new Au().configureHelp(t()).enablePositionalOptions();U(`run_commander_initialized`),n.hook(`preAction`,async e=>{U(`preAction_start`),await Promise.all([In(),wt()]),U(`preAction_after_mdm`),await zu(),U(`preAction_after_init`),m(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE)||(process.title=`claude`);let{initSinks:t}=await import(`./sinks-BCl9slVM.js`);t(),U(`preAction_after_sinks`);let n=e.getOptionValue(`pluginDir`);Array.isArray(n)&&n.length>0&&n.every(e=>typeof e==`string`)&&(ze(n),wo(`preAction: --plugin-dir inline plugins`)),Dp(),U(`preAction_after_migrations`),mi(),Ii(),U(`preAction_after_remote_settings`),U(`preAction_after_settings_sync`)}),n.name(`claude`).description(`Claude Code - starts an interactive session by default, use -p/--print for non-interactive output`).argument(`[prompt]`,`Your prompt`,String).helpOption(`-h, --help`,`Display help for command`).option(`-d, --debug [filter]`,`Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file")`,e=>!0).addOption(new J(`--debug-to-stderr`,`Enable debug mode (to stderr)`).argParser(Boolean).hideHelp()).option(`--debug-file <path>`,`Write debug logs to a specific file path (implicitly enables debug mode)`,()=>!0).option(`--verbose`,`Override verbose mode setting from config`,()=>!0).option(`-p, --print`,`Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when Claude is run with the -p mode. Only use this flag in directories you trust.`,()=>!0).option(`--bare`,`Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CLAUDE.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials. Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file], --append-system-prompt[-file], --add-dir (CLAUDE.md dirs), --mcp-config, --settings, --agents, --plugin-dir.`,()=>!0).addOption(new J(`--init`,`Run Setup hooks with init trigger, then continue`).hideHelp()).addOption(new J(`--init-only`,`Run Setup and SessionStart:startup hooks, then exit`).hideHelp()).addOption(new J(`--maintenance`,`Run Setup hooks with maintenance trigger, then continue`).hideHelp()).addOption(new J(`--output-format <format>`,`Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming)`).choices([`text`,`json`,`stream-json`])).addOption(new J(`--json-schema <schema>`,`JSON Schema for structured output validation. Example: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}`).argParser(String)).option(`--include-hook-events`,`Include all hook lifecycle events in the output stream (only works with --output-format=stream-json)`,()=>!0).option(`--include-partial-messages`,`Include partial message chunks as they arrive (only works with --print and --output-format=stream-json)`,()=>!0).addOption(new J(`--input-format <format>`,`Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input)`).choices([`text`,`stream-json`])).option(`--mcp-debug`,`[DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors)`,()=>!0).option(`--dangerously-skip-permissions`,`Bypass all permission checks. Recommended only for sandboxes with no internet access.`,()=>!0).option(`--allow-dangerously-skip-permissions`,`Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for sandboxes with no internet access.`,()=>!0).addOption(new J(`--thinking <mode>`,`Thinking mode: enabled (equivalent to adaptive), disabled`).choices([`enabled`,`adaptive`,`disabled`]).hideHelp()).addOption(new J(`--max-thinking-tokens <tokens>`,`[DEPRECATED. Use --thinking instead for newer models] Maximum number of thinking tokens (only works with --print)`).argParser(Number).hideHelp()).addOption(new J(`--max-turns <turns>`,`Maximum number of agentic turns in non-interactive mode. This will early exit the conversation after the specified number of turns. (only works with --print)`).argParser(Number).hideHelp()).addOption(new J(`--max-budget-usd <amount>`,`Maximum dollar amount to spend on API calls (only works with --print)`).argParser(e=>{let t=Number(e);if(isNaN(t)||t<=0)throw Error(`--max-budget-usd must be a positive number greater than 0`);return t})).addOption(new J(`--task-budget <tokens>`,`API-side task budget in tokens (output_config.task_budget)`).argParser(e=>{let t=Number(e);if(isNaN(t)||t<=0||!Number.isInteger(t))throw Error(`--task-budget must be a positive integer`);return t}).hideHelp()).option(`--replay-user-messages`,`Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and --output-format=stream-json)`,()=>!0).addOption(new J(`--enable-auth-status`,`Enable auth status messages in SDK mode`).default(!1).hideHelp()).option(`--allowedTools, --allowed-tools <tools...>`,`Comma or space-separated list of tool names to allow (e.g. "Bash(git:*) Edit")`).option(`--tools <tools...>`,`Specify the list of available tools from the built-in set. Use "" to disable all tools, "default" to use all tools, or specify tool names (e.g. "Bash,Edit,Read").`).option(`--disallowedTools, --disallowed-tools <tools...>`,`Comma or space-separated list of tool names to deny (e.g. "Bash(git:*) Edit")`).option(`--mcp-config <configs...>`,`Load MCP servers from JSON files or strings (space-separated)`).addOption(new J(`--permission-prompt-tool <tool>`,`MCP tool to use for permission prompts (only works with --print)`).argParser(String).hideHelp()).addOption(new J(`--system-prompt <prompt>`,`System prompt to use for the session`).argParser(String)).addOption(new J(`--system-prompt-file <file>`,`Read system prompt from a file`).argParser(String).hideHelp()).addOption(new J(`--append-system-prompt <prompt>`,`Append a system prompt to the default system prompt`).argParser(String)).addOption(new J(`--append-system-prompt-file <file>`,`Read system prompt from a file and append to the default system prompt`).argParser(String).hideHelp()).addOption(new J(`--permission-mode <mode>`,`Permission mode to use for the session`).argParser(String).choices(ti)).option(`-c, --continue`,`Continue the most recent conversation in the current directory`,()=>!0).option(`-r, --resume [value]`,`Resume a conversation by session ID, or open interactive picker with optional search term`,e=>e||!0).option(`--fork-session`,`When resuming, create a new session ID instead of reusing the original (use with --resume or --continue)`,()=>!0).addOption(new J(`--prefill <text>`,`Pre-fill the prompt input with text without submitting it`).hideHelp()).addOption(new J(`--deep-link-origin`,`Signal that this session was launched from a deep link`).hideHelp()).addOption(new J(`--deep-link-repo <slug>`,`Repo slug the deep link ?repo= parameter resolved to the current cwd`).hideHelp()).addOption(new J(`--deep-link-last-fetch <ms>`,`FETCH_HEAD mtime in epoch ms, precomputed by the deep link trampoline`).argParser(e=>{let t=Number(e);return Number.isFinite(t)?t:void 0}).hideHelp()).option(`--from-pr [value]`,`Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term`,e=>e||!0).option(`--no-session-persistence`,`Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print)`).addOption(new J(`--resume-session-at <message id>`,`When resuming, only messages up to and including the assistant message with <message.id> (use with --resume in print mode)`).argParser(String).hideHelp()).addOption(new J(`--rewind-files <user-message-id>`,`Restore files to state at the specified user message and exit (requires --resume)`).hideHelp()).option(`--model <model>`,`Model for the current session. Provide an alias for the latest model (e.g. 'sonnet' or 'opus') or a model's full name (e.g. 'claude-sonnet-4-6').`).addOption(new J(`--effort <level>`,`Effort level for the current session (low, medium, high, max)`).argParser(e=>{let t=e.toLowerCase(),n=[`low`,`medium`,`high`,`max`];if(!n.includes(t))throw new Ou(`It must be one of: ${n.join(`, `)}`);return t})).option(`--agent <agent>`,`Agent for the current session. Overrides the 'agent' setting.`).option(`--betas <betas...>`,`Beta headers to include in API requests (API key users only)`).option(`--fallback-model <model>`,`Enable automatic fallback to specified model when default model is overloaded (only works with --print)`).addOption(new J(`--workload <tag>`,`Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)`).hideHelp()).option(`--settings <file-or-json>`,`Path to a settings JSON file or a JSON string to load additional settings from`).option(`--add-dir <directories...>`,`Additional directories to allow tool access to`).option(`--ide`,`Automatically connect to IDE on startup if exactly one valid IDE is available`,()=>!0).option(`--strict-mcp-config`,`Only use MCP servers from --mcp-config, ignoring all other MCP configurations`,()=>!0).option(`--session-id <uuid>`,`Use a specific session ID for the conversation (must be a valid UUID)`).option(`-n, --name <name>`,`Set a display name for this session (shown in /resume and terminal title)`).option(`--agents <json>`,`JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option(`--setting-sources <sources>`,`Comma-separated list of setting sources to load (user, project, local).`).option(`--plugin-dir <path>`,`Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)`,(e,t)=>[...t,e],[]).option(`--disable-slash-commands`,`Disable all skills`,()=>!0).option(`--chrome`,`Enable Claude in Chrome integration`).option(`--no-chrome`,`Disable Claude in Chrome integration`).option(`--file <specs...>`,`File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)`).action(async(t,n)=>{U(`action_handler_start`),n.bare&&(process.env.CLAUDE_CODE_SIMPLE=`1`),t===`code`&&(B(`tengu_code_prompt_ignored`,{}),console.warn(b.yellow("Tip: You can launch Claude Code with just `claude`")),t=void 0),t&&typeof t==`string`&&!/\s/.test(t)&&t.length>0&&B(`tengu_single_word_prompt`,{length:t.length});let r=!1,i;if(n.assistant&&yp&&yp.markAssistantForced(),yp&&(yp.isAssistantForced()||n.assistant===!0)&&!n.agentId&&bp){if(!ln())console.warn(b.yellow(`Assistant mode disabled: directory is not trusted. Accept the trust dialog and restart.`));else if(r=yp.isAssistantForced()||await bp.isKairosEnabled(),r){let e=n;e.brief=!0,Me(!0),i=await yp.initializeAssistantTeam()}}let{debug:a=!1,debugToStderr:o=!1,dangerouslySkipPermissions:s,allowDangerouslySkipPermissions:l=!1,tools:u=[],allowedTools:d=[],disallowedTools:f=[],mcpConfig:p=[],permissionMode:ee,addDir:h=[],fallbackModel:g,betas:te=[],ide:ne=!1,sessionId:re,includeHookEvents:_,includePartialMessages:ie}=n;n.prefill&&Ql(n.prefill);let ae,oe=n.agents,se=n.agent;se&&(process.env.CLAUDE_CODE_AGENT=se);let v=n.outputFormat,y=n.inputFormat,ce=n.verbose??j().verbose,le=n.print,ue=n.init??!1,de=n.initOnly??!1,fe=n.maintenance??!1,pe=n.disableSlashCommands||!1,me=process.env.USER_TYPE===`ant`&&n.tasks,he=me?typeof me==`string`?me:cl:void 0;process.env.USER_TYPE===`ant`&&he&&(process.env.CLAUDE_CODE_TASK_LIST_ID=he);let ge=Cl()?n.worktree:void 0,_e=typeof ge==`string`?ge:void 0,ve=ge!==void 0,ye;if(_e){let e=pa(_e);e!==null&&(ye=e,_e=void 0)}let be=Cl()&&n.tmux===!0;be&&(ve||(process.stderr.write(b.red(`Error: --tmux requires --worktree
|
|
1075
1075
|
`)),process.exit(1)),zr()===`windows`&&(process.stderr.write(b.red(`Error: --tmux is not supported on Windows
|
|
1076
1076
|
`)),process.exit(1)),await Pa()||(process.stderr.write(b.red(`Error: tmux is not installed.\n${Da()}\n`)),process.exit(1)));let x;if(mn()){let e=Hp(n);x=e;let t=e.agentId||e.agentName||e.teamName,r=e.agentId&&e.agentName&&e.teamName;t&&!r&&(process.stderr.write(b.red(`Error: --agent-id, --agent-name, and --team-name must all be provided together
|
|
1077
1077
|
`)),process.exit(1)),e.agentId&&e.agentName&&e.teamName&&hp().setDynamicTeamContext?.({agentId:e.agentId,agentName:e.agentName,teamName:e.teamName,color:e.agentColor,planModeRequired:e.planModeRequired??!1,parentSessionId:e.parentSessionId}),e.teammateMode&&_p().setCliTeammateModeOverride?.(e.teammateMode)}let xe=n.sdkUrl??void 0,Se=ie||m(process.env.CLAUDE_CODE_INCLUDE_PARTIAL_MESSAGES);(_||m(process.env.CLAUDE_CODE_REMOTE))&&na(!0),xe&&(y||(y=`stream-json`),v||(v=`stream-json`),n.verbose===void 0&&(ce=!0),n.print||(le=!0));let S=n.teleport??null,Ce=n.remote,Te=Ce===!0?``:Ce??null,De=n.remoteControl??n.rc,je=!1,Ne=typeof De==`string`&&De.length>0?De:void 0;if(re&&((n.continue||n.resume)&&!n.forkSession&&(process.stderr.write(b.red(`Error: --session-id can only be used with --continue or --resume if --fork-session is also specified.
|
|
@@ -1081,28 +1081,28 @@ Usage: claude mcp add <name> <command> [args...]`);try{let t=Mi(r.scope),n=qi(r.
|
|
|
1081
1081
|
`)),process.exit(1));let ze=n.systemPrompt;if(n.systemPromptFile){n.systemPrompt&&(process.stderr.write(b.red(`Error: Cannot use both --system-prompt and --system-prompt-file. Please use only one.
|
|
1082
1082
|
`)),process.exit(1));try{ze=fu(lu(n.systemPromptFile),`utf8`)}catch(e){er(e)===`ENOENT`&&(process.stderr.write(b.red(`Error: System prompt file not found: ${lu(n.systemPromptFile)}\n`)),process.exit(1)),process.stderr.write(b.red(`Error reading system prompt file: ${L(e)}\n`)),process.exit(1)}}let w=n.appendSystemPrompt;if(n.appendSystemPromptFile){n.appendSystemPrompt&&(process.stderr.write(b.red(`Error: Cannot use both --append-system-prompt and --append-system-prompt-file. Please use only one.
|
|
1083
1083
|
`)),process.exit(1));try{w=fu(lu(n.appendSystemPromptFile),`utf8`)}catch(e){er(e)===`ENOENT`&&(process.stderr.write(b.red(`Error: Append system prompt file not found: ${lu(n.appendSystemPromptFile)}\n`)),process.exit(1)),process.stderr.write(b.red(`Error reading append system prompt file: ${L(e)}\n`)),process.exit(1)}}if(mn()&&x?.agentId&&x?.agentName&&x?.teamName){let e=gp().TEAMMATE_SYSTEM_PROMPT_ADDENDUM;w=w?`${w}\n\n${e}`:e}let{mode:Be,notification:Ve}=ja({permissionModeCli:ee,dangerouslySkipPermissions:s});it(Be===`bypassPermissions`),(n.enableAutoMode||ee===`auto`||Be===`auto`||!ee&&as())&&xp?.setAutoModeFlagCli(!0);let T={"mcp-chrome":{type:`http`,url:`http://127.0.0.1:12306/mcp`,scope:`dynamic`,headers:{Authorization:`Bearer my-static-token`}}};if(p&&p.length>0){let e=p.map(e=>e.trim()).filter(e=>e.length>0),t={},n=[];for(let r of e){let e=null,i=[],a=Wr(r);if(a){let t=uo({configObject:a,filePath:`command line`,expandVars:!0,scope:`dynamic`});t.config?e=t.config.mcpServers:i=t.errors}else{let t=dc({filePath:lu(r),expandVars:!0,scope:`dynamic`});t.config?e=t.config.mcpServers:i=t.errors}i.length>0?n.push(...i):e&&(t={...t,...e})}if(n.length>0){let e=n.map(e=>`${e.path?e.path+`: `:``}${e.message}`).join(`
|
|
1084
|
-
`);R(`--mcp-config validation failed (${n.length} errors): ${e}`,{level:`error`}),process.stderr.write(`Error: Invalid MCP configuration:\n${e}\n`),process.exit(1)}if(Object.keys(t).length>0){let e=Object.entries(t).filter(([,e])=>e.type!==`sdk`).map(([e])=>e),n=null;if(e.some(yl))n=`Invalid MCP configuration: "${bl}" is a reserved MCP name.`;else{let{isComputerUseMCPServer:t,COMPUTER_USE_MCP_SERVER_NAME:r}=await import(`./common-B_BC3eMY.js`);e.some(t)&&(n=`Invalid MCP configuration: "${r}" is a reserved MCP name.`)}n&&(process.stderr.write(`Error: ${n}\n`),process.exit(1));let{allowed:r,blocked:i}=fs(Ft(t,e=>({...e,scope:`dynamic`})));i.length>0&&process.stderr.write(`Warning: MCP ${It(i.length,`server`)} blocked by enterprise policy: ${i.join(`, `)}\n`),T={...T,...r}}}let He=n;Ge(He.chrome);let Ue=Hl(He.chrome)&&(process.env.USER_TYPE===`ant`||on()),Xe=!Ue&&Ul();if(Ue){let e=zr();try{B(`tengu_claude_in_chrome_setup`,{platform:e});let{mcpConfig:t,allowedTools:n,systemPrompt:r}=Wl();T={...T,...t},d.push(...n),r&&(w=w?`${r}\n\n${w}`:r)}catch(t){B(`tengu_claude_in_chrome_setup_failed`,{platform:e}),R(`[Claude in Chrome] Error: ${t}`),H(t),console.error(`Error: Failed to run with Claude in Chrome.`),process.exit(1)}}else if(Xe)try{let{mcpConfig:e}=Wl();T={...T,...e};let t=Dl;w=w?`${w}\n\n${t}`:t}catch(e){R(`[Claude in Chrome] Error (auto-enable): ${e}`)}let et=n.strictMcpConfig||!1;if(Do()&&(et&&(process.stderr.write(b.red(`You cannot use --strict-mcp-config when an enterprise MCP config is present`)),process.exit(1)),T&&!Os(T)&&(process.stderr.write(b.red(`You cannot dynamically configure MCP servers when an enterprise MCP config is present`)),process.exit(1))),zr()!==`unknown`&&!Re())try{let{getChicagoEnabled:e}=await import(`./gates-D-kXXHiv.js`);if(e()){let{setupComputerUseMCP:e}=await import(`./setup-p04XtwYu.js`),{mcpConfig:t,allowedTools:n}=e();T={...T,...t},d.push(...n)}}catch(e){R(`[Computer Use MCP] Setup failed: ${L(e)}`)}we(h);let tt,rt=(e,t)=>{let n=[],r=[];for(let t of e)if(t.startsWith(`plugin:`)){let e=t.slice(7),i=e.indexOf(`@`);i<=0||i===e.length-1?r.push(t):n.push({kind:`plugin`,name:e.slice(0,i),marketplace:e.slice(i+1)})}else t.startsWith(`server:`)&&t.length>7?n.push({kind:`server`,name:t.slice(7)}):r.push(t);return r.length>0&&(process.stderr.write(b.red(`${t} entries must be tagged: ${r.join(`, `)}\n plugin:<name>@<marketplace> — plugin-provided channel (allowlist enforced)\n server:<name> — manually configured MCP server\n`)),process.exit(1)),n},ot=n,E=ot.channels,lt=ot.dangerouslyLoadDevelopmentChannels,pt=[];if(E&&E.length>0&&(pt=rt(E,`--channels`),Le(pt)),C||lt&<.length>0&&(tt=rt(lt,`--dangerously-load-development-channels`)),pt.length>0||(tt?.length??0)>0){let e=e=>{let t=e.flatMap(e=>e.kind===`plugin`?[`${e.name}@${e.marketplace}`]:[]);return t.length>0?t.sort().join(`,`):void 0};B(`tengu_mcp_channel_flags`,{channels_count:pt.length,dev_count:tt?.length??0,plugins:e(pt),dev_plugins:e(tt??[])})}if(u.length>0){let{BRIEF_TOOL_NAME:t,LEGACY_BRIEF_TOOL_NAME:n}=(Ct(),e(kn)),{isBriefEntitled:r}=(zo(),e(si)),i=li(u);(i.includes(t)||i.includes(n))&&r()&&Ke(!0)}let ht=await Ti({allowedToolsCli:d,disallowedToolsCli:f,baseToolsCli:u,permissionMode:Be,allowDangerouslySkipPermissions:l,addDirs:h}),D=ht.toolPermissionContext,{warnings:gt,dangerousPermissions:_t,overlyBroadBashPermissions:yt}=ht;if(process.env.USER_TYPE===`ant`&&yt.length>0){for(let e of yt)R(`Ignoring overly broad shell permission ${e.ruleDisplay} from ${e.sourceDisplay}`);D=ia(D,yt)}_t.length>0&&(D=ga(D)),gt.forEach(e=>{console.error(e)});let bt=C&&!et&&!Do()&&!c()?ka().then(e=>{let{allowed:t,blocked:n}=fs(e);return n.length>0&&process.stderr.write(`Warning: claude.ai MCP ${It(n.length,`server`)} blocked by enterprise policy: ${n.join(`, `)}\n`),t}):Promise.resolve({});R(`[STARTUP] Loading MCP configs...`);let xt=Date.now(),wt,Tt=(et||c()?Promise.resolve({servers:{}}):Mo(T)).then(e=>(wt=Date.now()-xt,e));y&&y!==`text`&&y!==`stream-json`&&(console.error(`Error: Invalid input format "${y}".`),process.exit(1)),y===`stream-json`&&v!==`stream-json`&&(console.error(`Error: --input-format=stream-json requires output-format=stream-json.`),process.exit(1)),xe&&(y!==`stream-json`||v!==`stream-json`)&&(console.error(`Error: --sdk-url requires both --input-format=stream-json and --output-format=stream-json.`),process.exit(1)),n.replayUserMessages&&(y!==`stream-json`||v!==`stream-json`)&&(console.error(`Error: --replay-user-messages requires both --input-format=stream-json and --output-format=stream-json.`),process.exit(1)),Se&&(!C||v!==`stream-json`)&&(_r(`Error: --include-partial-messages requires --print and --output-format=stream-json.`),process.exit(1)),n.sessionPersistence===!1&&!C&&(_r(`Error: --no-session-persistence can only be used with --print mode.`),process.exit(1));let O=await Ip(t||``,y??`text`);U(`action_after_input_prompt`),zp(n);let Et=Xi(D);if(m(process.env.CLAUDE_CODE_COORDINATOR_MODE)){let{applyCoordinatorToolFilter:e}=await import(`./toolPool-C4CO158z.js`);Et=e(Et)}U(`action_tools_loaded`);let k;if(qc({isNonInteractiveSession:C})&&n.jsonSchema&&(k=tr(n.jsonSchema)),k){let e=Hc(k);`tool`in e?(Et=[...Et,e.tool],B(`tengu_structured_output_enabled`,{schema_property_count:Object.keys(k.properties||{}).length,has_required_fields:!!k.required})):B(`tengu_structured_output_failure`,{error:`Invalid JSON schema`})}U(`action_before_setup`),R(`[STARTUP] Running setup()...`);let Dt=Date.now(),{setup:Ot}=await import(`./setup-lxzmZdw5.js`),jt=gr();process.env.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&(yd(),qf());let Pt=Ot(jt,Be,l,ve,_e,be,re?Va(re):void 0,ye,void 0),Lt=ve?null:Ni(jt),Rt=ve?null:$o(jt);Lt?.catch(()=>{}),Rt?.catch(()=>{}),await Pt,R(`[STARTUP] setup() completed in ${Date.now()-Dt}ms`),U(`action_after_setup`);let zt=!!n.replayUserMessages;Re()&&(io(),so(),lc(),st());let Bt=n.name?.trim();Bt&&ro(Bt);let Vt=n.model||process.env.ANTHROPIC_MODEL;process.env.USER_TYPE===`ant`&&Vt&&Vt!==`default`&&!Vn(`tengu_ant_model_override`)&&j().cachedGrowthBookFeatures?.tengu_ant_model_override==null&&await dt();let Ut=n.model===`default`?ft():n.model,Wt=g===`default`?ft():g,Gt=ve?gr():jt;R(`[STARTUP] Loading commands and agents...`);let Kt=Date.now(),[qt,Jt]=await Promise.all([Lt??Ni(Gt),Rt??$o(Gt)]);R(`[STARTUP] Commands and agents loaded in ${Date.now()-Kt}ms`),U(`action_commands_loaded`);let Yt=[];if(oe)try{let e=Wr(oe);e&&(Yt=ks(e,`flagSettings`))}catch(e){H(e)}let Zt=[...Jt.allAgents,...Yt],Qt={...Jt,allAgents:Zt,activeAgents:Bs(Zt)},$t=se??St().agent,M;if($t&&(M=Qt.activeAgents.find(e=>e.agentType===$t),M||R(`Warning: agent "${$t}" not found. Available agents: ${Qt.activeAgents.map(e=>e.agentType).join(`, `)}. Using default behavior.`)),Je(M?.agentType),M&&B(`tengu_agent_flag`,{agentType:Ws(M)?M.agentType:`custom`,...se&&{source:`cli`}}),M?.agentType&&Yo(M.agentType),C&&M&&!ze&&!Ws(M)){let e=M.getSystemPrompt();e&&(ze=e)}M?.initialPrompt&&(typeof O==`string`?O=O?`${M.initialPrompt}\n\n${O}`:M.initialPrompt:O||(O=M.initialPrompt));let en=Ut;!en&&M?.model&&M.model!==`inherit`&&(en=ut(M.model)),Qe(en),Ae(At()||null);let tn=at(),nn=ut(tn??ft()),an;if(ci()){let e=$a()?n.advisor:void 0;e&&(R(`[AdvisorTool] --advisor ${e}`),Zs(nn)||(process.stderr.write(b.red(`Error: The model "${nn}" does not support the advisor tool.\n`)),process.exit(1)),Lo(Yn(ut(e)))||(process.stderr.write(b.red(`Error: The model "${e}" cannot be used as an advisor.\n`)),process.exit(1))),an=$a()?e??Ja():e,an&&R(`[AdvisorTool] Advisor model: ${an}`)}if(mn()&&x?.agentId&&x?.agentName&&x?.teamName&&x?.agentType){let e=Qt.activeAgents.find(e=>e.agentType===x.agentType);if(e){let t;if(e.source===`built-in`?R(`[teammate] Built-in agent ${x.agentType} - skipping custom prompt (not supported)`):t=e.getSystemPrompt(),e.memory&&B(`tengu_agent_memory_loaded`,{...process.env.USER_TYPE===`ant`&&{agent_type:e.agentType},scope:e.memory,source:`teammate`}),t){let e=`\n# Custom Agent Instructions\n${t}`;w=w?`${w}\n\n${e}`:e}}else R(`[teammate] Custom agent ${x.agentType} not found in available agents`)}if(Bp(n),!Re()&&!Ze()&&St().defaultView===`chat`){let{isBriefEntitled:t}=(zo(),e(si));t()&&Ke(!0)}if((n.proactive||m(process.env.CLAUDE_CODE_PROACTIVE))&&!vp?.isCoordinatorMode()){let t=`\n# Proactive Mode\n\nYou are in proactive mode. Take initiative — explore, act, and make progress without waiting for instructions.\n\nStart by briefly greeting the user.\n\nYou will receive periodic <tick> prompts. These are check-ins. Do whatever seems most useful, or call Sleep if there's nothing to do. ${(zo(),e(si)).isBriefEnabled()?`Call SendUserMessage at checkpoints to mark where things stand.`:`The user will see any text you output.`}`;w=w?`${w}\n\n${t}`:t}if(r&&yp){let e=yp.getAssistantSystemPromptAddendum();w=w?`${w}\n\n${e}`:e}let N,sn,un;if(!C){let e=dd(!1);sn=e.getFpsMetrics,un=e.stats,process.env.USER_TYPE===`ant`&&zl();let{createRoot:n}=await import(`./src-poaoYkuc.js`);N=await n(e.renderOptions),B(`tengu_timer`,{event:`startup`,durationMs:Math.round(process.uptime()*1e3)}),R(`[STARTUP] Running showSetupScreens()...`);let r=Date.now(),i=await ud(N,Be,l,qt,Ue,tt);if(R(`[STARTUP] showSetupScreens() completed in ${Date.now()-r}ms`),De!==void 0){let{getBridgeDisabledReason:e}=await import(`./bridgeEnabled-C7AI9y8g.js`),t=await e();je=t===null,t&&process.stderr.write(b.yellow(`${t}\n--rc flag ignored.\n`))}i&&t?.trim().toLowerCase()===`/login`&&(t=``),i&&(Ba(),La(),qn(),Ht(),import(`./trustedDevice-u2HpuTkN.js`).then(e=>(e.clearTrustedDeviceToken(),e.enrollTrustedDevice())));let a=await kt();a.valid||await X(N,a.message)}if(process.exitCode!==void 0){R(`Graceful shutdown initiated, skipping further initialization`);return}if(Jo(),!C){let{errors:e}=cn(),t=e.filter(e=>!e.mcpErrorMetadata);t.length>0&&await fd(N,{settingsErrors:t,onExit:()=>va(1)})}let dn=Xt(`tengu_cicada_nap_ms`,0),pn=j().startupPrefetchedAt??0;c()||dn>0&&Date.now()-pn<dn?(R(`Skipping startup prefetches, last ran ${Math.round((Date.now()-pn)/1e3)}s ago`),Nt()):(R(`Starting background startup prefetches${pn>0?` last ran ${Math.round((Date.now()-pn)/1e3)}s ago`:``}`),rs().catch(e=>H(e)),Ku(),xl(),Xt(`tengu_miraculo_the_bard`,!1)?Nt():mt(),dn>0&&A(e=>({...e,startupPrefetchedAt:Date.now()}))),C||ru();let{servers:hn}=await Tt;R(`[STARTUP] MCP configs resolved in ${wt}ms (awaited at +${Date.now()-xt}ms)`);let gn={...hn,...T},_n={},vn={};for(let[e,t]of Object.entries(gn)){let n=t;n.type===`sdk`?_n[e]=n:vn[e]=n}U(`action_mcp_configs_loaded`);let P=C?Promise.resolve({clients:[],tools:[],commands:[]}):fi(vn),yn=C?Promise.resolve({clients:[],tools:[],commands:[]}):bt.then(e=>Object.keys(e).length>0?fi(e):{clients:[],tools:[],commands:[]}),bn=Promise.all([P,yn]).then(([e,t])=>({clients:[...e.clients,...t.clients],tools:rn([...e.tools,...t.tools],`name`),commands:rn([...e.commands,...t.commands],`name`)})),xn=de||ue||fe||C||n.continue||n.resume?null:cs(`startup`,{agentType:M?.agentType,model:nn}),Sn=[];bn.catch(()=>{});let Cn=[],wn=[],F=[],Tn=oo(),I=Tn===!1?{type:`disabled`}:{type:`adaptive`};if(n.thinking===`adaptive`||n.thinking===`enabled`)Tn=!0,I={type:`adaptive`};else if(n.thinking===`disabled`)Tn=!1,I={type:`disabled`};else{let e=process.env.MAX_THINKING_TOKENS?parseInt(process.env.MAX_THINKING_TOKENS,10):n.maxThinkingTokens;e!==void 0&&(e>0?(Tn=!0,I={type:`enabled`,budgetTokens:e}):e===0&&(Tn=!1,I={type:`disabled`}))}V(`info`,`started`,{version:`2.6.10`,is_native_binary:Ar()}),ir(async()=>{V(`info`,`exited`)}),Rp({hasInitialPrompt:!!t,hasStdin:!!O,verbose:ce,debug:a,debugToStderr:o,print:le??!1,outputFormat:v??`text`,inputFormat:y??`text`,numAllowedTools:d.length,numDisallowedTools:f.length,mcpClientCount:Object.keys(gn).length,worktreeEnabled:ve,skipWebFetchPreflight:St().skipWebFetchPreflight,githubActionInputs:process.env.GITHUB_ACTION_INPUTS,dangerouslySkipPermissionsPassed:s??!1,permissionMode:Be,modeIsBypass:Be===`bypassPermissions`,allowDangerouslySkipPermissionsPassed:l,systemPromptFlag:ze?n.systemPromptFile?`file`:`flag`:void 0,appendSystemPromptFlag:w?n.appendSystemPromptFile?`file`:`flag`:void 0,thinkingConfig:I,assistantActivationPath:r?yp?.getAssistantActivationPath():void 0}),To(vn,D),Ci(null,`initialization`),Sp(),rc().then(e=>{e&&(Bt&&Ms(Bt),Ks().then(e=>{e>=2&&B(`tengu_concurrent_sessions`,{num_sessions:e})}))}),c()||(C?(await wi(),U(`action_after_plugins_init`),xo().then(()=>Ai())):wi().then(async()=>{U(`action_after_plugins_init`),await xo(),Ai()}));let En=de||ue?`init`:fe?`maintenance`:null;if(de){io(),await di(`init`,{forceSyncExecution:!0}),await cs(`startup`,{forceSyncExecution:!0}),va(0);return}if(C){(v===`stream-json`||v===`json`)&&or(!0),io(),Bu();let e=n.continue||n.resume||S||En?void 0:cs(`startup`);e?.catch(()=>{}),U(`before_validateForceLoginOrg`);let t=await kt();t.valid||(process.stderr.write(t.message+`
|
|
1085
|
-
`),process.exit(1));let i=pe?[]:qt.filter(e=>e.type===`prompt`&&!e.disableNonInteractive||e.type===`local`&&e.supportsNonInteractive),a=Wi(),o=Sa({...a,mcp:{...a.mcp,clients:Cn,commands:F,tools:wn},toolPermissionContext:D,effortValue:Co(n.effort)??Qs(),...Un()&&{fastMode:fn(en??null)},...ci()&&an&&{advisorModel:an},kairosEnabled:r},Rl);Zi(D,o.getState().fastMode).then(({updateContext:e})=>{o.setState(t=>{let n=e(t.toolPermissionContext);return n===t.toolPermissionContext?t:{...t,toolPermissionContext:n}})}),n.sessionPersistence===!1&&nt(!0),$e(vt(te));let s=(e,t)=>Object.keys(e).length===0?Promise.resolve():(o.setState(t=>({...t,mcp:{...t.mcp,clients:[...t.mcp.clients,...Object.entries(e).map(([e,t])=>({name:e,type:`pending`,config:t}))]}})),ha(({client:e,tools:t,commands:n})=>{o.setState(r=>({...r,mcp:{...r.mcp,clients:r.mcp.clients.some(t=>t.name===e.name)?r.mcp.clients.map(t=>t.name===e.name?e:t):[...r.mcp.clients,e],tools:rn([...r.mcp.tools,...t],`name`),commands:rn([...r.mcp.commands,...n],`name`)}}))},e).catch(e=>R(`[MCP] ${t} connect error: ${e}`)));U(`before_connectMcp`),await s(vn,`regular`),U(`after_connectMcp`);let l=5e3,u=bt.then(e=>{if(Object.keys(e).length>0){let t=new Set;for(let n of Object.values(e)){let e=bs(n);e&&t.add(e)}let n=new Set;for(let[e,r]of Object.entries(vn)){if(!e.startsWith(`plugin:`))continue;let i=bs(r);i&&t.has(i)&&n.add(e)}if(n.size>0){R(`[MCP] Lazy dedup: suppressing ${n.size} plugin server(s) that duplicate claude.ai connectors: ${[...n].join(`, `)}`);for(let e of o.getState().mcp.clients)!n.has(e.name)||e.type!==`connected`||(e.client.onclose=void 0,Aa(e.name,e.config).catch(()=>{}));o.setState(e=>{let{clients:t,tools:r,commands:i,resources:a}=e.mcp;t=t.filter(e=>!n.has(e.name)),r=r.filter(e=>!e.mcpInfo||!n.has(e.mcpInfo.serverName));for(let e of n)i=Ps(i,e),a=Ui(a,e);return{...e,mcp:{...e.mcp,clients:t,tools:r,commands:i,resources:a}}})}}let{servers:t}=Js(e,ct(vn,(e,t)=>!t.startsWith(`plugin:`)));return s(t,`claudeai`)}),f,p=await Promise.race([u.then(()=>!1),new Promise(e=>{f=setTimeout(e=>e(!0),l,e)})]);f&&clearTimeout(f),p&&R(`[MCP] claude.ai connectors not ready after ${l}ms — proceeding; background connection continues`),U(`after_connectMcp_claudeai`),c()||(kp(),import(`./backgroundHousekeeping-
|
|
1086
|
-
`),r=await t({cwd:$.cwd,permissionMode:$.permissionMode,dangerouslySkipPermissions:$.dangerouslySkipPermissions});else{process.stderr.write(`Connecting to ${$.host}…\n`);let t=process.stderr.isTTY,n=!1;r=await e({host:$.host,cwd:$.cwd,localVersion:`2.6.
|
|
1087
|
-
`)}qe(r.remoteCwd),Pe(r.remoteCwd),Fe($.local?`local`:$.host)}catch(e){return await X(N,e instanceof n?e.message:String(e),()=>W(1))}let i=co($.local?`Local ssh-proxy test session\ncwd: ${r.remoteCwd}\nAuth: unix socket → local proxy`:`SSH session to ${$.host}\nRemote cwd: ${r.remoteCwd}\nAuth: unix socket -R → local proxy`,`info`);await Uu(N,{getFpsMetrics:sn,stats:un,initialState:Fn},{debug:a||o,commands:qt,initialTools:[],initialMessages:[i],mcpClients:[],autoConnectIdeFlag:ne,mainThreadAgentDefinition:M,disableSlashCommands:pe,sshSession:r,thinkingConfig:I},ld);return}else if(Pp&&(Pp.sessionId||Pp.discover)){let{discoverAssistantSessions:e}=await import(`./sessionDiscovery-
|
|
1088
|
-
Usage: claude --remote "your task description"`,()=>W(1));B(`tengu_remote_create_session`,{has_initial_prompt:String(e)});let n=await Cr(),r=await Xo(N,e?Te:null,new AbortController().signal,n||void 0);if(!r)return B(`tengu_remote_create_session_error`,{error:`unable_to_create_session`}),await X(N,`Error: Unable to create remote session`,()=>W(1));B(`tengu_remote_create_session_success`,{session_id:r.id}),t||(process.stdout.write(`Created remote session: ${r.title}\n`),process.stdout.write(`View: ${Oo(r.id)}?m=0\n`),process.stdout.write(`Resume with: claude --teleport ${r.id}\n`),await W(0),process.exit(0)),ke(!0),We(vc(r.id));let i;try{i=await pl()}catch(e){return H(Qn(e)),await X(N,`Error: ${L(e)||`Failed to authenticate`}`,()=>W(1))}let{getClaudeAIOAuthTokens:s}=await import(`./auth-
|
|
1089
|
-
`):(H(e),process.stderr.write(b.red(`Error: ${L(e)}\n`))),await W(1)}}}if(process.env.USER_TYPE===`ant`&&n.resume&&typeof n.resume==`string`&&!i){let{parseCcshareId:e,loadCcshare:t}=await import(`./ccshareResume-DWLjTF22.js`),i=e(n.resume);if(i)try{let e=performance.now(),n=await Fa(await t(i),void 0);n?(r=await Bl(n,{forkSession:!0,transcriptPath:n.fullPath},Bn),r.restoredAgentDef&&(M=r.restoredAgentDef),B(`tengu_session_resumed`,{entrypoint:`ccshare`,success:!0,resume_duration_ms:Math.round(performance.now()-e)})):B(`tengu_session_resumed`,{entrypoint:`ccshare`,success:!1})}catch(e){B(`tengu_session_resumed`,{entrypoint:`ccshare`,success:!1}),H(e),await X(N,`Unable to resume from ccshare: ${L(e)}`,()=>W(1))}else{let e=lu(n.resume);try{let t=performance.now(),i;try{i=await eo(e)}catch(e){if(!nr(e))throw e}if(i){let e=await Fa(i,void 0);e?(r=await Bl(e,{forkSession:!!n.forkSession,transcriptPath:e.fullPath},Bn),r.restoredAgentDef&&(M=r.restoredAgentDef),B(`tengu_session_resumed`,{entrypoint:`file`,success:!0,resume_duration_ms:Math.round(performance.now()-t)})):B(`tengu_session_resumed`,{entrypoint:`file`,success:!1})}}catch(e){B(`tengu_session_resumed`,{entrypoint:`file`,success:!1}),H(e),await X(N,`Unable to load transcript from file: ${n.resume}`,()=>W(1))}}}if(i){let e=i;try{let t=performance.now(),i=await Fa(c??e,void 0);if(!i)return B(`tengu_session_resumed`,{entrypoint:`cli_flag`,success:!1}),await X(N,`No conversation found with session ID: ${e}`);let a=c?.fullPath??i.fullPath;r=await Bl(i,{forkSession:!!n.forkSession,sessionIdOverride:e,transcriptPath:a},Bn),r.restoredAgentDef&&(M=r.restoredAgentDef),B(`tengu_session_resumed`,{entrypoint:`cli_flag`,success:!0,resume_duration_ms:Math.round(performance.now()-t)})}catch(t){B(`tengu_session_resumed`,{entrypoint:`cli_flag`,success:!1}),H(t),await X(N,`Failed to resume session ${e}`)}}if(ae)try{let e=await ae,t=Kr(e,e=>!e.success);t>0&&process.stderr.write(b.yellow(`Warning: ${t}/${e.length} file(s) failed to download.\n`))}catch(e){return await X(N,`Error downloading files: ${L(e)}`)}let u=r??(Array.isArray(t)?{messages:t,fileHistorySnapshots:void 0,agentName:void 0,agentColor:void 0,restoredAgentDef:M,initialState:Fn,contentReplacements:void 0}:void 0);u?(zp(n),Bp(n),await Uu(N,{getFpsMetrics:sn,stats:un,initialState:u.initialState},{...zn,mainThreadAgentDefinition:u.restoredAgentDef??M,initialMessages:u.messages,initialFileHistorySnapshots:u.fileHistorySnapshots,initialContentReplacements:u.contentReplacements,initialAgentName:u.agentName,initialAgentColor:u.agentColor},ld)):await _d(N,{getFpsMetrics:sn,stats:un,initialState:Fn},oa(Ye()),{...zn,initialSearchQuery:s,forkSession:n.forkSession,filterByPr:l})}else{let e=xn&&Sn.length===0?xn:void 0;U(`action_after_hooks`),zp(n),Bp(n),cc(vp?.isCoordinatorMode()?`coordinator`:`normal`);let t=null;n.deepLinkOrigin?(B(`tengu_deep_link_opened`,{has_prefill:!!n.prefill,has_repo:!!n.deepLinkRepo}),t=co(ou({cwd:gr(),prefillLength:n.prefill?.length,repo:n.deepLinkRepo,lastFetch:n.deepLinkLastFetch===void 0?void 0:new Date(n.deepLinkLastFetch)}),`warning`)):n.prefill&&(t=co(`Launched with a pre-filled prompt — review it before pressing Enter.`,`warning`));let r=t?[t,...Sn]:Sn.length>0?Sn:void 0;await Uu(N,{getFpsMetrics:sn,stats:un,initialState:Fn},{...zn,initialMessages:r,pendingHookMessages:e},ld)}}).version(`2.6.10 (Claude Code)`,`-v, --version`,`Output the version number`),n.option(`-w, --worktree [name]`,`Create a new git worktree for this session (optionally specify a name)`),n.option(`--tmux`,`Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.`),$a()&&n.addOption(new J(`--advisor <model>`,`Enable the server-side advisor tool with the specified model (alias or full ID).`).hideHelp()),process.env.USER_TYPE===`ant`&&(n.addOption(new J(`--delegate-permissions`,`[ANT-ONLY] Alias for --permission-mode auto.`).implies({permissionMode:`auto`})),n.addOption(new J(`--dangerously-skip-permissions-with-classifiers`,`[ANT-ONLY] Deprecated alias for --permission-mode auto.`).hideHelp().implies({permissionMode:`auto`})),n.addOption(new J(`--afk`,`[ANT-ONLY] Deprecated alias for --permission-mode auto.`).hideHelp().implies({permissionMode:`auto`})),n.addOption(new J(`--tasks [id]`,`[ANT-ONLY] Tasks mode: watch for tasks and auto-process them. Optional id is used as both the task list ID and agent ID (defaults to "tasklist").`).argParser(String).hideHelp()),n.option(`--agent-teams`,`[ANT-ONLY] Force Claude to use multi-agent mode for solving problems`,()=>!0)),n.addOption(new J(`--enable-auto-mode`,`Opt in to auto mode`).hideHelp()),n.addOption(new J(`--proactive`,`Start in proactive autonomous mode`)),n.addOption(new J(`--brief`,`Enable SendUserMessage tool for agent-to-user communication`)),n.addOption(new J(`--assistant`,`Force assistant mode (Agent SDK daemon use)`).hideHelp()),n.addOption(new J(`--channels <servers...>`,`MCP servers whose channel notifications (inbound push) should register this session. Space-separated server names.`).hideHelp()),n.addOption(new J(`--dangerously-load-development-channels <servers...>`,`Load channel servers not on the approved allowlist. For local channel development only. Shows a confirmation dialog at startup.`).hideHelp()),n.addOption(new J(`--agent-id <id>`,`Teammate agent ID`).hideHelp()),n.addOption(new J(`--agent-name <name>`,`Teammate display name`).hideHelp()),n.addOption(new J(`--team-name <name>`,`Team name for swarm coordination`).hideHelp()),n.addOption(new J(`--agent-color <color>`,`Teammate UI color`).hideHelp()),n.addOption(new J(`--plan-mode-required`,`Require plan mode before implementation`).hideHelp()),n.addOption(new J(`--parent-session-id <id>`,`Parent session ID for analytics correlation`).hideHelp()),n.addOption(new J(`--teammate-mode <mode>`,`How to spawn teammates: "tmux", "in-process", or "auto"`).choices([`auto`,`tmux`,`in-process`]).hideHelp()),n.addOption(new J(`--agent-type <type>`,`Custom agent type for this teammate`).hideHelp()),n.addOption(new J(`--sdk-url <url>`,`Use remote WebSocket endpoint for SDK I/O streaming (only with -p and stream-json format)`).hideHelp()),n.addOption(new J(`--teleport [session]`,`Resume a teleport session, optionally specify session ID`).hideHelp()),n.addOption(new J(`--remote [description]`,`Create a remote session with the given description`).hideHelp()),n.addOption(new J(`--remote-control [name]`,`Start an interactive session with Remote Control enabled (optionally named)`).argParser(e=>e||!0).hideHelp()),n.addOption(new J(`--rc [name]`,`Alias for --remote-control`).argParser(e=>e||!0).hideHelp()),U(`run_main_options_built`);let r=process.argv.includes(`-p`)||process.argv.includes(`--print`),i=process.argv.some(e=>e.startsWith(`cc://`)||e.startsWith(`cc+unix://`));if(r&&!i)return U(`run_before_parse`),await n.parseAsync(process.argv),U(`run_after_parse`),n;let a=n.command(`mcp`).description(`Configure and manage MCP servers`).configureHelp(t()).enablePositionalOptions();a.command(`serve`).description(`Start the Claude Code MCP server`).option(`-d, --debug`,`Enable debug mode`,()=>!0).option(`--verbose`,`Override verbose mode setting from config`,()=>!0).action(async({debug:e,verbose:t})=>{let{mcpServeHandler:n}=await import(`./mcp-iCbCqg7w.js`);await n({debug:e,verbose:t})}),Xf(a),Tc()&&Zf(a),a.command(`remove <name>`).description(`Remove an MCP server`).option(`-s, --scope <scope>`,`Configuration scope (local, user, or project) - if not specified, removes from whichever scope it exists in`).action(async(e,t)=>{let{mcpRemoveHandler:n}=await import(`./mcp-iCbCqg7w.js`);await n(e,t)}),a.command(`list`).description(`List configured MCP servers. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.`).action(async()=>{let{mcpListHandler:e}=await import(`./mcp-iCbCqg7w.js`);await e()}),a.command(`get <name>`).description(`Get details about an MCP server. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.`).action(async e=>{let{mcpGetHandler:t}=await import(`./mcp-iCbCqg7w.js`);await t(e)}),a.command(`add-json <name> <json>`).description(`Add an MCP server (stdio or SSE) with a JSON string`).option(`-s, --scope <scope>`,`Configuration scope (local, user, or project)`,`local`).option(`--client-secret`,`Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var)`).action(async(e,t,n)=>{let{mcpAddJsonHandler:r}=await import(`./mcp-iCbCqg7w.js`);await r(e,t,n)}),a.command(`add-from-claude-desktop`).description(`Import MCP servers from Claude Desktop (Mac and WSL only)`).option(`-s, --scope <scope>`,`Configuration scope (local, user, or project)`,`local`).action(async e=>{let{mcpAddFromDesktopHandler:t}=await import(`./mcp-iCbCqg7w.js`);await t(e)}),a.command(`reset-project-choices`).description(`Reset all approved and rejected project-scoped (.mcp.json) servers within this project`).action(async()=>{let{mcpResetChoicesHandler:e}=await import(`./mcp-iCbCqg7w.js`);await e()}),n.command(`server`).description(`Start a Claude Code session server`).option(`--port <number>`,`HTTP port`,`0`).option(`--host <string>`,`Bind address`,`0.0.0.0`).option(`--auth-token <token>`,`Bearer token for auth`).option(`--unix <path>`,`Listen on a unix domain socket`).option(`--workspace <dir>`,`Default working directory for sessions that do not specify cwd`).option(`--idle-timeout <ms>`,`Idle timeout for detached sessions in ms (0 = never expire)`,`600000`).option(`--max-sessions <n>`,`Maximum concurrent sessions (0 = unlimited)`,`32`).action(async e=>{let{randomBytes:t}=await import(`crypto`),{startServer:n}=await import(`./server-C5XZSlto.js`),{SessionManager:r}=await import(`./sessionManager-Dw72ZUTg.js`),{DangerousBackend:i}=await import(`./dangerousBackend-BU_PHGR2.js`),{printBanner:a}=await import(`./serverBanner-WlSYP-f8.js`),{createServerLogger:o}=await import(`./serverLog-DtsUvDiY.js`),{writeServerLock:s,removeServerLock:c,probeRunningServer:l}=await import(`./lockfile-DBwdlC3K.js`),u=await l();u&&(process.stderr.write(`A claude server is already running (pid ${u.pid}) at ${u.httpUrl}\n`),process.exit(1));let d=e.authToken??`sk-ant-cc-${t(16).toString(`base64url`)}`,f={port:parseInt(e.port,10),host:e.host,authToken:d,unix:e.unix,workspace:e.workspace,idleTimeoutMs:parseInt(e.idleTimeout,10),maxSessions:parseInt(e.maxSessions,10)},p=new r(new i,{idleTimeoutMs:f.idleTimeoutMs,maxSessions:f.maxSessions}),m=n(f,p,o()),ee=m.port??f.port;a(f,d,ee),await s({pid:process.pid,port:ee,host:f.host,httpUrl:f.unix?`unix:${f.unix}`:`http://${f.host}:${ee}`,startedAt:Date.now()});let h=!1,g=async()=>{h||(h=!0,m.stop(!0),await p.destroyAll(),await c(),process.exit(0))};process.once(`SIGINT`,()=>void g()),process.once(`SIGTERM`,()=>void g())}),n.command(`ssh <host> [dir]`).description(`Run Claude Code on a remote host over SSH. Deploys the binary and tunnels API auth back through your local machine — no remote setup needed.`).option(`--permission-mode <mode>`,`Permission mode for the remote session`).option(`--dangerously-skip-permissions`,`Skip all permission prompts on the remote (dangerous)`).option(`--remote-bin <command>`,`Custom remote binary command (skips probe/deploy). Example: --remote-bin 'bun /path/to/project/dist/cli.js'`).option(`--local`,`e2e test mode — spawn the child CLI locally (skip ssh/deploy). Exercises the auth proxy and unix-socket plumbing without a remote host.`).action(async()=>{process.stderr.write(`Usage: claude ssh <user@host | ssh-config-alias> [dir]
|
|
1084
|
+
`);R(`--mcp-config validation failed (${n.length} errors): ${e}`,{level:`error`}),process.stderr.write(`Error: Invalid MCP configuration:\n${e}\n`),process.exit(1)}if(Object.keys(t).length>0){let e=Object.entries(t).filter(([,e])=>e.type!==`sdk`).map(([e])=>e),n=null;if(e.some(yl))n=`Invalid MCP configuration: "${bl}" is a reserved MCP name.`;else{let{isComputerUseMCPServer:t,COMPUTER_USE_MCP_SERVER_NAME:r}=await import(`./common-B_BC3eMY.js`);e.some(t)&&(n=`Invalid MCP configuration: "${r}" is a reserved MCP name.`)}n&&(process.stderr.write(`Error: ${n}\n`),process.exit(1));let{allowed:r,blocked:i}=fs(Ft(t,e=>({...e,scope:`dynamic`})));i.length>0&&process.stderr.write(`Warning: MCP ${It(i.length,`server`)} blocked by enterprise policy: ${i.join(`, `)}\n`),T={...T,...r}}}let He=n;Ge(He.chrome);let Ue=Hl(He.chrome)&&(process.env.USER_TYPE===`ant`||on()),Xe=!Ue&&Ul();if(Ue){let e=zr();try{B(`tengu_claude_in_chrome_setup`,{platform:e});let{mcpConfig:t,allowedTools:n,systemPrompt:r}=Wl();T={...T,...t},d.push(...n),r&&(w=w?`${r}\n\n${w}`:r)}catch(t){B(`tengu_claude_in_chrome_setup_failed`,{platform:e}),R(`[Claude in Chrome] Error: ${t}`),H(t),console.error(`Error: Failed to run with Claude in Chrome.`),process.exit(1)}}else if(Xe)try{let{mcpConfig:e}=Wl();T={...T,...e};let t=Dl;w=w?`${w}\n\n${t}`:t}catch(e){R(`[Claude in Chrome] Error (auto-enable): ${e}`)}let et=n.strictMcpConfig||!1;if(Do()&&(et&&(process.stderr.write(b.red(`You cannot use --strict-mcp-config when an enterprise MCP config is present`)),process.exit(1)),T&&!Os(T)&&(process.stderr.write(b.red(`You cannot dynamically configure MCP servers when an enterprise MCP config is present`)),process.exit(1))),zr()!==`unknown`&&!Re())try{let{getChicagoEnabled:e}=await import(`./gates-BSpXbh9s.js`);if(e()){let{setupComputerUseMCP:e}=await import(`./setup-DIxsjw17.js`),{mcpConfig:t,allowedTools:n}=e();T={...T,...t},d.push(...n)}}catch(e){R(`[Computer Use MCP] Setup failed: ${L(e)}`)}we(h);let tt,rt=(e,t)=>{let n=[],r=[];for(let t of e)if(t.startsWith(`plugin:`)){let e=t.slice(7),i=e.indexOf(`@`);i<=0||i===e.length-1?r.push(t):n.push({kind:`plugin`,name:e.slice(0,i),marketplace:e.slice(i+1)})}else t.startsWith(`server:`)&&t.length>7?n.push({kind:`server`,name:t.slice(7)}):r.push(t);return r.length>0&&(process.stderr.write(b.red(`${t} entries must be tagged: ${r.join(`, `)}\n plugin:<name>@<marketplace> — plugin-provided channel (allowlist enforced)\n server:<name> — manually configured MCP server\n`)),process.exit(1)),n},ot=n,E=ot.channels,lt=ot.dangerouslyLoadDevelopmentChannels,pt=[];if(E&&E.length>0&&(pt=rt(E,`--channels`),Le(pt)),C||lt&<.length>0&&(tt=rt(lt,`--dangerously-load-development-channels`)),pt.length>0||(tt?.length??0)>0){let e=e=>{let t=e.flatMap(e=>e.kind===`plugin`?[`${e.name}@${e.marketplace}`]:[]);return t.length>0?t.sort().join(`,`):void 0};B(`tengu_mcp_channel_flags`,{channels_count:pt.length,dev_count:tt?.length??0,plugins:e(pt),dev_plugins:e(tt??[])})}if(u.length>0){let{BRIEF_TOOL_NAME:t,LEGACY_BRIEF_TOOL_NAME:n}=(Ct(),e(kn)),{isBriefEntitled:r}=(zo(),e(si)),i=li(u);(i.includes(t)||i.includes(n))&&r()&&Ke(!0)}let ht=await Ti({allowedToolsCli:d,disallowedToolsCli:f,baseToolsCli:u,permissionMode:Be,allowDangerouslySkipPermissions:l,addDirs:h}),D=ht.toolPermissionContext,{warnings:gt,dangerousPermissions:_t,overlyBroadBashPermissions:yt}=ht;if(process.env.USER_TYPE===`ant`&&yt.length>0){for(let e of yt)R(`Ignoring overly broad shell permission ${e.ruleDisplay} from ${e.sourceDisplay}`);D=ia(D,yt)}_t.length>0&&(D=ga(D)),gt.forEach(e=>{console.error(e)});let bt=C&&!et&&!Do()&&!c()?ka().then(e=>{let{allowed:t,blocked:n}=fs(e);return n.length>0&&process.stderr.write(`Warning: claude.ai MCP ${It(n.length,`server`)} blocked by enterprise policy: ${n.join(`, `)}\n`),t}):Promise.resolve({});R(`[STARTUP] Loading MCP configs...`);let xt=Date.now(),wt,Tt=(et||c()?Promise.resolve({servers:{}}):Mo(T)).then(e=>(wt=Date.now()-xt,e));y&&y!==`text`&&y!==`stream-json`&&(console.error(`Error: Invalid input format "${y}".`),process.exit(1)),y===`stream-json`&&v!==`stream-json`&&(console.error(`Error: --input-format=stream-json requires output-format=stream-json.`),process.exit(1)),xe&&(y!==`stream-json`||v!==`stream-json`)&&(console.error(`Error: --sdk-url requires both --input-format=stream-json and --output-format=stream-json.`),process.exit(1)),n.replayUserMessages&&(y!==`stream-json`||v!==`stream-json`)&&(console.error(`Error: --replay-user-messages requires both --input-format=stream-json and --output-format=stream-json.`),process.exit(1)),Se&&(!C||v!==`stream-json`)&&(_r(`Error: --include-partial-messages requires --print and --output-format=stream-json.`),process.exit(1)),n.sessionPersistence===!1&&!C&&(_r(`Error: --no-session-persistence can only be used with --print mode.`),process.exit(1));let O=await Ip(t||``,y??`text`);U(`action_after_input_prompt`),zp(n);let Et=Xi(D);if(m(process.env.CLAUDE_CODE_COORDINATOR_MODE)){let{applyCoordinatorToolFilter:e}=await import(`./toolPool-CygNb5cr.js`);Et=e(Et)}U(`action_tools_loaded`);let k;if(qc({isNonInteractiveSession:C})&&n.jsonSchema&&(k=tr(n.jsonSchema)),k){let e=Hc(k);`tool`in e?(Et=[...Et,e.tool],B(`tengu_structured_output_enabled`,{schema_property_count:Object.keys(k.properties||{}).length,has_required_fields:!!k.required})):B(`tengu_structured_output_failure`,{error:`Invalid JSON schema`})}U(`action_before_setup`),R(`[STARTUP] Running setup()...`);let Dt=Date.now(),{setup:Ot}=await import(`./setup-D1sQnli9.js`),jt=gr();process.env.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&(yd(),qf());let Pt=Ot(jt,Be,l,ve,_e,be,re?Va(re):void 0,ye,void 0),Lt=ve?null:Ni(jt),Rt=ve?null:$o(jt);Lt?.catch(()=>{}),Rt?.catch(()=>{}),await Pt,R(`[STARTUP] setup() completed in ${Date.now()-Dt}ms`),U(`action_after_setup`);let zt=!!n.replayUserMessages;Re()&&(io(),so(),lc(),st());let Bt=n.name?.trim();Bt&&ro(Bt);let Vt=n.model||process.env.ANTHROPIC_MODEL;process.env.USER_TYPE===`ant`&&Vt&&Vt!==`default`&&!Vn(`tengu_ant_model_override`)&&j().cachedGrowthBookFeatures?.tengu_ant_model_override==null&&await dt();let Ut=n.model===`default`?ft():n.model,Wt=g===`default`?ft():g,Gt=ve?gr():jt;R(`[STARTUP] Loading commands and agents...`);let Kt=Date.now(),[qt,Jt]=await Promise.all([Lt??Ni(Gt),Rt??$o(Gt)]);R(`[STARTUP] Commands and agents loaded in ${Date.now()-Kt}ms`),U(`action_commands_loaded`);let Yt=[];if(oe)try{let e=Wr(oe);e&&(Yt=ks(e,`flagSettings`))}catch(e){H(e)}let Zt=[...Jt.allAgents,...Yt],Qt={...Jt,allAgents:Zt,activeAgents:Bs(Zt)},$t=se??St().agent,M;if($t&&(M=Qt.activeAgents.find(e=>e.agentType===$t),M||R(`Warning: agent "${$t}" not found. Available agents: ${Qt.activeAgents.map(e=>e.agentType).join(`, `)}. Using default behavior.`)),Je(M?.agentType),M&&B(`tengu_agent_flag`,{agentType:Ws(M)?M.agentType:`custom`,...se&&{source:`cli`}}),M?.agentType&&Yo(M.agentType),C&&M&&!ze&&!Ws(M)){let e=M.getSystemPrompt();e&&(ze=e)}M?.initialPrompt&&(typeof O==`string`?O=O?`${M.initialPrompt}\n\n${O}`:M.initialPrompt:O||(O=M.initialPrompt));let en=Ut;!en&&M?.model&&M.model!==`inherit`&&(en=ut(M.model)),Qe(en),Ae(At()||null);let tn=at(),nn=ut(tn??ft()),an;if(ci()){let e=$a()?n.advisor:void 0;e&&(R(`[AdvisorTool] --advisor ${e}`),Zs(nn)||(process.stderr.write(b.red(`Error: The model "${nn}" does not support the advisor tool.\n`)),process.exit(1)),Lo(Yn(ut(e)))||(process.stderr.write(b.red(`Error: The model "${e}" cannot be used as an advisor.\n`)),process.exit(1))),an=$a()?e??Ja():e,an&&R(`[AdvisorTool] Advisor model: ${an}`)}if(mn()&&x?.agentId&&x?.agentName&&x?.teamName&&x?.agentType){let e=Qt.activeAgents.find(e=>e.agentType===x.agentType);if(e){let t;if(e.source===`built-in`?R(`[teammate] Built-in agent ${x.agentType} - skipping custom prompt (not supported)`):t=e.getSystemPrompt(),e.memory&&B(`tengu_agent_memory_loaded`,{...process.env.USER_TYPE===`ant`&&{agent_type:e.agentType},scope:e.memory,source:`teammate`}),t){let e=`\n# Custom Agent Instructions\n${t}`;w=w?`${w}\n\n${e}`:e}}else R(`[teammate] Custom agent ${x.agentType} not found in available agents`)}if(Bp(n),!Re()&&!Ze()&&St().defaultView===`chat`){let{isBriefEntitled:t}=(zo(),e(si));t()&&Ke(!0)}if((n.proactive||m(process.env.CLAUDE_CODE_PROACTIVE))&&!vp?.isCoordinatorMode()){let t=`\n# Proactive Mode\n\nYou are in proactive mode. Take initiative — explore, act, and make progress without waiting for instructions.\n\nStart by briefly greeting the user.\n\nYou will receive periodic <tick> prompts. These are check-ins. Do whatever seems most useful, or call Sleep if there's nothing to do. ${(zo(),e(si)).isBriefEnabled()?`Call SendUserMessage at checkpoints to mark where things stand.`:`The user will see any text you output.`}`;w=w?`${w}\n\n${t}`:t}if(r&&yp){let e=yp.getAssistantSystemPromptAddendum();w=w?`${w}\n\n${e}`:e}let N,sn,un;if(!C){let e=dd(!1);sn=e.getFpsMetrics,un=e.stats,process.env.USER_TYPE===`ant`&&zl();let{createRoot:n}=await import(`./src-poaoYkuc.js`);N=await n(e.renderOptions),B(`tengu_timer`,{event:`startup`,durationMs:Math.round(process.uptime()*1e3)}),R(`[STARTUP] Running showSetupScreens()...`);let r=Date.now(),i=await ud(N,Be,l,qt,Ue,tt);if(R(`[STARTUP] showSetupScreens() completed in ${Date.now()-r}ms`),De!==void 0){let{getBridgeDisabledReason:e}=await import(`./bridgeEnabled-CjaYKTo5.js`),t=await e();je=t===null,t&&process.stderr.write(b.yellow(`${t}\n--rc flag ignored.\n`))}i&&t?.trim().toLowerCase()===`/login`&&(t=``),i&&(Ba(),La(),qn(),Ht(),import(`./trustedDevice-C0KJ0qiK.js`).then(e=>(e.clearTrustedDeviceToken(),e.enrollTrustedDevice())));let a=await kt();a.valid||await X(N,a.message)}if(process.exitCode!==void 0){R(`Graceful shutdown initiated, skipping further initialization`);return}if(Jo(),!C){let{errors:e}=cn(),t=e.filter(e=>!e.mcpErrorMetadata);t.length>0&&await fd(N,{settingsErrors:t,onExit:()=>va(1)})}let dn=Xt(`tengu_cicada_nap_ms`,0),pn=j().startupPrefetchedAt??0;c()||dn>0&&Date.now()-pn<dn?(R(`Skipping startup prefetches, last ran ${Math.round((Date.now()-pn)/1e3)}s ago`),Nt()):(R(`Starting background startup prefetches${pn>0?` last ran ${Math.round((Date.now()-pn)/1e3)}s ago`:``}`),rs().catch(e=>H(e)),Ku(),xl(),Xt(`tengu_miraculo_the_bard`,!1)?Nt():mt(),dn>0&&A(e=>({...e,startupPrefetchedAt:Date.now()}))),C||ru();let{servers:hn}=await Tt;R(`[STARTUP] MCP configs resolved in ${wt}ms (awaited at +${Date.now()-xt}ms)`);let gn={...hn,...T},_n={},vn={};for(let[e,t]of Object.entries(gn)){let n=t;n.type===`sdk`?_n[e]=n:vn[e]=n}U(`action_mcp_configs_loaded`);let P=C?Promise.resolve({clients:[],tools:[],commands:[]}):fi(vn),yn=C?Promise.resolve({clients:[],tools:[],commands:[]}):bt.then(e=>Object.keys(e).length>0?fi(e):{clients:[],tools:[],commands:[]}),bn=Promise.all([P,yn]).then(([e,t])=>({clients:[...e.clients,...t.clients],tools:rn([...e.tools,...t.tools],`name`),commands:rn([...e.commands,...t.commands],`name`)})),xn=de||ue||fe||C||n.continue||n.resume?null:cs(`startup`,{agentType:M?.agentType,model:nn}),Sn=[];bn.catch(()=>{});let Cn=[],wn=[],F=[],Tn=oo(),I=Tn===!1?{type:`disabled`}:{type:`adaptive`};if(n.thinking===`adaptive`||n.thinking===`enabled`)Tn=!0,I={type:`adaptive`};else if(n.thinking===`disabled`)Tn=!1,I={type:`disabled`};else{let e=process.env.MAX_THINKING_TOKENS?parseInt(process.env.MAX_THINKING_TOKENS,10):n.maxThinkingTokens;e!==void 0&&(e>0?(Tn=!0,I={type:`enabled`,budgetTokens:e}):e===0&&(Tn=!1,I={type:`disabled`}))}V(`info`,`started`,{version:`2.6.11`,is_native_binary:Ar()}),ir(async()=>{V(`info`,`exited`)}),Rp({hasInitialPrompt:!!t,hasStdin:!!O,verbose:ce,debug:a,debugToStderr:o,print:le??!1,outputFormat:v??`text`,inputFormat:y??`text`,numAllowedTools:d.length,numDisallowedTools:f.length,mcpClientCount:Object.keys(gn).length,worktreeEnabled:ve,skipWebFetchPreflight:St().skipWebFetchPreflight,githubActionInputs:process.env.GITHUB_ACTION_INPUTS,dangerouslySkipPermissionsPassed:s??!1,permissionMode:Be,modeIsBypass:Be===`bypassPermissions`,allowDangerouslySkipPermissionsPassed:l,systemPromptFlag:ze?n.systemPromptFile?`file`:`flag`:void 0,appendSystemPromptFlag:w?n.appendSystemPromptFile?`file`:`flag`:void 0,thinkingConfig:I,assistantActivationPath:r?yp?.getAssistantActivationPath():void 0}),To(vn,D),Ci(null,`initialization`),Sp(),rc().then(e=>{e&&(Bt&&Ms(Bt),Ks().then(e=>{e>=2&&B(`tengu_concurrent_sessions`,{num_sessions:e})}))}),c()||(C?(await wi(),U(`action_after_plugins_init`),xo().then(()=>Ai())):wi().then(async()=>{U(`action_after_plugins_init`),await xo(),Ai()}));let En=de||ue?`init`:fe?`maintenance`:null;if(de){io(),await di(`init`,{forceSyncExecution:!0}),await cs(`startup`,{forceSyncExecution:!0}),va(0);return}if(C){(v===`stream-json`||v===`json`)&&or(!0),io(),Bu();let e=n.continue||n.resume||S||En?void 0:cs(`startup`);e?.catch(()=>{}),U(`before_validateForceLoginOrg`);let t=await kt();t.valid||(process.stderr.write(t.message+`
|
|
1085
|
+
`),process.exit(1));let i=pe?[]:qt.filter(e=>e.type===`prompt`&&!e.disableNonInteractive||e.type===`local`&&e.supportsNonInteractive),a=Wi(),o=Sa({...a,mcp:{...a.mcp,clients:Cn,commands:F,tools:wn},toolPermissionContext:D,effortValue:Co(n.effort)??Qs(),...Un()&&{fastMode:fn(en??null)},...ci()&&an&&{advisorModel:an},kairosEnabled:r},Rl);Zi(D,o.getState().fastMode).then(({updateContext:e})=>{o.setState(t=>{let n=e(t.toolPermissionContext);return n===t.toolPermissionContext?t:{...t,toolPermissionContext:n}})}),n.sessionPersistence===!1&&nt(!0),$e(vt(te));let s=(e,t)=>Object.keys(e).length===0?Promise.resolve():(o.setState(t=>({...t,mcp:{...t.mcp,clients:[...t.mcp.clients,...Object.entries(e).map(([e,t])=>({name:e,type:`pending`,config:t}))]}})),ha(({client:e,tools:t,commands:n})=>{o.setState(r=>({...r,mcp:{...r.mcp,clients:r.mcp.clients.some(t=>t.name===e.name)?r.mcp.clients.map(t=>t.name===e.name?e:t):[...r.mcp.clients,e],tools:rn([...r.mcp.tools,...t],`name`),commands:rn([...r.mcp.commands,...n],`name`)}}))},e).catch(e=>R(`[MCP] ${t} connect error: ${e}`)));U(`before_connectMcp`),await s(vn,`regular`),U(`after_connectMcp`);let l=5e3,u=bt.then(e=>{if(Object.keys(e).length>0){let t=new Set;for(let n of Object.values(e)){let e=bs(n);e&&t.add(e)}let n=new Set;for(let[e,r]of Object.entries(vn)){if(!e.startsWith(`plugin:`))continue;let i=bs(r);i&&t.has(i)&&n.add(e)}if(n.size>0){R(`[MCP] Lazy dedup: suppressing ${n.size} plugin server(s) that duplicate claude.ai connectors: ${[...n].join(`, `)}`);for(let e of o.getState().mcp.clients)!n.has(e.name)||e.type!==`connected`||(e.client.onclose=void 0,Aa(e.name,e.config).catch(()=>{}));o.setState(e=>{let{clients:t,tools:r,commands:i,resources:a}=e.mcp;t=t.filter(e=>!n.has(e.name)),r=r.filter(e=>!e.mcpInfo||!n.has(e.mcpInfo.serverName));for(let e of n)i=Ps(i,e),a=Ui(a,e);return{...e,mcp:{...e.mcp,clients:t,tools:r,commands:i,resources:a}}})}}let{servers:t}=Js(e,ct(vn,(e,t)=>!t.startsWith(`plugin:`)));return s(t,`claudeai`)}),f,p=await Promise.race([u.then(()=>!1),new Promise(e=>{f=setTimeout(e=>e(!0),l,e)})]);f&&clearTimeout(f),p&&R(`[MCP] claude.ai connectors not ready after ${l}ms — proceeding; background connection continues`),U(`after_connectMcp_claudeai`),c()||(kp(),import(`./backgroundHousekeeping-BxBI2KkX.js`).then(e=>e.startBackgroundHousekeeping()),process.env.USER_TYPE===`ant`&&import(`./sdkHeapDumpMonitor--fevrC5z.js`).then(e=>e.startSdkMemoryMonitor())),Cp(),U(`before_print_import`);let{runHeadless:m}=await import(`./print-BcRG8gkQ.js`);U(`after_print_import`),m(O,()=>o.getState(),o.setState,i,Et,_n,Qt.activeAgents,{continue:n.continue,resume:n.resume,verbose:ce,outputFormat:v,jsonSchema:k,permissionPromptToolName:n.permissionPromptTool,allowedTools:d,thinkingConfig:I,maxTurns:n.maxTurns,maxBudgetUsd:n.maxBudgetUsd,taskBudget:n.taskBudget?{total:n.taskBudget}:void 0,systemPrompt:ze,appendSystemPrompt:w,userSpecifiedModel:en,fallbackModel:Wt,teleport:S,sdkUrl:xe,replayUserMessages:zt,includePartialMessages:Se,forkSession:n.forkSession||!1,resumeSessionAt:n.resumeSessionAt||void 0,rewindFiles:n.rewindFiles,enableAuthStatus:n.enableAuthStatus,agent:se,workload:n.workload,setupTrigger:En??void 0,sessionStartHooksPromise:e});return}B(`tengu_startup_manual_model_config`,{cli_flag:n.model,env_var:process.env.ANTHROPIC_MODEL,settings_file:(St()||{}).model,subscriptionType:Pn(),agent:$t});let Dn=$l(nn),On=[];if(Ve&&On.push({key:`permission-mode-notification`,text:Ve,priority:`high`}),Dn&&On.push({key:`model-deprecation-warning`,text:Dn,color:`warning`,priority:`high`}),yt.length>0){let e=Gr(yt.map(e=>e.ruleDisplay)),t=e.join(`, `),n=Gr(yt.map(e=>e.sourceDisplay)).join(`, `),r=e.length;On.push({key:`overly-broad-bash-notification`,text:`${t} allow ${It(r,`rule`)} from ${n} ${It(r,`was`,`were`)} ignored \u2014 not available for Ants, please use auto-mode instead`,color:`warning`,priority:`high`})}let An=hp(),jn={...D,mode:mn()&&An?.isPlanModeRequired?.()?`plan`:D.mode},Mn=Ze(),Nn=je||Mt()||r,Fn={settings:St(),tasks:{},agentNameRegistry:new Map,verbose:ce??j().verbose??!1,mainLoopModel:tn,mainLoopModelForSession:null,isBriefOnly:Mn,expandedView:j().showSpinnerTree?`teammates`:j().showExpandedTodos?`tasks`:`none`,showTeammateMessagePreview:mn()?!1:void 0,selectedIPAgentIndex:-1,selectedBgAgentIndex:-1,coordinatorTaskIndex:-1,viewSelectionMode:`none`,footerSelection:null,toolPermissionContext:jn,agent:M?.agentType,agentDefinitions:Qt,mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:0},plugins:{enabled:[],disabled:[],commands:[],errors:[],installationStatus:{marketplaces:[],plugins:[]},needsRefresh:!1},statusLineText:void 0,kairosEnabled:r,remoteSessionUrl:void 0,remoteConnectionStatus:`connecting`,remoteBackgroundTaskCount:0,replBridgeEnabled:Nn||!1,replBridgeExplicit:je,replBridgeOutboundOnly:!1,replBridgeConnected:!1,replBridgeSessionActive:!1,replBridgeReconnecting:!1,replBridgeConnectUrl:void 0,replBridgeSessionUrl:void 0,replBridgeEnvironmentId:void 0,replBridgeSessionId:void 0,replBridgeError:void 0,replBridgeInitialName:Ne,showRemoteCallout:!1,notifications:{current:null,queue:On},elicitation:{queue:[]},todos:{},remoteAgentTaskSuggestions:[],fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},attribution:al(),thinkingEnabled:Tn,promptSuggestionEnabled:Io(),sessionHooks:new Map,inbox:{messages:[]},promptSuggestion:{text:null,promptId:null,shownAt:0,acceptedAt:0,generationRequestId:null},speculation:Fs,speculationSessionTimeSavedMs:0,skillImprovement:{suggestion:null},workerSandboxPermissions:{queue:[],selectedIndex:0},pendingWorkerRequest:null,pendingSandboxRequest:null,authVersion:0,initialMessage:O?{message:vo({content:String(O)})}:null,effortValue:Co(n.effort)??Qs(),activeOverlays:new Set,fastMode:fn(nn),...ci()&&an&&{advisorModel:an},teamContext:i??eu()};O&&hs(String(O));let In=wn;A(e=>({...e,numStartups:(e.numStartups??0)+1})),setImmediate(()=>{Tp(),Cp()});let Ln=process.env.USER_TYPE===`ant`?import(`./sessionDataUploader-Ctjo1bgR.js`):null,Rn=Ln?Ln.then(e=>e.createSessionTurnUploader()).catch(()=>null):null,zn={debug:a||o,commands:[...qt,...F],initialTools:In,mcpClients:Cn,autoConnectIdeFlag:ne,mainThreadAgentDefinition:M,disableSlashCommands:pe,dynamicMcpConfig:T,strictMcpConfig:et,systemPrompt:ze,appendSystemPrompt:w,taskListId:he,thinkingConfig:I,...Rn&&{onTurnComplete:e=>{Rn.then(t=>t?.(e))}}},Bn={modeApi:vp,mainThreadAgentDefinition:M,agentDefinitions:Qt,currentCwd:Gt,cliAgents:Yt,initialState:Fn};if(n.continue){let e=!1;try{let t=performance.now(),{clearSessionCaches:r}=await import(`./caches-Bvl2jdxF.js`);r();let i=await Fa(void 0,void 0);if(!i)return B(`tengu_continue`,{success:!1}),await X(N,`No conversation found to continue`);let a=await Bl(i,{forkSession:!!n.forkSession,includeAttribution:!0,transcriptPath:i.fullPath},Bn);a.restoredAgentDef&&(M=a.restoredAgentDef),zp(n),Bp(n),B(`tengu_continue`,{success:!0,resume_duration_ms:Math.round(performance.now()-t)}),e=!0,await Uu(N,{getFpsMetrics:sn,stats:un,initialState:a.initialState},{...zn,mainThreadAgentDefinition:a.restoredAgentDef??M,initialMessages:a.messages,initialFileHistorySnapshots:a.fileHistorySnapshots,initialContentReplacements:a.contentReplacements,initialAgentName:a.agentName,initialAgentColor:a.agentColor},ld)}catch(t){e||B(`tengu_continue`,{success:!1}),H(t),process.exit(1)}}else if(Q?.url){let e;try{let t=await dp({serverUrl:Q.url,authToken:Q.authToken,cwd:Ye(),dangerouslySkipPermissions:Q.dangerouslySkipPermissions});t.workDir&&(qe(t.workDir),Pe(t.workDir)),Fe(Q.url),e=t.config}catch(e){return await X(N,e instanceof up?e.message:String(e),()=>W(1))}let t=co(`Connected to server at ${Q.url}\nSession: ${e.sessionId}`,`info`);await Uu(N,{getFpsMetrics:sn,stats:un,initialState:Fn},{debug:a||o,commands:qt,initialTools:[],initialMessages:[t],mcpClients:[],autoConnectIdeFlag:ne,mainThreadAgentDefinition:M,disableSlashCommands:pe,directConnectConfig:e,thinkingConfig:I},ld);return}else if($?.host){let{createSSHSession:e,createLocalSSHSession:t,SSHSessionError:n}=await import(`./createSSHSession-Dq2nMChz.js`),r;try{if($.local)process.stderr.write(`Starting local ssh-proxy test session...
|
|
1086
|
+
`),r=await t({cwd:$.cwd,permissionMode:$.permissionMode,dangerouslySkipPermissions:$.dangerouslySkipPermissions});else{process.stderr.write(`Connecting to ${$.host}…\n`);let t=process.stderr.isTTY,n=!1;r=await e({host:$.host,cwd:$.cwd,localVersion:`2.6.11`,permissionMode:$.permissionMode,dangerouslySkipPermissions:$.dangerouslySkipPermissions,extraCliArgs:$.extraCliArgs,remoteBin:$.remoteBin},t?{onProgress:e=>{n=!0,process.stderr.write(`\r ${e}\x1b[K`)}}:{}),n&&process.stderr.write(`
|
|
1087
|
+
`)}qe(r.remoteCwd),Pe(r.remoteCwd),Fe($.local?`local`:$.host)}catch(e){return await X(N,e instanceof n?e.message:String(e),()=>W(1))}let i=co($.local?`Local ssh-proxy test session\ncwd: ${r.remoteCwd}\nAuth: unix socket → local proxy`:`SSH session to ${$.host}\nRemote cwd: ${r.remoteCwd}\nAuth: unix socket -R → local proxy`,`info`);await Uu(N,{getFpsMetrics:sn,stats:un,initialState:Fn},{debug:a||o,commands:qt,initialTools:[],initialMessages:[i],mcpClients:[],autoConnectIdeFlag:ne,mainThreadAgentDefinition:M,disableSlashCommands:pe,sshSession:r,thinkingConfig:I},ld);return}else if(Pp&&(Pp.sessionId||Pp.discover)){let{discoverAssistantSessions:e}=await import(`./sessionDiscovery-CQ3iMN4s.js`),t=Pp.sessionId;if(!t){let n;try{n=await e()}catch(e){return await X(N,`Failed to discover sessions: ${e instanceof Error?e.message:e}`,()=>W(1))}if(n.length===0){let e;try{e=await md(N)}catch(e){return await X(N,`Assistant installation failed: ${e instanceof Error?e.message:e}`,()=>W(1))}return e===null&&(await W(0),process.exit(0)),await cd(N,`Assistant installed in ${e}. The daemon is starting up — run \`claude assistant\` again in a few seconds to connect.`,{exitCode:0,beforeExit:()=>W(0)})}if(n.length===1)t=n[0].id;else{let e=await pd(N,{sessions:n});e||(await W(0),process.exit(0)),t=e}}let{checkAndRefreshOAuthTokenIfNeeded:n,getClaudeAIOAuthTokens:r}=await import(`./auth-DxRiJwZ-.js`);await n();let i;try{i=await pl()}catch(e){return await X(N,`Error: ${e instanceof Error?e.message:`Failed to authenticate`}`,()=>W(1))}let s=()=>r()?.accessToken??i.accessToken;Me(!0),Ke(!0),ke(!0);let c=tu(t,s,i.orgUUID,!1,!0),l=co(`Attached to assistant session ${t.slice(0,8)}…`,`info`),u={...Fn,isBriefOnly:!0,kairosEnabled:!1,replBridgeEnabled:!1},d=vi(qt);await Uu(N,{getFpsMetrics:sn,stats:un,initialState:u},{debug:a||o,commands:d,initialTools:[],initialMessages:[l],mcpClients:[],autoConnectIdeFlag:ne,mainThreadAgentDefinition:M,disableSlashCommands:pe,remoteSessionConfig:c,thinkingConfig:I},ld);return}else if(n.resume||n.fromPr||S||Te!==null){let{clearSessionCaches:e}=await import(`./caches-Bvl2jdxF.js`);e();let t=null,r,i=Va(n.resume),s,c=null,l;if(n.fromPr&&(n.fromPr===!0?l=!0:typeof n.fromPr==`string`&&(l=n.fromPr)),n.resume&&typeof n.resume==`string`&&!i){let e=n.resume.trim();if(e){let t=await Ea(e,{exact:!0});t.length===1?(c=t[0],i=pc(c)??null):s=e}}if((Te!==null||S)&&(await Ji(),!gi(`allow_remote_sessions`)))return await X(N,`Error: Remote sessions are disabled by your organization's policy.`,()=>W(1));if(Te!==null){let e=Te.length>0,t=Xt(`tengu_remote_backend`,!1);if(!t&&!e)return await X(N,`Error: --remote requires a description.
|
|
1088
|
+
Usage: claude --remote "your task description"`,()=>W(1));B(`tengu_remote_create_session`,{has_initial_prompt:String(e)});let n=await Cr(),r=await Xo(N,e?Te:null,new AbortController().signal,n||void 0);if(!r)return B(`tengu_remote_create_session_error`,{error:`unable_to_create_session`}),await X(N,`Error: Unable to create remote session`,()=>W(1));B(`tengu_remote_create_session_success`,{session_id:r.id}),t||(process.stdout.write(`Created remote session: ${r.title}\n`),process.stdout.write(`View: ${Oo(r.id)}?m=0\n`),process.stdout.write(`Resume with: claude --teleport ${r.id}\n`),await W(0),process.exit(0)),ke(!0),We(vc(r.id));let i;try{i=await pl()}catch(e){return H(Qn(e)),await X(N,`Error: ${L(e)||`Failed to authenticate`}`,()=>W(1))}let{getClaudeAIOAuthTokens:s}=await import(`./auth-DxRiJwZ-.js`),c=tu(r.id,()=>s()?.accessToken??i.accessToken,i.orgUUID,e),l=`${Oo(r.id)}?m=0`,u=co(`/remote-control is active. Code in CLI or at ${l}`,`info`),d=e?vo({content:Te}):null,f={...Fn,remoteSessionUrl:l},p=vi(qt);await Uu(N,{getFpsMetrics:sn,stats:un,initialState:f},{debug:a||o,commands:p,initialTools:[],initialMessages:d?[u,d]:[u],mcpClients:[],autoConnectIdeFlag:ne,mainThreadAgentDefinition:M,disableSlashCommands:pe,remoteSessionConfig:c,thinkingConfig:I},ld);return}else if(S){if(S===!0||S===``){B(`tengu_teleport_interactive_mode`,{}),R(`selectAndResumeTeleportTask: Starting teleport flow...`);let e=await hd(N);e||(await W(0),process.exit(0));let{branchError:n}=await Eo(e.branch);t=jo(e.log,n)}else if(typeof S==`string`){B(`tengu_teleport_resume_session`,{mode:`direct`});try{let e=await lo(await hl(S));if(e.status===`mismatch`||e.status===`not_in_repo`){let t=e.sessionRepo;if(t){let e=await Xl(Yl(t));if(e.length>0){let n=await gd(N,{targetRepo:t,initialPaths:e});n?(process.chdir(n),Li(n),qe(n)):await W(0)}else throw new Zn(`You must run claude --teleport ${S} from a checkout of ${t}.`,b.red(`You must run claude --teleport ${S} from a checkout of ${b.bold(t)}.\n`))}}else if(e.status===`error`)throw new Zn(e.errorMessage||`Failed to validate session`,b.red(`Error: ${e.errorMessage||`Failed to validate session`}\n`));await Wo();let{teleportWithProgress:n}=await import(`./TeleportProgress-BmbhZlOg.js`),r=await n(N,S);Oe({sessionId:S}),t=r.messages}catch(e){e instanceof Zn?process.stderr.write(e.formattedMessage+`
|
|
1089
|
+
`):(H(e),process.stderr.write(b.red(`Error: ${L(e)}\n`))),await W(1)}}}if(process.env.USER_TYPE===`ant`&&n.resume&&typeof n.resume==`string`&&!i){let{parseCcshareId:e,loadCcshare:t}=await import(`./ccshareResume-DWLjTF22.js`),i=e(n.resume);if(i)try{let e=performance.now(),n=await Fa(await t(i),void 0);n?(r=await Bl(n,{forkSession:!0,transcriptPath:n.fullPath},Bn),r.restoredAgentDef&&(M=r.restoredAgentDef),B(`tengu_session_resumed`,{entrypoint:`ccshare`,success:!0,resume_duration_ms:Math.round(performance.now()-e)})):B(`tengu_session_resumed`,{entrypoint:`ccshare`,success:!1})}catch(e){B(`tengu_session_resumed`,{entrypoint:`ccshare`,success:!1}),H(e),await X(N,`Unable to resume from ccshare: ${L(e)}`,()=>W(1))}else{let e=lu(n.resume);try{let t=performance.now(),i;try{i=await eo(e)}catch(e){if(!nr(e))throw e}if(i){let e=await Fa(i,void 0);e?(r=await Bl(e,{forkSession:!!n.forkSession,transcriptPath:e.fullPath},Bn),r.restoredAgentDef&&(M=r.restoredAgentDef),B(`tengu_session_resumed`,{entrypoint:`file`,success:!0,resume_duration_ms:Math.round(performance.now()-t)})):B(`tengu_session_resumed`,{entrypoint:`file`,success:!1})}}catch(e){B(`tengu_session_resumed`,{entrypoint:`file`,success:!1}),H(e),await X(N,`Unable to load transcript from file: ${n.resume}`,()=>W(1))}}}if(i){let e=i;try{let t=performance.now(),i=await Fa(c??e,void 0);if(!i)return B(`tengu_session_resumed`,{entrypoint:`cli_flag`,success:!1}),await X(N,`No conversation found with session ID: ${e}`);let a=c?.fullPath??i.fullPath;r=await Bl(i,{forkSession:!!n.forkSession,sessionIdOverride:e,transcriptPath:a},Bn),r.restoredAgentDef&&(M=r.restoredAgentDef),B(`tengu_session_resumed`,{entrypoint:`cli_flag`,success:!0,resume_duration_ms:Math.round(performance.now()-t)})}catch(t){B(`tengu_session_resumed`,{entrypoint:`cli_flag`,success:!1}),H(t),await X(N,`Failed to resume session ${e}`)}}if(ae)try{let e=await ae,t=Kr(e,e=>!e.success);t>0&&process.stderr.write(b.yellow(`Warning: ${t}/${e.length} file(s) failed to download.\n`))}catch(e){return await X(N,`Error downloading files: ${L(e)}`)}let u=r??(Array.isArray(t)?{messages:t,fileHistorySnapshots:void 0,agentName:void 0,agentColor:void 0,restoredAgentDef:M,initialState:Fn,contentReplacements:void 0}:void 0);u?(zp(n),Bp(n),await Uu(N,{getFpsMetrics:sn,stats:un,initialState:u.initialState},{...zn,mainThreadAgentDefinition:u.restoredAgentDef??M,initialMessages:u.messages,initialFileHistorySnapshots:u.fileHistorySnapshots,initialContentReplacements:u.contentReplacements,initialAgentName:u.agentName,initialAgentColor:u.agentColor},ld)):await _d(N,{getFpsMetrics:sn,stats:un,initialState:Fn},oa(Ye()),{...zn,initialSearchQuery:s,forkSession:n.forkSession,filterByPr:l})}else{let e=xn&&Sn.length===0?xn:void 0;U(`action_after_hooks`),zp(n),Bp(n),cc(vp?.isCoordinatorMode()?`coordinator`:`normal`);let t=null;n.deepLinkOrigin?(B(`tengu_deep_link_opened`,{has_prefill:!!n.prefill,has_repo:!!n.deepLinkRepo}),t=co(ou({cwd:gr(),prefillLength:n.prefill?.length,repo:n.deepLinkRepo,lastFetch:n.deepLinkLastFetch===void 0?void 0:new Date(n.deepLinkLastFetch)}),`warning`)):n.prefill&&(t=co(`Launched with a pre-filled prompt — review it before pressing Enter.`,`warning`));let r=t?[t,...Sn]:Sn.length>0?Sn:void 0;await Uu(N,{getFpsMetrics:sn,stats:un,initialState:Fn},{...zn,initialMessages:r,pendingHookMessages:e},ld)}}).version(`2.6.11 (Claude Code)`,`-v, --version`,`Output the version number`),n.option(`-w, --worktree [name]`,`Create a new git worktree for this session (optionally specify a name)`),n.option(`--tmux`,`Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.`),$a()&&n.addOption(new J(`--advisor <model>`,`Enable the server-side advisor tool with the specified model (alias or full ID).`).hideHelp()),process.env.USER_TYPE===`ant`&&(n.addOption(new J(`--delegate-permissions`,`[ANT-ONLY] Alias for --permission-mode auto.`).implies({permissionMode:`auto`})),n.addOption(new J(`--dangerously-skip-permissions-with-classifiers`,`[ANT-ONLY] Deprecated alias for --permission-mode auto.`).hideHelp().implies({permissionMode:`auto`})),n.addOption(new J(`--afk`,`[ANT-ONLY] Deprecated alias for --permission-mode auto.`).hideHelp().implies({permissionMode:`auto`})),n.addOption(new J(`--tasks [id]`,`[ANT-ONLY] Tasks mode: watch for tasks and auto-process them. Optional id is used as both the task list ID and agent ID (defaults to "tasklist").`).argParser(String).hideHelp()),n.option(`--agent-teams`,`[ANT-ONLY] Force Claude to use multi-agent mode for solving problems`,()=>!0)),n.addOption(new J(`--enable-auto-mode`,`Opt in to auto mode`).hideHelp()),n.addOption(new J(`--proactive`,`Start in proactive autonomous mode`)),n.addOption(new J(`--brief`,`Enable SendUserMessage tool for agent-to-user communication`)),n.addOption(new J(`--assistant`,`Force assistant mode (Agent SDK daemon use)`).hideHelp()),n.addOption(new J(`--channels <servers...>`,`MCP servers whose channel notifications (inbound push) should register this session. Space-separated server names.`).hideHelp()),n.addOption(new J(`--dangerously-load-development-channels <servers...>`,`Load channel servers not on the approved allowlist. For local channel development only. Shows a confirmation dialog at startup.`).hideHelp()),n.addOption(new J(`--agent-id <id>`,`Teammate agent ID`).hideHelp()),n.addOption(new J(`--agent-name <name>`,`Teammate display name`).hideHelp()),n.addOption(new J(`--team-name <name>`,`Team name for swarm coordination`).hideHelp()),n.addOption(new J(`--agent-color <color>`,`Teammate UI color`).hideHelp()),n.addOption(new J(`--plan-mode-required`,`Require plan mode before implementation`).hideHelp()),n.addOption(new J(`--parent-session-id <id>`,`Parent session ID for analytics correlation`).hideHelp()),n.addOption(new J(`--teammate-mode <mode>`,`How to spawn teammates: "tmux", "in-process", or "auto"`).choices([`auto`,`tmux`,`in-process`]).hideHelp()),n.addOption(new J(`--agent-type <type>`,`Custom agent type for this teammate`).hideHelp()),n.addOption(new J(`--sdk-url <url>`,`Use remote WebSocket endpoint for SDK I/O streaming (only with -p and stream-json format)`).hideHelp()),n.addOption(new J(`--teleport [session]`,`Resume a teleport session, optionally specify session ID`).hideHelp()),n.addOption(new J(`--remote [description]`,`Create a remote session with the given description`).hideHelp()),n.addOption(new J(`--remote-control [name]`,`Start an interactive session with Remote Control enabled (optionally named)`).argParser(e=>e||!0).hideHelp()),n.addOption(new J(`--rc [name]`,`Alias for --remote-control`).argParser(e=>e||!0).hideHelp()),U(`run_main_options_built`);let r=process.argv.includes(`-p`)||process.argv.includes(`--print`),i=process.argv.some(e=>e.startsWith(`cc://`)||e.startsWith(`cc+unix://`));if(r&&!i)return U(`run_before_parse`),await n.parseAsync(process.argv),U(`run_after_parse`),n;let a=n.command(`mcp`).description(`Configure and manage MCP servers`).configureHelp(t()).enablePositionalOptions();a.command(`serve`).description(`Start the Claude Code MCP server`).option(`-d, --debug`,`Enable debug mode`,()=>!0).option(`--verbose`,`Override verbose mode setting from config`,()=>!0).action(async({debug:e,verbose:t})=>{let{mcpServeHandler:n}=await import(`./mcp-BrN_Tbq5.js`);await n({debug:e,verbose:t})}),Xf(a),Tc()&&Zf(a),a.command(`remove <name>`).description(`Remove an MCP server`).option(`-s, --scope <scope>`,`Configuration scope (local, user, or project) - if not specified, removes from whichever scope it exists in`).action(async(e,t)=>{let{mcpRemoveHandler:n}=await import(`./mcp-BrN_Tbq5.js`);await n(e,t)}),a.command(`list`).description(`List configured MCP servers. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.`).action(async()=>{let{mcpListHandler:e}=await import(`./mcp-BrN_Tbq5.js`);await e()}),a.command(`get <name>`).description(`Get details about an MCP server. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.`).action(async e=>{let{mcpGetHandler:t}=await import(`./mcp-BrN_Tbq5.js`);await t(e)}),a.command(`add-json <name> <json>`).description(`Add an MCP server (stdio or SSE) with a JSON string`).option(`-s, --scope <scope>`,`Configuration scope (local, user, or project)`,`local`).option(`--client-secret`,`Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var)`).action(async(e,t,n)=>{let{mcpAddJsonHandler:r}=await import(`./mcp-BrN_Tbq5.js`);await r(e,t,n)}),a.command(`add-from-claude-desktop`).description(`Import MCP servers from Claude Desktop (Mac and WSL only)`).option(`-s, --scope <scope>`,`Configuration scope (local, user, or project)`,`local`).action(async e=>{let{mcpAddFromDesktopHandler:t}=await import(`./mcp-BrN_Tbq5.js`);await t(e)}),a.command(`reset-project-choices`).description(`Reset all approved and rejected project-scoped (.mcp.json) servers within this project`).action(async()=>{let{mcpResetChoicesHandler:e}=await import(`./mcp-BrN_Tbq5.js`);await e()}),n.command(`server`).description(`Start a Claude Code session server`).option(`--port <number>`,`HTTP port`,`0`).option(`--host <string>`,`Bind address`,`0.0.0.0`).option(`--auth-token <token>`,`Bearer token for auth`).option(`--unix <path>`,`Listen on a unix domain socket`).option(`--workspace <dir>`,`Default working directory for sessions that do not specify cwd`).option(`--idle-timeout <ms>`,`Idle timeout for detached sessions in ms (0 = never expire)`,`600000`).option(`--max-sessions <n>`,`Maximum concurrent sessions (0 = unlimited)`,`32`).action(async e=>{let{randomBytes:t}=await import(`crypto`),{startServer:n}=await import(`./server-C5XZSlto.js`),{SessionManager:r}=await import(`./sessionManager-Dw72ZUTg.js`),{DangerousBackend:i}=await import(`./dangerousBackend-BU_PHGR2.js`),{printBanner:a}=await import(`./serverBanner-WlSYP-f8.js`),{createServerLogger:o}=await import(`./serverLog-DtsUvDiY.js`),{writeServerLock:s,removeServerLock:c,probeRunningServer:l}=await import(`./lockfile-DBwdlC3K.js`),u=await l();u&&(process.stderr.write(`A claude server is already running (pid ${u.pid}) at ${u.httpUrl}\n`),process.exit(1));let d=e.authToken??`sk-ant-cc-${t(16).toString(`base64url`)}`,f={port:parseInt(e.port,10),host:e.host,authToken:d,unix:e.unix,workspace:e.workspace,idleTimeoutMs:parseInt(e.idleTimeout,10),maxSessions:parseInt(e.maxSessions,10)},p=new r(new i,{idleTimeoutMs:f.idleTimeoutMs,maxSessions:f.maxSessions}),m=n(f,p,o()),ee=m.port??f.port;a(f,d,ee),await s({pid:process.pid,port:ee,host:f.host,httpUrl:f.unix?`unix:${f.unix}`:`http://${f.host}:${ee}`,startedAt:Date.now()});let h=!1,g=async()=>{h||(h=!0,m.stop(!0),await p.destroyAll(),await c(),process.exit(0))};process.once(`SIGINT`,()=>void g()),process.once(`SIGTERM`,()=>void g())}),n.command(`ssh <host> [dir]`).description(`Run Claude Code on a remote host over SSH. Deploys the binary and tunnels API auth back through your local machine — no remote setup needed.`).option(`--permission-mode <mode>`,`Permission mode for the remote session`).option(`--dangerously-skip-permissions`,`Skip all permission prompts on the remote (dangerous)`).option(`--remote-bin <command>`,`Custom remote binary command (skips probe/deploy). Example: --remote-bin 'bun /path/to/project/dist/cli.js'`).option(`--local`,`e2e test mode — spawn the child CLI locally (skip ssh/deploy). Exercises the auth proxy and unix-socket plumbing without a remote host.`).action(async()=>{process.stderr.write(`Usage: claude ssh <user@host | ssh-config-alias> [dir]
|
|
1090
1090
|
|
|
1091
1091
|
Runs Claude Code on a remote Linux host. You don't need to install
|
|
1092
1092
|
anything on the remote or run \`claude auth login\` there — the binary is
|
|
1093
1093
|
deployed over SSH and API auth tunnels back through your local machine.
|
|
1094
|
-
`),process.exit(1)}),n.command(`open <cc-url>`).description(`Connect to a Claude Code server (internal — use cc:// URLs)`).option(`-p, --print [prompt]`,`Print mode (headless)`).option(`--output-format <format>`,`Output format: text, json, stream-json`,`text`).action(async(e,t)=>{let{parseConnectUrl:n}=await import(`./parseConnectUrl-BS6i9JPo.js`),{serverUrl:r,authToken:i}=n(e),a;try{let e=await dp({serverUrl:r,authToken:i,cwd:Ye(),dangerouslySkipPermissions:Q?.dangerouslySkipPermissions});e.workDir&&(qe(e.workDir),Pe(e.workDir)),Fe(r),a=e.config}catch(e){console.error(e instanceof up?e.message:String(e)),process.exit(1)}let{runConnectHeadless:o}=await import(`./connectHeadless-CwsFt-Mh.js`),s=typeof t.print==`string`?t.print:``,c=t.print===!0;await o(a,s,t.outputFormat,c)});let o=n.command(`auth`).description(`Manage authentication`).configureHelp(t());o.command(`login`).description(`Sign in to your Anthropic account`).option(`--email <email>`,`Pre-populate email address on the login page`).option(`--sso`,`Force SSO login flow`).option(`--console`,`Use Anthropic Console (API usage billing) instead of Claude subscription`).option(`--claudeai`,`Use Claude subscription (default)`).action(async({email:e,sso:t,console:n,claudeai:r})=>{let{authLogin:i}=await import(`./auth-
|
|
1094
|
+
`),process.exit(1)}),n.command(`open <cc-url>`).description(`Connect to a Claude Code server (internal — use cc:// URLs)`).option(`-p, --print [prompt]`,`Print mode (headless)`).option(`--output-format <format>`,`Output format: text, json, stream-json`,`text`).action(async(e,t)=>{let{parseConnectUrl:n}=await import(`./parseConnectUrl-BS6i9JPo.js`),{serverUrl:r,authToken:i}=n(e),a;try{let e=await dp({serverUrl:r,authToken:i,cwd:Ye(),dangerouslySkipPermissions:Q?.dangerouslySkipPermissions});e.workDir&&(qe(e.workDir),Pe(e.workDir)),Fe(r),a=e.config}catch(e){console.error(e instanceof up?e.message:String(e)),process.exit(1)}let{runConnectHeadless:o}=await import(`./connectHeadless-CwsFt-Mh.js`),s=typeof t.print==`string`?t.print:``,c=t.print===!0;await o(a,s,t.outputFormat,c)});let o=n.command(`auth`).description(`Manage authentication`).configureHelp(t());o.command(`login`).description(`Sign in to your Anthropic account`).option(`--email <email>`,`Pre-populate email address on the login page`).option(`--sso`,`Force SSO login flow`).option(`--console`,`Use Anthropic Console (API usage billing) instead of Claude subscription`).option(`--claudeai`,`Use Claude subscription (default)`).action(async({email:e,sso:t,console:n,claudeai:r})=>{let{authLogin:i}=await import(`./auth-Cp7Nt0ik.js`);await i({email:e,sso:t,console:n,claudeai:r})}),o.command(`status`).description(`Show authentication status`).option(`--json`,`Output as JSON (default)`).option(`--text`,`Output as human-readable text`).action(async e=>{let{authStatus:t}=await import(`./auth-Cp7Nt0ik.js`);await t(e)}),o.command(`logout`).description(`Log out from your Anthropic account`).action(async()=>{let{authLogout:e}=await import(`./auth-Cp7Nt0ik.js`);await e()});let s=()=>new J(`--cowork`,`Use cowork_plugins directory`).hideHelp(),l=n.command(`plugin`).alias(`plugins`).description(`Manage Claude Code plugins`).configureHelp(t());l.command(`validate <path>`).description(`Validate a plugin or marketplace manifest`).addOption(s()).action(async(e,t)=>{let{pluginValidateHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),l.command(`list`).description(`List installed plugins`).option(`--json`,`Output as JSON`).option(`--available`,`Include available plugins from marketplaces (requires --json)`).addOption(s()).action(async e=>{let{pluginListHandler:t}=await import(`./plugins-BHoniP5f.js`);await t(e)});let u=l.command(`marketplace`).description(`Manage Claude Code marketplaces`).configureHelp(t());if(u.command(`add <source>`).description(`Add a marketplace from a URL, path, or GitHub repo`).addOption(s()).option(`--sparse <paths...>`,`Limit checkout to specific directories via git sparse-checkout (for monorepos). Example: --sparse .claude-plugin plugins`).option(`--scope <scope>`,`Where to declare the marketplace: user (default), project, or local`).action(async(e,t)=>{let{marketplaceAddHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),u.command(`list`).description(`List all configured marketplaces`).option(`--json`,`Output as JSON`).addOption(s()).action(async e=>{let{marketplaceListHandler:t}=await import(`./plugins-BHoniP5f.js`);await t(e)}),u.command(`remove <name>`).alias(`rm`).description(`Remove a configured marketplace`).addOption(s()).action(async(e,t)=>{let{marketplaceRemoveHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),u.command(`update [name]`).description(`Update marketplace(s) from their source - updates all if no name specified`).addOption(s()).action(async(e,t)=>{let{marketplaceUpdateHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),l.command(`install <plugin>`).alias(`i`).description(`Install a plugin from available marketplaces (use plugin@marketplace for specific marketplace)`).option(`-s, --scope <scope>`,`Installation scope: user, project, or local`,`user`).addOption(s()).action(async(e,t)=>{let{pluginInstallHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),l.command(`uninstall <plugin>`).alias(`remove`).alias(`rm`).description(`Uninstall an installed plugin`).option(`-s, --scope <scope>`,`Uninstall from scope: user, project, or local`,`user`).option(`--keep-data`,`Preserve the plugin's persistent data directory (~/.claude/plugins/data/{id}/)`).addOption(s()).action(async(e,t)=>{let{pluginUninstallHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),l.command(`enable <plugin>`).description(`Enable a disabled plugin`).option(`-s, --scope <scope>`,`Installation scope: ${Ll.join(`, `)} (default: auto-detect)`).addOption(s()).action(async(e,t)=>{let{pluginEnableHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),l.command(`disable [plugin]`).description(`Disable an enabled plugin`).option(`-a, --all`,`Disable all enabled plugins`).option(`-s, --scope <scope>`,`Installation scope: ${Ll.join(`, `)} (default: auto-detect)`).addOption(s()).action(async(e,t)=>{let{pluginDisableHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),l.command(`update <plugin>`).description(`Update a plugin to the latest version (restart required to apply)`).option(`-s, --scope <scope>`,`Installation scope: ${Il.join(`, `)} (default: user)`).addOption(s()).action(async(e,t)=>{let{pluginUpdateHandler:n}=await import(`./plugins-BHoniP5f.js`);await n(e,t)}),n.command(`setup-token`).description(`Set up a long-lived authentication token (requires Claude subscription)`).action(async()=>{let[{setupTokenHandler:e},{createRoot:t}]=await Promise.all([import(`./util-9vJ9WIeZ.js`),import(`./src-poaoYkuc.js`)]);await e(await t(ql(!1)))}),n.command(`agents`).description(`List configured agents`).option(`--setting-sources <sources>`,`Comma-separated list of setting sources to load (user, project, local).`).action(async()=>{let{agentsHandler:e}=await import(`./agents-DD7gQVZD.js`);await e(),process.exit(0)}),go()!==`disabled`){let e=n.command(`auto-mode`).description(`Inspect auto mode classifier configuration`);e.command(`defaults`).description(`Print the default auto mode environment, allow, and deny rules as JSON`).action(async()=>{let{autoModeDefaultsHandler:e}=await import(`./autoMode-BswSpjo5.js`);e(),process.exit(0)}),e.command(`config`).description(`Print the effective auto mode config as JSON: your settings where set, defaults otherwise`).action(async()=>{let{autoModeConfigHandler:e}=await import(`./autoMode-BswSpjo5.js`);e(),process.exit(0)}),e.command(`critique`).description(`Get AI feedback on your custom auto mode rules`).option(`--model <model>`,`Override which model is used`).action(async e=>{let{autoModeCritiqueHandler:t}=await import(`./autoMode-BswSpjo5.js`);await t(e),process.exit()})}{let e=n.command(`autonomy`).description(`Inspect and manage automatic autonomy runs and flows`);e.command(`status`).description(`Print autonomy run, flow, team, pipe, and remote-control status`).option(`--deep`,`Include teams, pipes, daemon, and remote-control sections`).action(async e=>{let{autonomyStatusHandler:t}=await import(`./autonomy-CNJQwoAQ.js`);await t(e),process.exit(0)}),e.command(`runs [limit]`).description(`List recent autonomy runs`).action(async e=>{let{autonomyRunsHandler:t}=await import(`./autonomy-CNJQwoAQ.js`);await t(e),process.exit(0)}),e.command(`flows [limit]`).description(`List recent autonomy flows`).action(async e=>{let{autonomyFlowsHandler:t}=await import(`./autonomy-CNJQwoAQ.js`);await t(e),process.exit(0)});let t=e.command(`flow <flowId>`).description(`Inspect a single autonomy flow`).action(async e=>{let{autonomyFlowHandler:t}=await import(`./autonomy-CNJQwoAQ.js`);await t(e),process.exit(0)});t.command(`cancel <flowId>`).description(`Cancel a queued, waiting, or running autonomy flow`).action(async e=>{let{autonomyFlowCancelHandler:t}=await import(`./autonomy-CNJQwoAQ.js`);await t(e),process.exit(0)}),t.command(`resume <flowId>`).description(`Resume a waiting autonomy flow`).action(async e=>{let{autonomyFlowResumeHandler:t}=await import(`./autonomy-CNJQwoAQ.js`);await t(e),process.exit(0)})}if(n.command(`remote-control`,{hidden:!0}).alias(`rc`).description(`Connect your local environment for remote-control sessions via claude.ai/code`).action(async()=>{let{bridgeMain:e}=await import(`./bridgeMain-CEpOBx8Z.js`);await e(process.argv.slice(3))}),n.command(`assistant [sessionId]`).description(`Attach the REPL as a client to a running bridge session. Discovers sessions via API if no sessionId given.`).action(()=>{process.stderr.write(`Usage: claude assistant [sessionId]
|
|
1095
1095
|
|
|
1096
1096
|
Attach the REPL as a viewer client to a running bridge session.
|
|
1097
1097
|
Omit sessionId to discover and pick from available sessions.
|
|
1098
|
-
`),process.exit(1)}),n.command(`doctor`).description(`Check the health of your Claude Code auto-updater. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.`).action(async()=>{let[{doctorHandler:e},{createRoot:t}]=await Promise.all([import(`./util-
|
|
1098
|
+
`),process.exit(1)}),n.command(`doctor`).description(`Check the health of your Claude Code auto-updater. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.`).action(async()=>{let[{doctorHandler:e},{createRoot:t}]=await Promise.all([import(`./util-9vJ9WIeZ.js`),import(`./src-poaoYkuc.js`)]);await e(await t(ql(!1)))}),process.env.USER_TYPE===`ant`&&n.command(`up`).description(`[ANT-ONLY] Initialize or upgrade the local dev environment using the "# claude up" section of the nearest CLAUDE.md`).action(async()=>{let{up:e}=await import(`./up-D-U4wUCe.js`);await e()}),process.env.USER_TYPE===`ant`&&n.command(`rollback [target]`).description(`[ANT-ONLY] Roll back to a previous release
|
|
1099
1099
|
|
|
1100
1100
|
Examples:
|
|
1101
1101
|
claude rollback Go 1 version back from current
|
|
1102
1102
|
claude rollback 3 Go 3 versions back from current
|
|
1103
|
-
claude rollback 2.0.73-dev.20251217.t190658 Roll back to a specific version`).option(`-l, --list`,`List recent published versions with ages`).option(`--dry-run`,`Show what would be installed without installing`).option(`--safe`,`Roll back to the server-pinned safe version (set by oncall during incidents)`).action(async(e,t)=>{let{rollback:n}=await import(`./rollback-DbSpxmJE.js`);await n(e,t)}),n.command(`install [target]`).description(`Install Claude Code native build. Use [target] to specify version (stable, latest, or specific version)`).option(`--force`,`Force installation even if already installed`).action(async(e,t)=>{let{installHandler:n}=await import(`./util-
|
|
1103
|
+
claude rollback 2.0.73-dev.20251217.t190658 Roll back to a specific version`).option(`-l, --list`,`List recent published versions with ages`).option(`--dry-run`,`Show what would be installed without installing`).option(`--safe`,`Roll back to the server-pinned safe version (set by oncall during incidents)`).action(async(e,t)=>{let{rollback:n}=await import(`./rollback-DbSpxmJE.js`);await n(e,t)}),n.command(`install [target]`).description(`Install Claude Code native build. Use [target] to specify version (stable, latest, or specific version)`).option(`--force`,`Force installation even if already installed`).action(async(e,t)=>{let{installHandler:n}=await import(`./util-9vJ9WIeZ.js`);await n(e,t)}),n.command(`update`).description(`Update claude-code-best (ccb) to the latest version`).action(async()=>{let{updateCCB:e}=await import(`./updateCCB-Dgb2ed9v.js`);await e()}),process.env.USER_TYPE===`ant`){if(n.command(`log`).description(`[ANT-ONLY] Manage conversation logs.`).argument(`[number|sessionId]`,`A number (0, 1, 2, etc.) to display a specific log, or the sesssion ID (uuid) of a log`,e=>Va(e)||Number(e)).action(async e=>{let{logHandler:t}=await import(`./ant-PhgMZT08.js`);await t(e)}),n.command(`error`).description(`[ANT-ONLY] View error logs. Optionally provide a number (0, -1, -2, etc.) to display a specific log.`).argument(`[number]`,`A number (0, 1, 2, etc.) to display a specific log`,parseInt).action(async e=>{let{errorHandler:t}=await import(`./ant-PhgMZT08.js`);await t(e)}),n.command(`export`).description(`[ANT-ONLY] Export a conversation to a text file.`).usage(`<source> <outputFile>`).argument(`<source>`,`Session ID, log index (0, 1, 2...), or path to a .json/.jsonl log file`).argument(`<outputFile>`,`Output file path for the exported text`).addHelpText(`after`,`
|
|
1104
1104
|
Examples:
|
|
1105
1105
|
$ claude export 0 conversation.txt Export conversation at log index 0
|
|
1106
1106
|
$ claude export <uuid> conversation.txt Export conversation by session ID
|
|
1107
1107
|
$ claude export input.json output.txt Render JSON log file to text
|
|
1108
|
-
$ claude export <uuid>.jsonl output.txt Render JSONL session file to text`).action(async(e,t)=>{let{exportHandler:n}=await import(`./ant-
|
|
1108
|
+
$ claude export <uuid>.jsonl output.txt Render JSONL session file to text`).action(async(e,t)=>{let{exportHandler:n}=await import(`./ant-PhgMZT08.js`);await n(e,t)}),process.env.USER_TYPE===`ant`){let e=n.command(`task`).description(`[ANT-ONLY] Manage task list tasks`);e.command(`create <subject>`).description(`Create a new task`).option(`-d, --description <text>`,`Task description`).option(`-l, --list <id>`,`Task list ID (defaults to "tasklist")`).action(async(e,t)=>{let{taskCreateHandler:n}=await import(`./ant-PhgMZT08.js`);await n(e,t)}),e.command(`list`).description(`List all tasks`).option(`-l, --list <id>`,`Task list ID (defaults to "tasklist")`).option(`--pending`,`Show only pending tasks`).option(`--json`,`Output as JSON`).action(async e=>{let{taskListHandler:t}=await import(`./ant-PhgMZT08.js`);await t(e)}),e.command(`get <id>`).description(`Get details of a task`).option(`-l, --list <id>`,`Task list ID (defaults to "tasklist")`).action(async(e,t)=>{let{taskGetHandler:n}=await import(`./ant-PhgMZT08.js`);await n(e,t)}),e.command(`update <id>`).description(`Update a task`).option(`-l, --list <id>`,`Task list ID (defaults to "tasklist")`).option(`-s, --status <status>`,`Set status (${ol.join(`, `)})`).option(`--subject <text>`,`Update subject`).option(`-d, --description <text>`,`Update description`).option(`--owner <agentId>`,`Set owner`).option(`--clear-owner`,`Clear owner`).action(async(e,t)=>{let{taskUpdateHandler:n}=await import(`./ant-PhgMZT08.js`);await n(e,t)}),e.command(`dir`).description(`Show the tasks directory path`).option(`-l, --list <id>`,`Task list ID (defaults to "tasklist")`).action(async e=>{let{taskDirHandler:t}=await import(`./ant-PhgMZT08.js`);await t(e)})}n.command(`completion <shell>`,{hidden:!0}).description(`Generate shell completion script (bash, zsh, or fish)`).option(`--output <file>`,`Write completion script directly to a file instead of stdout`).action(async(e,t)=>{let{completionHandler:r}=await import(`./ant-PhgMZT08.js`);await r(e,t,n)})}return U(`run_before_parse`),await n.parseAsync(process.argv),U(`run_after_parse`),U(`main_after_run`),Zr(),n}async function Rp({hasInitialPrompt:e,hasStdin:t,verbose:n,debug:r,debugToStderr:i,print:a,outputFormat:o,inputFormat:s,numAllowedTools:u,numDisallowedTools:d,mcpClientCount:f,worktreeEnabled:p,skipWebFetchPreflight:m,githubActionInputs:ee,dangerouslySkipPermissionsPassed:h,permissionMode:g,modeIsBypass:te,allowDangerouslySkipPermissionsPassed:ne,systemPromptFlag:re,appendSystemPromptFlag:_,thinkingConfig:ie,assistantActivationPath:ae}){try{B(`tengu_init`,{entrypoint:`claude`,hasInitialPrompt:e,hasStdin:t,verbose:n,debug:r,debugToStderr:i,print:a,outputFormat:o,inputFormat:s,numAllowedTools:u,numDisallowedTools:d,mcpClientCount:f,worktree:p,skipWebFetchPreflight:m,...ee&&{githubActionInputs:ee},dangerouslySkipPermissionsPassed:h,permissionMode:g,modeIsBypass:te,inProtectedNamespace:l(),allowDangerouslySkipPermissionsPassed:ne,thinkingType:ie.type,...ie.type===`enabled`&&{thinkingBudgetTokens:ie.budgetTokens},...re&&{systemPromptFlag:re},..._&&{appendSystemPromptFlag:_},is_simple:c()||void 0,is_coordinator:vp?.isCoordinatorMode()?!0:void 0,...ae&&{assistantActivationPath:ae},autoUpdatesChannel:St().autoUpdatesChannel??`latest`,...process.env.USER_TYPE===`ant`?(()=>{let e=gr(),t=Tr(e),n=t?cu(t,e)||`.`:void 0;return n?{relativeProjectPath:n}:{}})():{}})}catch(e){H(e)}}function zp(t){if(t.proactive||m(process.env.CLAUDE_CODE_PROACTIVE)){let t=($c(),e(Xc));t.isProactiveActive()||t.activateProactive(`command`)}}function Bp(t){let n=t.brief,r=m(process.env.CLAUDE_CODE_BRIEF);if(!n&&!r)return;let{isBriefEntitled:i}=(zo(),e(si)),a=i();a&&Ke(!0),B(`tengu_brief_mode_enabled`,{enabled:a,gated:!a,source:r?`env`:`flag`})}function Vp(){(process.stderr.isTTY?process.stderr:process.stdout.isTTY?process.stdout:void 0)?.write(ve)}function Hp(e){if(typeof e!=`object`||!e)return{};let t=e,n=t.teammateMode;return{agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,teamName:typeof t.teamName==`string`?t.teamName:void 0,agentColor:typeof t.agentColor==`string`?t.agentColor:void 0,planModeRequired:typeof t.planModeRequired==`boolean`?t.planModeRequired:void 0,parentSessionId:typeof t.parentSessionId==`string`?t.parentSessionId:void 0,teammateMode:n===`auto`||n===`tmux`||n===`in-process`?n:void 0,agentType:typeof t.agentType==`string`?t.agentType:void 0}}export{Fp as main};
|