claude-code-zanii 2.8.4
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/README.md +146 -0
- package/dist/chunks/AddWorkspaceDirectory-y_rd6sRl.js +1 -0
- package/dist/chunks/App-DgWSavG1.js +1 -0
- package/dist/chunks/ApproveApiKey-CJKWha-a.js +1 -0
- package/dist/chunks/ApproveApiKey-DTs2ExZH.js +1 -0
- package/dist/chunks/AssistantSessionChooser-BAhVk4id.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-XU_JPh7R.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-DV0Pi7ys.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-6erm_8Fn.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CjBvzB5s.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-ts0XnWwl.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DySPdSqQ.js +1 -0
- package/dist/chunks/CustomSelect-DqZxzBZP.js +1 -0
- package/dist/chunks/DesktopHandoff-5c90JK88.js +1 -0
- package/dist/chunks/DevChannelsDialog-DCMderzu.js +1 -0
- package/dist/chunks/Dialog-Dgg8bqcG.js +1 -0
- package/dist/chunks/DiffDialog-BU765aqh.js +6 -0
- package/dist/chunks/Doctor-B73iDB-d.js +3 -0
- package/dist/chunks/Doctor-CLZDdNRo.js +1 -0
- package/dist/chunks/ExitFlow-DBqn2mUf.js +2 -0
- package/dist/chunks/Feedback-D-JHabwi.js +2 -0
- package/dist/chunks/Grove-D-uQNMMo.js +11 -0
- package/dist/chunks/HybridTransport-B-G4QJcy.js +4 -0
- package/dist/chunks/ITermBackend-KP1vKsRN.js +1 -0
- package/dist/chunks/InProcessTransport-ByBEKxrQ.js +1 -0
- package/dist/chunks/InvalidConfigDialog-CMqiZ5nG.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-CjPCKzVZ.js +1 -0
- package/dist/chunks/ListItem-B6MyhHvM.js +1 -0
- package/dist/chunks/MCPConnectionManager-BJ8PcYPe.js +1 -0
- package/dist/chunks/Message-DNxJ_tMS.js +1 -0
- package/dist/chunks/MessageSelector-D79Ug71B.js +3 -0
- package/dist/chunks/Messages-CtIbkB2M.js +11 -0
- package/dist/chunks/Onboarding-DVrgKrI9.js +1 -0
- package/dist/chunks/OverageCreditUpsell-D_td1ss4.js +1 -0
- package/dist/chunks/PermissionDialog-BCS22yEO.js +1 -0
- package/dist/chunks/PermissionDialog-C5O1fL53.js +1 -0
- package/dist/chunks/PermissionRequestTitle-CtlbBU9t.js +1 -0
- package/dist/chunks/PluginSettings-OPrg-_3N.js +17 -0
- package/dist/chunks/PressEnterToContinue-DmzxIgbZ.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-CcsKj5DK.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-JedFdsxU.js +1 -0
- package/dist/chunks/REPL-ByhyIRnf.js +1 -0
- package/dist/chunks/REPL-Clve-8zC.js +157 -0
- package/dist/chunks/RemoteCallout-BZcabEKb.js +1 -0
- package/dist/chunks/RemoteSessionManager-C2PIFDHt.js +1 -0
- package/dist/chunks/ResumeConversation-D3ZRTFcF.js +1 -0
- package/dist/chunks/SSETransport-DmZWnH0k.js +4 -0
- package/dist/chunks/SearchBox-DQg2Ph0V.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-CLO4nt6N.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BVfBaOOU.js +2 -0
- package/dist/chunks/SentryErrorBoundary-DIaVFad-.js +1 -0
- package/dist/chunks/Settings-rOCxQdS8.js +2 -0
- package/dist/chunks/TeleportProgress-CP8IY6bz.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DMmHgBqo.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-D5wEAW1-.js +1 -0
- package/dist/chunks/ThemePicker-Bgr7yOQB.js +1 -0
- package/dist/chunks/TmuxBackend-BzbtUtP1.js +9 -0
- package/dist/chunks/TrustDialog-BI5U3BQ0.js +1 -0
- package/dist/chunks/TungstenTool-CiQclNwj.js +1 -0
- package/dist/chunks/TungstenTool-kMqy-ifa.js +1 -0
- package/dist/chunks/ValidationErrorsList-DprGtB2w.js +2 -0
- package/dist/chunks/WelcomeV2-C4vfBnIy.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-BSoezOCE.js +2 -0
- package/dist/chunks/add-dir-DpOmv6kv.js +1 -0
- package/dist/chunks/agentDisplay-DuYEwOwO.js +1 -0
- package/dist/chunks/agents-BlurXZrF.js +2 -0
- package/dist/chunks/agents-DhZf7ftU.js +103 -0
- package/dist/chunks/ajv-CDrSAj3O.js +8 -0
- package/dist/chunks/analytics-i6X1et4O.js +1 -0
- package/dist/chunks/ant-D9hd_iYy.js +1 -0
- package/dist/chunks/api-CoaOHwDQ.js +4 -0
- package/dist/chunks/api-DvyGR-L7.js +1 -0
- package/dist/chunks/api-YHYC4Zdk.js +1 -0
- package/dist/chunks/artifacts-BMAYdaqh.js +1 -0
- package/dist/chunks/asciicast-DpHRoebc.js +1 -0
- package/dist/chunks/asciicast-HG1EoAQe.js +4 -0
- package/dist/chunks/assistant-D4-qcNT1.js +1 -0
- package/dist/chunks/assistant-DO2ZmZn1.js +1 -0
- package/dist/chunks/assistant-Dd86NmJM.js +1 -0
- package/dist/chunks/attributionHooks-BUmHrLhB.js +1 -0
- package/dist/chunks/attributionTrailer-r2Pbpu2N.js +1 -0
- package/dist/chunks/auth-CF3BGNYT.js +1 -0
- package/dist/chunks/auth-DwWwG43F.js +1 -0
- package/dist/chunks/auth-V_Xk2iea.js +1 -0
- package/dist/chunks/autoMode-DUksX5_i.js +45 -0
- package/dist/chunks/autoModeDenials-0CPO-Jbu.js +1 -0
- package/dist/chunks/autonomy-C5mNhAdz.js +21 -0
- package/dist/chunks/autonomy-CLt1dWaC.js +1 -0
- package/dist/chunks/autonomyPanel-rioFnrQO.js +1 -0
- package/dist/chunks/axios-DPuSPBlH.js +1 -0
- package/dist/chunks/axios-Zh7qGPze.js +12 -0
- package/dist/chunks/backgroundHousekeeping-BGtfqu-J.js +1 -0
- package/dist/chunks/backgroundHousekeeping-BqKZEvy0.js +17 -0
- package/dist/chunks/banner-BGLr3KYQ.js +2 -0
- package/dist/chunks/base64-js-B1tFNiG0.js +1 -0
- package/dist/chunks/bedrockClient-BFzWuhQK.js +15 -0
- package/dist/chunks/bg-B-YgGwLj.js +9 -0
- package/dist/chunks/bg-IU4gG3jc.js +1 -0
- package/dist/chunks/branch-BWY5W7hf.js +3 -0
- package/dist/chunks/break-cache-CY-O23fJ.js +8 -0
- package/dist/chunks/bridge-CqWd70vK.js +2 -0
- package/dist/chunks/bridgeConfig-CWO8AmCY.js +1 -0
- package/dist/chunks/bridgeConfig-D38y9eXn.js +1 -0
- package/dist/chunks/bridgeConfig-EwUq__ct.js +1 -0
- package/dist/chunks/bridgeConfig-GYR-LUiu.js +1 -0
- package/dist/chunks/bridgeEnabled-DKqmLnKO.js +1 -0
- package/dist/chunks/bridgeEnabled-DZIGDtfY.js +1 -0
- package/dist/chunks/bridgeMain-CXVks2ND.js +1 -0
- package/dist/chunks/bridgeMain-D4nsECwJ.js +68 -0
- package/dist/chunks/bridgeMessaging-BUOZU_ba.js +1 -0
- package/dist/chunks/bridgePointer-BpzIEsD_.js +1 -0
- package/dist/chunks/browser-D1vC3BNd.js +1 -0
- package/dist/chunks/btw-CVXJwoXo.js +1 -0
- package/dist/chunks/buddy-BLcvL8lP.js +3 -0
- package/dist/chunks/bundledMode-DQNSSQbt.js +1 -0
- package/dist/chunks/caches-BrfvzKn5.js +1 -0
- package/dist/chunks/caches-CkSv3MfC.js +3 -0
- package/dist/chunks/capacityWake-BWCSatN6.js +1 -0
- package/dist/chunks/changeDetector-DEZU6tum.js +1 -0
- package/dist/chunks/changeDetector-Df7c6U3d.js +1 -0
- package/dist/chunks/channelAllowlist-BApjAS0V.js +1 -0
- package/dist/chunks/channelNotification-BjWwF85R.js +1 -0
- package/dist/chunks/channelNotification-D01YVwNj.js +1 -0
- package/dist/chunks/chokidar-DPwMBcWI.js +1 -0
- package/dist/chunks/chokidar-DkDXNCTz.js +1 -0
- package/dist/chunks/chrome-D7coxEOI.js +1 -0
- package/dist/chunks/chromeNativeHost-CPj9M_4-.js +1 -0
- package/dist/chunks/chunk-DR8-3Aex.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-DZkxcFPS.js +1 -0
- package/dist/chunks/claudeAiLimitsHook-ATshVrOH.js +1 -0
- package/dist/chunks/claudeDesktop-PVa9tWsM.js +1 -0
- package/dist/chunks/cleanup-C-PGmKpV.js +1 -0
- package/dist/chunks/clear-CxGE9Ntr.js +1 -0
- package/dist/chunks/cliLaunch-CMXoY_LO.js +1 -0
- package/dist/chunks/client-BWED8Tbu.js +35 -0
- package/dist/chunks/client-CinDjeSq.js +7 -0
- package/dist/chunks/client-CpXGg9e0.js +1 -0
- package/dist/chunks/color-B3w_VQTn.js +1 -0
- package/dist/chunks/color-convert-BQZnVz_5.js +1 -0
- package/dist/chunks/commands-DFp48zwy.js +1 -0
- package/dist/chunks/commitAttribution-B0cXmbvv.js +2 -0
- package/dist/chunks/commitAttribution-DRSKRoH6.js +1 -0
- package/dist/chunks/common-BX7bn3hg.js +1 -0
- package/dist/chunks/common-Ce3LanTX.js +1 -0
- package/dist/chunks/common-DdLQuE2_.js +1 -0
- package/dist/chunks/common-HfKcqOYK.js +1 -0
- package/dist/chunks/compact-C8ljGMdo.js +3 -0
- package/dist/chunks/companion-mD1jw6xX.js +1 -0
- package/dist/chunks/completionCache-BqQXVTa9.js +1 -0
- package/dist/chunks/completionCache-BtP4vfAi.js +4 -0
- package/dist/chunks/computerUseLock-ADE_PhIK.js +1 -0
- package/dist/chunks/config-CmyaIIOY.js +1 -0
- package/dist/chunks/config-Rl1Y_Dtq.js +1 -0
- package/dist/chunks/connectHeadless-MFABhXpz.js +1 -0
- package/dist/chunks/constants-BM62Vf_X.js +1 -0
- package/dist/chunks/constants-BfXy-5cI.js +1 -0
- package/dist/chunks/context-BeiZkUNq.js +1 -0
- package/dist/chunks/context-noninteractive-CRdF3iv8.js +54 -0
- package/dist/chunks/controlMessageCompat-591iGHUK.js +1 -0
- package/dist/chunks/conversation-BoguXZEI.js +1 -0
- package/dist/chunks/conversation-yhs7tT-g.js +1 -0
- package/dist/chunks/copy-BpeUcqku.js +7 -0
- package/dist/chunks/createSSHSession-B3JOB4TE.js +6 -0
- package/dist/chunks/createSession-BJSnFBGt.js +1 -0
- package/dist/chunks/createSession-CnRHI3RU.js +1 -0
- package/dist/chunks/cron-iqTFGIos.js +1 -0
- package/dist/chunks/cronScheduler-zRXhgEEU.js +6 -0
- package/dist/chunks/cronTasks-CMJldfoP.js +2 -0
- package/dist/chunks/crossProjectResume-DxO6TX30.js +40 -0
- package/dist/chunks/cwd-B2guYBbl.js +1 -0
- package/dist/chunks/cwd-B5bbyUwz.js +1 -0
- package/dist/chunks/cwd-BXiaJzLh.js +1 -0
- package/dist/chunks/daemon-B3v4OoOu.js +2 -0
- package/dist/chunks/dangerousBackend-OmCzoW35.js +1 -0
- package/dist/chunks/datadog-3-Vvz0yz.js +1 -0
- package/dist/chunks/datadog-BQlp3bTs.js +1 -0
- package/dist/chunks/debug-BDBIipC1.js +2 -0
- package/dist/chunks/debug-C7tW7DFW.js +1 -0
- package/dist/chunks/debug-CjIaNjpK.js +5 -0
- package/dist/chunks/debugUtils-Dsg-UHeg.js +1 -0
- package/dist/chunks/defineProperty-CaCI0a5T.js +1 -0
- package/dist/chunks/desktop-C_SS0068.js +1 -0
- package/dist/chunks/detached-B7RNZeyl.js +5 -0
- package/dist/chunks/detect-libc-DFFGDzPC.js +1 -0
- package/dist/chunks/detectRepository-BnTCJAXR.js +1 -0
- package/dist/chunks/detectRepository-Gobn9eFt.js +1 -0
- package/dist/chunks/detection-CN_uLGU2.js +1 -0
- package/dist/chunks/detection-DW6grIlc.js +1 -0
- package/dist/chunks/diff-B8YmRG5T.js +1 -0
- package/dist/chunks/directoryCompletion-J560aATd.js +1 -0
- package/dist/chunks/dist-B1wOprSs.js +29 -0
- package/dist/chunks/dist-DZQOarNX.js +5 -0
- package/dist/chunks/dist-HZfkKiUF.js +20 -0
- package/dist/chunks/dist-es-4xyrZoNc2.js +1 -0
- package/dist/chunks/dist-es-6kjvVbJd.js +1 -0
- package/dist/chunks/dist-es-BJldFHbt.js +3 -0
- package/dist/chunks/dist-es-BM013UFT.js +1 -0
- package/dist/chunks/dist-es-BPPewn1A.js +1 -0
- package/dist/chunks/dist-es-BZGG3Hnm.js +1 -0
- package/dist/chunks/dist-es-BZjJL64k2.js +1 -0
- package/dist/chunks/dist-es-BctcPxLN.js +1 -0
- package/dist/chunks/dist-es-Bf2jR30y.js +1 -0
- package/dist/chunks/dist-es-BgLoR-hQ.js +1 -0
- package/dist/chunks/dist-es-BismPcTW.js +1 -0
- package/dist/chunks/dist-es-BrPzXmSP.js +1 -0
- package/dist/chunks/dist-es-Bu21Wvhs.js +1 -0
- package/dist/chunks/dist-es-BuWNNAXW.js +1 -0
- package/dist/chunks/dist-es-Bz11sFiK2.js +1 -0
- package/dist/chunks/dist-es-C5VplyPL2.js +5 -0
- package/dist/chunks/dist-es-C66BuLgn.js +1 -0
- package/dist/chunks/dist-es-CCIzgNln2.js +1 -0
- package/dist/chunks/dist-es-CLyx7Kge2.js +1 -0
- package/dist/chunks/dist-es-CUbatGdn.js +1 -0
- package/dist/chunks/dist-es-CYe_-TbD.js +1 -0
- package/dist/chunks/dist-es-C_IHUdzL.js +1 -0
- package/dist/chunks/dist-es-Ci_rKlMr.js +1 -0
- package/dist/chunks/dist-es-ClDZBAj7.js +1 -0
- package/dist/chunks/dist-es-Cp--qjOi.js +1 -0
- package/dist/chunks/dist-es-CzE4kW1L.js +9 -0
- package/dist/chunks/dist-es-DUg5w7-v.js +1 -0
- package/dist/chunks/dist-es-Dl0ZRczY.js +1 -0
- package/dist/chunks/dist-es-Do_155z5.js +1 -0
- package/dist/chunks/dist-es-DxIM0jd82.js +1 -0
- package/dist/chunks/dist-es-Fav2oBDs.js +1 -0
- package/dist/chunks/dist-es-TZjwPaGn.js +1 -0
- package/dist/chunks/dist-es-W22ud2el2.js +1 -0
- package/dist/chunks/dist-es-aU8-02YH.js +1 -0
- package/dist/chunks/dist-es-b3yZSGx82.js +1 -0
- package/dist/chunks/dist-es-dIP5JtXz.js +5 -0
- package/dist/chunks/dist-es-mQ4HvnYs2.js +1 -0
- package/dist/chunks/distRoot-CJaacAHy.js +1 -0
- package/dist/chunks/doctor-DLZPF4iY.js +1 -0
- package/dist/chunks/earlyInput-BTI1CSNt.js +2 -0
- package/dist/chunks/earlyInput-BwGtzhhP.js +1 -0
- package/dist/chunks/effort-BaHvpBWr.js +9 -0
- package/dist/chunks/entry-_e-lyRwv.js +14 -0
- package/dist/chunks/env-CesrOJJq.js +1 -0
- package/dist/chunks/envLessBridgeConfig-4oys0_9A.js +1 -0
- package/dist/chunks/envLessBridgeConfig-DJ1Sts3F.js +1 -0
- package/dist/chunks/envUtils-CFG7IQID.js +1 -0
- package/dist/chunks/errorLogSink-Ti4Suoz6.js +2 -0
- package/dist/chunks/escHotkey-CVn_80xM.js +259 -0
- package/dist/chunks/esm-BFnjHW38.js +1 -0
- package/dist/chunks/esm-BQg_LX3V.js +1 -0
- package/dist/chunks/esm-BtC6CMmM.js +1 -0
- package/dist/chunks/esm-BwzC0MQp.js +1 -0
- package/dist/chunks/esm-CFybeQ_Q.js +1 -0
- package/dist/chunks/esm-CK-5CT5X.js +1 -0
- package/dist/chunks/esm-CL1OwlZB.js +1 -0
- package/dist/chunks/esm-CMzgSTAl.js +1 -0
- package/dist/chunks/esm-CPE_H2Lx.js +1 -0
- package/dist/chunks/esm-CcWquv5a.js +10 -0
- package/dist/chunks/esm-CeNEpRZt.js +1 -0
- package/dist/chunks/esm-D7hykoRB.js +1 -0
- package/dist/chunks/esm-DUtcefEV.js +1 -0
- package/dist/chunks/esm-DhrUwJBp.js +1 -0
- package/dist/chunks/esm-Duu1fRQ8.js +1 -0
- package/dist/chunks/esm-Ght2BaU2.js +1 -0
- package/dist/chunks/esm-Q6Yz2GMx.js +56 -0
- package/dist/chunks/esm-WONEiurY.js +13 -0
- package/dist/chunks/event-streams-BumpU1aB.js +1 -0
- package/dist/chunks/eventLoopStallDetector-DxyFdg1h.js +1 -0
- package/dist/chunks/execAsync-ChKxDZ8C.js +1 -0
- package/dist/chunks/execFileNoThrow-DdmR1mBS.js +1 -0
- package/dist/chunks/execSyncWrapper-Ch4TNj8u.js +1 -0
- package/dist/chunks/execa-BMaINL7N.js +34 -0
- package/dist/chunks/executor-C7INr19-.js +1 -0
- package/dist/chunks/executor-Dnf3YYma.js +1604 -0
- package/dist/chunks/exit-BakzsOD0.js +1 -0
- package/dist/chunks/exit-CiDn2tN9.js +2 -0
- package/dist/chunks/export-b-6pqMqz.js +2 -0
- package/dist/chunks/exportRenderer-RxtEIyTm.js +1 -0
- package/dist/chunks/extra-usage-7EPJNjNW.js +1 -0
- package/dist/chunks/extra-usage-ChvuewCq.js +1 -0
- package/dist/chunks/extra-usage-core-BVhLtoDF.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-_Njh6q-q.js +1 -0
- package/dist/chunks/extraUsage-qOBMQB6g.js +1 -0
- package/dist/chunks/extractMemories-CRBVNiG1.js +1 -0
- package/dist/chunks/fast-C4uw_g7o.js +1 -0
- package/dist/chunks/fast-CEaIzaPl.js +1 -0
- package/dist/chunks/featureCheck-B1GSTyhh.js +1 -0
- package/dist/chunks/featureCheck-DKigAPal.js +1 -0
- package/dist/chunks/feedback-Bf3TjjuD.js +1 -0
- package/dist/chunks/figures-fES5sASd.js +1 -0
- package/dist/chunks/fileStateCache-DAsLEZau.js +1 -0
- package/dist/chunks/files-B-m_4X8b.js +2 -0
- package/dist/chunks/findExecutable-D8vJrFnO.js +1 -0
- package/dist/chunks/firstPartyEventLogger-BtrGagNa.js +1 -0
- package/dist/chunks/flushGate-2zqab-Pp.js +1 -0
- package/dist/chunks/foundry-sdk-CtX8C0x3.js +1 -0
- package/dist/chunks/fpsMetrics-ts_jaF3g.js +1 -0
- package/dist/chunks/fuse-ivQ_eRwF.js +1 -0
- package/dist/chunks/gates-CmKoQ0O-.js +1 -0
- package/dist/chunks/gates-_wbPDQ3M.js +1 -0
- package/dist/chunks/gemini-DRx495gn.js +3 -0
- package/dist/chunks/generateRecap-Cv8gd_QF.js +1 -0
- package/dist/chunks/generateSessionName-Dpjg-u_x.js +1 -0
- package/dist/chunks/genericProcessUtils-BFJMxLqn.js +23 -0
- package/dist/chunks/getMachineId-bsd-C9pL9Ajr.js +1 -0
- package/dist/chunks/getMachineId-darwin-Ma4F9rJg.js +2 -0
- package/dist/chunks/getMachineId-linux-C0lXMqsj.js +1 -0
- package/dist/chunks/getMachineId-unsupported-ByHQTXat.js +1 -0
- package/dist/chunks/getMachineId-win-DZsXZmTz.js +1 -0
- package/dist/chunks/git-Bj8Ow4pJ.js +6 -0
- package/dist/chunks/git-Q_b4oZ17.js +1 -0
- package/dist/chunks/githubRepoPathMapping-DGivBX9h.js +1 -0
- package/dist/chunks/goal-BrHEJv8o.js +3 -0
- package/dist/chunks/goalStorage-CsuPOQbk.js +1 -0
- package/dist/chunks/graceful-fs-BuPWC-vB.js +2 -0
- package/dist/chunks/grok-CDkDDaY_.js +1 -0
- package/dist/chunks/growthbook-D3_Cr9n-.js +1 -0
- package/dist/chunks/growthbook-p4aJ_UMv.js +32 -0
- package/dist/chunks/hash-KW-tVnPp.js +1 -0
- package/dist/chunks/heapdump-CloylIZ9.js +5 -0
- package/dist/chunks/help-DpSJlHIc.js +1 -0
- package/dist/chunks/hooks-2pogt8nv.js +79 -0
- package/dist/chunks/hooks-BBODdwnE.js +1 -0
- package/dist/chunks/hostAdapter-B5KTUqhv.js +1 -0
- package/dist/chunks/hostGuard-DyWr2TwE.js +1 -0
- package/dist/chunks/httpAuthSchemes-CgPbtGos.js +13 -0
- package/dist/chunks/ide-CJEcfBZq.js +2 -0
- package/dist/chunks/inboundAttachments-RNpYpRTO.js +1 -0
- package/dist/chunks/index.min-DCDiLq-j.js +1 -0
- package/dist/chunks/initReplBridge-D2E6IM2B.js +1 -0
- package/dist/chunks/initReplBridge-p2uwDBPx.js +1 -0
- package/dist/chunks/insights-DnpZScKs.js +822 -0
- package/dist/chunks/install-D_vTxUlG.js +1 -0
- package/dist/chunks/install-github-app-BK8A7g3i.js +147 -0
- package/dist/chunks/install-slack-app-C47R9VoI.js +1 -0
- package/dist/chunks/instinctParser-DxKdI3JC.js +1 -0
- package/dist/chunks/instrumentation-DkdAJFrZ.js +12 -0
- package/dist/chunks/intl-Pse97ORk.js +1 -0
- package/dist/chunks/isObject-DaxDnPKm.js +1 -0
- package/dist/chunks/isSymbol-D7QeUnS5.js +1 -0
- package/dist/chunks/job-opl00C4l.js +2 -0
- package/dist/chunks/json-bigint-BRRVs1dv.js +8 -0
- package/dist/chunks/jsx-runtime-BTgGEFjL.js +1 -0
- package/dist/chunks/jws-B_ieuaZg.js +3 -0
- package/dist/chunks/jwtUtils-D-tJzoJY.js +1 -0
- package/dist/chunks/keybindings-mRf9VSe8.js +2 -0
- package/dist/chunks/lang-eH4EJErj.js +1 -0
- package/dist/chunks/language-DD9ar6RA.js +1 -0
- package/dist/chunks/language-EZLNdETg.js +1 -0
- package/dist/chunks/launchAgentsPlatform-Cq0_7-IM.js +1 -0
- package/dist/chunks/launchAutofixPr-Bw7aUHUs.js +18 -0
- package/dist/chunks/launchCommand-Bk1Fn-qZ.js +1 -0
- package/dist/chunks/launchLocalMemory-CLBCUgwd.js +3 -0
- package/dist/chunks/launchLocalVault-BfWJWrBg.js +3 -0
- package/dist/chunks/launchMemoryStores-DdnSVSDZ.js +1 -0
- package/dist/chunks/launchOnboarding-ziCEX3GI.js +8 -0
- package/dist/chunks/launchSchedule-G_c7sgmy.js +1 -0
- package/dist/chunks/launchSkillStore-Z1Kd7nCg.js +1 -0
- package/dist/chunks/launchTeleport-Dp9AFbPx.js +3 -0
- package/dist/chunks/launchVault-hwK-Ljek.js +1 -0
- package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
- package/dist/chunks/lib-BHRYgENJ.js +8 -0
- package/dist/chunks/lib-DRyNc7xD.js +2 -0
- package/dist/chunks/lib-Ddq71jM5.js +14 -0
- package/dist/chunks/loadAgentsDir-Bz0FfcVt.js +5620 -0
- package/dist/chunks/loadAgentsDir-CLM0ws7u.js +1 -0
- package/dist/chunks/loadPluginHooks-B5SIS2uo.js +1 -0
- package/dist/chunks/loadSso-RY87rrJO.js +1 -0
- package/dist/chunks/localSearch-BLF6PSv2.js +1 -0
- package/dist/chunks/localSearch-CTycGe3E.js +1 -0
- package/dist/chunks/localSearch-inDahM8I.js +1 -0
- package/dist/chunks/lockfile--gk1HDM6.js +1 -0
- package/dist/chunks/log-B-Nj3Yed.js +1 -0
- package/dist/chunks/log-DVv8YiNo.js +1 -0
- package/dist/chunks/login-BeLvLowc.js +1 -0
- package/dist/chunks/login-DUUOeNoz.js +1 -0
- package/dist/chunks/logoV2Utils-D5SpeZ3C.js +1 -0
- package/dist/chunks/logout-C2QuTBdS.js +1 -0
- package/dist/chunks/magicDocs-CUXKi-Wv.js +57 -0
- package/dist/chunks/main-CFhpWtpC.js +1420 -0
- package/dist/chunks/main-sboa5RKc.js +31 -0
- package/dist/chunks/mappers-DLkk0PZz.js +1 -0
- package/dist/chunks/mcp-C2f6IgAp.js +2 -0
- package/dist/chunks/mcp-Djui9m3_.js +6 -0
- package/dist/chunks/mcp-DvTSxrJ4.js +1 -0
- package/dist/chunks/mcpServer-DMA0bdFC.js +1 -0
- package/dist/chunks/mcpServer-DxEHfW2v.js +1 -0
- package/dist/chunks/memoize-Bg2dXTzV.js +1 -0
- package/dist/chunks/memoize-DNnuA2aU.js +1 -0
- package/dist/chunks/memory-B9io9Zcv.js +1 -0
- package/dist/chunks/mobile-CPnnvkQV.js +2 -0
- package/dist/chunks/modalContext-B1b0Gsro.js +1 -0
- package/dist/chunks/mode-BDgwh_Xb.js +2 -0
- package/dist/chunks/model-B6cpEh-s.js +1 -0
- package/dist/chunks/model-BcunOCC9.js +1 -0
- package/dist/chunks/modelOptions-CHUHQ9WG.js +1 -0
- package/dist/chunks/normalization-cjPqid31.js +1 -0
- package/dist/chunks/oauth-CnBLewrU.js +1 -0
- package/dist/chunks/oauth-DMPGYAoZ.js +1 -0
- package/dist/chunks/observationStore-DVBxrSdI.js +4 -0
- package/dist/chunks/onChangeAppState-M61XDN6V.js +1 -0
- package/dist/chunks/open-CsUNPSNx.js +1 -0
- package/dist/chunks/openai-BHvlYW3m.js +2 -0
- package/dist/chunks/output-style-BtKuBrs4.js +1 -0
- package/dist/chunks/outputStyles-hHuIBkRB.js +84 -0
- package/dist/chunks/overageCreditGrant-BLFT-rF3.js +1 -0
- package/dist/chunks/p-map-C-WNcN6g.js +1 -0
- package/dist/chunks/p-map-CQ2NythB.js +1 -0
- package/dist/chunks/package-9IAs5Qf0.js +1 -0
- package/dist/chunks/panel-27xLZI7c.js +1 -0
- package/dist/chunks/panel-NoDfShEZ.js +1 -0
- package/dist/chunks/panelCall-CEOWVNCM.js +1 -0
- package/dist/chunks/parseConnectUrl-CxU4IX9o.js +1 -0
- package/dist/chunks/parser-DGlAnaNj.js +1 -0
- package/dist/chunks/parser-DGoLe2RS.js +1 -0
- package/dist/chunks/passes-CExcqu66.js +1 -0
- package/dist/chunks/path-uaxlnhva.js +1 -0
- package/dist/chunks/permissions-B3PceQul.js +1 -0
- package/dist/chunks/permissions-DezIL2xF.js +3 -0
- package/dist/chunks/permissions-DnpI8Whh.js +1 -0
- package/dist/chunks/pipeTransport-CB_Wq_Kx.js +1 -0
- package/dist/chunks/plan-cfZBclh9.js +1 -0
- package/dist/chunks/platform-BXz_rgpy.js +2 -0
- package/dist/chunks/plist-DLGDWBD6.js +6 -0
- package/dist/chunks/plugin-CuhENLRs.js +1 -0
- package/dist/chunks/pluginAutoupdate-wTeOXfQe.js +1 -0
- package/dist/chunks/pluginBlocklist-D6pkKfXr.js +1 -0
- package/dist/chunks/pluginCliCommands-DqxdCwsq.js +1 -0
- package/dist/chunks/pluginFlagging-CjH48f-K.js +1 -0
- package/dist/chunks/pluginOperations-DMFYB3pK.js +2 -0
- package/dist/chunks/pluginStartupCheck-BW3_KfZz.js +1 -0
- package/dist/chunks/pluginStartupCheck-Cj2BMjVw.js +1 -0
- package/dist/chunks/plugins-CarsG2v8.js +4 -0
- package/dist/chunks/policyLimits-DFn1vHkN.js +1 -0
- package/dist/chunks/pollConfig-C8nODJY1.js +1 -0
- package/dist/chunks/poller-DXZJ-dUP.js +1 -0
- package/dist/chunks/poor-C7GQ4a5X.js +1 -0
- package/dist/chunks/poorMode-CBe0rfxB.js +1 -0
- package/dist/chunks/poorMode-CbZTudtw.js +1 -0
- package/dist/chunks/postCommitAttribution--vvAWIqD.js +1 -0
- package/dist/chunks/print-CwwtGSbK.js +114 -0
- package/dist/chunks/privacy-settings-Bz8cAVp5.js +11 -0
- package/dist/chunks/privacyLevel-CRCHhztk.js +1 -0
- package/dist/chunks/process-CnhUplBr.js +1 -0
- package/dist/chunks/process-X4vCP9x0.js +1 -0
- package/dist/chunks/processBashCommand-NL0YEUqW.js +3 -0
- package/dist/chunks/processSlashCommand-FPMWElsI.js +6 -0
- package/dist/chunks/processSlashCommand-_oJs6_w8.js +6 -0
- package/dist/chunks/processUserInput-QAJK0XSn.js +1 -0
- package/dist/chunks/projectContext-B21hXj9q.js +1 -0
- package/dist/chunks/projectContext-DbTQHQS3.js +1 -0
- package/dist/chunks/prompt-C6eleu4x.js +1 -0
- package/dist/chunks/prompt-CUdoQXyN.js +1 -0
- package/dist/chunks/prompt-CsBCtw4l.js +228 -0
- package/dist/chunks/prompt-hnIDYhP4.js +54 -0
- package/dist/chunks/promptEditor-CrlVcc17.js +4 -0
- package/dist/chunks/protectedNamespace-Cn4901XG.js +1 -0
- package/dist/chunks/protocolHandler-DM_w7sJ5.js +13 -0
- package/dist/chunks/protocols-CpoQzjyI.js +7 -0
- package/dist/chunks/proxy-9WvtUy8E.js +99 -0
- package/dist/chunks/rate-limit-options-BehQ3MoX.js +1 -0
- package/dist/chunks/rcDebugLog-BbHlIxCm.js +11 -0
- package/dist/chunks/referral-BfAZEIZL.js +1 -0
- package/dist/chunks/refresh-Bl3Miver.js +1 -0
- package/dist/chunks/registerProtocol-BHZ3vZED.js +36 -0
- package/dist/chunks/registerSkillHooks-BR7v5qDA.js +1 -0
- package/dist/chunks/registry-C2igpRd-.js +1 -0
- package/dist/chunks/release-notes-C_Cou6ye.js +4 -0
- package/dist/chunks/releaseNotes-DveQShyB.js +2 -0
- package/dist/chunks/reload-plugins-D-pAUoB5.js +1 -0
- package/dist/chunks/remote-env-C_dBgbgo.js +1 -0
- package/dist/chunks/remoteBridgeCore-BxWhTy1u.js +1 -0
- package/dist/chunks/remoteControlServer-D3OjUlB-.js +3 -0
- package/dist/chunks/rename-f3m0ETSt.js +1 -0
- package/dist/chunks/renderOptions-QZLxGnh_.js +1 -0
- package/dist/chunks/replBridge-qeVmCJOb.js +1 -0
- package/dist/chunks/resume-CM_8p9Iu.js +2 -0
- package/dist/chunks/rewind-0cB7o6fx.js +1 -0
- package/dist/chunks/ripgrep-BEWqxrpl.js +5 -0
- package/dist/chunks/ripgrep-G82m12Ng.js +1 -0
- package/dist/chunks/rollback-CVo2gqgR.js +11 -0
- package/dist/chunks/runtimeObserver-1EdvvoYw.js +1 -0
- package/dist/chunks/runtimeObserver-CX6vepq9.js +10 -0
- package/dist/chunks/sandbox-adapter-DzHfW2tH.js +1 -0
- package/dist/chunks/sandbox-toggle-N6KgmH2T.js +1 -0
- package/dist/chunks/sanitization-CIBpY9KT.js +1 -0
- package/dist/chunks/satisfies-B7ZvBUQP.js +1 -0
- package/dist/chunks/schemas-Bwt-7U5W.js +40 -0
- package/dist/chunks/sdk-Drp69kIx.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor-B9GVkISU.js +1 -0
- package/dist/chunks/searchExtraTools-BphNJsl8.js +1 -0
- package/dist/chunks/semver-BsItM2Z4.js +1 -0
- package/dist/chunks/semver-D3lOjiBN.js +1 -0
- package/dist/chunks/sentry-ySzRCXGd.js +1 -0
- package/dist/chunks/server-C8nMDji6.js +1 -0
- package/dist/chunks/server-XZG51Slr.js +1 -0
- package/dist/chunks/serverBanner-D68EBGzH.js +1 -0
- package/dist/chunks/serverLog-hv2hc5US.js +1 -0
- package/dist/chunks/session-CVoGFb8a.js +2 -0
- package/dist/chunks/sessionDataUploader-BaD1Q7v3.js +1 -0
- package/dist/chunks/sessionDiscovery-D7g66TX6.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-9lPjspRX.js +1 -0
- package/dist/chunks/sessionManager-BhOjMNAP.js +1 -0
- package/dist/chunks/sessionMemory-BA6cdxqP.js +1 -0
- package/dist/chunks/sessionMemory-CtEhIRGF.js +1 -0
- package/dist/chunks/sessionMemoryUtils-D_B92ypa.js +1 -0
- package/dist/chunks/sessionObserver-CESI-uVZ.js +1 -0
- package/dist/chunks/sessionObserver-SpE_eglb.js +20 -0
- package/dist/chunks/sessionRestore-DqsqYK4K.js +1 -0
- package/dist/chunks/sessionState-Dgky34M4.js +1 -0
- package/dist/chunks/sessionStorage-DJb5HKhQ.js +1 -0
- package/dist/chunks/sessionStorage-DSMfHTcg.js +1 -0
- package/dist/chunks/sessionStoragePortable-DyM_hZnp.js +3 -0
- package/dist/chunks/sessionTitle-Bzxk_EW9.js +14 -0
- package/dist/chunks/sessionTracing-DR8O0686.js +12 -0
- package/dist/chunks/setup-BHNS9sBS.js +9 -0
- package/dist/chunks/setup-BafJxZ0F.js +4 -0
- package/dist/chunks/setup-MLNNYLi6.js +1 -0
- package/dist/chunks/shadowedRuleDetection-Ch9gTxfD.js +1 -0
- package/dist/chunks/shellQuote-3s6tV-hK.js +1 -0
- package/dist/chunks/sideQuestion-BBn6XIOD.js +20 -0
- package/dist/chunks/signal-BTxmab6r.js +1 -0
- package/dist/chunks/signin-ChbUAEGq.js +1 -0
- package/dist/chunks/sink-B1qICbRh.js +1 -0
- package/dist/chunks/sink-yBIcxQf1.js +1 -0
- package/dist/chunks/sinks-C7weduDR.js +1 -0
- package/dist/chunks/skill-learning-08nEdOJ2.js +5 -0
- package/dist/chunks/skillGapStore-CuvWGqFb.js +5 -0
- package/dist/chunks/skillGapStore-DmMuDXKO.js +1 -0
- package/dist/chunks/skillGenerator-mEMjcmmm.js +8 -0
- package/dist/chunks/skillLearning-B3a-8Ys3.js +1 -0
- package/dist/chunks/skillLearning-q5T6o0mH.js +1 -0
- package/dist/chunks/skillPanel-BuUMhONI.js +28 -0
- package/dist/chunks/skillSearchPanel-BUEv7Sm9.js +21 -0
- package/dist/chunks/skillUsageTracking-BBTiWOKB.js +1 -0
- package/dist/chunks/skills-DvQuQfDW.js +1 -0
- package/dist/chunks/slashCommandParsing-BkTC3GRb.js +1 -0
- package/dist/chunks/sleep-CC8jykQd.js +1 -0
- package/dist/chunks/slowOperations-niPqC54V.js +1 -0
- package/dist/chunks/sprites-C5X62Vyh.js +1 -0
- package/dist/chunks/src-58uAJYF_.js +6 -0
- package/dist/chunks/src-7Y8fx6gl.js +2 -0
- package/dist/chunks/src-BuserDTl.js +1 -0
- package/dist/chunks/src-CMY4XoRy.js +1 -0
- package/dist/chunks/src-CfeAM1FB.js +1 -0
- package/dist/chunks/src-CxT2FDXy.js +1 -0
- package/dist/chunks/src-CyQf7rVu.js +26 -0
- package/dist/chunks/src-DJLbU8sT.js +1 -0
- package/dist/chunks/src-DJQlyVK6.js +5 -0
- package/dist/chunks/src-DNHWYkls.js +53 -0
- package/dist/chunks/src-DU_g0n_Q.js +1 -0
- package/dist/chunks/src-DhqzQjMg.js +19 -0
- package/dist/chunks/src-Duzv1Znh.js +1 -0
- package/dist/chunks/src-OBx6GAig.js +1 -0
- package/dist/chunks/src-WjnK2Dbo.js +1 -0
- package/dist/chunks/src-hjAMxWFj.js +7 -0
- package/dist/chunks/src-lLwoqdC0.js +9 -0
- package/dist/chunks/src-yRsWbJp_.js +2 -0
- package/dist/chunks/sso-oidc-yfC-A2A2.js +1 -0
- package/dist/chunks/startupProfiler-4P7GdVw6.js +3 -0
- package/dist/chunks/startupProfiler-CipS0otN.js +1 -0
- package/dist/chunks/state-9wSimHaL.js +1 -0
- package/dist/chunks/state-BQkyHx88.js +1 -0
- package/dist/chunks/state-CEAUTY3A.js +1 -0
- package/dist/chunks/state-CUZTq6r0.js +1 -0
- package/dist/chunks/state-U0HNbTx8.js +1 -0
- package/dist/chunks/staticRender-BB3CisKd.js +1 -0
- package/dist/chunks/stats-Dyi2U_mq.js +1 -0
- package/dist/chunks/status-CSL-GMou.js +1 -0
- package/dist/chunks/statusNoticeHelpers-BaXE951d.js +1 -0
- package/dist/chunks/stdio-BuUJYJFs.js +3 -0
- package/dist/chunks/stdio-iX0TTmbp.js +1 -0
- package/dist/chunks/stickers-2CRSckfH.js +1 -0
- package/dist/chunks/store-DdfsZvtr.js +1 -0
- package/dist/chunks/stringUtils-U7kMYMJq.js +4 -0
- package/dist/chunks/sts-CJmdeT7s.js +1 -0
- package/dist/chunks/subprocessEnv-DKTILev5.js +1 -0
- package/dist/chunks/subprocessEnv-WjRguKWf.js +1 -0
- package/dist/chunks/supports-color-DaytqqjM.js +1 -0
- package/dist/chunks/systemPromptSections-BnrxBWdc.js +1 -0
- package/dist/chunks/systemPromptSections-Dk6azdAb.js +1 -0
- package/dist/chunks/systemTheme-C1GNqIfy.js +1 -0
- package/dist/chunks/tag-C4cH016L.js +11 -0
- package/dist/chunks/tasks-CEdUW3RQ.js +1 -0
- package/dist/chunks/teamHelpers-CTA_CtTT.js +1 -0
- package/dist/chunks/teamHelpers-D65qZInv.js +1 -0
- package/dist/chunks/teammate-C-FiRloZ.js +1 -0
- package/dist/chunks/teammateModeSnapshot-DWRG5-Us.js +1 -0
- package/dist/chunks/teammateModeSnapshot-DtgsNj1G.js +1 -0
- package/dist/chunks/teleport-C_UgMy0V.js +1 -0
- package/dist/chunks/templateJobs-CMbS0tuk.js +12 -0
- package/dist/chunks/terminalSetup--jwGVap8.js +33 -0
- package/dist/chunks/terminalSetup-zID-wokH.js +1 -0
- package/dist/chunks/theme-C6XwTpVy.js +1 -0
- package/dist/chunks/thinkback-CVLnmLAT.js +1 -0
- package/dist/chunks/thinkback-MeOOO7gf.js +1 -0
- package/dist/chunks/thinkback-play-D7G260F4.js +1 -0
- package/dist/chunks/tmux-DtYJuTWh.js +1 -0
- package/dist/chunks/toolEventObserver-BtC9xDYY.js +1 -0
- package/dist/chunks/toolEventObserver-MfsHAt8h.js +1 -0
- package/dist/chunks/toolPool-CEi_2xIH.js +1 -0
- package/dist/chunks/toolPool-CdYJcCnc.js +1 -0
- package/dist/chunks/trustedDevice-CjQTGAa4.js +1 -0
- package/dist/chunks/trustedDevice-DADcxAAs.js +1 -0
- package/dist/chunks/tui-B8Ijq4Pk.js +6 -0
- package/dist/chunks/turndown.es-T-Xe93nc.js +69 -0
- package/dist/chunks/types-BVelRhgb.js +17 -0
- package/dist/chunks/types-Bqp3meR4.js +1 -0
- package/dist/chunks/types-CNmINIu3.js +1 -0
- package/dist/chunks/types-DgzOOCDl.js +3 -0
- package/dist/chunks/udsClient-ClY_0CKr.js +1 -0
- package/dist/chunks/ultrareviewCommand-CqvHj9Io.js +3 -0
- package/dist/chunks/undercover-CVCVOSrs.js +1 -0
- package/dist/chunks/undercover-CbxiJO2b.js +31 -0
- package/dist/chunks/up-CBJhVVbd.js +12 -0
- package/dist/chunks/updateCCB-DPPpquAw.js +11 -0
- package/dist/chunks/upgrade-DaaHOvft.js +1 -0
- package/dist/chunks/upgrade-k7ZvAWZ0.js +1 -0
- package/dist/chunks/upload-CEDxwMa1.js +1 -0
- package/dist/chunks/upstreamproxy-BtGJ2LRi.js +11 -0
- package/dist/chunks/usage-CsUSu4fb.js +1 -0
- package/dist/chunks/usage-oABvixCs.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CBce_-hb.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CLYjTZXb.js +1 -0
- package/dist/chunks/useKeybinding-DAQL_dB_.js +1 -0
- package/dist/chunks/useMainLoopModel-QC_H3esG.js +1 -0
- package/dist/chunks/useManageMCPConnections-bf-VfJGD.js +1 -0
- package/dist/chunks/useManagePlugins-CXdYUpit.js +1 -0
- package/dist/chunks/useMergedTools-DERzhQOJ.js +1 -0
- package/dist/chunks/useSearchInput-nqhdILI2.js +1 -0
- package/dist/chunks/useTerminalSize-DzV4aaTi.js +1 -0
- package/dist/chunks/useVoice-CO69xtWC.js +1 -0
- package/dist/chunks/util-C8wqPqv0.js +1 -0
- package/dist/chunks/utils-CDFsSXHr.js +1 -0
- package/dist/chunks/utils-ZO5TryVH.js +1 -0
- package/dist/chunks/v4-DLhvDPkt.js +1 -0
- package/dist/chunks/validatePlugin-C4cd71Yz.js +1 -0
- package/dist/chunks/vertex-sdk-CC3U26o7.js +9 -0
- package/dist/chunks/vim-BNiQx5Vf.js +1 -0
- package/dist/chunks/voice-BCbnJzYL.js +8 -0
- package/dist/chunks/voice-BJyz9KZO.js +8 -0
- package/dist/chunks/voice-CP2ULpju.js +2 -0
- package/dist/chunks/voiceModeEnabled-C-pa8B3Q.js +1 -0
- package/dist/chunks/voiceModeEnabled-CMtRN2pa.js +1 -0
- package/dist/chunks/voiceStreamSTT-31b2u0rj.js +1 -0
- package/dist/chunks/voiceStreamSTT-Fkhm6Ftg.js +1 -0
- package/dist/chunks/voiceStreamSTT-sI-hg-aP.js +1 -0
- package/dist/chunks/web-tools-CLmlPgLk.js +1 -0
- package/dist/chunks/which-C0ex-06E.js +1 -0
- package/dist/chunks/windowsPaths-C5TNvKYu.js +1 -0
- package/dist/chunks/windowsPaths-Kue_7s52.js +1 -0
- package/dist/chunks/workSecret-Dh5Ayceu.js +1 -0
- package/dist/chunks/workerRegistry-B5iWYqpK.js +1 -0
- package/dist/chunks/worktree-BypJA0GB.js +1 -0
- package/dist/chunks/worktreeModeEnabled-DPTdK3JV.js +1 -0
- package/dist/chunks/worktreeModeEnabled-Dtrcn7eD.js +1 -0
- package/dist/chunks/wrapper-BDPb4PTV.js +6 -0
- package/dist/chunks/wrapper-DRTs77RK.js +1 -0
- package/dist/chunks/xdg-BaVL-FHd.js +1 -0
- package/dist/chunks/xml-E8VMPwdJ.js +1 -0
- package/dist/chunks/zod-B_P2Eo_D.js +1 -0
- package/dist/cli-bun.js +2 -0
- package/dist/cli-node.js +2 -0
- package/dist/cli.js +2 -0
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/package.json +233 -0
- package/scripts/postinstall.cjs +389 -0
- package/scripts/run-parallel.mjs +10 -0
- package/scripts/setup-chrome-mcp.mjs +70 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,o as n,t as r}from"./cliLaunch-CMXoY_LO.js";import{a as i,i as a,n as o,r as s,t as c}from"./state-U0HNbTx8.js";import{resolve as l}from"path";async function u(e){let t=e[0]||`status`;switch(t){case`start`:await h(e.slice(1));break;case`stop`:await p();break;case`status`:case`ps`:await f();break;case`bg`:await(await import(`./bg-IU4gG3jc.js`)).handleBgStart(e.slice(1));break;case`attach`:await(await import(`./bg-IU4gG3jc.js`)).attachHandler(e[1]);break;case`logs`:await(await import(`./bg-IU4gG3jc.js`)).logsHandler(e[1]);break;case`kill`:await(await import(`./bg-IU4gG3jc.js`)).killHandler(e[1]);break;case`--help`:case`-h`:case`help`:d();break;default:console.error(`Unknown daemon subcommand: ${t}`),d(),process.exitCode=1}}function d(){console.log(`
|
|
2
|
+
Claude Code Daemon — background process management
|
|
3
|
+
|
|
4
|
+
USAGE
|
|
5
|
+
claude daemon [subcommand]
|
|
6
|
+
|
|
7
|
+
SUBCOMMANDS
|
|
8
|
+
status Show daemon and session status (default)
|
|
9
|
+
start Start the daemon supervisor
|
|
10
|
+
stop Stop the daemon
|
|
11
|
+
bg Start a background session
|
|
12
|
+
attach Attach to a background session
|
|
13
|
+
logs Show session logs
|
|
14
|
+
kill Kill a session
|
|
15
|
+
help Show this help
|
|
16
|
+
|
|
17
|
+
REPL
|
|
18
|
+
/daemon [subcommand] Same commands available in interactive mode
|
|
19
|
+
|
|
20
|
+
OPTIONS (for start)
|
|
21
|
+
--dir <path> Working directory (default: current)
|
|
22
|
+
--spawn-mode <mode> Worker spawn mode: same-dir | worktree (default: same-dir)
|
|
23
|
+
--capacity <N> Max concurrent sessions per worker (default: 4)
|
|
24
|
+
--permission-mode <mode> Permission mode for spawned sessions
|
|
25
|
+
--sandbox Enable sandbox mode
|
|
26
|
+
--name <name> Session name
|
|
27
|
+
-h, --help Show this help
|
|
28
|
+
`)}async function f(){let e=o();switch(console.log(`=== Daemon Supervisor ===`),e.status){case`running`:{let t=e.state;console.log(` Status: running`),console.log(` PID: ${t.pid}`),console.log(` CWD: ${t.cwd}`),console.log(` Started: ${t.startedAt}`),console.log(` Workers: ${t.workerKinds.join(`, `)}`);break}case`stopped`:console.log(` Status: stopped`);break;case`stale`:console.log(` Status: stale (cleaned up)`);break}console.log(`
|
|
29
|
+
=== Background Sessions ===`),await(await import(`./bg-IU4gG3jc.js`)).psHandler([])}async function p(){let e=o();if(e.status===`stopped`){console.log(`daemon is not running`);return}if(e.status===`stale`){console.log(`daemon was stale (cleaned up)`);return}console.log(`stopping daemon (PID: ${e.state.pid})...`),await a()?console.log(`daemon stopped`):console.log(`daemon could not be stopped (may have already exited)`)}function m(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];r===`--dir`&&n+1<e.length?t.dir=l(e[++n]):r.startsWith(`--dir=`)?t.dir=l(r.slice(6)):r===`--spawn-mode`&&n+1<e.length?t.spawnMode=e[++n]:r.startsWith(`--spawn-mode=`)?t.spawnMode=r.slice(13):r===`--capacity`&&n+1<e.length?t.capacity=e[++n]:r.startsWith(`--capacity=`)?t.capacity=r.slice(11):r===`--permission-mode`&&n+1<e.length?t.permissionMode=e[++n]:r.startsWith(`--permission-mode=`)?t.permissionMode=r.slice(18):r===`--sandbox`?t.sandbox=`1`:r===`--name`&&n+1<e.length?t.name=e[++n]:r.startsWith(`--name=`)&&(t.name=r.slice(7))}return t}async function h(e){let t=m(e),n=t.dir||l(`.`);console.log(`[daemon] supervisor starting in ${n}`);let r=[{kind:`remoteControl`,process:null,backoffMs:v,failureCount:0,parked:!1,lastStartTime:0,restartTimer:null}];i({pid:process.pid,cwd:n,startedAt:new Date().toISOString(),workerKinds:r.map(e=>e.kind),lastStatus:`running`});let a=new AbortController,o=()=>{console.log(`[daemon] supervisor shutting down...`),a.abort(),s();for(let e of r)e.restartTimer&&(clearTimeout(e.restartTimer),e.restartTimer=null),e.process&&!e.process.killed&&e.process.kill(`SIGTERM`)};process.on(`SIGTERM`,o),process.on(`SIGINT`,o);for(let e of r)a.signal.aborted||g(e,n,t,a.signal);await new Promise(e=>{if(a.signal.aborted){e();return}a.signal.addEventListener(`abort`,()=>e(),{once:!0})}),await Promise.all(r.filter(e=>e.process&&e.process.exitCode===null).map(e=>new Promise(t=>{if(!e.process||e.process.exitCode!==null){t();return}let n=null;e.process.on(`exit`,()=>{n&&(clearTimeout(n),n=null),t()}),n=setTimeout(()=>{e.process&&e.process.exitCode===null&&e.process.kill(`SIGKILL`),t()},3e4),n.unref?.()}))),console.log(`[daemon] supervisor stopped`)}function g(e,t,i,a){if(a.aborted||e.parked)return;e.lastStartTime=Date.now();let o={...process.env,DAEMON_WORKER_DIR:t,DAEMON_WORKER_NAME:i.name,DAEMON_WORKER_SPAWN_MODE:i.spawnMode||`same-dir`,DAEMON_WORKER_CAPACITY:i.capacity||`4`,DAEMON_WORKER_PERMISSION:i.permissionMode,DAEMON_WORKER_SANDBOX:i.sandbox||`0`,DAEMON_WORKER_CREATE_SESSION:`1`,CLAUDE_CODE_SESSION_KIND:`daemon-worker`};console.log(`[daemon] spawning worker '${e.kind}'`);let s=n(r([`--daemon-worker=${e.kind}`],{env:o}),{cwd:t,stdio:[`ignore`,`pipe`,`pipe`]});e.process=s,s.stdout?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
|
|
30
|
+
`);for(let e of t)console.log(` ${e}`)}),s.stderr?.on(`data`,e=>{let t=e.toString().trimEnd().split(`
|
|
31
|
+
`);for(let e of t)console.error(` ${e}`)}),s.on(`exit`,(n,r)=>{if(e.process=null,!a.aborted){if(n===_){console.error(`[daemon] worker '${e.kind}' exited with permanent error — parking`),e.parked=!0;return}if(Date.now()-e.lastStartTime<1e4){if(e.failureCount++,e.failureCount>=x){console.error(`[daemon] worker '${e.kind}' failed ${e.failureCount} times rapidly — parking`),e.parked=!0;return}}else e.failureCount=0,e.backoffMs=v;console.log(`[daemon] worker '${e.kind}' exited (code=${n}, signal=${r}), restarting in ${e.backoffMs}ms`),e.restartTimer=setTimeout(()=>{e.restartTimer=null,!a.aborted&&!e.parked&&g(e,t,i,a)},e.backoffMs),e.restartTimer.unref?.(),e.backoffMs=Math.min(e.backoffMs*b,y)}})}var _,v,y,b,x;e((()=>{t(),c(),_=78,v=2e3,y=12e4,b=2,x=5}))();export{u as daemonMain};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Tn as t,wn as n}from"./src-DNHWYkls.js";import{L as r,j as i}from"./state-BQkyHx88.js";import{CF as a,DF as o,Zc as s,xc as c}from"./loadAgentsDir-Bz0FfcVt.js";import{Dt as l,_n as u}from"./prompt-CsBCtw4l.js";import{randomUUID as d}from"crypto";function f(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:e.message,uuid:e.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case`user`:return[{type:`user`,message:e.message,uuid:e.uuid??d(),timestamp:e.timestamp??new Date().toISOString(),isMeta:e.isSynthetic}];default:return[]}})}function p(e){let t=e.preservedSegment;return{trigger:e.trigger,pre_tokens:e.preTokens,...t&&{preserved_segment:{head_uuid:t.headUuid,anchor_uuid:t.anchorUuid,tail_uuid:t.tailUuid}}}}function m(e){let t=e,n=t.preserved_segment;return{trigger:t.trigger,preTokens:t.pre_tokens,...n&&{preservedSegment:{headUuid:n.head_uuid,anchorUuid:n.anchor_uuid,tailUuid:n.tail_uuid}}}}function h(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:_(e),session_id:i(),parent_tool_use_id:null,uuid:e.uuid,error:e?.error}];case`user`:return[{type:`user`,message:e.message,session_id:i(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly,...e.toolUseResult===void 0?{}:{tool_use_result:e.toolUseResult}}];case`system`:return e.subtype===`compact_boundary`&&e.compactMetadata?[{type:`system`,subtype:`compact_boundary`,session_id:i(),uuid:e.uuid,compact_metadata:p(e.compactMetadata)}]:e.subtype===`local_command`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))?[g(e.content,e.uuid)]:[];default:return[]}})}function g(e,n){let r=c({content:t(e).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,`$1`).replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,`$1`).trim()});return{type:`assistant`,content:r.message?.content,message:r.message,parent_tool_use_id:null,session_id:i(),uuid:n}}function _(e){let t=e.message.content;if(!Array.isArray(t))return e.message;let n=t.map(e=>{if(e.type!==`tool_use`)return e;if(e.name===`ExitPlanMode`){let t=a();if(t)return{...e,input:{...e.input,plan:t}}}return e});return{...e.message,content:n}}var v=e((()=>{r(),l(),u(),n(),s(),o()}));export{p as a,f as i,v as n,h as o,g as r,m as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./chunk-DR8-3Aex.js";import{B as t,M as n,d as r,n as i,t as a}from"./server-XZG51Slr.js";import{Gs as o,Jr as s,Ms as c,Vr as l}from"./growthbook-p4aJ_UMv.js";import{E as u,O as d}from"./debug-CjIaNjpK.js";import{o as f,s as p}from"./log-DVv8YiNo.js";import{l as m,p as h}from"./teammate-C-FiRloZ.js";import{$I as g,FA as _,H as v,Kd as y,LA as b,Lf as x,QI as S,Rf as C,U as w,Xs as T,Ys as E,ZI as D,Zc as O,_L as k,_N as A,fs as j,hL as M,nM as N,ps as P,qd as F,rM as I,vN as L,xc as R}from"./loadAgentsDir-Bz0FfcVt.js";import{l as z,r as B}from"./commitAttribution-B0cXmbvv.js";import{a as V,o as H}from"./fileStateCache-DAsLEZau.js";import{n as U,t as W}from"./stdio-iX0TTmbp.js";t(),i(),U(),_(),g(),z(),o(),M();var G={status:`idle`};function K(){let t=(m(),e(h)),n=t.isTeammate()&&t.isPlanModeRequired()?`plan`:`default`;return{settings:c(),tasks:{},agentNameRegistry:new Map,verbose:!1,mainLoopModel:null,mainLoopModelForSession:null,statusLineText:void 0,expandedView:`none`,isBriefOnly:!1,showTeammateMessagePreview:!1,selectedIPAgentIndex:-1,selectedBgAgentIndex:-1,coordinatorTaskIndex:-1,viewSelectionMode:`none`,footerSelection:null,kairosEnabled:!1,remoteSessionUrl:void 0,remoteConnectionStatus:`connecting`,remoteBackgroundTaskCount:0,replBridgeEnabled:!1,replBridgeExplicit:!1,replBridgeOutboundOnly:!1,replBridgeConnected:!1,replBridgeSessionActive:!1,replBridgeReconnecting:!1,replBridgeConnectUrl:void 0,replBridgeSessionUrl:void 0,replBridgeEnvironmentId:void 0,replBridgeSessionId:void 0,replBridgeError:void 0,replBridgeInitialName:void 0,showRemoteCallout:!1,toolPermissionContext:{...S(),mode:n},agent:void 0,agentDefinitions:{activeAgents:[],allAgents:[]},fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},attribution:B(),mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:0},plugins:{enabled:[],disabled:[],commands:[],errors:[],installationStatus:{marketplaces:[],plugins:[]},needsRefresh:!1},todos:{},remoteAgentTaskSuggestions:[],notifications:{current:null,queue:[]},elicitation:{queue:[]},thinkingEnabled:k(),promptSuggestionEnabled:b(),sessionHooks:new Map,inbox:{messages:[]},workerSandboxPermissions:{queue:[],selectedIndex:0},pendingWorkerRequest:null,pendingSandboxRequest:null,promptSuggestion:{text:null,promptId:null,shownAt:0,acceptedAt:0,generationRequestId:null},speculation:G,speculationSessionTimeSavedMs:0,skillImprovement:{suggestion:null},authVersion:0,initialMessage:null,effortValue:void 0,activeOverlays:new Set,fastMode:!1}}E(),g(),C(),I(),H(),f(),O(),s(),w(),j(),u(),F(),A();var q=[T];async function J(e,t,i){let o=V(100);P(e);let s=new a({name:`claude/tengu`,version:`2.8.4`},{capabilities:{tools:{}}});s.setRequestHandler(n,async()=>{let e=S(),t=x(e);return{tools:await Promise.all(t.map(async n=>{let r;if(n.outputSchema){let e=L(n.outputSchema);typeof e==`object`&&e&&`type`in e&&e.type===`object`&&(r=e)}return{...n,description:await n.prompt({getToolPermissionContext:async()=>e,tools:t,agents:[]}),inputSchema:L(n.inputSchema),outputSchema:r}}))}}),s.setRequestHandler(r,async({params:{name:e,arguments:n}})=>{let r=x(S()),a=D(r,e);if(!a)throw Error(`Tool ${e} not found`);let s={abortController:N(),options:{commands:q,tools:r,mainLoopModel:l(),thinkingConfig:{type:`disabled`},mcpClients:[],mcpResources:{},isNonInteractiveSession:!0,debug:t,verbose:i,agentDefinitions:{activeAgents:[],allAgents:[]}},getAppState:()=>K(),setAppState:()=>{},messages:[],readFileState:o,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}};try{if(!a.isEnabled())throw Error(`Tool ${e} is not enabled`);let t=await a.validateInput?.(n??{},s);if(t&&!t.result)throw Error(`Tool ${e} input is invalid: ${`message`in t?t.message:String(t)}`);let r=await a.call(n??{},s,v,R({content:[]}));return{content:[{type:`text`,text:typeof r==`string`?r:d(r.data)}]}}catch(e){return p(e),{isError:!0,content:[{type:`text`,text:(e instanceof Error?y(e):[String(e)]).filter(Boolean).join(`
|
|
2
|
+
`).trim()||`Error`}]}}});async function c(){let e=new W;await s.connect(e)}return await c()}export{J as startMCPServer};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./p-map-C-WNcN6g.js";import{Mt as r,Rn as i,T as a,b as o,f as s,g as c,h as ee,t as l,v as te,x as u}from"./src-DNHWYkls.js";import{t as d}from"./jsx-runtime-BTgGEFjL.js";import{_s as f,bs as p,ls as m,ss as h}from"./growthbook-p4aJ_UMv.js";import{K as ne,U as g}from"./debug-CjIaNjpK.js";import{i as _,o as v}from"./platform-BXz_rgpy.js";import{s as y,u as b}from"./types-BVelRhgb.js";import{a as x,c as S}from"./stringUtils-U7kMYMJq.js";import{n as re,r as C}from"./analytics-i6X1et4O.js";import{$l as ie,BD as w,Cu as ae,Du as oe,GD as T,HD as E,JD as D,LE as O,Pk as k,Rk as A,Su as j,Tu as M,UD as N,Uk as P,Vk as F,WD as I,_k as L,aO as R,au as z,bu as B,bw as V,hk as H,hw as U,iO as W,lD as G,mw as se,qD as K,ru as ce,uD as le,xu as ue,yw as de,zD as q,zE as fe}from"./loadAgentsDir-Bz0FfcVt.js";import{n as J,t as Y}from"./exit-CiDn2tN9.js";import{stat as pe}from"fs/promises";import{cwd as me}from"process";n();var X=e(i(),1);P(),k(),l(),I(),x(),le(),V();var Z=d();function Q({servers:e,scope:t,onDone:n}){let r=Object.keys(e),[i,l]=(0,X.useState)({});(0,X.useEffect)(()=>{w().then(({servers:e})=>l(e))},[]);let d=r.filter(e=>i[e]!==void 0);async function f(n){let r=0;for(let a of n){let n=e[a];if(n){let e=a;if(i[e]!==void 0){let t=1;for(;i[`${a}_${t}`]!==void 0;)t++;e=`${a}_${t}`}await q(e,n,t),r++}}m(r)}let[p]=a(),m=(0,X.useCallback)(e=>{A(e>0?`\n${te(`success`,p)(`Successfully imported ${e} MCP ${S(e,`server`)} to ${t} config.`)}\n`:`
|
|
2
|
+
No servers were imported.`),n(),F()},[p,t,n]),h=(0,X.useCallback)(()=>{m(0)},[m]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(s,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${r.length} MCP ${S(r.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:h,hideInputGuide:!0,children:[d.length>0&&(0,Z.jsx)(o,{color:`warning`,children:`Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix.`}),(0,Z.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Z.jsx)(de,{options:r.map(e=>({label:`${e}${d.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:r.filter(e=>!d.includes(e)),onSubmit:f,onCancel:h,hideIndexes:!0})]}),(0,Z.jsx)(u,{paddingX:1,children:(0,Z.jsx)(o,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(ee,{children:[(0,Z.jsx)(c,{shortcut:`Space`,action:`select`}),(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(G,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}l(),U(),re(),ae(),z(),I(),R(),fe(),f(),g(),L(),y(),v();async function $(e,t){try{let n=await ie(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function he({debug:e,verbose:t}){let n=me();C(`tengu_mcp_start`,{});try{await pe(n)}catch(e){throw ne(e)&&Y(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-BafJxZ0F.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-C2f6IgAp.js`);await i(n,e??!1,t??!1)}catch(e){Y(`Error: Failed to start MCP server: ${e}`)}}async function ge(e,t){let n=E(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(ue(e,n),B(e,n))};try{if(t.scope){let n=D(t.scope);C(`tengu_mcp_delete`,{name:e,scope:n}),await T(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),J(`File modified: ${K(n)}`)}let n=h(),i=m(),{servers:a}=N(`project`),o=!!a[e],s=[];if(n.mcpServers?.[e]&&s.push(`local`),o&&s.push(`project`),i.mcpServers?.[e]&&s.push(`user`),s.length===0)Y(`No MCP server found with name: "${e}"`);else if(s.length===1){let t=s[0];C(`tengu_mcp_delete`,{name:e,scope:t}),await T(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),J(`File modified: ${K(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${W(e)} (${K(e)})\n`)}),process.stderr.write(`
|
|
3
|
+
To remove from a specific scope, use:
|
|
4
|
+
`),s.forEach(t=>{process.stderr.write(` claude mcp remove "${e}" -s ${t}\n`)}),Y()}catch(e){Y(e.message)}}async function _e(){C(`tengu_mcp_list`,{});let{servers:e}=await w();if(Object.keys(e).length===0)console.log("No MCP servers configured. Use `claude mcp add` to add a server.");else{console.log(`Checking MCP server health...
|
|
5
|
+
`);let n=await t(Object.entries(e),async([e,t])=>({name:e,server:t,status:await $(e,t)}),{concurrency:ce()});for(let{name:e,server:t,status:r}of n)if(t.type===`sse`)console.log(`${e}: ${t.url} (SSE) - ${r}`);else if(t.type===`http`)console.log(`${e}: ${t.url} (HTTP) - ${r}`);else if(t.type===`claudeai-proxy`)console.log(`${e}: ${t.url} - ${r}`);else if(!t.type||t.type===`stdio`){let n=t,i=Array.isArray(n.args)?n.args:[];console.log(`${e}: ${n.command} ${i.join(` `)} - ${r}`)}}await H(0)}async function ve(e){C(`tengu_mcp_get`,{name:e});let t=E(e);t||Y(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${W(t.scope)}`);let n=await $(e,t);if(console.log(` Status: ${n}`),t.type===`sse`){if(console.log(` Type: sse`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),j(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`http`){if(console.log(` Type: http`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),j(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`stdio`){console.log(` Type: stdio`),console.log(` Command: ${t.command}`);let e=Array.isArray(t.args)?t.args:[];if(console.log(` Args: ${e.join(` `)}`),t.env){console.log(` Environment:`);for(let[e,n]of Object.entries(t.env))console.log(` ${e}=${n}`)}}console.log(`\nTo remove this server, run: claude mcp remove "${e}" -s ${t.scope}`),await H(0)}async function ye(e,t,n){try{let r=D(n.scope),i=b(t),a=n.clientSecret&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&`oauth`in i&&i.oauth&&typeof i.oauth==`object`&&`clientId`in i.oauth?await M():void 0;await q(e,i,r);let o=i&&typeof i==`object`&&`type`in i?String(i.type||`stdio`):`stdio`;a&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&oe(e,{type:i.type,url:i.url},a),C(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),J(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){Y(e.message)}}async function be(e){try{let t=D(e.scope);C(`tengu_mcp_add`,{scope:t,platform:_(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-PVa9tWsM.js`),i=await n();Object.keys(i).length===0&&J(`No MCP servers found in Claude Desktop configuration or configuration file does not exist.`);let{unmount:a}=await r((0,Z.jsx)(O,{children:(0,Z.jsx)(se,{children:(0,Z.jsx)(Q,{servers:i,scope:t,onDone:()=>{a()}})})}),{exitOnCtrlC:!0})}catch(e){Y(e.message)}}async function xe(){C(`tengu_mcp_reset_mcpjson_choices`,{}),p(e=>({...e,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),J(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
|
|
6
|
+
You will be prompted for approval next time you start Claude Code.`)}export{be as mcpAddFromDesktopHandler,ye as mcpAddJsonHandler,ve as mcpGetHandler,_e as mcpListHandler,ge as mcpRemoveHandler,xe as mcpResetChoicesHandler,he as mcpServeHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-fES5sASd.js";import{Q as i,Rn as a,T as o,b as s,f as c,g as l,h as u,nt as d,t as f,tt as p,v as m,x as h}from"./src-DNHWYkls.js";import{t as g}from"./jsx-runtime-BTgGEFjL.js";import{l as _,u as v}from"./debug-CjIaNjpK.js";import{a as y,c as b,t as x}from"./stringUtils-U7kMYMJq.js";import{BE as S,CS as C,Cu as w,Ew as T,RT as ee,VE as te,aO as E,eO as ne,lD as D,nO as O,qD as k,uD as A,vu as re,vw as ie,wu as ae,ww as oe,xS as j,yu as se,zE as M}from"./loadAgentsDir-Bz0FfcVt.js";import{v as ce,y as le}from"./rcDebugLog-BbHlIxCm.js";import{t as N}from"./useKeybinding-DAQL_dB_.js";import{i as ue,n as P,r as de}from"./MCPConnectionManager-BJ8PcYPe.js";import{n as fe,o as pe,s as me}from"./utils-ZO5TryVH.js";import{a as he,c as F,i as I,l as ge,n as _e,o as L,r as ve,s as ye,t as be,u as R}from"./PluginSettings-OPrg-_3N.js";function xe({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[d,f]=(0,z.useState)(!1),[g,_]=(0,z.useState)(null),[v,y]=(0,z.useState)(null),b=(0,z.useRef)(null);(0,z.useEffect)(()=>()=>b.current?.abort(),[]),p(`confirm:no`,(0,z.useCallback)(()=>{d&&(b.current?.abort(),b.current=null,f(!1),y(null))},[d]),{context:`Confirmation`,isActive:d});let S=(0,z.useCallback)(async()=>{if(!e.needsAuth||!e.url)return;f(!0),_(null);let t=new AbortController;b.current=t;try{let r={type:e.transport,url:e.url};await ae(e.name,r,y,t.signal),n?.(`Authentication successful for ${e.name}. The server will connect when the agent runs.`)}catch(e){e instanceof Error&&!(e instanceof re)&&_(e.message)}finally{f(!1),b.current=null}},[e,n]),C=x(String(e.name));if(d)return(0,B.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,B.jsxs)(s,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(oe,{}),(0,B.jsx)(s,{children:` A browser window will open for authentication`})]}),v&&(0,B.jsxs)(h,{flexDirection:`column`,children:[(0,B.jsx)(s,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,B.jsx)(i,{url:v})]}),(0,B.jsx)(h,{marginLeft:3,children:(0,B.jsxs)(s,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,B.jsx)(D,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let w=[];return e.needsAuth&&w.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),w.push({label:`Back`,value:`back`}),(0,B.jsxs)(c,{title:`${C} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,B.jsxs)(s,{children:[`Press `,e.keyName,` again to exit`]}):(0,B.jsxs)(u,{children:[(0,B.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,B.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,B.jsx)(D,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,B.jsxs)(h,{flexDirection:`column`,gap:0,children:[(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Type: `}),(0,B.jsx)(s,{dimColor:!0,children:e.transport})]}),e.url&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`URL: `}),(0,B.jsx)(s,{dimColor:!0,children:e.url})]}),e.command&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Command: `}),(0,B.jsx)(s,{dimColor:!0,children:e.command})]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Used by: `}),(0,B.jsx)(s,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,B.jsxs)(h,{marginTop:1,children:[(0,B.jsx)(s,{bold:!0,children:`Status: `}),(0,B.jsxs)(s,{children:[m(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,B.jsxs)(s,{children:[m(`success`,a)(r.tick),` authenticated`]}):(0,B.jsxs)(s,{children:[m(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,B.jsx)(h,{children:(0,B.jsx)(s,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,B.jsx)(h,{children:(0,B.jsxs)(s,{color:`error`,children:[`Error: `,g]})}),(0,B.jsx)(h,{children:(0,B.jsx)(ee,{options:w,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var z,B,V=e((()=>{n(),z=t(a(),1),f(),N(),w(),y(),A(),ie(),T(),B=g()}));function Se({scope:e,parsingErrors:t,warnings:n}){let r=t.length>0,i=n.length>0;return!r&&!i?null:(0,W.jsxs)(h,{flexDirection:`column`,marginTop:1,children:[(0,W.jsxs)(h,{children:[(r||i)&&(0,W.jsxs)(s,{color:r?`error`:`warning`,children:[`[`,r?`Failed to parse`:`Contains warnings`,`] `]}),(0,W.jsx)(s,{children:pe(e)})]}),(0,W.jsxs)(h,{children:[(0,W.jsx)(s,{dimColor:!0,children:`Location: `}),(0,W.jsx)(s,{dimColor:!0,children:fe(e)})]}),(0,W.jsxs)(h,{marginLeft:1,flexDirection:`column`,children:[t.map((e,t)=>{let n=e.mcpErrorMetadata?.serverName;return(0,W.jsx)(h,{children:(0,W.jsxs)(s,{children:[(0,W.jsx)(s,{dimColor:!0,children:`└ `}),(0,W.jsx)(s,{color:`error`,children:`[Error]`}),(0,W.jsxs)(s,{dimColor:!0,children:[` `,n&&`[${n}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`error-${t}`)}),n.map((e,t)=>{let n=e.mcpErrorMetadata?.serverName;return(0,W.jsx)(h,{children:(0,W.jsxs)(s,{children:[(0,W.jsx)(s,{dimColor:!0,children:`└ `}),(0,W.jsx)(s,{color:`warning`,children:`[Warning]`}),(0,W.jsxs)(s,{dimColor:!0,children:[` `,n&&`[${n}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`warning-${t}`)})]})]})}function Ce(){let e=(0,U.useMemo)(()=>[{scope:`user`,config:j(`user`)},{scope:`project`,config:j(`project`)},{scope:`local`,config:j(`local`)},{scope:`enterprise`,config:j(`enterprise`)}],[]),t=e.some(({config:e})=>H(e.errors,`fatal`).length>0),n=e.some(({config:e})=>H(e.errors,`warning`).length>0);return!t&&!n?null:(0,W.jsxs)(h,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,W.jsx)(s,{bold:!0,children:`MCP Config Diagnostics`}),(0,W.jsx)(h,{marginTop:1,children:(0,W.jsxs)(s,{dimColor:!0,children:[`For help configuring MCP servers, see:`,` `,(0,W.jsx)(i,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`})]})}),e.map(({scope:e,config:t})=>(0,W.jsx)(Se,{scope:e,parsingErrors:H(t.errors,`fatal`),warnings:H(t.errors,`warning`)},e))]})}function H(e,t){return e.filter(e=>e.mcpErrorMetadata?.severity===t)}var U,W,we=e((()=>{U=t(a(),1),C(),me(),f(),W=g()}));function Te(e){switch(e){case`project`:return{label:`Project MCPs`,path:k(e)};case`user`:return{label:`User MCPs`,path:k(e)};case`local`:return{label:`Local MCPs`,path:k(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function Ee(e){let t=new Map;for(let n of e){let e=n.scope;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let[,e]of t)e.sort((e,t)=>e.name.localeCompare(t.name));return t}function De({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:a,onComplete:f}){let[p]=o(),[g,_]=(0,G.useState)(0),y=G.useMemo(()=>Ee(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),x=G.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=G.useMemo(()=>(y.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[y]),C=Te(`dynamic`),w=G.useMemo(()=>{let e=[];for(let t of q){let n=y.get(t)??[];for(let t of n)e.push({type:`server`,server:t})}for(let t of x)e.push({type:`server`,server:t});for(let n of t)e.push({type:`agent-server`,agentServer:n});for(let t of S)e.push({type:`server`,server:t});return e},[y,x,t,S]),T=(0,G.useCallback)(()=>{f(`MCP dialog dismissed`,{display:`system`})},[f]);d({"confirm:previous":()=>_(e=>e===0?w.length-1:e-1),"confirm:next":()=>_(e=>e===w.length-1?0:e+1),"confirm:yes":(0,G.useCallback)(()=>{let e=w[g];e&&(e.type===`server`?n(e.server):e.type===`agent-server`&&a&&a(e.agentServer))},[w,g,n,a]),"confirm:no":T},{context:`Confirmation`});let ee=e=>w.findIndex(t=>t.type===`server`&&t.server===e),te=e=>w.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),E=v(),ne=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let O=e=>{let t=ee(e),n=g===t,i=``,a=``;if(e.client.type===`disabled`)i=m(`inactive`,p)(r.radioOff),a=`disabled`;else if(e.client.type===`connected`)i=m(`success`,p)(r.tick),a=`connected`;else if(e.client.type===`pending`){i=m(`inactive`,p)(r.radioOff);let{reconnectAttempt:t,maxReconnectAttempts:n}=e.client;a=t&&n?`reconnecting (${t}/${n})…`:`connecting…`}else e.client.type===`needs-auth`?(i=m(`warning`,p)(r.triangleUpOutline),a=`needs authentication`):(i=m(`error`,p)(r.cross),a=`failed`);return(0,K.jsxs)(h,{children:[(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,K.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,K.jsx)(s,{dimColor:!n,children:a})]},`${e.name}-${t}`)},k=e=>{let t=te(e),n=g===t,i=e.needsAuth?m(`warning`,p)(r.triangleUpOutline):m(`inactive`,p)(r.radioOff),a=e.needsAuth?`may need auth`:`agent-only`;return(0,K.jsxs)(h,{children:[(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,K.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,K.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,K.jsx)(s,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},A=e.length+t.length;return(0,K.jsxs)(h,{flexDirection:`column`,children:[(0,K.jsx)(Ce,{}),(0,K.jsx)(c,{title:`Manage MCP servers`,subtitle:`${A} ${b(A,`server`)}`,onCancel:T,hideInputGuide:!0,children:(0,K.jsxs)(h,{flexDirection:`column`,children:[q.map(e=>{let t=y.get(e);if(!t||t.length===0)return null;let n=Te(e);return(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsxs)(h,{paddingLeft:2,children:[(0,K.jsx)(s,{bold:!0,children:n.label}),n.path&&(0,K.jsxs)(s,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>O(e))]},e)}),x.length>0&&(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsx)(h,{paddingLeft:2,children:(0,K.jsx)(s,{bold:!0,children:`claude.ai`})}),x.map(e=>O(e))]}),t.length>0&&(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsx)(h,{paddingLeft:2,children:(0,K.jsx)(s,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,K.jsxs)(h,{flexDirection:`column`,marginTop:1,children:[(0,K.jsx)(h,{paddingLeft:2,children:(0,K.jsxs)(s,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>k(e))]},e))]}),S.length>0&&(0,K.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,K.jsxs)(h,{paddingLeft:2,children:[(0,K.jsx)(s,{bold:!0,children:C.label}),C.path&&(0,K.jsxs)(s,{dimColor:!0,children:[` (`,C.path,`)`]})]}),S.map(e=>O(e))]}),(0,K.jsxs)(h,{flexDirection:`column`,children:[ne&&(0,K.jsx)(s,{dimColor:!0,children:E?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,K.jsxs)(s,{dimColor:!0,children:[(0,K.jsx)(i,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,K.jsx)(h,{paddingX:1,children:(0,K.jsx)(s,{dimColor:!0,italic:!0,children:(0,K.jsxs)(u,{children:[(0,K.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,K.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,K.jsx)(D,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var G,K,q,Oe=e((()=>{n(),G=t(a(),1),f(),N(),E(),_(),y(),A(),we(),K=g(),q=[`project`,`local`,`user`,`enterprise`]}));function ke({serverName:e,onComplete:t}){let[n]=o(),i=te(),a=de(),[c,l]=(0,J.useState)(!0),[u,d]=(0,J.useState)(null);return(0,J.useEffect)(()=>{async function n(){try{if(!i.getState().mcp.clients.find(t=>t.name===e)){d(`MCP server "${e}" not found`),l(!1),t(`MCP server "${e}" not found`);return}switch((await a(e)).client.type){case`connected`:l(!1),t(`Successfully reconnected to ${e}`);break;case`needs-auth`:d(`${e} requires authentication`),l(!1),t(`${e} requires authentication. Use /mcp to authenticate.`);break;case`pending`:case`failed`:case`disabled`:d(`Failed to reconnect to ${e}`),l(!1),t(`Failed to reconnect to ${e}`);break}}catch(e){let n=e instanceof Error?e.message:String(e);d(n),l(!1),t(`Error: ${n}`)}}n()},[e,a,i,t]),c?(0,Y.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,Y.jsxs)(s,{color:`text`,children:[`Reconnecting to `,(0,Y.jsx)(s,{bold:!0,children:e})]}),(0,Y.jsxs)(h,{children:[(0,Y.jsx)(oe,{}),(0,Y.jsx)(s,{children:` Establishing connection to MCP server`})]})]}):u?(0,Y.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,Y.jsxs)(h,{children:[(0,Y.jsxs)(s,{children:[m(`error`,n)(r.cross),` `]}),(0,Y.jsxs)(s,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,Y.jsxs)(s,{dimColor:!0,children:[`Error: `,u]})]}):null}var J,Y,Ae=e((()=>{n(),J=t(a(),1),f(),P(),M(),T(),Y=g()}));function je({onComplete:e}){let t=S(e=>e.mcp),n=S(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>ne(n.allAgents),[n.allAgents]),l=X.useMemo(()=>r.filter(e=>e.name!==`ide`).sort((e,t)=>e.name.localeCompare(t.name)),[r]);switch(X.useEffect(()=>{let e=!1;async function n(){let n=await Promise.all(l.map(async e=>{let n=e.config.scope,r=e.config.type===`sse`,i=e.config.type===`http`,a=e.config.type===`claudeai-proxy`,o;if(r||i){let n=await new se(e.name,e.config).tokens(),r=ce()!==null&&e.type===`connected`,i=e.type===`connected`&&O(t.tools,e.name).length>0;o=!!n||r||i}let s={name:e.name,client:e,scope:n};return a?{...s,transport:`claudeai-proxy`,isAuthenticated:!1,config:e.config}:r?{...s,transport:`sse`,isAuthenticated:o,config:e.config}:i?{...s,transport:`http`,isAuthenticated:o,config:e.config}:{...s,transport:`stdio`,config:e.config}}));e||s(n)}return n(),()=>{e=!0}},[l,t.tools]),(0,X.useEffect)(()=>{o.length===0&&l.length>0||o.length===0&&c.length===0&&e("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.")},[o.length,l.length,c.length,e]),i.type){case`list`:return(0,Z.jsx)(De,{servers:o,agentServers:c,onSelectServer:e=>a({type:`server-menu`,server:e}),onSelectAgentServer:e=>a({type:`agent-server-menu`,agentServer:e}),onComplete:e,defaultTab:i.defaultTab});case`server-menu`:{let n=O(t.tools,i.server.name),r=i.server.transport===`claudeai-proxy`?`claude.ai`:`Claude Code`;return i.server.transport===`stdio`?(0,Z.jsx)(ye,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e}):(0,Z.jsx)(ge,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e})}case`server-tools`:return(0,Z.jsx)(ve,{server:i.server,onSelectTool:(e,t)=>a({type:`server-tool-detail`,server:i.server,toolIndex:t}),onBack:()=>a({type:`server-menu`,server:i.server})});case`server-tool-detail`:{let e=O(t.tools,i.server.name)[i.toolIndex];return e?(0,Z.jsx)(he,{tool:e,server:i.server,onBack:()=>a({type:`server-tools`,server:i.server})}):(a({type:`server-tools`,server:i.server}),null)}case`agent-server-menu`:return(0,Z.jsx)(xe,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Me=e((()=>{X=t(a(),1),w(),E(),M(),le(),V(),Oe(),R(),F(),L(),I(),Z=g()})),Ne=e((()=>{V(),Oe(),Ae(),R(),Me(),F(),L(),I()}));function Pe({action:e,target:t,onComplete:n}){let r=S(e=>e.mcp.clients),i=ue(),a=(0,Q.useRef)(!1);return(0,Q.useEffect)(()=>{if(a.current)return;a.current=!0;let o=e===`enable`,s=r.filter(e=>e.name!==`ide`),c=t===`all`?s.filter(e=>o?e.type===`disabled`:e.type!==`disabled`):s.filter(e=>e.name===t);if(c.length===0){n(t===`all`?`All MCP servers are already ${o?`enabled`:`disabled`}`:`MCP server "${t}" not found`);return}for(let e of c)i(e.name);n(t===`all`?`${o?`Enabled`:`Disabled`} ${c.length} MCP server(s)`:`MCP server "${t}" ${o?`enabled`:`disabled`}`)},[e,t,r,i,n]),null}async function Fe(e,t,n){if(n){let t=n.trim().split(/\s+/);if(t[0]===`no-redirect`)return(0,$.jsx)(je,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(ke,{serverName:t.slice(1).join(` `),onComplete:e});if(t[0]===`enable`||t[0]===`disable`)return(0,$.jsx)(Pe,{action:t[0],target:t.length>1?t.slice(1).join(` `):`all`,onComplete:e})}return process.env.USER_TYPE===`ant`?(0,$.jsx)(be,{onComplete:e,args:`manage`,showMcpRedirectMessage:!0}):(0,$.jsx)(je,{onComplete:e})}var Q,$;e((()=>{Q=t(a(),1),Ne(),Ae(),P(),M(),_e(),$=g()}))();export{Fe as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,M as n}from"./server-XZG51Slr.js";import{_s as r,gr as i,is as a,lr as o}from"./growthbook-p4aJ_UMv.js";import{l as s,p as c}from"./debug-CjIaNjpK.js";import{r as l,t as u}from"./datadog-BQlp3bTs.js";import{i as d,r as f,t as p}from"./src-hjAMxWFj.js";import{i as m,t as h}from"./gates-CmKoQ0O-.js";import{n as g,t as _}from"./hostAdapter-B5KTUqhv.js";import{n as v,t as y}from"./stdio-iX0TTmbp.js";import{n as b,t as x}from"./sink-yBIcxQf1.js";import{homedir as S}from"os";function C(e,t){if(k.some(t=>e.startsWith(t)))return!0;if(t){let n=t.endsWith(`/`)?`${t}Applications/`:`${t}/Applications/`;if(e.startsWith(n))return!0}return!1}function w(e){return A.some(t=>t.test(e))}function T(e,t){let n=new Set;return e.map(e=>e.trim()).filter(e=>!e||e.length>N||t&&!M.test(e)||n.has(e)?!1:(n.add(e),!0)).sort((e,t)=>e.localeCompare(t))}function E(e){let t=T(e,!0);return t.length<=P?t:[...t.slice(0,P),`… and ${t.length-P} more`]}function D(e){return T(e,!1)}function O(e,t){let{alwaysKept:n,rest:r}=e.reduce((e,n)=>(j.has(n.bundleId)?e.alwaysKept.push(n.displayName):C(n.path,t)&&!w(n.displayName)&&e.rest.push(n.displayName),e),{alwaysKept:[],rest:[]}),i=D(n),a=new Set(i);return[...i,...E(r).filter(e=>!a.has(e))]}var k,A,j,M,N,P,F=e((()=>{k=[`/Applications/`,`/System/Applications/`],A=[/Helper(?:$|\s\()/,/Agent(?:$|\s\()/,/Service(?:$|\s\()/,/Uninstaller(?:$|\s\()/,/Updater(?:$|\s\()/,/^\./],j=new Set(`com.apple.Safari,com.google.Chrome,com.microsoft.edgemac,org.mozilla.firefox,company.thebrowser.Browser,com.tinyspeck.slackmacgap,us.zoom.xos,com.microsoft.teams2,com.microsoft.teams,com.apple.MobileSMS,com.apple.mail,com.microsoft.Word,com.microsoft.Excel,com.microsoft.Powerpoint,com.microsoft.Outlook,com.apple.iWork.Pages,com.apple.iWork.Numbers,com.apple.iWork.Keynote,com.google.GoogleDocs,notion.id,com.apple.Notes,md.obsidian,com.linear,com.figma.Desktop,com.microsoft.VSCode,com.apple.Terminal,com.googlecode.iterm2,com.github.GitHubDesktop,com.apple.finder,com.apple.iCal,com.apple.systempreferences`.split(`,`)),M=/^[\p{L}\p{M}\p{N}_ .&'()+-]+$/u,N=40,P=50}));async function I(){let e=_().executor.listInstalledApps(),t,n=new Promise(e=>{t=setTimeout(e,z,void 0)}),r=await Promise.race([e,n]).catch(()=>void 0).finally(()=>clearTimeout(t));if(!r){e.catch(()=>{}),c(`[Computer Use MCP] app enumeration exceeded ${z}ms or failed; tool description omits list`);return}return O(r,S())}async function L(){let e=_(),t=h(),r=f(e,t),i=await I(),a=d(e.executor.capabilities,t,i);return r.setRequestHandler(n,async()=>e.isDisabled()?{tools:[]}:{tools:a}),r}async function R(){a(),b();let e=await L(),t=new y,n=!1,r=async()=>{n||(n=!0,await Promise.all([i(),l()]),process.exit(0))};process.stdin.on(`end`,()=>void r()),process.stdin.on(`error`,()=>void r()),c(`[Computer Use MCP] Starting MCP server`),await e.connect(t),c(`[Computer Use MCP] MCP server started`)}var z;e((()=>{p(),x(),v(),t(),u(),o(),r(),s(),F(),m(),g(),z=1e3}))();export{L as createComputerUseMcpServerForCli,R as runComputerUseMcpServer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-CFG7IQID.js";import{r,t as i}from"./src-58uAJYF_.js";import{W as a,_s as o,gr as s,is as c,l,lr as u,ls as d,m as f,nt as p,xs as m}from"./growthbook-p4aJ_UMv.js";import{l as h,p as g}from"./debug-CjIaNjpK.js";import{n as _,r as v}from"./analytics-i6X1et4O.js";import{aj as y,ij as b}from"./loadAgentsDir-Bz0FfcVt.js";import{r as x,t as S}from"./datadog-BQlp3bTs.js";import{c as C,i as w,o as T}from"./common-BX7bn3hg.js";import{n as E,t as D}from"./stdio-iX0TTmbp.js";import{n as O,t as k}from"./sink-yBIcxQf1.js";import{format as A}from"util";function j(e){return z.some(t=>t===e)}function M(){if(process.env.USER_TYPE===`ant`||l(`tengu_copper_bridge`,!1))return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)?`ws://localhost:8765`:n(process.env.USE_STAGING_OAUTH)?`wss://bridge-staging.claudeusercontent.com`:`wss://bridge.claudeusercontent.com`}function N(){return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)}function P(e){let t=new B,n=M();t.info(`Bridge URL: ${n??`none (using native socket)`}`);let r=e?.CLAUDE_CHROME_PERMISSION_MODE??process.env.CLAUDE_CHROME_PERMISSION_MODE,i;return r&&(j(r)?i=r:t.warn(`Invalid CLAUDE_CHROME_PERMISSION_MODE "${r}". Valid values: ${z.join(`, `)}`)),{serverName:`Claude in Chrome`,logger:t,socketPath:T(),getSocketPaths:w,clientTypeId:`claude-code`,onAuthenticationError:()=>{t.warn(`Authentication error occurred. Please ensure you are logged into the Claude browser extension with the same claude.ai account as Claude Code.`)},onToolCallDisconnected:()=>`Browser extension is not connected. Please ensure the Claude browser extension is installed and running (${I}), and that you are logged into claude.ai with the same account as Claude Code. If this is your first time connecting to Chrome, you may need to restart Chrome for the installation to take effect. If you continue to experience issues, please report a bug: ${L}`,onExtensionPaired:(e,n)=>{m(t=>t.chromeExtension?.pairedDeviceId===e&&t.chromeExtension?.pairedDeviceName===n?t:{...t,chromeExtension:{pairedDeviceId:e,pairedDeviceName:n}}),t.info(`Paired with "${n}" (${e.slice(0,8)})`)},getPersistedDeviceId:()=>d().chromeExtension?.pairedDeviceId,...n&&{bridgeConfig:{url:n,getUserId:async()=>d().oauthAccount?.accountUuid,getOAuthToken:async()=>a()?.accessToken??``,...N()&&{devUserId:`dev_user_local`}}},...i&&{initialPermissionMode:i},...process.env.USER_TYPE===`ant`&&{callAnthropicMessages:async e=>{let t=await y({model:e.model,system:e.system,messages:e.messages,max_tokens:e.max_tokens,stop_sequences:e.stop_sequences,signal:e.signal,skipSystemPromptPrefix:!0,tools:[],querySource:`chrome_mcp`}),n=[];for(let e of t.content)e.type===`text`&&n.push({type:`text`,text:e.text});return{content:n,stop_reason:t.stop_reason,usage:{input_tokens:t.usage.input_tokens,output_tokens:t.usage.output_tokens}}}},trackEvent:(e,t)=>{let n={};if(t)for(let[e,r]of Object.entries(t)){let t=e===`status`?`bridge_status`:e;(typeof r==`boolean`||typeof r==`number`||typeof r==`string`&&R.has(t))&&(n[t]=r)}v(e,n)}}}async function F(){c(),O();let e=r(P()),t=new D,n=!1,i=async()=>{n||(n=!0,await s(),await x(),process.exit(0))};process.stdin.on(`end`,()=>void i()),process.stdin.on(`error`,()=>void i()),g(`[Claude in Chrome] Starting MCP server`),await e.connect(t),g(`[Claude in Chrome] MCP server started`)}var I,L,R,z,B;e((()=>{i(),k(),E(),S(),u(),f(),_(),p(),o(),h(),t(),b(),C(),I=`https://claude.ai/chrome`,L=`https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome`,R=new Set([`bridge_status`,`error_type`,`tool_name`]),z=[`ask`,`skip_all_permission_checks`,`follow_a_plan`],B=class{silly(e,t){g(A(e,t??``),{level:`debug`})}debug(e,t){g(A(e,t??``),{level:`debug`})}info(e,t){g(A(e,t??``),{level:`info`})}warn(e,t){g(A(e,t??``),{level:`warn`})}error(e,t){g(A(e,t??``),{level:`error`})}}}))();export{P as createChromeContext,F as runClaudeInChromeMcpServer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,O as n}from"./debug-CjIaNjpK.js";import{o as r,s as i}from"./log-DVv8YiNo.js";import{n as a,t as o}from"./index.min-DCDiLq-j.js";function s(e,t=300*1e3){let r=new Map,a=new Map,o=async(...o)=>{let s=n(o),c=r.get(s),l=Date.now();if(!c){let t=a.get(s);if(t)return t;let n=e(...o);a.set(s,n);try{let e=await n;return a.get(s)===n&&r.set(s,{value:e,timestamp:l,refreshing:!1}),e}finally{a.get(s)===n&&a.delete(s)}}if(c&&l-c.timestamp>t&&!c.refreshing){c.refreshing=!0;let t=c;return e(...o).then(e=>{r.get(s)===t&&r.set(s,{value:e,timestamp:Date.now(),refreshing:!1})}).catch(e=>{i(e),r.get(s)===t&&r.delete(s)}),c.value}return r.get(s).value};return o.cache={clear:()=>{r.clear(),a.clear()}},o}function c(e,t,n=100){let r=new o({max:n}),i=(...n)=>{let i=t(...n),a=r.get(i);if(a!==void 0)return a;let o=e(...n);return r.set(i,o),o};return i.cache={clear:()=>r.clear(),size:()=>r.size,delete:e=>r.delete(e),get:e=>r.peek(e),has:e=>r.has(e)},i}var l=e((()=>{a(),r(),t()}));export{c as n,s as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{c as t,i as n,n as r,r as i,s as a,t as o}from"./isObject-DaxDnPKm.js";function s(e){if(!r(e))return!1;var t=i(e);return t==l||t==u||t==c||t==d}var c,l,u,d,f=e((()=>{n(),o(),c=`[object AsyncFunction]`,l=`[object Function]`,u=`[object GeneratorFunction]`,d=`[object Proxy]`})),p,m=e((()=>{a(),p=t[`__core-js_shared__`]}));function ee(e){return!!h&&h in e}var h,te=e((()=>{m(),h=function(){var e=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}()}));function g(e){if(e!=null){try{return _.call(e)}catch{}try{return e+``}catch{}}return``}var _,v=e((()=>{_=Function.prototype.toString}));function ne(e){return!r(e)||ee(e)?!1:(s(e)?T:b).test(g(e))}var y,b,x,S,C,w,T,re=e((()=>{f(),te(),o(),v(),y=/[\\^$.*+?()[\]{}|]/g,b=/^\[object .+?Constructor\]$/,x=Function.prototype,S=Object.prototype,C=x.toString,w=S.hasOwnProperty,T=RegExp(`^`+C.call(w).replace(y,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`)}));function ie(e,t){return e?.[t]}var ae=e((()=>{}));function E(e,t){var n=ie(e,t);return ne(n)?n:void 0}var D=e((()=>{re(),ae()})),O,k=e((()=>{D(),O=E(Object,`create`)}));function oe(){this.__data__=O?O(null):{},this.size=0}var se=e((()=>{k()}));function ce(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var le=e((()=>{}));function ue(e){var t=this.__data__;if(O){var n=t[e];return n===A?void 0:n}return j.call(t,e)?t[e]:void 0}var A,j,de=e((()=>{k(),A=`__lodash_hash_undefined__`,j=Object.prototype.hasOwnProperty}));function fe(e){var t=this.__data__;return O?t[e]!==void 0:M.call(t,e)}var M,pe=e((()=>{k(),M=Object.prototype.hasOwnProperty}));function me(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=O&&t===void 0?N:t,this}var N,he=e((()=>{k(),N=`__lodash_hash_undefined__`}));function P(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var F=e((()=>{se(),le(),de(),pe(),he(),P.prototype.clear=oe,P.prototype.delete=ce,P.prototype.get=ue,P.prototype.has=fe,P.prototype.set=me}));function I(){this.__data__=[],this.size=0}var L=e((()=>{}));function R(e,t){return e===t||e!==e&&t!==t}var z=e((()=>{}));function B(e,t){for(var n=e.length;n--;)if(R(e[n][0],t))return n;return-1}var V=e((()=>{z()}));function ge(e){var t=this.__data__,n=B(t,e);return n<0?!1:(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)}var H,_e=e((()=>{V(),H=Array.prototype.splice}));function ve(e){var t=this.__data__,n=B(t,e);return n<0?void 0:t[n][1]}var ye=e((()=>{V()}));function be(e){return B(this.__data__,e)>-1}var xe=e((()=>{V()}));function Se(e,t){var n=this.__data__,r=B(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Ce=e((()=>{V()}));function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var W=e((()=>{L(),_e(),ye(),xe(),Ce(),U.prototype.clear=I,U.prototype.delete=ge,U.prototype.get=ve,U.prototype.has=be,U.prototype.set=Se})),G,K=e((()=>{D(),a(),G=E(t,`Map`)}));function we(){this.size=0,this.__data__={hash:new P,map:new(G||U),string:new P}}var Te=e((()=>{F(),W(),K()}));function Ee(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var De=e((()=>{}));function q(e,t){var n=e.__data__;return Ee(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var J=e((()=>{De()}));function Oe(e){var t=q(this,e).delete(e);return this.size-=+!!t,t}var ke=e((()=>{J()}));function Ae(e){return q(this,e).get(e)}var je=e((()=>{J()}));function Y(e){return q(this,e).has(e)}var Me=e((()=>{J()}));function Ne(e,t){var n=q(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Pe=e((()=>{J()}));function X(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var Z=e((()=>{Te(),ke(),je(),Me(),Pe(),X.prototype.clear=we,X.prototype.delete=Oe,X.prototype.get=Ae,X.prototype.has=Y,X.prototype.set=Ne}));function Q(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError($);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Q.Cache||X),n}var $,Fe=e((()=>{Z(),$=`Expected a function`,Q.Cache=X}));export{G as a,W as c,E as d,D as f,s as g,f as h,Z as i,R as l,g as m,Q as n,K as o,v as p,X as r,U as s,Fe as t,z as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-CFG7IQID.js";import{In as i,Ln as a,Q as o,Rn as s,b as c,d as l,f as u,t as d,tt as f,x as p}from"./src-DNHWYkls.js";import{t as m}from"./jsx-runtime-BTgGEFjL.js";import{Ht as h,K as g}from"./state-CUZTq6r0.js";import{Ds as _,Gs as v,Js as y,Ql as b,Yl as ee,ks as x,ws as S}from"./growthbook-p4aJ_UMv.js";import{B as C,U as w}from"./debug-CjIaNjpK.js";import{n as T,t as E}from"./cwd-B2guYBbl.js";import{r as D,v as O}from"./git-Bj8Ow4pJ.js";import{o as k,s as A}from"./log-DVv8YiNo.js";import{n as j,r as M}from"./analytics-i6X1et4O.js";import{m as te,y as N}from"./startupProfiler-4P7GdVw6.js";import{$N as P,BE as F,Nn as I,RT as ne,XN as L,XS as re,YS as R,cC as z,eP as B,jn as ie,lC as ae,vw as oe,zE as se}from"./loadAgentsDir-Bz0FfcVt.js";import{t as ce}from"./useKeybinding-DAQL_dB_.js";import{r as le,t as V}from"./browser-D1vC3BNd.js";import{n as H,t as U}from"./useExitOnCtrlCDWithKeybindings-CBce_-hb.js";import{r as W,t as ue}from"./promptEditor-CrlVcc17.js";import{homedir as de}from"os";import{join as G,relative as fe}from"path";import{mkdir as K,writeFile as pe}from"fs/promises";function me(e){return D(e)!==null}var he=e((()=>{O()}));function ge({onSelect:e,onCancel:t}){let r=(0,q.use)(P()),a=G(n(),`CLAUDE.md`),o=G(g(),`CLAUDE.md`),s=r.some(e=>e.path===a),u=r.some(e=>e.path===o),d=[...r.filter(e=>e.type!==`AutoMem`&&e.type!==`TeamMem`).map(e=>({...e,exists:!0})),...s?[]:[{path:a,type:`User`,content:``,exists:!1}],...u?[]:[{path:o,type:`Project`,content:``,exists:!1}]],m=new Map,h=d.map(e=>{let t=ee(e.path),n=e.exists?``:` (new)`,r=e.parent?(m.get(e.parent)??0)+1:0;m.set(e.path,r);let i=r>0?` `.repeat(r-1):``,s;s=e.type===`User`&&!e.isNested&&e.path===a?`User memory`:e.type===`Project`&&!e.isNested&&e.path===o?`Project memory`:r>0?`${i}L ${t}${n}`:`${t}`;let c,l=me(g());return c=e.type===`User`&&!e.isNested?`Saved in ~/.claude/CLAUDE.md`:e.type===`Project`&&!e.isNested&&e.path===o?`${l?`Checked in at`:`Saved in`} ./CLAUDE.md`:e.parent?`@-imported`:e.isNested?`dynamically loaded`:``,{label:s,value:e.path,description:c}}),_=[],v=F(e=>e.agentDefinitions);if(x()){_.push({label:`Open auto-memory folder`,value:`${X}${S()}`,description:``});for(let e of v.activeAgents)if(e.memory){let t=ie(e.agentType,e.memory);_.push({label:`Open ${i.bold(e.agentType)} agent memory`,value:`${X}${t}`,description:`${e.memory} scope`})}}h.push(..._);let b=Y&&h.some(e=>e.value===Y)?Y:h[0]?.value||``,[C,w]=(0,q.useState)(x),[T,E]=(0,q.useState)(ae),[D]=(0,q.useState)(x),O=F(e=>Object.values(e.tasks).some(e=>e.type===`dream`&&e.status===`running`)),[k,A]=(0,q.useState)(null);(0,q.useEffect)(()=>{D&&re().then(A)},[D,O]);let j=O?`running`:k===null?``:k===0?`never`:`last ran ${te(new Date(k))}`,[N,I]=(0,q.useState)(null),L=N!==null,R=+!!D;function z(){let e=!C;y(`userSettings`,{autoMemoryEnabled:e}),w(e),M(`tengu_auto_memory_toggled`,{enabled:e})}function B(){let e=!T;y(`userSettings`,{autoDreamEnabled:e}),E(e),M(`tengu_auto_dream_toggled`,{enabled:e})}return H(),f(`confirm:no`,t,{context:`Confirmation`}),f(`confirm:yes`,()=>{N===0?z():N===1&&B()},{context:`Confirmation`,isActive:L}),f(`select:next`,()=>{I(e=>e!==null&&e<R?e+1:null)},{context:`Select`,isActive:L}),f(`select:previous`,()=>{I(e=>e!==null&&e>0?e-1:e)},{context:`Select`,isActive:L}),(0,J.jsxs)(p,{flexDirection:`column`,width:`100%`,children:[(0,J.jsxs)(p,{flexDirection:`column`,marginBottom:1,children:[(0,J.jsx)(l,{isFocused:N===0,children:(0,J.jsxs)(c,{children:[`Auto-memory: `,C?`on`:`off`]})}),D&&(0,J.jsx)(l,{isFocused:N===1,styled:!1,children:(0,J.jsxs)(c,{color:N===1?`suggestion`:void 0,children:[`Auto-dream: `,T?`on`:`off`,j&&(0,J.jsxs)(c,{dimColor:!0,children:[` · `,j]}),!O&&T&&(0,J.jsx)(c,{dimColor:!0,children:` · /dream to run`})]})})]}),(0,J.jsx)(ne,{defaultFocusValue:b,options:h,isDisabled:L,onChange:t=>{if(t.startsWith(X)){let e=t.slice(15);K(e,{recursive:!0}).catch(()=>{}).then(()=>le(e));return}Y=t,e(t)},onCancel:t,onUpFromFirstItem:()=>I(R)})]})}var q,J,Y,X,_e=e((()=>{a(),s(),q=t(s(),1),h(),U(),d(),ce(),_(),j(),z(),R(),se(),I(),V(),B(),r(),b(),N(),he(),v(),oe(),J=m(),X=`__open_folder__`}));function ve(e){let t=de(),n=E(),r=e.startsWith(t)?`~`+e.slice(t.length):null,i=e.startsWith(n)?`./`+fe(n,e):null;return r&&i?r.length<=i.length?r:i:r||i||e}var ye=e((()=>{s(),d(),T(),m()}));function be({onDone:e}){let t=async t=>{try{t.includes(n())&&await K(n(),{recursive:!0});try{await pe(t,``,{encoding:`utf8`,flag:`wx`})}catch(e){if(C(e)!==`EEXIST`)throw e}await ue(t);let r=`default`,i=``;process.env.VISUAL?(r=`$VISUAL`,i=process.env.VISUAL):process.env.EDITOR&&(r=`$EDITOR`,i=process.env.EDITOR);let a=r===`default`?``:`Using ${r}="${i}".`,o=a?`> ${a} To change editor, set $EDITOR or $VISUAL environment variable.`:`> To use a different editor, set the $EDITOR or $VISUAL environment variable.`;e(`Opened memory file at ${ve(t)}\n\n${o}`,{display:`system`})}catch(t){A(t),e(`Error opening memory file: ${t}`)}},r=()=>{e(`Cancelled memory editing`,{display:`system`})};return(0,Q.jsx)(u,{title:`Memory`,onCancel:r,color:`remember`,children:(0,Q.jsxs)(p,{flexDirection:`column`,children:[(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(ge,{onSelect:t,onCancel:r})}),(0,Q.jsx)(p,{marginTop:1,children:(0,Q.jsxs)(c,{dimColor:!0,children:[`Learn more: `,(0,Q.jsx)(o,{url:`https://code.claude.com/docs/en/memory`})]})})]})})}var Z,Q,$;e((()=>{Z=t(s(),1),d(),_e(),ye(),B(),r(),w(),k(),W(),Q=m(),$=async e=>(L(),await P(),(0,Q.jsx)(be,{onDone:e}))}))();export{$ as call};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,p as i,t as a,tt as o,x as s}from"./src-DNHWYkls.js";import{t as c}from"./jsx-runtime-BTgGEFjL.js";import{t as l}from"./useKeybinding-DAQL_dB_.js";import{t as u}from"./lib-Ddq71jM5.js";function d({onDone:e}){let[t,n]=(0,m.useState)(`ios`),[a,c]=(0,m.useState)({ios:``,android:``}),{url:l}=g[t],u=a[t];(0,m.useEffect)(()=>{async function e(){let[e,t]=await Promise.all([(0,p.toString)(g.ios.url,{type:`utf8`,errorCorrectionLevel:`L`}),(0,p.toString)(g.android.url,{type:`utf8`,errorCorrectionLevel:`L`})]);c({ios:e,android:t})}e().catch(()=>{})},[]),o(`confirm:no`,(0,m.useCallback)(()=>{e()},[e]),{context:`Confirmation`});function d(t){if(t.key===`q`||t.ctrl&&t.key===`c`){t.preventDefault(),e();return}(t.key===`tab`||t.key===`left`||t.key===`right`)&&(t.preventDefault(),n(e=>e===`ios`?`android`:`ios`))}let f=u.split(`
|
|
2
|
+
`).filter(e=>e.length>0);return(0,h.jsx)(i,{children:(0,h.jsxs)(s,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:d,children:[(0,h.jsx)(r,{children:` `}),(0,h.jsx)(r,{children:` `}),f.map((e,t)=>(0,h.jsx)(r,{children:e},t)),(0,h.jsx)(r,{children:` `}),(0,h.jsx)(r,{children:` `}),(0,h.jsxs)(s,{flexDirection:`row`,gap:2,children:[(0,h.jsxs)(r,{children:[(0,h.jsx)(r,{bold:t===`ios`,underline:t===`ios`,children:`iOS`}),(0,h.jsx)(r,{dimColor:!0,children:` / `}),(0,h.jsx)(r,{bold:t===`android`,underline:t===`android`,children:`Android`})]}),(0,h.jsx)(r,{dimColor:!0,children:`(tab to switch, esc to close)`})]}),(0,h.jsx)(r,{dimColor:!0,children:l})]})})}async function f(e){return(0,h.jsx)(d,{onDone:e})}var p,m,h,g;e((()=>{p=u(),n(),m=t(n(),1),a(),l(),h=c(),g={ios:{url:`https://apps.apple.com/app/claude-by-anthropic/id6473753684`},android:{url:`https://play.google.com/store/apps/details?id=com.anthropic.claude`}}}))();export{f as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n}from"./src-DNHWYkls.js";function r(){return(0,a.useContext)(o)!==null}function i(e){let t=(0,a.useContext)(o);return t?{rows:t.rows,columns:t.columns}:e}var a,o,s=e((()=>{a=t(n(),1),o=(0,a.createContext)(null)}));export{i,s as n,r,o as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-CFG7IQID.js";import{Rn as i,b as a,t as o,x as s}from"./src-DNHWYkls.js";import{t as c}from"./jsx-runtime-BTgGEFjL.js";import{Gs as l,Js as u,Ms as d}from"./growthbook-p4aJ_UMv.js";import{RT as f,fm as p,pm as m,sL as h,zT as g}from"./loadAgentsDir-Bz0FfcVt.js";import{join as _}from"path";import{existsSync as v,mkdirSync as y,readFileSync as b,readdirSync as x}from"fs";function S(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}function C(e){let t=e.split(/^---$/m);if(t.length<3)throw Error(`Invalid markdown frontmatter: missing --- delimiters`);return{frontmatter:(0,k.parse)(t[1]),body:t.slice(2).join(`---`).trim()}}function w(){if(j!==null)return j;j=[];try{let e=_(n(),`modes`);v(e)||y(e,{recursive:!0});let t=x(e).filter(e=>e.endsWith(`.yaml`)||e.endsWith(`.yml`)||e.endsWith(`.md`));for(let n of t)try{let t=b(_(e,n),`utf-8`),r;if(n.endsWith(`.md`)){let{frontmatter:e,body:n}=C(t);r={...e,system_prompt:n},r.slug||(r.slug=r.name?S(String(r.name)):``),r.icon=r.icon||`🤖`}else r=(0,k.parse)(t);if(!r.slug||!r.name)continue;j.push({name:String(r.name),slug:String(r.slug),description:String(r.description||``),icon:String(r.icon||`🔧`),systemPrompt:String(r.system_prompt||``),model:r.model?String(r.model):void 0,ui:{accentColor:String(r.ui?.accent_color||`#00D4AA`),promptPrefix:String(r.ui?.prompt_prefix||``)},permissions:{defaultMode:r.permissions?.default_mode||`default`,memoryExtract:!!(r.permissions?.memory_extract??!0)},responseStyle:{verbosity:r.response_style?.verbosity||`normal`}})}catch{}}catch{}return j}function T(){let e=w();if(e.length===0)return p;let t=new Set(e.map(e=>e.slug));return[...e,...p.filter(e=>!t.has(e.slug))]}function E(){return A===null&&(A=d().ccbMode||`default`),A}function D(e){let t=T();if(!t.find(t=>t.slug===e))throw Error(`Unknown mode: ${e}. Available: ${t.map(e=>e.slug).join(`, `)}`);A=e,u(`userSettings`,{ccbMode:e});for(let e of M)e()}function O(){return T()}var k,A,j,M,N=e((()=>{i(),k=h(),l(),r(),m(),A=null,j=null,M=new Set}));function P({onDone:e}){let t=O(),n=E(),r=(0,F.useMemo)(()=>t.map(e=>({label:(0,I.jsxs)(a,{children:[e.icon,` `,e.name,` `,(0,I.jsxs)(a,{dimColor:!0,children:[`(`,e.slug,`) — `,e.description]})]}),value:e.slug})),[t]);function i(n){D(n);let r=t.find(e=>e.slug===n);e(`${r?.icon} Mode switched to: ${r?.name} (${r?.slug}) — ${r?.description}`,{display:`system`})}function o(){e(`Mode selection cancelled.`,{display:`system`})}return(0,I.jsxs)(s,{flexDirection:`column`,children:[(0,I.jsxs)(s,{marginBottom:1,flexDirection:`column`,children:[(0,I.jsx)(a,{color:`remember`,bold:!0,children:`Select mode`}),(0,I.jsx)(a,{dimColor:!0,children:`Arrow keys to navigate, Enter to select, Esc to cancel.`})]}),(0,I.jsx)(f,{defaultValue:n,options:r,onChange:i,onCancel:o,visibleOptionCount:t.length})]})}var F,I,L;e((()=>{F=t(i(),1),o(),g(),N(),I=c(),L=async(e,t,n)=>{let r=n?.trim().toLowerCase();if(r){let t=O(),n=t.find(e=>e.slug===r);if(!n){e(`Unknown mode: "${r}"\n\nAvailable modes:\n${t.map(e=>`${e.icon} ${e.slug} — ${e.description}`).join(`
|
|
2
|
+
`)}`,{display:`system`});return}D(r),e(`${n.icon} Mode switched to: ${n.name} (${n.slug}) — ${n.description}`,{display:`system`});return}return(0,I.jsx)(P,{onDone:e})}}))();export{L as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i}from"./src-DNHWYkls.js";import{t as a}from"./jsx-runtime-BTgGEFjL.js";import{Fi as o,Jr as s,Ki as c,Mi as l,Ni as u,Pi as d,Rr as f,Zr as p,ea as m,ia as h,ra as g,ta as _,ti as v}from"./growthbook-p4aJ_UMv.js";import{G as y,S as b,x}from"./privacyLevel-CRCHhztk.js";import{n as S,r as C}from"./analytics-i6X1et4O.js";import{BE as w,HE as T,Is as E,Ls as D,__ as O,g_ as k,h_ as A,zE as j}from"./loadAgentsDir-Bz0FfcVt.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-qOBMQB6g.js";function I({onDone:e}){let t=w(e=>e.mainLoopModel),r=w(e=>e.mainLoopModelForSession),i=w(e=>e.fastMode),a=T();function o(){C(`tengu_model_command_menu`,{action:`cancel`});let r=H(t);e(`Kept model as ${n.bold(r)}`,{display:`system`})}function s(r,o){C(`tengu_model_command_menu`,{action:r,from_model:t,to_model:r}),a(e=>({...e,mainLoopModel:r,mainLoopModelForSession:null}));let s=`Set model to ${n.bold(H(r))}`;o!==void 0&&(s+=` with ${n.bold(o)} effort`);let l;g()&&(c(),!h(r)&&i?(a(e=>({...e,fastMode:!1})),l=!1):h(r)&&_()&&i&&(s+=` · Fast mode ON`,l=!0)),N(r,l===!0,p())&&(s+=` · Billed as extra usage`),l===!1&&(s+=` · Fast mode OFF`),e(s)}return(0,W.jsx)(P,{initial:t,sessionModel:r,onSelect:s,onCancel:o,isStandaloneCommand:!0,showFastModeNotice:g()&&i&&h(t)&&_()})}function L({args:e,onDone:t}){let r=w(e=>e.fastMode),i=T(),a=e===`default`?null:e;return U.useEffect(()=>{async function e(){if(a&&!u(a)){t(`Model '${a}' is not available. Your organization restricts model selection.`,{display:`system`});return}if(a&&z(a)){t(`Opus 4.7 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(a&&B(a)){t(`Sonnet 4.6 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(!a){o(null);return}if(R(a)){o(a);return}try{let{valid:e,error:n}=await D(a);e?o(a):t(n||`Model '${a}' not found`,{display:`system`})}catch(e){t(`Failed to validate model: ${e.message}`,{display:`system`})}}function o(e){i(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null}));let a=`Set model to ${n.bold(H(e))}`,o;g()&&(c(),!h(e)&&r?(i(e=>({...e,fastMode:!1})),o=!1):h(e)&&r&&(a+=` · Fast mode ON`,o=!0)),N(e,o===!0,p())&&(a+=` · Billed as extra usage`),o===!1&&(a+=` · Fast mode OFF`),t(a)}e()},[a,t,i]),null}function R(e){return d.includes(e.toLowerCase().trim())}function z(e){let t=e.toLowerCase();return!A()&&!p()&&t.includes(`opus`)&&t.includes(`[1m]`)}function B(e){let t=e.toLowerCase();return!k()&&(t.includes(`sonnet[1m]`)||t.includes(`sonnet-4-6[1m]`))}function V({onDone:e}){let t=w(e=>e.mainLoopModel),r=w(e=>e.mainLoopModelForSession),i=w(e=>e.effortValue),a=H(t),o=i===void 0?``:` (effort: ${i})`;return e(r?`Current model: ${n.bold(H(r))} (session override from plan mode)\nBase model: ${a}${o}`:`Current model: ${a}${o}`),null}function H(e){let t=v(e??f());return e===null?`${t} (default)`:t}var U,W,G;e((()=>{r(),U=t(i(),1),M(),y(),S(),j(),F(),m(),o(),O(),s(),l(),E(),W=a(),G=async(e,t,n)=>{if(n=n?.trim()||``,b.includes(n))return C(`tengu_model_command_inline_help`,{args:n}),(0,W.jsx)(V,{onDone:e});if(x.includes(n)){e(`Run /model to open the model selection menu, or /model [modelName] to set the model.`,{display:`system`});return}return n?(C(`tengu_model_command_inline`,{args:n}),(0,W.jsx)(L,{args:n,onDone:e})):(0,W.jsx)(I,{onDone:e})}}))();export{G as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Jr as e,Vr as t}from"./growthbook-p4aJ_UMv.js";e();export{t as getMainLoopModel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Ht as t,k as n}from"./state-CUZTq6r0.js";import{Ao as r,Ba as i,Br as a,Fr as o,Gs as s,Hi as c,Hr as l,Ii as ee,Ir as u,Jr as d,Li as f,Mi as p,Ni as m,Pr as te,Ri as h,Rr as g,Sa as _,Ur as v,Vs as y,Wi as b,Zr as x,_a as S,_s as ne,fi as C,ft as w,gt as re,ko as T,la as E,ls as ie,nt as ae,pi as oe,qr as se,st as D,ti as O,ua as k,xa as A,ya as j,za as M,zr as N}from"./growthbook-p4aJ_UMv.js";import{__ as P,g_ as F,h_ as I}from"./loadAgentsDir-Bz0FfcVt.js";function L(e=!1){if(process.env.USER_TYPE===`ant`){let e=O(g());return{value:null,label:`Default (recommended)`,description:`Use the default model for Ants (currently ${e})`,descriptionForModel:`Default model (currently ${e})`}}if(D())return{value:null,label:`Default (recommended)`,description:o(e)};let t=T()!==`firstParty`;return{value:null,label:`Default (recommended)`,description:`Use the default model (currently ${O(g())})${t?``:` · ${c(h)}`}`}}function R(){let e=T()!==`firstParty`,t=T(),n=t===`openai`?process.env.OPENAI_DEFAULT_SONNET_MODEL:t===`gemini`?process.env.GEMINI_DEFAULT_SONNET_MODEL:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;if(e&&n){let e=C(n),r=t===`openai`?process.env.OPENAI_DEFAULT_SONNET_MODEL_NAME:t===`gemini`?process.env.GEMINI_DEFAULT_SONNET_MODEL_NAME:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME,i=t===`openai`?process.env.OPENAI_DEFAULT_SONNET_MODEL_DESCRIPTION:t===`gemini`?process.env.GEMINI_DEFAULT_SONNET_MODEL_DESCRIPTION:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION;return{value:`sonnet`,label:r??n,description:i??`Custom Sonnet model${e?` (1M context)`:``}`,descriptionForModel:`${i??`Custom Sonnet model${e?` with 1M context`:``}`} (${n})`}}}function z(){let e=T()!==`firstParty`;return{value:e?E().sonnet46:`sonnet`,label:`Sonnet`,description:`Sonnet 4.6 · Best for everyday tasks${e?``:` · ${c(h)}`}`,descriptionForModel:`Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks`}}function B(){let e=T()!==`firstParty`,t=T(),n=t===`openai`?process.env.OPENAI_DEFAULT_OPUS_MODEL:t===`gemini`?process.env.GEMINI_DEFAULT_OPUS_MODEL:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;if(e&&n){let e=C(n),r=t===`openai`?process.env.OPENAI_DEFAULT_OPUS_MODEL_NAME:t===`gemini`?process.env.GEMINI_DEFAULT_OPUS_MODEL_NAME:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME,i=t===`openai`?process.env.OPENAI_DEFAULT_OPUS_MODEL_DESCRIPTION:t===`gemini`?process.env.GEMINI_DEFAULT_OPUS_MODEL_DESCRIPTION:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION;return{value:`opus`,label:r??n,description:i??`Custom Opus model${e?` (1M context)`:``}`,descriptionForModel:`${i??`Custom Opus model${e?` with 1M context`:``}`} (${n})`}}}function V(e=!1){return{value:T()===`firstParty`?`opus`:E().opus47,label:`Opus 4.7`,description:`Opus 4.7 · Most capable for complex work${v(e)}`,descriptionForModel:`Opus 4.7 - most capable for complex work`}}function H(){let e=T()!==`firstParty`;return{value:e?E().sonnet46+`[1m]`:`sonnet[1m]`,label:`Sonnet (1M context)`,description:`Sonnet 4.6 for long sessions${e?``:` · ${c(h)}`}`,descriptionForModel:`Sonnet 4.6 with 1M context window - for long sessions with large codebases`}}function U(e=!1){return{value:T()===`firstParty`?`opus[1m]`:E().opus47+`[1m]`,label:`Opus 4.7 (1M context)`,description:`Opus 4.7 with 1M context${v(e)}`,descriptionForModel:`Opus 4.7 with 1M context window - for long sessions with large codebases`}}function W(e=!1){return{value:E().opus46+`[1m]`,label:`Opus 4.6 (1M context)`,description:`Opus 4.6 with 1M context${v(e)}`,descriptionForModel:`Opus 4.6 with 1M context window - for long sessions with large codebases`}}function G(){let e=T()!==`firstParty`,t=T(),n=t===`openai`?process.env.OPENAI_DEFAULT_HAIKU_MODEL:t===`gemini`?process.env.GEMINI_DEFAULT_HAIKU_MODEL:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;if(e&&n){let e=t===`openai`?process.env.OPENAI_DEFAULT_HAIKU_MODEL_NAME:t===`gemini`?process.env.GEMINI_DEFAULT_HAIKU_MODEL_NAME:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME,r=t===`openai`?process.env.OPENAI_DEFAULT_HAIKU_MODEL_DESCRIPTION:t===`gemini`?process.env.GEMINI_DEFAULT_HAIKU_MODEL_DESCRIPTION:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION;return{value:`haiku`,label:e??n,description:r??`Custom Haiku model`,descriptionForModel:`${r??`Custom Haiku model`} (${n})`}}}function K(){return{value:`haiku`,label:`Haiku`,description:`Haiku 4.5 · Fastest for quick answers${T()===`firstParty`?` · ${c(f)}`:``}`,descriptionForModel:`Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6.`}}function ce(){return{value:`haiku`,label:`Haiku`,description:`Haiku 3.5 for simple tasks${T()===`firstParty`?` · ${c(ee)}`:``}`,descriptionForModel:`Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks.`}}function le(){return u()===E().haiku45?K():ce()}function q(e=!1){return{value:`opus`,label:`Opus 4.7`,description:`Opus 4.7 · Most capable for complex work${e?v(!0):``}`}}function J(){let e=T()!==`firstParty`;return{value:`sonnet[1m]`,label:`Sonnet (1M context)`,description:`Sonnet 4.6 with 1M context${D()?` · Billed as extra usage`:``}${e?``:` · ${c(h)}`}`}}function ue(e=!1){return{value:`opus[1m]`,label:`Opus 4.7 (1M context)`,description:`Opus 4.7 with 1M context${D()?` · Billed as extra usage`:``}${v(e)}`}}function Y(e=!1){let t=T()!==`firstParty`;return{value:t?E().opus47+`[1m]`:`opus[1m]`,label:`Opus 4.7 (1M context)`,description:`Opus 4.7 with 1M context · Most capable for complex work${!t&&e?v(e):``}`,descriptionForModel:`Opus 4.7 with 1M context - most capable for complex work`}}function de(){return{value:`opusplan`,label:`Opus Plan Mode`,description:`Use Opus 4.7 in plan mode, Sonnet 4.6 otherwise`}}function fe(){return[{value:null,label:`Default (recommended)`,description:`Use the default ChatGPT Codex model (currently ${S})`,descriptionForModel:`Default ChatGPT Codex model (currently ${S})`},...j.map(e=>({value:e.value,label:e.label,description:e.description,descriptionForModel:`${e.description} (${e.value})`}))]}function X(e=!1){if(process.env.USER_TYPE===`ant`){let t=M().map(e=>({value:e.alias,label:e.label,description:e.description??`[ANT-ONLY] ${e.label} (${e.model})`}));return[L(),...t,Y(e),z(),H(),K()]}if(T()===`openai`&&_())return fe();if(D()){if(w()||re()){let t=[L(e)];return t.push(W(e)),t.push(Q),F()&&t.push(J()),t.push($),t}let t=[L(e)];return x()?t.push(Y(e)):(t.push(q(e)),I()&&t.push(ue(e))),t.push(W(e)),F()&&t.push(J()),t.push($),t}if(T()===`firstParty`){let t=[L(e)];return x()?t.push(Y(e)):(t.push(V(e)),I()&&t.push(U(e))),t.push(W(e)),F()&&t.push(H()),t.push(K()),t}let t=[L(e)],n=R();n===void 0?(t.push(z()),F()&&t.push(H())):t.push(n);let r=B();r===void 0?(t.push(U(e)),t.push(W(e))):t.push(r);let i=G();return i===void 0?t.push(le()):t.push(i),t}function pe(e){let t=te(e);if(t.includes(`claude-sonnet-4-6`)||t.includes(`claude-sonnet-4-5`)||t.includes(`claude-sonnet-4-`)||t.includes(`claude-3-7-sonnet`)||t.includes(`claude-3-5-sonnet`)){let e=l(a());if(e)return{alias:`Sonnet`,currentVersionName:e}}if(t.includes(`claude-opus-4`)){let e=l(N());if(e)return{alias:`Opus`,currentVersionName:e}}if(t.includes(`claude-haiku`)||t.includes(`claude-3-5-haiku`)){let e=l(u());if(e)return{alias:`Haiku`,currentVersionName:e}}return null}function me(e){let t=l(e);if(!t)return null;let n=pe(e);return n?t===n.currentVersionName?{value:e,label:t,description:e}:{value:e,label:t,description:`Newer version available · select ${n.alias} for ${n.currentVersionName}`}:{value:e,label:t,description:e}}function he(e=!1){let t=X(e),r=process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;r&&!t.some(e=>e.value===r)&&t.push({value:r,label:process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME??r,description:process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION??`Custom model (${r})`});for(let e of ie().additionalModelOptionsCache??[])t.some(t=>t.value===e.value)||t.push(e);let i=null,a=se(),o=n();if(a==null?o!==null&&(i=o):i=a,i===null||t.some(e=>e.value===i))return Z(t);if(i===`opusplan`)return Z([...t,de()]);if(i===`opus`&&T()===`firstParty`)return Z([...t,q(e)]);if(i===`opus[1m]`&&T()===`firstParty`)return Z([...t,Y(e)]);{let e=me(i);return e?t.push(e):t.push({value:i,label:i,description:`Custom model`}),Z(t)}}function Z(e){return(y()||{}).availableModels?e.filter(e=>e.value===null||e.value!==null&&m(e.value)):e}var Q,$,ge=e((()=>{t(),ae(),k(),i(),b(),s(),P(),r(),p(),d(),oe(),ne(),A(),Q={value:`sonnet`,label:`Sonnet`,description:`Sonnet 4.6 · Best for everyday tasks`},$={value:`haiku`,label:`Haiku`,description:`Haiku 4.5 · Fastest for quick answers`}}));export{ge as n,he as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";function t(e){let t=e.replace(/[^a-zA-Z0-9_-]/g,`_`);return e.startsWith(n)&&(t=t.replace(/_+/g,`_`).replace(/^_|_$/g,``)),t}var n,r=e((()=>{n=`claude.ai `}));export{t as n,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as e,u as t}from"./oauth-DMPGYAoZ.js";t();export{e as getOauthConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./memoize-DNnuA2aU.js";import{n as i,t as a}from"./protectedNamespace-Cn4901XG.js";import{homedir as o}from"os";import{join as s}from"path";function c(e){if(!e)return!1;if(typeof e==`boolean`)return e;let t=e.toLowerCase().trim();return[`1`,`true`,`yes`,`on`].includes(t)}function l(e){if(e===void 0)return!1;if(typeof e==`boolean`)return!e;if(!e)return!1;let t=e.toLowerCase().trim();return[`0`,`false`,`no`,`off`].includes(t)}function u(){return c(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function d(){return process.env.USER_TYPE===`ant`&&c(process.env.COO_RUNNING_ON_HOMESPACE)}function f(){return process.env.USER_TYPE===`ant`?(a(),e(i)).checkProtectedNamespace():!1}var p,m=t((()=>{r(),p=n(()=>(process.env.CLAUDE_CONFIG_DIR??s(o(),`.zaniicode`)).normalize(`NFC`),()=>process.env.CLAUDE_CONFIG_DIR)}));function h(){if(process.env.USER_TYPE===`ant`){if(c(process.env.USE_LOCAL_OAUTH))return`local`;if(c(process.env.USE_STAGING_OAUTH))return`staging`}return`prod`}function g(){if(process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL)return`-custom-oauth`;switch(h()){case`local`:return`-local-oauth`;case`staging`:return`-staging-oauth`;case`prod`:return``}}function _(){let e=process.env.CLAUDE_LOCAL_OAUTH_API_BASE?.replace(/\/$/,``)??`http://localhost:8000`,t=process.env.CLAUDE_LOCAL_OAUTH_APPS_BASE?.replace(/\/$/,``)??`http://localhost:4000`,n=process.env.CLAUDE_LOCAL_OAUTH_CONSOLE_BASE?.replace(/\/$/,``)??`http://localhost:3000`;return{BASE_API_URL:e,CONSOLE_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${t}/oauth/authorize`,CLAUDE_AI_ORIGIN:t,TOKEN_URL:`${e}/v1/oauth/token`,API_KEY_URL:`${e}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${e}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${n}/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,CLAUDEAI_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${n}/oauth/code/callback`,CLIENT_ID:`22422756-60c9-4084-8eb7-27705fd5cf9a`,OAUTH_FILE_SUFFIX:`-local-oauth`,MCP_PROXY_URL:`http://localhost:8205`,MCP_PROXY_PATH:`/v1/toolbox/shttp/mcp/{server_id}`}}function v(){let e=(()=>{switch(h()){case`local`:return _();case`staging`:return O??E;case`prod`:return E}})(),t=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(t){let n=t.replace(/\/$/,``);if(!k.includes(n))throw Error(`CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.`);e={...e,BASE_API_URL:n,CONSOLE_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_ORIGIN:n,TOKEN_URL:`${n}/v1/oauth/token`,API_KEY_URL:`${n}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${n}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${n}/oauth/code/callback`,OAUTH_FILE_SUFFIX:`-custom-oauth`}}let n=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;return n&&(e={...e,CLIENT_ID:n}),e}var y,b,x,S,C,w,T,E,D,O,k,A=t((()=>{m(),y=`user:inference`,b=`user:profile`,x=`org:create_api_key`,S=`oauth-2025-04-20`,C=[x,b],w=[b,y,`user:sessions:claude_code`,`user:mcp_servers`,`user:file_upload`],T=Array.from(new Set([...C,...w])),E={BASE_API_URL:`https://api.anthropic.com`,CONSOLE_AUTHORIZE_URL:`https://platform.claude.com/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`https://claude.com/cai/oauth/authorize`,CLAUDE_AI_ORIGIN:`https://claude.ai`,TOKEN_URL:`https://platform.claude.com/v1/oauth/token`,API_KEY_URL:`https://api.anthropic.com/api/oauth/claude_cli/create_api_key`,ROLES_URL:`https://api.anthropic.com/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,CLAUDEAI_SUCCESS_URL:`https://platform.claude.com/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`https://platform.claude.com/oauth/code/callback`,CLIENT_ID:`9d1c250a-e61b-44d9-88ed-5944d1962f5e`,OAUTH_FILE_SUFFIX:``,MCP_PROXY_URL:`https://mcp-proxy.anthropic.com`,MCP_PROXY_PATH:`/v1/mcp/{server_id}`},D=`https://claude.ai/oauth/claude-code-client-metadata`,O=process.env.USER_TYPE===`ant`?{BASE_API_URL:`https://api-staging.anthropic.com`,CONSOLE_AUTHORIZE_URL:`https://platform.staging.ant.dev/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`https://claude-ai.staging.ant.dev/oauth/authorize`,CLAUDE_AI_ORIGIN:`https://claude-ai.staging.ant.dev`,TOKEN_URL:`https://platform.staging.ant.dev/v1/oauth/token`,API_KEY_URL:`https://api-staging.anthropic.com/api/oauth/claude_cli/create_api_key`,ROLES_URL:`https://api-staging.anthropic.com/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`https://platform.staging.ant.dev/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,CLAUDEAI_SUCCESS_URL:`https://platform.staging.ant.dev/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`https://platform.staging.ant.dev/oauth/code/callback`,CLIENT_ID:`22422756-60c9-4084-8eb7-27705fd5cf9a`,OAUTH_FILE_SUFFIX:`-staging-oauth`,MCP_PROXY_URL:`https://mcp-proxy-staging.anthropic.com`,MCP_PROXY_PATH:`/v1/mcp/{server_id}`}:void 0,k=[`https://beacon.claude-ai.staging.ant.dev`,`https://claude.fedstart.com`,`https://claude-staging.fedstart.com`]}));export{u as _,C as a,g as c,p as d,m as f,d as g,f as h,b as i,v as l,c as m,y as n,D as o,l as p,w as r,S as s,T as t,A as u};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{dirname as t,join as n}from"node:path";import{createHash as r,randomUUID as i}from"node:crypto";import{mkdir as a,readFile as o,rename as s,stat as c,writeFile as l}from"node:fs/promises";function u(e){return e?.rootDir?e.rootDir:process.env.CLAUDE_SKILL_LEARNING_HOME?process.env.CLAUDE_SKILL_LEARNING_HOME:n(process.env.HOME??process.cwd(),`.claude`,`skill-learning`)}function d(e){let t=u(e),r=e?.project;return!r||r.scope===`global`||r.projectId===`global`?n(t,`global`,`observations.jsonl`):n(t,`projects`,r.projectId,`observations.jsonl`)}function f(e,t=D){if(e===void 0)return;let n=e;for(let e of j)n=n.replace(e,e=>{let t=e.split(/[:=]/,1)[0];return/[:=]/.test(e)?`${t}: ${A}`:A});if(n.length<=t)return n;let r=E(n),i=n.slice(0,t);return n.includes(A)&&!i.includes(A)&&(i=`${A} ${i}`),`${i}\n[TRUNCATED length=${n.length} sha256=${r}]`}function p(e,t){let n=t?.maxFieldLength??D,r={...e,toolInput:f(e.toolInput,n),toolOutput:f(e.toolOutput,n),messageText:f(e.messageText,n)},i=[r.event,r.toolName??``,r.toolInput??``,r.toolOutput??``,r.messageText??``].join(`
|
|
2
|
+
`);return{...r,contentHash:E(i)}}async function m(e,n){let r=d(n);await a(t(r),{recursive:!0}),await v(n);let i=p(e,n),o=JSON.stringify(i);return Buffer.byteLength(o)>M||await l(r,`${o}\n`,{flag:`a`}),i}async function h(e){let t=d(e),n=``;try{n=await o(t,`utf8`)}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=[];for(let e of n.split(/\r?\n/))if(e.trim())try{r.push(JSON.parse(e))}catch{}return r}async function g(e,t){let n=await o(e,`utf8`),r=[];for(let e of n.split(/\r?\n/)){if(!e.trim())continue;let n=JSON.parse(e);for(let e of y(n,t))r.push(await m(e,t))}return r}async function _(e){let t=d(e),n=e?.maxAgeDays??k,r=Date.now()-n*24*60*60*1e3,i=``;try{i=await o(t,`utf8`)}catch(e){if(e.code===`ENOENT`)return 0;throw e}let a=[],c=0;for(let e of i.split(/\r?\n/))if(e.trim())try{let t=JSON.parse(e),n=Date.parse(t.timestamp);if(!Number.isNaN(n)&&n<r){c+=1;continue}a.push(e)}catch{a.push(e)}if(c===0)return 0;let u=`${t}.tmp-${process.pid}-${Date.now()}`;return await l(u,a.length?`${a.join(`
|
|
3
|
+
`)}\n`:``),await s(u,t),c}async function v(e){let r=d(e),i=e?.archiveThresholdBytes??O,o;try{o=await c(r)}catch(e){if(e.code===`ENOENT`)return null;throw e}if(o.size<i)return null;let l=n(t(r),`observations.archive`);await a(l,{recursive:!0});let u=n(l,`observations-${new Date().toISOString().replace(/[:.]/g,`-`)}.jsonl`);return await s(r,u),u}function y(e,t){let n=t?.project,r={sessionId:e.sessionId??`unknown-session`,projectId:n?.projectId??`global`,projectName:n?.projectName??`global`,cwd:e.cwd??n?.cwd??process.cwd(),timestamp:e.timestamp??new Date().toISOString(),source:`transcript`},i=e.message?.role??e.type,a=e.message?.content,o=[];if(e.tool_name&&o.push({...r,id:T(),event:`tool_complete`,toolName:e.tool_name,toolInput:w(e.tool_input),toolOutput:w(e.tool_response),outcome:C(e.tool_response)}),i===`user`){let e=S(a);if(e.length>0){for(let t of e)o.push({...r,id:T(),event:`tool_complete`,toolName:t.name,toolOutput:t.output,outcome:t.isError?`failure`:`success`});return o}return o.push({...r,id:T(),event:`user_message`,messageText:b(a)}),o}if(i===`assistant`){let e=x(a);for(let t of e)o.push({...r,id:T(),event:`tool_start`,toolName:t.name,toolInput:t.input});let t=b(a);t.trim()&&o.push({...r,id:T(),event:`assistant_message`,messageText:t})}return o}function b(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(typeof e==`string`)return e;if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
|
|
4
|
+
`):w(e)??``}function x(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_use`?[{name:String(t.name??`unknown_tool`),input:w(t.input)}]:[]}):[]}function S(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return t.type===`tool_result`?[{name:String(t.name??t.tool_name??`unknown_tool`),output:w(t.content),isError:t.is_error===!0}]:[]}):[]}function C(e){let t=w(e)?.toLowerCase()??``;return t.includes(`interrupted`)||t.includes(`aborted`)?`interrupted`:t.includes(`error`)||t.includes(`exception`)||t.includes(`failed`)?`failure`:`success`}function w(e){if(e!=null)return typeof e==`string`?e:JSON.stringify(e)}function T(){return typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():i()}function E(e){return r(`sha256`).update(e).digest(`hex`)}var D,O,k,A,j,M,N=e((()=>{D=5e3,O=1e6,k=30,A=`[REDACTED]`,j=[/\b(?:sk|sk-ant|sk-proj|xox[baprs])-[A-Za-z0-9_-]{12,}\b/g,/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g,/\b(?:api[_-]?key|token|secret|password|authorization)\b\s*[:=]\s*["']?[^"',\s}]+/gi,/\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/gi],M=64*1024}));export{_ as a,f as c,N as i,w as l,u as n,h as o,g as r,p as s,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{En as e,Ht as t}from"./state-CUZTq6r0.js";import{M as n,N as r,P as i,_s as a,bl as o,ls as s,nt as c,pl as l,xs as u}from"./growthbook-p4aJ_UMv.js";import{J as d,U as f}from"./debug-CjIaNjpK.js";import{o as p,s as m}from"./log-DVv8YiNo.js";import{Ns as h,js as g}from"./loadAgentsDir-Bz0FfcVt.js";import{n as _,r as v}from"./sessionState-Dgky34M4.js";t(),c(),a(),f(),p(),h(),l();function y({newState:t,oldState:a}){let c=a.toolPermissionContext.mode,l=t.toolPermissionContext.mode;if(c!==l){let e=o(c),n=o(l);e!==n&&v({permission_mode:n,is_ultraplan_mode:n===`plan`&&t.isUltraplanMode&&!a.isUltraplanMode?!0:null}),_(l)}if(t.mainLoopModel!==a.mainLoopModel&&e(t.mainLoopModel),t.expandedView!==a.expandedView){let e=t.expandedView===`tasks`,n=t.expandedView===`teammates`;(s().showExpandedTodos!==e||s().showSpinnerTree!==n)&&u(t=>({...t,showExpandedTodos:e,showSpinnerTree:n}))}if(t.verbose!==a.verbose&&s().verbose!==t.verbose){let e=t.verbose;u(t=>({...t,verbose:e}))}if(process.env.USER_TYPE===`ant`&&t.tungstenPanelVisible!==a.tungstenPanelVisible&&t.tungstenPanelVisible!==void 0&&s().tungstenPanelVisible!==t.tungstenPanelVisible){let e=t.tungstenPanelVisible;u(t=>({...t,tungstenPanelVisible:e}))}if(t.settings!==a.settings)try{n(),r(),i(),t.settings.env!==a.settings.env&&g()}catch(e){m(d(e))}}export{y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{promisify as t}from"node:util";import n from"node:process";import r from"node:path";import i,{execFile as a}from"node:child_process";import o from"node:fs";import s from"node:os";import c,{constants as l}from"node:fs/promises";import{fileURLToPath as u}from"node:url";import{Buffer as d}from"node:buffer";function ee(){try{return o.statSync(`/.dockerenv`),!0}catch{return!1}}function te(){try{return o.readFileSync(`/proc/self/cgroup`,`utf8`).includes(`docker`)}catch{return!1}}function f(){return p===void 0&&(p=ee()||te()),p}var p,ne=e((()=>{}));function m(){return h===void 0&&(h=g()||f()),h}var h,g,_=e((()=>{ne(),g=()=>{try{return o.statSync(`/run/.containerenv`),!0}catch{return!1}}})),v,y,b=e((()=>{_(),v=()=>{if(n.platform!==`linux`)return!1;if(s.release().toLowerCase().includes(`microsoft`))return!m();try{if(o.readFileSync(`/proc/version`,`utf8`).toLowerCase().includes(`microsoft`))return!m()}catch{}return o.existsSync(`/proc/sys/fs/binfmt_misc/WSLInterop`)||o.existsSync(`/run/WSL`)?!m():!1},y=n.env.__IS_WSL_TEST__?v:v()})),x,S,C,re=e((()=>{b(),x=(()=>{let e=`/mnt/`,t;return async function(){if(t)return t;let n=`/etc/wsl.conf`,r=!1;try{await c.access(n,l.F_OK),r=!0}catch{}if(!r)return e;let i=await c.readFile(n,{encoding:`utf8`}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return a?(t=a.groups.mountPoint.trim(),t=t.endsWith(`/`)?t:`${t}/`,t):e}})(),S=async()=>`${await x()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,C=async()=>y?S():`${n.env.SYSTEMROOT||n.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`}));function w(e,t,n){let r=n=>Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let e=n();return r(e),e},set(e){r(e)}}),e}var T=e((()=>{}));async function E(){if(n.platform!==`darwin`)throw Error(`macOS only`);let{stdout:e}=await D(`defaults`,[`read`,`com.apple.LaunchServices/com.apple.launchservices.secure`,`LSHandlers`]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??`com.apple.Safari`;return t===`com.apple.safari`?`com.apple.Safari`:t}var D,O=e((()=>{D=t(a)}));async function k(e,{humanReadableOutput:t=!0,signal:r}={}){if(n.platform!==`darwin`)throw Error(`macOS only`);let i=t?[]:[`-ss`],a={};r&&(a.signal=r);let{stdout:o}=await A(`osascript`,[`-e`,e,i],a);return o.trim()}var A,j=e((()=>{A=t(a)}));async function M(e){return k(`tell application "Finder" to set app_path to application file id "${e}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var N=e((()=>{j()}));async function P(e=F){let{stdout:t}=await e(`reg`,[`QUERY`,` HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice`,`/v`,`ProgId`]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new L(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:r}=n.groups,i=r.lastIndexOf(`.`),a=r.lastIndexOf(`-`),o=i===-1?void 0:r.slice(0,i),s=a===-1?void 0:r.slice(0,a);return I[r]??I[o]??I[s]??{name:r,id:r}}var F,I,L,R=e((()=>{F=t(a),I={MSEdgeHTM:{name:`Edge`,id:`com.microsoft.edge`},MSEdgeBHTML:{name:`Edge Beta`,id:`com.microsoft.edge.beta`},MSEdgeDHTML:{name:`Edge Dev`,id:`com.microsoft.edge.dev`},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:`Edge`,id:`com.microsoft.edge.old`},ChromeHTML:{name:`Chrome`,id:`com.google.chrome`},ChromeBHTML:{name:`Chrome Beta`,id:`com.google.chrome.beta`},ChromeDHTML:{name:`Chrome Dev`,id:`com.google.chrome.dev`},ChromiumHTM:{name:`Chromium`,id:`org.chromium.Chromium`},BraveHTML:{name:`Brave`,id:`com.brave.Browser`},BraveBHTML:{name:`Brave Beta`,id:`com.brave.Browser.beta`},BraveDHTML:{name:`Brave Dev`,id:`com.brave.Browser.dev`},BraveSSHTM:{name:`Brave Nightly`,id:`com.brave.Browser.nightly`},FirefoxURL:{name:`Firefox`,id:`org.mozilla.firefox`},OperaStable:{name:`Opera`,id:`com.operasoftware.Opera`},VivaldiHTM:{name:`Vivaldi`,id:`com.vivaldi.Vivaldi`},"IE.HTTP":{name:`Internet Explorer`,id:`com.microsoft.ie`}},new Map(Object.entries(I)),L=class extends Error{}}));async function z(){if(n.platform===`darwin`){let e=await E();return{name:await M(e),id:e}}if(n.platform===`linux`){let{stdout:e}=await B(`xdg-mime`,[`query`,`default`,`x-scheme-handler/http`]),t=e.trim();return{name:V(t.replace(/.desktop$/,``).replace(`-`,` `)),id:t}}if(n.platform===`win32`)return P();throw Error(`Only macOS, Linux, and Windows are supported`)}var B,V,H=e((()=>{O(),N(),R(),B=t(a),V=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase())}));async function ie(){let e=await C(),t=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,{stdout:n}=await G(e,[`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`,d.from(t,`utf16le`).toString(`base64`)],{encoding:`utf8`}),r=n.trim(),i={ChromeHTML:`com.google.chrome`,BraveHTML:`com.brave.Browser`,MSEdgeHTM:`com.microsoft.edge`,FirefoxURL:`org.mozilla.firefox`};return i[r]?{id:i[r]}:{}}function U(e){if(typeof e==`string`||Array.isArray(e))return e;let{[Y]:t}=e;if(!t)throw Error(`${Y} is not supported`);return t}function W({[J]:e},{wsl:t}){if(t&&y)return U(t);if(!e)throw Error(`${J} is not supported`);return U(e)}var G,K,q,J,Y,X,Z,Q,$;e((()=>{re(),T(),H(),_(),G=t(i.execFile),K=r.dirname(u(import.meta.url)),q=r.join(K,`xdg-open`),{platform:J,arch:Y}=n,X=async(e,t)=>{let n;for(let r of e)try{return await t(r)}catch(e){n=e}throw n},Z=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return X(e.app,t=>Z({...e,app:t}));let{name:t,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(t))return X(t,t=>Z({...e,app:{name:t,arguments:r}}));if(t===`browser`||t===`browserPrivate`){let n={"com.google.chrome":`chrome`,"google-chrome.desktop":`chrome`,"com.brave.Browser":`brave`,"org.mozilla.firefox":`firefox`,"firefox.desktop":`firefox`,"com.microsoft.msedge":`edge`,"com.microsoft.edge":`edge`,"com.microsoft.edgemac":`edge`,"microsoft-edge.desktop":`edge`},i={chrome:`--incognito`,brave:`--incognito`,firefox:`--private-window`,edge:`--inPrivate`},a=y?await ie():await z();if(a.id in n){let o=n[a.id];return t===`browserPrivate`&&r.push(i[o]),Z({...e,app:{name:$[o],arguments:r}})}throw Error(`${a.name} is not supported as a default browser`)}let a,o=[],s={};if(J===`darwin`)a=`open`,e.wait&&o.push(`--wait-apps`),e.background&&o.push(`--background`),e.newInstance&&o.push(`--new`),t&&o.push(`-a`,t);else if(J===`win32`||y&&!m()&&!t){a=await C(),o.push(`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`),y||(s.windowsVerbatimArguments=!0);let n=[`Start`];e.wait&&n.push(`-Wait`),t?(n.push(`"\`"${t}\`""`),e.target&&r.push(e.target)):e.target&&n.push(`"${e.target}"`),r.length>0&&(r=r.map(e=>`"\`"${e}\`""`),n.push(`-ArgumentList`,r.join(`,`))),e.target=d.from(n.join(` `),`utf16le`).toString(`base64`)}else{if(t)a=t;else{let e=!K||K===`/`,t=!1;try{await c.access(q,l.X_OK),t=!0}catch{}a=n.versions.electron??(J===`android`||e||!t)?`xdg-open`:q}r.length>0&&o.push(...r),e.wait||(s.stdio=`ignore`,s.detached=!0)}J===`darwin`&&r.length>0&&o.push(`--args`,...r),e.target&&o.push(e.target);let u=i.spawn(a,o,s);return e.wait?new Promise((t,n)=>{u.once(`error`,n),u.once(`close`,r=>{if(!e.allowNonzeroExitCode&&r>0){n(Error(`Exited with code ${r}`));return}t(u)})}):(u.unref(),u)},Q=(e,t)=>{if(typeof e!=`string`)throw TypeError("Expected a `target`");return Z({...t,target:e})},$={},w($,`chrome`,()=>W({darwin:`google chrome`,win32:`chrome`,linux:[`google-chrome`,`google-chrome-stable`,`chromium`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`,x64:[`/mnt/c/Program Files/Google/Chrome/Application/chrome.exe`,`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`]}})),w($,`brave`,()=>W({darwin:`brave browser`,win32:`brave`,linux:[`brave-browser`,`brave`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`,x64:[`/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe`,`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`]}})),w($,`firefox`,()=>W({darwin:`firefox`,win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:`firefox`},{wsl:`/mnt/c/Program Files/Mozilla Firefox/firefox.exe`})),w($,`edge`,()=>W({darwin:`microsoft edge`,win32:`msedge`,linux:[`microsoft-edge`,`microsoft-edge-dev`]},{wsl:`/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe`})),w($,`browser`,()=>`browser`),w($,`browserPrivate`,()=>`browserPrivate`)}))();export{Q as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,s as n,u as r}from"./envUtils-CFG7IQID.js";import{Ht as i,at as a}from"./state-CUZTq6r0.js";import{Vi as o,Wi as s,pi as c,ui as l}from"./growthbook-p4aJ_UMv.js";import{l as u,p as d}from"./debug-CjIaNjpK.js";import{$I as f,Cj as p,Dj as m,Oj as h,QI as g,Qx as _,Sj as v,Zc as y,bc as b,bj as ee,cj as x,dj as te,eL as S,fj as C,hj as w,il as T,jc as E,lj as ne,mj as D,nS as O,nd as k,nt as A,oj as re,ol as ie,pj as j,rd as ae,sj as oe,td as M,tt as N,uj as P,vj as F,xj as I,yj as L}from"./loadAgentsDir-Bz0FfcVt.js";import{i as R,r as z,t as B}from"./prompt-CsBCtw4l.js";import{A as V,E as H,O as U,T as W,V as G,k as K}from"./rcDebugLog-BbHlIxCm.js";import{randomUUID as q}from"crypto";function se(e){if(t(process.env.OPENAI_ENABLE_THINKING))return!1;if(r(process.env.OPENAI_ENABLE_THINKING))return!0;let n=e.toLowerCase();return n.includes(`deepseek`)||n.includes(`mimo`)}function ce(e,t){return t??(process.env.OPENAI_MAX_TOKENS&&parseInt(process.env.OPENAI_MAX_TOKENS,10)||void 0)??(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS&&parseInt(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS,10)||void 0)??e}function le(e){let{model:t,messages:n,tools:r,toolChoice:i,enableThinking:a,maxTokens:o,temperatureOverride:s,promptCacheKey:c}=e;return{model:t,messages:n,max_tokens:o,...c&&{prompt_cache_key:c},...r.length>0&&{tools:r,...i&&{tool_choice:i}},stream:!0,stream_options:{include_usage:!0},...a&&{thinking:{type:`enabled`},enable_thinking:!0,chat_template_kwargs:{thinking:!0,enable_thinking:!0}},...!a&&s!==void 0&&{temperature:s}}}var J=e((()=>{n()}));function Y(e){if(e===`low`)return`low`;if(e===`medium`)return`medium`;if(e===`high`)return`high`;if(e===`xhigh`)return`xhigh`;if(e===`max`)return`max`;if(typeof e==`number`)return`high`}function ue(e){let t=process.env.CLAUDE_CODE_EFFORT_LEVEL?.toLowerCase();if(!(t===`auto`||t===`unset`))return Y(t)??Y(e)??`medium`}function de(e,t,n,r){if(!r||k())return e;let i=t.filter(e=>n.has(e.name)).map(B).sort().join(`
|
|
2
|
+
`);return i?[E({content:`<available-deferred-tools>\n${i}\n</available-deferred-tools>`,isMeta:!0}),...e]:e}function fe(e){return e.type===`assistant`||e.type===`user`}function X(e){let{partialMessage:t,contentBlocks:n,tools:r,agentId:i,usage:a,stopReason:o,maxTokens:s}=e,c=[],l=Object.keys(n).sort((e,t)=>Number(e)-Number(t)).map(e=>n[Number(e)]).filter(Boolean);return l.length>0&&t&&c.push({message:{...t,content:T(l,r,i),usage:a,stop_reason:o,stop_sequence:null},requestId:void 0,type:`assistant`,uuid:q(),timestamp:new Date().toISOString()}),o===`max_tokens`&&c.push(b({content:`Output truncated: response exceeded the ${s} token limit. Set OPENAI_MAX_TOKENS or CLAUDE_CODE_MAX_OUTPUT_TOKENS to override.`,apiError:`max_output_tokens`,error:`max_output_tokens`})),c}async function*Z(e,t,n,r,i){try{let s=G(i.model),c=ie(e,n),u=await ae(i.model,n,i.getToolPermissionContext||(async()=>g()),i.agents||[],i.querySource),f=new Set;if(u)for(let e of n)R(e)&&f.add(e.name);let p=n;u&&f.size>0&&(p=n.filter(e=>!!(!f.has(e.name)||S(e,`SearchExtraTools`))));let m=await Promise.all(p.map(e=>A(e,{getToolPermissionContext:i.getToolPermissionContext,tools:n,agents:i.agents,allowedAgentTypes:i.allowedAgentTypes,model:i.model,deferLoading:u&&f.has(e.name)}))),y=m.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),b=se(s),x=V(de(c.filter(fe),n,f,u),t,{enableThinking:b}),T=K(y),E=U(i.toolChoice),D=ue(i.effortValue);if(u){let e=p.filter(e=>f.has(e.name)).length;d(`[OpenAI] Tool search enabled: ${e}/${f.size} deferred tools included, total tools=${T.length}`)}else d(`[OpenAI] Tool search disabled, total tools=${T.length}`);let{upperLimit:O}=l(s),k=ce(O,i.maxOutputTokensOverride),j=w(),M=a(),N=re(M),L=j?N:oe(process.env.OPENAI_BASE_URL,M),z=L!==void 0;d(`[OpenAI] Calling model=${s}, messages=${x.length}, tools=${T.length}, thinking=${b}${L?`, prompt_cache_key=${L}`:``}`);let B=j?P(await C({request:te({model:s,messages:x,tools:T,toolChoice:E,reasoningEffort:D,promptCacheKey:N}),signal:r,fetchOverride:i.fetchOverride}),s):H(await F({maxRetries:0,fetchOverride:i.fetchOverride,source:i.querySource}).chat.completions.create(le({model:s,messages:x,tools:T,toolChoice:E,enableThinking:b,maxTokens:k,temperatureOverride:i.temperatureOverride,promptCacheKey:L}),{signal:r}),s,{includeCacheWriteTokens:z}),W={},q=[],J=null,Y=null,Z={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},Q=0,$=Date.now();for await(let e of B){switch(e.type){case`message_start`:J=e.message,Q=Date.now()-$,e.message.usage&&(Z={...Z,...e.message.usage});break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?W[t]={...n,input:``}:n.type===`text`?W[t]={...n,text:``}:n.type===`thinking`?W[t]={...n,thinking:``,signature:``}:W[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=W[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:break;case`message_delta`:{let t=e.usage;t&&(Z=ne(Z,t)),e.delta.stop_reason!=null&&(Y=e.delta.stop_reason);break}case`message_stop`:if(J){for(let e of X({partialMessage:J,contentBlocks:W,tools:n,agentId:i.agentId,usage:Z,stopReason:Y,maxTokens:k}))e.type===`assistant`&&q.push(e),yield e;J=null}Z.input_tokens+Z.output_tokens>0&&_(o(s,Z),Z,i.model);break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:Q}:void 0}}if(h(i.langfuseTrace??null,{model:s,provider:`openai`,input:ee(x),output:I(q),usage:{input_tokens:Z.input_tokens,output_tokens:Z.output_tokens,cache_creation_input_tokens:Z.cache_creation_input_tokens,cache_read_input_tokens:Z.cache_read_input_tokens},startTime:new Date($),endTime:new Date,completionStartTime:Q>0?new Date($+Q):void 0,tools:v(m),...b&&{thinking:{type:`enabled`}}}),J)for(let e of X({partialMessage:J,contentBlocks:W,tools:n,agentId:i.agentId,usage:Z,stopReason:Y,maxTokens:k}))yield e}catch(e){let t=e instanceof Error?e.message:String(e);d(`[OpenAI] Error: ${t}`,{level:`error`}),yield b({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{i(),L(),x(),W(),D(),j(),y(),N(),f(),u(),O(),s(),J(),m(),p(),c(),M(),z()}))();export{Z as queryModelOpenAI};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";async function t(e){e(`/output-style has been deprecated. Use /config to change your output style, or set it in your settings file. Changes take effect on the next session.`,{display:`system`})}e((()=>{}))();export{t as call};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./figures-fES5sASd.js";import{Gs as a}from"./growthbook-p4aJ_UMv.js";import{l as o}from"./debug-CjIaNjpK.js";import{n as s}from"./cwd-B2guYBbl.js";import{da as c,fa as l,la as u,ua as d}from"./loadAgentsDir-Bz0FfcVt.js";var f,p,m,h,g=e((()=>{r(),n(),d(),s(),o(),c(),a(),f=`
|
|
2
|
+
## Insights
|
|
3
|
+
In order to encourage learning, before and after writing code, always provide brief educational explanations about implementation choices using (with backticks):
|
|
4
|
+
"\`${i.star} Insight ─────────────────────────────────────\`
|
|
5
|
+
[2-3 key educational points]
|
|
6
|
+
\`─────────────────────────────────────────────────\`"
|
|
7
|
+
|
|
8
|
+
These insights should be included in the conversation, not in the codebase. You should generally focus on interesting insights that are specific to the codebase or the code you just wrote, rather than general programming concepts.`,p=`default`,m={[p]:null,Explanatory:{name:`Explanatory`,source:`built-in`,description:`Claude explains its implementation choices and codebase patterns`,keepCodingInstructions:!0,prompt:`You are an interactive CLI tool that helps users with software engineering tasks. In addition to software engineering tasks, you should provide educational insights about the codebase along the way.
|
|
9
|
+
|
|
10
|
+
You should be clear and educational, providing helpful explanations while remaining focused on the task. Balance educational content with task completion. When providing insights, you may exceed typical length constraints, but remain focused and relevant.
|
|
11
|
+
|
|
12
|
+
# Explanatory Style Active
|
|
13
|
+
${f}`},Learning:{name:`Learning`,source:`built-in`,description:`Claude pauses and asks you to write small pieces of code for hands-on practice`,keepCodingInstructions:!0,prompt:`You are an interactive CLI tool that helps users with software engineering tasks. In addition to software engineering tasks, you should help users learn more about the codebase through hands-on practice and educational insights.
|
|
14
|
+
|
|
15
|
+
You should be collaborative and encouraging. Balance task completion with learning by requesting user input for meaningful design decisions while handling routine implementation yourself.
|
|
16
|
+
|
|
17
|
+
# Learning Style Active
|
|
18
|
+
## Requesting Human Contributions
|
|
19
|
+
In order to encourage learning, ask the human to contribute 2-10 line code pieces when generating 20+ lines involving:
|
|
20
|
+
- Design decisions (error handling, data structures)
|
|
21
|
+
- Business logic with multiple valid approaches
|
|
22
|
+
- Key algorithms or interface definitions
|
|
23
|
+
|
|
24
|
+
**TodoList Integration**: If using a TodoList for the overall task, include a specific todo item like "Request human input on [specific decision]" when planning to request human input. This ensures proper task tracking. Note: TodoList is not required for all tasks.
|
|
25
|
+
|
|
26
|
+
Example TodoList flow:
|
|
27
|
+
✓ "Set up component structure with placeholder for logic"
|
|
28
|
+
✓ "Request human collaboration on decision logic implementation"
|
|
29
|
+
✓ "Integrate contribution and complete feature"
|
|
30
|
+
|
|
31
|
+
### Request Format
|
|
32
|
+
\`\`\`
|
|
33
|
+
${i.bullet} **Learn by Doing**
|
|
34
|
+
**Context:** [what's built and why this decision matters]
|
|
35
|
+
**Your Task:** [specific function/section in file, mention file and TODO(human) but do not include line numbers]
|
|
36
|
+
**Guidance:** [trade-offs and constraints to consider]
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
### Key Guidelines
|
|
40
|
+
- Frame contributions as valuable design decisions, not busy work
|
|
41
|
+
- You must first add a TODO(human) section into the codebase with your editing tools before making the Learn by Doing request
|
|
42
|
+
- Make sure there is one and only one TODO(human) section in the code
|
|
43
|
+
- Don't take any action or output anything after the Learn by Doing request. Wait for human implementation before proceeding.
|
|
44
|
+
|
|
45
|
+
### Example Requests
|
|
46
|
+
|
|
47
|
+
**Whole Function Example:**
|
|
48
|
+
\`\`\`
|
|
49
|
+
${i.bullet} **Learn by Doing**
|
|
50
|
+
|
|
51
|
+
**Context:** I've set up the hint feature UI with a button that triggers the hint system. The infrastructure is ready: when clicked, it calls selectHintCell() to determine which cell to hint, then highlights that cell with a yellow background and shows possible values. The hint system needs to decide which empty cell would be most helpful to reveal to the user.
|
|
52
|
+
|
|
53
|
+
**Your Task:** In sudoku.js, implement the selectHintCell(board) function. Look for TODO(human). This function should analyze the board and return {row, col} for the best cell to hint, or null if the puzzle is complete.
|
|
54
|
+
|
|
55
|
+
**Guidance:** Consider multiple strategies: prioritize cells with only one possible value (naked singles), or cells that appear in rows/columns/boxes with many filled cells. You could also consider a balanced approach that helps without making it too easy. The board parameter is a 9x9 array where 0 represents empty cells.
|
|
56
|
+
\`\`\`
|
|
57
|
+
|
|
58
|
+
**Partial Function Example:**
|
|
59
|
+
\`\`\`
|
|
60
|
+
${i.bullet} **Learn by Doing**
|
|
61
|
+
|
|
62
|
+
**Context:** I've built a file upload component that validates files before accepting them. The main validation logic is complete, but it needs specific handling for different file type categories in the switch statement.
|
|
63
|
+
|
|
64
|
+
**Your Task:** In upload.js, inside the validateFile() function's switch statement, implement the 'case "document":' branch. Look for TODO(human). This should validate document files (pdf, doc, docx).
|
|
65
|
+
|
|
66
|
+
**Guidance:** Consider checking file size limits (maybe 10MB for documents?), validating the file extension matches the MIME type, and returning {valid: boolean, error?: string}. The file object has properties: name, size, type.
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
**Debugging Example:**
|
|
70
|
+
\`\`\`
|
|
71
|
+
${i.bullet} **Learn by Doing**
|
|
72
|
+
|
|
73
|
+
**Context:** The user reported that number inputs aren't working correctly in the calculator. I've identified the handleInput() function as the likely source, but need to understand what values are being processed.
|
|
74
|
+
|
|
75
|
+
**Your Task:** In calculator.js, inside the handleInput() function, add 2-3 console.log statements after the TODO(human) comment to help debug why number inputs fail.
|
|
76
|
+
|
|
77
|
+
**Guidance:** Consider logging: the raw input value, the parsed result, and any validation state. This will help us understand where the conversion breaks.
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
### After Contributions
|
|
81
|
+
Share one insight connecting their code to broader patterns or system effects. Avoid praise or repetition.
|
|
82
|
+
|
|
83
|
+
## Insights
|
|
84
|
+
${f}`}},h=t(async function(e){let t=await u(e),n=await l(),r={...m},i=t.filter(e=>e.source===`policySettings`),a=[n,t.filter(e=>e.source===`userSettings`),t.filter(e=>e.source===`projectSettings`),i];for(let e of a)for(let t of e)r[t.name]={name:t.name,description:t.description,prompt:t.prompt,source:t.source,keepCodingInstructions:t.keepCodingInstructions,forceForPlugin:t.forceForPlugin};return r})}));export{h as n,g as r,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-Zh7qGPze.js";import{_s as r,ls as i,nt as a,q as o,xs as s}from"./growthbook-p4aJ_UMv.js";import{n as c,r as l}from"./privacyLevel-CRCHhztk.js";import{o as u,s as d}from"./log-DVv8YiNo.js";import{l as f,u as p}from"./oauth-DMPGYAoZ.js";import{a as m,l as h,o as g}from"./api-YHYC4Zdk.js";async function _(){try{let{accessToken:e,orgUUID:n}=await h(),r=`${f().BASE_API_URL}/api/oauth/organizations/${n}/overage_credit_grant`;return(await t.get(r,{headers:m(e)})).data}catch(e){return d(e),null}}function v(){let e=o()?.organizationUuid;if(!e)return null;let t=i().overageCreditGrantCache?.[e];return!t||Date.now()-t.timestamp>S?null:t.info}function y(){let e=o()?.organizationUuid;if(!e)return;let t=i().overageCreditGrantCache;!t||!(e in t)||s(t=>{let n={...t.overageCreditGrantCache};return delete n[e],{...t,overageCreditGrantCache:n}})}async function b(){if(l())return;let e=o()?.organizationUuid;if(!e)return;let t=await _();t&&s(n=>{let r=n.overageCreditGrantCache?.[e],i=r?.info,a=i&&i.available===t.available&&i.eligible===t.eligible&&i.granted===t.granted&&i.amount_minor_units===t.amount_minor_units&&i.currency===t.currency;if(a&&r&&Date.now()-r.timestamp<=S)return n;let o={info:a?i:t,timestamp:Date.now()};return{...n,overageCreditGrantCache:{...n.overageCreditGrantCache,[e]:o}}})}function x(e){if(e.amount_minor_units==null||!e.currency)return null;if(e.currency.toUpperCase()===`USD`){let t=e.amount_minor_units/100;return Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`}return null}var S,C=e((()=>{n(),p(),a(),r(),u(),c(),g(),S=3600*1e3}));export{b as a,y as i,v as n,C as r,x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";async function t(e,t,{concurrency:r=1/0,stopOnError:i=!0,signal:a}={}){return new Promise((o,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!=`function`)throw TypeError(`Mapper function is required`);if(!(Number.isSafeInteger(r)&&r>=1||r===1/0))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let c=[],l=[],u=new Map,d=!1,f=!1,p=!1,m=0,h=0,g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),_=()=>{b(a.reason)},v=()=>{a?.removeEventListener(`abort`,_)},y=e=>{o(e),v()},b=e=>{d=!0,f=!0,s(e),v()};a&&(a.aborted&&b(a.reason),a.addEventListener(`abort`,_,{once:!0}));let x=async()=>{if(f)return;let e=await g.next(),r=h;if(h++,e.done){if(p=!0,m===0&&!f){if(!i&&l.length>0){b(AggregateError(l));return}if(f=!0,u.size===0){y(c);return}let e=[];for(let[t,r]of c.entries())u.get(t)!==n&&e.push(r);y(e)}return}m++,(async()=>{try{let i=await e.value;if(f)return;let a=await t(i,r);a===n&&u.set(r,a),c[r]=a,m--,await x()}catch(e){if(i)b(e);else{l.push(e),m--;try{await x()}catch(e){b(e)}}}})()};(async()=>{for(let e=0;e<r;e++){try{await x()}catch(e){b(e);break}if(p||d)break}})()})}var n,r=e((()=>{n=Symbol(`skip`)}));export{t as n,n as r,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./p-map-C-WNcN6g.js";t();export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b=e((()=>{t=`@aws-sdk/nested-clients`,n=`3.997.3`,r=`Nested clients for AWS SDK packages.`,i=`./dist-cjs/index.js`,a=`./dist-es/index.js`,o=`./dist-types/index.d.ts`,s={build:`yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline nested-clients`,"build:es":`tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo`,lint:`node ../../scripts/validation/submodules-linter.js --pkg nested-clients`,test:`yarn g:vitest run`,"test:watch":`yarn g:vitest watch`},c={node:`>=20.0.0`},l={name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/javascript/`},u=`Apache-2.0`,d={"@aws-crypto/sha256-browser":`5.2.0`,"@aws-crypto/sha256-js":`5.2.0`,"@aws-sdk/core":`^3.974.5`,"@aws-sdk/middleware-host-header":`^3.972.10`,"@aws-sdk/middleware-logger":`^3.972.10`,"@aws-sdk/middleware-recursion-detection":`^3.972.11`,"@aws-sdk/middleware-user-agent":`^3.972.35`,"@aws-sdk/region-config-resolver":`^3.972.13`,"@aws-sdk/signature-v4-multi-region":`^3.996.22`,"@aws-sdk/types":`^3.973.8`,"@aws-sdk/util-endpoints":`^3.996.8`,"@aws-sdk/util-user-agent-browser":`^3.972.10`,"@aws-sdk/util-user-agent-node":`^3.973.21`,"@smithy/config-resolver":`^4.4.17`,"@smithy/core":`^3.23.17`,"@smithy/fetch-http-handler":`^5.3.17`,"@smithy/hash-node":`^4.2.14`,"@smithy/invalid-dependency":`^4.2.14`,"@smithy/middleware-content-length":`^4.2.14`,"@smithy/middleware-endpoint":`^4.4.32`,"@smithy/middleware-retry":`^4.5.5`,"@smithy/middleware-serde":`^4.2.20`,"@smithy/middleware-stack":`^4.2.14`,"@smithy/node-config-provider":`^4.3.14`,"@smithy/node-http-handler":`^4.6.1`,"@smithy/protocol-http":`^5.3.14`,"@smithy/smithy-client":`^4.12.13`,"@smithy/types":`^4.14.1`,"@smithy/url-parser":`^4.2.14`,"@smithy/util-base64":`^4.3.2`,"@smithy/util-body-length-browser":`^4.2.2`,"@smithy/util-body-length-node":`^4.2.3`,"@smithy/util-defaults-mode-browser":`^4.3.49`,"@smithy/util-defaults-mode-node":`^4.2.54`,"@smithy/util-endpoints":`^3.4.2`,"@smithy/util-middleware":`^4.2.14`,"@smithy/util-retry":`^4.3.4`,"@smithy/util-utf8":`^4.2.2`,tslib:`^2.6.2`},f={concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`},p={"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},m=[`./cognito-identity.d.ts`,`./cognito-identity.js`,`./signin.d.ts`,`./signin.js`,`./sso-oidc.d.ts`,`./sso-oidc.js`,`./sso.d.ts`,`./sso.js`,`./sts.d.ts`,`./sts.js`,`dist-*/**`],h={"./dist-es/submodules/cognito-identity/runtimeConfig":`./dist-es/submodules/cognito-identity/runtimeConfig.browser`,"./dist-es/submodules/signin/runtimeConfig":`./dist-es/submodules/signin/runtimeConfig.browser`,"./dist-es/submodules/sso-oidc/runtimeConfig":`./dist-es/submodules/sso-oidc/runtimeConfig.browser`,"./dist-es/submodules/sso/runtimeConfig":`./dist-es/submodules/sso/runtimeConfig.browser`,"./dist-es/submodules/sts/runtimeConfig":`./dist-es/submodules/sts/runtimeConfig.browser`},g=`https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients`,_={type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`packages/nested-clients`},v={"./package.json":`./package.json`,"./sso-oidc":{types:`./dist-types/submodules/sso-oidc/index.d.ts`,module:`./dist-es/submodules/sso-oidc/index.js`,node:`./dist-cjs/submodules/sso-oidc/index.js`,import:`./dist-es/submodules/sso-oidc/index.js`,require:`./dist-cjs/submodules/sso-oidc/index.js`},"./sts":{types:`./dist-types/submodules/sts/index.d.ts`,module:`./dist-es/submodules/sts/index.js`,node:`./dist-cjs/submodules/sts/index.js`,import:`./dist-es/submodules/sts/index.js`,require:`./dist-cjs/submodules/sts/index.js`},"./signin":{types:`./dist-types/submodules/signin/index.d.ts`,module:`./dist-es/submodules/signin/index.js`,node:`./dist-cjs/submodules/signin/index.js`,import:`./dist-es/submodules/signin/index.js`,require:`./dist-cjs/submodules/signin/index.js`},"./cognito-identity":{types:`./dist-types/submodules/cognito-identity/index.d.ts`,module:`./dist-es/submodules/cognito-identity/index.js`,node:`./dist-cjs/submodules/cognito-identity/index.js`,import:`./dist-es/submodules/cognito-identity/index.js`,require:`./dist-cjs/submodules/cognito-identity/index.js`},"./sso":{types:`./dist-types/submodules/sso/index.d.ts`,module:`./dist-es/submodules/sso/index.js`,node:`./dist-cjs/submodules/sso/index.js`,import:`./dist-es/submodules/sso/index.js`,require:`./dist-cjs/submodules/sso/index.js`}},y={name:t,version:n,description:r,main:i,module:a,types:o,scripts:s,engines:c,sideEffects:!1,author:l,license:u,dependencies:d,devDependencies:f,typesVersions:p,files:m,browser:h,"react-native":{},homepage:g,repository:_,exports:v}}));export{y as n,b as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-DNHWYkls.js";import{t as c}from"./jsx-runtime-BTgGEFjL.js";import{o as l,r as u}from"./break-cache-CY-O23fJ.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,n]=(0,m.useState)(0),a=(0,m.useMemo)(()=>[{label:`Status`,description:`Show pending marker, always mode, and break count`,run:()=>void d(`status`,e)},{label:`Once`,description:`Break prompt cache on the next API call only`,run:()=>void d(`once`,e)},{label:`Always`,description:`Break prompt cache on every API call`,run:()=>void d(`always`,e)},{label:`Off`,description:`Disable always mode and clear pending once marker`,run:()=>void d(`off`,e)},{label:`Clear Once`,description:`Cancel the pending one-time cache break`,run:()=>void d(`--clear`,e)}],[e]),c=()=>{let e=a[t];e&&e.run()};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(i,{title:`Break Cache`,subtitle:`${a.length} actions`,onCancel:()=>e(`Break-cache panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,h.jsxs)(o,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(o,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(n(),1),a(),l(),h=c(),g=28}))();export{p as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,f as i,t as a,x as o,xt as s}from"./src-DNHWYkls.js";import{t as c}from"./jsx-runtime-BTgGEFjL.js";import{n as l,t as u}from"./tui-B8Ijq4Pk.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,n]=(0,m.useState)(0),a=(0,m.useMemo)(()=>[{label:`Status`,description:`Show marker and environment override state`,run:()=>void d(`status`,e)},{label:`Toggle`,description:`Flip persisted TUI mode for the next session`,run:()=>void d(`toggle`,e)},{label:`On`,description:`Enable flicker-free alternate-screen mode`,run:()=>void d(`on`,e)},{label:`Off`,description:`Disable flicker-free alternate-screen mode`,run:()=>void d(`off`,e)}],[e]),c=()=>{let e=a[t];e&&e.run()};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(a.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(i,{title:`TUI Mode`,subtitle:`${a.length} actions`,onCancel:()=>e(`TUI mode panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(o,{flexDirection:`column`,children:[a.map((e,n)=>(0,h.jsxs)(o,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(o,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(n(),1),a(),l(),h=c(),g=24}))();export{p as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,Rn as r,b as i,f as a,t as o,x as s,xt as c}from"./src-DNHWYkls.js";import{t as l}from"./jsx-runtime-BTgGEFjL.js";import{Hf as u,Vf as ee}from"./loadAgentsDir-Bz0FfcVt.js";import{n as d,t as f}from"./SentryErrorBoundary-BVfBaOOU.js";function p(e){return e.status===`running`?{mark:`●`,color:`warning`}:e.resultKind===`dead`?{mark:`✗`,color:`error`}:{mark:`✓`,color:`success`}}function m(e){return e?e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e):`0`}function h(e){let t=[];return e.model&&t.push(e.model),t.push(`${m(e.tokenCount)} tok`),t.push(`${e.toolCount??0} tool`),t.join(` · `)}var g,_,v,y,b,x=e((()=>{g={running:`●`,completed:`✓`,failed:`✗`,killed:`■`},_={running:`warning`,completed:`success`,failed:`error`,killed:`subtle`},v={running:`running`,completed:`done`,failed:`failed`,killed:`killed`},y={running:`●`,done:`✓`,pending:`○`},b={running:`warning`,done:`success`,pending:`subtle`}}));function S(e,t){if(e.length<=t)return e;let n=e.match(/#\d+$/);if(!n)return e.slice(0,t);let r=n[0],i=e.slice(0,e.length-r.length),a=t-r.length-1;return`${i.slice(0,a)}…${r}`}function C({agents:e,selectedIndex:t,focused:r}){let[a,o]=n(E),c=T[Math.floor(o/E)%T.length];return e.length===0?(0,w.jsx)(i,{color:`subtle`,children:`(no agents in this phase)`}):(0,w.jsx)(s,{ref:a,flexDirection:`column`,children:e.map((e,n)=>{let a=p(e),o=n===t&&r,l=e.status===`running`?c:a.mark,u=S(e.label??`agent-${e.id}`,D);return(0,w.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,w.jsxs)(s,{children:[(0,w.jsx)(i,{color:a.color,children:l}),(0,w.jsxs)(i,{children:[` `,u]})]}),(0,w.jsx)(i,{color:`subtle`,children:h(e)})]},e.id)})})}var w,T,E,D,O=e((()=>{r(),o(),x(),w=l(),T=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],E=120,D=18}));function k(e,t){return e?.status===`done`?`done`:t.length>0?t.every(e=>e.status===`done`)?`done`:`running`:e?.status===`running`?`running`:`pending`}function A(e){let t=new Map(e.phases.map(e=>[e.title,e])),n=new Set,r=[],i=i=>{if(n.has(i))return;n.add(i);let a=t.get(i),o=e.agents.filter(e=>e.phase===i);r.push({title:i,status:k(a,o),done:o.filter(e=>e.status===`done`).length,total:o.length})};for(let t of e.declaredPhases)i(t);for(let t of e.phases)i(t.title);for(let t of e.agents)t.phase&&i(t.phase);return r}function j(e,t){return t===void 0||t===`All`?e:e.filter(e=>e.phase===t)}function M(e){return e.filter(e=>e.status===`running`)}function N(e,t){let n=Math.max(0,Math.trunc(t)),r=e.slice(0,n);return{runs:r,overflow:Math.max(0,e.length-r.length)}}function P(e,t){return`${e}#${t.slice(-4)}`}function F(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return n<60?`${n}m${String(r).padStart(2,`0`)}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,`0`)}m`}var I=e((()=>{}));function L({phases:e,agents:t,selectedIndex:r,focused:a}){let[o,c]=n(B),l=z[Math.floor(c/B)%z.length],u=t.length;return(0,R.jsx)(s,{ref:o,flexDirection:`column`,children:[{title:`All`,done:t.filter(e=>e.status===`done`).length,total:u},...e].map((e,t)=>{let n=t===r,o=n&&a,c=e.status===`running`?l:e.status?y[e.status]:` `,u=e.status?b[e.status]:`subtle`;return(0,R.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,R.jsxs)(s,{children:[(0,R.jsx)(i,{color:n?`claude`:void 0,children:o?`>`:` `}),(0,R.jsx)(i,{children:` `}),(0,R.jsx)(i,{color:u,children:c}),(0,R.jsxs)(i,{children:[` `,e.title]})]}),(0,R.jsxs)(i,{color:`subtle`,children:[e.done,`/`,e.total]})]},e.title)})})}var R,z,B,V=e((()=>{r(),o(),x(),I(),R=l(),z=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],B=120}));function H({runs:e,activeRunId:t}){if(e.length===0)return(0,U.jsx)(i,{color:`subtle`,children:`(no runs)`});let{runs:n,overflow:r}=N(e,G);return(0,U.jsxs)(s,{children:[n.map(e=>{let n=e.runId===t,r=S(P(e.workflowName,e.runId),W),a=`═`.repeat(r.length+2);return(0,U.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,U.jsxs)(s,{children:[(0,U.jsx)(i,{color:_[e.status],children:g[e.status]}),(0,U.jsx)(i,{children:` `}),(0,U.jsx)(i,{color:n?`claude`:void 0,bold:n,children:r})]}),(0,U.jsx)(i,{color:n?`claude`:void 0,children:n?a:``})]},e.runId)}),r>0?(0,U.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,U.jsxs)(i,{color:`subtle`,children:[`+`,r]}),(0,U.jsx)(i,{children:` `})]}):null]})}var U,W,G,K=e((()=>{r(),o(),x(),I(),O(),U=l(),W=18,G=6}));function q(e,t,n=`normal`){return n===`confirm`?e===`y`||e===`Y`||t.return?`confirmYes`:e===`n`||e===`N`||t.escape||e===`q`?`confirmNo`:null:t.tab||e===` `?t.shift?`prevTab`:`nextTab`:t.escape||e===`q`?`quit`:e===`K`?`killWorkflow`:e===`x`?`killAgent`:e===`r`?`resume`:e===`n`?`newRun`:t.leftArrow?`focusLeft`:t.rightArrow?`focusRight`:t.upArrow?`moveUp`:t.downArrow?`moveDown`:null}function J(e,t=`normal`){c((n,r)=>{let i=q(n,r,t);if(i!==null)switch(i){case`nextTab`:e.nextTab();break;case`prevTab`:e.prevTab();break;case`focusLeft`:e.focusLeft();break;case`focusRight`:e.focusRight();break;case`moveUp`:e.moveUp();break;case`moveDown`:e.moveDown();break;case`killAgent`:e.killAgent();break;case`killWorkflow`:e.killWorkflow();break;case`resume`:e.resumeFocused();break;case`newRun`:e.newRun();break;case`quit`:e.quit();break;case`confirmYes`:e.confirmYes();break;case`confirmNo`:e.confirmNo();break}})}var te=e((()=>{o()}));function Y(e,t){if(t===0)return 0;let n=Math.trunc(e);return Number.isNaN(n)||n<0?0:Math.min(n,t-1)}function ne(e,t){return!e||!t||e.runId!==t.runId||e.status!==`running`?!1:t.status===`completed`||t.status===`failed`||t.status===`killed`}function re({onDone:e,context:t}){let r=ee(),o=(0,X.useSyncExternalStore)(r.subscribe,()=>r.listRuns(),()=>[]),c=M(o),[l,u]=(0,X.useState)(null),[d,f]=(0,X.useState)(`phases`),[p,m]=(0,X.useState)(0),[h,g]=(0,X.useState)(0),[y,b]=(0,X.useState)(null);(0,X.useEffect)(()=>{r.loadPersistedRuns()},[r]),(0,X.useEffect)(()=>{if(c.length===0){l!==null&&u(null);return}c.some(e=>e.runId===l)||u(c[0].runId)},[c,l]);let x=c.find(e=>e.runId===l),S=x?A(x):[],w=S.length+1,T=Y(p,w),E=(0,X.useRef)(null);(0,X.useEffect)(()=>{let t=x?{runId:x.runId,status:x.status}:null,n=E.current;if(E.current=t,!ne(n,t))return;let r=setTimeout(()=>e(),800);return()=>{clearTimeout(r)}},[x?.runId,x?.status,e]);let D=T===0?void 0:S[T-1]?.title,O=x?j(x.agents,D):[],k=Y(h,O.length),N=e=>{u(e),f(`phases`),m(0),g(0)};J({nextTab:()=>{if(c.length===0)return;let e=c[(c.findIndex(e=>e.runId===l)+1)%c.length];N(e.runId)},prevTab:()=>{if(c.length===0)return;let e=c[(c.findIndex(e=>e.runId===l)-1+c.length)%c.length];N(e.runId)},focusLeft:()=>f(`phases`),focusRight:()=>f(`agents`),moveUp:()=>{d===`phases`?m(e=>Y(e-1,w)):g(e=>Y(e-1,O.length))},moveDown:()=>{d===`phases`?m(e=>Y(e+1,w)):g(e=>Y(e+1,O.length))},killAgent:()=>{d!==`agents`||!x||O[k]&&b(`agent`)},killWorkflow:()=>{x&&b(`workflow`)},resumeFocused:()=>{if(!x)return;let n=t.canUseTool;if(!n){e(`resume needs canUseTool context; run /<name> resume from the main session.`);return}r.launch({resumeFromRunId:x.runId,name:x.workflowName},t,n).catch(t=>e(`resume failed: ${t.message}`))},newRun:()=>e(`Tip: start a named workflow with /<name>, or pass name via the Workflow tool.`),quit:()=>{if(y!==null){b(null);return}e()},confirmYes:()=>{if(y===`workflow`&&x){r.kill(x.runId),b(null),e();return}else if(y===`agent`&&x){let e=O[k];e&&r.killAgent(x.runId,e.id)}b(null)},confirmNo:()=>b(null)},y===null?`normal`:`confirm`);let P=o.filter(e=>e.status===`running`).length,I=o.length-P,R=D??`All`,z=x?x.agents.filter(e=>e.status===`done`).length:0,[B]=n(1e3),V=x?Date.now()-x.startedAt:0;return(0,Z.jsxs)(s,{ref:B,flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,paddingX:1,children:[(0,Z.jsxs)(s,{justifyContent:`space-between`,children:[(0,Z.jsx)(i,{bold:!0,children:x?.workflowName??`Workflows`}),x?(0,Z.jsxs)(i,{color:`subtle`,children:[z,`/`,x.agentCount,` agents · `,F(V),` ·`,` `,(0,Z.jsx)(i,{color:_[x.status],children:v[x.status]})]}):(0,Z.jsxs)(i,{color:`subtle`,children:[P,` running · `,I,` done`]})]}),x?.description?(0,Z.jsx)(i,{color:`subtle`,children:x.description}):null,c.length>1?(0,Z.jsx)(s,{marginTop:1,children:(0,Z.jsx)(H,{runs:c,activeRunId:l})}):null,(0,Z.jsxs)(s,{flexDirection:`row`,marginTop:1,children:[(0,Z.jsxs)(s,{width:`25%`,flexDirection:`column`,children:[(0,Z.jsx)(i,{color:d===`phases`?`claude`:`subtle`,bold:!0,children:`Phases`}),(0,Z.jsx)(L,{phases:S,agents:x?.agents??[],selectedIndex:T,focused:d===`phases`})]}),(0,Z.jsx)(i,{color:`subtle`,children:`│`}),(0,Z.jsxs)(s,{flexGrow:1,flexDirection:`column`,children:[(0,Z.jsxs)(i,{color:d===`agents`?`claude`:`subtle`,bold:!0,children:[R,` · `,O.length,` agents`]}),(0,Z.jsx)(C,{agents:O,selectedIndex:k,focused:d===`agents`})]})]}),(0,Z.jsx)(s,{marginTop:1,children:(0,Z.jsx)(i,{color:`subtle`,children:y===null?`Tab switch run · ←/→ focus · ↑/↓ move · x kill agent · K kill workflow · r resume · q quit`:`Confirm: y kill · n/Esc cancel`})}),y===null?null:(0,Z.jsx)(a,{title:y===`workflow`?`Kill workflow "${x?.workflowName??``}"?`:`Kill agent "${O[k]?.label??``}"?`,subtitle:y===`workflow`?`All in-flight agents will be aborted. Resume will replay from journal.`:`Only this agent aborts; other agents in the workflow keep running.`,onCancel:()=>b(null),color:`warning`,children:(0,Z.jsx)(i,{color:`subtle`,children:`Press y to confirm, or n/Esc to cancel.`})})]})}var X,Z,ie=e((()=>{X=t(r(),1),o(),u(),O(),V(),K(),x(),te(),I(),Z=l()})),Q,$;e((()=>{d(),ie(),Q=l(),$=async(e,t,n)=>(0,Q.jsx)(f,{name:`WorkflowsPanel`,children:(0,Q.jsx)(re,{onDone:e,context:t})})}))();export{$ as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=()=>({serverUrl:``,authToken:``});export{e as parseConnectUrl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./parser-DGoLe2RS.js";t();export{e as parseCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{l as t}from"./debug-CjIaNjpK.js";var n,r=e((()=>{Promise.resolve(),n=new Set([`if`,`then`,`elif`,`else`,`fi`,`while`,`until`,`for`,`in`,`do`,`done`,`case`,`esac`,`function`,`select`])}));async function i(e){return!e||e.length,null}async function a(e){return!e||e.length,null}function o(e){if(e.type===`declaration_command`){let t=e.children[0];return t&&c.has(t.text)?[t.text]:[]}let t=[],n=!1;for(let r of e.children)if(r.type!==`variable_assignment`){if(r.type===`command_name`||!n&&r.type===`word`){n=!0,t.push(r.text);continue}if(l.has(r.type))t.push(s(r.text));else if(u.has(r.type))break}return t}function s(e){return e.length>=2&&(e[0]===`"`&&e.at(-1)===`"`||e[0]===`'`&&e.at(-1)===`'`)?e.slice(1,-1):e}var c,l,u,d,f=e((()=>{t(),r(),c=new Set([`export`,`declare`,`typeset`,`readonly`,`local`,`unset`,`unsetenv`]),l=new Set([`word`,`string`,`raw_string`,`number`]),u=new Set([`command_substitution`,`process_substitution`]),d=Symbol(`parse-aborted`)}));export{a,i,o as n,n as o,f as r,r as s,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,p as a,t as o,tn as s,tt as c,x as l,xt as u}from"./src-DNHWYkls.js";import{t as d}from"./jsx-runtime-BTgGEFjL.js";import{_s as f,ls as p,wl as m,xs as h}from"./growthbook-p4aJ_UMv.js";import{o as g,s as _}from"./log-DVv8YiNo.js";import{D as v,O as y}from"./teammate-C-FiRloZ.js";import{n as b,r as x}from"./analytics-i6X1et4O.js";import{t as S}from"./useKeybinding-DAQL_dB_.js";import{n as C,t as w}from"./useExitOnCtrlCDWithKeybindings-CBce_-hb.js";import{i as T,n as E,o as D,r as O,s as k}from"./referral-BfAZEIZL.js";function A({onDone:e}){let[t,r]=(0,j.useState)(!0),[o,d]=(0,j.useState)([]),[f,p]=(0,j.useState)(!1),[m,h]=(0,j.useState)(null),[g,y]=(0,j.useState)(void 0),b=C(()=>e(`Guest passes dialog dismissed`,{display:`system`}));if(c(`confirm:no`,(0,j.useCallback)(()=>{e(`Guest passes dialog dismissed`,{display:`system`})},[e]),{context:`Confirmation`}),u((t,n)=>{n.return&&m&&s(m).then(t=>{t&&process.stdout.write(t),x(`tengu_guest_passes_link_copied`,{}),e(`Referral link copied to clipboard!`)})}),(0,j.useEffect)(()=>{async function e(){try{let e=await T();if(!e||!e.eligible){p(!1),r(!1);return}p(!0),e.referral_code_details?.referral_link&&h(e.referral_code_details.referral_link),y(e.referrer_reward);let t=e.referral_code_details?.campaign??`claude_code_guest_pass`,n;try{n=await E(t)}catch(e){_(e),p(!1),r(!1);return}let i=n.redemptions||[],a=n.limit||3,o=[];for(let e=0;e<a;e++){let t=i[e];o.push({passNumber:e+1,isAvailable:!t})}d(o),r(!1)}catch(e){_(e),p(!1),r(!1)}}e()},[]),t)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`Loading guest pass information…`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:b.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});if(!f)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{children:`Guest passes are not currently available.`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:b.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});let S=v(o,e=>e.isAvailable),w=[...o].sort((e,t)=>t.isAvailable-+e.isAvailable),D=e=>e.isAvailable?(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{children:`┌──────────┐`}),(0,M.jsxs)(i,{children:[` ) CC `,(0,M.jsx)(i,{color:`claude`,children:`✻`}),` ┊ ( `]}),(0,M.jsx)(i,{children:`└──────────┘`})]},e.passNumber):(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`┌─────────╱`}),(0,M.jsx)(i,{dimColor:!0,children:` ) CC ✻ ┊╱`}),(0,M.jsx)(i,{dimColor:!0,children:`└───────╱`})]},e.passNumber);return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsxs)(i,{color:`permission`,children:[`Guest passes · `,S,` left`]}),(0,M.jsx)(l,{flexDirection:`row`,marginLeft:2,children:w.slice(0,3).map(e=>D(e))}),m&&(0,M.jsx)(l,{marginLeft:2,children:(0,M.jsx)(i,{children:m})}),(0,M.jsx)(l,{flexDirection:`column`,marginLeft:2,children:(0,M.jsxs)(i,{dimColor:!0,children:[g?`Share a free week of Claude Code with friends. If they love it and subscribe, you'll get ${O(g)} of extra usage to keep building. `:`Share a free week of Claude Code with friends. `,(0,M.jsx)(n,{url:g?`https://support.claude.com/en/articles/13456702-claude-code-guest-passes`:`https://support.claude.com/en/articles/12875061-claude-code-guest-passes`,children:`Terms apply.`})]})}),(0,M.jsx)(l,{children:(0,M.jsx)(i,{dimColor:!0,italic:!0,children:b.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Enter to copy link · Esc to cancel`})})})]})})}var j,M,N=e((()=>{r(),j=t(r(),1),m(),w(),o(),S(),b(),k(),y(),g(),M=d()}));async function P(e){let t=!p().hasVisitedPasses;if(t){let e=D();h(t=>({...t,hasVisitedPasses:!0,passesLastSeenRemaining:e??t.passesLastSeenRemaining}))}return x(`tengu_guest_passes_visited`,{is_first_visit:t}),(0,F.jsx)(A,{onDone:e})}var F;e((()=>{r(),N(),b(),k(),f(),F=d()}))();export{P as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{_ as t,h as n}from"./debug-CjIaNjpK.js";import{n as r,t as i}from"./cwd-B2guYBbl.js";import{i as a,o}from"./platform-BXz_rgpy.js";import{a as s,i as c}from"./windowsPaths-C5TNvKYu.js";import{l}from"./sessionStoragePortable-DyM_hZnp.js";import{homedir as u}from"os";import{dirname as d,isAbsolute as f,join as p,normalize as m,posix as h,relative as g,resolve as _}from"path";function v(e,t){let r=t??i()??n().cwd();if(typeof e!=`string`)throw TypeError(`Path must be a string, received ${typeof e}`);if(typeof r!=`string`)throw TypeError(`Base directory must be a string, received ${typeof r}`);if(e.includes(`\0`)||r.includes(`\0`))throw Error(`Path contains null bytes`);let o=e=>e.includes(`/`)&&!e.includes(`\\`)&&!/^[A-Za-z]:/.test(e),c=e.trim();if(!c)return a()===`windows`&&o(r)?h.normalize(r).normalize(`NFC`):m(r).normalize(`NFC`);if(c===`~`)return u().normalize(`NFC`);if(c.startsWith(`~/`))return p(u(),c.slice(2)).normalize(`NFC`);let l=c;if(a()===`windows`&&c.match(/^\/[a-z]\//i))try{l=s(c)}catch{l=c}return f(l)?a()===`windows`&&o(l)?h.normalize(l).normalize(`NFC`):m(l).normalize(`NFC`):a()===`windows`&&o(r)&&!/^[A-Za-z]:/.test(l)&&!l.startsWith(`\\\\`)?h.resolve(r,l).normalize(`NFC`):_(r,l).normalize(`NFC`)}function y(e){let t=g(i(),e);return t.startsWith(`..`)?e:t}function b(e){let t=v(e);if(t.startsWith(`\\\\`)||t.startsWith(`//`))return d(t);try{if(n().statSync(t).isDirectory())return t}catch{}return d(t)}function x(e){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(e)}function S(e){return m(e).replace(/\\/g,`/`)}var C=e((()=>{r(),t(),o(),c(),l()}));export{S as a,C as i,v as n,y as o,b as r,x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,t as n}from"./permissions-DnpI8Whh.js";e();export{n as EXTERNAL_PERMISSION_MODES,t as PERMISSION_MODES};
|