@readmagic/workmate 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-DcVnvL_u.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-0Qdg3Rh7.js +1 -0
- package/dist/chunks/{AgentsMdExternalIncludesDialog-D58Vn3SK.js → AgentsMdExternalIncludesDialog-D6DopTxc.js} +1 -1
- package/dist/chunks/{App-CeC-2dzL.js → App-BoI5EJry.js} +1 -1
- package/dist/chunks/{ApproveApiKey-DFpddLyp.js → ApproveApiKey-BjlQDcMx.js} +1 -1
- package/dist/chunks/ApproveApiKey-PWFcscjY.js +1 -0
- package/dist/chunks/{BackgroundTasksDialog-9ruzl1jm.js → BackgroundTasksDialog-ClSMkcGp.js} +1 -1
- package/dist/chunks/BypassPermissionsModeDialog-KCZv-PXl.js +1 -0
- package/dist/chunks/{DiffDialog-LTdtTqsC.js → DiffDialog-BGBkuVIn.js} +1 -1
- package/dist/chunks/{Doctor-Yvrzcrvx.js → Doctor-CI04juFO.js} +1 -1
- package/dist/chunks/Doctor-DCrqcW68.js +1 -0
- package/dist/chunks/{ExitFlow-DH0L3tyY.js → ExitFlow-qrCDVA9i.js} +1 -1
- package/dist/chunks/Grove-B-M3DWD3.js +11 -0
- package/dist/chunks/{HybridTransport-CEWG9ZRi.js → HybridTransport-n5jji6SI.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-Ue3kJUPJ.js → InvalidConfigDialog-By-j6fHE.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-BO2AOTVf.js → InvalidSettingsDialog-C_reeMzL.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-Ciy9y9VV.js → MCPConnectionManager-BNG7iSlw.js} +1 -1
- package/dist/chunks/MCPToolListView-jw0tITfc.js +1 -0
- package/dist/chunks/{McpParsingWarnings-BsCDFWci.js → McpParsingWarnings-BeZ3Bn8N.js} +1 -1
- package/dist/chunks/{MessageSelector-DY5K0NHd.js → MessageSelector-Ci6N-gCw.js} +1 -1
- package/dist/chunks/{Messages-LD6ZO301.js → Messages-D6CRTH2m.js} +2 -2
- package/dist/chunks/{Onboarding-w0-VVsDz.js → Onboarding-DDkVEq-G.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-OEXx0Abp.js → PromptInputFooterSuggestions-BlhZuQ5F.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-DyaUsvNx.js → PromptInputHelpMenu-kKyPIMau.js} +1 -1
- package/dist/chunks/{QueryEngine-sH-KjJIq.js → QueryEngine-DXpS0Ytq.js} +1 -1
- package/dist/chunks/{REPL-BMH_RItw.js → REPL-D1BCm7cR.js} +15 -15
- package/dist/chunks/REPL-JQgCrSEv.js +1 -0
- package/dist/chunks/RemoteSessionManager-mWVrdNfS.js +2 -0
- package/dist/chunks/{ResumeConversation-BbNrpSFB.js → ResumeConversation-BzTn_1jS.js} +1 -1
- package/dist/chunks/{SSETransport-CLiI2qnD.js → SSETransport-D86IVNn1.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-BXIja1MR.js +1 -0
- package/dist/chunks/{Settings-B1EI5LOU.js → Settings-D_i8HzEW.js} +2 -2
- package/dist/chunks/{TeleportProgress-IB--CbqZ.js → TeleportProgress-CW8mLRy2.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-KjdlS_gA.js → TeleportRepoMismatchDialog-DZD32R-l.js} +1 -1
- package/dist/chunks/TeleportResumeWrapper-BhuUE1aq.js +1 -0
- package/dist/chunks/{ThemePicker-BrD_T7xF.js → ThemePicker-ByQZgIbH.js} +1 -1
- package/dist/chunks/{TrustDialog-L0rvvpit.js → TrustDialog-BzwibD_8.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-QZvtUrAy.js → ValidationErrorsList-Cuq6W2yc.js} +1 -1
- package/dist/chunks/{add-dir-CpWXReCi.js → add-dir-BQ-ljgk6.js} +1 -1
- package/dist/chunks/{agentDisplay-CrQvGkTT.js → agentDisplay-tRprY4gB.js} +1 -1
- package/dist/chunks/agents-DMyQUXwl.js +101 -0
- package/dist/chunks/{agents-C99yMsVF.js → agents-Dq4BCf0H.js} +1 -1
- package/dist/chunks/{allErrors-uyOMiF9U.js → allErrors-CQWZ6BPw.js} +1 -1
- package/dist/chunks/{api-C5I2xwgd.js → api-ClAyS7cQ.js} +1 -1
- package/dist/chunks/api-CpD5jeKe.js +1 -0
- package/dist/chunks/{auth-BYCRa_mb.js → auth-CWAvPfX7.js} +1 -1
- package/dist/chunks/auth-DG5bkWDc.js +1 -0
- package/dist/chunks/auth-DuHfQBuH.js +1 -0
- package/dist/chunks/backgroundHousekeeping-kf_v7Vfr.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-CjD8bACB.js → backgroundHousekeeping-rzQFJiND.js} +2 -2
- package/dist/chunks/{branch-BOWBZo5K.js → branch-BWbCrXBJ.js} +1 -1
- package/dist/chunks/bridgeConfig-CABsoOum.js +1 -0
- package/dist/chunks/{bridgeConfig-CgAVrQfz.js → bridgeConfig-CPHAyzdg.js} +1 -1
- package/dist/chunks/{bridgeMessaging-cOFtbkf_.js → bridgeMessaging-vR7uQXB9.js} +1 -1
- package/dist/chunks/bridgeStatusUtil-CHTx7XwJ.js +1 -0
- package/dist/chunks/{btw-B0UmiVKl.js → btw-IGcgP-Qq.js} +1 -1
- package/dist/chunks/caches-Dj1YhqrG.js +1 -0
- package/dist/chunks/{caches-wN3JyvNE.js → caches-FP8mGB4k.js} +1 -1
- package/dist/chunks/{ccrClient-wtUIz75R.js → ccrClient--8aPutWE.js} +1 -1
- package/dist/chunks/claudeDesktop-CB3UCt7U.js +1 -0
- package/dist/chunks/{clear-CNzBoL7O.js → clear-CF-FZwpe.js} +1 -1
- package/dist/chunks/client-BU7upHOb.js +1 -0
- package/dist/chunks/commands-Cr1p7OPH.js +1 -0
- package/dist/chunks/{compact-Bj8mdDYN.js → compact-BrJGpEFZ.js} +1 -1
- package/dist/chunks/{config-BkbL2e5Q.js → config-BSkuQZNf.js} +1 -1
- package/dist/chunks/config-BohF3_IV.js +1 -0
- package/dist/chunks/{config-WMxn2jLl.js → config-D78R57VA.js} +1 -1
- package/dist/chunks/{context-DB1Ar85E.js → context-DADnwl4t.js} +1 -1
- package/dist/chunks/context-noninteractive-BAbzwNxu.js +1 -0
- package/dist/chunks/{context-noninteractive-CqnJTDcI.js → context-noninteractive-kACWzgS1.js} +1 -1
- package/dist/chunks/{conversation-DOgBzrm0.js → conversation-C8w1DtXk.js} +1 -1
- package/dist/chunks/conversation-Ds7zRD0x.js +1 -0
- package/dist/chunks/{createSSHSession-Cf2tOgK_.js → createSSHSession-B71Plec6.js} +1 -1
- package/dist/chunks/{createSession-DD5YaQKM.js → createSession-BJeDECzt.js} +1 -1
- package/dist/chunks/createSession-Bozo4Bu8.js +1 -0
- package/dist/chunks/{crossProjectResume-CkiPQYYE.js → crossProjectResume-B1I6YzXr.js} +1 -1
- package/dist/chunks/{datadog-DcLf1QpG.js → datadog-C9uqPA6N.js} +1 -1
- package/dist/chunks/{diff-dfXWiuLA.js → diff-CzChvQyK.js} +1 -1
- package/dist/chunks/{directoryCompletion-BtlRKLzw.js → directoryCompletion-i2oWpaUe.js} +1 -1
- package/dist/chunks/doctor-DdvdGkNX.js +1 -0
- package/dist/chunks/{entry-wISucmYc.js → entry-BoL8sy1Y.js} +2 -2
- package/dist/chunks/{esm-CrJVXrKW.js → esm-DtcV71xh.js} +1 -1
- package/dist/chunks/{exit-pjN4EJHV.js → exit-Af27f74w.js} +1 -1
- package/dist/chunks/{extraUsage-CwDhpClH.js → extraUsage-DsFwXMAj.js} +1 -1
- package/dist/chunks/extractMemories-B1KbTMY0.js +1 -0
- package/dist/chunks/{fast-Cuj3bfFm.js → fast-BGU8p2uY.js} +1 -1
- package/dist/chunks/fast-CuUjONVV.js +1 -0
- package/dist/chunks/{fileSuggestions-Dy2BUZzd.js → fileSuggestions-DU7gmksK.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-D4yuDP-n.js → firstPartyEventLogger-7pAyUdbp.js} +2 -2
- package/dist/chunks/firstPartyEventLogger-sMeCTEUW.js +1 -0
- package/dist/chunks/{flushGate-B6ecrC4j.js → flushGate-4DfYr-Ru.js} +1 -1
- package/dist/chunks/{gemini-BC-BxZmj.js → gemini-Cll4fVQn.js} +1 -1
- package/dist/chunks/{generateSessionName-JTR8nPYD.js → generateSessionName-BgGMwpps.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-Bk4FZrng.js → githubRepoPathMapping-Px3_GeD1.js} +1 -1
- package/dist/chunks/{goal-B09SOyra.js → goal-D4E2WQVn.js} +1 -1
- package/dist/chunks/{grok-BBo3jGfP.js → grok-HF1PHxXb.js} +1 -1
- package/dist/chunks/{grove-DsAIY-rZ.js → grove-Bck1zFaD.js} +1 -1
- package/dist/chunks/help-DJp61Job.js +1 -0
- package/dist/chunks/{hooks-BI4NY5IC.js → hooks-CJ17byYD.js} +7 -7
- package/dist/chunks/hooks-CjR3Eq0Z.js +1 -0
- package/dist/chunks/{initReplBridge-BYrL6ou1.js → initReplBridge-D09JEKHt.js} +1 -1
- package/dist/chunks/install-Dd5fw0cA.js +1 -0
- package/dist/chunks/{instrumentation-5cSwEKaF.js → instrumentation-jsPu6qqs.js} +3 -3
- package/dist/chunks/{job-rW1mEYtm.js → job-BHhkQbvu.js} +1 -1
- package/dist/chunks/{keybindings-B5kUoxvg.js → keybindings-Ch5lzNB8.js} +1 -1
- package/dist/chunks/{launchLocalMemory-CPucX8Xj.js → launchLocalMemory-DsaijVcO.js} +1 -1
- package/dist/chunks/{launchOnboarding--GCJWeeS.js → launchOnboarding-DHOylaqn.js} +1 -1
- package/dist/chunks/loadAgentsDir-8FioUEwX.js +1 -0
- package/dist/chunks/{loadAgentsDir-JrGMJN05.js → loadAgentsDir-CwEfQDOw.js} +44 -44
- package/dist/chunks/{loadPluginHooks-C4zrlV0u.js → loadPluginHooks-C-Yk5KlI.js} +1 -1
- package/dist/chunks/{localSearch-C-stDP9C.js → localSearch-BEnlgSB7.js} +1 -1
- package/dist/chunks/localSearch-LcgRjjl3.js +1 -0
- package/dist/chunks/{logoV2Utils-J2Sqfube.js → logoV2Utils-DG9GwFjl.js} +1 -1
- package/dist/chunks/{magicDocs-Dpe3YhyL.js → magicDocs-qGHR3Cqh.js} +1 -1
- package/dist/chunks/{main-C_PDzJdv.js → main-CBVQ8bRm.js} +10 -10
- package/dist/chunks/{managedEnv-C8SisyLk.js → managedEnv-3MbOWrVs.js} +1 -1
- package/dist/chunks/managedEnv-B4YV3A_y.js +1 -0
- package/dist/chunks/{mappers-CMJorgSL.js → mappers-CdY45PDA.js} +1 -1
- package/dist/chunks/{mcp-_tBxhPV-.js → mcp-BA8XQ6h1.js} +1 -1
- package/dist/chunks/{mcp-SuAh71Ht.js → mcp-DI8pGrqi.js} +1 -1
- package/dist/chunks/{mcp-B2mJmWKt.js → mcp-DvY_FibT.js} +3 -3
- package/dist/chunks/{memory-DK8bOrUr.js → memory-C2U7CCmM.js} +1 -1
- package/dist/chunks/{mode-BhfhEpnW.js → mode-ByV6NqmB.js} +1 -1
- package/dist/chunks/{model-BCM7RpVk.js → model-C73ETGu9.js} +1 -1
- package/dist/chunks/model-CVG_RRTy.js +1 -0
- package/dist/chunks/model-CeG-iOKF.js +1 -0
- package/dist/chunks/{modelOptions-DEQat7lU.js → modelOptions-A5jrCUBp.js} +1 -1
- package/dist/chunks/{nativeInstaller-xxyUjXbl.js → nativeInstaller-CXFD8LDV.js} +1 -1
- package/dist/chunks/{omit-od_CYp5o.js → omit-B65XeX8r.js} +1 -1
- package/dist/chunks/{onChangeAppState-CqTb0yEa.js → onChangeAppState-EtUxsgYz.js} +1 -1
- package/dist/chunks/{openai-qW8mATAs.js → openai-Dx5mvMjY.js} +1 -1
- package/dist/chunks/{partition-CYoWXLNU.js → partition-8vZDG3rY.js} +1 -1
- package/dist/chunks/{permissions--iKUbWBw.js → permissions-CJUBfBTr.js} +2 -2
- package/dist/chunks/{pidLock-BR4hzYgp.js → pidLock-tjm2n1Nd.js} +2 -2
- package/dist/chunks/{plan-DiHCGXhM.js → plan-eFur8bdH.js} +1 -1
- package/dist/chunks/{plugin-BeC4D7XF.js → plugin-fYLRLdOY.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-Bj-CrFuO.js → pluginAutoupdate-B4w7SSYc.js} +1 -1
- package/dist/chunks/{pluginBlocklist-DzOs-RS1.js → pluginBlocklist-CMwb7gmY.js} +1 -1
- package/dist/chunks/{pluginCliCommands-DwIGn58t.js → pluginCliCommands-3YCj7Y3Q.js} +1 -1
- package/dist/chunks/{pluginFlagging-BzuymJuf.js → pluginFlagging-srvq9H7p.js} +1 -1
- package/dist/chunks/{pluginOperations-CP1v-nu0.js → pluginOperations-C7BCR7pw.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-BUeBiYVq.js → pluginStartupCheck-BLc0U7W7.js} +1 -1
- package/dist/chunks/pluginStartupCheck-nzVDPI1k.js +1 -0
- package/dist/chunks/{plugins-D1N31THW.js → plugins-CPtmmDDi.js} +1 -1
- package/dist/chunks/poorMode-DD88nPJ4.js +1 -0
- package/dist/chunks/{poorMode-D4L_-yWS.js → poorMode-wm2WkPF0.js} +1 -1
- package/dist/chunks/{print-DaJi1wF_.js → print-BCud0ukQ.js} +3 -3
- package/dist/chunks/{processBashCommand-BGCIqxc9.js → processBashCommand-C9-FonuX.js} +1 -1
- package/dist/chunks/{processSlashCommand-qR_j1DE8.js → processSlashCommand-Bi8_1MRC.js} +1 -1
- package/dist/chunks/{prompt-DnPppVz8.js → prompt-Bm2EEG4F.js} +1 -1
- package/dist/chunks/prompt-CX_v9F3s.js +1 -0
- package/dist/chunks/prompt-V0WQJrkO2.js +1 -0
- package/dist/chunks/{promptEditor-Cilc9N3L.js → promptEditor-DQ9fpdQD.js} +1 -1
- package/dist/chunks/{protocolHandler-DdbiucQa.js → protocolHandler--eQQuSyx.js} +1 -1
- package/dist/chunks/{reconciler-Bte4gdP-.js → reconciler-DgQ4y1Vn.js} +1 -1
- package/dist/chunks/{refresh-MiZ0acBm.js → refresh-CayVRWUY.js} +1 -1
- package/dist/chunks/{registerProtocol-Bpte9dly.js → registerProtocol-DrWIX3Lb.js} +1 -1
- package/dist/chunks/{reload-plugins-GdqFZblC.js → reload-plugins-6xcH3dLg.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-CAl3_H-O.js → remoteBridgeCore-BnZYGaMH.js} +1 -1
- package/dist/chunks/{remoteManagedSettings-BcLJLEr7.js → remoteManagedSettings-CfFmrRze.js} +1 -1
- package/dist/chunks/{rename-BDo5qIK0.js → rename-mDtCTbnD.js} +1 -1
- package/dist/chunks/{resume-Bbweh2hA.js → resume-DRvz4QFs.js} +1 -1
- package/dist/chunks/ripgrep-Di-2j8Ws.js +1 -0
- package/dist/chunks/{ripgrep-X5m4gJ-3.js → ripgrep-DsLUmulz.js} +1 -1
- package/dist/chunks/{runtimeObserver-CxXxUcrm.js → runtimeObserver-Ba6SM-sI.js} +1 -1
- package/dist/chunks/{runtimeObserver-Hjbo43xj.js → runtimeObserver-Dt5sGJVb.js} +2 -2
- package/dist/chunks/sandbox-adapter-Cmrd6tBj.js +1 -0
- package/dist/chunks/{sandbox-toggle-DmNSThQK.js → sandbox-toggle-DKcw3SbO.js} +1 -1
- package/dist/chunks/searchExtraTools-DIgC0CFB.js +1 -0
- package/dist/chunks/{session-CkuTMD_4.js → session-COVyD8UU.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-yAPDTrbm.js +1 -0
- package/dist/chunks/sessionObserver-BizdPx8P.js +1 -0
- package/dist/chunks/{sessionObserver-CvQ6oyoj.js → sessionObserver-iAgSetlC.js} +1 -1
- package/dist/chunks/{sessionState-C2REgUrs.js → sessionState-zhvcDpb2.js} +1 -1
- package/dist/chunks/sessionStorage-LMY409Ji.js +1 -0
- package/dist/chunks/{sessionTitle-2IWcNB8H.js → sessionTitle-QPRly1tZ.js} +1 -1
- package/dist/chunks/{sessionTracing-Bm7hQKHA.js → sessionTracing-C4uqAdud.js} +1 -1
- package/dist/chunks/settings-BgHApyGL.js +1 -0
- package/dist/chunks/{settings-aUygByiZ.js → settings-CvhsRFaT.js} +1 -1
- package/dist/chunks/{settingsSync-DgzCU1BZ.js → settingsSync-BGo6dHJo.js} +1 -1
- package/dist/chunks/{setup-CvaG4nl5.js → setup-Bjw5VS6x.js} +2 -2
- package/dist/chunks/{shadowedRuleDetection-CWCQ5dZ0.js → shadowedRuleDetection-CzRAzcC1.js} +1 -1
- package/dist/chunks/{sideQuestion-BoW-xYkh.js → sideQuestion-oIYrx5ar.js} +1 -1
- package/dist/chunks/{sinks-ZHKfs6gv.js → sinks-Bje3hCkR.js} +1 -1
- package/dist/chunks/sinks-FaljTZ-c.js +1 -0
- package/dist/chunks/{skillChangeDetector-C-HWR_8v.js → skillChangeDetector-v6mAYzXX.js} +1 -1
- package/dist/chunks/{skillGapStore-CCNeSjIb.js → skillGapStore-CJjt3IW7.js} +2 -2
- package/dist/chunks/{skillLifecycle-wU4JDNYQ.js → skillLifecycle-BsgH84vl.js} +2 -2
- package/dist/chunks/{skillSearchPanel-Cxr1QQn4.js → skillSearchPanel-CneXymsb.js} +2 -2
- package/dist/chunks/{skills-BghnKnNo.js → skills-DZRBy7vT.js} +1 -1
- package/dist/chunks/{stats-unp6R0Ah.js → stats-Dq-5qizS.js} +1 -1
- package/dist/chunks/{status-BraYBx4N.js → status-BP_R8051.js} +1 -1
- package/dist/chunks/status-CZYD3NGb.js +1 -0
- package/dist/chunks/{statusNoticeHelpers-Dm1aiibR.js → statusNoticeHelpers-ODrnrLAZ.js} +1 -1
- package/dist/chunks/{switcher-BUNSEJ-7.js → switcher-BkGOeIzI.js} +1 -1
- package/dist/chunks/switcher-DwKN9daN.js +1 -0
- package/dist/chunks/{syncCache-1s9xV8WV.js → syncCache-CpmpvjfC.js} +1 -1
- package/dist/chunks/{tasks-BjFot03S.js → tasks-CIUuwrX4.js} +1 -1
- package/dist/chunks/{teleport-Dj2Kvbmx.js → teleport-IzyDplC7.js} +1 -1
- package/dist/chunks/{templateJobs-CY7GNRo5.js → templateJobs-De57J461.js} +1 -1
- package/dist/chunks/{terminalSetup-Ty8T8ePM.js → terminalSetup-DDvQ0K5e.js} +1 -1
- package/dist/chunks/{terminalSetup-CpMNk6dc.js → terminalSetup-JJiXmszo.js} +1 -1
- package/dist/chunks/{theme-c6grxWNn.js → theme-Nwii7354.js} +1 -1
- package/dist/chunks/{toolEventObserver-D7WbjgFR.js → toolEventObserver-Cq-uBb0-.js} +1 -1
- package/dist/chunks/{toolPool-O5nkEFb1.js → toolPool-BBU4ll_p.js} +1 -1
- package/dist/chunks/trustedDevice-BKzkA7fq.js +1 -0
- package/dist/chunks/{trustedDevice-BF78PNK8.js → trustedDevice-DWZxDUxS.js} +1 -1
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-qLfN0tc-.js → useExitOnCtrlCDWithKeybindings-D48aDPG9.js} +1 -1
- package/dist/chunks/useMainLoopModel-89eUU13X.js +1 -0
- package/dist/chunks/{useManagePlugins-E0Qzj-ws.js → useManagePlugins-EqoQELMT.js} +1 -1
- package/dist/chunks/{useMergedTools-B7iYaNwM.js → useMergedTools-BJ4L9QSK.js} +1 -1
- package/dist/chunks/{useSearchInput-CsxiM9i0.js → useSearchInput-DkVER3cm.js} +1 -1
- package/dist/chunks/{useSettingsErrors-DdVTahNa.js → useSettingsErrors-D3MlQ1GF.js} +1 -1
- package/dist/chunks/{userAgent-BggRZ-ZE.js → userAgent-aoe_xVAb.js} +1 -1
- package/dist/chunks/{util-Xdy1nOjj.js → util-g-5UX5gH.js} +1 -1
- package/dist/chunks/{validatePlugin-Be5aSSnP.js → validatePlugin-CSE8zjZn.js} +1 -1
- package/dist/chunks/{vim-cFcxfuac.js → vim-s-wmybpU.js} +1 -1
- package/dist/chunks/{workerRegistry-GrD7IAVQ.js → workerRegistry-DGwy0YHB.js} +2 -2
- package/dist/chunks/worktree-jjuORs7p.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AddWorkspaceDirectory-m2d3nOQJ.js +0 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-BRXGkHO4.js +0 -1
- package/dist/chunks/ApproveApiKey-NXTWIAMj.js +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-C4QGpcBT.js +0 -1
- package/dist/chunks/Doctor-DmiDH-lg.js +0 -1
- package/dist/chunks/Grove-BhhnrFX9.js +0 -11
- package/dist/chunks/MCPToolListView-Ddmu2UcL.js +0 -1
- package/dist/chunks/REPL-DkPd3vk5.js +0 -1
- package/dist/chunks/RemoteSessionManager-DJhrR1dz.js +0 -2
- package/dist/chunks/SearchExtraToolsTool-DupzA6Vm.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-DnHTI39O.js +0 -1
- package/dist/chunks/agents-BYQO6DbG.js +0 -101
- package/dist/chunks/api-j0iE1mkR.js +0 -1
- package/dist/chunks/auth-C9FUZzpW.js +0 -1
- package/dist/chunks/auth-DwPrlTHv.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BxcVB3By.js +0 -1
- package/dist/chunks/bridgeConfig-Bxs5dqjH.js +0 -1
- package/dist/chunks/bridgeStatusUtil-BQF0AJDO.js +0 -1
- package/dist/chunks/caches-C9--b9a7.js +0 -1
- package/dist/chunks/claudeDesktop-DPIJpc1V.js +0 -1
- package/dist/chunks/client-Dr9AYB-r.js +0 -1
- package/dist/chunks/commands-DTB0Qzd5.js +0 -1
- package/dist/chunks/config-B1kYcRIP.js +0 -1
- package/dist/chunks/context-noninteractive-Bno2Xsmp.js +0 -1
- package/dist/chunks/conversation-hNXWaswI.js +0 -1
- package/dist/chunks/createSession-BZx-2UIB.js +0 -1
- package/dist/chunks/doctor-aKE2bG5C.js +0 -1
- package/dist/chunks/extractMemories-WmPLOLUT.js +0 -1
- package/dist/chunks/fast-BVABmasw.js +0 -1
- package/dist/chunks/firstPartyEventLogger-CabA8fu0.js +0 -1
- package/dist/chunks/help-CELr6oJZ.js +0 -1
- package/dist/chunks/hooks-9rkDD2iw.js +0 -1
- package/dist/chunks/install-Dn3_M1Ui.js +0 -1
- package/dist/chunks/loadAgentsDir-D-a1uUb5.js +0 -1
- package/dist/chunks/localSearch-hOERAH9v.js +0 -1
- package/dist/chunks/managedEnv-AEhH_HUs.js +0 -1
- package/dist/chunks/model-BWR43D3c.js +0 -1
- package/dist/chunks/model-CmDF8O9G.js +0 -1
- package/dist/chunks/pluginStartupCheck-BGN6Je6d.js +0 -1
- package/dist/chunks/poorMode-XDBnxTiF.js +0 -1
- package/dist/chunks/prompt-B0gADAvI.js +0 -1
- package/dist/chunks/prompt-DqyEtC_I2.js +0 -1
- package/dist/chunks/ripgrep-DrpZ79Pp.js +0 -1
- package/dist/chunks/sandbox-adapter-DQ_fJSIo.js +0 -1
- package/dist/chunks/searchExtraTools-C7b2x2p_.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-CQvGAbvL.js +0 -1
- package/dist/chunks/sessionObserver-BoQY7nOa.js +0 -1
- package/dist/chunks/sessionStorage-BeaEgnaa.js +0 -1
- package/dist/chunks/settings-Da6ax5aI.js +0 -1
- package/dist/chunks/sinks-B_ehGpvp.js +0 -1
- package/dist/chunks/status-DwyWiaVc.js +0 -1
- package/dist/chunks/switcher-DDUnWU_4.js +0 -1
- package/dist/chunks/trustedDevice-D_z7bAQh.js +0 -1
- package/dist/chunks/updateCCB-ts7Joyve.js +0 -5
- package/dist/chunks/useMainLoopModel-DkjG_ikT.js +0 -1
- package/dist/chunks/worktree-V7xiUAtl.js +0 -1
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{i as n,o as r}from"./envUtils-DcaKZlRU.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{$S as o,$h as s,$m as c,$p as l,$u as u,AT as d,Bb as f,Cx as p,Dp as m,Gl as h,Gp as g,Hb as _,Hp as v,J_ as ee,Jf as y,Jp as b,Ka as te,Kc as ne,Kl as re,Kp as ie,La as ae,Mu as oe,Op as x,Pu as se,Q as ce,Ql as le,Qm as ue,Qp as de,Qu as fe,Sa as pe,Sp as me,Um as he,Up as ge,Vb as _e,Vp as ve,Wl as ye,Wm as be,Wp as xe,X as Se,Xf as Ce,Xh as we,Y_ as Te,Yf as Ee,Zh as De,Zl as Oe,ah as ke,by as Ae,c as je,cE as Me,cS as Ne,cd as Pe,dh as Fe,eC as Ie,fh as Le,hC as S,ih as Re,kT as ze,l as Be,lE as Ve,lS as He,ld as Ue,o as We,oh as Ge,qc as Ke,qf as qe,ql as Je,qp as Ye,r as Xe,rt as Ze,s as Qe,sh as $e,t as et,tm as tt,tt as nt,uE as rt,wp as it,wx as at,zb as ot}from"./loadAgentsDir-JrGMJN05.js";import{C as st,D as C,I as w,P as T,T as E,Wt as D,ai as O,di as ct,fi as lt,t as k,y as ut}from"./src-DL3w8VPk2.js";import{t as A}from"./jsx-runtime-Bb4Xn-E0.js";import{n as dt,t as ft}from"./cwd-Besi3Os3.js";import{F as pt,R as mt,S as ht,U as gt,W as _t,Z as vt,x as yt}from"./debug-BQj6h99Q.js";import{J as bt,Ln as xt,Q as St,Qt as Ct,Rn as wt,Xt as Tt,at as Et,it as Dt,ln as Ot,sn as kt}from"./settings-aUygByiZ.js";import{M as At,P as jt}from"./config-BkbL2e5Q.js";import{o as Mt,s as Nt}from"./log-BlJ7CcKG.js";import{n as Pt,r as Ft}from"./analytics-DJobLaWP.js";import{C as It,v as Lt}from"./startupProfiler-2sjXZkIP.js";import{l as Rt,n as zt,o as Bt}from"./stringUtils-BjnclTLB.js";import{vn as Vt,yn as Ht}from"./prompt-DnPppVz8.js";import{Q as Ut}from"./sessionState-C2REgUrs.js";import{a as Wt,i as Gt,n as Kt,o as qt,r as Jt,t as Yt}from"./agentDisplay-CrQvGkTT.js";import{n as Xt,t as Zt}from"./useExitOnCtrlCDWithKeybindings-qLfN0tc-.js";import{n as Qt,t as $t}from"./useMergedTools-B7iYaNwM.js";import{n as en,r as tn,t as nn}from"./promptEditor-Cilc9N3L.js";import{n as rn,t as an}from"./useMainLoopModel-DkjG_ikT.js";import{join as j}from"path";import{mkdir as on,open as sn,unlink as cn}from"fs/promises";var M,ln=e((()=>{M={FOLDER_NAME:`.workmate`,AGENTS_DIR:`agents`}}));function un(e,t,n,r,i,a,o){return`---
|
|
2
|
-
name: ${e}
|
|
3
|
-
description: "${t.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\\\n`)}"${n===void 0||n.length===1&&n[0]===`*`?``:`\ntools: ${n.join(`, `)}`}${a?`\nmodel: ${a}`:``}${i?`\ncolor: ${i}`:``}${o?`\nmemory: ${o}`:``}
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
${r}
|
|
7
|
-
`}function dn(e){switch(e){case`flagSettings`:throw Error(`Cannot get directory path for ${e} agents`);case`userSettings`:return j(n(),M.AGENTS_DIR);case`projectSettings`:return j(ft(),M.FOLDER_NAME,M.AGENTS_DIR);case`policySettings`:return j(Tt(),M.FOLDER_NAME,M.AGENTS_DIR);case`localSettings`:return j(ft(),M.FOLDER_NAME,M.AGENTS_DIR)}}function fn(e){switch(e){case`projectSettings`:return j(`.`,M.FOLDER_NAME,M.AGENTS_DIR);default:return dn(e)}}function pn(e){return j(dn(e.source),`${e.agentType}.md`)}function mn(e){if(e.source===`built-in`)return`Built-in`;if(e.source===`plugin`)throw Error(`Cannot get file path for plugin agents`);return j(dn(e.source),`${e.filename||e.agentType}.md`)}function hn(e){return e.source===`built-in`?`Built-in`:j(fn(e.source),`${e.agentType}.md`)}function gn(e){return Qe(e)?`Built-in`:Be(e)?`Plugin: ${e.plugin||`Unknown`}`:e.source===`flagSettings`?`CLI argument`:j(fn(e.source),`${e.filename||e.agentType}.md`)}async function _n(e){let t=dn(e);return await on(t,{recursive:!0}),t}async function vn(e,t,n,r,i,a=!0,o,s,c){if(e===`built-in`)throw Error(`Cannot save built-in agents`);await _n(e);let l=pn({source:e,agentType:t}),u=un(t,n,r,i,o,s,c);try{await xn(l,u,a?`wx`:`w`)}catch(e){throw pt(e)===`EEXIST`?Error(`Agent file already exists: ${l}`):e}}async function yn(e,t,n,r,i,a,o){if(e.source===`built-in`)throw Error(`Cannot update built-in agents`);await xn(mn(e),un(e.agentType,t,n,r,i,a,o))}async function bn(e){if(e.source===`built-in`)throw Error(`Cannot delete built-in agents`);let t=mn(e);try{await cn(t)}catch(e){if(pt(e)!==`ENOENT`)throw e}}async function xn(e,t,n=`w`){let r=await sn(e,n);try{await r.writeFile(t,{encoding:`utf-8`}),await r.datasync()}finally{await r.close()}}var Sn=e((()=>{Ct(),We(),dt(),r(),mt(),ln()}));function Cn({agent:e,tools:t,onBack:n}){let r=ge(e,t,!1),i=gn(e),o=ie(e.agentType);D(`confirm:no`,n,{context:`Confirmation`});let s=e=>{e.key===`return`&&(e.preventDefault(),n())};function c(){return r.hasWildcard?(0,N.jsx)(T,{children:`All tools`}):!e.tools||e.tools.length===0?(0,N.jsx)(T,{children:`None`}):(0,N.jsxs)(N.Fragment,{children:[r.validTools.length>0&&(0,N.jsx)(T,{children:r.validTools.join(`, `)}),r.invalidTools.length>0&&(0,N.jsxs)(T,{color:`warning`,children:[a.warning,` Unrecognized: `,r.invalidTools.join(`, `)]})]})}return(0,N.jsxs)(w,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:s,children:[(0,N.jsx)(T,{dimColor:!0,children:i}),(0,N.jsxs)(w,{flexDirection:`column`,children:[(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Description`}),` (tells Claude when to use this agent):`]}),(0,N.jsx)(w,{marginLeft:2,children:(0,N.jsx)(T,{children:e.whenToUse})})]}),(0,N.jsxs)(w,{children:[(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Tools`}),`:`,` `]}),c()]}),(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Model`}),`: `,de(e.model)]}),e.permissionMode&&(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Permission mode`}),`: `,e.permissionMode]}),e.memory&&(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Memory`}),`: `,Me(e.memory)]}),e.hooks&&Object.keys(e.hooks).length>0&&(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Hooks`}),`: `,Object.keys(e.hooks).join(`, `)]}),e.skills&&e.skills.length>0&&(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Skills`}),`:`,` `,e.skills.length>10?`${e.skills.length} skills`:e.skills.join(`, `)]}),o&&(0,N.jsx)(w,{children:(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`Color`}),`:`,` `,(0,N.jsxs)(T,{backgroundColor:o,color:`inverseText`,children:[` `,e.agentType,` `]})]})}),!Qe(e)&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(w,{children:(0,N.jsxs)(T,{children:[(0,N.jsx)(T,{bold:!0,children:`System prompt`}),`:`]})}),(0,N.jsx)(w,{marginLeft:2,marginRight:2,children:(0,N.jsx)(me,{children:e.getSystemPrompt()})})]})]})}var N,wn=e((()=>{i(),k(),S(),Ye(),Ve(),v(),We(),tt(),it(),Sn(),N=A()}));function Tn({agentName:e,currentColor:t=`automatic`,onConfirm:n}){let[r,i]=(0,En.useState)(Math.max(0,Dn.indexOf(t))),o=e=>{if(e.key===`up`)e.preventDefault(),i(e=>e>0?e-1:Dn.length-1);else if(e.key===`down`)e.preventDefault(),i(e=>e<Dn.length-1?e+1:0);else if(e.key===`return`){e.preventDefault();let t=Dn[r];n(t===`automatic`?void 0:t)}},s=Dn[r];return(0,P.jsxs)(w,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:o,children:[(0,P.jsx)(w,{flexDirection:`column`,children:Dn.map((e,t)=>{let n=t===r;return(0,P.jsxs)(w,{flexDirection:`row`,gap:1,children:[(0,P.jsx)(T,{color:n?`suggestion`:void 0,children:n?a.pointer:` `}),e===`automatic`?(0,P.jsx)(T,{bold:n,children:`Automatic color`}):(0,P.jsxs)(w,{gap:1,children:[(0,P.jsx)(T,{backgroundColor:g[e],color:`inverseText`,children:` `}),(0,P.jsx)(T,{bold:n,children:zt(e)})]})]},e)})}),(0,P.jsxs)(w,{marginTop:1,children:[(0,P.jsx)(T,{children:`Preview: `}),s===void 0||s===`automatic`?(0,P.jsxs)(T,{inverse:!0,bold:!0,children:[` `,`@`,e,` `]}):(0,P.jsxs)(T,{backgroundColor:g[s],color:`inverseText`,bold:!0,children:[` `,`@`,e,` `]})]})]})}var En,P,Dn,On=e((()=>{i(),En=t(O(),1),k(),Ye(),Bt(),P=A(),Dn=[`automatic`,...xe]}));function kn({initialModel:e,onComplete:t,onCancel:n}){let r=An.useMemo(()=>{let t=l();return e&&!t.some(t=>t.value===e)?[{value:e,label:e,description:`Current model (custom ID)`},...t]:t},[e]);return(0,jn.jsxs)(w,{flexDirection:`column`,children:[(0,jn.jsx)(w,{marginBottom:1,children:(0,jn.jsx)(T,{dimColor:!0,children:`Model determines the agent's reasoning capabilities and speed.`})}),(0,jn.jsx)(fe,{options:r,defaultValue:e??`sonnet`,onChange:t,onCancel:()=>n?n():t(void 0)})]})}var An,jn,Mn=e((()=>{An=t(O(),1),k(),tt(),u(),jn=A()}));function Nn(){return{READ_ONLY:{name:`Read-only tools`,toolNames:new Set([Re.name,Ge.name,ye.name,o.name,ue.name,Oe.name,re.name,Ne.name,_e.name])},EDIT:{name:`Edit tools`,toolNames:new Set([Ee.name,Fe.name,qe.name])},EXECUTION:{name:`Execution tools`,toolNames:new Set([he.name])},MCP:{name:`MCP tools`,toolNames:new Set,isMcp:!0},OTHER:{name:`Other tools`,toolNames:new Set}}}function Pn(e){let t=new Map;return e.forEach(e=>{if(at(e)){let n=Et(e.name);if(n?.serverName){let r=t.get(n.serverName)||[];r.push(e),t.set(n.serverName,r)}}}),Array.from(t.entries()).map(([e,t])=>({serverName:e,tools:t})).sort((e,t)=>e.serverName.localeCompare(t.serverName))}function Fn({tools:e,initialTools:t,onComplete:n,onCancel:r}){let i=(0,F.useMemo)(()=>ve({tools:e,isBuiltIn:!1,isAsync:!1}),[e]),[o,s]=(0,F.useState)(!t||t.includes(`*`)?i.map(e=>e.name):t),[c,l]=(0,F.useState)(0),[u,d]=(0,F.useState)(!1),f=(0,F.useMemo)(()=>{let e=new Set(i.map(e=>e.name));return o.filter(t=>e.has(t))},[o,i]),p=new Set(f),m=f.length===i.length&&i.length>0,h=e=>{e&&s(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},g=(e,t)=>{s(n=>{if(t){let t=e.filter(e=>!n.includes(e));return[...n,...t]}else return n.filter(t=>!e.includes(t))})},_=()=>{let e=i.map(e=>e.name);n(f.length===e.length&&e.every(e=>f.includes(e))?void 0:f)},v=(0,F.useMemo)(()=>{let e=Nn(),t={readOnly:[],edit:[],execution:[],mcp:[],other:[]};return i.forEach(n=>{at(n)?t.mcp.push(n):e.READ_ONLY.toolNames.has(n.name)?t.readOnly.push(n):e.EDIT.toolNames.has(n.name)?t.edit.push(n):e.EXECUTION.toolNames.has(n.name)?t.execution.push(n):n.name!==`Agent`&&t.other.push(n)}),t},[i]),ee=e=>{let t=xt(e,e=>p.has(e.name))<e.length;return()=>{let n=e.map(e=>e.name);g(n,t)}},y=[];y.push({id:`continue`,label:`Continue`,action:_,isContinue:!0}),y.push({id:`bucket-all`,label:`${m?a.checkboxOn:a.checkboxOff} All tools`,action:()=>{let e=i.map(e=>e.name);g(e,!m)}});let b=Nn();[{id:`bucket-readonly`,name:b.READ_ONLY.name,tools:v.readOnly},{id:`bucket-edit`,name:b.EDIT.name,tools:v.edit},{id:`bucket-execution`,name:b.EXECUTION.name,tools:v.execution},{id:`bucket-mcp`,name:b.MCP.name,tools:v.mcp},{id:`bucket-other`,name:b.OTHER.name,tools:v.other}].forEach(({id:e,name:t,tools:n})=>{if(n.length===0)return;let r=xt(n,e=>p.has(e.name))===n.length;y.push({id:e,label:`${r?a.checkboxOn:a.checkboxOff} ${t}`,action:ee(n)})});let te=y.length;y.push({id:`toggle-individual`,label:u?`Hide advanced options`:`Show advanced options`,action:()=>{d(!u),u&&c>te&&l(te)},isToggle:!0});let ne=(0,F.useMemo)(()=>Pn(i),[i]);return u&&(ne.length>0&&(y.push({id:`mcp-servers-header`,label:`MCP Servers:`,action:()=>{},isHeader:!0}),ne.forEach(({serverName:e,tools:t})=>{let n=xt(t,e=>p.has(e.name))===t.length;y.push({id:`mcp-server-${e}`,label:`${n?a.checkboxOn:a.checkboxOff} ${e} (${t.length} ${Rt(t.length,`tool`)})`,action:()=>{let e=t.map(e=>e.name);g(e,!n)}})}),y.push({id:`tools-header`,label:`Individual Tools:`,action:()=>{},isHeader:!0})),i.forEach(e=>{let t=e.name;if(e.name.startsWith(`mcp__`)){let n=Et(e.name);t=n?`${n.toolName} (${n.serverName})`:e.name}y.push({id:`tool-${e.name}`,label:`${p.has(e.name)?a.checkboxOn:a.checkboxOff} ${t}`,action:()=>h(e.name)})})),D(`confirm:no`,(0,F.useCallback)(()=>{r?r():n(t)},[r,n,t]),{context:`Confirmation`}),(0,I.jsxs)(w,{flexDirection:`column`,marginTop:1,tabIndex:0,autoFocus:!0,onKeyDown:e=>{if(e.key===`return`){e.preventDefault();let t=y[c];t&&!t.isHeader&&t.action()}else if(e.key===`up`){e.preventDefault();let t=c-1;for(;t>0&&y[t]?.isHeader;)t--;l(Math.max(0,t))}else if(e.key===`down`){e.preventDefault();let t=c+1;for(;t<y.length-1&&y[t]?.isHeader;)t++;l(Math.min(y.length-1,t))}},children:[(0,I.jsxs)(T,{color:c===0?`suggestion`:void 0,bold:c===0,children:[c===0?`${a.pointer} `:` `,`[ Continue ]`]}),(0,I.jsx)(st,{width:40}),y.slice(1).map((e,t)=>{let n=t+1===c,r=e.isToggle,i=e.isHeader;return(0,I.jsxs)(F.Fragment,{children:[r&&(0,I.jsx)(st,{width:40}),i&&t>0&&(0,I.jsx)(w,{marginTop:1}),(0,I.jsxs)(T,{color:i?void 0:n?`suggestion`:void 0,dimColor:i,bold:r&&n,children:[i?``:n?`${a.pointer} `:` `,r?`[ ${e.label} ]`:e.label]})]},e.id)}),(0,I.jsx)(w,{marginTop:1,flexDirection:`column`,children:(0,I.jsx)(T,{dimColor:!0,children:m?`All tools selected`:`${p.size} of ${i.length} tools selected`})})]})}var F,I,In=e((()=>{i(),F=t(O(),1),Dt(),p(),v(),St(),be(),h(),Ce(),Ie(),Le(),ke(),$e(),He(),y(),_(),Je(),le(),c(),k(),S(),wt(),Bt(),I=A()}));function Ln(e){return e===`all`?`Agents`:e===`built-in`?`Built-in agents`:e===`plugin`?`Plugin agents`:ze(kt(e))}var Rn=e((()=>{d(),Ot()}));function zn({agent:e,tools:t,onSaved:n,onBack:r}){let i=s(),[o,c]=(0,L.useState)(`menu`),[l,u]=(0,L.useState)(0),[d,f]=(0,L.useState)(null),[p,m]=(0,L.useState)(e.color),h=(0,L.useCallback)(async()=>{let t=await nn(mn(e));t.error?f(t.error):n(`Opened ${e.agentType} in editor. If you made edits, restart to load the latest version.`)},[e,n]),g=(0,L.useCallback)(async(t={})=>{let{tools:r,color:a,model:o}=t,s=a??p,c=r!==void 0,l=o!==void 0,u=s!==e.color;if(!c&&!l&&!u)return!1;try{return!je(e)&&!Be(e)?!1:(await yn(e,e.whenToUse,r??e.tools,e.getSystemPrompt(),s,o??e.model),u&&s&&b(e.agentType,s),i(t=>{let n=t.agentDefinitions.allAgents.map(t=>t.agentType===e.agentType?{...t,tools:r??t.tools,color:s,model:o??t.model}:t);return{...t,agentDefinitions:{...t.agentDefinitions,activeAgents:Xe(n),allAgents:n}}}),n(`Updated agent: ${ct.bold(e.agentType)}`),!0)}catch(e){return f(e instanceof Error?e.message:`Failed to save agent`),!1}},[e,p,n,i]),_=(0,L.useMemo)(()=>[{label:`Open in editor`,action:h},{label:`Edit tools`,action:()=>c(`edit-tools`)},{label:`Edit model`,action:()=>c(`edit-model`)},{label:`Edit color`,action:()=>c(`edit-color`)}],[h]),v=(0,L.useCallback)(()=>{f(null),o===`menu`?r():c(`menu`)},[o,r]),ee=(0,L.useCallback)(e=>{if(e.key===`up`)e.preventDefault(),u(e=>Math.max(0,e-1));else if(e.key===`down`)e.preventDefault(),u(e=>Math.min(_.length-1,e+1));else if(e.key===`return`){e.preventDefault();let t=_[l];t&&t.action()}},[_,l]);D(`confirm:no`,v,{context:`Confirmation`});let y=()=>(0,R.jsxs)(w,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:ee,children:[(0,R.jsxs)(T,{dimColor:!0,children:[`Source: `,Ln(e.source)]}),(0,R.jsx)(w,{marginTop:1,flexDirection:`column`,children:_.map((e,t)=>(0,R.jsxs)(T,{color:t===l?`suggestion`:void 0,children:[t===l?`${a.pointer} `:` `,e.label]},e.label))}),d&&(0,R.jsx)(w,{marginTop:1,children:(0,R.jsx)(T,{color:`error`,children:d})})]});switch(o){case`menu`:return y();case`edit-tools`:return(0,R.jsx)(Fn,{tools:t,initialTools:e.tools,onComplete:async e=>{c(`menu`),await g({tools:e})}});case`edit-color`:return(0,R.jsx)(Tn,{agentName:e.agentType,currentColor:p||e.color||`automatic`,onConfirm:async e=>{m(e),c(`menu`),await g({color:e})}});case`edit-model`:return(0,R.jsx)(kn,{initialModel:e.model,onComplete:async e=>{c(`menu`),await g({model:e})}});default:return null}}var L,R,Bn=e((()=>{lt(),i(),L=t(O(),1),we(),k(),S(),Ye(),We(),tn(),Sn(),On(),Mn(),In(),Rn(),R=A()}));function Vn({instructions:e=`Press ↑↓ to navigate · Enter to select · Esc to go back`}){let t=Xt();return(0,Hn.jsx)(w,{marginLeft:2,children:(0,Hn.jsx)(T,{dimColor:!0,children:t.pending?`Press ${t.keyName} again to exit`:e})})}var Hn,Un=e((()=>{Zt(),k(),Hn=A()}));function Wn({source:e,agents:t,onBack:n,onSelect:r,onCreateNew:i,changes:o}){let[s,c]=Gn.useState(null),[l,u]=Gn.useState(!0),d=Gn.useMemo(()=>[...t].sort(Kt),[t]),f=e=>({isOverridden:!!e.overriddenBy,overriddenBy:e.overriddenBy||null}),p=()=>(0,z.jsxs)(w,{children:[(0,z.jsx)(T,{color:l?`suggestion`:void 0,children:l?`${a.pointer} `:` `}),(0,z.jsx)(T,{color:l?`suggestion`:void 0,children:`Create new agent`})]}),m=e=>{let t=e.source===`built-in`,n=!t&&!l&&s?.agentType===e.agentType&&s?.source===e.source,{isOverridden:r,overriddenBy:i}=f(e),o=t||r,c=!t&&n?`suggestion`:void 0,u=Wt(e);return(0,z.jsxs)(w,{children:[(0,z.jsx)(T,{dimColor:o&&!n,color:c,children:t?``:n?`${a.pointer} `:` `}),(0,z.jsx)(T,{dimColor:o&&!n,color:c,children:e.agentType}),u&&(0,z.jsxs)(T,{dimColor:!0,color:c,children:[` · `,u]}),e.memory&&(0,z.jsxs)(T,{dimColor:!0,color:c,children:[` · `,e.memory,` memory`]}),i&&(0,z.jsxs)(T,{dimColor:!n,color:n?`warning`:void 0,children:[` `,a.warning,` shadowed by `,Jt(i)]})]},`${e.agentType}-${e.source}`)},h=Gn.useMemo(()=>{let t=d.filter(e=>e.source!==`built-in`);return e===`all`?Yt.filter(e=>e.source!==`built-in`).flatMap(({source:e})=>t.filter(t=>t.source===e)):t},[d,e]);Gn.useEffect(()=>{!s&&!l&&h.length>0&&(i?u(!0):c(h[0]||null))},[h,s,l,i]);let g=e=>{if(e.key===`return`){e.preventDefault(),l&&i?i():s&&r(s);return}if(e.key!==`up`&&e.key!==`down`)return;e.preventDefault();let t=!!i,n=h.length+ +!!t;if(n===0)return;let a=0;if(!l&&s){let e=h.findIndex(e=>e.agentType===s.agentType&&e.source===s.source);e>=0&&(a=t?e+1:e)}let o=e.key===`up`?a===0?n-1:a-1:a===n-1?0:a+1;if(t&&o===0)u(!0),c(null);else{let e=t?o-1:o,n=h[e];n&&(u(!1),c(n))}},_=(e=`Built-in (always available):`)=>{let t=d.filter(e=>e.source===`built-in`);return(0,z.jsxs)(w,{flexDirection:`column`,marginBottom:1,paddingLeft:2,children:[(0,z.jsx)(T,{bold:!0,dimColor:!0,children:e}),t.map(m)]})},v=(e,t)=>{if(!t.length)return null;let n=t[0]?.baseDir;return(0,z.jsxs)(w,{flexDirection:`column`,marginBottom:1,children:[(0,z.jsxs)(w,{paddingLeft:2,children:[(0,z.jsx)(T,{bold:!0,dimColor:!0,children:e}),n&&(0,z.jsxs)(T,{dimColor:!0,children:[` (`,n,`)`]})]}),t.map(e=>m(e))]})},ee=Ln(e),y=d.filter(e=>e.source===`built-in`);return!d.length||e!==`built-in`&&!d.some(e=>e.source!==`built-in`)?(0,z.jsx)(ut,{title:ee,subtitle:`No agents found`,onCancel:n,hideInputGuide:!0,children:(0,z.jsxs)(w,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:g,children:[i&&(0,z.jsx)(w,{children:p()}),(0,z.jsx)(T,{dimColor:!0,children:`No agents found. Create specialized subagents that Claude can delegate to.`}),(0,z.jsx)(T,{dimColor:!0,children:`Each subagent has its own context window, custom system prompt, and specific tools.`}),(0,z.jsx)(T,{dimColor:!0,children:`Try creating: Code Reviewer, Code Simplifier, Security Reviewer, Tech Lead, or UX Reviewer.`}),e!==`built-in`&&d.some(e=>e.source===`built-in`)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(st,{}),_()]})]})}):(0,z.jsxs)(ut,{title:ee,subtitle:`${xt(d,e=>!e.overriddenBy)} agents`,onCancel:n,hideInputGuide:!0,children:[o&&o.length>0&&(0,z.jsx)(w,{marginTop:1,children:(0,z.jsx)(T,{dimColor:!0,children:o[o.length-1]})}),(0,z.jsxs)(w,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:g,children:[i&&(0,z.jsx)(w,{marginBottom:1,children:p()}),e===`all`?(0,z.jsxs)(z.Fragment,{children:[Yt.filter(e=>e.source!==`built-in`).map(({label:e,source:t})=>(0,z.jsx)(Gn.Fragment,{children:v(e,d.filter(e=>e.source===t))},t)),y.length>0&&(0,z.jsxs)(w,{flexDirection:`column`,marginBottom:1,paddingLeft:2,children:[(0,z.jsxs)(T,{dimColor:!0,children:[(0,z.jsx)(T,{bold:!0,children:`Built-in agents`}),` (always available)`]}),y.map(m)]})]}):e===`built-in`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(T,{dimColor:!0,italic:!0,children:`Built-in agents are provided by default and cannot be modified.`}),(0,z.jsx)(w,{marginTop:1,flexDirection:`column`,children:d.map(e=>m(e))})]}):(0,z.jsxs)(z.Fragment,{children:[d.filter(e=>e.source!==`built-in`).map(e=>m(e)),d.some(e=>e.source===`built-in`)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(st,{}),_()]})]})]})]})}var Gn,z,Kn=e((()=>{i(),Gn=t(O(),1),k(),Gt(),wt(),Rn(),z=A()}));function qn({steps:e,initialData:t={},onComplete:n,onCancel:r,children:i,title:a,showStepCounter:o=!0}){let[s,c]=(0,B.useState)(0),[l,u]=(0,B.useState)(t),[d,f]=(0,B.useState)(!1),[p,m]=(0,B.useState)([]);Xt(),(0,B.useEffect)(()=>{d&&(m([]),n(l))},[d,l,n]);let h=(0,B.useCallback)(()=>{s<e.length-1?(p.length>0&&m(e=>[...e,s]),c(e=>e+1)):f(!0)},[s,e.length,p]),g=(0,B.useCallback)(()=>{if(p.length>0){let e=p[p.length-1];e!==void 0&&(m(e=>e.slice(0,-1)),c(e))}else s>0?c(e=>e-1):r&&r()},[s,p,r]),_=(0,B.useCallback)(t=>{t>=0&&t<e.length&&(m(e=>[...e,s]),c(t))},[s,e.length]),v=(0,B.useCallback)(()=>{m([]),r&&r()},[r]),ee=(0,B.useCallback)(e=>{u(t=>({...t,...e}))},[]),y=(0,B.useMemo)(()=>({currentStepIndex:s,totalSteps:e.length,wizardData:l,setWizardData:u,updateWizardData:ee,goNext:h,goBack:g,goToStep:_,cancel:v,title:a,showStepCounter:o}),[s,e.length,l,ee,h,g,_,v,a,o]),b=e[s];return!b||d?null:(0,Jn.jsx)(Yn.Provider,{value:y,children:i||(0,Jn.jsx)(b,{})})}var B,Jn,Yn,Xn=e((()=>{B=t(O(),1),Zt(),Jn=A(),Yn=(0,B.createContext)(null)}));function V(){let e=(0,Zn.useContext)(Yn);if(!e)throw Error(`useWizard must be used within a WizardProvider`);return e}var Zn,Qn=e((()=>{Zn=t(O(),1),Xn()}));function $n({instructions:e=(0,er.jsxs)(E,{children:[(0,er.jsx)(C,{shortcut:`↑↓`,action:`navigate`}),(0,er.jsx)(C,{shortcut:`Enter`,action:`select`}),(0,er.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})}){let t=Xt();return(0,er.jsx)(w,{marginLeft:3,marginTop:1,children:(0,er.jsx)(T,{dimColor:!0,children:t.pending?`Press ${t.keyName} again to exit`:e})})}var er,tr=e((()=>{Zt(),k(),x(),er=A()}));function H({title:e,color:t=`suggestion`,children:n,subtitle:r,footerText:i}){let{currentStepIndex:a,totalSteps:o,title:s,showStepCounter:c,goBack:l}=V();return(0,nr.jsxs)(nr.Fragment,{children:[(0,nr.jsx)(ut,{title:`${e||s||`Wizard`}${c===!1?``:` (${a+1}/${o})`}`,subtitle:r,onCancel:l,color:t,hideInputGuide:!0,isCancelActive:!1,children:n}),(0,nr.jsx)($n,{instructions:i})]})}var nr,U=e((()=>{k(),Qn(),tr(),nr=A()})),W=e((()=>{Qn(),U(),tr(),Xn()}));function rr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=V();return D(`confirm:no`,t,{context:`Confirmation`}),(0,ir.jsx)(H,{subtitle:`Choose background color`,footerText:(0,ir.jsxs)(E,{children:[(0,ir.jsx)(C,{shortcut:`↑↓`,action:`navigate`}),(0,ir.jsx)(C,{shortcut:`Enter`,action:`select`}),(0,ir.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,ir.jsx)(w,{children:(0,ir.jsx)(Tn,{agentName:r.agentType||`agent`,currentColor:`automatic`,onConfirm:t=>{n({selectedColor:t,finalAgent:{agentType:r.agentType,whenToUse:r.whenToUse,getSystemPrompt:()=>r.systemPrompt,tools:r.selectedTools,...r.selectedModel?{model:r.selectedModel}:{},...t?{color:t}:{},source:r.location}}),e()}})})})}var ir,ar=e((()=>{k(),S(),x(),W(),U(),On(),ir=A()}));function or(e){return e?/^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$/.test(e)?e.length<3?`Agent type must be at least 3 characters long`:e.length>50?`Agent type must be less than 50 characters`:null:`Agent type must start and end with alphanumeric characters and contain only letters, numbers, and hyphens`:`Agent type is required`}function sr(e,t,n){let r=[],i=[];if(!e.agentType)r.push(`Agent type is required`);else{let t=or(e.agentType);t&&r.push(t);let i=n.find(t=>t.agentType===e.agentType&&t.source!==e.source);i&&r.push(`Agent type "${e.agentType}" already exists in ${Ln(i.source)}`)}if(e.whenToUse?e.whenToUse.length<10?i.push(`Description should be more descriptive (at least 10 characters)`):e.whenToUse.length>5e3&&i.push(`Description is very long (over 5000 characters)`):r.push(`Description (description) is required`),e.tools!==void 0&&!Array.isArray(e.tools))r.push(`Tools must be an array`);else{e.tools===void 0?i.push(`Agent has access to all tools`):e.tools.length===0&&i.push(`No tools selected - agent will have very limited capabilities`);let n=ge(e,t,!1);n.invalidTools.length>0&&r.push(`Invalid tools: ${n.invalidTools.join(`, `)}`)}let a=e.getSystemPrompt();return a?a.length<20?r.push(`System prompt is too short (minimum 20 characters)`):a.length>1e4&&i.push(`System prompt is very long (over 10,000 characters)`):r.push(`System prompt is required`),{isValid:r.length===0,errors:r,warnings:i}}var cr=e((()=>{v(),Rn()}));function lr({tools:e,existingAgents:t,onSave:n,onSaveAndEdit:r,error:i}){let{goBack:a,wizardData:o}=V();D(`confirm:no`,a,{context:`Confirmation`});let s=e=>{e.key===`s`||e.key===`return`?(e.preventDefault(),n()):e.key===`e`&&(e.preventDefault(),r())},c=o.finalAgent,l=sr(c,e,t),u=It(c.getSystemPrompt(),240),d=It(c.whenToUse,240),f=e=>e===void 0?`All tools`:e.length===0?`None`:e.length===1?e[0]||`None`:e.length===2?e.join(` and `):`${e.slice(0,-1).join(`, `)}, and ${e[e.length-1]}`,p=jt()?(0,G.jsxs)(T,{children:[(0,G.jsx)(T,{bold:!0,children:`Memory`}),`: `,Me(c.memory)]}):null;return(0,G.jsx)(H,{subtitle:`Confirm and save`,footerText:(0,G.jsxs)(E,{children:[(0,G.jsx)(C,{shortcut:`s/Enter`,action:`save`}),(0,G.jsx)(C,{shortcut:`e`,action:`edit in your editor`}),(0,G.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}),children:(0,G.jsxs)(w,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:s,children:[(0,G.jsxs)(T,{children:[(0,G.jsx)(T,{bold:!0,children:`Name`}),`: `,c.agentType]}),(0,G.jsxs)(T,{children:[(0,G.jsx)(T,{bold:!0,children:`Location`}),`:`,` `,hn({source:o.location,agentType:c.agentType})]}),(0,G.jsxs)(T,{children:[(0,G.jsx)(T,{bold:!0,children:`Tools`}),`: `,f(c.tools)]}),(0,G.jsxs)(T,{children:[(0,G.jsx)(T,{bold:!0,children:`Model`}),`: `,de(c.model)]}),p,(0,G.jsx)(w,{marginTop:1,children:(0,G.jsxs)(T,{children:[(0,G.jsx)(T,{bold:!0,children:`Description`}),` (tells Claude when to use this agent):`]})}),(0,G.jsx)(w,{marginLeft:2,marginTop:1,children:(0,G.jsx)(T,{children:d})}),(0,G.jsx)(w,{marginTop:1,children:(0,G.jsxs)(T,{children:[(0,G.jsx)(T,{bold:!0,children:`System prompt`}),`:`]})}),(0,G.jsx)(w,{marginLeft:2,marginTop:1,children:(0,G.jsx)(T,{children:u})}),l.warnings.length>0&&(0,G.jsxs)(w,{marginTop:1,flexDirection:`column`,children:[(0,G.jsx)(T,{color:`warning`,children:`Warnings:`}),l.warnings.map((e,t)=>(0,G.jsxs)(T,{dimColor:!0,children:[` `,`• `,e]},t))]}),l.errors.length>0&&(0,G.jsxs)(w,{marginTop:1,flexDirection:`column`,children:[(0,G.jsx)(T,{color:`error`,children:`Errors:`}),l.errors.map((e,t)=>(0,G.jsxs)(T,{color:`error`,children:[` `,`• `,e]},t))]}),i&&(0,G.jsx)(w,{marginTop:1,children:(0,G.jsx)(T,{color:`error`,children:i})}),(0,G.jsx)(w,{marginTop:2,children:(0,G.jsxs)(T,{color:`success`,children:[`Press `,(0,G.jsx)(T,{bold:!0,children:`s`}),` or `,(0,G.jsx)(T,{bold:!0,children:`Enter`}),` to save, `,(0,G.jsx)(T,{bold:!0,children:`e`}),` to save and edit`]})})]})})}var G,ur=e((()=>{k(),S(),At(),Ve(),Lt(),tt(),x(),W(),U(),Sn(),cr(),G=A()}));function dr({tools:e,existingAgents:t,onComplete:n}){let{wizardData:r}=V(),[i,a]=(0,fr.useState)(null),o=s(),c=(0,fr.useCallback)(async e=>{if(r?.finalAgent)try{await vn(r.location,r.finalAgent.agentType,r.finalAgent.whenToUse,r.finalAgent.tools,r.finalAgent.getSystemPrompt(),!0,r.finalAgent.color,r.finalAgent.model,r.finalAgent.memory),o(e=>{if(!r.finalAgent)return e;let t=e.agentDefinitions.allAgents.concat(r.finalAgent);return{...e,agentDefinitions:{...e.agentDefinitions,activeAgents:Xe(t),allAgents:t}}}),et(),e&&await nn(pn({source:r.location,agentType:r.finalAgent.agentType})),Ft(`tengu_agent_created`,{agent_type:r.finalAgent.agentType,generation_method:r.wasGenerated?`generated`:`manual`,source:r.location,tool_count:r.finalAgent.tools?.length??`all`,has_custom_model:!!r.finalAgent.model,has_custom_color:!!r.finalAgent.color,has_memory:!!r.finalAgent.memory,memory_scope:r.finalAgent.memory??`none`,...e?{opened_in_editor:!0}:{}}),n(e?`Created agent: ${ct.bold(r.finalAgent.agentType)} and opened in editor. If you made edits, restart to load the latest version.`:`Created agent: ${ct.bold(r.finalAgent.agentType)}`)}catch(e){a(e instanceof Error?e.message:`Failed to save agent`)}},[r,n,o]);return(0,pr.jsx)(lr,{tools:e,existingAgents:t,onSave:(0,fr.useCallback)(()=>c(!1),[c]),onSaveAndEdit:(0,fr.useCallback)(()=>c(!0),[c]),error:i})}var fr,pr,mr=e((()=>{lt(),fr=t(O(),1),Pt(),we(),We(),tn(),W(),Sn(),ur(),pr=A()}));function hr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=V(),[i,a]=(0,gr.useState)(r.whenToUse||``),[o,s]=(0,gr.useState)(i.length),[c,l]=(0,gr.useState)(null);return D(`confirm:no`,t,{context:`Settings`}),D(`chat:externalEditor`,(0,gr.useCallback)(async()=>{let e=await en(i);e.content!==null&&(a(e.content),s(e.content.length))},[i]),{context:`Chat`}),(0,K.jsx)(H,{subtitle:`Description (tell Claude when to use this agent)`,footerText:(0,K.jsxs)(E,{children:[(0,K.jsx)(C,{shortcut:`Type`,action:`enter text`}),(0,K.jsx)(C,{shortcut:`Enter`,action:`continue`}),(0,K.jsx)(m,{action:`chat:externalEditor`,context:`Chat`,fallback:`ctrl+g`,description:`open in editor`}),(0,K.jsx)(m,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,K.jsxs)(w,{flexDirection:`column`,children:[(0,K.jsx)(T,{children:`When should Claude use this agent?`}),(0,K.jsx)(w,{marginTop:1,children:(0,K.jsx)(Pe,{value:i,onChange:a,onSubmit:t=>{let r=t.trim();if(!r){l(`Description is required`);return}l(null),n({whenToUse:r}),e()},placeholder:`e.g., use this agent after you're done writing code...`,columns:80,cursorOffset:o,onChangeCursorOffset:s,focus:!0,showCursor:!0})}),c&&(0,K.jsx)(w,{marginTop:1,children:(0,K.jsx)(T,{color:`error`,children:c})})]})})}var gr,K,_r=e((()=>{gr=t(O(),1),k(),S(),tn(),x(),Ue(),W(),U(),K=A()}));async function vr(e,t,n,r){let i=pe({content:`Create an agent configuration based on this request: "${e}".${n.length>0?`\n\nIMPORTANT: The following identifiers already exist and must NOT be used: ${n.join(`, `)}`:``}
|
|
8
|
-
Return ONLY the JSON object, no other text.`}),a=await ee(),o=Ze([i],a),s=jt()?yr+br:yr,c=await ce({messages:te(o),systemPrompt:Ut([s]),thinkingConfig:{type:`disabled`},tools:[],signal:r,options:{getToolPermissionContext:async()=>Vt(),model:t,toolChoice:void 0,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,querySource:`agent_creation`,mcpTools:[]}}),l=(Array.isArray(c.message.content)?c.message.content:[]).filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
9
|
-
`),u;try{u=ht(l.trim())}catch{let e=l.match(/\{[\s\S]*\}/);if(!e)throw Error(`No JSON object found in response`);u=ht(e[0])}if(!u.identifier||!u.whenToUse||!u.systemPrompt)throw Error(`Invalid agent configuration generated`);return Ft(`tengu_agent_definition_generated`,{agent_identifier:u.identifier}),{identifier:u.identifier,whenToUse:u.whenToUse,systemPrompt:u.systemPrompt}}var yr,br,xr=e((()=>{Te(),Se(),Ht(),St(),nt(),ae(),At(),Pt(),yt(),Ae(),yr=`You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.
|
|
10
|
-
|
|
11
|
-
**Important Context**: You may have access to project-specific instructions from AGENTS.md files and other context that may include coding standards, project structure, and custom requirements. Consider this context when creating agents to ensure they align with the project's established patterns and practices.
|
|
12
|
-
|
|
13
|
-
When a user describes what they want an agent to do, you will:
|
|
14
|
-
|
|
15
|
-
1. **Extract Core Intent**: Identify the fundamental purpose, key responsibilities, and success criteria for the agent. Look for both explicit requirements and implicit needs. Consider any project-specific context from AGENTS.md files. For agents that are meant to review code, you should assume that the user is asking to review recently written code and not the whole codebase, unless the user has explicitly instructed you otherwise.
|
|
16
|
-
|
|
17
|
-
2. **Design Expert Persona**: Create a compelling expert identity that embodies deep domain knowledge relevant to the task. The persona should inspire confidence and guide the agent's decision-making approach.
|
|
18
|
-
|
|
19
|
-
3. **Architect Comprehensive Instructions**: Develop a system prompt that:
|
|
20
|
-
- Establishes clear behavioral boundaries and operational parameters
|
|
21
|
-
- Provides specific methodologies and best practices for task execution
|
|
22
|
-
- Anticipates edge cases and provides guidance for handling them
|
|
23
|
-
- Incorporates any specific requirements or preferences mentioned by the user
|
|
24
|
-
- Defines output format expectations when relevant
|
|
25
|
-
- Aligns with project-specific coding standards and patterns from AGENTS.md
|
|
26
|
-
|
|
27
|
-
4. **Optimize for Performance**: Include:
|
|
28
|
-
- Decision-making frameworks appropriate to the domain
|
|
29
|
-
- Quality control mechanisms and self-verification steps
|
|
30
|
-
- Efficient workflow patterns
|
|
31
|
-
- Clear escalation or fallback strategies
|
|
32
|
-
|
|
33
|
-
5. **Create Identifier**: Design a concise, descriptive identifier that:
|
|
34
|
-
- Uses lowercase letters, numbers, and hyphens only
|
|
35
|
-
- Is typically 2-4 words joined by hyphens
|
|
36
|
-
- Clearly indicates the agent's primary function
|
|
37
|
-
- Is memorable and easy to type
|
|
38
|
-
- Avoids generic terms like "helper" or "assistant"
|
|
39
|
-
|
|
40
|
-
6 **Example agent descriptions**:
|
|
41
|
-
- in the 'whenToUse' field of the JSON object, you should include examples of when this agent should be used.
|
|
42
|
-
- examples should be of the form:
|
|
43
|
-
- <example>
|
|
44
|
-
Context: The user is creating a test-runner agent that should be called after a logical chunk of code is written.
|
|
45
|
-
user: "Please write a function that checks if a number is prime"
|
|
46
|
-
assistant: "Here is the relevant function: "
|
|
47
|
-
<function call omitted for brevity only for this example>
|
|
48
|
-
<commentary>
|
|
49
|
-
Since a significant piece of code was written, use the ${bt} tool to launch the test-runner agent to run the tests.
|
|
50
|
-
</commentary>
|
|
51
|
-
assistant: "Now let me use the test-runner agent to run the tests"
|
|
52
|
-
</example>
|
|
53
|
-
- <example>
|
|
54
|
-
Context: User is creating an agent to respond to the word "hello" with a friendly jok.
|
|
55
|
-
user: "Hello"
|
|
56
|
-
assistant: "I'm going to use the ${bt} tool to launch the greeting-responder agent to respond with a friendly joke"
|
|
57
|
-
<commentary>
|
|
58
|
-
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke.
|
|
59
|
-
</commentary>
|
|
60
|
-
</example>
|
|
61
|
-
- If the user mentioned or implied that the agent should be used proactively, you should include examples of this.
|
|
62
|
-
- NOTE: Ensure that in the examples, you are making the assistant use the Agent tool and not simply respond directly to the task.
|
|
63
|
-
|
|
64
|
-
Your output must be a valid JSON object with exactly these fields:
|
|
65
|
-
{
|
|
66
|
-
"identifier": "A unique, descriptive identifier using lowercase letters, numbers, and hyphens (e.g., 'test-runner', 'api-docs-writer', 'code-formatter')",
|
|
67
|
-
"whenToUse": "A precise, actionable description starting with 'Use this agent when...' that clearly defines the triggering conditions and use cases. Ensure you include examples as described above.",
|
|
68
|
-
"systemPrompt": "The complete system prompt that will govern the agent's behavior, written in second person ('You are...', 'You will...') and structured for maximum clarity and effectiveness"
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
Key principles for your system prompts:
|
|
72
|
-
- Be specific rather than generic - avoid vague instructions
|
|
73
|
-
- Include concrete examples when they would clarify behavior
|
|
74
|
-
- Balance comprehensiveness with clarity - every instruction should add value
|
|
75
|
-
- Ensure the agent has enough context to handle variations of the core task
|
|
76
|
-
- Make the agent proactive in seeking clarification when needed
|
|
77
|
-
- Build in quality assurance and self-correction mechanisms
|
|
78
|
-
|
|
79
|
-
Remember: The agents you create should be autonomous experts capable of handling their designated tasks with minimal additional guidance. Your system prompts are their complete operational manual.
|
|
80
|
-
`,br=`
|
|
81
|
-
|
|
82
|
-
7. **Agent Memory Instructions**: If the user mentions "memory", "remember", "learn", "persist", or similar concepts, OR if the agent would benefit from building up knowledge across conversations (e.g., code reviewers learning patterns, architects learning codebase structure, etc.), include domain-specific memory update instructions in the systemPrompt.
|
|
83
|
-
|
|
84
|
-
Add a section like this to the systemPrompt, tailored to the agent's specific domain:
|
|
85
|
-
|
|
86
|
-
"**Update your agent memory** as you discover [domain-specific items]. This builds up institutional knowledge across conversations. Write concise notes about what you found and where.
|
|
87
|
-
|
|
88
|
-
Examples of what to record:
|
|
89
|
-
- [domain-specific item 1]
|
|
90
|
-
- [domain-specific item 2]
|
|
91
|
-
- [domain-specific item 3]"
|
|
92
|
-
|
|
93
|
-
Examples of domain-specific memory instructions:
|
|
94
|
-
- For a code-reviewer: "Update your agent memory as you discover code patterns, style conventions, common issues, and architectural decisions in this codebase."
|
|
95
|
-
- For a test-runner: "Update your agent memory as you discover test patterns, common failure modes, flaky tests, and testing best practices."
|
|
96
|
-
- For an architect: "Update your agent memory as you discover codepaths, library locations, key architectural decisions, and component relationships."
|
|
97
|
-
- For a documentation writer: "Update your agent memory as you discover documentation patterns, API structures, and terminology conventions."
|
|
98
|
-
|
|
99
|
-
The memory instructions should be specific to what the agent would naturally learn while performing its core tasks.
|
|
100
|
-
`}));function Sr(){let{updateWizardData:e,goBack:t,goToStep:n,wizardData:r}=V(),[i,a]=(0,q.useState)(r.generationPrompt||``),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(null),[u,d]=(0,q.useState)(i.length),f=rn(),p=(0,q.useRef)(null);D(`confirm:no`,(0,q.useCallback)(()=>{p.current&&(p.current.abort(),p.current=null,s(!1),l(`Generation cancelled`))},[]),{context:`Settings`,isActive:o}),D(`chat:externalEditor`,(0,q.useCallback)(async()=>{let e=await en(i);e.content!==null&&(a(e.content),d(e.content.length))},[i]),{context:`Chat`,isActive:!o}),D(`confirm:no`,(0,q.useCallback)(()=>{e({generationPrompt:``,agentType:``,systemPrompt:``,whenToUse:``,generatedAgent:void 0,wasGenerated:!1}),a(``),l(null),t()},[e,t]),{context:`Settings`,isActive:!o});let h=async()=>{let t=i.trim();if(!t){l(`Please describe what the agent should do`);return}l(null),s(!0),e({generationPrompt:t,isGenerating:!0});let r=ot();p.current=r;try{let i=await vr(t,f,[],r.signal);e({agentType:i.identifier,whenToUse:i.whenToUse,systemPrompt:i.systemPrompt,generatedAgent:i,isGenerating:!1,wasGenerated:!0}),n(6)}catch(t){t instanceof vt||t instanceof Error&&!t.message.includes(`No assistant message found`)&&l(t.message||`Failed to generate agent`),e({isGenerating:!1})}finally{s(!1),p.current=null}},g=`Describe what this agent should do and when it should be used (be comprehensive for best results)`;return o?(0,J.jsx)(H,{subtitle:g,footerText:(0,J.jsx)(m,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`}),children:(0,J.jsxs)(w,{flexDirection:`row`,alignItems:`center`,children:[(0,J.jsx)(oe,{}),(0,J.jsx)(T,{color:`suggestion`,children:` Generating agent from description...`})]})}):(0,J.jsx)(H,{subtitle:g,footerText:(0,J.jsxs)(E,{children:[(0,J.jsx)(m,{action:`confirm:yes`,context:`Confirmation`,fallback:`Enter`,description:`submit`}),(0,J.jsx)(m,{action:`chat:externalEditor`,context:`Chat`,fallback:`ctrl+g`,description:`open in editor`}),(0,J.jsx)(m,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,J.jsxs)(w,{flexDirection:`column`,children:[c&&(0,J.jsx)(w,{marginBottom:1,children:(0,J.jsx)(T,{color:`error`,children:c})}),(0,J.jsx)(Pe,{value:i,onChange:a,onSubmit:h,placeholder:`e.g., Help me write unit tests for my code...`,columns:80,cursorOffset:u,onChangeCursorOffset:d,focus:!0,showCursor:!0})]})})}var q,J,Cr=e((()=>{_t(),q=t(O(),1),an(),k(),S(),f(),tn(),x(),se(),Ue(),W(),U(),xr(),J=A()}));function wr(){let{goNext:e,updateWizardData:t,cancel:n}=V();return(0,Y.jsx)(H,{subtitle:`Choose location`,footerText:(0,Y.jsxs)(E,{children:[(0,Y.jsx)(C,{shortcut:`↑↓`,action:`navigate`}),(0,Y.jsx)(C,{shortcut:`Enter`,action:`select`}),(0,Y.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}),children:(0,Y.jsx)(w,{children:(0,Y.jsx)(fe,{options:[{label:`Project (.workmate/agents/)`,value:`projectSettings`},{label:`Personal (~/.workmate/agents/)`,value:`userSettings`}],onChange:n=>{t({location:n}),e()},onCancel:()=>n()},`location-select`)})})}var Y,Tr=e((()=>{k(),x(),u(),W(),U(),Y=A()}));function Er(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=V();D(`confirm:no`,t,{context:`Confirmation`});let i=r.location===`userSettings`?[{label:`User scope (~/.workmate/agent-memory/) (Recommended)`,value:`user`},{label:`None (no persistent memory)`,value:`none`},{label:`Project scope (.workmate/agent-memory/)`,value:`project`},{label:`Local scope (.workmate/agent-memory-local/)`,value:`local`}]:[{label:`Project scope (.workmate/agent-memory/) (Recommended)`,value:`project`},{label:`None (no persistent memory)`,value:`none`},{label:`User scope (~/.workmate/agent-memory/)`,value:`user`},{label:`Local scope (.workmate/agent-memory-local/)`,value:`local`}];return(0,X.jsx)(H,{subtitle:`Configure agent memory`,footerText:(0,X.jsxs)(E,{children:[(0,X.jsx)(C,{shortcut:`↑↓`,action:`navigate`}),(0,X.jsx)(C,{shortcut:`Enter`,action:`select`}),(0,X.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,X.jsx)(w,{children:(0,X.jsx)(fe,{options:i,onChange:t=>{let i=t===`none`?void 0:t,a=r.finalAgent?.agentType;n({selectedMemory:i,finalAgent:r.finalAgent?{...r.finalAgent,memory:i,getSystemPrompt:jt()&&i&&a?()=>`${r.systemPrompt}\n\n${rt(a,i)}`:()=>r.systemPrompt}:void 0}),e()},onCancel:t},`memory-select`)})})}var X,Dr=e((()=>{k(),S(),At(),Ve(),x(),u(),W(),U(),X=A()}));function Or(){let{goNext:e,goBack:t,updateWizardData:n,goToStep:r}=V();return(0,kr.jsx)(H,{subtitle:`Creation method`,footerText:(0,kr.jsxs)(E,{children:[(0,kr.jsx)(C,{shortcut:`↑↓`,action:`navigate`}),(0,kr.jsx)(C,{shortcut:`Enter`,action:`select`}),(0,kr.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,kr.jsx)(w,{children:(0,kr.jsx)(fe,{options:[{label:`Generate with Claude (recommended)`,value:`generate`},{label:`Manual configuration`,value:`manual`}],onChange:t=>{let i=t;n({method:i,wasGenerated:i===`generate`}),i===`generate`?e():r(3)},onCancel:()=>t()},`method-select`)})})}var kr,Ar=e((()=>{k(),x(),u(),W(),U(),kr=A()}));function jr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=V();return(0,Mr.jsx)(H,{subtitle:`Select model`,footerText:(0,Mr.jsxs)(E,{children:[(0,Mr.jsx)(C,{shortcut:`↑↓`,action:`navigate`}),(0,Mr.jsx)(C,{shortcut:`Enter`,action:`select`}),(0,Mr.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,Mr.jsx)(kn,{initialModel:r.selectedModel,onComplete:t=>{n({selectedModel:t}),e()},onCancel:t})})}var Mr,Nr=e((()=>{x(),k(),W(),U(),Mn(),Mr=A()}));function Pr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=V(),[i,a]=(0,Fr.useState)(r.systemPrompt||``),[o,s]=(0,Fr.useState)(i.length),[c,l]=(0,Fr.useState)(null);return D(`confirm:no`,t,{context:`Settings`}),D(`chat:externalEditor`,(0,Fr.useCallback)(async()=>{let e=await en(i);e.content!==null&&(a(e.content),s(e.content.length))},[i]),{context:`Chat`}),(0,Z.jsx)(H,{subtitle:`System prompt`,footerText:(0,Z.jsxs)(E,{children:[(0,Z.jsx)(C,{shortcut:`Type`,action:`enter text`}),(0,Z.jsx)(C,{shortcut:`Enter`,action:`continue`}),(0,Z.jsx)(m,{action:`chat:externalEditor`,context:`Chat`,fallback:`ctrl+g`,description:`open in editor`}),(0,Z.jsx)(m,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,Z.jsxs)(w,{flexDirection:`column`,children:[(0,Z.jsx)(T,{children:`Enter the system prompt for your agent:`}),(0,Z.jsx)(T,{dimColor:!0,children:`Be comprehensive for best results`}),(0,Z.jsx)(w,{marginTop:1,children:(0,Z.jsx)(Pe,{value:i,onChange:a,onSubmit:()=>{let t=i.trim();if(!t){l(`System prompt is required`);return}l(null),n({systemPrompt:t}),e()},placeholder:`You are a helpful code reviewer who...`,columns:80,cursorOffset:o,onChangeCursorOffset:s,focus:!0,showCursor:!0})}),c&&(0,Z.jsx)(w,{marginTop:1,children:(0,Z.jsx)(T,{color:`error`,children:c})})]})})}var Fr,Z,Ir=e((()=>{Fr=t(O(),1),k(),S(),tn(),x(),Ue(),W(),U(),Z=A()}));function Lr({tools:e}){let{goNext:t,goBack:n,updateWizardData:r,wizardData:i}=V(),a=e=>{r({selectedTools:e}),t()},o=i.selectedTools;return(0,Rr.jsx)(H,{subtitle:`Select tools`,footerText:(0,Rr.jsxs)(E,{children:[(0,Rr.jsx)(C,{shortcut:`Enter`,action:`toggle selection`}),(0,Rr.jsx)(C,{shortcut:`↑↓`,action:`navigate`}),(0,Rr.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,Rr.jsx)(Fn,{tools:e,initialTools:o,onComplete:a,onCancel:n})})}var Rr,zr=e((()=>{k(),x(),W(),U(),In(),Rr=A()}));function Br(e){let{goNext:t,goBack:n,updateWizardData:r,wizardData:i}=V(),[a,o]=(0,Vr.useState)(i.agentType||``),[s,c]=(0,Vr.useState)(null),[l,u]=(0,Vr.useState)(a.length);return D(`confirm:no`,n,{context:`Settings`}),(0,Q.jsx)(H,{subtitle:`Agent type (identifier)`,footerText:(0,Q.jsxs)(E,{children:[(0,Q.jsx)(C,{shortcut:`Type`,action:`enter text`}),(0,Q.jsx)(C,{shortcut:`Enter`,action:`continue`}),(0,Q.jsx)(m,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,Q.jsxs)(w,{flexDirection:`column`,children:[(0,Q.jsx)(T,{children:`Enter a unique identifier for your agent:`}),(0,Q.jsx)(w,{marginTop:1,children:(0,Q.jsx)(Pe,{value:a,onChange:o,onSubmit:e=>{let n=e.trim(),i=or(n);if(i){c(i);return}c(null),r({agentType:n}),t()},placeholder:`e.g., test-runner, tech-lead, etc`,columns:60,cursorOffset:l,onChangeCursorOffset:u,focus:!0,showCursor:!0})}),s&&(0,Q.jsx)(w,{marginTop:1,children:(0,Q.jsx)(T,{color:`error`,children:s})})]})})}var Vr,Q,Hr=e((()=>{Vr=t(O(),1),k(),S(),x(),Ue(),W(),U(),cr(),Q=A()}));function Ur({tools:e,existingAgents:t,onComplete:n,onCancel:r}){return(0,Wr.jsx)(qn,{steps:[wr,Or,Sr,()=>(0,Wr.jsx)(Br,{existingAgents:t}),Pr,hr,()=>(0,Wr.jsx)(Lr,{tools:e}),jr,rr,...jt()?[Er]:[],()=>(0,Wr.jsx)(dr,{tools:e,existingAgents:t,onComplete:n})],initialData:{},onComplete:()=>{},onCancel:r,title:`Create new agent`,showStepCounter:!1})}var Wr,Gr=e((()=>{At(),W(),ar(),mr(),_r(),Cr(),Tr(),Dr(),Ar(),Nr(),Ir(),zr(),Hr(),Wr=A()}));function Kr({tools:e,onExit:t}){let[n,r]=(0,qr.useState)({mode:`list-agents`,source:`all`}),i=De(e=>e.agentDefinitions),a=De(e=>e.mcp.tools),o=De(e=>e.toolPermissionContext),c=s(),{allAgents:l,activeAgents:u}=i,[d,f]=(0,qr.useState)([]),p=Qt(e,a,o);Xt();let m=(0,qr.useMemo)(()=>({"built-in":l.filter(e=>e.source===`built-in`),userSettings:l.filter(e=>e.source===`userSettings`),projectSettings:l.filter(e=>e.source===`projectSettings`),policySettings:l.filter(e=>e.source===`policySettings`),localSettings:l.filter(e=>e.source===`localSettings`),flagSettings:l.filter(e=>e.source===`flagSettings`),plugin:l.filter(e=>e.source===`plugin`),all:l}),[l]),h=(0,qr.useCallback)(e=>{f(t=>[...t,e]),r({mode:`list-agents`,source:`all`})},[]),g=(0,qr.useCallback)(async e=>{try{await bn(e),c(t=>{let n=t.agentDefinitions.allAgents.filter(t=>!(t.agentType===e.agentType&&t.source===e.source));return{...t,agentDefinitions:{...t.agentDefinitions,allAgents:n,activeAgents:Xe(n)}}}),f(t=>[...t,`Deleted agent: ${ct.bold(e.agentType)}`]),r({mode:`list-agents`,source:`all`})}catch(e){Nt(gt(e))}},[c]);switch(n.mode){case`list-agents`:{let e=qt(n.source===`all`?[...m[`built-in`],...m.userSettings,...m.projectSettings,...m.localSettings,...m.policySettings,...m.flagSettings,...m.plugin]:m[n.source],u);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Wn,{source:n.source,agents:e,onBack:()=>{t((d.length>0?`Agent changes:\n${d.join(`
|
|
101
|
-
`)}`:void 0)??`Agents dialog dismissed`,{display:d.length===0?`system`:void 0})},onSelect:e=>r({mode:`agent-menu`,agent:e,previousMode:n}),onCreateNew:()=>r({mode:`create-agent`}),changes:d}),(0,$.jsx)(Vn,{})]})}case`create-agent`:return(0,$.jsx)(Ur,{tools:p,existingAgents:u,onComplete:h,onCancel:()=>r({mode:`list-agents`,source:`all`})});case`agent-menu`:{let e=l.find(e=>e.agentType===n.agent.agentType&&e.source===n.agent.source)||n.agent,t=[{label:`View agent`,value:`view`},...e.source!==`built-in`&&e.source!==`plugin`&&e.source!==`flagSettings`?[{label:`Edit agent`,value:`edit`},{label:`Delete agent`,value:`delete`}]:[],{label:`Back`,value:`back`}];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ut,{title:n.agent.agentType,onCancel:()=>r(n.previousMode),hideInputGuide:!0,children:(0,$.jsxs)(w,{flexDirection:`column`,children:[(0,$.jsx)(fe,{options:t,onChange:t=>{switch(t){case`view`:r({mode:`view-agent`,agent:e,previousMode:n.previousMode});break;case`edit`:r({mode:`edit-agent`,agent:e,previousMode:n});break;case`delete`:r({mode:`delete-confirm`,agent:e,previousMode:n});break;case`back`:r(n.previousMode);break}},onCancel:()=>r(n.previousMode)}),d.length>0&&(0,$.jsx)(w,{marginTop:1,children:(0,$.jsx)(T,{dimColor:!0,children:d[d.length-1]})})]})}),(0,$.jsx)(Vn,{})]})}case`view-agent`:{let e=l.find(e=>e.agentType===n.agent.agentType&&e.source===n.agent.source)||n.agent;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ut,{title:e.agentType,onCancel:()=>r({mode:`agent-menu`,agent:e,previousMode:n.previousMode}),hideInputGuide:!0,children:(0,$.jsx)(Cn,{agent:e,tools:p,allAgents:l,onBack:()=>r({mode:`agent-menu`,agent:e,previousMode:n.previousMode})})}),(0,$.jsx)(Vn,{instructions:`Press Enter or Esc to go back`})]})}case`delete-confirm`:return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(ut,{title:`Delete agent`,onCancel:()=>{`previousMode`in n&&r(n.previousMode)},color:`error`,children:[(0,$.jsxs)(T,{children:[`Are you sure you want to delete the agent `,(0,$.jsx)(T,{bold:!0,children:n.agent.agentType}),`?`]}),(0,$.jsx)(w,{marginTop:1,children:(0,$.jsxs)(T,{dimColor:!0,children:[`Source: `,n.agent.source]})}),(0,$.jsx)(w,{marginTop:1,children:(0,$.jsx)(fe,{options:[{label:`Yes, delete`,value:`yes`},{label:`No, cancel`,value:`no`}],onChange:e=>{e===`yes`?g(n.agent):`previousMode`in n&&r(n.previousMode)},onCancel:()=>{`previousMode`in n&&r(n.previousMode)}})})]}),(0,$.jsx)(Vn,{instructions:`Press ↑↓ to navigate, Enter to select, Esc to cancel`})]});case`edit-agent`:{let e=l.find(e=>e.agentType===n.agent.agentType&&e.source===n.agent.source)||n.agent;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ut,{title:`Edit agent: ${e.agentType}`,onCancel:()=>r(n.previousMode),hideInputGuide:!0,children:(0,$.jsx)(zn,{agent:e,tools:p,onSaved:e=>{h(e),r(n.previousMode)},onBack:()=>r(n.previousMode)})}),(0,$.jsx)(Vn,{})]})}default:return null}}var qr,$,Jr=e((()=>{lt(),qr=t(O(),1),Zt(),$t(),k(),we(),Gt(),We(),mt(),Mt(),u(),wn(),Bn(),Un(),Kn(),Sn(),Gr(),$=A()}));async function Yr(e,t){let n=t.getAppState().toolPermissionContext;return(0,Xr.jsx)(Kr,{tools:ne(n),onExit:e})}var Xr;e((()=>{Jr(),Ke(),Xr=A()}))();export{Yr as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t}from"./api-C5I2xwgd.js";t();export{e as getOAuthHeaders};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./auth-BYCRa_mb.js";export{t as authLogin,e as authStatus};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Bt as e,It as t,Ot as n,mt as r,yt as i}from"./model-CmDF8O9G.js";e();export{r as checkAndRefreshOAuthTokenIfNeeded,i as clearOAuthTokenCache,n as getClaudeAIOAuthTokens,t as handleOAuth401Error};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./backgroundHousekeeping-CjD8bACB.js";export{e as startBackgroundHousekeeping};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,t as r}from"./bridgeConfig-CgAVrQfz.js";e();export{r as getBridgeAccessToken,t as getBridgeBaseUrl,n as isSelfHostedBridge};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fS as e,uS as t}from"./loadAgentsDir-JrGMJN05.js";import{t as n}from"./src-DL3w8VPk2.js";import{v as r}from"./startupProfiler-2sjXZkIP.js";import{a as i,n as a,o}from"./bridgeConfig-CgAVrQfz.js";e(),i(),n(),r();function s(e,n){return`${o()?a():t(void 0,n)}/code?bridge=${e}`}function c({error:e,connected:t,sessionActive:n,reconnecting:r}){return e?{label:`Remote Control failed`,color:`error`}:r?{label:`Remote Control reconnecting`,color:`warning`}:n||t?{label:`Remote Control active`,color:`success`}:{label:`Remote Control connecting…`,color:`warning`}}function l(e){return`Code everywhere with the Claude app or ${e}`}function u(e){return`Continue coding in the Claude app or ${e}`}var d=`Something went wrong, please try again`;export{c as a,l as i,u as n,s as r,d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./caches-wN3JyvNE.js";e();export{t as clearSessionCaches};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as e,R as t}from"./debug-BQj6h99Q.js";import{o as n,s as r}from"./log-BlJ7CcKG.js";import{i,o as a,t as o}from"./platform-DVeTi9mp.js";import{a as s,i as c,s as l,u}from"./types-BomO8WUz.js";import{homedir as d}from"os";import{join as f}from"path";import{readFile as p,readdir as m,stat as h}from"fs/promises";s(),t(),l(),n(),a();async function g(){let e=i();if(!o.includes(e))throw Error(`Unsupported platform: ${e} - Claude Desktop integration only works on macOS and WSL.`);if(e===`macos`)return f(d(),`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);let t=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,`/`):null;if(t){let e=`/mnt/c${t.replace(/^[A-Z]:/,``)}/AppData/Roaming/Claude/claude_desktop_config.json`;try{return await h(e),e}catch{}}try{let e=`/mnt/c/Users`;try{let t=await m(e,{withFileTypes:!0});for(let n of t){if(n.name===`Public`||n.name===`Default`||n.name===`Default User`||n.name===`All Users`)continue;let t=f(e,n.name,`AppData`,`Roaming`,`Claude`,`claude_desktop_config.json`);try{return await h(t),t}catch{}}}catch{}}catch(e){r(e)}throw Error(`Could not find Claude Desktop config file in Windows. Make sure Claude Desktop is installed on Windows.`)}async function _(){if(!o.includes(i()))throw Error(`Unsupported platform - Claude Desktop integration only works on macOS and WSL.`);try{let t=await g(),n;try{n=await p(t,{encoding:`utf8`})}catch(t){if(e(t)===`ENOENT`)return{};throw t}let r=u(n);if(!r||typeof r!=`object`)return{};let i=r.mcpServers;if(!i||typeof i!=`object`)return{};let a={};for(let[e,t]of Object.entries(i)){if(!t||typeof t!=`object`)continue;let n=c().safeParse(t);n.success&&(a[e]=n.data)}return a}catch(e){return r(e),{}}}export{_ as readClaudeDesktopMcpServers};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Nr as e,Pr as t}from"./model-CmDF8O9G.js";t();export{e as getOrganizationUUID};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Di as e,Li as t,Mi as n}from"./loadAgentsDir-JrGMJN05.js";t();export{e as clearCommandsCache,n as getCommands};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Settings-B1EI5LOU.js";var i,a;e((()=>{n(),i=t(),a=async(e,t)=>(0,i.jsx)(r,{onClose:e,context:t,defaultTab:`Config`})}))();export{a as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./context-noninteractive-CqnJTDcI.js";t();export{n as call,e as collectContextData};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./conversation-DOgBzrm0.js";e();export{t as clearConversation};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,r}from"./createSession-DD5YaQKM.js";t();export{n as createBridgeSession,r as getBridgeSession,e as updateBridgeSessionTitle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Doctor-Yvrzcrvx.js";var i,a;e((()=>{n(),i=t(),a=(e,t,n)=>Promise.resolve((0,i.jsx)(r,{onDone:e}))}))();export{a as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ac as e,Oc as t,jc as n,kc as r}from"./loadAgentsDir-JrGMJN05.js";n();export{t as drainPendingExtraction,r as executeExtractMemories,e as initExtractMemories};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./fast-Cuj3bfFm.js";t();export{n as FastModePicker,e as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./firstPartyEventLogger-D4yuDP-n.js";e();export{t as initialize1PEventLogging};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{$u as n,Ai as r,Li as i,Qu as a,Ti as o,_C as s,gC as c,hC as l,xC as u}from"./loadAgentsDir-JrGMJN05.js";import{I as d,Lt as f,P as p,Wt as m,a as h,ai as g,n as _,ot as v,r as y,t as b,x}from"./src-DL3w8VPk2.js";import{t as S}from"./jsx-runtime-Bb4Xn-E0.js";import{b as C,y as w}from"./startupProfiler-2sjXZkIP.js";import{n as T,t as E}from"./useExitOnCtrlCDWithKeybindings-qLfN0tc-.js";import{n as D,r as O}from"./modalContext-wY9CeN4G.js";import{n as k,t as A}from"./PromptInputHelpMenu-DyaUsvNx.js";function j({commands:e,maxHeight:t,columns:n,title:i,onCancel:o,emptyMessage:s}){let{headerFocused:c,focusHeader:l}=h(),u=Math.max(1,n-10),f=Math.max(1,Math.floor((t-10)/2)),m=(0,M.useMemo)(()=>{let t=new Set;return e.filter(e=>t.has(e.name)?!1:(t.add(e.name),!0)).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:`/${e.name}`,value:e.name,description:C(r(e),u,!0)}))},[e,u]);return(0,N.jsx)(d,{flexDirection:`column`,paddingY:1,children:e.length===0&&s?(0,N.jsx)(p,{dimColor:!0,children:s}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(p,{children:i}),(0,N.jsx)(d,{marginTop:1,children:(0,N.jsx)(a,{options:m,visibleOptionCount:f,onCancel:o,disableSelection:!0,hideIndexes:!0,layout:`compact-vertical`,onUpFromFirstItem:l,isDisabled:c})})]})})}var M,N,P=e((()=>{M=t(g(),1),i(),w(),b(),n(),N=S()}));function F(){return(0,I.jsxs)(d,{flexDirection:`column`,paddingY:1,gap:1,children:[(0,I.jsxs)(d,{flexDirection:`column`,gap:1,children:[(0,I.jsx)(p,{bold:!0,children:`Getting started`}),(0,I.jsxs)(d,{flexDirection:`column`,children:[(0,I.jsxs)(p,{children:[(0,I.jsx)(p,{bold:!0,children:`1. `}),(0,I.jsx)(p,{children:`Ask a question or describe a task — Claude will explore your code and respond.`})]}),(0,I.jsxs)(p,{children:[(0,I.jsx)(p,{bold:!0,children:`2. `}),(0,I.jsx)(p,{children:`When Claude wants to edit files or run commands, you review and approve each action.`})]}),(0,I.jsxs)(p,{children:[(0,I.jsx)(p,{bold:!0,children:`3. `}),(0,I.jsx)(p,{children:`Type `}),(0,I.jsx)(p,{bold:!0,children:`/help`}),(0,I.jsx)(p,{children:` for commands, or `}),(0,I.jsx)(p,{bold:!0,children:`?`}),(0,I.jsx)(p,{children:` for shortcuts.`})]})]})]}),(0,I.jsxs)(d,{flexDirection:`column`,children:[(0,I.jsx)(d,{children:(0,I.jsx)(p,{bold:!0,children:`Shortcuts`})}),(0,I.jsx)(A,{gap:2,fixedWidth:!0})]})]})}var I,L=e((()=>{b(),k(),I=S()}));function R({onClose:e,commands:t}){let{rows:n,columns:r}=v(),i=Math.floor(n/2),a=O(),c=()=>e(`Help dialog dismissed`,{display:`system`});m(`help:dismiss`,c,{context:`Help`});let l=T(c),u=s(`help:dismiss`,`Help`,`esc`),h=o(),g=t.filter(e=>h.has(e.name)&&!e.isHidden),b=t.filter(e=>!h.has(e.name)&&!e.isHidden),S=[(0,z.jsx)(_,{title:`general`,children:(0,z.jsx)(F,{})},`general`)];return S.push((0,z.jsx)(_,{title:`commands`,children:(0,z.jsx)(j,{commands:g,maxHeight:i,columns:r,title:`Browse default commands:`,onCancel:c})},`commands`)),S.push((0,z.jsx)(_,{title:`custom-commands`,children:(0,z.jsx)(j,{commands:b,maxHeight:i,columns:r,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:c})},`custom`)),(0,z.jsx)(d,{flexDirection:`column`,height:a?void 0:i,children:(0,z.jsxs)(x,{color:`professionalBlue`,children:[(0,z.jsx)(y,{title:`Work Mate v0.0.14`,color:`professionalBlue`,defaultTab:`general`,children:S}),(0,z.jsx)(d,{marginTop:1,children:(0,z.jsxs)(p,{children:[`For more help: `,(0,z.jsx)(f,{url:`https://code.workmate.com/docs/en/overview`})]})}),(0,z.jsx)(d,{marginTop:1,children:(0,z.jsx)(p,{dimColor:!0,children:l.pending?(0,z.jsxs)(z.Fragment,{children:[`Press `,l.keyName,` again to exit`]}):(0,z.jsxs)(p,{italic:!0,children:[u,` to cancel`]})})})]})})}var z,B=e((()=>{E(),c(),i(),D(),u(),b(),l(),P(),L(),z=S()})),V,H;e((()=>{B(),V=S(),H=async(e,{options:{commands:t}})=>(0,V.jsx)(R,{commands:t,onClose:e})}))();export{H as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hn as e,mn as t,qt as n,sn as r}from"./loadAgentsDir-JrGMJN05.js";e();export{n as executeSessionEndHooks,r as getSessionEndHookTimeoutMs,t as hasWorktreeCreateHook};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,ai as r,kn as i,s as a,t as o}from"./src-DL3w8VPk2.js";import{t as s}from"./jsx-runtime-Bb4Xn-E0.js";import{P as c,R as l,c as u,i as d}from"./debug-BQj6h99Q.js";import{Kt as f,Yt as p,g as m,n as h,x as g}from"./settings-aUygByiZ.js";import{n as _,r as v}from"./analytics-DJobLaWP.js";import{a as y,n as b,r as x,s as S,t as C}from"./nativeInstaller-xxyUjXbl.js";import{join as w}from"node:path";import{homedir as T}from"node:os";var E=e(r(),1);_(),o(),d(),p(),l(),C(),m();var D=s();function O(){let e=f.platform===`win32`,t=T();return e?w(t,`.local`,`bin`,`claude.exe`).replace(/\//g,`\\`):`~/.local/bin/claude`}function k({messages:e}){return e.length===0?null:(0,D.jsxs)(t,{flexDirection:`column`,gap:0,marginBottom:1,children:[(0,D.jsx)(t,{children:(0,D.jsxs)(n,{color:`warning`,children:[(0,D.jsx)(a,{status:`warning`,withSpace:!0}),`Setup notes:`]})}),e.map((e,r)=>(0,D.jsx)(t,{marginLeft:2,children:(0,D.jsxs)(n,{dimColor:!0,children:[`• `,e]})},r))]})}function A({onDone:e,force:r,target:i}){let[o,s]=(0,E.useState)({type:`checking`});return(0,E.useEffect)(()=>{async function e(){try{u(`Install: Starting installation process (force=${r}, target=${i})`);let e=i||h()?.autoUpdatesChannel||`latest`;s({type:`installing`,version:e}),u(`Install: Calling installLatest(channelOrVersion=${e}, forceReinstall=${r})`);let t=await S(e,r);if(u(`Install: installLatest returned version=${t.latestVersion}, wasUpdated=${t.wasUpdated}, lockFailed=${t.lockFailed}`),t.lockFailed)throw Error(`Could not install - another process is currently installing Claude. Please try again in a moment.`);t.latestVersion||u(`Install: Failed to retrieve version information during install`,{level:`error`}),t.wasUpdated||u(`Install: Already up to date`),s({type:`setting-up`});let n=await b(!0);u(`Install: Setup launcher completed with ${n.length} messages`),n.length>0&&n.forEach(e=>u(`Install: Setup message: ${e.message}`)),u(`Install: Cleaning up npm installations after successful install`);let{removed:a,errors:o,warnings:c}=await x();a>0&&u(`Cleaned up ${a} npm installation(s)`),o.length>0&&u(`Cleanup errors: ${o.join(`, `)}`);let l=await y();l.length>0&&u(`Shell alias cleanup: ${l.map(e=>e.message).join(`; `)}`),v(`tengu_claude_install_command`,{has_version:+!!t.latestVersion,forced:+!!r}),(i===`latest`||i===`stable`)&&(g(`userSettings`,{autoUpdatesChannel:i}),u(`Install: Saved autoUpdatesChannel=${i} to user settings`));let d=[...c,...l.map(e=>e.message)];n.length>0?(s({type:`set-up`,messages:n.map(e=>e.message)}),setTimeout(s,2e3,{type:`success`,version:t.latestVersion||`current`,setupMessages:[...n.map(e=>e.message),...d]})):(u(`Install: Shell PATH already configured`),s({type:`success`,version:t.latestVersion||`current`,setupMessages:d.length>0?d:void 0}))}catch(e){u(`Install command failed: ${e}`,{level:`error`}),s({type:`error`,message:c(e)})}}e()},[r,i]),(0,E.useEffect)(()=>{o.type===`success`?setTimeout(e,2e3,`Work Mate installation completed successfully`,{display:`system`}):o.type===`error`&&setTimeout(e,3e3,`Work Mate installation failed`,{display:`system`})},[o,e]),(0,D.jsxs)(t,{flexDirection:`column`,marginTop:1,children:[o.type===`checking`&&(0,D.jsx)(n,{color:`claude`,children:`Checking installation status...`}),o.type===`cleaning-npm`&&(0,D.jsx)(n,{color:`warning`,children:`Cleaning up old npm installations...`}),o.type===`installing`&&(0,D.jsxs)(n,{color:`claude`,children:[`Installing Work Mate native build `,o.version,`...`]}),o.type===`setting-up`&&(0,D.jsx)(n,{color:`claude`,children:`Setting up launcher and shell integration...`}),o.type===`set-up`&&(0,D.jsx)(k,{messages:o.messages}),o.type===`success`&&(0,D.jsxs)(t,{flexDirection:`column`,gap:1,children:[(0,D.jsxs)(t,{children:[(0,D.jsx)(a,{status:`success`,withSpace:!0}),(0,D.jsx)(n,{color:`success`,bold:!0,children:`Work Mate successfully installed!`})]}),(0,D.jsxs)(t,{marginLeft:2,flexDirection:`column`,gap:1,children:[o.version!==`current`&&(0,D.jsxs)(t,{children:[(0,D.jsx)(n,{dimColor:!0,children:`Version: `}),(0,D.jsx)(n,{color:`claude`,children:o.version})]}),(0,D.jsxs)(t,{children:[(0,D.jsx)(n,{dimColor:!0,children:`Location: `}),(0,D.jsx)(n,{color:`text`,children:O()})]})]}),(0,D.jsx)(t,{marginLeft:2,flexDirection:`column`,gap:1,children:(0,D.jsxs)(t,{marginTop:1,children:[(0,D.jsx)(n,{dimColor:!0,children:`Next: Run `}),(0,D.jsx)(n,{color:`claude`,bold:!0,children:`claude --help`}),(0,D.jsx)(n,{dimColor:!0,children:` to get started`})]})}),o.setupMessages&&(0,D.jsx)(k,{messages:o.setupMessages})]}),o.type===`error`&&(0,D.jsxs)(t,{flexDirection:`column`,gap:1,children:[(0,D.jsxs)(t,{children:[(0,D.jsx)(a,{status:`error`,withSpace:!0}),(0,D.jsx)(n,{color:`error`,children:`Installation failed`})]}),(0,D.jsx)(n,{color:`error`,children:o.message}),(0,D.jsx)(t,{marginTop:1,children:(0,D.jsx)(n,{dimColor:!0,children:`Try running with --force to override checks`})})]})]})}var j={type:`local-jsx`,name:`install`,description:`安装 Work Mate 原生构建`,argumentHint:`[options]`,async call(e,t,n){let r=n.includes(`--force`),a=n.filter(e=>!e.startsWith(`--`))[0],{unmount:o}=await i((0,D.jsx)(A,{onDone:(t,n)=>{o(),e(t,n)},force:r,target:a}))}};export{j as install};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,t}from"./loadAgentsDir-JrGMJN05.js";e();export{t as clearAgentDefinitionsCache};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t,s as n,t as r}from"./localSearch-C-stDP9C.js";t();export{r as clearSkillIndexCache,e as getSkillIndex,n as searchSkills};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./managedEnv-C8SisyLk.js";e();export{t as applyConfigEnvironmentVariables};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,u as t}from"./model-CmDF8O9G.js";e();export{t as getMainLoopModel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,r as n}from"./rolldown-runtime-DaDcL9Zw.js";import{n as r,t as i}from"./memoize-BK3gG5ob.js";import{d as a,i as o,l as s,o as c,r as ee,s as l,t as u}from"./envUtils-DcaKZlRU.js";import{n as te,t as d}from"./defineProperty-C-QyHrDq.js";import{n as f,t as p}from"./axios-DaWTGg7G.js";import{di as ne,fi as re}from"./src-DL3w8VPk2.js";import{A as ie,C as ae,p as oe,w as se}from"./external-CEp-aPkt.js";import{n as ce,r as le,t as ue}from"./lazySchema-B4D4qJVE.js";import{$ as de,In as fe,Ir as pe,J as me,Lr as he,Wt as m,Z as ge,Zt as _e,dt as ve,lr as ye,pt as be,sn as xe,ur as Se,vn as Ce,y as we,z as h,zn as Te}from"./state-BPFYBqm1.js";import{B as Ee,C as De,F as Oe,G as ke,P as g,R as Ae,S as je,T as Me,W as Ne,c as _,f as Pe,i as v,o as Fe,s as Ie,u as Le,x as Re}from"./debug-BQj6h99Q.js";import{Wt as ze,c as y,f as b,g as x,n as Be,x as Ve}from"./settings-aUygByiZ.js";import{C as He,S as Ue,c as S,h as We,n as C,y as w}from"./config-BkbL2e5Q.js";import{a as Ge,c as Ke,i as qe,o as Je,r as Ye,s as Xe,t as Ze}from"./execFileNoThrow-DYm1GeGn.js";import{d as Qe,f as $e,o as et,s as T}from"./log-BlJ7CcKG.js";import{r as tt,t as nt}from"./memoize-_2f7NWDv.js";import{s as rt,u as it}from"./types-BomO8WUz.js";import{n as at,r as E}from"./analytics-DJobLaWP.js";import{l as D,n as ot,r as st,s as ct,t as lt,u as O}from"./oauth-D38aRTUb.js";import{n as ut,t as dt}from"./bundledMode--fG1S62b.js";import{n as ft,o as pt}from"./stringUtils-BjnclTLB.js";import{a as mt,i as ht,l as gt}from"./proxy-C0j74LqT.js";import{userInfo as _t}from"os";import{join as vt}from"path";import{chmodSync as yt,mkdirSync as bt,readFileSync as xt,writeFileSync as St}from"fs";import{createHash as Ct,randomUUID as wt}from"crypto";import{mkdir as Tt,stat as Et,writeFile as Dt}from"fs/promises";import{exec as Ot,execFile as kt}from"child_process";import{AsyncLocalStorage as At}from"async_hooks";function k(e=Be()){let t=e.modelType;return t===`openai`?`openai`:t===`gemini`?`gemini`:t===`grok`?`grok`:s(process.env.CLAUDE_CODE_USE_BEDROCK)?`bedrock`:s(process.env.CLAUDE_CODE_USE_VERTEX)?`vertex`:s(process.env.CLAUDE_CODE_USE_FOUNDRY)?`foundry`:s(process.env.CLAUDE_CODE_USE_OPENAI)?`openai`:s(process.env.CLAUDE_CODE_USE_GEMINI)?`gemini`:s(process.env.CLAUDE_CODE_USE_GROK)?`grok`:`firstParty`}function jt(){return k()}function Mt(){let e=process.env.ANTHROPIC_BASE_URL;if(!e)return!0;try{return new URL(e).host===`api.anthropic.com`}catch{return!1}}var A=e((()=>{x(),c()}));function Nt(){return Ft.getStore()?.workload}function Pt(e,t){return Ft.run({workload:e},t)}var Ft,It=e((()=>{Ft=new At}));function Lt(e){let t=[],n=!1;async function r(){if(!n&&t.length!==0){for(n=!0;t.length>0;){let{args:n,resolve:r,reject:i,context:a}=t.shift();try{r(await e.apply(a,n))}catch(e){i(e)}}n=!1,t.length>0&&r()}}return function(...e){return new Promise((n,i)=>{t.push({args:e,resolve:n,reject:i,context:this}),r()})}}var Rt=e((()=>{}));function zt(e,t){return e.find(e=>e.includes(t))??null}async function Bt(){let{BedrockClient:e}=await import(`./dist-es-yHGBqhBe.js`),t=u(),n=s(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),r={region:t,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await ht(),...n&&{requestHandler:new(await(import(`./dist-es-C7vygWzp.js`))).NodeHttpHandler,httpAuthSchemes:[{schemeId:`smithy.api#noAuth`,identityProvider:()=>async()=>({}),signer:new(await(import(`./dist-es-gUzZ_7Vf.js`))).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:`smithy.api#noAuth`}]}};if(!n&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let e=await U();e&&(r.credentials={accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken})}return new e(r)}async function Vt(){let{BedrockRuntimeClient:e}=await import(`./dist-es-Gt_DpXlP.js`),t=u(),n=s(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),r={region:t,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await ht(),...n&&{requestHandler:new(await(import(`./dist-es-C7vygWzp.js`))).NodeHttpHandler,httpAuthSchemes:[{schemeId:`smithy.api#noAuth`,identityProvider:()=>async()=>({}),signer:new(await(import(`./dist-es-gUzZ_7Vf.js`))).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:`smithy.api#noAuth`}]}};if(!n&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let e=await U();e&&(r.credentials={accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken})}return new e(r)}function Ht(e){return e.startsWith(`anthropic.`)}function Ut(e){if(!e.startsWith(`arn:`))return e;let t=e.lastIndexOf(`/`);return t===-1?e:e.substring(t+1)}function Wt(e){let t=Ut(e);for(let e of Jt)if(t.startsWith(`${e}.anthropic.`))return e}function Gt(e,t){let n=Wt(e);return n?e.replace(`${n}.`,`${t}.`):Ht(e)?`${t}.${e}`:e}var Kt,qt,Jt,Yt=e((()=>{i(),G(),c(),et(),gt(),Kt=r(async()=>{let[e,{ListInferenceProfilesCommand:t}]=await Promise.all([Bt(),import(`./dist-es-yHGBqhBe.js`)]),n=[],r;try{do{let i=new t({...r&&{nextToken:r},typeEquals:`SYSTEM_DEFINED`}),a=await e.send(i);a.inferenceProfileSummaries&&n.push(...a.inferenceProfileSummaries),r=a.nextToken}while(r);return n.filter(e=>e.inferenceProfileId?.includes(`anthropic`)).map(e=>e.inferenceProfileId).filter(Boolean)}catch(e){throw T(e),e}}),qt=r(async e=>{try{let[t,{GetInferenceProfileCommand:n}]=await Promise.all([Bt(),import(`./dist-es-yHGBqhBe.js`)]),r=new n({inferenceProfileIdentifier:e}),i=await t.send(r);if(!i.models||i.models.length===0)return null;let a=i.models[0];if(!a?.modelArn)return null;let o=a.modelArn.lastIndexOf(`/`);return o>=0?a.modelArn.substring(o+1):a.modelArn}catch(e){return T(e),null}}),Jt=[`us`,`eu`,`apac`,`global`]})),Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn=e((()=>{Xt={firstParty:`claude-3-7-sonnet-20250219`,bedrock:`us.anthropic.claude-3-7-sonnet-20250219-v1:0`,vertex:`claude-3-7-sonnet@20250219`,foundry:`claude-3-7-sonnet`,openai:`claude-3-7-sonnet-20250219`,gemini:`claude-3-7-sonnet-20250219`,grok:`claude-3-7-sonnet-20250219`},Zt={firstParty:`claude-3-5-sonnet-20241022`,bedrock:`anthropic.claude-3-5-sonnet-20241022-v2:0`,vertex:`claude-3-5-sonnet-v2@20241022`,foundry:`claude-3-5-sonnet`,openai:`claude-3-5-sonnet-20241022`,gemini:`claude-3-5-sonnet-20241022`,grok:`claude-3-5-sonnet-20241022`},Qt={firstParty:`claude-3-5-haiku-20241022`,bedrock:`us.anthropic.claude-3-5-haiku-20241022-v1:0`,vertex:`claude-3-5-haiku@20241022`,foundry:`claude-3-5-haiku`,openai:`claude-3-5-haiku-20241022`,gemini:`claude-3-5-haiku-20241022`,grok:`claude-3-5-haiku-20241022`},$t={firstParty:`claude-haiku-4-5-20251001`,bedrock:`us.anthropic.claude-haiku-4-5-20251001-v1:0`,vertex:`claude-haiku-4-5@20251001`,foundry:`claude-haiku-4-5`,openai:`claude-haiku-4-5-20251001`,gemini:`claude-haiku-4-5-20251001`,grok:`claude-haiku-4-5-20251001`},en={firstParty:`claude-sonnet-4-20250514`,bedrock:`us.anthropic.claude-sonnet-4-20250514-v1:0`,vertex:`claude-sonnet-4@20250514`,foundry:`claude-sonnet-4`,openai:`claude-sonnet-4-20250514`,gemini:`claude-sonnet-4-20250514`,grok:`claude-sonnet-4-20250514`},tn={firstParty:`claude-sonnet-4-5-20250929`,bedrock:`us.anthropic.claude-sonnet-4-5-20250929-v1:0`,vertex:`claude-sonnet-4-5@20250929`,foundry:`claude-sonnet-4-5`,openai:`claude-sonnet-4-5-20250929`,gemini:`claude-sonnet-4-5-20250929`,grok:`claude-sonnet-4-5-20250929`},nn={firstParty:`claude-opus-4-20250514`,bedrock:`us.anthropic.claude-opus-4-20250514-v1:0`,vertex:`claude-opus-4@20250514`,foundry:`claude-opus-4`,openai:`claude-opus-4-20250514`,gemini:`claude-opus-4-20250514`,grok:`claude-opus-4-20250514`},rn={firstParty:`claude-opus-4-1-20250805`,bedrock:`us.anthropic.claude-opus-4-1-20250805-v1:0`,vertex:`claude-opus-4-1@20250805`,foundry:`claude-opus-4-1`,openai:`claude-opus-4-1-20250805`,gemini:`claude-opus-4-1-20250805`,grok:`claude-opus-4-1-20250805`},an={firstParty:`claude-opus-4-5-20251101`,bedrock:`us.anthropic.claude-opus-4-5-20251101-v1:0`,vertex:`claude-opus-4-5@20251101`,foundry:`claude-opus-4-5`,openai:`claude-opus-4-5-20251101`,gemini:`claude-opus-4-5-20251101`,grok:`claude-opus-4-5-20251101`},on={firstParty:`claude-opus-4-6`,bedrock:`us.anthropic.claude-opus-4-6-v1`,vertex:`claude-opus-4-6`,foundry:`claude-opus-4-6`,openai:`claude-opus-4-6`,gemini:`claude-opus-4-6`,grok:`claude-opus-4-6`},sn={firstParty:`claude-opus-4-7`,bedrock:`us.anthropic.claude-opus-4-7-v1`,vertex:`claude-opus-4-7`,foundry:`claude-opus-4-7`,openai:`claude-opus-4-7`,gemini:`claude-opus-4-7`,grok:`claude-opus-4-7`},cn={firstParty:`claude-sonnet-4-6`,bedrock:`us.anthropic.claude-sonnet-4-6`,vertex:`claude-sonnet-4-6`,foundry:`claude-sonnet-4-6`,openai:`claude-sonnet-4-6`,gemini:`claude-sonnet-4-6`,grok:`claude-sonnet-4-6`},ln={haiku35:Qt,haiku45:$t,sonnet35:Zt,sonnet37:Xt,sonnet40:en,sonnet45:tn,sonnet46:cn,opus40:nn,opus41:rn,opus45:an,opus46:on,opus47:sn},Object.values(ln).map(e=>e.firstParty),un=Object.fromEntries(Object.entries(ln).map(([e,t])=>[t.firstParty,e]))}));function fn(e){let t={};for(let n of vn)t[n]=ln[n][e];return t}async function pn(){let e=fn(`bedrock`),t;try{t=await Kt()}catch(t){return T(t),e}if(!t?.length)return e;let n={};for(let r of vn){let i=ln[r].firstParty;n[r]=zt(t,i)||e[r]}return n}function mn(e){let t=Be().modelOverrides;if(!t)return e;let n={...e};for(let[e,r]of Object.entries(t)){let t=un[e];t&&r&&(n[t]=r)}return n}function hn(e){let t;try{t=Be().modelOverrides}catch{return e}if(!t)return e;for(let[n,r]of Object.entries(t))if(r===e)return n;return e}function gn(){if(ge()===null){if(k()!==`bedrock`){fe(fn(k()));return}yn()}}function j(){let e=ge();return e===null?(gn(),mn(fn(k()))):mn(e)}async function _n(){if(ge()===null){if(k()!==`bedrock`){fe(fn(k()));return}await yn()}}var vn,yn,bn=e((()=>{m(),et(),Rt(),x(),Yt(),dn(),A(),vn=Object.keys(ln),yn=Lt(async()=>{if(ge()===null)try{fe(await pn())}catch(e){T(e)}})}));async function xn(){let e=S().oauthAccount?.accountUuid,t=ea();if(!e||!t)return;let n=`${D().BASE_API_URL}/api/claude_cli_profile`;try{return(await f.get(n,{headers:{"x-api-key":t,"anthropic-beta":ct},params:{account_uuid:e},timeout:1e4})).data}catch(e){T(e)}}async function Sn(e){let t=`${D().BASE_API_URL}/api/oauth/profile`;try{return(await f.get(t,{headers:{Authorization:`Bearer ${e}`,"Content-Type":`application/json`},timeout:1e4})).data}catch(e){T(e)}}var Cn=e((()=>{p(),O(),G(),We(),et()}));function wn(e){return!!e?.includes(ot)}function Tn(e){return e?.split(` `).filter(Boolean)??[]}function En({codeChallenge:e,state:t,port:n,isManual:r,loginWithClaudeAi:i,inferenceOnly:a,orgUUID:o,loginHint:s,loginMethod:c}){let ee=i?D().CLAUDE_AI_AUTHORIZE_URL:D().CONSOLE_AUTHORIZE_URL,l=new URL(ee);l.searchParams.append(`code`,`true`),l.searchParams.append(`client_id`,D().CLIENT_ID),l.searchParams.append(`response_type`,`code`),l.searchParams.append(`redirect_uri`,r?D().MANUAL_REDIRECT_URL:`http://localhost:${n}/callback`);let u=a?[ot]:lt;return l.searchParams.append(`scope`,u.join(` `)),l.searchParams.append(`code_challenge`,e),l.searchParams.append(`code_challenge_method`,`S256`),l.searchParams.append(`state`,t),o&&l.searchParams.append(`orgUUID`,o),s&&l.searchParams.append(`login_hint`,s),c&&l.searchParams.append(`login_method`,c),l.toString()}async function Dn(e,t,n,r,i=!1,a){let o={grant_type:`authorization_code`,code:e,redirect_uri:i?D().MANUAL_REDIRECT_URL:`http://localhost:${r}/callback`,client_id:D().CLIENT_ID,code_verifier:n,state:t};a!==void 0&&(o.expires_in=a);let s=await f.post(D().TOKEN_URL,o,{headers:{"Content-Type":`application/json`},timeout:15e3});if(s.status!==200)throw Error(s.status===401?`Authentication failed: Invalid authorization code`:`Token exchange failed (${s.status}): ${s.statusText}`);return E(`tengu_oauth_token_exchange_success`,{}),s.data}async function On(e,{scopes:t}={}){let n={grant_type:`refresh_token`,refresh_token:e,client_id:D().CLIENT_ID,scope:(t?.length?t:st).join(` `)};try{let t=await f.post(D().TOKEN_URL,n,{headers:{"Content-Type":`application/json`},timeout:15e3});if(t.status!==200)throw Error(`Token refresh failed: ${t.statusText}`);let r=t.data,{access_token:i,refresh_token:a=e,expires_in:o}=r,s=Date.now()+o*1e3,c=Tn(r.scope);E(`tengu_oauth_token_refresh_success`,{});let ee=S(),l=W(),u=ee.oauthAccount?.billingType!==void 0&&ee.oauthAccount?.accountCreatedAt!==void 0&&ee.oauthAccount?.subscriptionCreatedAt!==void 0&&l?.subscriptionType!=null&&l?.rateLimitTier!=null?null:await Mn(i);if(u&&ee.oauthAccount){let e={};u.displayName!==void 0&&(e.displayName=u.displayName),typeof u.hasExtraUsageEnabled==`boolean`&&(e.hasExtraUsageEnabled=u.hasExtraUsageEnabled),u.billingType!==null&&(e.billingType=u.billingType),u.accountCreatedAt!==void 0&&(e.accountCreatedAt=u.accountCreatedAt),u.subscriptionCreatedAt!==void 0&&(e.subscriptionCreatedAt=u.subscriptionCreatedAt),Object.keys(e).length>0&&w(t=>({...t,oauthAccount:t.oauthAccount?{...t.oauthAccount,...e}:t.oauthAccount}))}return{accessToken:i,refreshToken:a,expiresAt:s,scopes:c,subscriptionType:u?.subscriptionType??l?.subscriptionType??null,rateLimitTier:u?.rateLimitTier??l?.rateLimitTier??null,profile:u?.rawProfile,tokenAccount:r.account?{uuid:r.account.uuid,emailAddress:r.account.email_address,organizationUuid:r.organization?.uuid}:void 0}}catch(e){let t=f.isAxiosError(e)&&e.response?.data?JSON.stringify(e.response.data):void 0;throw E(`tengu_oauth_token_refresh_failure`,{error:e.message,...t&&{responseBody:t}}),e}}async function kn(e){let t=await f.get(D().ROLES_URL,{headers:{Authorization:`Bearer ${e}`}});if(t.status!==200)throw Error(`Failed to fetch user roles: ${t.statusText}`);let n=t.data;if(!S().oauthAccount)throw Error(`OAuth account information not found in config`);w(e=>({...e,oauthAccount:e.oauthAccount?{...e.oauthAccount,organizationRole:n.organization_role,workspaceRole:n.workspace_role,organizationName:n.organization_name}:e.oauthAccount})),E(`tengu_oauth_roles_stored`,{org_role:n.organization_role})}async function An(e){try{let t=await f.post(D().API_KEY_URL,null,{headers:{Authorization:`Bearer ${e}`}}),n=t.data?.raw_key;return n?(await ka(n),E(`tengu_oauth_api_key`,{status:`success`,statusCode:t.status}),n):null}catch(e){throw E(`tengu_oauth_api_key`,{status:`failure`,error:e instanceof Error?e.message:String(e)}),e}}function jn(e){return e!==null&&Date.now()+300*1e3>=e}async function Mn(e){let t=await Sn(e),n=t?.organization?.organization_type,r=null;switch(n){case`claude_max`:r=`max`;break;case`claude_pro`:r=`pro`;break;case`claude_enterprise`:r=`enterprise`;break;case`claude_team`:r=`team`;break;default:r=null;break}let i={subscriptionType:r,rateLimitTier:t?.organization?.rate_limit_tier??null,hasExtraUsageEnabled:t?.organization?.has_extra_usage_enabled??null,billingType:t?.organization?.billing_type??null};return t?.account?.display_name&&(i.displayName=t.account.display_name),t?.account?.created_at&&(i.accountCreatedAt=t.account.created_at),t?.organization?.subscription_created_at&&(i.subscriptionCreatedAt=t.organization.subscription_created_at),E(`tengu_oauth_profile_fetch_success`,{}),{...i,rawProfile:t}}async function Nn(){let e=S().oauthAccount?.organizationUuid;if(e)return e;let t=W()?.accessToken;return t===void 0||!Va()?null:(await Sn(t))?.organization?.uuid||null}async function Pn(){let e=process.env.CLAUDE_CODE_ACCOUNT_UUID,t=process.env.CLAUDE_CODE_USER_EMAIL,n=process.env.CLAUDE_CODE_ORGANIZATION_UUID,r=!!(e&&t&&n);e&&t&&n&&(S().oauthAccount||Fn({accountUuid:e,emailAddress:t,organizationUuid:n})),await za();let i=S();if(i.oauthAccount&&i.oauthAccount.billingType!==void 0&&i.oauthAccount.accountCreatedAt!==void 0&&i.oauthAccount.subscriptionCreatedAt!==void 0||!R()||!Va())return!1;let a=W();if(a?.accessToken){let e=await Sn(a.accessToken);if(e)return r&&_(`OAuth profile fetch succeeded, overriding env var account info`,{level:`info`}),Fn({accountUuid:e.account.uuid,emailAddress:e.account.email,organizationUuid:e.organization.uuid,displayName:e.account.display_name||void 0,hasExtraUsageEnabled:e.organization.has_extra_usage_enabled??!1,billingType:e.organization.billing_type??void 0,accountCreatedAt:e.account.created_at,subscriptionCreatedAt:e.organization.subscription_created_at??void 0}),!0}return!1}function Fn({accountUuid:e,emailAddress:t,organizationUuid:n,displayName:r,hasExtraUsageEnabled:i,billingType:a,accountCreatedAt:o,subscriptionCreatedAt:s}){let c={accountUuid:e,emailAddress:t,organizationUuid:n,hasExtraUsageEnabled:i,billingType:a,accountCreatedAt:o,subscriptionCreatedAt:s};r&&(c.displayName=r),w(e=>e.oauthAccount?.accountUuid===c.accountUuid&&e.oauthAccount?.emailAddress===c.emailAddress&&e.oauthAccount?.organizationUuid===c.organizationUuid&&e.oauthAccount?.displayName===c.displayName&&e.oauthAccount?.hasExtraUsageEnabled===c.hasExtraUsageEnabled&&e.oauthAccount?.billingType===c.billingType&&e.oauthAccount?.accountCreatedAt===c.accountCreatedAt&&e.oauthAccount?.subscriptionCreatedAt===c.subscriptionCreatedAt?e:{...e,oauthAccount:c})}var In=e((()=>{p(),at(),O(),G(),We(),v(),Cn()}));function Ln(e,t,n){if(s(process.env.CLAUDE_CODE_REMOTE))try{bt(Hn,{recursive:!0,mode:448}),St(e,t,{encoding:`utf8`,mode:384}),_(`Persisted ${n} to ${e} for subprocess access`)}catch(e){_(`Failed to persist ${n} to disk (non-fatal): ${g(e)}`,{level:`error`})}}function Rn(e,t){try{let n=Le().readFileSync(e,{encoding:`utf8`}).trim();return n?(_(`Read ${t} from well-known file ${e}`),n):null}catch(n){return Ee(n)||_(`Failed to read ${t} from ${e}: ${g(n)}`,{level:`debug`}),null}}function zn({envVar:e,wellKnownPath:t,label:n,getCached:r,setCached:i}){let a=r();if(a!==void 0)return a;let o=process.env[e];if(!o){let e=Rn(t,n);return i(e),e}let s=parseInt(o,10);if(Number.isNaN(s))return _(`${e} must be a valid file descriptor number, got: ${o}`,{level:`error`}),i(null),null;try{let e=Le(),r=process.platform===`darwin`||process.platform===`freebsd`?`/dev/fd/${s}`:`/proc/self/fd/${s}`,a=e.readFileSync(r,{encoding:`utf8`}).trim();return a?(_(`Successfully read ${n} from file descriptor ${s}`),i(a),Ln(t,a,n),a):(_(`File descriptor contained empty ${n}`,{level:`error`}),i(null),null)}catch(e){_(`Failed to read ${n} from file descriptor ${s}: ${g(e)}`,{level:`error`});let r=Rn(t,n);return i(r),r}}function Bn(){return zn({envVar:`CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`,wellKnownPath:Un,label:`OAuth token`,getCached:de,setCached:Te})}function Vn(){return zn({envVar:`CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR`,wellKnownPath:Wn,label:`API key`,getCached:we,setCached:xe})}var Hn,Un,Wn,Gn,Kn=e((()=>{m(),v(),c(),Ae(),Pe(),Hn=`/home/claude/.workmate/remote`,Un=`${Hn}/.oauth_token`,Wn=`${Hn}/.api_key`,Gn=`${Hn}/.session_ingress_token`}));function M(e=``){let t=o(),n=process.env.WORKMATE_CONFIG_DIR?`-${Ct(`sha256`).update(t).digest(`hex`).substring(0,8)}`:``;return`Claude Code${D().OAUTH_FILE_SUFFIX}${e}${n}`}function qn(){try{return process.env.USER||_t().username}catch{return`claude-code-user`}}function N(){P.cache={data:null,cachedAt:0},P.generation++,P.readInFlight=null}function Jn(e){if(P.cache.cachedAt!==0)return;let t=null;if(e)try{t=JSON.parse(e)}catch{return}P.cache={data:t,cachedAt:Date.now()}}var Yn,P,Xn=e((()=>{O(),c(),Yn=`-credentials`,P={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}}));async function Zn(){if(process.platform===`darwin`&&(await Je(`security delete-generic-password -a $USER -s "${M()}"`,{shell:!0,reject:!1})).exitCode!==0)throw Error(`Failed to delete keychain entry`)}function Qn(e){return e.slice(-20)}var $n=e((()=>{Ke(),Xn()}));function er(e){return e?.name===`CredentialsProviderError`}function tr(e){if(!e||typeof e!=`object`)return!1;let t=e;if(!t.Credentials||typeof t.Credentials!=`object`)return!1;let n=t.Credentials;return typeof n.AccessKeyId==`string`&&typeof n.SecretAccessKey==`string`&&typeof n.SessionToken==`string`&&n.AccessKeyId.length>0&&n.SecretAccessKey.length>0&&n.SessionToken.length>0}async function nr(){let{STSClient:e,GetCallerIdentityCommand:t}=await import(`./dist-es-C-OjW2Ao.js`);await new e().send(new t({}))}async function rr(){try{_(`Clearing AWS credential provider cache`);let{fromIni:e}=await import(`./dist-es-CIULjvtA2.js`);await e({ignoreCache:!0})(),_(`AWS credential provider cache refreshed`)}catch{_(`Failed to clear AWS credential cache (this is expected if no credentials are configured)`)}}var ir=e((()=>{v()})),ar,or=e((()=>{Se(),te(),ar=class e{constructor(){d(this,`status`,{isAuthenticating:!1,output:[]}),d(this,`changed`,ye()),d(this,`subscribe`,this.changed.subscribe)}static getInstance(){return e.instance||(e.instance=new e),e.instance}getStatus(){return{...this.status,output:[...this.status.output]}}startAuthentication(){this.status={isAuthenticating:!0,output:[]},this.changed.emit(this.getStatus())}addOutput(e){this.status.output.push(e),this.changed.emit(this.getStatus())}setError(e){this.status.error=e,this.changed.emit(this.getStatus())}endAuthentication(e){e?this.status={isAuthenticating:!1,output:[]}:this.status.isAuthenticating=!1,this.changed.emit(this.getStatus())}static reset(){e.instance&&(e.instance.changed.clear(),e.instance=null)}},d(ar,`instance`,null)})),sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br=e((()=>{sr=`claude-code-20250219`,cr=`interleaved-thinking-2025-05-14`,lr=`context-1m-2025-08-07`,ur=`context-management-2025-06-27`,dr=`structured-outputs-2025-12-15`,fr=`tool-search-tool-2025-10-19`,pr=`task-budgets-2026-03-13`,mr=`prompt-caching-scope-2026-01-05`,hr=`fast-mode-2026-02-01`,gr=`redact-thinking-2026-02-12`,_r=`advisor-tool-2026-03-01`,vr=new Set([cr,lr,fr]),yr=new Set([sr,cr,ur])}));function xr(e,t){return pe(e,t)}var Sr=e((()=>{he()}));function Cr(){let e=process.env.CLAUDE_AGENT_SDK_VERSION?`, agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`:``,t=process.env.CLAUDE_AGENT_SDK_CLIENT_APP?`, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`:``,n=Nt(),r=n?`, workload/${n}`:``;return`claude-cli/0.0.14 (external, ${process.env.CLAUDE_CODE_ENTRYPOINT??`cli`}${e}${t}${r})`}function wr(){let e=[];return process.env.CLAUDE_CODE_ENTRYPOINT&&e.push(process.env.CLAUDE_CODE_ENTRYPOINT),process.env.CLAUDE_AGENT_SDK_VERSION&&e.push(`agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`),process.env.CLAUDE_AGENT_SDK_CLIENT_APP&&e.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`),`workmate/0.0.14${e.length>0?` (${e.join(`, `)})`:``}`}function Tr(){if(R()){let e=W();return e?.accessToken?{headers:{Authorization:`Bearer ${e.accessToken}`,"anthropic-beta":ct}}:{headers:{},error:`No OAuth token available`}}let e=ea();return e?{headers:{"x-api-key":e}}:{headers:{},error:`No API key available`}}async function Er(e,t){try{return await e()}catch(n){if(!f.isAxiosError(n))throw n;let r=n.response?.status;if(!(r===401||t?.also403Revoked&&r===403&&typeof n.response?.data==`string`&&n.response.data.includes(`OAuth token has been revoked`)))throw n;let i=W()?.accessToken;if(!i)throw n;return await Ia(i),await e()}}var Dr=e((()=>{p(),O(),G(),It()}));function Or(){return{error:(e,...t)=>console.error(`[SDK ERROR]`,e,...t),warn:(e,...t)=>console.error(`[SDK WARN]`,e,...t),info:(e,...t)=>console.error(`[SDK INFO]`,e,...t),debug:(e,...t)=>console.error(`[SDK DEBUG]`,e,...t)}}async function kr({apiKey:e,maxRetries:n,model:r,fetchOverride:i,source:a}){let o=process.env.CLAUDE_CODE_CONTAINER_ID,c=process.env.CLAUDE_CODE_REMOTE_SESSION_ID,l=process.env.CLAUDE_AGENT_SDK_CLIENT_APP,te=jr(),d={"x-app":`cli`,"User-Agent":Cr(),"X-Claude-Code-Session-Id":be(),...te,...o?{"x-claude-remote-container-id":o}:{},...c?{"x-claude-remote-session-id":c}:{},...l?{"x-client-app":l}:{},...process.env.ANTHROPIC_AUTH_NONCE?{"x-auth-nonce":process.env.ANTHROPIC_AUTH_NONCE}:{}};_(`[API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: ${!!process.env.ANTHROPIC_CUSTOM_HEADERS}, has Authorization header: ${!!te.Authorization}`),s(process.env.CLAUDE_CODE_ADDITIONAL_PROTECTION)&&(d[`x-anthropic-additional-protection`]=`true`),_(`[API:auth] OAuth token check starting`),await za(),_(`[API:auth] OAuth token check complete`),R()||await Ar(d,h());let f=Mr(i,a),p={defaultHeaders:d,maxRetries:n,timeout:parseInt(process.env.API_TIMEOUT_MS||`600000`,10),dangerouslyAllowBrowser:!0,fetchOptions:mt({forAnthropicAPI:!0}),...f&&{fetch:f}};if(s(process.env.CLAUDE_CODE_USE_BEDROCK)){let{BedrockClient:e}=await import(`./bedrockClient-DxE_mHFI.js`),t=r===Ns()&&process.env.ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION?process.env.ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION:u(),n={...p,awsRegion:t,...s(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&{skipAuth:!0},...Fe()&&{logger:Or()}};if(process.env.AWS_BEARER_TOKEN_BEDROCK)n.skipAuth=!0,n.defaultHeaders={...n.defaultHeaders,Authorization:`Bearer ${process.env.AWS_BEARER_TOKEN_BEDROCK}`};else if(!s(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)){let e=await U();e&&(n.awsAccessKey=e.accessKeyId,n.awsSecretKey=e.secretAccessKey,n.awsSessionToken=e.sessionToken)}return new e(n)}if(s(process.env.CLAUDE_CODE_USE_FOUNDRY)){let{AnthropicFoundry:e}=await import(`./foundry-sdk-BdeF2aBu.js`),t;if(!process.env.ANTHROPIC_FOUNDRY_API_KEY)if(s(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH))t=()=>Promise.resolve(``);else{let{DefaultAzureCredential:e,getBearerTokenProvider:n}=await import(`./esm-CGx9qY3q.js`);t=n(new e,`https://cognitiveservices.azure.com/.default`)}return new e({...p,...t&&{azureADTokenProvider:t},...Fe()&&{logger:Or()}})}if(s(process.env.CLAUDE_CODE_USE_VERTEX)){s(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)||await mo();let[{AnthropicVertex:e},{GoogleAuth:n}]=await Promise.all([import(`./vertex-sdk-DjXcZ2J7.js`),import(`./src-CiJCsqUl.js`).then(e=>t(e.default,1))]),i=process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project,a=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials,o=s(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)?{getClient:()=>({getRequestHeaders:()=>({})})}:new n({scopes:[`https://www.googleapis.com/auth/cloud-platform`],...i||a?{}:{projectId:process.env.ANTHROPIC_VERTEX_PROJECT_ID}});return new e({...p,region:ee(r),googleAuth:o,...Fe()&&{logger:Or()}})}return new ke({apiKey:R()?null:e||ea(),authToken:R()?W()?.accessToken:void 0,...p,...Fe()&&{logger:Or()}})}async function Ar(e,t){let n=process.env.ANTHROPIC_AUTH_TOKEN||await ua(t);n&&(e.Authorization=`Bearer ${n}`)}function jr(){let e={},t=process.env.ANTHROPIC_CUSTOM_HEADERS;if(!t)return e;let n=t.split(/\n|\r\n/);for(let t of n){if(!t.trim())continue;let n=t.indexOf(`:`);if(n===-1)continue;let r=t.slice(0,n).trim(),i=t.slice(n+1).trim();r&&(e[r]=i)}return e}function Mr(e,t){let n=e??globalThis.fetch,r=k()===`firstParty`&&Mt();return(e,i)=>{let a=new Headers(i?.headers);r&&!a.has(`x-client-request-id`)&&a.set(Nr,wt());try{let n=e instanceof Request?e.url:String(e),r=a.get(Nr);_(`[API REQUEST] ${new URL(n).pathname}${r?` ${Nr}=${r}`:``} source=${t??`unknown`}`)}catch{}return n(e,{...i,headers:a})}}var Nr,Pr=e((()=>{Ne(),G(),Dr(),$(),A(),gt(),m(),v(),c(),Nr=`x-client-request-id`}));function Fr(){return vt(o(),`cache`)}function Ir(){return vt(Fr(),`model-capabilities.json`)}function Lr(){return!(k()!==`firstParty`||!Mt())}function Rr(e){return[...e].sort((e,t)=>t.id.length-e.id.length||e.id.localeCompare(t.id))}function zr(e){if(!Lr())return;let t=Ur(Ir());if(!t||t.length===0)return;let n=e.toLowerCase();return t.find(e=>e.id.toLowerCase()===n)||t.find(e=>n.includes(e.id.toLowerCase()))}async function Br(){if(Lr()&&!$e())try{let e=await kr({maxRetries:1}),t=R()?[ct]:void 0,n=[];for await(let r of e.models.list({betas:t})){let e=Vr().safeParse(r);e.success&&n.push(e.data)}if(n.length===0)return;let r=Ir(),i=Rr(n);if(xr(Ur(r),i)){_(`[modelCapabilities] cache unchanged, skipping write`);return}await Tt(Fr(),{recursive:!0}),await Dt(r,De({models:i,timestamp:Date.now()}),{encoding:`utf-8`,mode:384}),Ur.cache.delete(r),_(`[modelCapabilities] cached ${i.length} models`)}catch(e){_(`[modelCapabilities] fetch failed: ${e instanceof Error?e.message:`unknown`}`)}}var Vr,Hr,Ur,Wr=e((()=>{Sr(),i(),le(),O(),Pr(),G(),v(),c(),rt(),ue(),Qe(),Re(),A(),Vr=ce(()=>se({id:ie(),max_input_tokens:ae().optional(),max_tokens:ae().optional()}).strip()),Hr=ce(()=>se({models:oe(Vr()),timestamp:ae()})),Ur=r(e=>{try{let t=xt(e,`utf-8`),n=Hr().safeParse(it(t,!1));return n.success?n.data.models:null}catch{return null}},e=>e)}));function Gr(){return s(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)}function F(e){return!Gr()&&/\[1m\]/i.test(e)}function Kr(e){if(Gr())return!1;let t=Z(e);return t.includes(`claude-sonnet-4`)||t.includes(`opus-4-6`)||t.includes(`opus-4-7`)}function qr(e,t){if(F(e))return 1e6;let n=zr(e);return n?.max_input_tokens&&n.max_input_tokens>=1e5?n.max_input_tokens>2e5&&Gr()?Qr:n.max_input_tokens:t?.includes(`context-1m-2025-08-07`)&&Kr(e)||Jr(e)?1e6:Qr}function Jr(e){return Gr()||F(e)||!Z(e).includes(`sonnet-4-6`)?!1:S().clientDataCache?.coral_reef_sonnet===`true`}function Yr(e,t){if(!e)return{used:null,remaining:null};let n=e.input_tokens+e.cache_creation_input_tokens+e.cache_read_input_tokens;if(n===0)return{used:null,remaining:null};let r=Math.round(n/t*100),i=Math.min(100,Math.max(0,r));return{used:i,remaining:100-i}}function Xr(e){let t,n,r=Z(e);r.includes(`opus-4-7`)||r.includes(`opus-4-6`)?(t=64e3,n=128e3):r.includes(`sonnet-4-6`)?(t=32e3,n=128e3):r.includes(`opus-4-5`)||r.includes(`sonnet-4`)||r.includes(`haiku-4`)?(t=32e3,n=64e3):r.includes(`opus-4-1`)||r.includes(`opus-4`)?(t=32e3,n=32e3):r.includes(`claude-3-opus`)?(t=4096,n=4096):r.includes(`claude-3-sonnet`)?(t=8192,n=8192):r.includes(`claude-3-haiku`)?(t=4096,n=4096):r.includes(`3-5-sonnet`)||r.includes(`3-5-haiku`)?(t=8192,n=8192):r.includes(`3-7-sonnet`)?(t=32e3,n=64e3):(t=ei,n=ti);let i=zr(e);return i?.max_tokens&&i.max_tokens>=4096&&(n=i.max_tokens,t=Math.min(t,n)),{default:t,upperLimit:n}}function Zr(e){return Xr(e).upperLimit-1}var Qr,$r,ei,ti,ni,ri=e((()=>{br(),We(),c(),$(),Wr(),Qr=2e5,$r=2e4,ei=32e3,ti=64e3,ni=8e3})),ii,ai,oi,si=e((()=>{i(),A(),ii=[{modelEnvVar:`ANTHROPIC_DEFAULT_OPUS_MODEL`,capabilitiesEnvVar:`ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES`},{modelEnvVar:`ANTHROPIC_DEFAULT_SONNET_MODEL`,capabilitiesEnvVar:`ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES`},{modelEnvVar:`ANTHROPIC_DEFAULT_HAIKU_MODEL`,capabilitiesEnvVar:`ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES`}],ai=[{modelEnvVar:`OPENAI_DEFAULT_OPUS_MODEL`,capabilitiesEnvVar:`OPENAI_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES`},{modelEnvVar:`OPENAI_DEFAULT_SONNET_MODEL`,capabilitiesEnvVar:`OPENAI_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES`},{modelEnvVar:`OPENAI_DEFAULT_HAIKU_MODEL`,capabilitiesEnvVar:`OPENAI_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES`}],oi=r((e,t)=>{if(k()===`firstParty`)return;let n=e.toLowerCase(),r=k()===`openai`?ai:ii;for(let e of r){let r=process.env[e.modelEnvVar],i=process.env[e.capabilitiesEnvVar];if(!(!r||i===void 0)&&n===r.toLowerCase())return i.toLowerCase().split(`,`).map(e=>e.trim()).includes(t)}},(e,t)=>`${e.toLowerCase()}:${t}`)}));function ci(e){let t=[],n=[];for(let r of e)vi.includes(r)?t.push(r):n.push(r);return{allowed:t,disallowed:n}}function li(e){if(!e||e.length===0)return;if(R()){console.warn(`Warning: Custom betas are only available for API key users. Ignoring provided betas.`);return}let{allowed:t,disallowed:n}=ci(e);for(let e of n)console.warn(`Warning: Beta header '${e}' is not allowed. Only the following betas are supported: ${vi.join(`, `)}`);return t.length>0?t:void 0}function ui(e){let t=oi(e,`interleaved_thinking`);if(t!==void 0)return t;let n=Z(e),r=k();return r===`foundry`?!0:r===`firstParty`?!n.includes(`claude-3-`):n.includes(`claude-opus-4`)||n.includes(`claude-sonnet-4`)}function di(e){let t=Z(e),n=k();return n===`foundry`?!0:n===`firstParty`?!t.includes(`claude-3-`):t.includes(`claude-opus-4`)||t.includes(`claude-sonnet-4`)||t.includes(`claude-haiku-4`)}function fi(e){let t=Z(e),n=k();return n!==`firstParty`&&n!==`foundry`?!1:t.includes(`claude-sonnet-4-6`)||t.includes(`claude-sonnet-4-5`)||t.includes(`claude-opus-4-1`)||t.includes(`claude-opus-4-5`)||t.includes(`claude-opus-4-6`)||t.includes(`claude-opus-4-7`)||t.includes(`claude-haiku-4-5`)}function pi(e){return!0}function mi(){return(k()===`firstParty`||k()===`foundry`)&&!s(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)&&Mt()}function hi(){return k()===`firstParty`&&!s(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function gi(e,t){let n=[...bi(e)];t?.isAgenticQuery&&(n.includes(`claude-code-20250219`)||n.push(sr));let r=ve();return!r||r.length===0?n:[...n,...r.filter(e=>!n.includes(e))]}function _i(){yi.cache?.clear?.(),bi.cache?.clear?.(),xi.cache?.clear?.()}var vi,yi,bi,xi,Si=e((()=>{i(),m(),br(),O(),G(),ri(),c(),$(),si(),A(),x(),vi=[lr],yi=r(e=>{let t=[],n=Z(e).includes(`haiku`);k();let r=mi();n||t.push(sr),R()&&t.push(ct),F(e)&&t.push(lr),!s(process.env.DISABLE_INTERLEAVED_THINKING)&&ui(e)&&t.push(cr),r&&ui(e)&&!h()&&Be().showThinkingSummaries!==!0&&t.push(gr);let i=s(process.env.USE_API_CONTEXT_MANAGEMENT)||di(e),a=di(e);return mi()&&(i||a)&&t.push(ur),r&&fi(e),r&&t.push(mr),process.env.ANTHROPIC_BETAS&&t.push(...process.env.ANTHROPIC_BETAS.split(`,`).map(e=>e.trim()).filter(Boolean)),t}),bi=r(e=>{let t=yi(e);return k()===`bedrock`?t.filter(e=>!vr.has(e)):t}),xi=r(e=>yi(e).filter(e=>vr.has(e)))}));function Ci(e,t){return{name:`${e.name}-with-${t.name}-fallback`,read(){return e.read()??(t.read()||{})},async readAsync(){return await e.readAsync()??(await t.readAsync()||{})},update(n){let r=e.read(),i=e.update(n);if(i.success)return r===null&&t.delete(),i;let a=t.update(n);return a.success?(r!==null&&e.delete(),{success:!0,warning:a.warning}):{success:!1}},delete(){let n=e.delete(),r=t.delete();return n||r}}}var wi=e((()=>{}));async function Ti(){try{let e=M(Yn),{stdout:t,code:n}=await Ze(`security`,[`find-generic-password`,`-a`,qn(),`-w`,`-s`,e],{useCwd:!1,preserveOutputOnError:!1});if(n===0&&t)return je(t.trim())}catch{}return null}function Ei(){if(ki!==void 0)return ki;if(process.platform!==`darwin`)return ki=!1,!1;try{ki=Xe(`security`,[`show-keychain-info`],{reject:!1,stdio:[`ignore`,`pipe`,`pipe`]}).exitCode===36}catch{ki=!1}return ki}var Di,Oi,ki,Ai=e((()=>{Ke(),v(),Ye(),Ge(),Re(),Xn(),Di=4032,Oi={name:`keychain`,read(){let e=P.cache;if(Date.now()-e.cachedAt<3e4)return e.data;try{let e=M(Yn),t=qe(`security find-generic-password -a "${qn()}" -w -s "${e}"`);if(t){let e=je(t);return P.cache={data:e,cachedAt:Date.now()},e}}catch{}return e.data===null?(P.cache={data:null,cachedAt:Date.now()},null):(_(`[keychain] read failed; serving stale cache`,{level:`warn`}),P.cache={data:e.data,cachedAt:Date.now()},e.data)},async readAsync(){let e=P.cache;if(Date.now()-e.cachedAt<3e4)return e.data;if(P.readInFlight)return P.readInFlight;let t=P.generation,n=Ti().then(n=>{if(t===P.generation){n===null&&e.data!==null&&_(`[keychain] readAsync failed; serving stale cache`,{level:`warn`});let t=n??e.data;return P.cache={data:t,cachedAt:Date.now()},P.readInFlight=null,t}return n});return P.readInFlight=n,n},update(e){N();try{let t=M(Yn),n=qn(),r=De(e),i=Buffer.from(r,`utf-8`).toString(`hex`),a=`add-generic-password -U -a "${n}" -s "${t}" -X "${i}"\n`,o;return a.length<=Di?o=Xe(`security`,[`-i`],{input:a,stdio:[`pipe`,`pipe`,`pipe`],reject:!1}):(_(`Keychain payload (${r.length}B JSON) exceeds security -i stdin limit; using argv`,{level:`warn`}),o=Xe(`security`,[`add-generic-password`,`-U`,`-a`,n,`-s`,t,`-X`,i],{stdio:[`ignore`,`pipe`,`pipe`],reject:!1})),o.exitCode===0?(P.cache={data:e,cachedAt:Date.now()},{success:!0}):{success:!1}}catch{return{success:!1}}},delete(){N();try{let e=M(Yn);return qe(`security delete-generic-password -a "${qn()}" -s "${e}"`),!0}catch{return!1}}}}));function ji(){let e=o();return{storageDir:e,storagePath:vt(e,`.credentials.json`)}}var Mi,Ni=e((()=>{c(),Ae(),Pe(),Re(),Mi={name:`plaintext`,read(){let{storagePath:e}=ji();try{return je(Le().readFileSync(e,{encoding:`utf8`}))}catch{return null}},async readAsync(){let{storagePath:e}=ji();try{return je(await Le().readFile(e,{encoding:`utf8`}))}catch{return null}},update(e){try{let{storageDir:t,storagePath:n}=ji();try{Le().mkdirSync(t)}catch(e){if(Oe(e)!==`EEXIST`)throw e}return Me(n,De(e),{encoding:`utf8`,flush:!1}),yt(n,384),{success:!0,warning:`Warning: Storing credentials in plaintext.`}}catch{return{success:!1}}},delete(){let{storagePath:e}=ji();try{return Le().unlinkSync(e),!0}catch(e){return Oe(e)===`ENOENT`}}}}));function Pi(){return process.platform===`darwin`?Ci(Oi,Mi):Mi}var Fi=e((()=>{wi(),Ai(),Ni()}));function Ii(e){return new Promise(t=>{kt(`security`,[`find-generic-password`,`-a`,qn(),`-w`,`-s`,e],{encoding:`utf-8`,timeout:Vi},(e,n)=>{t({stdout:e?null:n?.trim()||null,timedOut:!!(e&&`killed`in e&&e.killed)})})})}function Li(){if(process.platform!==`darwin`||Ui||l())return;let e=Ii(M(Yn)),t=Ii(M());Ui=Promise.all([e,t]).then(([e,t])=>{e.timedOut||Jn(e.stdout),t.timedOut||(Hi={stdout:t.stdout})})}async function Ri(){Ui&&await Ui}function zi(){return Hi}function Bi(){Hi=null}var Vi,Hi,Ui,Wi=e((()=>{c(),Xn(),Vi=1e4,Hi=null,Ui=null}));function Gi(e,t,n){return new Promise((r,i)=>{if(t?.aborted){n?.throwOnAbort||n?.abortError?i(n.abortError?.()??Error(`aborted`)):r();return}let a=setTimeout((e,t,n)=>{e?.removeEventListener(`abort`,t),n()},e,t,o,r);function o(){clearTimeout(a),n?.throwOnAbort||n?.abortError?i(n.abortError?.()??Error(`aborted`)):r()}t?.addEventListener(`abort`,o,{once:!0}),n?.unref&&a.unref()})}var Ki=e((()=>{}));function qi(){return Yi}function Ji(){Yi.clear()}var Yi,Xi=e((()=>{Yi=new Map})),Zi=n({calculateApiKeyHelperTTL:()=>ca,checkAndRefreshOAuthTokenIfNeeded:()=>za,checkGcpCredentialsValid:()=>Sa,clearApiKeyHelperCache:()=>ma,clearAwsCredentialsCache:()=>ya,clearGcpCredentialsCache:()=>Ta,clearOAuthTokenCache:()=>Pa,getAccountInformation:()=>ao,getAnthropicApiKey:()=>ea,getAnthropicApiKeyWithSource:()=>na,getApiKeyFromApiKeyHelper:()=>ua,getApiKeyFromApiKeyHelperCached:()=>pa,getApiKeyFromConfigOrMacOSKeychain:()=>ho,getApiKeyHelperElapsedMs:()=>la,getAuthTokenSource:()=>$i,getClaudeAIOAuthTokens:()=>W,getClaudeAIOAuthTokensAsync:()=>Ra,getConfiguredApiKeyHelper:()=>L,getOauthAccountInfo:()=>Ua,getOtelHeadersFromHelper:()=>no,getRateLimitTier:()=>Za,getSubscriptionName:()=>Qa,getSubscriptionType:()=>z,handleOAuth401Error:()=>Ia,hasAnthropicApiKeyAuth:()=>ta,hasOpusAccess:()=>Ga,hasProfileScope:()=>Va,is1PApiCustomer:()=>Ha,isAnthropicAuthEnabled:()=>I,isAwsAuthRefreshFromProjectSettings:()=>aa,isAwsCredentialExportFromProjectSettings:()=>sa,isClaudeAISubscriber:()=>R,isConsumerSubscriber:()=>io,isCustomApiKeyApproved:()=>Aa,isEnterpriseSubscriber:()=>Ya,isGcpAuthRefreshFromProjectSettings:()=>xa,isMaxSubscriber:()=>Ka,isOtelHeadersHelperFromProjectOrLocalSettings:()=>to,isOverageProvisioningAllowed:()=>Wa,isProSubscriber:()=>Xa,isTeamPremiumSubscriber:()=>Ja,isTeamSubscriber:()=>qa,isUsing3PServices:()=>$a,prefetchApiKeyFromApiKeyHelperIfSafe:()=>ha,prefetchAwsCredentialsAndBedRockInfoIfSafe:()=>Da,prefetchGcpCredentialsIfSafe:()=>Ea,refreshAndGetAwsCredentials:()=>U,refreshAwsAuth:()=>_a,refreshGcpAuth:()=>wa,refreshGcpCredentialsIfNeeded:()=>mo,removeApiKey:()=>ja,saveApiKey:()=>ka,saveOAuthTokensIfNeeded:()=>Na,validateForceLoginOrg:()=>oo});function Qi(){return s(process.env.CLAUDE_CODE_REMOTE)||process.env.CLAUDE_CODE_ENTRYPOINT===`claude-desktop`}function I(){if(l())return!1;if(process.env.ANTHROPIC_UNIX_SOCKET)return!!process.env.CLAUDE_CODE_OAUTH_TOKEN;let e=b()||{},t=s(process.env.CLAUDE_CODE_USE_BEDROCK)||s(process.env.CLAUDE_CODE_USE_VERTEX)||s(process.env.CLAUDE_CODE_USE_FOUNDRY)||e.modelType===`openai`||e.modelType===`gemini`||!!process.env.OPENAI_BASE_URL||!!process.env.GEMINI_BASE_URL,n=e.apiKeyHelper,r=process.env.ANTHROPIC_AUTH_TOKEN||n||process.env.CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR,{source:i}=na({skipRetrievingKeyFromApiKeyHelper:!0}),a=i===`ANTHROPIC_API_KEY`||i===`apiKeyHelper`;return!(t||r&&!Qi()||a&&!Qi())}function $i(){if(l())return L()?{source:`apiKeyHelper`,hasToken:!0}:{source:`none`,hasToken:!1};if(process.env.ANTHROPIC_AUTH_TOKEN&&!Qi())return{source:`ANTHROPIC_AUTH_TOKEN`,hasToken:!0};if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{source:`CLAUDE_CODE_OAUTH_TOKEN`,hasToken:!0};if(Bn())return process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR?{source:`CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`,hasToken:!0}:{source:`CCR_OAUTH_TOKEN_FILE`,hasToken:!0};if(L()&&!Qi())return{source:`apiKeyHelper`,hasToken:!0};let e=W();return wn(e?.scopes)&&e?.accessToken?{source:`claude.ai`,hasToken:!0}:{source:`none`,hasToken:!1}}function ea(){let{key:e}=na();return e}function ta(){let{key:e,source:t}=na({skipRetrievingKeyFromApiKeyHelper:!0});return e!==null&&t!==`none`}function na(e={}){if(l())return process.env.ANTHROPIC_API_KEY?{key:process.env.ANTHROPIC_API_KEY,source:`ANTHROPIC_API_KEY`}:L()?{key:e.skipRetrievingKeyFromApiKeyHelper?null:pa(),source:`apiKeyHelper`}:{key:null,source:`none`};let t=a()?void 0:process.env.ANTHROPIC_API_KEY;if(_e()&&t)return{key:t,source:`ANTHROPIC_API_KEY`};if(s(process.env.CI)){let e=Vn();if(e)return{key:e,source:`ANTHROPIC_API_KEY`};if(!t&&!process.env.CLAUDE_CODE_OAUTH_TOKEN&&!process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error(`ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN env var is required`);return t?{key:t,source:`ANTHROPIC_API_KEY`}:{key:null,source:`none`}}if(t&&S().customApiKeyResponses?.approved?.includes(Qn(t)))return{key:t,source:`ANTHROPIC_API_KEY`};let n=Vn();return n?{key:n,source:`ANTHROPIC_API_KEY`}:L()?e.skipRetrievingKeyFromApiKeyHelper?{key:null,source:`apiKeyHelper`}:{key:pa(),source:`apiKeyHelper`}:ho()||{key:null,source:`none`}}function L(){return l()?y(`flagSettings`)?.apiKeyHelper:(b()||{}).apiKeyHelper}function ra(){let e=L();if(!e)return!1;let t=y(`projectSettings`),n=y(`localSettings`);return t?.apiKeyHelper===e||n?.apiKeyHelper===e}function ia(){return(b()||{}).awsAuthRefresh}function aa(){let e=ia();if(!e)return!1;let t=y(`projectSettings`),n=y(`localSettings`);return t?.awsAuthRefresh===e||n?.awsAuthRefresh===e}function oa(){return(b()||{}).awsCredentialExport}function sa(){let e=oa();if(!e)return!1;let t=y(`projectSettings`),n=y(`localSettings`);return t?.awsCredentialExport===e||n?.awsCredentialExport===e}function ca(){let e=process.env.CLAUDE_CODE_API_KEY_HELPER_TTL_MS;if(e){let t=parseInt(e,10);if(!Number.isNaN(t)&&t>=0)return t;_(`Found CLAUDE_CODE_API_KEY_HELPER_TTL_MS env var, but it was not a valid number. Got ${e}`,{level:`error`})}return so}function la(){let e=V?.startedAt;return e?Date.now()-e:0}async function ua(e){if(!L())return null;let t=ca();return B?(Date.now()-B.timestamp<t||V||(V={promise:da(e,!1,H),startedAt:null}),B.value):(V||(V={promise:da(e,!0,H),startedAt:Date.now()}),V.promise)}async function da(e,t,n){try{let t=await fa(e);return n===H&&t!==null&&(B={value:t,timestamp:Date.now()}),t}catch(e){if(n!==H)return` `;let r=e instanceof Error?e.message:String(e);return console.error(ne.red(`apiKeyHelper failed: ${r}`)),_(`Error getting API key from apiKeyHelper: ${r}`,{level:`error`}),!t&&B&&B.value!==` `?(B={...B,timestamp:Date.now()},B.value):(B={value:` `,timestamp:Date.now()},` `)}finally{n===H&&(V=null)}}async function fa(e){let t=L();if(!t)return null;if(ra()&&!C()&&!e)return Ie(`apiKeyHelper invoked before trust check`,Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in .`)),E(`tengu_apiKeyHelper_missing_trust11`,{}),null;let n=await Je(t,{shell:!0,timeout:600*1e3,reject:!1});if(n.failed){let e=n.timedOut?`timed out`:`exited ${n.exitCode}`,t=n.stderr?.trim();throw Error(t?`${e}: ${t}`:e)}let r=n.stdout?.trim();if(!r)throw Error(`did not return a value`);return r}function pa(){return B?.value??null}function ma(){H++,B=null,V=null}function ha(e){ra()&&!C()||ua(e)}async function ga(){let e=ia();if(!e)return!1;if(aa()&&!C()&&!h())return Ie(`awsAuthRefresh invoked before trust check`,Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in .`)),E(`tengu_awsAuthRefresh_missing_trust`,{}),!1;try{return _(`Fetching AWS caller identity for AWS auth refresh command`),await nr(),_(`Fetched AWS caller identity, skipping AWS auth refresh command`),!1}catch{return _a(e)}}function _a(e){_(`Running AWS auth refresh command`);let t=ar.getInstance();return t.startAuthentication(),new Promise(n=>{let r=Ot(e,{timeout:lo});r.stdout.on(`data`,e=>{let n=e.toString().trim();n&&(t.addOutput(n),_(n,{level:`debug`}))}),r.stderr.on(`data`,e=>{let n=e.toString().trim();n&&(t.setError(n),_(n,{level:`error`}))}),r.on(`close`,(e,r)=>{if(e===0)_(`AWS auth refresh completed successfully`),t.endAuthentication(!0),n(!0);else{let e=r===`SIGTERM`?ne.red(`AWS auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal.`):ne.red(`Error running awsAuthRefresh (in settings or ~/.workmate.json):`);console.error(e),t.endAuthentication(!1),n(!1)}})})}async function va(){let e=oa();if(!e)return null;if(sa()&&!C()&&!h())return Ie(`awsCredentialExport invoked before trust check`,Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in .`)),E(`tengu_awsCredentialExport_missing_trust`,{}),null;try{return _(`Fetching AWS caller identity for credential export command`),await nr(),_(`Fetched AWS caller identity, skipping AWS credential export command`),null}catch{try{_(`Running AWS credential export command`);let t=await Je(e,{shell:!0,reject:!1});if(t.exitCode!==0||!t.stdout)throw Error(`awsCredentialExport did not return a valid value`);let n=je(t.stdout.trim());if(!tr(n))throw Error(`awsCredentialExport did not return valid AWS STS output structure`);return _(`AWS credentials retrieved from awsCredentialExport`),{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken}}catch(e){let t=ne.red(`Error getting AWS credentials from awsCredentialExport (in settings or ~/.workmate.json):`);return e instanceof Error?console.error(t,e.message):console.error(t,e),null}}}function ya(){U.cache.clear()}function ba(){return(b()||{}).gcpAuthRefresh}function xa(){let e=ba();if(!e)return!1;let t=y(`projectSettings`),n=y(`localSettings`);return t?.gcpAuthRefresh===e||n?.gcpAuthRefresh===e}async function Sa(){try{let{GoogleAuth:e}=await import(`./src-CiJCsqUl.js`).then(e=>t(e.default,1)),n=new e({scopes:[`https://www.googleapis.com/auth/cloud-platform`]}),r=(async()=>{await(await n.getClient()).getAccessToken()})(),i=Gi(uo).then(()=>{throw new So(`GCP credentials check timed out`)});return await Promise.race([r,i]),!0}catch{return!1}}async function Ca(){let e=ba();if(!e)return!1;if(xa()&&!C()&&!h())return Ie(`gcpAuthRefresh invoked before trust check`,Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in .`)),E(`tengu_gcpAuthRefresh_missing_trust`,{}),!1;try{if(_(`Checking GCP credentials validity for auth refresh`),await Sa())return _(`GCP credentials are valid, skipping auth refresh command`),!1}catch{}return wa(e)}function wa(e){_(`Running GCP auth refresh command`);let t=ar.getInstance();return t.startAuthentication(),new Promise(n=>{let r=Ot(e,{timeout:po});r.stdout.on(`data`,e=>{let n=e.toString().trim();n&&(t.addOutput(n),_(n,{level:`debug`}))}),r.stderr.on(`data`,e=>{let n=e.toString().trim();n&&(t.setError(n),_(n,{level:`error`}))}),r.on(`close`,(e,r)=>{if(e===0)_(`GCP auth refresh completed successfully`),t.endAuthentication(!0),n(!0);else{let e=r===`SIGTERM`?ne.red(`GCP auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal.`):ne.red(`Error running gcpAuthRefresh (in settings or ~/.workmate.json):`);console.error(e),t.endAuthentication(!1),n(!1)}})})}function Ta(){mo.cache.clear()}function Ea(){ba()&&(xa()&&!C()&&!h()||mo())}function Da(){let e=ia(),t=oa();!e&&!t||(aa()||sa())&&!C()&&!h()||(U(),j())}function Oa(e){return/^[a-zA-Z0-9-_]+$/.test(e)}async function ka(e){if(!Oa(e))throw Error(`Invalid API key format. API key must contain only alphanumeric characters, dashes, and underscores.`);await Ma();let t=!1;if(process.platform===`darwin`)try{let n=M();await Je(`security`,[`-i`],{input:`add-generic-password -U -a "${qn()}" -s "${n}" -X "${Buffer.from(e,`utf-8`).toString(`hex`)}"\n`,reject:!1}),E(`tengu_api_key_saved_to_keychain`,{}),t=!0}catch(e){T(e),E(`tengu_api_key_keychain_error`,{error:g(e)}),E(`tengu_api_key_saved_to_config`,{})}else E(`tengu_api_key_saved_to_config`,{});let n=Qn(e);w(r=>{let i=r.customApiKeyResponses?.approved??[];return{...r,primaryApiKey:t?r.primaryApiKey:e,customApiKeyResponses:{...r.customApiKeyResponses,approved:i.includes(n)?i:[...i,n],rejected:r.customApiKeyResponses?.rejected??[]}}}),ho.cache.clear?.(),Bi()}function Aa(e){let t=S(),n=Qn(e);return t.customApiKeyResponses?.approved?.includes(n)??!1}async function ja(){await Ma(),w(e=>({...e,primaryApiKey:void 0})),ho.cache.clear?.(),Bi()}async function Ma(){try{await Zn()}catch(e){T(e)}}function Na(e){if(!wn(e.scopes))return E(`tengu_oauth_tokens_not_claude_ai`,{}),{success:!0};if(!e.refreshToken||!e.expiresAt)return E(`tengu_oauth_tokens_inference_only`,{}),{success:!0};let t=Pi(),n=t.name;try{let r=t.read()||{},i=r.claudeAiOauth;r.claudeAiOauth={accessToken:e.accessToken,refreshToken:e.refreshToken,expiresAt:e.expiresAt,scopes:e.scopes,subscriptionType:e.subscriptionType??i?.subscriptionType??null,rateLimitTier:e.rateLimitTier??i?.rateLimitTier??null};let a=t.update(r);return a.success?E(`tengu_oauth_tokens_saved`,{storageBackend:n}):E(`tengu_oauth_tokens_save_failed`,{storageBackend:n}),W.cache?.clear?.(),_i(),Ji(),a}catch(e){return T(e),E(`tengu_oauth_tokens_save_exception`,{storageBackend:n,error:g(e)}),{success:!1,warning:`Failed to save OAuth tokens`}}}function Pa(){W.cache?.clear?.(),N()}async function Fa(){try{let{mtimeMs:e}=await Et(vt(o(),`.credentials.json`));e!==go&&(go=e,Pa())}catch{W.cache?.clear?.()}}function Ia(e){let t=_o.get(e);if(t)return t;let n=La(e).finally(()=>{_o.delete(e)});return _o.set(e,n),n}async function La(e){Pa();let t=await Ra();return t?.refreshToken?t.accessToken===e?za(0,!0):(E(`tengu_oauth_401_recovered_from_keychain`,{}),!0):!1}async function Ra(){if(l())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN||Bn())return W();try{let e=(await Pi().readAsync())?.claudeAiOauth;return e?.accessToken?e:null}catch(e){return T(e),null}}function za(e=0,t=!1){return e===0&&!t?vo||(vo=Ba(e,t).finally(()=>{vo=null}),vo):Ba(e,t)}async function Ba(e,t){await Fa();let n=W();if(!t&&(!n?.refreshToken||!jn(n.expiresAt))||!n?.refreshToken||!wn(n.scopes))return!1;W.cache?.clear?.(),N();let r=await Ra();if(!r?.refreshToken||!jn(r.expiresAt))return!1;let i=o();await Tt(i,{recursive:!0});let a;try{E(`tengu_oauth_token_refresh_lock_acquiring`,{}),a=await He(i),E(`tengu_oauth_token_refresh_lock_acquired`,{})}catch(n){return n.code===`ELOCKED`?e<5?(E(`tengu_oauth_token_refresh_lock_retry`,{retryCount:e+1}),await Gi(1e3+Math.random()*1e3),Ba(e+1,t)):(E(`tengu_oauth_token_refresh_lock_retry_limit_reached`,{maxRetries:5}),!1):(T(n),E(`tengu_oauth_token_refresh_lock_error`,{error:g(n)}),!1)}try{W.cache?.clear?.(),N();let e=await Ra();return!e?.refreshToken||!jn(e.expiresAt)?(E(`tengu_oauth_token_refresh_race_resolved`,{}),!1):(E(`tengu_oauth_token_refresh_starting`,{}),Na(await On(e.refreshToken,{scopes:wn(e.scopes)?void 0:e.scopes})),W.cache?.clear?.(),N(),!0)}catch(e){T(e),W.cache?.clear?.(),N();let t=await Ra();return t&&!jn(t.expiresAt)?(E(`tengu_oauth_token_refresh_race_recovered`,{}),!0):!1}finally{E(`tengu_oauth_token_refresh_lock_releasing`,{}),await a(),E(`tengu_oauth_token_refresh_lock_released`,{})}}function R(){return I()?wn(W()?.scopes):!1}function Va(){return W()?.scopes?.includes(`user:profile`)??!1}function Ha(){return!(s(process.env.CLAUDE_CODE_USE_BEDROCK)||s(process.env.CLAUDE_CODE_USE_VERTEX)||s(process.env.CLAUDE_CODE_USE_FOUNDRY)||R())}function Ua(){return I()?S().oauthAccount:void 0}function Wa(){let e=Ua()?.billingType;return!(!R()||!e||e!==`stripe_subscription`&&e!==`stripe_subscription_contracted`&&e!==`apple_subscription`&&e!==`google_play_subscription`)}function Ga(){let e=z();return e===`max`||e===`enterprise`||e===`team`||e===`pro`||e===null}function z(){if(!I())return null;let e=W();return e?e.subscriptionType??null:null}function Ka(){return z()===`max`}function qa(){return z()===`team`}function Ja(){return z()===`team`&&Za()===`default_claude_max_5x`}function Ya(){return z()===`enterprise`}function Xa(){return z()===`pro`}function Za(){if(!I())return null;let e=W();return e?e.rateLimitTier??null:null}function Qa(){switch(z()){case`enterprise`:return`Claude Enterprise`;case`team`:return`Claude Team`;case`max`:return`Claude Max`;case`pro`:return`Claude Pro`;default:return`Claude API`}}function $a(){return!!(s(process.env.CLAUDE_CODE_USE_BEDROCK)||s(process.env.CLAUDE_CODE_USE_VERTEX)||s(process.env.CLAUDE_CODE_USE_FOUNDRY)||s(process.env.CLAUDE_CODE_USE_OPENAI)||s(process.env.CLAUDE_CODE_USE_GEMINI)||s(process.env.CLAUDE_CODE_USE_GROK))}function eo(){return(b()||{}).otelHeadersHelper}function to(){let e=eo();if(!e)return!1;let t=y(`projectSettings`),n=y(`localSettings`);return t?.otelHeadersHelper===e||n?.otelHeadersHelper===e}function no(){let e=eo();if(!e)return{};let t=parseInt(process.env.CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS||xo.toString(),10);if(yo&&Date.now()-bo<t)return yo;if(to()&&!C())return{};try{let t=qe(e,{timeout:3e4})?.toString().trim();if(!t)throw Error(`otelHeadersHelper did not return a valid value`);let n=je(t);if(typeof n!=`object`||!n||Array.isArray(n))throw Error(`otelHeadersHelper must return a JSON object with string key-value pairs`);for(let[e,t]of Object.entries(n))if(typeof t!=`string`)throw Error(`otelHeadersHelper returned non-string value for key "${e}": ${typeof t}`);return yo=n,bo=Date.now(),yo}catch(e){throw T(Error(`Error getting OpenTelemetry headers from otelHeadersHelper (in settings): ${g(e)}`)),e}}function ro(e){return e===`max`||e===`pro`}function io(){let e=z();return R()&&e!==null&&ro(e)}function ao(){if(k()!==`firstParty`)return;let{source:e}=$i(),t={};e===`CLAUDE_CODE_OAUTH_TOKEN`||e===`CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`?t.tokenSource=e:R()?t.subscription=Qa():t.tokenSource=e;let{key:n,source:r}=na();if(n&&(t.apiKeySource=r),e===`claude.ai`||r===`/login managed key`){let e=Ua()?.organizationName;e&&(t.organization=e)}let i=Ua()?.emailAddress;return(e===`claude.ai`||r===`/login managed key`)&&i&&(t.email=i),t}async function oo(){if(process.env.ANTHROPIC_UNIX_SOCKET||!I())return{valid:!0};let e=y(`policySettings`)?.forceLoginOrgUUID;if(!e)return{valid:!0};await za();let t=W();if(!t)return{valid:!0};let{source:n}=$i(),r=n===`CLAUDE_CODE_OAUTH_TOKEN`||n===`CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`,i=await Sn(t.accessToken);if(!i)return{valid:!1,message:`Unable to verify organization for the current authentication token.\nThis machine requires organization ${e} but the profile could not be fetched.\nThis may be a network error, or the token may lack the user:profile scope required for\nverification.\nTry again, or obtain a full-scope token.`};let a=i.organization.uuid;return a===e?{valid:!0}:r?{valid:!1,message:`The ${n===`CLAUDE_CODE_OAUTH_TOKEN`?`CLAUDE_CODE_OAUTH_TOKEN`:`CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`} environment variable provides a token for a\ndifferent organization than required by this machine's managed settings.\n\nRequired organization: ${e}\nToken organization: ${a}\n\nRemove the environment variable or obtain a token for the correct organization.`}:{valid:!1,message:`Your authentication token belongs to organization ${a},\nbut this machine requires organization ${e}.\n\nAuthentication token belongs to the wrong organization.`}}var so,B,V,H,co,lo,U,uo,fo,po,mo,ho,W,go,_o,vo,yo,bo,xo,So,G=e((()=>{re(),Ke(),i(),O(),at(),bn(),A(),m(),In(),Cn(),Kn(),$n(),ir(),or(),Si(),We(),v(),c(),Ae(),Ye(),Ue(),et(),nt(),Fi(),Wi(),Xn(),x(),Ki(),Re(),Xi(),so=300*1e3,B=null,V=null,H=0,co=3600*1e3,lo=180*1e3,U=tt(async()=>{let e=await ga(),t=await va();return(e||t)&&await rr(),t},co),uo=5e3,fo=3600*1e3,po=180*1e3,mo=tt(async()=>await Ca(),fo),ho=r(()=>{if(l())return null;if(process.platform===`darwin`){let e=zi();if(e){if(e.stdout)return{key:e.stdout,source:`/login managed key`}}else{let e=M();try{let t=qe(`security find-generic-password -a $USER -w -s "${e}"`);if(t)return{key:t,source:`/login managed key`}}catch(e){T(e)}}}let e=S();return e.primaryApiKey?{key:e.primaryApiKey,source:`/login managed key`}:null}),W=r(()=>{if(l())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{accessToken:process.env.CLAUDE_CODE_OAUTH_TOKEN,refreshToken:null,expiresAt:null,scopes:[`user:inference`],subscriptionType:null,rateLimitTier:null};let e=Bn();if(e)return{accessToken:e,refreshToken:null,expiresAt:null,scopes:[`user:inference`],subscriptionType:null,rateLimitTier:null};try{let e=Pi().read()?.claudeAiOauth;return e?.accessToken?e:null}catch(e){return T(e),null}}),go=0,_o=new Map,vo=null,yo=null,bo=0,xo=1740*1e3,So=class extends Error{}}));function K(){return!s(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)}function Co(){return K()?To()===null:!1}function wo(e,t){switch(e){case`free`:return t===`oauth`?`Fast mode requires a paid subscription`:`Fast mode unavailable during evaluation. Please purchase credits.`;case`preference`:return`Fast mode has been disabled by your organization`;case`extra_usage_disabled`:return`Fast mode requires extra usage billing · enable it at claude.ai/settings/usage`;case`network_error`:return`Fast mode unavailable due to network connectivity issues`;case`unknown`:return`Fast mode is currently unavailable`}}function To(){if(!K())return`Fast mode is not available`;if(ut(),h()&&_e()&&!y(`flagSettings`)?.fastMode){let e=`Fast mode is not available in the Agent SDK`;return _(`Fast mode unavailable: ${e}`),e}if(k()!==`firstParty`){let e=`Fast mode is not available on Bedrock, Vertex, or Foundry`;return _(`Fast mode unavailable: ${e}`),e}if(J.status===`disabled`){if((J.reason===`network_error`||J.reason===`unknown`)&&s(process.env.CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS))return null;let e=W()===null?`api-key`:`oauth`,t=wo(J.reason,e);return _(`Fast mode unavailable: ${t}`),t}return null}function Eo(){return`opus${Js()?`[1m]`:``}`}function Do(e){if(!K()||!Co()||!Oo(e))return!1;let t=Be();return!t.fastModePerSessionOptIn&&t.fastMode===!0}function Oo(e){if(!K())return!1;let t=Q(e??Us());return t.toLowerCase().includes(`opus-4-7`)||t.toLowerCase().includes(`opus-4-6`)}function ko(){return q.status===`cooldown`&&Date.now()>=q.resetAt&&(K()&&!Ho&&(_(`Fast mode cooldown expired, re-enabling fast mode`),Ho=!0,Wo.emit()),q={status:`active`}),q}function Ao(e,t){if(!K())return;q={status:`cooldown`,resetAt:e,reason:t},Ho=!1;let n=e-Date.now();_(`Fast mode cooldown triggered (${t}), duration ${Math.round(n/1e3)}s`),E(`tengu_fast_mode_fallback_triggered`,{cooldown_duration_ms:n,cooldown_reason:t}),Uo.emit(e,t)}function jo(){q={status:`active`}}function Mo(){J.status!==`disabled`&&(J={status:`disabled`,reason:`preference`},Ve(`userSettings`,{fastMode:void 0}),w(e=>({...e,penguinModeOrgEnabled:!1})),Yo.emit(!1))}function No(e){switch(e){case`out_of_credits`:return`Fast mode disabled · extra usage credits exhausted`;case`org_level_disabled`:case`org_service_level_disabled`:return`Fast mode disabled · extra usage disabled by your organization`;case`org_level_disabled_until`:return`Fast mode disabled · extra usage spending cap reached`;case`member_level_disabled`:return`Fast mode disabled · extra usage disabled for your account`;case`seat_tier_level_disabled`:case`seat_tier_zero_credit_limit`:case`member_zero_credit_limit`:return`Fast mode disabled · extra usage not available for your plan`;case`overage_not_provisioned`:case`no_limits_configured`:return`Fast mode requires extra usage billing · enable it at claude.ai/settings/usage`;default:return`Fast mode disabled · extra usage not available`}}function Po(e){return e===`org_level_disabled_until`||e===`out_of_credits`}function Fo(e){let t=No(e);_(`Fast mode overage rejection: ${e??`unknown`} — ${t}`),E(`tengu_fast_mode_overage_rejected`,{overage_disabled_reason:e??`unknown`}),Po(e)||(Ve(`userSettings`,{fastMode:void 0}),w(e=>({...e,penguinModeOrgEnabled:!1}))),qo.emit(t)}function Io(){return ko().status===`cooldown`}function Lo(e,t){let n=K()&&Co()&&!!t&&Oo(e);return n&&Io()?`cooldown`:n?`on`:`off`}async function Ro(e){let t=`${D().BASE_API_URL}/api/claude_code_penguin_mode`,n=`accessToken`in e?{Authorization:`Bearer ${e.accessToken}`,"anthropic-beta":ct}:{"x-api-key":e.apiKey};return(await f.get(t,{headers:n})).data}function zo(){K()&&J.status===`pending`&&(J=S().penguinModeOrgEnabled===!0?{status:`enabled`}:{status:`disabled`,reason:`unknown`})}async function Bo(){if($e()||!K())return;if($o)return _(`Fast mode prefetch in progress, returning in-flight promise`),$o;let e=ea();if(!(W()?.accessToken&&Va())&&!e){J=S().penguinModeOrgEnabled===!0?{status:`enabled`}:{status:`disabled`,reason:`preference`};return}let t=Date.now();if(t-Qo<Zo){_(`Skipping fast mode prefetch, fetched recently`);return}Qo=t;let n=async()=>{let t=W(),n=t?.accessToken&&Va()?{accessToken:t.accessToken}:e?{apiKey:e}:null;if(!n)throw Error(`No auth available`);return Ro(n)};async function r(){try{let e;try{e=await n()}catch(t){if(f.isAxiosError(t)&&(t.response?.status===401||t.response?.status===403&&typeof t.response?.data==`string`&&t.response.data.includes(`OAuth token has been revoked`))){let r=W()?.accessToken;if(r)await Ia(r),e=await n();else throw t}else throw t}let t=J.status===`pending`?S().penguinModeOrgEnabled:J.status===`enabled`;J=e.enabled?{status:`enabled`}:{status:`disabled`,reason:e.disabled_reason??`preference`},t!==e.enabled&&(e.enabled||Ve(`userSettings`,{fastMode:void 0}),w(t=>({...t,penguinModeOrgEnabled:e.enabled})),Yo.emit(e.enabled)),_(`Org fast mode: ${e.enabled?`enabled`:`disabled (${e.disabled_reason??`preference`})`}`)}catch(e){J=S().penguinModeOrgEnabled===!0?{status:`enabled`}:{status:`disabled`,reason:`network_error`},_(`Failed to fetch org fast mode status, defaulting to ${J.status===`enabled`?`enabled (cached)`:`disabled (network_error)`}: ${e}`,{level:`error`}),E(`tengu_org_penguin_mode_fetch_failed`,{})}finally{$o=null}}return $o=r(),$o}var Vo,q,Ho,Uo,Wo,Go,Ko,qo,Jo,J,Yo,Xo,Zo,Qo,$o,es=e((()=>{p(),O(),m(),at(),G(),dt(),We(),v(),c(),$(),A(),Qe(),x(),Se(),Vo=`Opus 4.7`,q={status:`active`},Ho=!1,Uo=ye(),Wo=ye(),Go=Uo.subscribe,Ko=Wo.subscribe,qo=ye(),Jo=qo.subscribe,J={status:`pending`},Yo=ye(),Xo=Yo.subscribe,Zo=3e4,Qo=0,$o=null}));function ts(e){return K()&&e?ds:us}function ns(e,t){return t.input_tokens/1e6*e.inputTokens+t.output_tokens/1e6*e.outputTokens+(t.cache_read_input_tokens??0)/1e6*e.promptCacheReadTokens+(t.cache_creation_input_tokens??0)/1e6*e.promptCacheWriteTokens+(t.server_tool_use?.web_search_requests??0)*e.webSearchRequests}function rs(e,t){let n=Z(e);return n===X(on.firstParty)?ts(t.speed===`fast`):hs[n]||(is(e,n),hs[Z(Us())]??ms)}function is(e,t){E(`tengu_unknown_model_cost`,{model:e,shortName:t}),Ce()}function as(e,t){return ns(rs(e,t),t)}function os(e,t){return as(e,{input_tokens:t.inputTokens,output_tokens:t.outputTokens,cache_read_input_tokens:t.cacheReadInputTokens,cache_creation_input_tokens:t.cacheCreationInputTokens})}function ss(e){return Number.isInteger(e)?`$${e}`:`$${e.toFixed(2)}`}function cs(e){return`${ss(e.inputTokens)}/${ss(e.outputTokens)} per Mtok`}var Y,ls,us,ds,fs,ps,ms,hs,gs=e((()=>{at(),m(),es(),dn(),$(),Y={inputTokens:3,outputTokens:15,promptCacheWriteTokens:3.75,promptCacheReadTokens:.3,webSearchRequests:.01},ls={inputTokens:15,outputTokens:75,promptCacheWriteTokens:18.75,promptCacheReadTokens:1.5,webSearchRequests:.01},us={inputTokens:5,outputTokens:25,promptCacheWriteTokens:6.25,promptCacheReadTokens:.5,webSearchRequests:.01},ds={inputTokens:30,outputTokens:150,promptCacheWriteTokens:37.5,promptCacheReadTokens:3,webSearchRequests:.01},fs={inputTokens:.8,outputTokens:4,promptCacheWriteTokens:1,promptCacheReadTokens:.08,webSearchRequests:.01},ps={inputTokens:1,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:.1,webSearchRequests:.01},ms=us,hs={[X(Qt.firstParty)]:fs,[X($t.firstParty)]:ps,[X(Zt.firstParty)]:Y,[X(Xt.firstParty)]:Y,[X(en.firstParty)]:Y,[X(tn.firstParty)]:Y,[X(cn.firstParty)]:Y,[X(nn.firstParty)]:ls,[X(rn.firstParty)]:ls,[X(an.firstParty)]:us,[X(on.firstParty)]:us}}));function _s(e){return ys.includes(e)}function vs(e){return bs.includes(e)}var ys,bs,xs=e((()=>{ys=[`sonnet`,`opus`,`haiku`,`best`,`sonnet[1m]`,`opus[1m]`,`opusplan`],bs=[`sonnet`,`opus`,`haiku`]}));function Ss(e,t){return e.includes(t)?!0:_s(e)?Q(e).toLowerCase().includes(t):!1}function Cs(e,t){return e.startsWith(t)?e.length===t.length||e[t.length]===`-`:!1}function ws(e,t){let n=_s(e)?Q(e).toLowerCase():e;return!!(Cs(n,t)||!t.startsWith(`claude-`)&&Cs(n,`claude-${t}`))}function Ts(e,t){for(let n of t){if(vs(n))continue;let t=n.indexOf(e);if(t===-1)continue;let r=t+e.length;if(r===n.length||n[r]===`-`)return!0}return!1}function Es(e){let{availableModels:t}=b()||{};if(!t)return!0;if(t.length===0)return!1;let n=hn(e).trim().toLowerCase(),r=t.map(e=>e.trim().toLowerCase());if(r.includes(n)&&(!vs(n)||!Ts(n,r)))return!0;for(let e of r)if(vs(e)&&!Ts(e,r)&&Ss(n,e))return!0;if(_s(n)){let e=Q(n).toLowerCase();if(r.includes(e))return!0}for(let e of r)if(!vs(e)&&_s(e)&&Q(e).toLowerCase()===n)return!0;for(let e of r)if(!vs(e)&&!_s(e)&&ws(n,e))return!0;return!1}var Ds=e((()=>{x(),xs(),$(),bn()}));function Os(){return process.env.OPENAI_AUTH_MODE===`chatgpt`}var ks,As,js,Ms=e((()=>{ks=`gpt-5.5`,As=`gpt-5.4-mini`,js=[{value:`gpt-5.5`,label:`GPT-5.5`,description:`Frontier model for complex coding, research, and real-world work`},{value:`gpt-5.4`,label:`GPT-5.4`,description:`Strong model for everyday coding`},{value:`gpt-5.4-mini`,label:`GPT-5.4-Mini`,description:`Small, fast, and cost-efficient model for simpler coding tasks`},{value:`gpt-5.3-codex`,label:`GPT-5.3-Codex`,description:`Coding-optimized model`},{value:`gpt-5.3-codex-spark`,label:`GPT-5.3-Codex-Spark`,description:`Ultra-fast coding model`},{value:`gpt-5.2`,label:`GPT-5.2`,description:`Optimized for professional work and long-running agents`}]}));function Ns(){let e=k();return e===`openai`&&Os()?process.env.OPENAI_SMALL_FAST_MODEL??`gpt-5.4-mini`:e===`openai`&&process.env.OPENAI_SMALL_FAST_MODEL?process.env.OPENAI_SMALL_FAST_MODEL:e===`gemini`&&process.env.GEMINI_SMALL_FAST_MODEL?process.env.GEMINI_SMALL_FAST_MODEL:process.env.ANTHROPIC_SMALL_FAST_MODEL||Vs()}function Ps(e){return e===j().opus40||e===j().opus41||e===j().opus45||e===j().opus46||e===j().opus47}function Fs(){let e,t=me();if(t!==void 0)e=t;else{let t=b()||{};e=process.env.ANTHROPIC_MODEL||t.model||void 0}if(!(e&&!Es(e)))return e}function Is(){let e=Fs();return e==null?Ws():Q(e)}function Ls(){return zs()}function Rs(){let e=k();if(e===`openai`)return process.env.OPENAI_MODEL;if(e===`gemini`)return process.env.GEMINI_MODEL;if(e===`grok`)return process.env.GROK_MODEL}function zs(){let e=k();return e===`openai`&&Os()?ks:e===`openai`&&process.env.OPENAI_DEFAULT_OPUS_MODEL?process.env.OPENAI_DEFAULT_OPUS_MODEL:e===`gemini`&&process.env.GEMINI_DEFAULT_OPUS_MODEL?process.env.GEMINI_DEFAULT_OPUS_MODEL:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL?process.env.ANTHROPIC_DEFAULT_OPUS_MODEL:Rs()||j().opus47}function Bs(){let e=k();return e===`openai`&&Os()?ks:e===`openai`&&process.env.OPENAI_DEFAULT_SONNET_MODEL?process.env.OPENAI_DEFAULT_SONNET_MODEL:e===`gemini`&&process.env.GEMINI_DEFAULT_SONNET_MODEL?process.env.GEMINI_DEFAULT_SONNET_MODEL:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL?process.env.ANTHROPIC_DEFAULT_SONNET_MODEL:Rs()||(e===`firstParty`?j().sonnet46:j().sonnet45)}function Vs(){let e=k();return e===`openai`&&Os()?As:e===`openai`&&process.env.OPENAI_DEFAULT_HAIKU_MODEL?process.env.OPENAI_DEFAULT_HAIKU_MODEL:e===`gemini`&&process.env.GEMINI_DEFAULT_HAIKU_MODEL?process.env.GEMINI_DEFAULT_HAIKU_MODEL:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL?process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL:Rs()||j().haiku45}function Hs(e){let{permissionMode:t,mainLoopModel:n,exceeds200kTokens:r=!1}=e;return Fs()===`opusplan`&&t===`plan`&&!r?zs():Fs()===`haiku`&&t===`plan`?Bs():n}function Us(){return Ka()||Ja()?zs()+(Js()?`[1m]`:``):Bs()}function Ws(){return Q(Us())}function X(e){if(e=e.toLowerCase(),e.includes(`claude-opus-4-7`))return`claude-opus-4-7`;if(e.includes(`claude-opus-4-6`))return`claude-opus-4-6`;if(e.includes(`claude-opus-4-5`))return`claude-opus-4-5`;if(e.includes(`claude-opus-4-1`))return`claude-opus-4-1`;if(e.includes(`claude-opus-4`))return`claude-opus-4`;if(e.includes(`claude-sonnet-4-6`))return`claude-sonnet-4-6`;if(e.includes(`claude-sonnet-4-5`))return`claude-sonnet-4-5`;if(e.includes(`claude-sonnet-4`))return`claude-sonnet-4`;if(e.includes(`claude-haiku-4-5`))return`claude-haiku-4-5`;if(e.includes(`claude-3-7-sonnet`))return`claude-3-7-sonnet`;if(e.includes(`claude-3-5-sonnet`))return`claude-3-5-sonnet`;if(e.includes(`claude-3-5-haiku`))return`claude-3-5-haiku`;if(e.includes(`claude-3-opus`))return`claude-3-opus`;if(e.includes(`claude-3-sonnet`))return`claude-3-sonnet`;if(e.includes(`claude-3-haiku`))return`claude-3-haiku`;let t=e.match(/(claude-(\d+-\d+-)?\w+)/);return t?.[1]?t[1]:e}function Z(e){return X(hn(e))}function Gs(e=!1){return Ka()||Ja()?Js()?`Opus 4.7 with 1M context · Most capable for complex work${e?qs(!0):``}`:`Opus 4.7 · Most capable for complex work${e?qs(!0):``}`:`Sonnet 4.6 · Best for everyday tasks`}function Ks(e){return e===`opusplan`?`Opus 4.7 in plan mode, else Sonnet 4.6`:Zs(Q(e))}function qs(e){if(k()!==`firstParty`)return``;let t=cs(ts(e));return` ·${e?` (↯)`:``} ${t}`}function Js(){return!(Gr()||Xa()||k()!==`firstParty`||!Mt()||R()&&z()===null)}function Ys(e){return e===`opusplan`?`Opus Plan`:_s(e)?ft(e):Zs(e)}function Xs(e){switch(e){case j().opus47:return`Opus 4.7`;case`${j().opus47}[1m]`:return`Opus 4.7 (1M context)`;case j().opus46:return`Opus 4.6`;case`${j().opus46}[1m]`:return`Opus 4.6 (1M context)`;case j().opus45:return`Opus 4.5`;case j().opus41:return`Opus 4.1`;case j().opus40:return`Opus 4`;case`${j().sonnet46}[1m]`:return`Sonnet 4.6 (1M context)`;case j().sonnet46:return`Sonnet 4.6`;case`${j().sonnet45}[1m]`:return`Sonnet 4.5 (1M context)`;case j().sonnet45:return`Sonnet 4.5`;case j().sonnet40:return`Sonnet 4`;case`${j().sonnet40}[1m]`:return`Sonnet 4 (1M context)`;case j().sonnet37:return`Sonnet 3.7`;case j().sonnet35:return`Sonnet 3.5`;case j().haiku45:return`Haiku 4.5`;case j().haiku35:return`Haiku 3.5`;default:return null}}function Zs(e){return Xs(e)||e}function Q(e){let t=e.trim(),n=t.toLowerCase(),r=F(n),i=r?n.replace(/\[1m]$/i,``).trim():n;if(_s(i))switch(i){case`opusplan`:return Bs()+(r?`[1m]`:``);case`sonnet`:return Bs()+(r?`[1m]`:``);case`haiku`:return Vs()+(r?`[1m]`:``);case`opus`:return zs()+(r?`[1m]`:``);case`best`:return Ls();default:}return k()===`firstParty`&&$s(i)&&ec()?zs()+(r?`[1m]`:``):r?`${t.replace(/\[1m\]$/i,``).trim()}[1m]`:t}function Qs(e,t){return F(e)||!F(t)?e:Kr(Q(e))?`${e}[1m]`:e}function $s(e){return ic.includes(e)}function ec(){return!s(process.env.CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP)}function tc(e){if(e===null)return R()?`Default (${Gs()})`:`Default (${Ws()})`;let t=Q(e);return e===t?t:`${e} (${t})`}function nc(e){if(k()===`foundry`)return;let t=e.toLowerCase().includes(`[1m]`),n=Z(e);if(n.includes(`claude-opus-4-7`))return t?`Opus 4.7 (with 1M context)`:`Opus 4.7`;if(n.includes(`claude-opus-4-6`))return t?`Opus 4.6 (with 1M context)`:`Opus 4.6`;if(n.includes(`claude-opus-4-5`))return`Opus 4.5`;if(n.includes(`claude-opus-4-1`))return`Opus 4.1`;if(n.includes(`claude-opus-4`))return`Opus 4`;if(n.includes(`claude-sonnet-4-6`))return t?`Sonnet 4.6 (with 1M context)`:`Sonnet 4.6`;if(n.includes(`claude-sonnet-4-5`))return t?`Sonnet 4.5 (with 1M context)`:`Sonnet 4.5`;if(n.includes(`claude-sonnet-4`))return t?`Sonnet 4 (with 1M context)`:`Sonnet 4`;if(n.includes(`claude-3-7-sonnet`))return`Claude 3.7 Sonnet`;if(n.includes(`claude-3-5-sonnet`))return`Claude 3.5 Sonnet`;if(n.includes(`claude-haiku-4-5`))return`Haiku 4.5`;if(n.includes(`claude-3-5-haiku`))return`Claude 3.5 Haiku`}function rc(e){return e.replace(/\[(1|2)m\]/gi,``)}var ic,$=e((()=>{m(),G(),ri(),c(),bn(),gs(),x(),A(),ze(),Ds(),xs(),pt(),Ms(),ic=[`claude-opus-4-20250514`,`claude-opus-4-1-20250805`,`claude-opus-4-0`,`claude-opus-4-1`]}));export{Mo as $,Tr as $n,Rt as $r,Xa as $t,Ms as A,bi as An,Dn as Ar,L as At,os as B,Yr as Bn,Fn as Br,G as Bt,Q as C,Fi as Cn,Xn as Cr,ua as Ct,Qs as D,li as Dn,Rn as Dr,$i as Dt,Ys as E,_i as En,Ln as Er,la as Et,xs as F,hi as Fn,jn as Fr,z as Ft,Vo as G,F as Gn,j as Gr,R as Gt,cs as H,Zr as Hn,Sn as Hr,I as Ht,fs as I,oi as In,Tn as Ir,Ia as It,ko as J,Wr as Jn,Vt as Jr,Ya as Jt,jo as K,ri as Kn,bn as Kr,io as Kt,ps as L,si as Ln,Pn as Lr,ta as Lt,Ds as M,pi as Mn,Mn as Mr,no as Mt,Es as N,fi as Nn,Nn as Nr,Za as Nt,ks as O,xi as On,En as Or,W as Ot,ys as P,mi as Pn,In as Pr,Qa as Pt,Fo as Q,Pr as Qn,Ht as Qr,Wa as Qt,Y as R,ni as Rn,On as Rr,Ga as Rt,rc as S,Pi as Sn,N as Sr,na as St,Zs as T,Ei as Tn,Kn as Tr,ho as Tt,ts as U,Xr as Un,Cn as Ur,aa as Ut,as as V,qr as Vn,xn as Vr,Ha as Vt,gs as W,Jr as Wn,_n as Wr,sa as Wt,To as X,Nr as Xn,qt as Xr,Ka as Xt,Lo as Y,Br as Yn,Wt as Yr,xa as Yt,Do as Z,kr as Zn,Yt as Zr,to as Zt,$ as _,Ki as _n,or as _r,ya as _t,Vs as a,jt as ai,Ea as an,xr as ar,Ko as at,Js as b,Wi as bn,$n as br,ao as bt,zs as c,wa as cn,ur as cr,Xo as ct,nc as d,ka as dn,gr as dr,Ao as dt,Lt as ei,Ja as en,wr as er,es as et,qs as f,Na as fn,dr as fr,Zi as ft,Fs as g,Xi as gn,ar as gr,ma as gt,Ns as h,qi as hn,br as hr,Sa as ht,Gs as i,k as ii,Da as in,Sr as ir,Oo as it,Os as j,Si as jn,kn as jr,Ua as jt,js as k,gi as kn,An as kr,Ra as kt,Bs as l,mo as ln,hr as lr,Bo as lt,Hs as m,Ji as mn,yr as mr,za as mt,Ls as n,It as ni,$a as nn,Dr as nr,Io as nt,Ws as o,A as oi,U as on,_r as or,Go as ot,Xs as p,oo as pn,pr,ca as pt,Eo as q,Gr as qn,Gt as qr,Aa as qt,Z as r,Pt as ri,ha as rn,Er as rr,K as rt,Us as s,Mt as si,_a as sn,lr as sr,Jo as st,X as t,Nt as ti,qa as tn,Cr as tr,Co as tt,Is as u,ja as un,mr as ur,zo as ut,ec as v,Gi as vn,ir as vr,Ta as vt,Ks as w,Ai as wn,Gn as wr,pa as wt,tc as x,Li as xn,Qn as xr,ea as xt,Ps as y,Ri as yn,er as yr,Pa as yt,hs as z,$r as zn,wn as zr,Va as zt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./pluginStartupCheck-BUeBiYVq.js";e();export{t as getPluginEditableScopes};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./poorMode-D4L_-yWS.js";t();export{e as isPoorModeActive};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t}from"./prompt-DnPppVz8.js";t();export{e as isDeferredTool};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cw as e,mw as t}from"./loadAgentsDir-JrGMJN05.js";t();export{e as clearPromptCache};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t}from"./ripgrep-X5m4gJ-3.js";e();export{t as getRipgrepStatus};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aT as e,cT as t}from"./loadAgentsDir-JrGMJN05.js";t();export{e as SandboxManager};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F_ as e,N_ as t}from"./loadAgentsDir-JrGMJN05.js";t();export{e as isSearchExtraToolsEnabled};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{nh as e,rh as t}from"./loadAgentsDir-JrGMJN05.js";e();export{t as registerSessionFileAccessHooks};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./sessionObserver-CvQ6oyoj.js";t();export{e as heuristicObserverBackend};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dr as e,Xr as t,br as n}from"./loadAgentsDir-JrGMJN05.js";n();export{e as linkSessionToPR,t as recordTranscript};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,g as t,x as n}from"./settings-aUygByiZ.js";t();export{e as getSettingsForSource,n as updateSettingsForSource};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./sinks-ZHKfs6gv.js";export{e as initSinks};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Settings-B1EI5LOU.js";async function i(e,t){return(0,a.jsx)(r,{onClose:e,context:t,defaultTab:`Status`})}var a;e((()=>{n(),a=t()}))();export{i as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./switcher-BUNSEJ-7.js";e();export{t as restoreActiveProvider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./trustedDevice-BF78PNK8.js";export{t as clearTrustedDeviceToken,e as enrollTrustedDevice};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{$d as e,Zd as t}from"./loadAgentsDir-JrGMJN05.js";import{di as n,fi as r}from"./src-DL3w8VPk2.js";import{c as i,i as a}from"./debug-BQj6h99Q.js";import{n as o,o as s}from"./process-gEbdy6uY.js";import{n as c,r as l}from"./execFileNoThrow-DYm1GeGn.js";import{l as u,u as d}from"./ripgrep-X5m4gJ-3.js";import{join as f}from"node:path";import{execSync as p}from"node:child_process";import{existsSync as m,readFileSync as h}from"node:fs";import{homedir as g}from"node:os";r(),a(),d(),l(),e(),o();var _=`@readmagic/workmate`;function v(){try{let e=f(u,`..`,`package.json`);if(m(e)){let t=JSON.parse(h(e,`utf-8`));if(t.version)return t.version}}catch{}return`0.0.14`}function y(e){try{return p(`which ${e} 2>/dev/null`,{stdio:`pipe`}),!0}catch{return!1}}function b(){return!!(process.execPath.includes(`bun`)||m(f(f(g(),`.bun`,`install`,`global`),`node_modules`,_)))}async function x(){let e=await c(`npm`,[`view`,`${_}@latest`,`version`,`--prefer-online`],{abortSignal:AbortSignal.timeout(1e4),cwd:g()});return e.code===0?e.stdout.trim():(i(`npm view failed: ${e.stderr}`),null)}function S(e,t){let n=e=>e.replace(/^\D/,``).split(`.`).map(Number),r=n(e),i=n(t);for(let e=0;e<3;e++){if((r[e]??0)>(i[e]??0))return!0;if((r[e]??0)<(i[e]??0))return!1}return!0}async function C(){let e=v();s(`Current version: ${e}\n`);let r=y(`bun`),i=b()&&r?`bun`:`npm`;s(`Package manager: ${i}\n`),s(`Checking for updates...
|
|
2
|
-
`);let a=await x();if(!a){process.stderr.write(`${n.red(`Failed to check for updates`)}\n`),process.stderr.write(`Unable to fetch latest version from npm registry.
|
|
3
|
-
`),await t(1);return}if(a===e||S(e,a)){s(`${n.green(`ccb is up to date (${e})`)}\n`),await t(0);return}s(`New version available: ${a} (current: ${e})\n`),s(`Installing update via ${i}...\n`);try{p(i===`bun`?`bun install -g ${_}@latest`:`npm install -g ${_}@latest`,{stdio:`inherit`,cwd:g(),timeout:12e4}),s(`${n.green(`Successfully updated from ${e} to ${a}`)}\n`)}catch(e){process.stderr.write(`${n.red(`Update failed`)}\n`),process.stderr.write(`${e}\n`),process.stderr.write(`
|
|
4
|
-
`),process.stderr.write(`Try manually updating with:
|
|
5
|
-
`),i===`bun`?process.stderr.write(`${n.bold(` bun install -g ${_}@latest`)}\n`):process.stderr.write(`${n.bold(` npm install -g ${_}@latest`)}\n`),await t(1)}await t(0)}export{C as updateCCB};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Xh as t,Zh as n}from"./loadAgentsDir-JrGMJN05.js";import{C as r,_ as i,s as a}from"./model-CmDF8O9G.js";function o(){let e=n(e=>e.mainLoopModel);return r(n(e=>e.mainLoopModelForSession)??e??a())}var s=e((()=>{t(),i()}));export{o as n,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{St as e,_t as t}from"./loadAgentsDir-JrGMJN05.js";e();export{t as execIntoTmuxWorktree};
|