claude-code-best 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/{AddWorkspaceDirectory-BCCbaWoh.js → AddWorkspaceDirectory-CM5PYqoF.js} +1 -1
- package/dist/chunks/{App-BIAYUFvT.js → App-BLLQEMkd.js} +1 -1
- package/dist/chunks/ApproveApiKey-AMXQPmfE.js +1 -0
- package/dist/chunks/{ApproveApiKey-DRARgWX3.js → ApproveApiKey-DrflOSA-.js} +1 -1
- package/dist/chunks/{AssistantSessionChooser-eUrEGDlX.js → AssistantSessionChooser-SlRne98s.js} +1 -1
- package/dist/chunks/BackgroundTasksDialog-Cciww_FF.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-8z7R5EpU.js → BypassPermissionsModeDialog-HaciDdx0.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-B7mDm5Hb.js → ClaudeInChromeOnboarding-EA3k_q2M.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-C-T8G8O7.js +1 -0
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-DE9dpWtg.js → ClaudeMdExternalIncludesDialog-xBclyqKk.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-BTN62PKj.js +1 -0
- package/dist/chunks/{DesktopHandoff-Ce0nE7D6.js → DesktopHandoff-BhY_F3Ob.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-mt0lA5wR.js → DevChannelsDialog-DU5komVT.js} +1 -1
- package/dist/chunks/DiffDialog-D_-znREV.js +3 -0
- package/dist/chunks/Doctor-BhrEYzPO.js +3 -0
- package/dist/chunks/Doctor-CjnUU1CY.js +1 -0
- package/dist/chunks/{ExitFlow-C3BGvwv-.js → ExitFlow-cRfxceuS.js} +2 -2
- package/dist/chunks/{Feedback-BtZb1A8b.js → Feedback-BMv8Kt05.js} +2 -2
- package/dist/chunks/Grove-CRAZGlvf.js +1 -0
- package/dist/chunks/{Grove-HpMLktXp.js → Grove-CjfR7Acp.js} +1 -1
- package/dist/chunks/{HybridTransport-COk7jAC7.js → HybridTransport-D32dn9xc.js} +1 -1
- package/dist/chunks/{ITermBackend-BlwyeN8U.js → ITermBackend-BxjzkptA.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-QVIRDXwA.js → InvalidConfigDialog-CnCOCqMT.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-CZRZm0oa.js → InvalidSettingsDialog-CLOgpfR2.js} +1 -1
- package/dist/chunks/MCPConnectionManager-BhbT4Sah.js +1 -0
- package/dist/chunks/{McpParsingWarnings-DWMO0bV6.js → McpParsingWarnings-B5X5HVnQ.js} +1 -1
- package/dist/chunks/MessageSelector-DLofsxam.js +3 -0
- package/dist/chunks/Messages-D1-i4MMT.js +11 -0
- package/dist/chunks/{Onboarding-CHcND5Tt.js → Onboarding-Co5P3gZs.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-CMBqZrnz.js → OverageCreditUpsell-DjgcfVt2.js} +1 -1
- package/dist/chunks/PluginSettings-NB-Wod-9.js +17 -0
- package/dist/chunks/{PromptInputHelpMenu-CAwbW7z2.js → PromptInputHelpMenu-BDI5IF1s.js} +1 -1
- package/dist/chunks/QueryEngine-B217mLel.js +1 -0
- package/dist/chunks/REPL-BfprHNDt.js +1 -0
- package/dist/chunks/{REPL-Dx3SPe95.js → REPL-DCm_BFr_.js} +36 -36
- package/dist/chunks/{RemoteCallout-CwI1mLQ9.js → RemoteCallout-dGnKRIDB.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-BXMBhfQD.js → RemoteSessionManager-BidAIOqZ.js} +2 -2
- package/dist/chunks/ResumeConversation-SDRT6hO3.js +1 -0
- package/dist/chunks/{SSETransport-Co-0nMlR.js → SSETransport-BM2xz03M.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-DCSReOsq.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-kEgE7qeH.js → SentryErrorBoundary-D5niZGEU.js} +1 -1
- package/dist/chunks/SentryErrorBoundary-DzwCuftg.js +1 -0
- package/dist/chunks/Settings-D3ds_WCz.js +2 -0
- package/dist/chunks/{TeleportProgress--n-u7MYY.js → TeleportProgress-Dg6HcEO9.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-CzQzdYb2.js → TeleportRepoMismatchDialog-BUKNU2jx.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-CtANoO1Z.js → TeleportResumeWrapper-5FTzA9R_.js} +1 -1
- package/dist/chunks/{ThemePicker-kBt6obJb.js → ThemePicker-Bdm12PmJ.js} +1 -1
- package/dist/chunks/{TmuxBackend-Q5xdOkW4.js → TmuxBackend-CYx3Hdf1.js} +2 -2
- package/dist/chunks/{TrustDialog-CoCFqyRD.js → TrustDialog-DGKf4iwh.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-CL42YlaS.js → ValidationErrorsList-BP7vG1uX.js} +1 -1
- package/dist/chunks/{WelcomeV2-B0d9sH1c.js → WelcomeV2-k_969SnB.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-CLSeqqHh.js → WindowsTerminalBackend-K_zVZBSP.js} +2 -2
- package/dist/chunks/{add-dir-IrADCHV-.js → add-dir-DnfUkb1n.js} +1 -1
- package/dist/chunks/{agentDisplay-BUXpQhYh.js → agentDisplay-DT04Kqdm.js} +1 -1
- package/dist/chunks/{agents-Cx0f6suK.js → agents-ELZyUElQ.js} +7 -7
- package/dist/chunks/{agents-BqQtaTaM.js → agents-hh7Zcqm6.js} +1 -1
- package/dist/chunks/{ant-BUkS8Em4.js → ant-CuQC6xHS.js} +1 -1
- package/dist/chunks/api-BY3NFL4L.js +1 -0
- package/dist/chunks/{api-Cy1N7XAQ.js → api-C-KY7A3r.js} +1 -1
- package/dist/chunks/asciicast-BeEmDIKr.js +1 -0
- package/dist/chunks/{asciicast-C_1Pi99k.js → asciicast-C0fPsv7_.js} +1 -1
- package/dist/chunks/assistant-C669PK45.js +1 -0
- package/dist/chunks/{assistant-C3dP-BSJ.js → assistant-DbtrknMt.js} +1 -1
- package/dist/chunks/{assistant-BGzd9a5x.js → assistant-Z-xFHPiY.js} +1 -1
- package/dist/chunks/{auth-DVtMm7Hj.js → auth-Bo_eeRO9.js} +1 -1
- package/dist/chunks/auth-C-rD91K7.js +1 -0
- package/dist/chunks/{autoMode-ThlM20qr.js → autoMode-BhsFtU8_.js} +6 -6
- package/dist/chunks/{autonomy-B637YdCF.js → autonomy-B-d3Xamr.js} +1 -1
- package/dist/chunks/{autonomy-B_vxYZbV.js → autonomy-C5wE-5B8.js} +12 -12
- package/dist/chunks/{autonomyPanel-BM2VhTsn.js → autonomyPanel-CMy4Zs1a.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-YAOGWoo4.js +17 -0
- package/dist/chunks/backgroundHousekeeping-xFmPDL7y.js +1 -0
- package/dist/chunks/{branch-BlH5WYNu.js → branch-DoV3sEJf.js} +2 -2
- package/dist/chunks/{bridge-QRFJRzVG.js → bridge-8RYx23zW.js} +2 -2
- package/dist/chunks/{bridgeConfig-Di9LziJ3.js → bridgeConfig-C8tQXEsd.js} +1 -1
- package/dist/chunks/bridgeConfig-D5awYlvd.js +1 -0
- package/dist/chunks/bridgeEnabled-0tZw2TlM.js +1 -0
- package/dist/chunks/{bridgeEnabled-z1fPRzzV.js → bridgeEnabled-B3KTIVe4.js} +1 -1
- package/dist/chunks/bridgeMain-DKkE8RYG.js +1 -0
- package/dist/chunks/bridgeMain-Ssp8HRcV.js +68 -0
- package/dist/chunks/{bridgeMessaging-BG8fNZac.js → bridgeMessaging-DGTm_wDk.js} +1 -1
- package/dist/chunks/{btw-DpeWZQbf.js → btw-Du0mHeiD.js} +1 -1
- package/dist/chunks/{buddy-Bni2g0Km.js → buddy-D04AYSW6.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-7e56Rquc.js → bypassPermissionsKillswitch-CRYkShwu.js} +1 -1
- package/dist/chunks/caches-Byd8SjTZ.js +1 -0
- package/dist/chunks/{caches-CzEBsMvP.js → caches-DYf69-N9.js} +2 -2
- package/dist/chunks/{ccrClient-iR6zwGb1.js → ccrClient-CDrBxSox.js} +1 -1
- package/dist/chunks/changeDetector-CGzGs92S.js +1 -0
- package/dist/chunks/{channelNotification-CSmLgwtO.js → channelNotification-CtA9HHFW.js} +1 -1
- package/dist/chunks/channelNotification-DOvTvOGt.js +1 -0
- package/dist/chunks/{chrome-BO1vbvZ0.js → chrome-BHbT4cc4.js} +1 -1
- package/dist/chunks/clear-BGLxPs_B.js +1 -0
- package/dist/chunks/client-CtOmoNuQ.js +1 -0
- package/dist/chunks/color-MOZYZ1cM.js +1 -0
- package/dist/chunks/commands-B3XpQmEm.js +1 -0
- package/dist/chunks/{commitAttribution-Djh1ZpYH.js → commitAttribution-BTtCTr8c.js} +1 -1
- package/dist/chunks/commitAttribution-CXNK79GW.js +1 -0
- package/dist/chunks/compact-CMqxm2yG.js +3 -0
- package/dist/chunks/{companion-C-jfFhlz.js → companion-ChxkOPHB.js} +1 -1
- package/dist/chunks/{config-DwsIX0hc.js → config-cRyRIPI7.js} +1 -1
- package/dist/chunks/{config-CloXpblh.js → config-wvQYYbwU.js} +1 -1
- package/dist/chunks/{context-DdwMoH4j.js → context-7ds9guuJ.js} +1 -1
- package/dist/chunks/{context-noninteractive-BWbEqad6.js → context-noninteractive-CISZymIU.js} +2 -2
- package/dist/chunks/context-noninteractive-CwJBBF8h.js +1 -0
- package/dist/chunks/conversation-Bgsdn99n.js +1 -0
- package/dist/chunks/conversation-D30CU_jS.js +1 -0
- package/dist/chunks/{copy-tl-41wwU.js → copy-Dvz2Mge4.js} +2 -2
- package/dist/chunks/{createSSHSession-B_IyqOll.js → createSSHSession-Befx8LiM.js} +1 -1
- package/dist/chunks/createSession-Cp0KTjPL.js +1 -0
- package/dist/chunks/{createSession-Csaqw8kb.js → createSession-CsZGoika.js} +1 -1
- package/dist/chunks/{cronJitterConfig-2sHTXBLu.js → cronJitterConfig-Dfl7iZqE.js} +3 -3
- package/dist/chunks/{crossProjectResume-C1I0X__e.js → crossProjectResume-DK8nt_cn.js} +3 -3
- package/dist/chunks/{datadog-BzkFYNcv.js → datadog-2vPhbh6g.js} +1 -1
- package/dist/chunks/datadog-DLTYg-S2.js +1 -0
- package/dist/chunks/{desktop-oTXppB2O.js → desktop-DY9Nw2Fi.js} +1 -1
- package/dist/chunks/{diff-B23DUoT8.js → diff-Ci6rs6S6.js} +1 -1
- package/dist/chunks/{directoryCompletion-DqtWZsoW.js → directoryCompletion-DLxCFk_m.js} +1 -1
- package/dist/chunks/{doctor-o2MJvjAE.js → doctor-DBYGgS-y.js} +1 -1
- package/dist/chunks/{effort-B1X_S_oa.js → effort-Bi_t4J_o.js} +2 -2
- package/dist/chunks/{entry-BAXMpXJ0.js → entry-p_5l64_p.js} +4 -4
- package/dist/chunks/{envLessBridgeConfig-YNTOVEqU.js → envLessBridgeConfig-C_sqoGX6.js} +1 -1
- package/dist/chunks/envLessBridgeConfig-Cfbqwjew.js +1 -0
- package/dist/chunks/exit-Bc8L5oQT.js +1 -0
- package/dist/chunks/{export-CqbYdFmJ.js → export-kvnEu9Iw.js} +1 -1
- package/dist/chunks/{exportRenderer-DP_z8YD1.js → exportRenderer-DmpMgUiv.js} +1 -1
- package/dist/chunks/extra-usage-BnO6knuC.js +1 -0
- package/dist/chunks/{extra-usage-BQ5Z1wJb.js → extra-usage-CmP6V7HX.js} +1 -1
- package/dist/chunks/{extra-usage-core-B1oJoxYa.js → extra-usage-core-BqJClmf4.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-BV_6cpdd.js → extra-usage-noninteractive-BWyPFx53.js} +1 -1
- package/dist/chunks/extraUsage-DgMspmL4.js +1 -0
- package/dist/chunks/extractMemories-uQJS_i6E.js +1 -0
- package/dist/chunks/fast-Bunl4ivM.js +1 -0
- package/dist/chunks/{fast-BJMGfO_S.js → fast-Dd2jZVF-.js} +1 -1
- package/dist/chunks/{feedback-O0Gushxg.js → feedback-8UeDx3Yc.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-0s2WJ6SR.js → firstPartyEventLogger-cKEuzfyR.js} +1 -1
- package/dist/chunks/{flushGate-CLjpgnG6.js → flushGate-B3upNVdV.js} +1 -1
- package/dist/chunks/{gates-C5y8P5t9.js → gates-lWoKqpJ1.js} +1 -1
- package/dist/chunks/gates-uo2owWkc.js +1 -0
- package/dist/chunks/{gemini-D6lfJRGH.js → gemini-DDSP4ArG.js} +1 -1
- package/dist/chunks/{generateRecap-AYujRzfu.js → generateRecap-DCBzHqag.js} +1 -1
- package/dist/chunks/{generateSessionName-CXg1uVLN.js → generateSessionName-Db5pZ3cL.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-CdjkMIX3.js → githubRepoPathMapping-v_U9b0Fe.js} +1 -1
- package/dist/chunks/{goal-BGr-SlcA.js → goal-EZCOCHZa.js} +3 -3
- package/dist/chunks/{grok-DxyRt4Jq.js → grok-H8K_fDKF.js} +1 -1
- package/dist/chunks/{growthbook-D93ZmHUL.js → growthbook-mMD0jkbu.js} +1 -1
- package/dist/chunks/{heapdump-DZz5qnZg.js → heapdump-CbVvtQuH.js} +1 -1
- package/dist/chunks/{help-C8HhaC70.js → help-Bq4jxCSJ.js} +1 -1
- package/dist/chunks/hooks-CVlFJfV0.js +1 -0
- package/dist/chunks/{hooks-De2yBPig.js → hooks-DbKUS0fN.js} +2 -2
- package/dist/chunks/{hostAdapter-CZdJUeS1.js → hostAdapter-BhVpIn1Y.js} +1 -1
- package/dist/chunks/{ide-GnSLasRI.js → ide-DZJheXyl.js} +2 -2
- package/dist/chunks/{inboundAttachments-C8y3D5mp.js → inboundAttachments-B9NxWIDx.js} +1 -1
- package/dist/chunks/inboundAttachments-_vhgWPEL.js +1 -0
- package/dist/chunks/initReplBridge-BCIaWf78.js +1 -0
- package/dist/chunks/{insights-23tyPxXV.js → insights-D1BFvhw_.js} +68 -68
- package/dist/chunks/{install-BXi4d63r.js → install-D_xm-9s1.js} +1 -1
- package/dist/chunks/{install-github-app-D2X7BgzJ.js → install-github-app-CUEACXdr.js} +2 -2
- package/dist/chunks/{install-slack-app-_J1t0kSP.js → install-slack-app-DGV6l9wy.js} +1 -1
- package/dist/chunks/{instrumentation-C9WDRy-K.js → instrumentation-CEfWNakt.js} +3 -3
- package/dist/chunks/{job-DXX7dNN_.js → job-BeeAFieV.js} +1 -1
- package/dist/chunks/{keybindings-CChhkkE0.js → keybindings-CeYhuE5G.js} +2 -2
- package/dist/chunks/{lang-COIVItM_.js → lang-BmwAsgo1.js} +1 -1
- package/dist/chunks/{language-DzWvcLCu.js → language-BcWiv2lr.js} +1 -1
- package/dist/chunks/language-BnQye2Mx.js +1 -0
- package/dist/chunks/{launchAgentsPlatform-Du_WvKeU.js → launchAgentsPlatform-DqQzwcqV.js} +1 -1
- package/dist/chunks/{launchAutofixPr-CypNniKH.js → launchAutofixPr-XltBpICW.js} +3 -3
- package/dist/chunks/{launchLocalMemory-GkqB_Gcr.js → launchLocalMemory-CHSU4_or.js} +2 -2
- package/dist/chunks/{launchLocalVault-CBihJDzq.js → launchLocalVault-CnvCdQ1M.js} +3 -3
- package/dist/chunks/{launchMemoryStores-BkK0wwq0.js → launchMemoryStores-DD2duIDU.js} +1 -1
- package/dist/chunks/{launchOnboarding-BubTG5vY.js → launchOnboarding-JTKef_jU.js} +1 -1
- package/dist/chunks/{launchSchedule-CkV6Ai-0.js → launchSchedule-BVtfNQtS.js} +1 -1
- package/dist/chunks/{launchSkillStore-DIrFg_WZ.js → launchSkillStore-TisTmZ3O.js} +1 -1
- package/dist/chunks/{launchTeleport-DFrgN9sU.js → launchTeleport-BO_V6ggj.js} +3 -3
- package/dist/chunks/{launchVault-CIiNsg91.js → launchVault-Civro2KB.js} +1 -1
- package/dist/chunks/{loadAgentsDir-DC4jN6-f.js → loadAgentsDir-BfEZacjM.js} +740 -690
- package/dist/chunks/loadAgentsDir-rYxb2igq.js +1 -0
- package/dist/chunks/loadPluginHooks-Cniyh-tZ.js +1 -0
- package/dist/chunks/localSearch-C0J7ETJQ.js +1 -0
- package/dist/chunks/{localSearch-But4wyLg.js → localSearch-COJcqOWl.js} +1 -1
- package/dist/chunks/login-B4wjtpEU.js +1 -0
- package/dist/chunks/{login-ajsn1Sg7.js → login-SuUxFLIY.js} +1 -1
- package/dist/chunks/{logoV2Utils-CpeUvaOM.js → logoV2Utils-DvjpZkyF.js} +1 -1
- package/dist/chunks/logout-o16yNWNB.js +1 -0
- package/dist/chunks/{magicDocs-TF6U6QoB.js → magicDocs-BZBrH9zB.js} +2 -2
- package/dist/chunks/{main-bjQRqaUr.js → main-p9Tke3lb.js} +90 -63
- package/dist/chunks/{mappers-Bg-xtimK.js → mappers-BcXg_fI3.js} +1 -1
- package/dist/chunks/mcp-BFxLEf3X.js +1 -0
- package/dist/chunks/{mcp-i8lqdWTr.js → mcp-CIJL0PTq.js} +2 -2
- package/dist/chunks/mcp-DfuQ1MJu.js +6 -0
- package/dist/chunks/{mcpServer-CuqaXxiJ.js → mcpServer-D2kI_m2H.js} +1 -1
- package/dist/chunks/{mcpServer-Dr9UfcEd.js → mcpServer-DPk-oJOU.js} +1 -1
- package/dist/chunks/{memory-DVJxsbcO.js → memory-CJOtY_Uv.js} +1 -1
- package/dist/chunks/{mode-C9yWWppB.js → mode-DkpKiyTE.js} +1 -1
- package/dist/chunks/{model-Dq-13vaB.js → model-DZyzd39E.js} +1 -1
- package/dist/chunks/model-De0AGQ3F.js +1 -0
- package/dist/chunks/{onChangeAppState-Cc4zOnqx.js → onChangeAppState-CvtxqUDG.js} +1 -1
- package/dist/chunks/{openai-DMCGGZts.js → openai-B888nVou.js} +3 -3
- package/dist/chunks/{overageCreditGrant-CzkWDmsQ.js → overageCreditGrant-BOSyVk3U.js} +1 -1
- package/dist/chunks/{panelCall-D36EWzwF.js → panelCall-BVdu8oii.js} +1 -1
- package/dist/chunks/{passes-CPAwB9_F.js → passes-DeSsjipz.js} +1 -1
- package/dist/chunks/{path-BE28AJwZ.js → path-Cit7LKW-.js} +1 -1
- package/dist/chunks/{paths-CEAy4QCs.js → paths-nIHVpTn2.js} +3 -3
- package/dist/chunks/permissions-DGdr-wOj.js +3 -0
- package/dist/chunks/{pipeTransport-7auNUakO.js → pipeTransport-ClZYq1sd.js} +1 -1
- package/dist/chunks/{plan-pCEs76NM.js → plan-D9bnkDwv.js} +1 -1
- package/dist/chunks/{plugin-BSC-7wQh.js → plugin-BE0r1g1g.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-Cre72Rtf.js → pluginAutoupdate-xyXksEJv.js} +1 -1
- package/dist/chunks/pluginBlocklist-Dd7XBe8U.js +1 -0
- package/dist/chunks/{pluginCliCommands-CTxmCPph.js → pluginCliCommands-8MJCk1nq.js} +1 -1
- package/dist/chunks/{pluginFlagging-C5EGcjZe.js → pluginFlagging-7zuXXBD5.js} +1 -1
- package/dist/chunks/pluginOperations-DFzbASMD.js +2 -0
- package/dist/chunks/{pluginStartupCheck-B3QqfRt6.js → pluginStartupCheck-BC5npqdw.js} +1 -1
- package/dist/chunks/pluginStartupCheck-C6IH0haF.js +1 -0
- package/dist/chunks/plugins-Bhc2pbAj.js +4 -0
- package/dist/chunks/policyLimits-CfrU0rIR.js +1 -0
- package/dist/chunks/{pollConfig-CyO4Ycwc.js → pollConfig-B3hNYQ_n.js} +1 -1
- package/dist/chunks/{poor-eRoBwI0Z.js → poor-BjTGCuqc.js} +1 -1
- package/dist/chunks/{poorMode-BdNsLBQ-.js → poorMode-CGVMMLlz.js} +1 -1
- package/dist/chunks/poorMode-DWLhTldO.js +1 -0
- package/dist/chunks/{print-Ogibzjap.js → print-BJkyuCzw.js} +11 -11
- package/dist/chunks/{privacy-settings-Dd7PtKbY.js → privacy-settings-BDVjqVcX.js} +1 -1
- package/dist/chunks/processBashCommand-DnzyTwtS.js +1 -0
- package/dist/chunks/processSlashCommand-BGBRvSCA.js +6 -0
- package/dist/chunks/prompt-BXrvaHyx.js +1 -0
- package/dist/chunks/{prompt-BHI7PZe4.js → prompt-DgIuTC6Q.js} +1 -1
- package/dist/chunks/prompt-Fax-fxAf.js +1 -0
- package/dist/chunks/{promptEditor-DoJ-xPi4.js → promptEditor-BkHY_Vzb.js} +2 -2
- package/dist/chunks/{protocolHandler-Dgzu5UWb.js → protocolHandler-CrXWRkxh.js} +1 -1
- package/dist/chunks/rate-limit-options-skMSi19l.js +1 -0
- package/dist/chunks/{rcDebugLog-C0Bam8V9.js → rcDebugLog-Bv_x5w_B.js} +1 -1
- package/dist/chunks/{referral-B10JtHMk.js → referral-DfKWr4Jf.js} +1 -1
- package/dist/chunks/refresh-zosTlttX.js +1 -0
- package/dist/chunks/{registerProtocol-CQjmvg7a.js → registerProtocol-De6y1iOi.js} +1 -1
- package/dist/chunks/registry-C8JbYbJI.js +1 -0
- package/dist/chunks/{release-notes-dxng0ob_.js → release-notes-Su1UPyE4.js} +1 -1
- package/dist/chunks/{releaseNotes-CS5L5W0H.js → releaseNotes-C7-JnhrH.js} +2 -2
- package/dist/chunks/{reload-plugins-CgzAjBDp.js → reload-plugins-C8lWCq8M.js} +1 -1
- package/dist/chunks/{remote-env-BasfU8Ra.js → remote-env-tQuvJmrt.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-IJI5koHz.js → remoteBridgeCore-CwOTDmNP.js} +1 -1
- package/dist/chunks/{remoteControlServer-BBCt7ySV.js → remoteControlServer-DIKi-0lr.js} +2 -2
- package/dist/chunks/rename-Trg9EHjT.js +1 -0
- package/dist/chunks/{resume-DjnfattK.js → resume-Nt_EbjKh.js} +2 -2
- package/dist/chunks/{runtimeObserver-ByTBtmBf.js → runtimeObserver-CyWhTJpz.js} +4 -4
- package/dist/chunks/{runtimeObserver-COpkJmg-.js → runtimeObserver-T9QERJ_O.js} +1 -1
- package/dist/chunks/sandbox-adapter-BDGhDrPl.js +1 -0
- package/dist/chunks/{sandbox-toggle-CQohaYND.js → sandbox-toggle-C6v31S7-.js} +1 -1
- package/dist/chunks/searchExtraTools-C8ehknh0.js +1 -0
- package/dist/chunks/{sentry-C0bQlih_.js → sentry-CK_GHX79.js} +1 -1
- package/dist/chunks/{session-Dx_ODOHl.js → session-Ys3KvmQ0.js} +1 -1
- package/dist/chunks/{sessionDiscovery-DAqs0Ra6.js → sessionDiscovery-Cg3X2fKe.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-vthxapHk.js +1 -0
- package/dist/chunks/sessionMemory-ek1SfYG_.js +1 -0
- package/dist/chunks/sessionMemory-l-S0jpuk.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BGJeJyKn.js +1 -0
- package/dist/chunks/sessionObserver-COTvvM3Z.js +1 -0
- package/dist/chunks/{sessionObserver-rd6RRTzc.js → sessionObserver-DvAdG6vQ.js} +2 -2
- package/dist/chunks/sessionStorage-GKe4ALVr.js +1 -0
- package/dist/chunks/{sessionTitle-1k_2BhFL.js → sessionTitle-DJMmUKBJ.js} +2 -2
- package/dist/chunks/{sessionTracing-DNSDPYdR.js → sessionTracing-DuQ3kbq6.js} +1 -1
- package/dist/chunks/{settingsSync-3xG2A_wN.js → settingsSync-1mhDakFG.js} +1 -1
- package/dist/chunks/{setup-Hlga8GJ_.js → setup-CAy0HkI3.js} +1 -1
- package/dist/chunks/setup-CGxUKG8x.js +3 -0
- package/dist/chunks/{setup-CY808VaY.js → setup-D5ioKRsS.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-BdBNo5eP.js → shadowedRuleDetection-Cq0y9pLR.js} +1 -1
- package/dist/chunks/{sideQuestion-DWOCUKMh.js → sideQuestion-ZII6LMSM.js} +3 -3
- package/dist/chunks/{sink-DCh0VJ4g.js → sink-Cd5g6Qqh.js} +1 -1
- package/dist/chunks/sink-Df9tds-b.js +1 -0
- package/dist/chunks/sinks-C4DwU8Xs.js +1 -0
- package/dist/chunks/{sinks-_9T2oPB_.js → sinks-DZlIEjLZ.js} +2 -2
- package/dist/chunks/{skill-learning-CzZFGFZO.js → skill-learning-DO21PjpF.js} +1 -1
- package/dist/chunks/skillChangeDetector-B6tL2yC9.js +1 -0
- package/dist/chunks/{skillGapStore-DJm3SULe.js → skillGapStore-B_xv3GUy.js} +1 -1
- package/dist/chunks/{skillGapStore-Bz_qbwI1.js → skillGapStore-CTD8MYTx.js} +2 -2
- package/dist/chunks/{skillGenerator-BcNv-VZ5.js → skillGenerator-CO9r-gft.js} +2 -2
- package/dist/chunks/skillLearning-BJS4lsNk.js +1 -0
- package/dist/chunks/skillLearning-C2NmdcYQ.js +1 -0
- package/dist/chunks/{skillPanel-Q85P-Gg4.js → skillPanel-DSumFGKN.js} +3 -3
- package/dist/chunks/{skillSearchPanel-CMCQDAcX.js → skillSearchPanel-SqkfYBjV.js} +4 -4
- package/dist/chunks/{skills-D3eUg3HG.js → skills-Bj3g5apl.js} +1 -1
- package/dist/chunks/{sprites-ChoMSqpa.js → sprites-CxMz3tIE.js} +1 -1
- package/dist/chunks/{stats-DdhEa_6-.js → stats-D1wYx84O.js} +1 -1
- package/dist/chunks/{status-CX7Kgn21.js → status-BWCqbeJ3.js} +1 -1
- package/dist/chunks/statusNoticeHelpers-DY0Cblkd.js +1 -0
- package/dist/chunks/{tag-BJ_u3aJm.js → tag-Hc7nOYm5.js} +2 -2
- package/dist/chunks/{tasks-DeEWOchP.js → tasks-BSqecqVm.js} +1 -1
- package/dist/chunks/{teamHelpers-WmWa_h3B.js → teamHelpers-BOmVFTLS.js} +1 -1
- package/dist/chunks/teamHelpers-BueGmQcw.js +1 -0
- package/dist/chunks/{teammateModeSnapshot-DZ6ulELC.js → teammateModeSnapshot-DhXjREuo.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-_MCm6NGJ.js +1 -0
- package/dist/chunks/teleport-W2iPwivh.js +1 -0
- package/dist/chunks/{templateJobs-nFBp68za.js → templateJobs-1oMC9yLQ.js} +1 -1
- package/dist/chunks/{terminalSetup-DULcnnWe.js → terminalSetup-Bkml3uSP.js} +1 -1
- package/dist/chunks/{terminalSetup-BORjK3qH.js → terminalSetup-DJX1hqKs.js} +1 -1
- package/dist/chunks/{theme-Bf2QD0ja.js → theme-ia4cIc4d.js} +1 -1
- package/dist/chunks/thinkback-1NYskewu.js +1 -0
- package/dist/chunks/{thinkback-DZEhr3Ii.js → thinkback-DWLUXUQC.js} +1 -1
- package/dist/chunks/thinkback-play-DZmXMRtq.js +1 -0
- package/dist/chunks/{toolEventObserver-DMdrez6V.js → toolEventObserver-Ci0BECRu.js} +1 -1
- package/dist/chunks/{toolEventObserver-CNZy5TpN.js → toolEventObserver-nPwMQ5Vf.js} +1 -1
- package/dist/chunks/toolPool-ByCdlOak.js +1 -0
- package/dist/chunks/toolPool-IkNWjuk2.js +1 -0
- package/dist/chunks/{trustedDevice-Dw2crViN.js → trustedDevice-BynTLVs4.js} +1 -1
- package/dist/chunks/{trustedDevice-DWb5CPB_.js → trustedDevice-CtL2IGDX.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-BfN25zni.js → ultrareviewCommand-DN-QhQ-f.js} +2 -2
- package/dist/chunks/undercover-CqJzV_Ar.js +1 -0
- package/dist/chunks/{undercover-rcR56jZx.js → undercover-DLr5xI3K.js} +1 -1
- package/dist/chunks/{updateCCB-DlTAqQJq.js → updateCCB-C6Ov8SNx.js} +4 -4
- package/dist/chunks/{upgrade-ClLcX7zy.js → upgrade-CVM1ffhq.js} +1 -1
- package/dist/chunks/upgrade-d40dVpDc.js +1 -0
- package/dist/chunks/{upload-BqEzK59v.js → upload-DSNwGLNd.js} +1 -1
- package/dist/chunks/{usage-BgKDh8pQ.js → usage-BRv8mBDf.js} +1 -1
- package/dist/chunks/{usage-DW-akzSR.js → usage-GMw8NiO_.js} +1 -1
- package/dist/chunks/{useMainLoopModel-BTpZ8k3k.js → useMainLoopModel-CEM_50a0.js} +1 -1
- package/dist/chunks/{useManagePlugins-z0qezP5r.js → useManagePlugins-hCqb5F5n.js} +1 -1
- package/dist/chunks/{useMergedTools-B78rAreW.js → useMergedTools-DxvRmxVF.js} +1 -1
- package/dist/chunks/{useSearchInput-CwxF3CHN.js → useSearchInput-BCErnYur.js} +1 -1
- package/dist/chunks/useSettingsErrors-BwNeCSA6.js +1 -0
- package/dist/chunks/{useVoice-X5WSnyed.js → useVoice-Cu39ifSa.js} +1 -1
- package/dist/chunks/{util-CP-_gsEO.js → util-DYuasrIE.js} +1 -1
- package/dist/chunks/utils-DSGFJaZ_.js +1 -0
- package/dist/chunks/{validatePlugin-DUuaprqR.js → validatePlugin-b1ec7M7n.js} +1 -1
- package/dist/chunks/{vim-BfmsdxOa.js → vim-CrAzv4cM.js} +1 -1
- package/dist/chunks/{voice-B3GIfFlB.js → voice-DKG3SYqi.js} +2 -2
- package/dist/chunks/{voiceModeEnabled-C1Q9j5q6.js → voiceModeEnabled-By2qa3A2.js} +1 -1
- package/dist/chunks/voiceModeEnabled-DwYcj-FH.js +1 -0
- package/dist/chunks/voiceStreamSTT-DD8ulbg1.js +1 -0
- package/dist/chunks/{voiceStreamSTT-BguyxdrW.js → voiceStreamSTT-DEV82xnN.js} +1 -1
- package/dist/chunks/{web-tools-qf_VwWRn.js → web-tools-8QRyE7va.js} +1 -1
- package/dist/chunks/windowsPaths-CRq9Bt5c.js +1 -0
- package/dist/chunks/windowsPaths-jbJ-skB_.js +1 -0
- package/dist/chunks/{workerRegistry-SbiLJIsG.js → workerRegistry-S7pO5khK.js} +1 -1
- package/dist/chunks/worktree-CfXrXsQ2.js +1 -0
- package/dist/chunks/{xml-D7-jJqSA.js → xml-CPJXOUFt.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-Do-Qth0X.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-DSeAqhMC.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DTZS-dek.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-UcQCmIWd.js +0 -1
- package/dist/chunks/DiffDialog-BfSnz8L-.js +0 -3
- package/dist/chunks/Doctor-BOVjkAKn.js +0 -3
- package/dist/chunks/Doctor-osWC5WVY.js +0 -1
- package/dist/chunks/Grove-DyC_Wrfx.js +0 -1
- package/dist/chunks/MCPConnectionManager-2Fulnp8q.js +0 -1
- package/dist/chunks/MessageSelector-B4jJQ-KQ.js +0 -3
- package/dist/chunks/Messages-ltcn1Qkf.js +0 -11
- package/dist/chunks/PluginSettings-DIS_qrVA.js +0 -17
- package/dist/chunks/QueryEngine-BQs519Rb.js +0 -1
- package/dist/chunks/REPL-DJh_wVWI.js +0 -1
- package/dist/chunks/ResumeConversation-BK7L_YBI.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +0 -1
- package/dist/chunks/SentryErrorBoundary-DLML64E_.js +0 -1
- package/dist/chunks/Settings-DOve7mW1.js +0 -2
- package/dist/chunks/api-CoBZPEi-.js +0 -1
- package/dist/chunks/asciicast-DA6TudSH.js +0 -1
- package/dist/chunks/assistant-B2_c5C4T.js +0 -1
- package/dist/chunks/auth-CRVuUNwf.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +0 -1
- package/dist/chunks/backgroundHousekeeping-Cll7XHG1.js +0 -17
- package/dist/chunks/bridgeConfig-pVTHa_ED.js +0 -1
- package/dist/chunks/bridgeEnabled-c_BeJX3S.js +0 -1
- package/dist/chunks/bridgeMain-CHk_DCxy.js +0 -1
- package/dist/chunks/bridgeMain-DVoobI7G.js +0 -68
- package/dist/chunks/caches-3byHT6VF.js +0 -1
- package/dist/chunks/changeDetector-Cg75mKOu.js +0 -1
- package/dist/chunks/channelNotification-BSmZprUZ.js +0 -1
- package/dist/chunks/clear-CTOCrXv_.js +0 -1
- package/dist/chunks/client-BgdjJNnC.js +0 -1
- package/dist/chunks/color-BP4FmcMn.js +0 -1
- package/dist/chunks/commands-CkfOhzGE.js +0 -1
- package/dist/chunks/commitAttribution-DKvggTZx.js +0 -1
- package/dist/chunks/compact-BtAvCkY0.js +0 -3
- package/dist/chunks/context-noninteractive-DNOyQYnM.js +0 -1
- package/dist/chunks/conversation-DR4MFYYi.js +0 -1
- package/dist/chunks/conversation-DVhyJA1O.js +0 -1
- package/dist/chunks/createSession-CIM50iEU.js +0 -1
- package/dist/chunks/datadog-vQKKqB6Z.js +0 -1
- package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +0 -1
- package/dist/chunks/exit-CwGJifQF.js +0 -1
- package/dist/chunks/extra-usage-1FUBiJOE.js +0 -1
- package/dist/chunks/extraUsage-Ca_6qcke.js +0 -1
- package/dist/chunks/extractMemories-B-yrLjpP.js +0 -1
- package/dist/chunks/fast-CFtN26up.js +0 -1
- package/dist/chunks/gates-4fq2Ws2D.js +0 -1
- package/dist/chunks/hooks-CmW7bdtz.js +0 -1
- package/dist/chunks/inboundAttachments-DZiITyN8.js +0 -1
- package/dist/chunks/initReplBridge-YGXqLbNZ.js +0 -1
- package/dist/chunks/language-CiMwEWO-.js +0 -1
- package/dist/chunks/loadAgentsDir-CjhNkoq0.js +0 -1
- package/dist/chunks/loadPluginHooks-DukITDP2.js +0 -1
- package/dist/chunks/localSearch-D8FFon8N.js +0 -1
- package/dist/chunks/login-B3TV33p4.js +0 -1
- package/dist/chunks/logout-BqbTEPv9.js +0 -1
- package/dist/chunks/mcp-DtHGTZUo.js +0 -1
- package/dist/chunks/mcp-Vj0ijoSq.js +0 -6
- package/dist/chunks/model-BYSyXf9-.js +0 -1
- package/dist/chunks/permissions-B39hfy0O.js +0 -3
- package/dist/chunks/pluginBlocklist-D2Cj4TR2.js +0 -1
- package/dist/chunks/pluginOperations-DDI1CG0K.js +0 -2
- package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +0 -1
- package/dist/chunks/plugins-Bz7JxD43.js +0 -4
- package/dist/chunks/policyLimits-C-oHygGe.js +0 -1
- package/dist/chunks/poorMode-D2-4vRxb.js +0 -1
- package/dist/chunks/processBashCommand-BjdUo_Na.js +0 -1
- package/dist/chunks/processSlashCommand-tetvMLMl.js +0 -6
- package/dist/chunks/prompt-DZ1EAUlC.js +0 -1
- package/dist/chunks/prompt-DeRHlPn1.js +0 -1
- package/dist/chunks/rate-limit-options-B6QH2-xn.js +0 -1
- package/dist/chunks/refresh-DmEsCaJ0.js +0 -1
- package/dist/chunks/registry-CLaXh4Gk.js +0 -1
- package/dist/chunks/rename-eEdSZsJ2.js +0 -1
- package/dist/chunks/sandbox-adapter-DagBhoTC.js +0 -1
- package/dist/chunks/searchExtraTools-kk-wV-cC.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-C-Ic-0Ry.js +0 -1
- package/dist/chunks/sessionMemory-BMtFup-Y.js +0 -1
- package/dist/chunks/sessionMemory-Bq3ECr1S.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BU7N_IQG.js +0 -1
- package/dist/chunks/sessionObserver-BwAfzGUg.js +0 -1
- package/dist/chunks/sessionStorage-X2u45U9z.js +0 -1
- package/dist/chunks/setup-C2V4elOv.js +0 -3
- package/dist/chunks/sink-nZmawD5W.js +0 -1
- package/dist/chunks/sinks-BTZnXPr_.js +0 -1
- package/dist/chunks/skillChangeDetector-345QNWDp.js +0 -1
- package/dist/chunks/skillLearning-BJAfTX2G.js +0 -1
- package/dist/chunks/skillLearning-DPhuKS4j.js +0 -1
- package/dist/chunks/statusNoticeHelpers-AibXOONm.js +0 -1
- package/dist/chunks/teamHelpers-CxoQp7OY.js +0 -1
- package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +0 -1
- package/dist/chunks/teleport-CuDXJj_f.js +0 -1
- package/dist/chunks/thinkback-C1nnGg5r.js +0 -1
- package/dist/chunks/thinkback-play-BtEBESXM.js +0 -1
- package/dist/chunks/toolPool-DDj2TbY6.js +0 -1
- package/dist/chunks/toolPool-DHQyHmDY.js +0 -1
- package/dist/chunks/undercover-DSp7SB7e.js +0 -1
- package/dist/chunks/upgrade-kf1QWUo7.js +0 -1
- package/dist/chunks/useSettingsErrors-CjDaon07.js +0 -1
- package/dist/chunks/utils-CULcnflj.js +0 -1
- package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +0 -1
- package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +0 -1
- package/dist/chunks/windowsPaths-BeDSnJ23.js +0 -2
- package/dist/chunks/windowsPaths-ttHiMKpR.js +0 -1
- package/dist/chunks/worktree-Djga1wtm.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,F as r,Rn as i,Vt as a,b as o,nt as s,t as c,x as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,oo as f}from"./paths-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,F as r,Rn as i,Vt as a,b as o,nt as s,t as c,x as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,oo as f}from"./paths-nIHVpTn2.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{Dj as h,Fj as g,Oj as _,Sj as v,dC as y,fC as b,mC as x,wj as S,xj as C}from"./loadAgentsDir-BfEZacjM.js";import{t as w}from"./useKeybinding-DPOUuymz.js";import{n as T,t as E}from"./useMainLoopModel-CEM_50a0.js";function D(e){return typeof e==`string`&&e!==`ultracode`&&A.includes(e)}function O(e){if(e!=null&&typeof e!=`number`&&D(e))return e}function ee(e){let t=A.indexOf(e);return t<=0?A[0]:A[t-1]}function te(e){let t=A.indexOf(e);return t===-1||t>=A.length-1?A[A.length-1]:A[t+1]}function k(e){return e===`ultracode`}function ne(e){let t=O(e.envOverride);return t===void 0?e.displayed:t}function re(e,t){if(k(e))return{kind:`ultracode-hint`,message:j};let n=t(e);return{kind:`apply`,message:n.message,effortUpdate:n.effortUpdate}}var A,j,M,ie=e((()=>{A=[`low`,`medium`,`high`,`xhigh`,`max`,`ultracode`],j=`ultracode is not an effort level. Use /ultracode <context> to start a multi-agent workflow.`,M=`Effort unchanged.`}));function ae(e){let[t,r]=n(e?N:null);return[t,e?r:0]}var N,oe=e((()=>{c(),N=60}));function se(e){if(!/^#[0-9a-fA-F]{6}$/.test(e))return{h:0,s:0,l:0};let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;if(s===0)return{h:0,s:0,l:o};let c=s/(1-Math.abs(2*o-1)),l;return l=i===t?60*((n-r)/s%6):i===n?60*((r-t)/s+2):60*((t-n)/s+4),l<0&&(l+=360),{h:l,s:c,l:o}}function ce(e,t,n){let r=(e%360+360)%360,i=(1-Math.abs(2*n-1))*t,a=r/60,o=i*(1-Math.abs(a%2-1)),s=0,c=0,l=0;a<1?(s=i,c=o):a<2?(s=o,c=i):a<3?(c=i,l=o):a<4?(c=o,l=i):a<5?(s=o,l=i):(s=i,l=o);let u=n-i/2,d=e=>Math.round((e+u)*255).toString(16).padStart(2,`0`);return`#${d(s)}${d(c)}${d(l)}`}function P(e,t){if(!/^#[0-9a-fA-F]{6}$/.test(e)||t===0)return e;let{h:n,s:r,l:i}=se(e);return ce(n+t,r,i)}function F(e){return e*L%360}function le(e,t=0){let n=e<0?0:e>1?1:e,r=I[Math.min(I.length-1,Math.floor(n*I.length))];return t===0?r:P(r,t)}function ue(e){let{y:t,width:n,time:r,sourceX:i,sourceY:a}=e;if(n<=0)return[];let o=F(r),s=Array(n);for(let e=0;e<n;e++){let n=e-i,c=(t-a)*1.5,l=Math.sqrt(n*n+c*c),u=l*.35-r*.004;s[e]={char:z,color:le((Math.sin(u)+1)/2*Math.max(0,1-l/90),o)}}return s}function de(e,t){let n=e.map(e=>({...e}));for(let e of t){let t=e.x;if(!(t>=n.length))for(let r=0;r<e.text.length;r++){let i=t+r;if(!(i<0)){if(i>=n.length)break;n[i]={char:e.text[r],color:e.color??n[i].color}}}}return n}function fe(e){if(e.length===0)return[];let t=[],n={text:e[0].char,color:e[0].color};for(let r=1;r<e.length;r++){let i=e[r];i.color===n.color?n.text+=i.char:(t.push(n),n={text:i.char,color:i.color})}return t.push(n),t}function pe(e,t){if(e===`transparent`)return R;let n=t<0?0:t>1?1:t;if(n<=.01)return R;if(!/^#[0-9a-fA-F]{6}$/.test(e))return e;let r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return`#${Math.round(r*n).toString(16).padStart(2,`0`)}${Math.round(i*n).toString(16).padStart(2,`0`)}${Math.round(a*n).toString(16).padStart(2,`0`)}`}function me(e,t){return e.map(e=>({char:e.char,color:pe(e.color,t)}))}var I,L,R,z,he=e((()=>{I=[`#1a1f3a`,`#1f2543`,`#252c55`,`#2e3870`,`#3a4582`,`#4a5bb0`,`#5769F7`],L=.03,R=`transparent`,z=` `}));function ge(e){let t=e-2;return t<=W*A.length?W:Math.floor(t/A.length)}function _e(e){let t=Math.max(0,Math.floor((e-9)/2));return e*(A.length-1)+t+4}function B(e,t,n){return n*e+Math.max(0,Math.floor((n-t)/2))}function ve({appStateEffort:e,onDone:t}){let n=x(),i=T(),{columns:a}=r(),c=H.useMemo(()=>ge(a),[a]),u=c*A.length,d=H.useMemo(()=>_e(c),[c]),f=v(),p=ne({envOverride:f,appStateEffort:e,displayed:C(i,e)}),[m,h]=H.useState(p),[g,_]=H.useState(!1),y=m===`ultracode`,[b,S]=H.useState(0),w=y||b>.001,[E,D]=ae(w);H.useEffect(()=>{if(!w)return;let e=+!!y;S(t=>{if(t===e)return t;let n=e>t?t+Y:t-Y;return e>t?Math.min(e,n):Math.max(e,n)})},[D,y,w]),s({"effortPanel:decrease":()=>h(e=>ee(e)),"effortPanel:increase":()=>h(e=>te(e)),"effortPanel:home":()=>h(`low`),"effortPanel:end":()=>h(`ultracode`),"effortPanel:confirm":H.useCallback(()=>{if(g)return;_(!0);let e=re(m,Q);e.kind===`apply`&&e.effortUpdate&&n(t=>({...t,effortValue:e.effortUpdate.value})),t(e.message)},[m,g,t,n]),"effortPanel:cancel":H.useCallback(()=>{g||(_(!0),t(M))},[g,t])},{context:`EffortPanel`});let O=f!=null,k=process.env.CLAUDE_CODE_EFFORT_LEVEL,j=H.useCallback((e,t)=>fe(me(de(ue({y:e+X,width:u,time:D,sourceX:d,sourceY:X}),t),b)),[D,b,u,d]);return(0,U.jsxs)(l,{ref:E,flexDirection:`column`,paddingX:1,width:u+2,children:[(0,U.jsx)(o,{bold:!0,color:`suggestion`,children:`Effort`}),O&&(0,U.jsx)(o,{color:`warning`,children:`⚠ CLAUDE_CODE_EFFORT_LEVEL=${k} overrides this session`}),w?(0,U.jsx)(be,{renderRow:j,cursor:m,fade:b,segment:c,panelWidth:u,time:D}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ye,{cursor:m,segment:c,panelWidth:u}),(0,U.jsx)(l,{marginTop:1,children:(0,U.jsx)(o,{color:`subtle`,children:`←/→ adjust · Enter confirm · Esc cancel`})})]})]})}function ye({cursor:e,segment:t,panelWidth:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(l,{marginTop:1,flexDirection:`row`,justifyContent:`space-between`,children:[(0,U.jsx)(o,{color:`suggestion`,children:`Faster`}),(0,U.jsx)(o,{color:`suggestion`,children:`Smarter`})]}),(0,U.jsx)(o,{color:`subtle`,children:`─`.repeat(n)}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:!0,color:e===n?`suggestion`:`subtle`,children:e===n?`▲`:` `})},`cursor-${n}`))}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:e===n,color:e===n?`suggestion`:`subtle`,children:n})},`label-${n}`))}),(0,U.jsxs)(l,{flexDirection:`row`,children:[(0,U.jsx)(l,{width:t*(A.length-1)}),(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{color:`subtle`,children:G})})]})]})}function be({renderRow:e,cursor:t,segment:n,panelWidth:r,time:i}){let a=A.indexOf(t),s=A.length-1,c=F(i),l=P(J,c),u=P(K,c),d=P(q,c),f={text:`Faster`,x:0,color:l},p={text:`Smarter`,x:r-7,color:l},m={text:`─`.repeat(r),x:0,color:d},h={text:`▲`,x:B(a,1,n),color:l},g=A.map((e,r)=>({text:e,x:B(r,e.length,n),color:e===t?u:d})),_={text:G,x:B(s,17,n),color:d};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(V,{segments:e(-4,[])}),(0,U.jsx)(V,{segments:e(-3,[f,p])}),(0,U.jsx)(V,{segments:e(-2,[m])}),(0,U.jsx)(V,{segments:e(-1,[h])}),(0,U.jsx)(V,{segments:e(0,g)}),(0,U.jsx)(V,{segments:e(1,[_])}),(0,U.jsx)(V,{segments:e(2,[])}),(0,U.jsx)(o,{color:q,children:`←/→ adjust · Enter confirm · Esc cancel`})]})}function V({segments:e}){let t=[];for(let n of e){let e=``,r=null,i=()=>{e===``||r===null||(t.push({text:e,kind:r?`space`:`text`,color:n.color}),e=``,r=null)};for(let t of n.text){let n=t===` `;r===null?(e=t,r=n):n===r?e+=t:(i(),e=t,r=n)}i()}return(0,U.jsx)(l,{flexDirection:`row`,children:t.map((e,t)=>e.kind===`space`?e.color===`transparent`?(0,U.jsx)(a,{children:e.text},t):(0,U.jsx)(a,{backgroundColor:e.color,children:e.text},t):(0,U.jsx)(o,{color:e.color,bold:!0,children:e.text},t))})}var H,U,W,G,K,q,J,Y,X,xe=e((()=>{H=t(i(),1),c(),w(),h(),ie(),Ae(),E(),y(),oe(),he(),U=u(),W=12,G=`xhigh + workflows`,K=`#5769F7`,q=`#7a8eff`,J=`#5769F7`,Y=.2,X=0}));function Se(e){let t=g(e);if(t!==void 0){let e=d(`userSettings`,{effortLevel:t});if(e.error)return{message:`Failed to set effort level: ${e.error.message}`}}m(`tengu_effort_command`,{effort:e});let n=v();if(n!==void 0&&n!==e){let n=process.env.CLAUDE_CODE_EFFORT_LEVEL;return t===void 0?{message:`Not applied: CLAUDE_CODE_EFFORT_LEVEL=${n} overrides effort this session, and ${e} is session-only (nothing saved)`,effortUpdate:{value:e}}:{message:`CLAUDE_CODE_EFFORT_LEVEL=${n} overrides this session — clear it and ${e} takes over`,effortUpdate:{value:e}}}let r=S(e);return{message:`Set effort level to ${e}${t===void 0?` (this session only)`:``}: ${r}`,effortUpdate:{value:e}}}function Z(e,t){let n=v(),r=n===null?void 0:n??e;return r===void 0?{message:`Effort level: auto (currently ${C(t,e)})`}:{message:`Current effort level: ${r} (${S(r)})`}}function Ce(){let e=d(`userSettings`,{effortLevel:void 0});return e.error?{message:`Failed to set effort level: ${e.error.message}`}:(m(`tengu_effort_command`,{effort:`auto`}),v()==null?{message:`Effort level set to auto`,effortUpdate:{value:void 0}}:{message:`Cleared effort from settings, but CLAUDE_CODE_EFFORT_LEVEL=${process.env.CLAUDE_CODE_EFFORT_LEVEL} still controls this session`,effortUpdate:{value:void 0}})}function Q(e){let t=e.toLowerCase();return t===`auto`||t===`unset`?Ce():_(t)?Se(t):{message:`Invalid argument: ${e}. Valid options are: low, medium, high, max, auto`}}function we({onDone:e}){let{message:t}=Z(b(e=>e.effortValue),T());return e(t),null}function Te({result:e,onDone:t}){let n=x(),{effortUpdate:r,message:i}=e;return Oe.useEffect(()=>{r&&n(e=>({...e,effortValue:r.value})),t(i)},[n,r,i,t]),null}async function Ee(e,t,n){if(n=n?.trim()||``,ke.includes(n)){e(`Usage: /effort [low|medium|high|xhigh|max|auto]
|
|
2
2
|
|
|
3
3
|
Effort levels:
|
|
4
4
|
- low: Quick, straightforward implementation
|
|
@@ -6,4 +6,4 @@ Effort levels:
|
|
|
6
6
|
- high: Comprehensive implementation with extensive testing
|
|
7
7
|
- xhigh: Extended reasoning beyond high, short of max; including ChatGPT Codex models
|
|
8
8
|
- max: Maximum capability with deepest reasoning; maps to xhigh for ChatGPT Codex models
|
|
9
|
-
- auto: Use the default effort level for your model`);return}return!n||n===`current`||n===`status`?n===`current`||n===`status`?(0,$.jsx)(we,{onDone:e}):(0,$.jsx)(De,{onDone:e}):(0,$.jsx)(Te,{result:Q(n),onDone:e})}function De({onDone:e}){return(0,$.jsx)(ve,{appStateEffort:
|
|
9
|
+
- auto: Use the default effort level for your model`);return}return!n||n===`current`||n===`status`?n===`current`||n===`status`?(0,$.jsx)(we,{onDone:e}):(0,$.jsx)(De,{onDone:e}):(0,$.jsx)(Te,{result:Q(n),onDone:e})}function De({onDone:e}){return(0,$.jsx)(ve,{appStateEffort:b(e=>e.effortValue),onDone:e})}var Oe,$,ke,Ae=e((()=>{Oe=t(i(),1),xe(),E(),p(),y(),h(),f(),$=u(),ke=[`help`,`-h`,`--help`]}));Ae();export{Ee as call,Q as executeEffort,Z as showCurrentEffort};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{a as n,c as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./classPrivateFieldSet2-EAQNhHs8.js";import{Cn as f,Ln as p,Mn as m,Tt as h,Xn as g,Yn as _,_r as ee,kt as v,nn as y,un as b,vt as te,wn as x}from"./schemas-BGAvj1T4.js";import{t as ne}from"./v4-f1i_CNUT.js";import{Hr as re,Tt as ie,Vr as ae,cn as S,jr as C,lr as oe,ot as se}from"./state-sIHsFpDu.js";import{Dr as ce,Pr as le,no as ue,oc as de,oo as fe,yc as pe}from"./paths-CEAy4QCs.js";import{l as me,p as he,r as ge}from"./sessionStoragePortable-CJUZrbIq.js";import{Bf as _e,Ep as ve,Fr as ye,G as be,Jv as xe,K as Se,Sr as Ce,Ta as we,Tp as Te,Xu as Ee,Zi as De,Zu as Oe,bD as ke,i as Ae,na as je,o as Me,qv as Ne,wa as Pe,yD as Fe,zf as Ie}from"./loadAgentsDir-DC4jN6-f.js";import{Qn as Le,Zn as Re}from"./prompt-BHI7PZe4.js";import{o as ze,t as Be}from"./fileStateCache-BhVfo23e.js";import{t as Ve}from"./QueryEngine-BQs519Rb.js";import{dirname as He}from"node:path";import{randomUUID as w}from"node:crypto";import{Readable as Ue,Writable as We}from"node:stream";import{unlink as Ge}from"node:fs/promises";import*as T from"node:path/posix";import{isAbsolute as Ke,resolve as qe}from"node:path/posix";ne();var E={authenticate:`authenticate`,document_did_change:`document/didChange`,document_did_close:`document/didClose`,document_did_focus:`document/didFocus`,document_did_open:`document/didOpen`,document_did_save:`document/didSave`,initialize:`initialize`,logout:`logout`,nes_accept:`nes/accept`,nes_close:`nes/close`,nes_reject:`nes/reject`,nes_start:`nes/start`,nes_suggest:`nes/suggest`,session_cancel:`session/cancel`,session_close:`session/close`,session_fork:`session/fork`,session_list:`session/list`,session_load:`session/load`,session_new:`session/new`,session_prompt:`session/prompt`,session_resume:`session/resume`,session_set_config_option:`session/set_config_option`,session_set_mode:`session/set_mode`,session_set_model:`session/set_model`},D={elicitation_complete:`elicitation/complete`,elicitation_create:`elicitation/create`,fs_read_text_file:`fs/read_text_file`,fs_write_text_file:`fs/write_text_file`,session_request_permission:`session/request_permission`,session_update:`session/update`,terminal_create:`terminal/create`,terminal_kill:`terminal/kill`,terminal_output:`terminal/output`,terminal_release:`terminal/release`,terminal_wait_for_exit:`terminal/wait_for_exit`},Je=x({_meta:m(p(),g()).nullish(),terminal:v().optional().default(!1)}),Ye=x({_meta:m(p(),g()).nullish(),label:p().nullish(),name:p(),optional:v().optional().default(!1),secret:v().optional().default(!0)}),Xe=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),name:p()}),Ze=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),link:p().nullish(),name:p(),vars:h(Ye)}),Qe=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),description:p().nullish(),env:m(p(),p()).optional(),id:p(),name:p()}),$e=_([Ze.and(x({type:b(`env_var`)})),Qe.and(x({type:b(`terminal`)})),Xe]),et=x({_meta:m(p(),g()).nullish(),methodId:p()}),tt=x({_meta:m(p(),g()).nullish()}),nt=x({_meta:m(p(),g()).nullish(),blob:p(),mimeType:p().nullish(),uri:p()}),rt=x({default:v().nullish(),description:p().nullish(),title:p().nullish()}),it=x({_meta:m(p(),g()).nullish()}),at=x({_meta:m(p(),g()).nullish()}),ot=x({amount:f(),currency:p()}),st=x({_meta:m(p(),g()).nullish(),terminalId:p()}),ct=x({_meta:m(p(),g()).nullish(),newText:p(),oldText:p().nullish(),path:p()}),lt=_([p(),f(),f(),v(),h(p())]),ut=y(_([x({content:m(p(),lt).nullish()}).and(x({action:b(`accept`)})),x({action:b(`decline`)}),x({action:b(`cancel`)})]),x({_meta:m(p(),g()).nullish()})),dt=x({_meta:m(p(),g()).nullish()}),ft=p(),pt=x({_meta:m(p(),g()).nullish(),elicitationId:ft}),mt=b(`object`),ht=b(`string`),gt=x({_meta:m(p(),g()).nullish()}),_t=x({_meta:m(p(),g()).nullish(),form:dt.nullish(),url:gt.nullish()}),vt=x({const:p(),title:p()}),yt=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),bt=x({code:_([b(-32700),b(-32600),b(-32601),b(-32602),b(-32603),b(-32800),b(-32e3),b(-32002),b(-32042),f().int().min(-2147483648,{message:`Invalid value: Expected int32 to be >= -2147483648`}).max(2147483647,{message:`Invalid value: Expected int32 to be <= 2147483647`})]),data:g().optional(),message:p()}),xt=g(),St=g(),Ct=g(),wt=x({_meta:m(p(),g()).nullish(),readTextFile:v().optional().default(!1),writeTextFile:v().optional().default(!1)}),Tt=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),Et=x({_meta:m(p(),g()).nullish(),name:p(),title:p().nullish(),version:p()}),Dt=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),Ot=x({_meta:m(p(),g()).nullish()}),kt=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cursor:p().nullish(),cwd:p().nullish()}),At=x({_meta:m(p(),g()).nullish()}),jt=x({_meta:m(p(),g()).nullish(),logout:At.nullish()}),Mt=x({_meta:m(p(),g()).nullish()}),Nt=x({_meta:m(p(),g()).nullish()}),Pt=x({_meta:m(p(),g()).nullish(),http:v().optional().default(!1),sse:v().optional().default(!1)}),Ft=x({_meta:m(p(),g()).nullish(),headers:h(Tt),name:p(),url:p()}),It=x({_meta:m(p(),g()).nullish(),headers:h(Tt),name:p(),url:p()}),Lt=x({_meta:m(p(),g()).nullish(),args:h(p()),command:p(),env:h(yt),name:p()}),O=_([Ft.and(x({type:b(`http`)})),It.and(x({type:b(`sse`)})),Lt]),Rt=p(),zt=x({_meta:m(p(),g()).nullish(),description:p().nullish(),modelId:Rt,name:p()}),Bt=_([b(`error`),b(`warning`),b(`information`),b(`hint`)]),Vt=x({_meta:m(p(),g()).nullish()}),Ht=x({_meta:m(p(),g()).nullish()}),Ut=x({_meta:m(p(),g()).nullish()}),Wt=x({_meta:m(p(),g()).nullish()}),Gt=x({_meta:m(p(),g()).nullish()}),Kt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),qt=x({diff:p(),uri:p()}),Jt=x({endLine:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),startLine:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),text:p()}),Yt=x({_meta:m(p(),g()).nullish()}),Xt=x({_meta:m(p(),g()).nullish()}),Zt=x({languageId:p(),text:p(),uri:p()}),Qt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),$t=_([b(`rejected`),b(`ignored`),b(`replaced`),b(`cancelled`)]),en=x({excerpts:h(Jt),uri:p()}),tn=x({_meta:m(p(),g()).nullish()}),nn=x({_meta:m(p(),g()).nullish()}),rn=x({name:p(),owner:p(),remoteUrl:p()}),an=x({_meta:m(p(),g()).nullish()}),on=x({_meta:m(p(),g()).nullish(),jump:Yt.nullish(),rename:nn.nullish(),searchAndReplace:an.nullish()}),sn=x({id:p(),isRegex:v().nullish(),replace:p(),search:p(),uri:p()}),cn=_([b(`automatic`),b(`diagnostic`),b(`manual`)]),ln=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),un=x({_meta:m(p(),g()).nullish(),diagnostics:Vt.nullish(),editHistory:Kt.nullish(),openFiles:Xt.nullish(),recentFiles:Qt.nullish(),relatedSnippets:tn.nullish(),userActions:ln.nullish()}),dn=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O)}),fn=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),pn=p(),mn=_([b(`allow_once`),b(`allow_always`),b(`reject_once`),b(`reject_always`)]),hn=x({_meta:m(p(),g()).nullish(),kind:mn,name:p(),optionId:pn}),gn=_([b(`high`),b(`medium`),b(`low`)]),_n=_([b(`pending`),b(`in_progress`),b(`completed`)]),vn=x({_meta:m(p(),g()).nullish(),content:p(),priority:gn,status:_n}),yn=x({_meta:m(p(),g()).nullish(),entries:h(vn)}),k=x({character:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`})}),bn=x({id:p(),position:k,uri:p()}),xn=x({id:p(),newName:p(),position:k,uri:p()}),Sn=x({action:p(),position:k,timestampMs:f(),uri:p()}),Cn=_([b(`utf-16`),b(`utf-32`),b(`utf-8`)]),wn=x({_meta:m(p(),g()).nullish(),auth:Je.optional().default({terminal:!1}),elicitation:_t.nullish(),fs:wt.optional().default({readTextFile:!1,writeTextFile:!1}),nes:on.nullish(),positionEncodings:h(Cn).optional(),terminal:v().optional().default(!1)}),Tn=x({_meta:m(p(),g()).nullish(),audio:v().optional().default(!1),embeddedContext:v().optional().default(!1),image:v().optional().default(!1)}),En=f().int().gte(0).lte(65535),Dn=x({_meta:m(p(),g()).nullish(),clientCapabilities:wn.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:Et.nullish(),protocolVersion:En}),A=x({end:k,start:k}),On=x({message:p(),range:A,severity:Bt,uri:p()}),kn=x({languageId:p(),lastFocusedMs:f().nullish(),uri:p(),visibleRange:A.nullish()}),An=x({_meta:m(p(),g()).nullish(),diagnostics:h(On).nullish(),editHistory:h(qt).nullish(),openFiles:h(kn).nullish(),recentFiles:h(Zt).nullish(),relatedSnippets:h(en).nullish(),userActions:h(Sn).nullish()}),jn=x({newText:p(),range:A}),Mn=_([x({cursorPosition:k.nullish(),edits:h(jn),id:p(),uri:p()}).and(x({kind:b(`edit`)})),bn.and(x({kind:b(`jump`)})),xn.and(x({kind:b(`rename`)})),sn.and(x({kind:b(`searchAndReplace`)}))]),Nn=x({_meta:m(p(),g()).nullish(),content:p()}),Pn=x({_meta:m(p(),g()).nullish()}),j=_([f(),p()]).nullable();x({_meta:m(p(),g()).nullish(),requestId:j});var Fn=x({requestId:j}),In=te([`assistant`,`user`]),M=x({_meta:m(p(),g()).nullish(),audience:h(In).nullish(),lastModified:p().nullish(),priority:f().nullish()}),Ln=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p()}),Rn=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p(),uri:p().nullish()}),zn=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),description:p().nullish(),mimeType:p().nullish(),name:p(),size:f().nullish(),title:p().nullish(),uri:p()}),Bn=x({_meta:m(p(),g()).nullish(),optionId:pn}),Vn=_([x({outcome:b(`cancelled`)}),Bn.and(x({outcome:b(`selected`)}))]),Hn=x({_meta:m(p(),g()).nullish(),outcome:Vn}),Un=x({_meta:m(p(),g()).nullish()}),Wn=x({_meta:m(p(),g()).nullish()}),Gn=x({currentValue:v()}),Kn=p(),qn=p(),Jn=_([b(`mode`),b(`model`),b(`thought_level`),p()]),Yn=p(),Xn=x({_meta:m(p(),g()).nullish(),description:p().nullish(),name:p(),value:Yn}),Zn=x({_meta:m(p(),g()).nullish(),group:Kn,name:p(),options:h(Xn)}),N=y(_([x({currentValue:Yn,options:_([h(Xn),h(Zn)])}).and(x({type:b(`select`)})),Gn.and(x({type:b(`boolean`)}))]),x({_meta:m(p(),g()).nullish(),category:Jn.nullish(),description:p().nullish(),id:qn,name:p()})),Qn=x({_meta:m(p(),g()).nullish(),configOptions:h(N)}),$n=x({_meta:m(p(),g()).nullish()}),P=p(),er=x({_meta:m(p(),g()).nullish(),id:p(),sessionId:P}),tr=x({_meta:m(p(),g()).nullish(),sessionId:P}),nr=x({_meta:m(p(),g()).nullish(),sessionId:P}),rr=x({_meta:m(p(),g()).nullish(),sessionId:P}),ir=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),command:p(),cwd:p().nullish(),env:h(yt).optional(),outputByteLimit:f().nullish(),sessionId:P}),ar=x({_meta:m(p(),g()).nullish(),sessionId:P,uri:p()}),or=x({_meta:m(p(),g()).nullish(),position:k,sessionId:P,uri:p(),version:f(),visibleRange:A}),sr=x({_meta:m(p(),g()).nullish(),languageId:p(),sessionId:P,text:p(),uri:p(),version:f()}),cr=x({_meta:m(p(),g()).nullish(),sessionId:P,uri:p()}),lr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O).optional(),sessionId:P}),ur=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),dr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O),sessionId:P}),fr=x({_meta:m(p(),g()).nullish(),limit:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:p(),sessionId:P}),pr=x({_meta:m(p(),g()).nullish(),id:p(),reason:$t.nullish(),sessionId:P}),mr=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),hr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O).optional(),sessionId:P}),gr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),sessionId:P,title:p().nullish(),updatedAt:p().nullish()}),_r=x({_meta:m(p(),g()).nullish(),nextCursor:p().nullish(),sessions:h(gr)}),vr=x({_meta:m(p(),g()).nullish(),title:p().nullish(),updatedAt:p().nullish()}),yr=x({_meta:m(p(),g()).nullish()}),F=p(),br=x({_meta:m(p(),g()).nullish(),currentModeId:F}),xr=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:F,name:p()}),I=x({_meta:m(p(),g()).nullish(),availableModes:h(xr),currentModeId:F}),L=x({_meta:m(p(),g()).nullish(),availableModels:h(zt),currentModelId:Rt}),Sr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish(),sessionId:P}),Cr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish()}),wr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish(),sessionId:P}),Tr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish()}),Er=x({_meta:m(p(),g()).nullish()}),Dr=x({_meta:m(p(),g()).nullish(),additionalDirectories:Un.nullish(),close:Wn.nullish(),fork:$n.nullish(),list:yr.nullish(),resume:Er.nullish()}),Or=y(_([x({type:b(`boolean`),value:v()}),x({value:Yn})]),x({_meta:m(p(),g()).nullish(),configId:qn,sessionId:P})),kr=x({_meta:m(p(),g()).nullish(),configOptions:h(N)}),Ar=x({_meta:m(p(),g()).nullish(),modeId:F,sessionId:P}),jr=x({_meta:m(p(),g()).nullish()}),Mr=x({_meta:m(p(),g()).nullish(),modelId:Rt,sessionId:P}),Nr=x({_meta:m(p(),g()).nullish()}),Pr=x({_meta:m(p(),g()).nullish(),sessionId:P}),Fr=_([b(`end_turn`),b(`max_tokens`),b(`max_turn_requests`),b(`refusal`),b(`cancelled`)]),Ir=_([b(`email`),b(`uri`),b(`date`),b(`date-time`)]),Lr=x({default:p().nullish(),description:p().nullish(),enum:h(p()).nullish(),format:Ir.nullish(),maxLength:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),minLength:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),oneOf:h(vt).nullish(),pattern:p().nullish(),title:p().nullish()}),Rr=x({_meta:m(p(),g()).nullish(),context:An.nullish(),position:k,selection:A.nullish(),sessionId:P,triggerKind:cn,uri:p(),version:f()}),zr=x({_meta:m(p(),g()).nullish(),suggestions:h(Mn)}),Br=x({_meta:m(p(),g()).nullish(),terminalId:p()}),Vr=x({_meta:m(p(),g()).nullish(),exitCode:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:p().nullish()}),Hr=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),Ur=x({_meta:m(p(),g()).nullish(),exitStatus:Vr.nullish(),output:p(),truncated:v()}),Wr=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),text:p()}),Gr=x({range:A.nullish(),text:p()}),Kr=x({_meta:m(p(),g()).nullish(),contentChanges:h(Gr),sessionId:P,uri:p(),version:f()});x({method:p(),params:_([tr,sr,Kr,ar,cr,or,er,pr,xt]).nullish()});var qr=_([b(`full`),b(`incremental`)]),Jr=x({_meta:m(p(),g()).nullish(),syncKind:qr}),Yr=x({_meta:m(p(),g()).nullish(),didChange:Jr.nullish(),didClose:Ht.nullish(),didFocus:Ut.nullish(),didOpen:Wt.nullish(),didSave:Gt.nullish()}),Xr=x({_meta:m(p(),g()).nullish(),document:Yr.nullish()}),Zr=x({_meta:m(p(),g()).nullish(),context:un.nullish(),events:Xr.nullish()}),Qr=x({_meta:m(p(),g()).nullish(),auth:jt.optional().default({}),loadSession:v().optional().default(!1),mcpCapabilities:Pt.optional().default({http:!1,sse:!1}),nes:Zr.nullish(),positionEncoding:Cn.nullish(),promptCapabilities:Tn.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:Dr.optional().default({})}),$r=x({_meta:m(p(),g()).nullish(),agentCapabilities:Qr.optional().default({auth:{},loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:Et.nullish(),authMethods:h($e).optional().default([]),protocolVersion:En}),ei=_([x({_meta:m(p(),g()).nullish(),mimeType:p().nullish(),text:p(),uri:p()}),nt]),ti=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),resource:ei}),ni=_([Wr.and(x({type:b(`text`)})),Rn.and(x({type:b(`image`)})),Ln.and(x({type:b(`audio`)})),zn.and(x({type:b(`resource_link`)})),ti.and(x({type:b(`resource`)}))]),ri=x({_meta:m(p(),g()).nullish(),content:ni}),ii=x({_meta:m(p(),g()).nullish(),content:ni,messageId:p().nullish()}),ai=x({_meta:m(p(),g()).nullish(),messageId:p().nullish(),prompt:h(ni),sessionId:P}),oi=x({anyOf:h(vt)}),si=_([ri.and(x({type:b(`content`)})),ct.and(x({type:b(`diff`)})),Br.and(x({type:b(`terminal`)}))]),ci=p(),li=x({sessionId:P,toolCallId:ci.nullish()}),ui=y(_([li,Fn]),x({elicitationId:ft,url:p().url()})),di=x({_meta:m(p(),g()).nullish(),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:p()}),fi=_([b(`pending`),b(`in_progress`),b(`completed`),b(`failed`)]),pi=_([b(`read`),b(`edit`),b(`delete`),b(`move`),b(`search`),b(`execute`),b(`think`),b(`fetch`),b(`switch_mode`),b(`other`)]),mi=x({_meta:m(p(),g()).nullish(),content:h(si).optional(),kind:pi.optional(),locations:h(di).optional(),rawInput:g().optional(),rawOutput:g().optional(),status:fi.optional(),title:p(),toolCallId:ci}),hi=x({_meta:m(p(),g()).nullish(),content:h(si).nullish(),kind:pi.nullish(),locations:h(di).nullish(),rawInput:g().optional(),rawOutput:g().optional(),status:fi.nullish(),title:p().nullish(),toolCallId:ci}),gi=x({_meta:m(p(),g()).nullish(),options:h(hn),sessionId:P,toolCall:hi}),_i=x({_meta:m(p(),g()).nullish(),hint:p()}),vi=x({_meta:m(p(),g()).nullish(),description:p(),input:_i.nullish(),name:p()}),yi=x({_meta:m(p(),g()).nullish(),availableCommands:h(vi)}),bi=_([x({enum:h(p()),type:ht}),oi]),xi=x({default:h(p()).nullish(),description:p().nullish(),items:bi,maxItems:f().nullish(),minItems:f().nullish(),title:p().nullish()}),Si=_([Lr.and(x({type:b(`string`)})),fn.and(x({type:b(`number`)})),Dt.and(x({type:b(`integer`)})),rt.and(x({type:b(`boolean`)})),xi.and(x({type:b(`array`)}))]),Ci=x({description:p().nullish(),properties:m(p(),Si).optional().default({}),required:h(p()).nullish(),title:p().nullish(),type:mt.optional().default(`object`)}),wi=y(_([y(_([li,Fn]),x({requestedSchema:Ci})).and(x({mode:b(`form`)})),ui.and(x({mode:b(`url`)}))]),x({_meta:m(p(),g()).nullish(),message:p()})),Ti=x({cachedReadTokens:f().nullish(),cachedWriteTokens:f().nullish(),inputTokens:f(),outputTokens:f(),thoughtTokens:f().nullish(),totalTokens:f()});_([x({id:j,result:_([$r,tt,Nt,wr,Cr,_r,Sr,Tr,at,jr,kr,x({_meta:m(p(),g()).nullish(),stopReason:Fr,usage:Ti.nullish(),userMessageId:p().nullish()}),Nr,Pr,zr,it,Ct])}),x({error:bt,id:j})]);var Ei=x({_meta:m(p(),g()).nullish(),cost:ot.nullish(),size:f(),used:f()}),Di=_([ii.and(x({sessionUpdate:b(`user_message_chunk`)})),ii.and(x({sessionUpdate:b(`agent_message_chunk`)})),ii.and(x({sessionUpdate:b(`agent_thought_chunk`)})),mi.and(x({sessionUpdate:b(`tool_call`)})),hi.and(x({sessionUpdate:b(`tool_call_update`)})),yn.and(x({sessionUpdate:b(`plan`)})),yi.and(x({sessionUpdate:b(`available_commands_update`)})),br.and(x({sessionUpdate:b(`current_mode_update`)})),Qn.and(x({sessionUpdate:b(`config_option_update`)})),vr.and(x({sessionUpdate:b(`session_info_update`)})),Ei.and(x({sessionUpdate:b(`usage_update`)}))]),Oi=x({_meta:m(p(),g()).nullish(),sessionId:P,update:Di});x({method:p(),params:_([Oi,pt,xt]).nullish()});var ki=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),Ai=x({_meta:m(p(),g()).nullish(),exitCode:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:p().nullish()}),ji=x({name:p(),uri:p()}),Mi=x({_meta:m(p(),g()).nullish(),repository:rn.nullish(),workspaceFolders:h(ji).nullish(),workspaceUri:p().nullish()});x({id:j,method:p(),params:_([Dn,et,Mt,dn,dr,kt,lr,hr,rr,Ar,Or,ai,Mr,Mi,Rr,nr,St]).nullish()});var Ni=x({_meta:m(p(),g()).nullish(),content:p(),path:p(),sessionId:P});x({id:j,method:p(),params:_([Ni,fr,gi,ir,Hr,mr,ki,ur,wi,St]).nullish()}),_([x({id:j,result:_([x({_meta:m(p(),g()).nullish()}),Nn,Hn,st,Ur,Pn,Ai,Ot,ut,Ct])}),x({error:bt,id:j})]),e(),d(),r(),s(),i(),o();function Pi(e,t){let n=new TextEncoder,r=new TextDecoder;return{readable:new ReadableStream({async start(e){let n=``,i=t.getReader();try{for(;;){let{value:t,done:a}=await i.read();if(a)break;if(!t)continue;n+=r.decode(t,{stream:!0});let o=n.split(`
|
|
1
|
+
import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{a as n,c as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./classPrivateFieldSet2-EAQNhHs8.js";import{Cn as f,Ln as p,Mn as m,Tt as h,Xn as g,Yn as _,_r as ee,kt as v,nn as y,un as b,vt as te,wn as x}from"./schemas-BGAvj1T4.js";import{t as ne}from"./v4-f1i_CNUT.js";import{Hr as re,Tt as ie,Vr as ae,cn as S,jr as C,lr as oe,ot as se}from"./state-sIHsFpDu.js";import{Dr as ce,Pr as le,no as ue,oc as de,oo as fe,yc as pe}from"./paths-nIHVpTn2.js";import{l as me,p as he,r as ge}from"./sessionStoragePortable-CJUZrbIq.js";import{$i as _e,$u as ve,Da as ye,Dp as be,Ea as xe,G as Se,Hf as Ce,K as we,Lr as Te,Op as Ee,Qu as De,SD as Oe,Sr as ke,Vf as Ae,Xv as je,Yv as Me,i as Ne,ia as Pe,o as Fe,xD as Ie}from"./loadAgentsDir-BfEZacjM.js";import{Qn as Le,Zn as Re}from"./prompt-DgIuTC6Q.js";import{o as ze,t as Be}from"./fileStateCache-BhVfo23e.js";import{t as Ve}from"./QueryEngine-B217mLel.js";import{dirname as He}from"node:path";import{randomUUID as w}from"node:crypto";import{Readable as Ue,Writable as We}from"node:stream";import{unlink as Ge}from"node:fs/promises";import*as T from"node:path/posix";import{isAbsolute as Ke,resolve as qe}from"node:path/posix";ne();var E={authenticate:`authenticate`,document_did_change:`document/didChange`,document_did_close:`document/didClose`,document_did_focus:`document/didFocus`,document_did_open:`document/didOpen`,document_did_save:`document/didSave`,initialize:`initialize`,logout:`logout`,nes_accept:`nes/accept`,nes_close:`nes/close`,nes_reject:`nes/reject`,nes_start:`nes/start`,nes_suggest:`nes/suggest`,session_cancel:`session/cancel`,session_close:`session/close`,session_fork:`session/fork`,session_list:`session/list`,session_load:`session/load`,session_new:`session/new`,session_prompt:`session/prompt`,session_resume:`session/resume`,session_set_config_option:`session/set_config_option`,session_set_mode:`session/set_mode`,session_set_model:`session/set_model`},D={elicitation_complete:`elicitation/complete`,elicitation_create:`elicitation/create`,fs_read_text_file:`fs/read_text_file`,fs_write_text_file:`fs/write_text_file`,session_request_permission:`session/request_permission`,session_update:`session/update`,terminal_create:`terminal/create`,terminal_kill:`terminal/kill`,terminal_output:`terminal/output`,terminal_release:`terminal/release`,terminal_wait_for_exit:`terminal/wait_for_exit`},Je=x({_meta:m(p(),g()).nullish(),terminal:v().optional().default(!1)}),Ye=x({_meta:m(p(),g()).nullish(),label:p().nullish(),name:p(),optional:v().optional().default(!1),secret:v().optional().default(!0)}),Xe=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),name:p()}),Ze=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),link:p().nullish(),name:p(),vars:h(Ye)}),Qe=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),description:p().nullish(),env:m(p(),p()).optional(),id:p(),name:p()}),$e=_([Ze.and(x({type:b(`env_var`)})),Qe.and(x({type:b(`terminal`)})),Xe]),et=x({_meta:m(p(),g()).nullish(),methodId:p()}),tt=x({_meta:m(p(),g()).nullish()}),nt=x({_meta:m(p(),g()).nullish(),blob:p(),mimeType:p().nullish(),uri:p()}),rt=x({default:v().nullish(),description:p().nullish(),title:p().nullish()}),it=x({_meta:m(p(),g()).nullish()}),at=x({_meta:m(p(),g()).nullish()}),ot=x({amount:f(),currency:p()}),st=x({_meta:m(p(),g()).nullish(),terminalId:p()}),ct=x({_meta:m(p(),g()).nullish(),newText:p(),oldText:p().nullish(),path:p()}),lt=_([p(),f(),f(),v(),h(p())]),ut=y(_([x({content:m(p(),lt).nullish()}).and(x({action:b(`accept`)})),x({action:b(`decline`)}),x({action:b(`cancel`)})]),x({_meta:m(p(),g()).nullish()})),dt=x({_meta:m(p(),g()).nullish()}),ft=p(),pt=x({_meta:m(p(),g()).nullish(),elicitationId:ft}),mt=b(`object`),ht=b(`string`),gt=x({_meta:m(p(),g()).nullish()}),_t=x({_meta:m(p(),g()).nullish(),form:dt.nullish(),url:gt.nullish()}),vt=x({const:p(),title:p()}),yt=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),bt=x({code:_([b(-32700),b(-32600),b(-32601),b(-32602),b(-32603),b(-32800),b(-32e3),b(-32002),b(-32042),f().int().min(-2147483648,{message:`Invalid value: Expected int32 to be >= -2147483648`}).max(2147483647,{message:`Invalid value: Expected int32 to be <= 2147483647`})]),data:g().optional(),message:p()}),xt=g(),St=g(),Ct=g(),wt=x({_meta:m(p(),g()).nullish(),readTextFile:v().optional().default(!1),writeTextFile:v().optional().default(!1)}),Tt=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),Et=x({_meta:m(p(),g()).nullish(),name:p(),title:p().nullish(),version:p()}),Dt=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),Ot=x({_meta:m(p(),g()).nullish()}),kt=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cursor:p().nullish(),cwd:p().nullish()}),At=x({_meta:m(p(),g()).nullish()}),jt=x({_meta:m(p(),g()).nullish(),logout:At.nullish()}),Mt=x({_meta:m(p(),g()).nullish()}),Nt=x({_meta:m(p(),g()).nullish()}),Pt=x({_meta:m(p(),g()).nullish(),http:v().optional().default(!1),sse:v().optional().default(!1)}),Ft=x({_meta:m(p(),g()).nullish(),headers:h(Tt),name:p(),url:p()}),It=x({_meta:m(p(),g()).nullish(),headers:h(Tt),name:p(),url:p()}),Lt=x({_meta:m(p(),g()).nullish(),args:h(p()),command:p(),env:h(yt),name:p()}),O=_([Ft.and(x({type:b(`http`)})),It.and(x({type:b(`sse`)})),Lt]),Rt=p(),zt=x({_meta:m(p(),g()).nullish(),description:p().nullish(),modelId:Rt,name:p()}),Bt=_([b(`error`),b(`warning`),b(`information`),b(`hint`)]),Vt=x({_meta:m(p(),g()).nullish()}),Ht=x({_meta:m(p(),g()).nullish()}),Ut=x({_meta:m(p(),g()).nullish()}),Wt=x({_meta:m(p(),g()).nullish()}),Gt=x({_meta:m(p(),g()).nullish()}),Kt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),qt=x({diff:p(),uri:p()}),Jt=x({endLine:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),startLine:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),text:p()}),Yt=x({_meta:m(p(),g()).nullish()}),Xt=x({_meta:m(p(),g()).nullish()}),Zt=x({languageId:p(),text:p(),uri:p()}),Qt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),$t=_([b(`rejected`),b(`ignored`),b(`replaced`),b(`cancelled`)]),en=x({excerpts:h(Jt),uri:p()}),tn=x({_meta:m(p(),g()).nullish()}),nn=x({_meta:m(p(),g()).nullish()}),rn=x({name:p(),owner:p(),remoteUrl:p()}),an=x({_meta:m(p(),g()).nullish()}),on=x({_meta:m(p(),g()).nullish(),jump:Yt.nullish(),rename:nn.nullish(),searchAndReplace:an.nullish()}),sn=x({id:p(),isRegex:v().nullish(),replace:p(),search:p(),uri:p()}),cn=_([b(`automatic`),b(`diagnostic`),b(`manual`)]),ln=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),un=x({_meta:m(p(),g()).nullish(),diagnostics:Vt.nullish(),editHistory:Kt.nullish(),openFiles:Xt.nullish(),recentFiles:Qt.nullish(),relatedSnippets:tn.nullish(),userActions:ln.nullish()}),dn=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O)}),fn=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),pn=p(),mn=_([b(`allow_once`),b(`allow_always`),b(`reject_once`),b(`reject_always`)]),hn=x({_meta:m(p(),g()).nullish(),kind:mn,name:p(),optionId:pn}),gn=_([b(`high`),b(`medium`),b(`low`)]),_n=_([b(`pending`),b(`in_progress`),b(`completed`)]),vn=x({_meta:m(p(),g()).nullish(),content:p(),priority:gn,status:_n}),yn=x({_meta:m(p(),g()).nullish(),entries:h(vn)}),k=x({character:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`})}),bn=x({id:p(),position:k,uri:p()}),xn=x({id:p(),newName:p(),position:k,uri:p()}),Sn=x({action:p(),position:k,timestampMs:f(),uri:p()}),Cn=_([b(`utf-16`),b(`utf-32`),b(`utf-8`)]),wn=x({_meta:m(p(),g()).nullish(),auth:Je.optional().default({terminal:!1}),elicitation:_t.nullish(),fs:wt.optional().default({readTextFile:!1,writeTextFile:!1}),nes:on.nullish(),positionEncodings:h(Cn).optional(),terminal:v().optional().default(!1)}),Tn=x({_meta:m(p(),g()).nullish(),audio:v().optional().default(!1),embeddedContext:v().optional().default(!1),image:v().optional().default(!1)}),En=f().int().gte(0).lte(65535),Dn=x({_meta:m(p(),g()).nullish(),clientCapabilities:wn.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:Et.nullish(),protocolVersion:En}),A=x({end:k,start:k}),On=x({message:p(),range:A,severity:Bt,uri:p()}),kn=x({languageId:p(),lastFocusedMs:f().nullish(),uri:p(),visibleRange:A.nullish()}),An=x({_meta:m(p(),g()).nullish(),diagnostics:h(On).nullish(),editHistory:h(qt).nullish(),openFiles:h(kn).nullish(),recentFiles:h(Zt).nullish(),relatedSnippets:h(en).nullish(),userActions:h(Sn).nullish()}),jn=x({newText:p(),range:A}),Mn=_([x({cursorPosition:k.nullish(),edits:h(jn),id:p(),uri:p()}).and(x({kind:b(`edit`)})),bn.and(x({kind:b(`jump`)})),xn.and(x({kind:b(`rename`)})),sn.and(x({kind:b(`searchAndReplace`)}))]),Nn=x({_meta:m(p(),g()).nullish(),content:p()}),Pn=x({_meta:m(p(),g()).nullish()}),j=_([f(),p()]).nullable();x({_meta:m(p(),g()).nullish(),requestId:j});var Fn=x({requestId:j}),In=te([`assistant`,`user`]),M=x({_meta:m(p(),g()).nullish(),audience:h(In).nullish(),lastModified:p().nullish(),priority:f().nullish()}),Ln=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p()}),Rn=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p(),uri:p().nullish()}),zn=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),description:p().nullish(),mimeType:p().nullish(),name:p(),size:f().nullish(),title:p().nullish(),uri:p()}),Bn=x({_meta:m(p(),g()).nullish(),optionId:pn}),Vn=_([x({outcome:b(`cancelled`)}),Bn.and(x({outcome:b(`selected`)}))]),Hn=x({_meta:m(p(),g()).nullish(),outcome:Vn}),Un=x({_meta:m(p(),g()).nullish()}),Wn=x({_meta:m(p(),g()).nullish()}),Gn=x({currentValue:v()}),Kn=p(),qn=p(),Jn=_([b(`mode`),b(`model`),b(`thought_level`),p()]),Yn=p(),Xn=x({_meta:m(p(),g()).nullish(),description:p().nullish(),name:p(),value:Yn}),Zn=x({_meta:m(p(),g()).nullish(),group:Kn,name:p(),options:h(Xn)}),N=y(_([x({currentValue:Yn,options:_([h(Xn),h(Zn)])}).and(x({type:b(`select`)})),Gn.and(x({type:b(`boolean`)}))]),x({_meta:m(p(),g()).nullish(),category:Jn.nullish(),description:p().nullish(),id:qn,name:p()})),Qn=x({_meta:m(p(),g()).nullish(),configOptions:h(N)}),$n=x({_meta:m(p(),g()).nullish()}),P=p(),er=x({_meta:m(p(),g()).nullish(),id:p(),sessionId:P}),tr=x({_meta:m(p(),g()).nullish(),sessionId:P}),nr=x({_meta:m(p(),g()).nullish(),sessionId:P}),rr=x({_meta:m(p(),g()).nullish(),sessionId:P}),ir=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),command:p(),cwd:p().nullish(),env:h(yt).optional(),outputByteLimit:f().nullish(),sessionId:P}),ar=x({_meta:m(p(),g()).nullish(),sessionId:P,uri:p()}),or=x({_meta:m(p(),g()).nullish(),position:k,sessionId:P,uri:p(),version:f(),visibleRange:A}),sr=x({_meta:m(p(),g()).nullish(),languageId:p(),sessionId:P,text:p(),uri:p(),version:f()}),cr=x({_meta:m(p(),g()).nullish(),sessionId:P,uri:p()}),lr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O).optional(),sessionId:P}),ur=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),dr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O),sessionId:P}),fr=x({_meta:m(p(),g()).nullish(),limit:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:p(),sessionId:P}),pr=x({_meta:m(p(),g()).nullish(),id:p(),reason:$t.nullish(),sessionId:P}),mr=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),hr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(O).optional(),sessionId:P}),gr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),sessionId:P,title:p().nullish(),updatedAt:p().nullish()}),_r=x({_meta:m(p(),g()).nullish(),nextCursor:p().nullish(),sessions:h(gr)}),vr=x({_meta:m(p(),g()).nullish(),title:p().nullish(),updatedAt:p().nullish()}),yr=x({_meta:m(p(),g()).nullish()}),F=p(),br=x({_meta:m(p(),g()).nullish(),currentModeId:F}),xr=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:F,name:p()}),I=x({_meta:m(p(),g()).nullish(),availableModes:h(xr),currentModeId:F}),L=x({_meta:m(p(),g()).nullish(),availableModels:h(zt),currentModelId:Rt}),Sr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish(),sessionId:P}),Cr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish()}),wr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish(),sessionId:P}),Tr=x({_meta:m(p(),g()).nullish(),configOptions:h(N).nullish(),models:L.nullish(),modes:I.nullish()}),Er=x({_meta:m(p(),g()).nullish()}),Dr=x({_meta:m(p(),g()).nullish(),additionalDirectories:Un.nullish(),close:Wn.nullish(),fork:$n.nullish(),list:yr.nullish(),resume:Er.nullish()}),Or=y(_([x({type:b(`boolean`),value:v()}),x({value:Yn})]),x({_meta:m(p(),g()).nullish(),configId:qn,sessionId:P})),kr=x({_meta:m(p(),g()).nullish(),configOptions:h(N)}),Ar=x({_meta:m(p(),g()).nullish(),modeId:F,sessionId:P}),jr=x({_meta:m(p(),g()).nullish()}),Mr=x({_meta:m(p(),g()).nullish(),modelId:Rt,sessionId:P}),Nr=x({_meta:m(p(),g()).nullish()}),Pr=x({_meta:m(p(),g()).nullish(),sessionId:P}),Fr=_([b(`end_turn`),b(`max_tokens`),b(`max_turn_requests`),b(`refusal`),b(`cancelled`)]),Ir=_([b(`email`),b(`uri`),b(`date`),b(`date-time`)]),Lr=x({default:p().nullish(),description:p().nullish(),enum:h(p()).nullish(),format:Ir.nullish(),maxLength:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),minLength:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),oneOf:h(vt).nullish(),pattern:p().nullish(),title:p().nullish()}),Rr=x({_meta:m(p(),g()).nullish(),context:An.nullish(),position:k,selection:A.nullish(),sessionId:P,triggerKind:cn,uri:p(),version:f()}),zr=x({_meta:m(p(),g()).nullish(),suggestions:h(Mn)}),Br=x({_meta:m(p(),g()).nullish(),terminalId:p()}),Vr=x({_meta:m(p(),g()).nullish(),exitCode:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:p().nullish()}),Hr=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),Ur=x({_meta:m(p(),g()).nullish(),exitStatus:Vr.nullish(),output:p(),truncated:v()}),Wr=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),text:p()}),Gr=x({range:A.nullish(),text:p()}),Kr=x({_meta:m(p(),g()).nullish(),contentChanges:h(Gr),sessionId:P,uri:p(),version:f()});x({method:p(),params:_([tr,sr,Kr,ar,cr,or,er,pr,xt]).nullish()});var qr=_([b(`full`),b(`incremental`)]),Jr=x({_meta:m(p(),g()).nullish(),syncKind:qr}),Yr=x({_meta:m(p(),g()).nullish(),didChange:Jr.nullish(),didClose:Ht.nullish(),didFocus:Ut.nullish(),didOpen:Wt.nullish(),didSave:Gt.nullish()}),Xr=x({_meta:m(p(),g()).nullish(),document:Yr.nullish()}),Zr=x({_meta:m(p(),g()).nullish(),context:un.nullish(),events:Xr.nullish()}),Qr=x({_meta:m(p(),g()).nullish(),auth:jt.optional().default({}),loadSession:v().optional().default(!1),mcpCapabilities:Pt.optional().default({http:!1,sse:!1}),nes:Zr.nullish(),positionEncoding:Cn.nullish(),promptCapabilities:Tn.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:Dr.optional().default({})}),$r=x({_meta:m(p(),g()).nullish(),agentCapabilities:Qr.optional().default({auth:{},loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:Et.nullish(),authMethods:h($e).optional().default([]),protocolVersion:En}),ei=_([x({_meta:m(p(),g()).nullish(),mimeType:p().nullish(),text:p(),uri:p()}),nt]),ti=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),resource:ei}),ni=_([Wr.and(x({type:b(`text`)})),Rn.and(x({type:b(`image`)})),Ln.and(x({type:b(`audio`)})),zn.and(x({type:b(`resource_link`)})),ti.and(x({type:b(`resource`)}))]),ri=x({_meta:m(p(),g()).nullish(),content:ni}),ii=x({_meta:m(p(),g()).nullish(),content:ni,messageId:p().nullish()}),ai=x({_meta:m(p(),g()).nullish(),messageId:p().nullish(),prompt:h(ni),sessionId:P}),oi=x({anyOf:h(vt)}),si=_([ri.and(x({type:b(`content`)})),ct.and(x({type:b(`diff`)})),Br.and(x({type:b(`terminal`)}))]),ci=p(),li=x({sessionId:P,toolCallId:ci.nullish()}),ui=y(_([li,Fn]),x({elicitationId:ft,url:p().url()})),di=x({_meta:m(p(),g()).nullish(),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:p()}),fi=_([b(`pending`),b(`in_progress`),b(`completed`),b(`failed`)]),pi=_([b(`read`),b(`edit`),b(`delete`),b(`move`),b(`search`),b(`execute`),b(`think`),b(`fetch`),b(`switch_mode`),b(`other`)]),mi=x({_meta:m(p(),g()).nullish(),content:h(si).optional(),kind:pi.optional(),locations:h(di).optional(),rawInput:g().optional(),rawOutput:g().optional(),status:fi.optional(),title:p(),toolCallId:ci}),hi=x({_meta:m(p(),g()).nullish(),content:h(si).nullish(),kind:pi.nullish(),locations:h(di).nullish(),rawInput:g().optional(),rawOutput:g().optional(),status:fi.nullish(),title:p().nullish(),toolCallId:ci}),gi=x({_meta:m(p(),g()).nullish(),options:h(hn),sessionId:P,toolCall:hi}),_i=x({_meta:m(p(),g()).nullish(),hint:p()}),vi=x({_meta:m(p(),g()).nullish(),description:p(),input:_i.nullish(),name:p()}),yi=x({_meta:m(p(),g()).nullish(),availableCommands:h(vi)}),bi=_([x({enum:h(p()),type:ht}),oi]),xi=x({default:h(p()).nullish(),description:p().nullish(),items:bi,maxItems:f().nullish(),minItems:f().nullish(),title:p().nullish()}),Si=_([Lr.and(x({type:b(`string`)})),fn.and(x({type:b(`number`)})),Dt.and(x({type:b(`integer`)})),rt.and(x({type:b(`boolean`)})),xi.and(x({type:b(`array`)}))]),Ci=x({description:p().nullish(),properties:m(p(),Si).optional().default({}),required:h(p()).nullish(),title:p().nullish(),type:mt.optional().default(`object`)}),wi=y(_([y(_([li,Fn]),x({requestedSchema:Ci})).and(x({mode:b(`form`)})),ui.and(x({mode:b(`url`)}))]),x({_meta:m(p(),g()).nullish(),message:p()})),Ti=x({cachedReadTokens:f().nullish(),cachedWriteTokens:f().nullish(),inputTokens:f(),outputTokens:f(),thoughtTokens:f().nullish(),totalTokens:f()});_([x({id:j,result:_([$r,tt,Nt,wr,Cr,_r,Sr,Tr,at,jr,kr,x({_meta:m(p(),g()).nullish(),stopReason:Fr,usage:Ti.nullish(),userMessageId:p().nullish()}),Nr,Pr,zr,it,Ct])}),x({error:bt,id:j})]);var Ei=x({_meta:m(p(),g()).nullish(),cost:ot.nullish(),size:f(),used:f()}),Di=_([ii.and(x({sessionUpdate:b(`user_message_chunk`)})),ii.and(x({sessionUpdate:b(`agent_message_chunk`)})),ii.and(x({sessionUpdate:b(`agent_thought_chunk`)})),mi.and(x({sessionUpdate:b(`tool_call`)})),hi.and(x({sessionUpdate:b(`tool_call_update`)})),yn.and(x({sessionUpdate:b(`plan`)})),yi.and(x({sessionUpdate:b(`available_commands_update`)})),br.and(x({sessionUpdate:b(`current_mode_update`)})),Qn.and(x({sessionUpdate:b(`config_option_update`)})),vr.and(x({sessionUpdate:b(`session_info_update`)})),Ei.and(x({sessionUpdate:b(`usage_update`)}))]),Oi=x({_meta:m(p(),g()).nullish(),sessionId:P,update:Di});x({method:p(),params:_([Oi,pt,xt]).nullish()});var ki=x({_meta:m(p(),g()).nullish(),sessionId:P,terminalId:p()}),Ai=x({_meta:m(p(),g()).nullish(),exitCode:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),signal:p().nullish()}),ji=x({name:p(),uri:p()}),Mi=x({_meta:m(p(),g()).nullish(),repository:rn.nullish(),workspaceFolders:h(ji).nullish(),workspaceUri:p().nullish()});x({id:j,method:p(),params:_([Dn,et,Mt,dn,dr,kt,lr,hr,rr,Ar,Or,ai,Mr,Mi,Rr,nr,St]).nullish()});var Ni=x({_meta:m(p(),g()).nullish(),content:p(),path:p(),sessionId:P});x({id:j,method:p(),params:_([Ni,fr,gi,ir,Hr,mr,ki,ur,wi,St]).nullish()}),_([x({id:j,result:_([x({_meta:m(p(),g()).nullish()}),Nn,Hn,st,Ur,Pn,Ai,Ot,ut,Ct])}),x({error:bt,id:j})]),e(),d(),r(),s(),i(),o();function Pi(e,t){let n=new TextEncoder,r=new TextDecoder;return{readable:new ReadableStream({async start(e){let n=``,i=t.getReader();try{for(;;){let{value:t,done:a}=await i.read();if(a)break;if(!t)continue;n+=r.decode(t,{stream:!0});let o=n.split(`
|
|
2
2
|
`);n=o.pop()||``;for(let t of o){let n=t.trim();if(n)try{let t=JSON.parse(n);e.enqueue(t)}catch(e){console.error(`Failed to parse JSON message:`,n,e)}}}}catch(t){e.error(t);return}finally{i.releaseLock()}e.close()}}),writable:new WritableStream({async write(t){let r=JSON.stringify(t)+`
|
|
3
|
-
`,i=e.getWriter();try{await i.write(n.encode(r))}finally{i.releaseLock()}}})}}ne();var Fi,R=new WeakMap,Ii=class{constructor(e,t){l(this,R,void 0);let n=e(this);u(R,this,new Hi(async(e,t)=>{switch(e){case E.initialize:{let e=Dn.parse(t);return n.initialize(e)}case E.session_new:{let e=dn.parse(t);return n.newSession(e)}case E.session_load:{if(!n.loadSession)throw q.methodNotFound(e);let r=dr.parse(t);return n.loadSession(r)}case E.session_list:{if(!n.listSessions)throw q.methodNotFound(e);let r=kt.parse(t);return n.listSessions(r)}case E.session_fork:{if(!n.unstable_forkSession)throw q.methodNotFound(e);let r=lr.parse(t);return n.unstable_forkSession(r)}case E.session_resume:{if(!n.unstable_resumeSession)throw q.methodNotFound(e);let r=hr.parse(t);return n.unstable_resumeSession(r)}case E.session_close:{if(!n.unstable_closeSession)throw q.methodNotFound(e);let r=rr.parse(t);return n.unstable_closeSession(r)}case E.session_set_mode:{if(!n.setSessionMode)throw q.methodNotFound(e);let r=Ar.parse(t);return await n.setSessionMode(r)??{}}case E.authenticate:{let e=et.parse(t);return await n.authenticate(e)??{}}case E.logout:{if(!n.unstable_logout)throw q.methodNotFound(e);let r=Mt.parse(t);return await n.unstable_logout(r)??{}}case E.session_prompt:{let e=ai.parse(t);return n.prompt(e)}case E.session_set_model:{if(!n.unstable_setSessionModel)throw q.methodNotFound(e);let r=Mr.parse(t);return await n.unstable_setSessionModel(r)??{}}case E.session_set_config_option:{if(!n.setSessionConfigOption)throw q.methodNotFound(e);let r=Or.parse(t);return n.setSessionConfigOption(r)}case E.nes_start:{if(!n.unstable_startNes)throw q.methodNotFound(e);let r=Mi.parse(t);return n.unstable_startNes(r)}case E.nes_suggest:{if(!n.unstable_suggestNes)throw q.methodNotFound(e);let r=Rr.parse(t);return n.unstable_suggestNes(r)}case E.nes_close:{if(!n.unstable_closeNes)throw q.methodNotFound(e);let r=nr.parse(t);return await n.unstable_closeNes(r)??{}}default:if(n.extMethod)return n.extMethod(e,t);throw q.methodNotFound(e)}},async(e,t)=>{switch(e){case E.session_cancel:{let e=tr.parse(t);return n.cancel(e)}case E.document_did_open:{if(!n.unstable_didOpenDocument)return;let e=sr.parse(t);return n.unstable_didOpenDocument(e)}case E.document_did_change:{if(!n.unstable_didChangeDocument)return;let e=Kr.parse(t);return n.unstable_didChangeDocument(e)}case E.document_did_close:{if(!n.unstable_didCloseDocument)return;let e=ar.parse(t);return n.unstable_didCloseDocument(e)}case E.document_did_save:{if(!n.unstable_didSaveDocument)return;let e=cr.parse(t);return n.unstable_didSaveDocument(e)}case E.document_did_focus:{if(!n.unstable_didFocusDocument)return;let e=or.parse(t);return n.unstable_didFocusDocument(e)}case E.nes_accept:{if(!n.unstable_acceptNes)return;let e=er.parse(t);return n.unstable_acceptNes(e)}case E.nes_reject:{if(!n.unstable_rejectNes)return;let e=pr.parse(t);return n.unstable_rejectNes(e)}default:if(n.extNotification)return n.extNotification(e,t);throw q.methodNotFound(e)}},t))}async sessionUpdate(e){return await c(R,this).sendNotification(D.session_update,e)}async requestPermission(e){return await c(R,this).sendRequest(D.session_request_permission,e)}async readTextFile(e){return await c(R,this).sendRequest(D.fs_read_text_file,e)}async writeTextFile(e){return await c(R,this).sendRequest(D.fs_write_text_file,e)??{}}async createTerminal(e){return new Li((await c(R,this).sendRequest(D.terminal_create,e)).terminalId,e.sessionId,c(R,this))}async unstable_createElicitation(e){return await c(R,this).sendRequest(D.elicitation_create,e)}async unstable_completeElicitation(e){return await c(R,this).sendNotification(D.elicitation_complete,e)}async extMethod(e,t){return await c(R,this).sendRequest(e,t)}async extNotification(e,t){return await c(R,this).sendNotification(e,t)}get signal(){return c(R,this).signal}get closed(){return c(R,this).closed}},z=new WeakMap,B=new WeakMap;Fi=Symbol.asyncDispose;var Li=class{constructor(e,n,r){t(this,`id`,void 0),l(this,z,void 0),l(this,B,void 0),this.id=e,u(z,this,n),u(B,this,r)}async currentOutput(){return await c(B,this).sendRequest(D.terminal_output,{sessionId:c(z,this),terminalId:this.id})}async waitForExit(){return await c(B,this).sendRequest(D.terminal_wait_for_exit,{sessionId:c(z,this),terminalId:this.id})}async kill(){return await c(B,this).sendRequest(D.terminal_kill,{sessionId:c(z,this),terminalId:this.id})??{}}async release(){return await c(B,this).sendRequest(D.terminal_release,{sessionId:c(z,this),terminalId:this.id})??{}}async[Fi](){await this.release()}},V=new WeakMap,Ri=new WeakMap,zi=new WeakMap,Bi=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,Vi=new WeakMap,G=new WeakSet,Hi=class{constructor(e,t,r){a(this,G),l(this,V,new Map),l(this,Ri,0),l(this,zi,void 0),l(this,Bi,void 0),l(this,H,void 0),l(this,U,Promise.resolve()),l(this,W,new AbortController),l(this,Vi,void 0),u(zi,this,e),u(Bi,this,t),u(H,this,r),u(Vi,this,new Promise(e=>{c(W,this).signal.addEventListener(`abort`,()=>e())})),n(G,this,Ui).call(this)}get signal(){return c(W,this).signal}get closed(){return c(Vi,this)}async sendRequest(e,t){var r,i;n(G,this,Yi).call(this);let a=(u(Ri,this,(r=c(Ri,this),i=r++,r)),i),o=new Promise((e,t)=>{c(V,this).set(a,{resolve:e,reject:t})});return await n(G,this,K).call(this,{jsonrpc:`2.0`,id:a,method:e,params:t}),o}async sendNotification(e,t){n(G,this,Yi).call(this),await n(G,this,K).call(this,{jsonrpc:`2.0`,method:e,params:t})}};async function Ui(){let e;try{let e=c(H,this).readable.getReader();try{for(;!c(W,this).signal.aborted;){let{value:t,done:r}=await e.read();if(r)break;if(t)try{n(G,this,Gi).call(this,t)}catch(e){console.error(`Unexpected error during message processing:`,t,e),`id`in t&&t.id!==void 0&&n(G,this,K).call(this,{jsonrpc:`2.0`,id:t.id,error:{code:-32700,message:`Parse error`}})}}}finally{e.releaseLock()}}catch(t){e=t}finally{n(G,this,Wi).call(this,e)}}function Wi(e){if(c(W,this).signal.aborted)return;let t=e??Error(`ACP connection closed`);for(let e of c(V,this).values())e.reject(t);c(V,this).clear(),c(W,this).abort(t)}async function Gi(e){if(`method`in e&&`id`in e){let t=await n(G,this,Ki).call(this,e.method,e.params);`error`in t&&console.error(`Error handling request`,e,t.error),await n(G,this,K).call(this,{jsonrpc:`2.0`,id:e.id,...t})}else if(`method`in e){let t=await n(G,this,qi).call(this,e.method,e.params);`error`in t&&console.error(`Error handling notification`,e,t.error)}else `id`in e?n(G,this,Ji).call(this,e):console.error(`Invalid message`,{message:e})}async function Ki(e,t){try{return{result:await c(zi,this).call(this,e,t)??null}}catch(e){if(e instanceof q)return e.toResult();if(e instanceof ee)return q.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return q.internalError(t?JSON.parse(t):{}).toResult()}catch{return q.internalError({details:t}).toResult()}}}async function qi(e,t){try{return await c(Bi,this).call(this,e,t),{result:null}}catch(e){if(e instanceof q)return e.toResult();if(e instanceof ee)return q.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return q.internalError(t?JSON.parse(t):{}).toResult()}catch{return q.internalError({details:t}).toResult()}}}function Ji(e){let t=c(V,this).get(e.id);if(t){if(`result`in e)t.resolve(e.result);else if(`error`in e){let{code:n,message:r,data:i}=e.error;t.reject(new q(n,r,i))}c(V,this).delete(e.id)}else console.error(`Got response to unknown request`,e.id)}function Yi(){if(c(W,this).signal.aborted)throw c(W,this).signal.reason??Error(`ACP connection closed`)}async function K(e){return u(U,this,c(U,this).then(async()=>{let t=c(H,this).writable.getWriter();try{await t.write(e)}finally{t.releaseLock()}}).catch(e=>{n(G,this,Wi).call(this,e)})),c(U,this)}var q=class e extends Error{constructor(e,n,r){super(n),t(this,`code`,void 0),t(this,`data`,void 0),this.code=e,this.name=`RequestError`,this.data=r}static parseError(t,n){return new e(-32700,`Parse error${n?`: ${n}`:``}`,t)}static invalidRequest(t,n){return new e(-32600,`Invalid request${n?`: ${n}`:``}`,t)}static methodNotFound(t){return new e(-32601,`"Method not found": ${t}`,{method:t})}static invalidParams(t,n){return new e(-32602,`Invalid params${n?`: ${n}`:``}`,t)}static internalError(t,n){return new e(-32603,`Internal error${n?`: ${n}`:``}`,t)}static authRequired(t,n){return new e(-32e3,`Authentication required${n?`: ${n}`:``}`,t)}static resourceNotFound(t){return new e(-32002,`Resource not found${t?`: ${t}`:``}`,t&&{uri:t})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};ae(),S(),pe(),fe(),Le(),ze(),ke(),Oe(),we(),je(),Se(),Me();function J(e,t){if(e)return t?Ke(e)?e:qe(t,e):e}var Xi=!(typeof process.geteuid==`function`?process.geteuid()===0:typeof process.getuid==`function`&&process.getuid()===0)||!!process.env.IS_SANDBOX,Zi={auto:`auto`,default:`default`,acceptedits:`acceptEdits`,dontask:`dontAsk`,plan:`plan`,bypasspermissions:`bypassPermissions`,bypass:`bypassPermissions`};function Qi(e,t=`permissions.defaultMode`){if(e===void 0)return`default`;if(typeof e!=`string`)throw Error(`Invalid ${t}: expected a string.`);let n=e.trim().toLowerCase();if(n===``)throw Error(`Invalid ${t}: expected a non-empty string.`);let r=Zi[n];if(!r)throw Error(`Invalid ${t}: ${e}.`);if(r===`bypassPermissions`&&!Xi)throw Error(`Invalid ${t}: bypassPermissions is not available when running as root.`);return r}function $i(e){let t=[...e.mcpServers??[]].sort((e,t)=>e.name.localeCompare(t.name));return JSON.stringify({cwd:e.cwd,mcpServers:t})}var ea=256;function ta(e){let t=e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim();return t.length<=ea?t:t.slice(0,ea-1)+`…`}function na(e,t){if(!t)return e;let n=T.resolve(t),r=T.resolve(e);return r.startsWith(n+T.sep)||r===n?T.relative(n,r):e}function ra(e){let t="```";for(let n of e.matchAll(/^```+/gm)??[])for(;n[0].length>=t.length;)t+="`";return t+`
|
|
3
|
+
`,i=e.getWriter();try{await i.write(n.encode(r))}finally{i.releaseLock()}}})}}ne();var Fi,R=new WeakMap,Ii=class{constructor(e,t){l(this,R,void 0);let n=e(this);u(R,this,new Hi(async(e,t)=>{switch(e){case E.initialize:{let e=Dn.parse(t);return n.initialize(e)}case E.session_new:{let e=dn.parse(t);return n.newSession(e)}case E.session_load:{if(!n.loadSession)throw q.methodNotFound(e);let r=dr.parse(t);return n.loadSession(r)}case E.session_list:{if(!n.listSessions)throw q.methodNotFound(e);let r=kt.parse(t);return n.listSessions(r)}case E.session_fork:{if(!n.unstable_forkSession)throw q.methodNotFound(e);let r=lr.parse(t);return n.unstable_forkSession(r)}case E.session_resume:{if(!n.unstable_resumeSession)throw q.methodNotFound(e);let r=hr.parse(t);return n.unstable_resumeSession(r)}case E.session_close:{if(!n.unstable_closeSession)throw q.methodNotFound(e);let r=rr.parse(t);return n.unstable_closeSession(r)}case E.session_set_mode:{if(!n.setSessionMode)throw q.methodNotFound(e);let r=Ar.parse(t);return await n.setSessionMode(r)??{}}case E.authenticate:{let e=et.parse(t);return await n.authenticate(e)??{}}case E.logout:{if(!n.unstable_logout)throw q.methodNotFound(e);let r=Mt.parse(t);return await n.unstable_logout(r)??{}}case E.session_prompt:{let e=ai.parse(t);return n.prompt(e)}case E.session_set_model:{if(!n.unstable_setSessionModel)throw q.methodNotFound(e);let r=Mr.parse(t);return await n.unstable_setSessionModel(r)??{}}case E.session_set_config_option:{if(!n.setSessionConfigOption)throw q.methodNotFound(e);let r=Or.parse(t);return n.setSessionConfigOption(r)}case E.nes_start:{if(!n.unstable_startNes)throw q.methodNotFound(e);let r=Mi.parse(t);return n.unstable_startNes(r)}case E.nes_suggest:{if(!n.unstable_suggestNes)throw q.methodNotFound(e);let r=Rr.parse(t);return n.unstable_suggestNes(r)}case E.nes_close:{if(!n.unstable_closeNes)throw q.methodNotFound(e);let r=nr.parse(t);return await n.unstable_closeNes(r)??{}}default:if(n.extMethod)return n.extMethod(e,t);throw q.methodNotFound(e)}},async(e,t)=>{switch(e){case E.session_cancel:{let e=tr.parse(t);return n.cancel(e)}case E.document_did_open:{if(!n.unstable_didOpenDocument)return;let e=sr.parse(t);return n.unstable_didOpenDocument(e)}case E.document_did_change:{if(!n.unstable_didChangeDocument)return;let e=Kr.parse(t);return n.unstable_didChangeDocument(e)}case E.document_did_close:{if(!n.unstable_didCloseDocument)return;let e=ar.parse(t);return n.unstable_didCloseDocument(e)}case E.document_did_save:{if(!n.unstable_didSaveDocument)return;let e=cr.parse(t);return n.unstable_didSaveDocument(e)}case E.document_did_focus:{if(!n.unstable_didFocusDocument)return;let e=or.parse(t);return n.unstable_didFocusDocument(e)}case E.nes_accept:{if(!n.unstable_acceptNes)return;let e=er.parse(t);return n.unstable_acceptNes(e)}case E.nes_reject:{if(!n.unstable_rejectNes)return;let e=pr.parse(t);return n.unstable_rejectNes(e)}default:if(n.extNotification)return n.extNotification(e,t);throw q.methodNotFound(e)}},t))}async sessionUpdate(e){return await c(R,this).sendNotification(D.session_update,e)}async requestPermission(e){return await c(R,this).sendRequest(D.session_request_permission,e)}async readTextFile(e){return await c(R,this).sendRequest(D.fs_read_text_file,e)}async writeTextFile(e){return await c(R,this).sendRequest(D.fs_write_text_file,e)??{}}async createTerminal(e){return new Li((await c(R,this).sendRequest(D.terminal_create,e)).terminalId,e.sessionId,c(R,this))}async unstable_createElicitation(e){return await c(R,this).sendRequest(D.elicitation_create,e)}async unstable_completeElicitation(e){return await c(R,this).sendNotification(D.elicitation_complete,e)}async extMethod(e,t){return await c(R,this).sendRequest(e,t)}async extNotification(e,t){return await c(R,this).sendNotification(e,t)}get signal(){return c(R,this).signal}get closed(){return c(R,this).closed}},z=new WeakMap,B=new WeakMap;Fi=Symbol.asyncDispose;var Li=class{constructor(e,n,r){t(this,`id`,void 0),l(this,z,void 0),l(this,B,void 0),this.id=e,u(z,this,n),u(B,this,r)}async currentOutput(){return await c(B,this).sendRequest(D.terminal_output,{sessionId:c(z,this),terminalId:this.id})}async waitForExit(){return await c(B,this).sendRequest(D.terminal_wait_for_exit,{sessionId:c(z,this),terminalId:this.id})}async kill(){return await c(B,this).sendRequest(D.terminal_kill,{sessionId:c(z,this),terminalId:this.id})??{}}async release(){return await c(B,this).sendRequest(D.terminal_release,{sessionId:c(z,this),terminalId:this.id})??{}}async[Fi](){await this.release()}},V=new WeakMap,Ri=new WeakMap,zi=new WeakMap,Bi=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,Vi=new WeakMap,G=new WeakSet,Hi=class{constructor(e,t,r){a(this,G),l(this,V,new Map),l(this,Ri,0),l(this,zi,void 0),l(this,Bi,void 0),l(this,H,void 0),l(this,U,Promise.resolve()),l(this,W,new AbortController),l(this,Vi,void 0),u(zi,this,e),u(Bi,this,t),u(H,this,r),u(Vi,this,new Promise(e=>{c(W,this).signal.addEventListener(`abort`,()=>e())})),n(G,this,Ui).call(this)}get signal(){return c(W,this).signal}get closed(){return c(Vi,this)}async sendRequest(e,t){var r,i;n(G,this,Yi).call(this);let a=(u(Ri,this,(r=c(Ri,this),i=r++,r)),i),o=new Promise((e,t)=>{c(V,this).set(a,{resolve:e,reject:t})});return await n(G,this,K).call(this,{jsonrpc:`2.0`,id:a,method:e,params:t}),o}async sendNotification(e,t){n(G,this,Yi).call(this),await n(G,this,K).call(this,{jsonrpc:`2.0`,method:e,params:t})}};async function Ui(){let e;try{let e=c(H,this).readable.getReader();try{for(;!c(W,this).signal.aborted;){let{value:t,done:r}=await e.read();if(r)break;if(t)try{n(G,this,Gi).call(this,t)}catch(e){console.error(`Unexpected error during message processing:`,t,e),`id`in t&&t.id!==void 0&&n(G,this,K).call(this,{jsonrpc:`2.0`,id:t.id,error:{code:-32700,message:`Parse error`}})}}}finally{e.releaseLock()}}catch(t){e=t}finally{n(G,this,Wi).call(this,e)}}function Wi(e){if(c(W,this).signal.aborted)return;let t=e??Error(`ACP connection closed`);for(let e of c(V,this).values())e.reject(t);c(V,this).clear(),c(W,this).abort(t)}async function Gi(e){if(`method`in e&&`id`in e){let t=await n(G,this,Ki).call(this,e.method,e.params);`error`in t&&console.error(`Error handling request`,e,t.error),await n(G,this,K).call(this,{jsonrpc:`2.0`,id:e.id,...t})}else if(`method`in e){let t=await n(G,this,qi).call(this,e.method,e.params);`error`in t&&console.error(`Error handling notification`,e,t.error)}else `id`in e?n(G,this,Ji).call(this,e):console.error(`Invalid message`,{message:e})}async function Ki(e,t){try{return{result:await c(zi,this).call(this,e,t)??null}}catch(e){if(e instanceof q)return e.toResult();if(e instanceof ee)return q.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return q.internalError(t?JSON.parse(t):{}).toResult()}catch{return q.internalError({details:t}).toResult()}}}async function qi(e,t){try{return await c(Bi,this).call(this,e,t),{result:null}}catch(e){if(e instanceof q)return e.toResult();if(e instanceof ee)return q.invalidParams(e.format()).toResult();let t;(e instanceof Error||typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`)&&(t=e.message);try{return q.internalError(t?JSON.parse(t):{}).toResult()}catch{return q.internalError({details:t}).toResult()}}}function Ji(e){let t=c(V,this).get(e.id);if(t){if(`result`in e)t.resolve(e.result);else if(`error`in e){let{code:n,message:r,data:i}=e.error;t.reject(new q(n,r,i))}c(V,this).delete(e.id)}else console.error(`Got response to unknown request`,e.id)}function Yi(){if(c(W,this).signal.aborted)throw c(W,this).signal.reason??Error(`ACP connection closed`)}async function K(e){return u(U,this,c(U,this).then(async()=>{let t=c(H,this).writable.getWriter();try{await t.write(e)}finally{t.releaseLock()}}).catch(e=>{n(G,this,Wi).call(this,e)})),c(U,this)}var q=class e extends Error{constructor(e,n,r){super(n),t(this,`code`,void 0),t(this,`data`,void 0),this.code=e,this.name=`RequestError`,this.data=r}static parseError(t,n){return new e(-32700,`Parse error${n?`: ${n}`:``}`,t)}static invalidRequest(t,n){return new e(-32600,`Invalid request${n?`: ${n}`:``}`,t)}static methodNotFound(t){return new e(-32601,`"Method not found": ${t}`,{method:t})}static invalidParams(t,n){return new e(-32602,`Invalid params${n?`: ${n}`:``}`,t)}static internalError(t,n){return new e(-32603,`Internal error${n?`: ${n}`:``}`,t)}static authRequired(t,n){return new e(-32e3,`Authentication required${n?`: ${n}`:``}`,t)}static resourceNotFound(t){return new e(-32002,`Resource not found${t?`: ${t}`:``}`,t&&{uri:t})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};ae(),S(),pe(),fe(),Le(),ze(),Oe(),ve(),ye(),Pe(),we(),Fe();function J(e,t){if(e)return t?Ke(e)?e:qe(t,e):e}var Xi=!(typeof process.geteuid==`function`?process.geteuid()===0:typeof process.getuid==`function`&&process.getuid()===0)||!!process.env.IS_SANDBOX,Zi={auto:`auto`,default:`default`,acceptedits:`acceptEdits`,dontask:`dontAsk`,plan:`plan`,bypasspermissions:`bypassPermissions`,bypass:`bypassPermissions`};function Qi(e,t=`permissions.defaultMode`){if(e===void 0)return`default`;if(typeof e!=`string`)throw Error(`Invalid ${t}: expected a string.`);let n=e.trim().toLowerCase();if(n===``)throw Error(`Invalid ${t}: expected a non-empty string.`);let r=Zi[n];if(!r)throw Error(`Invalid ${t}: ${e}.`);if(r===`bypassPermissions`&&!Xi)throw Error(`Invalid ${t}: bypassPermissions is not available when running as root.`);return r}function $i(e){let t=[...e.mcpServers??[]].sort((e,t)=>e.name.localeCompare(t.name));return JSON.stringify({cwd:e.cwd,mcpServers:t})}var ea=256;function ta(e){let t=e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim();return t.length<=ea?t:t.slice(0,ea-1)+`…`}function na(e,t){if(!t)return e;let n=T.resolve(t),r=T.resolve(e);return r.startsWith(n+T.sep)||r===n?T.relative(n,r):e}function ra(e){let t="```";for(let n of e.matchAll(/^```+/gm)??[])for(;n[0].length>=t.length;)t+="`";return t+`
|
|
4
4
|
`+e+(e.endsWith(`
|
|
5
5
|
`)?``:`
|
|
6
6
|
`)+t}function Y(e,t=!1,n){let r=e.name,i=e.input;switch(r){case`Agent`:case`Task`:{let e=i?.description??`Task`,t=i?.prompt;return{title:e,kind:`think`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`Bash`:{let e=i?.command??`Terminal`,t=i?.description;return{title:e,kind:`execute`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`Read`:{let e=i?.file_path,t=e??`File`,r=i?.offset,a=i?.limit,o=``;a&&a>0?o=` (${r??1} - ${(r??1)+a-1})`:r&&(o=` (from line ${r})`);let s=t?na(t,n):`File`,c=J(e,n);return{title:`Read ${s}${o}`,kind:`read`,locations:c?[{path:c,line:r??1}]:[],content:[]}}case`Write`:{let e=i?.file_path??``,t=i?.content??``,r=e?na(e,n):void 0,a=J(e,n);return{title:r?`Write ${r}`:`Write`,kind:`edit`,content:a?[{type:`diff`,path:a,oldText:null,newText:t}]:[{type:`content`,content:{type:`text`,text:t}}],locations:a?[{path:a}]:[]}}case`Edit`:{let e=i?.file_path??``,t=i?.old_string??``,r=i?.new_string??``,a=e?na(e,n):void 0,o=J(e,n);return{title:a?`Edit ${a}`:`Edit`,kind:`edit`,content:o?[{type:`diff`,path:o,oldText:t||null,newText:r}]:[],locations:o?[{path:o}]:[]}}case`Glob`:{let e=i?.path??``,t=i?.pattern??``,r=J(e,n),a=`Find`;return e&&(a+=` \`${e}\``),t&&(a+=` \`${t}\``),{title:a,kind:`search`,content:[],locations:r?[{path:r}]:[]}}case`Grep`:{let e=i?.pattern??``,t=i?.path??``,n=`grep`;return i?.[`-i`]&&(n+=` -i`),i?.[`-n`]&&(n+=` -n`),i?.[`-A`]!==void 0&&(n+=` -A ${i[`-A`]}`),i?.[`-B`]!==void 0&&(n+=` -B ${i[`-B`]}`),i?.[`-C`]!==void 0&&(n+=` -C ${i[`-C`]}`),i?.output_mode===`files_with_matches`?n+=` -l`:i?.output_mode===`count`&&(n+=` -c`),i?.head_limit!==void 0&&(n+=` | head -${i.head_limit}`),i?.glob&&(n+=` --include="${i.glob}"`),i?.type&&(n+=` --type=${i.type}`),i?.multiline&&(n+=` -P`),e&&(n+=` "${e}"`),t&&(n+=` ${t}`),{title:n,kind:`search`,content:[]}}case`WebFetch`:{let e=i?.url??``,t=i?.prompt;return{title:e?`Fetch ${e}`:`Fetch`,kind:`fetch`,content:t?[{type:`content`,content:{type:`text`,text:t}}]:[]}}case`WebSearch`:{let e=`"${i?.query??`Web search`}"`,t=i?.allowed_domains,n=i?.blocked_domains;return t&&t.length>0&&(e+=` (allowed: ${t.join(`, `)})`),n&&n.length>0&&(e+=` (blocked: ${n.join(`, `)})`),{title:e,kind:`fetch`,content:[]}}case`TodoWrite`:{let e=i?.todos;return{title:Array.isArray(e)?`Update TODOs: ${e.map(e=>e.content).join(`, `)}`:`Update TODOs`,kind:`think`,content:[]}}case`ExitPlanMode`:{let e=i?.plan;return{title:`Ready to code?`,kind:`switch_mode`,content:e?[{type:`content`,content:{type:`text`,text:e}}]:[]}}default:return{title:r||`Unknown Tool`,kind:`other`,content:[]}}}function ia(e,t){return Array.isArray(e)&&e.length>0?{content:e.map(e=>({type:`content`,content:aa(e,t)}))}:typeof e==`string`&&e.length>0?{content:[{type:`content`,content:{type:`text`,text:t?`\`\`\`\n${e}\n\`\`\``:e}}]}:{}}function aa(e,t){let n=e=>({type:`text`,text:t?`\`\`\`\n${e}\n\`\`\``:e});switch(e.type){case`text`:{let n=e.text;return{type:`text`,text:t?`\`\`\`\n${n}\n\`\`\``:n}}case`image`:{let t=e.source;return t?.type===`base64`?{type:`image`,data:t.data,mimeType:t.media_type}:n(t?.type===`url`?`[image: ${t.url}]`:`[image: file reference]`)}case`resource_link`:{let t=e.uri;return{type:`resource_link`,uri:t,name:e.name??t,mimeType:e.mimeType}}case`resource`:{let t=e.resource;return{type:`resource`,resource:{uri:t?.uri??``,mimeType:t?.mimeType,...typeof t?.text==`string`?{text:t.text}:{},...typeof t?.blob==`string`?{blob:t.blob}:{}}}}case`tool_reference`:return n(`Tool: ${e.tool_name}`);case`tool_search_tool_search_result`:{let t=e.tool_references;return n(`Tools found: ${t?.map(e=>e.tool_name).join(`, `)||`none`}`)}case`tool_search_tool_result_error`:return n(`Error: ${e.error_code}${e.error_message?` - ${e.error_message}`:``}`);case`web_search_result`:return n(`${e.title} (${e.url})`);case`web_search_tool_result_error`:return n(`Error: ${e.error_code}`);case`web_fetch_result`:return n(`Fetched: ${e.url}`);case`web_fetch_tool_result_error`:return n(`Error: ${e.error_code}`);case`code_execution_result`:case`bash_code_execution_result`:return n(`Output: ${e.stdout||e.stderr||``}`);case`code_execution_tool_result_error`:case`bash_code_execution_tool_result_error`:return n(`Error: ${e.error_code}`);case`text_editor_code_execution_view_result`:return n(e.content);case`text_editor_code_execution_create_result`:return n(e.is_file_update?`File updated`:`File created`);case`text_editor_code_execution_str_replace_result`:{let t=e.lines;return n(t?.join(`
|
|
@@ -10,5 +10,5 @@ import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{a as n,c as r,i,l as a
|
|
|
10
10
|
|
|
11
11
|
Compacting completed.`}}}));break;case`result`:{let t=g.usage;t&&(l.inputTokens+=t.input_tokens??0,l.outputTokens+=t.output_tokens??0,l.cachedReadTokens+=t.cache_read_input_tokens??0,l.cachedWriteTokens+=t.cache_creation_input_tokens??0);let i=g.modelUsage;if(i&&d){let e=da(i,d);e?.contextWindow&&(f=e.contextWindow)}u!==null&&await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`usage_update`,used:u,size:f}});let a=g.subtype,o=g.is_error;if(r.aborted){c=`cancelled`;break}switch(a){case`success`:{let e=g.stop_reason;c=e===`max_tokens`?`max_tokens`:e===`refusal`?`refusal`:`end_turn`,o&&(c=`end_turn`);break}case`error_during_execution`:c=g.stop_reason===`max_tokens`?`max_tokens`:`end_turn`;break;case`error_max_budget_usd`:case`error_max_turns`:case`error_max_structured_output_retries`:c=`max_turn_requests`;break}break}case`stream_event`:{let t=g.parent_tool_use_id;t===null&&m===null&&(m=w());let r=la(g,e,i,n,{clientCapabilities:a,cwd:o,messageId:t===null?m??void 0:void 0});for(let e of r)await n.sessionUpdate(e);p=!0;break}case`assistant`:{let t=g.message,r=g.parent_tool_use_id;if(t?.usage&&r===null){let e=t.usage;u=(typeof e.input_tokens==`number`?e.input_tokens:0)+(typeof e.output_tokens==`number`?e.output_tokens:0)+(typeof e.cache_read_input_tokens==`number`?e.cache_read_input_tokens:0)+(typeof e.cache_creation_input_tokens==`number`?e.cache_creation_input_tokens:0)}r===null&&t?.model&&t.model!==`<synthetic>`&&(d=t.model);let s;r===null&&(m===null&&(m=w()),s=m);let c=ca(g,e,i,n,{clientCapabilities:a,cwd:o,parentToolUseId:r,streamingActive:p,messageId:s});for(let e of c)await n.sessionUpdate(e);r===null&&(m=null);break}case`user`:break;case`progress`:{let t=g.data;if(!t)break;let r=t.type;if(r===`agent_progress`||r===`skill_progress`){let r=t.message;if(r){let t=r.content;if(t)for(let r of t)r.type===`text`&&await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:r.text}}})}}break}case`tool_use_summary`:break;case`attachment`:break;case`compact_boundary`:u=0,await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:`
|
|
12
12
|
|
|
13
|
-
Compacting completed.`}}});break;default:fa.debug(`Ignoring unknown SDK message type`);break}}if(r.aborted||s?.())return{stopReason:`cancelled`,usage:l}}catch(e){if(r.aborted)return{stopReason:`cancelled`,usage:l};throw e}return{stopReason:c,usage:l}}async function ha(e,t,n,r,i,a){for(let o of t){let t=o;if(t.type!==`user`&&t.type!==`assistant`){fa.debug(`Ignoring unknown SDK message type`);continue}if(t.isMeta===!0)continue;let s=t.message?.content;if(!s)continue;let c=t.type===`assistant`?`assistant`:`user`;if(typeof s==`string`){if(!s.trim())continue;let t=w();await n.sessionUpdate({sessionId:e,update:{sessionUpdate:c===`assistant`?`agent_message_chunk`:`user_message_chunk`,...t?{messageId:t}:{},content:{type:`text`,text:s}}});continue}if(Array.isArray(s)){let t=X(s,c,e,r,n,void 0,{clientCapabilities:i,cwd:a,messageId:w()});for(let e of t)await n.sessionUpdate(e)}}}function ga(e,t,n,r,i,a,o,s){return async(n,c,l,u,d,f)=>{let p=va(r);if(n.name===`ExitPlanMode`)return _a(e,t,d,c,p,i,a,o,s);if(f!==void 0)return f;try{let e=await be(n,c,l,u,d);if(e.behavior===`allow`||e.behavior===`deny`)return e}catch(e){return console.error(`[ACP Permissions] Pipeline error:`,e),{behavior:`deny`,message:`Permission pipeline failed`,decisionReason:{type:`other`,reason:`Permission pipeline failed`},toolUseID:d}}let m=Y({name:n.name,id:d,input:c},p,i),h={toolCallId:d,title:m.title,kind:m.kind,status:`pending`,rawInput:c},g=[{kind:`allow_always`,name:`Always Allow`,optionId:`allow_always`},{kind:`allow_once`,name:`Allow`,optionId:`allow`},{kind:`reject_once`,name:`Reject`,optionId:`reject`},{kind:`reject_always`,name:`Always Reject`,optionId:`reject_always`}];try{let n=await e.requestPermission({sessionId:t,toolCall:h,options:g});if(n.outcome.outcome===`cancelled`)return s?.(),{behavior:`deny`,message:`Permission request cancelled by client`,decisionReason:{type:`mode`,mode:`default`},toolUseID:d};if(n.outcome.outcome===`selected`&&`optionId`in n.outcome&&n.outcome.optionId!==void 0){let e=n.outcome.optionId;if(e===`allow`||e===`allow_always`)return{behavior:`allow`,updatedInput:c}}return{behavior:`deny`,message:`Permission denied by client`,decisionReason:{type:`mode`,mode:`default`}}}catch(e){return console.error(`[ACP Permissions] Client request error:`,e),{behavior:`deny`,message:`Permission request failed`,decisionReason:{type:`mode`,mode:`default`}}}}}async function _a(e,t,n,r,i,a,o,s,c){let l=[{kind:`allow_always`,name:`Yes, and use "auto" mode`,optionId:`auto`},{kind:`allow_always`,name:`Yes, and auto-accept edits`,optionId:`acceptEdits`},{kind:`allow_once`,name:`Yes, and manually approve edits`,optionId:`default`},{kind:`reject_once`,name:`No, keep planning`,optionId:`plan`}];s?.()===!0&&l.unshift({kind:`allow_always`,name:`Yes, and bypass permissions`,optionId:`bypassPermissions`});let u=Y({name:`ExitPlanMode`,id:n,input:r},i,a),d={toolCallId:n,title:u.title,kind:u.kind,status:`pending`,rawInput:r},f=await e.requestPermission({sessionId:t,toolCall:d,options:l});if(f.outcome.outcome===`cancelled`)return c?.(),{behavior:`deny`,message:`Tool use aborted`,decisionReason:{type:`mode`,mode:`default`}};if(f.outcome.outcome===`selected`&&`optionId`in f.outcome&&f.outcome.optionId!==void 0){let n=f.outcome.optionId;if(l.some(e=>e.optionId===n)&&(n===`default`||n===`acceptEdits`||n===`auto`||n===`bypassPermissions`))return o?.(n),await e.sessionUpdate({sessionId:t,update:{sessionUpdate:`current_mode_update`,currentModeId:n}}),{behavior:`allow`,updatedInput:r}}return{behavior:`deny`,message:`User rejected request to exit plan mode.`,decisionReason:{type:`mode`,mode:`plan`}}}function va(e){if(!e)return!1;if(e.terminal===!0)return!0;let t=e._meta;return!t||typeof t!=`object`?!1:t.terminal_output===!0}le(),_e(),Te(),me(),e(),xe(),ye();var Z=class{constructor(e){t(this,`conn`,void 0),t(this,`sessions`,new Map),t(this,`clientCapabilities`,void 0),this.conn=e}async initialize(e){return this.clientCapabilities=e.clientCapabilities,{protocolVersion:1,authMethods:[],agentInfo:{name:`claude-code`,title:`Claude Code`,version:typeof globalThis.MACRO==`object`&&globalThis.MACRO!==null?String(globalThis.MACRO.VERSION??`0.0.0`):`0.0.0`},agentCapabilities:{_meta:{claudeCode:{promptQueueing:!0,forkSession:!0}},promptCapabilities:{image:!1,embeddedContext:!0},mcpCapabilities:{http:!0,sse:!0},loadSession:!0,sessionCapabilities:{list:{},resume:{},close:{},delete:{}}}}}async authenticate(e){return{}}async newSession(e){let t=await this.createSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async unstable_resumeSession(e){let t=await this.getOrCreateSession({...e,replay:!1});return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async loadSession(e){let t=await this.getOrCreateSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async listSessions(e){if(e.cursor!==void 0&&e.cursor!==null)throw Error(`Pagination cursor not supported: listSessions returns all results in a single page.`);let t=e.cwd||se(),n=await ge(t),r=await ve({dir:t}),i=[];for(let e of r){if(!e.cwd||await ge(e.cwd)!==n)continue;let t=ta(e.summary??``);i.push({sessionId:e.sessionId,cwd:e.cwd,...t?{title:t}:{},updatedAt:new Date(e.lastModified).toISOString()})}return{sessions:i}}async unstable_forkSession(e){let{initialMessages:t}=await ya(e.sessionId),n=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{initialMessages:t});return this.scheduleAvailableCommandsUpdate(n.sessionId),n}async unstable_closeSession(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return await this.teardownSession(e.sessionId),{}}async unstable_deleteSession(e){let t=await he(e.sessionId);if(t)try{await Ge(t.filePath)}catch(e){if(e.code!==`ENOENT`)throw e}return this.sessions.has(e.sessionId)&&await this.teardownSession(e.sessionId),{}}async extMethod(e,t){if(e===`session/delete`){let e=t.sessionId;if(typeof e!=`string`||e.length===0)throw Error(`session/delete requires a non-empty sessionId`);return this.unstable_deleteSession({sessionId:e})}throw q.methodNotFound(e)}async cancel(e){let t=this.sessions.get(e.sessionId);if(t){t.cancelled=!0,t.cancelGeneration+=1;for(let[,e]of t.pendingMessages)e.resolve(!0);t.pendingMessages.clear(),t.pendingQueue=[],t.pendingQueueHead=0,t.queryEngine.interrupt()}}async setSessionMode(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return this.applySessionMode(e.sessionId,e.modeId),await this.conn.sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:e.modeId}}),await this.updateConfigOption(e.sessionId,`mode`,e.modeId),{}}async unstable_setSessionModel(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);return t.queryEngine.setModel(e.modelId),await this.updateConfigOption(e.sessionId,`model`,e.modelId),{}}async sendAvailableCommandsUpdate(e){let t=this.sessions.get(e);if(!t)return;let n=t.commands.filter(e=>e.type===`prompt`&&!e.isHidden&&e.userInvocable!==!1).map(e=>({name:e.name,description:e.description,input:e.argumentHint?{hint:e.argumentHint}:void 0}));await this.conn.sessionUpdate({sessionId:e,update:{sessionUpdate:`available_commands_update`,availableCommands:n}})}scheduleAvailableCommandsUpdate(e){setTimeout(()=>{this.sendAvailableCommandsUpdate(e).catch(e=>{console.error(`[ACP] Failed to send available commands update:`,e)})},0)}};async function ya(e){let t;try{let n=await Ce(e);n&&n.messages.length>0&&(t=Ne(n.messages))}catch(e){console.error(`[ACP] fork source load failed:`,e)}return{initialMessages:t}}var ba=[`auto`,`default`,`acceptEdits`,`bypassPermissions`,`dontAsk`,`plan`];function xa(e){return ba.includes(e)}function Sa(e,t,n){if(t){let t=Ca(e,`_meta.permissionMode`);if(t===`bypassPermissions`&&!Ea())throw Error(`Mode not available: bypassPermissions cannot run as root (start the agent as a non-root user, or set IS_SANDBOX=1).`);return t}return wa(n)??`default`}function Ca(e,t){if(e==null)throw Error(`Invalid ${t}: expected a string.`);return Qi(e,t)}function wa(e){if(e!=null)try{return Qi(e,`permissions.defaultMode`)}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[ACP] Invalid permissions.defaultMode, using default:`,t);return}}function Ta(e,t){return!!e&&Object.hasOwn(e,t)}function Ea(){return Da()}function Da(){return process.env.IS_SANDBOX?!0:typeof process.geteuid==`function`?process.geteuid()!==0:typeof process.getuid==`function`?process.getuid()!==0:!0}function Oa(e,t){return[{id:`mode`,name:`Mode`,description:`Session permission mode`,category:`mode`,type:`select`,currentValue:e.currentModeId,options:e.availableModes.map(e=>({value:e.id,name:e.name,description:e.description}))},{id:`model`,name:`Model`,description:`AI model to use`,category:`model`,type:`select`,currentValue:t.currentModelId,options:t.availableModels.map(e=>({value:e.modelId,name:e.name,description:e.description??void 0}))}]}function ka(e){let t=[];if(!Array.isArray(e))return t;for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(Array.isArray(e.options))for(let n of e.options)n&&typeof n==`object`&&typeof n.value==`string`&&t.push(n.value);else typeof n.value==`string`&&t.push(n.value)}return t}function Q(e){return e.conn}function $(e){return e.clientCapabilities}function Aa(e,t,n,r){n===`mode`?t.modes={...t.modes,currentModeId:r}:n===`model`&&(t.models={...t.models,currentModelId:r})}S();function ja(){return ue().permissions?.defaultMode}async function Ma(e,t={}){de();let n=t.sessionId??w(),r=e.cwd;C(n,ie()),oe(r);let i=process.cwd(),a=!1;try{process.chdir(r),a=!0}catch{}re(),Pe();try{let i=Re(),a=Ee(i),o=e._meta,s=Ta(o,`permissionMode`),c=Sa(s?o?.permissionMode:void 0,s,ja()),l=$(this),u=this.conn,d=ga(u,n,()=>this.sessions.get(n)?.modes.currentModeId??`default`,l,r,e=>{this.applySessionMode(n,e)},()=>this.sessions.get(n)?.appState.toolPermissionContext.isBypassPermissionsModeAvailable??!1),f=Ea(),p={...Fe(),toolPermissionContext:{...i,mode:c,isBypassPermissionsModeAvailable:f}},[m,h]=await Promise.all([De(r),Ae(r)]);p.agentDefinitions=h;let g=new Ve({cwd:r,tools:a,commands:m,mcpClients:[],agents:h.activeAgents,canUseTool:d,getAppState:()=>p,setAppState:e=>{let t=e(p);Object.assign(p,t)},readFileCache:new Be(500,50*1024*1024),includePartialMessages:!0,replayUserMessages:!0,initialMessages:t.initialMessages}),_={currentModeId:c,availableModes:[{id:`default`,name:`Default`,description:`Standard behavior, prompts for dangerous operations`},{id:`acceptEdits`,name:`Accept Edits`,description:`Auto-accept file edit operations`},{id:`plan`,name:`Plan Mode`,description:`Planning mode, no actual tool execution`},{id:`auto`,name:`Auto`,description:`Use a model classifier to approve/deny permission prompts.`},...f?[{id:`bypassPermissions`,name:`Bypass Permissions`,description:`Skip all permission checks`}]:[],{id:`dontAsk`,name:`Don't Ask`,description:`Don't prompt for permissions, deny if not pre-approved`}]},ee=Ie(),v=ce(),y={availableModels:ee.map(e=>({modelId:String(e.value??``),name:e.label??String(e.value??``),description:e.description??void 0})),currentModelId:v};g.setModel(v);let b=Oa(_,y),te={queryEngine:g,cancelled:!1,cancelGeneration:0,cwd:r,modes:_,models:y,configOptions:b,promptRunning:!1,pendingMessages:new Map,pendingQueue:[],pendingQueueHead:0,toolUseCache:{},clientCapabilities:l,appState:p,commands:m,sessionFingerprint:$i({cwd:r,mcpServers:e.mcpServers})};return this.sessions.set(n,te),{sessionId:n,modes:_,models:y,configOptions:b}}finally{a&&process.chdir(i)}}Object.assign(Z.prototype,{createSession:Ma}),xe(),ye(),S(),me();async function Na(e){let t=e.replay!==!1,n=this.sessions.get(e.sessionId);if(n){if($i({cwd:e.cwd,mcpServers:e.mcpServers})===n.sessionFingerprint){let r=await he(e.sessionId,e.cwd);return C(e.sessionId,r?He(r.filePath):null),oe(e.cwd),t&&await this.replaySessionHistory(e),{sessionId:e.sessionId,modes:n.modes,models:n.models,configOptions:n.configOptions}}await this.teardownSession(e.sessionId)}let r=await he(e.sessionId,e.cwd),i=r?He(r.filePath):null;C(e.sessionId,i),oe(e.cwd);let a;if(r)try{let t=await Ce(e.sessionId);t&&t.messages.length>0&&(a=Ne(t.messages))}catch(e){console.error(`[ACP] Failed to load session history:`,e)}let o=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{sessionId:e.sessionId,initialMessages:a});if(t&&a&&a.length>0){let t=this.sessions.get(e.sessionId);t&&await ha(e.sessionId,a,Q(this),t.toolUseCache,$(this),t.cwd)}return{sessionId:o.sessionId,modes:o.modes,models:o.models,configOptions:o.configOptions}}async function Pa(e){this.sessions.get(e)&&(await this.cancel({sessionId:e}),this.sessions.delete(e))}async function Fa(e){try{let t=await Ce(e.sessionId);if(!t||t.messages.length===0)return;let n=Ne(t.messages);if(n.length===0)return;let r=this.sessions.get(e.sessionId);if(!r)return;await ha(e.sessionId,n,Q(this),r.toolUseCache,$(this),r.cwd)}catch(e){console.error(`[ACP] Failed to replay session history:`,e)}}function Ia(e,t){if(!xa(t))throw Error(`Invalid mode: ${t}`);let n=this.sessions.get(e);if(n){if(t===`bypassPermissions`&&!n.appState.toolPermissionContext.isBypassPermissionsModeAvailable||!n.modes.availableModes.some(e=>e.id===t))throw Error(`Mode not available: ${t}`);n.modes={...n.modes,currentModeId:t},n.appState.toolPermissionContext={...n.appState.toolPermissionContext,mode:t}}}async function La(e,t,n){let r=this.sessions.get(e);r&&(Aa(this,r,t,n),r.configOptions=r.configOptions.map(e=>e.id===t&&typeof e.currentValue==`string`?{...e,currentValue:n}:e),await Q(this).sessionUpdate({sessionId:e,update:{sessionUpdate:`config_option_update`,configOptions:r.configOptions}}))}Object.assign(Z.prototype,{getOrCreateSession:Na,teardownSession:Pa,replaySessionHistory:Fa,applySessionMode:Ia,updateConfigOption:La});function Ra(e){if(!e||e.length===0)return``;let t=[];for(let n of e){let e=n;if(e.type===`text`)t.push(String(e.text??``));else if(e.type===`resource_link`){let n=typeof e.name==`string`?e.name:void 0,r=typeof e.uri==`string`?e.uri:void 0;t.push(za(n,r))}else if(e.type===`resource`){let n=e.resource;if(n&&typeof n.text==`string`)t.push(n.text);else if(n&&typeof n.blob==`string`){let e=typeof n.mimeType==`string`?n.mimeType:`application/octet-stream`,r=typeof n.uri==`string`?n.uri:`(unknown uri)`;t.push(`Embedded resource: ${r} (${e}, base64 blob, ${n.blob.length} chars)`)}}}return t.filter(e=>e.length>0).join(`
|
|
14
|
-
`)}function za(e,t){let n=[];return e&&e.length>0&&n.push(`name=${e}`),t&&t.length>0&&n.push(`uri=${t}`),n.length>0?`Resource link: ${n.join(`, `)}`:`Resource link`}function Ba(e){for(;e.pendingQueueHead<e.pendingQueue.length;){let t=e.pendingQueue[e.pendingQueueHead++];if(!t)continue;let n=e.pendingMessages.get(t);if(n)return e.pendingMessages.delete(t),Va(e),n}Va(e)}function Va(e){if(e.pendingQueueHead!==0){if(e.pendingQueueHead>=e.pendingQueue.length){e.pendingQueue=[],e.pendingQueueHead=0;return}e.pendingQueueHead>1024&&e.pendingQueueHead*2>e.pendingQueue.length&&(e.pendingQueue=e.pendingQueue.slice(e.pendingQueueHead),e.pendingQueueHead=0)}}S();async function Ha(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session ${e.sessionId} not found`);let n=e.messageId??void 0,r=Ra(e.prompt);if(!r.trim())throw Error(`Prompt content is empty`);let i=t.cancelGeneration;if(t.promptRunning){let e=w();if(await new Promise(n=>{t.pendingQueue.push(e),t.pendingMessages.set(e,{resolve:n})}))return{stopReason:`cancelled`}}if(t.cancelGeneration!==i)return{stopReason:`cancelled`};t.cancelled=!1,t.promptRunning=!0;try{t.queryEngine.resetAbortController(),C(e.sessionId,ie());let i=t.queryEngine.submitMessage(r),{stopReason:a,usage:o}=await ma(e.sessionId,i,Q(this),t.queryEngine.getAbortSignal(),t.toolUseCache,$(this),t.cwd,()=>t.cancelled);if(t.cancelled)return{stopReason:`cancelled`};if(await Wa(this,e.sessionId,r),o){let e={inputTokens:o.inputTokens,outputTokens:o.outputTokens,cachedReadTokens:o.cachedReadTokens,cachedWriteTokens:o.cachedWriteTokens,thoughtTokens:0,totalTokens:o.inputTokens+o.outputTokens+o.cachedReadTokens+o.cachedWriteTokens+0};return{stopReason:a,usage:e,...n?{userMessageId:n}:{},_meta:{claudeCode:{usage:e}}}}return{stopReason:a,...n?{userMessageId:n}:{}}}catch(n){let r=n instanceof Error&&(n.name===`AbortError`||/abort|cancelled|interrupt/i.test(n.message));if(t.cancelled||r)return{stopReason:`cancelled`};throw n instanceof Error&&(n.message.includes(`terminated`)||n.message.includes(`process exited`))?(await this.teardownSession(e.sessionId),Error(`The Claude Agent process exited unexpectedly. Please start a new session.`)):n}finally{let e=Ba(t);e?(t.promptRunning=!0,e.resolve(!1)):t.promptRunning=!1}}async function Ua(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);if(typeof e.value!=`string`)throw Error(`Invalid value for config option ${e.configId}: ${String(e.value)}`);let n=t.configOptions.find(t=>t.id===e.configId);if(!n)throw Error(`Unknown config option: ${e.configId}`);if(n.type===`select`){let t=ka(n.options);if(!t.includes(e.value))throw Error(`Invalid value '${e.value}' for config option ${e.configId}; must be one of: ${t.join(`, `)}`)}let r=e.value;return e.configId===`mode`?(this.applySessionMode(e.sessionId,r),await Q(this).sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:r}})):e.configId===`model`&&t.queryEngine.setModel(r),Aa(this,t,e.configId,r),t.configOptions=t.configOptions.map(t=>t.id===e.configId&&typeof t.currentValue==`string`?{...t,currentValue:r}:t),{configOptions:t.configOptions}}async function Wa(e,t,n){let r=e.sessions.get(t);if(!r)return;let i=r.toolUseCache;if(i.__sessionInfoTitleSent)return;i.__sessionInfoTitleSent=!0;let a=ta(n).slice(0,100);try{await Q(e).sessionUpdate({sessionId:t,update:{sessionUpdate:`session_info_update`,...a?{title:a}:{},updatedAt:new Date().toISOString()}})}catch(e){console.error(`[ACP] Failed to send session_info_update:`,e)}}Object.assign(Z.prototype,{prompt:Ha,setSessionConfigOption:Ua}),pe(),
|
|
13
|
+
Compacting completed.`}}});break;default:fa.debug(`Ignoring unknown SDK message type`);break}}if(r.aborted||s?.())return{stopReason:`cancelled`,usage:l}}catch(e){if(r.aborted)return{stopReason:`cancelled`,usage:l};throw e}return{stopReason:c,usage:l}}async function ha(e,t,n,r,i,a){for(let o of t){let t=o;if(t.type!==`user`&&t.type!==`assistant`){fa.debug(`Ignoring unknown SDK message type`);continue}if(t.isMeta===!0)continue;let s=t.message?.content;if(!s)continue;let c=t.type===`assistant`?`assistant`:`user`;if(typeof s==`string`){if(!s.trim())continue;let t=w();await n.sessionUpdate({sessionId:e,update:{sessionUpdate:c===`assistant`?`agent_message_chunk`:`user_message_chunk`,...t?{messageId:t}:{},content:{type:`text`,text:s}}});continue}if(Array.isArray(s)){let t=X(s,c,e,r,n,void 0,{clientCapabilities:i,cwd:a,messageId:w()});for(let e of t)await n.sessionUpdate(e)}}}function ga(e,t,n,r,i,a,o,s){return async(n,c,l,u,d,f)=>{let p=va(r);if(n.name===`ExitPlanMode`)return _a(e,t,d,c,p,i,a,o,s);if(f!==void 0)return f;try{let e=await Se(n,c,l,u,d);if(e.behavior===`allow`||e.behavior===`deny`)return e}catch(e){return console.error(`[ACP Permissions] Pipeline error:`,e),{behavior:`deny`,message:`Permission pipeline failed`,decisionReason:{type:`other`,reason:`Permission pipeline failed`},toolUseID:d}}let m=Y({name:n.name,id:d,input:c},p,i),h={toolCallId:d,title:m.title,kind:m.kind,status:`pending`,rawInput:c},g=[{kind:`allow_always`,name:`Always Allow`,optionId:`allow_always`},{kind:`allow_once`,name:`Allow`,optionId:`allow`},{kind:`reject_once`,name:`Reject`,optionId:`reject`},{kind:`reject_always`,name:`Always Reject`,optionId:`reject_always`}];try{let n=await e.requestPermission({sessionId:t,toolCall:h,options:g});if(n.outcome.outcome===`cancelled`)return s?.(),{behavior:`deny`,message:`Permission request cancelled by client`,decisionReason:{type:`mode`,mode:`default`},toolUseID:d};if(n.outcome.outcome===`selected`&&`optionId`in n.outcome&&n.outcome.optionId!==void 0){let e=n.outcome.optionId;if(e===`allow`||e===`allow_always`)return{behavior:`allow`,updatedInput:c}}return{behavior:`deny`,message:`Permission denied by client`,decisionReason:{type:`mode`,mode:`default`}}}catch(e){return console.error(`[ACP Permissions] Client request error:`,e),{behavior:`deny`,message:`Permission request failed`,decisionReason:{type:`mode`,mode:`default`}}}}}async function _a(e,t,n,r,i,a,o,s,c){let l=[{kind:`allow_always`,name:`Yes, and use "auto" mode`,optionId:`auto`},{kind:`allow_always`,name:`Yes, and auto-accept edits`,optionId:`acceptEdits`},{kind:`allow_once`,name:`Yes, and manually approve edits`,optionId:`default`},{kind:`reject_once`,name:`No, keep planning`,optionId:`plan`}];s?.()===!0&&l.unshift({kind:`allow_always`,name:`Yes, and bypass permissions`,optionId:`bypassPermissions`});let u=Y({name:`ExitPlanMode`,id:n,input:r},i,a),d={toolCallId:n,title:u.title,kind:u.kind,status:`pending`,rawInput:r},f=await e.requestPermission({sessionId:t,toolCall:d,options:l});if(f.outcome.outcome===`cancelled`)return c?.(),{behavior:`deny`,message:`Tool use aborted`,decisionReason:{type:`mode`,mode:`default`}};if(f.outcome.outcome===`selected`&&`optionId`in f.outcome&&f.outcome.optionId!==void 0){let n=f.outcome.optionId;if(l.some(e=>e.optionId===n)&&(n===`default`||n===`acceptEdits`||n===`auto`||n===`bypassPermissions`))return o?.(n),await e.sessionUpdate({sessionId:t,update:{sessionUpdate:`current_mode_update`,currentModeId:n}}),{behavior:`allow`,updatedInput:r}}return{behavior:`deny`,message:`User rejected request to exit plan mode.`,decisionReason:{type:`mode`,mode:`plan`}}}function va(e){if(!e)return!1;if(e.terminal===!0)return!0;let t=e._meta;return!t||typeof t!=`object`?!1:t.terminal_output===!0}le(),Ce(),be(),me(),e(),je(),Te();var Z=class{constructor(e){t(this,`conn`,void 0),t(this,`sessions`,new Map),t(this,`clientCapabilities`,void 0),this.conn=e}async initialize(e){return this.clientCapabilities=e.clientCapabilities,{protocolVersion:1,authMethods:[],agentInfo:{name:`claude-code`,title:`Claude Code`,version:typeof globalThis.MACRO==`object`&&globalThis.MACRO!==null?String(globalThis.MACRO.VERSION??`0.0.0`):`0.0.0`},agentCapabilities:{_meta:{claudeCode:{promptQueueing:!0,forkSession:!0}},promptCapabilities:{image:!1,embeddedContext:!0},mcpCapabilities:{http:!0,sse:!0},loadSession:!0,sessionCapabilities:{list:{},resume:{},close:{},delete:{}}}}}async authenticate(e){return{}}async newSession(e){let t=await this.createSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async unstable_resumeSession(e){let t=await this.getOrCreateSession({...e,replay:!1});return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async loadSession(e){let t=await this.getOrCreateSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async listSessions(e){if(e.cursor!==void 0&&e.cursor!==null)throw Error(`Pagination cursor not supported: listSessions returns all results in a single page.`);let t=e.cwd||se(),n=await ge(t),r=await Ee({dir:t}),i=[];for(let e of r){if(!e.cwd||await ge(e.cwd)!==n)continue;let t=ta(e.summary??``);i.push({sessionId:e.sessionId,cwd:e.cwd,...t?{title:t}:{},updatedAt:new Date(e.lastModified).toISOString()})}return{sessions:i}}async unstable_forkSession(e){let{initialMessages:t}=await ya(e.sessionId),n=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{initialMessages:t});return this.scheduleAvailableCommandsUpdate(n.sessionId),n}async unstable_closeSession(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return await this.teardownSession(e.sessionId),{}}async unstable_deleteSession(e){let t=await he(e.sessionId);if(t)try{await Ge(t.filePath)}catch(e){if(e.code!==`ENOENT`)throw e}return this.sessions.has(e.sessionId)&&await this.teardownSession(e.sessionId),{}}async extMethod(e,t){if(e===`session/delete`){let e=t.sessionId;if(typeof e!=`string`||e.length===0)throw Error(`session/delete requires a non-empty sessionId`);return this.unstable_deleteSession({sessionId:e})}throw q.methodNotFound(e)}async cancel(e){let t=this.sessions.get(e.sessionId);if(t){t.cancelled=!0,t.cancelGeneration+=1;for(let[,e]of t.pendingMessages)e.resolve(!0);t.pendingMessages.clear(),t.pendingQueue=[],t.pendingQueueHead=0,t.queryEngine.interrupt()}}async setSessionMode(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return this.applySessionMode(e.sessionId,e.modeId),await this.conn.sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:e.modeId}}),await this.updateConfigOption(e.sessionId,`mode`,e.modeId),{}}async unstable_setSessionModel(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);return t.queryEngine.setModel(e.modelId),await this.updateConfigOption(e.sessionId,`model`,e.modelId),{}}async sendAvailableCommandsUpdate(e){let t=this.sessions.get(e);if(!t)return;let n=t.commands.filter(e=>e.type===`prompt`&&!e.isHidden&&e.userInvocable!==!1).map(e=>({name:e.name,description:e.description,input:e.argumentHint?{hint:e.argumentHint}:void 0}));await this.conn.sessionUpdate({sessionId:e,update:{sessionUpdate:`available_commands_update`,availableCommands:n}})}scheduleAvailableCommandsUpdate(e){setTimeout(()=>{this.sendAvailableCommandsUpdate(e).catch(e=>{console.error(`[ACP] Failed to send available commands update:`,e)})},0)}};async function ya(e){let t;try{let n=await ke(e);n&&n.messages.length>0&&(t=Me(n.messages))}catch(e){console.error(`[ACP] fork source load failed:`,e)}return{initialMessages:t}}var ba=[`auto`,`default`,`acceptEdits`,`bypassPermissions`,`dontAsk`,`plan`];function xa(e){return ba.includes(e)}function Sa(e,t,n){if(t){let t=Ca(e,`_meta.permissionMode`);if(t===`bypassPermissions`&&!Ea())throw Error(`Mode not available: bypassPermissions cannot run as root (start the agent as a non-root user, or set IS_SANDBOX=1).`);return t}return wa(n)??`default`}function Ca(e,t){if(e==null)throw Error(`Invalid ${t}: expected a string.`);return Qi(e,t)}function wa(e){if(e!=null)try{return Qi(e,`permissions.defaultMode`)}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[ACP] Invalid permissions.defaultMode, using default:`,t);return}}function Ta(e,t){return!!e&&Object.hasOwn(e,t)}function Ea(){return Da()}function Da(){return process.env.IS_SANDBOX?!0:typeof process.geteuid==`function`?process.geteuid()!==0:typeof process.getuid==`function`?process.getuid()!==0:!0}function Oa(e,t){return[{id:`mode`,name:`Mode`,description:`Session permission mode`,category:`mode`,type:`select`,currentValue:e.currentModeId,options:e.availableModes.map(e=>({value:e.id,name:e.name,description:e.description}))},{id:`model`,name:`Model`,description:`AI model to use`,category:`model`,type:`select`,currentValue:t.currentModelId,options:t.availableModels.map(e=>({value:e.modelId,name:e.name,description:e.description??void 0}))}]}function ka(e){let t=[];if(!Array.isArray(e))return t;for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(Array.isArray(e.options))for(let n of e.options)n&&typeof n==`object`&&typeof n.value==`string`&&t.push(n.value);else typeof n.value==`string`&&t.push(n.value)}return t}function Q(e){return e.conn}function $(e){return e.clientCapabilities}function Aa(e,t,n,r){n===`mode`?t.modes={...t.modes,currentModeId:r}:n===`model`&&(t.models={...t.models,currentModelId:r})}S();function ja(){return ue().permissions?.defaultMode}async function Ma(e,t={}){de();let n=t.sessionId??w(),r=e.cwd;C(n,ie()),oe(r);let i=process.cwd(),a=!1;try{process.chdir(r),a=!0}catch{}re(),xe();try{let i=Re(),a=De(i),o=e._meta,s=Ta(o,`permissionMode`),c=Sa(s?o?.permissionMode:void 0,s,ja()),l=$(this),u=this.conn,d=ga(u,n,()=>this.sessions.get(n)?.modes.currentModeId??`default`,l,r,e=>{this.applySessionMode(n,e)},()=>this.sessions.get(n)?.appState.toolPermissionContext.isBypassPermissionsModeAvailable??!1),f=Ea(),p={...Ie(),toolPermissionContext:{...i,mode:c,isBypassPermissionsModeAvailable:f}},[m,h]=await Promise.all([_e(r),Ne(r)]);p.agentDefinitions=h;let g=new Ve({cwd:r,tools:a,commands:m,mcpClients:[],agents:h.activeAgents,canUseTool:d,getAppState:()=>p,setAppState:e=>{let t=e(p);Object.assign(p,t)},readFileCache:new Be(500,50*1024*1024),includePartialMessages:!0,replayUserMessages:!0,initialMessages:t.initialMessages}),_={currentModeId:c,availableModes:[{id:`default`,name:`Default`,description:`Standard behavior, prompts for dangerous operations`},{id:`acceptEdits`,name:`Accept Edits`,description:`Auto-accept file edit operations`},{id:`plan`,name:`Plan Mode`,description:`Planning mode, no actual tool execution`},{id:`auto`,name:`Auto`,description:`Use a model classifier to approve/deny permission prompts.`},...f?[{id:`bypassPermissions`,name:`Bypass Permissions`,description:`Skip all permission checks`}]:[],{id:`dontAsk`,name:`Don't Ask`,description:`Don't prompt for permissions, deny if not pre-approved`}]},ee=Ae(),v=ce(),y={availableModels:ee.map(e=>({modelId:String(e.value??``),name:e.label??String(e.value??``),description:e.description??void 0})),currentModelId:v};g.setModel(v);let b=Oa(_,y),te={queryEngine:g,cancelled:!1,cancelGeneration:0,cwd:r,modes:_,models:y,configOptions:b,promptRunning:!1,pendingMessages:new Map,pendingQueue:[],pendingQueueHead:0,toolUseCache:{},clientCapabilities:l,appState:p,commands:m,sessionFingerprint:$i({cwd:r,mcpServers:e.mcpServers})};return this.sessions.set(n,te),{sessionId:n,modes:_,models:y,configOptions:b}}finally{a&&process.chdir(i)}}Object.assign(Z.prototype,{createSession:Ma}),je(),Te(),S(),me();async function Na(e){let t=e.replay!==!1,n=this.sessions.get(e.sessionId);if(n){if($i({cwd:e.cwd,mcpServers:e.mcpServers})===n.sessionFingerprint){let r=await he(e.sessionId,e.cwd);return C(e.sessionId,r?He(r.filePath):null),oe(e.cwd),t&&await this.replaySessionHistory(e),{sessionId:e.sessionId,modes:n.modes,models:n.models,configOptions:n.configOptions}}await this.teardownSession(e.sessionId)}let r=await he(e.sessionId,e.cwd),i=r?He(r.filePath):null;C(e.sessionId,i),oe(e.cwd);let a;if(r)try{let t=await ke(e.sessionId);t&&t.messages.length>0&&(a=Me(t.messages))}catch(e){console.error(`[ACP] Failed to load session history:`,e)}let o=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{sessionId:e.sessionId,initialMessages:a});if(t&&a&&a.length>0){let t=this.sessions.get(e.sessionId);t&&await ha(e.sessionId,a,Q(this),t.toolUseCache,$(this),t.cwd)}return{sessionId:o.sessionId,modes:o.modes,models:o.models,configOptions:o.configOptions}}async function Pa(e){this.sessions.get(e)&&(await this.cancel({sessionId:e}),this.sessions.delete(e))}async function Fa(e){try{let t=await ke(e.sessionId);if(!t||t.messages.length===0)return;let n=Me(t.messages);if(n.length===0)return;let r=this.sessions.get(e.sessionId);if(!r)return;await ha(e.sessionId,n,Q(this),r.toolUseCache,$(this),r.cwd)}catch(e){console.error(`[ACP] Failed to replay session history:`,e)}}function Ia(e,t){if(!xa(t))throw Error(`Invalid mode: ${t}`);let n=this.sessions.get(e);if(n){if(t===`bypassPermissions`&&!n.appState.toolPermissionContext.isBypassPermissionsModeAvailable||!n.modes.availableModes.some(e=>e.id===t))throw Error(`Mode not available: ${t}`);n.modes={...n.modes,currentModeId:t},n.appState.toolPermissionContext={...n.appState.toolPermissionContext,mode:t}}}async function La(e,t,n){let r=this.sessions.get(e);r&&(Aa(this,r,t,n),r.configOptions=r.configOptions.map(e=>e.id===t&&typeof e.currentValue==`string`?{...e,currentValue:n}:e),await Q(this).sessionUpdate({sessionId:e,update:{sessionUpdate:`config_option_update`,configOptions:r.configOptions}}))}Object.assign(Z.prototype,{getOrCreateSession:Na,teardownSession:Pa,replaySessionHistory:Fa,applySessionMode:Ia,updateConfigOption:La});function Ra(e){if(!e||e.length===0)return``;let t=[];for(let n of e){let e=n;if(e.type===`text`)t.push(String(e.text??``));else if(e.type===`resource_link`){let n=typeof e.name==`string`?e.name:void 0,r=typeof e.uri==`string`?e.uri:void 0;t.push(za(n,r))}else if(e.type===`resource`){let n=e.resource;if(n&&typeof n.text==`string`)t.push(n.text);else if(n&&typeof n.blob==`string`){let e=typeof n.mimeType==`string`?n.mimeType:`application/octet-stream`,r=typeof n.uri==`string`?n.uri:`(unknown uri)`;t.push(`Embedded resource: ${r} (${e}, base64 blob, ${n.blob.length} chars)`)}}}return t.filter(e=>e.length>0).join(`
|
|
14
|
+
`)}function za(e,t){let n=[];return e&&e.length>0&&n.push(`name=${e}`),t&&t.length>0&&n.push(`uri=${t}`),n.length>0?`Resource link: ${n.join(`, `)}`:`Resource link`}function Ba(e){for(;e.pendingQueueHead<e.pendingQueue.length;){let t=e.pendingQueue[e.pendingQueueHead++];if(!t)continue;let n=e.pendingMessages.get(t);if(n)return e.pendingMessages.delete(t),Va(e),n}Va(e)}function Va(e){if(e.pendingQueueHead!==0){if(e.pendingQueueHead>=e.pendingQueue.length){e.pendingQueue=[],e.pendingQueueHead=0;return}e.pendingQueueHead>1024&&e.pendingQueueHead*2>e.pendingQueue.length&&(e.pendingQueue=e.pendingQueue.slice(e.pendingQueueHead),e.pendingQueueHead=0)}}S();async function Ha(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session ${e.sessionId} not found`);let n=e.messageId??void 0,r=Ra(e.prompt);if(!r.trim())throw Error(`Prompt content is empty`);let i=t.cancelGeneration;if(t.promptRunning){let e=w();if(await new Promise(n=>{t.pendingQueue.push(e),t.pendingMessages.set(e,{resolve:n})}))return{stopReason:`cancelled`}}if(t.cancelGeneration!==i)return{stopReason:`cancelled`};t.cancelled=!1,t.promptRunning=!0;try{t.queryEngine.resetAbortController(),C(e.sessionId,ie());let i=t.queryEngine.submitMessage(r),{stopReason:a,usage:o}=await ma(e.sessionId,i,Q(this),t.queryEngine.getAbortSignal(),t.toolUseCache,$(this),t.cwd,()=>t.cancelled);if(t.cancelled)return{stopReason:`cancelled`};if(await Wa(this,e.sessionId,r),o){let e={inputTokens:o.inputTokens,outputTokens:o.outputTokens,cachedReadTokens:o.cachedReadTokens,cachedWriteTokens:o.cachedWriteTokens,thoughtTokens:0,totalTokens:o.inputTokens+o.outputTokens+o.cachedReadTokens+o.cachedWriteTokens+0};return{stopReason:a,usage:e,...n?{userMessageId:n}:{},_meta:{claudeCode:{usage:e}}}}return{stopReason:a,...n?{userMessageId:n}:{}}}catch(n){let r=n instanceof Error&&(n.name===`AbortError`||/abort|cancelled|interrupt/i.test(n.message));if(t.cancelled||r)return{stopReason:`cancelled`};throw n instanceof Error&&(n.message.includes(`terminated`)||n.message.includes(`process exited`))?(await this.teardownSession(e.sessionId),Error(`The Claude Agent process exited unexpectedly. Please start a new session.`)):n}finally{let e=Ba(t);e?(t.promptRunning=!0,e.resolve(!1)):t.promptRunning=!1}}async function Ua(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session not found`);if(typeof e.value!=`string`)throw Error(`Invalid value for config option ${e.configId}: ${String(e.value)}`);let n=t.configOptions.find(t=>t.id===e.configId);if(!n)throw Error(`Unknown config option: ${e.configId}`);if(n.type===`select`){let t=ka(n.options);if(!t.includes(e.value))throw Error(`Invalid value '${e.value}' for config option ${e.configId}; must be one of: ${t.join(`, `)}`)}let r=e.value;return e.configId===`mode`?(this.applySessionMode(e.sessionId,r),await Q(this).sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:r}})):e.configId===`model`&&t.queryEngine.setModel(r),Aa(this,t,e.configId,r),t.configOptions=t.configOptions.map(t=>t.id===e.configId&&typeof t.currentValue==`string`?{...t,currentValue:r}:t),{configOptions:t.configOptions}}async function Wa(e,t,n){let r=e.sessions.get(t);if(!r)return;let i=r.toolUseCache;if(i.__sessionInfoTitleSent)return;i.__sessionInfoTitleSent=!0;let a=ta(n).slice(0,100);try{await Q(e).sessionUpdate({sessionId:t,update:{sessionUpdate:`session_info_update`,...a?{title:a}:{},updatedAt:new Date().toISOString()}})}catch(e){console.error(`[ACP] Failed to send session_info_update:`,e)}}Object.assign(Z.prototype,{prompt:Ha,setSessionConfigOption:Ua}),pe(),ye();function Ga(e,t){let n=Ue.toWeb(e);return Pi(We.toWeb(t),n)}async function Ka(){de(),xe();let e=Ga(process.stdin,process.stdout),t,n=new Ii(e=>(t=new Z(e),t),e);console.log=console.error,console.info=console.error,console.warn=console.error,console.debug=console.error;async function r(){for(let[e]of t.sessions)try{await t.unstable_closeSession({sessionId:e})}catch{}process.exit(0)}n.closed.then(r).catch(r),process.on(`SIGTERM`,r),process.on(`SIGINT`,r),process.on(`unhandledRejection`,(e,t)=>{console.error(`Unhandled Rejection at:`,t,`reason:`,e)}),process.stdin.resume()}export{Ka as runAcpAgent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,kt as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{S as o,y as s}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Cn as t,Ln as n,kt as r,wn as i}from"./schemas-BGAvj1T4.js";import{t as a}from"./v4-f1i_CNUT.js";import{S as o,y as s}from"./paths-nIHVpTn2.js";import{n as c,t as l}from"./lazySchema-B0QShMaQ.js";import{i as u,r as d}from"./semver-Di5OaTd5.js";import{r as f,s as p}from"./bridgeEnabled-B3KTIVe4.js";async function m(){let e=await s(`tengu_bridge_repl_v2_config`,_),t=v().safeParse(e);return t.success?t.data:_}async function h(){let e=await m();return e.min_version&&u(`2.8.3`,e.min_version)?`Your version of Claude Code (2.8.3) is too old for Remote Control.\nVersion ${e.min_version} or higher is required. Run \`claude update\` to update.`:null}async function g(){return p()?(await m()).should_show_app_upgrade_message:!1}var _,v,y=e((()=>{a(),o(),l(),d(),f(),_={init_retry_max_attempts:3,init_retry_base_delay_ms:500,init_retry_jitter_fraction:.25,init_retry_max_delay_ms:4e3,http_timeout_ms:1e4,uuid_dedup_buffer_size:2e3,heartbeat_interval_ms:2e4,heartbeat_jitter_fraction:.1,token_refresh_buffer_ms:3e5,teardown_archive_timeout_ms:1500,connect_timeout_ms:15e3,min_version:`0.0.0`,should_show_app_upgrade_message:!1},v=c(()=>i({init_retry_max_attempts:t().int().min(1).max(10).default(3),init_retry_base_delay_ms:t().int().min(100).default(500),init_retry_jitter_fraction:t().min(0).max(1).default(.25),init_retry_max_delay_ms:t().int().min(500).default(4e3),http_timeout_ms:t().int().min(2e3).default(1e4),uuid_dedup_buffer_size:t().int().min(100).max(5e4).default(2e3),heartbeat_interval_ms:t().int().min(5e3).max(3e4).default(2e4),heartbeat_jitter_fraction:t().min(0).max(.5).default(.1),token_refresh_buffer_ms:t().int().min(3e4).max(18e5).default(3e5),teardown_archive_timeout_ms:t().int().min(500).max(2e3).default(1500),connect_timeout_ms:t().int().min(5e3).max(6e4).default(15e3),min_version:n().refine(e=>{try{return u(e,`0.0.0`),!0}catch{return!1}}).default(`0.0.0`),should_show_app_upgrade_message:r().default(!1)}))}));export{g as a,y as i,h as n,m as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t}from"./envLessBridgeConfig-C_sqoGX6.js";t();export{e as shouldShowAppUpgradeMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{fl as r,pl as i}from"./paths-nIHVpTn2.js";import{EE as a,Ot as o,Sd as s,Tt as c,wE as l,xd as u}from"./loadAgentsDir-BfEZacjM.js";import{n as d,t as f}from"./ExitFlow-cRfxceuS.js";import{spawnSync as p}from"child_process";function m(){return i(_)??`Goodbye!`}async function h(e){if(s())return e(),p(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let t=c()!==null;return t?(0,g.jsx)(f,{showWorktree:t,onDone:e,onCancel:()=>e()}):(e(m()),await l(0,`prompt_input_exit`),null)}var g,_;e((()=>{r(),t(),d(),u(),a(),o(),g=n(),_=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{h as call};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,f as a,g as o,h as s,t as c,tn as l,tt as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{A as p,E as m}from"./debug-otxXY3j-.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,f as a,g as o,h as s,t as c,tn as l,tt as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{A as p,E as m}from"./debug-otxXY3j-.js";import{n as h,t as g}from"./cwd--iizewsn.js";import{OC as _,cS as v,kC as y,mS as b,pS as x,sS as S}from"./loadAgentsDir-BfEZacjM.js";import{t as C}from"./useKeybinding-DPOUuymz.js";import{t as w}from"./useTerminalSize-Du-EamDN.js";import{n as T,t as E}from"./exportRenderer-DmpMgUiv.js";import{join as D}from"path";function O({content:e,defaultFilename:t,onDone:r}){let[,c]=(0,k.useState)(null),[f,m]=(0,k.useState)(t),[h,v]=(0,k.useState)(t.length),[y,b]=(0,k.useState)(!1),{columns:C}=n(),w=(0,k.useCallback)(()=>{b(!1),c(null)},[]),T=async t=>{if(t===`clipboard`){let t=await l(e);t&&process.stdout.write(t),r({success:!0,message:`Conversation copied to clipboard`})}else t===`file`&&(c(`file`),b(!0))},E=()=>{let t=f.endsWith(`.txt`)?f:f.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{p(n,e,{encoding:`utf-8`,flush:!0}),r({success:!0,message:`Conversation exported to: ${n}`})}catch(e){r({success:!1,message:`Failed to export conversation: ${e instanceof Error?e.message:`Unknown error`}`})}},O=(0,k.useCallback)(()=>{y?w():r({success:!1,message:`Export cancelled`})},[y,w,r]),j=[{label:`Copy to clipboard`,value:`clipboard`,description:`Copy the conversation to your system clipboard`},{label:`Save to file`,value:`file`,description:`Save the conversation to a file in the current directory`}];function M(e){return y?(0,A.jsxs)(s,{children:[(0,A.jsx)(o,{shortcut:`Enter`,action:`save`}),(0,A.jsx)(_,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}):e.pending?(0,A.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):(0,A.jsx)(_,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})}return u(`confirm:no`,O,{context:`Settings`,isActive:y}),(0,A.jsx)(a,{title:`Export Conversation`,subtitle:`Select export method:`,color:`permission`,onCancel:O,inputGuide:M,isCancelActive:!y,children:y?(0,A.jsxs)(d,{flexDirection:`column`,children:[(0,A.jsx)(i,{children:`Enter filename:`}),(0,A.jsxs)(d,{flexDirection:`row`,gap:1,marginTop:1,children:[(0,A.jsx)(i,{children:`>`}),(0,A.jsx)(x,{value:f,onChange:m,onSubmit:E,focus:!0,showCursor:!0,columns:C,cursorOffset:h,onChangeCursorOffset:v})]})]}):(0,A.jsx)(S,{options:j,onChange:T,onCancel:O})})}var k,A,j=e((()=>{k=t(r(),1),w(),c(),C(),h(),m(),y(),v(),b(),A=f()}));function M(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}-${String(e.getHours()).padStart(2,`0`)}${String(e.getMinutes()).padStart(2,`0`)}${String(e.getSeconds()).padStart(2,`0`)}`}function N(e){let t=e.find(e=>e.type===`user`);if(!t||t.type!==`user`)return``;let n=t.message?.content,r=``;if(typeof n==`string`)r=n.trim();else if(Array.isArray(n)){let e=n.find(e=>e.type===`text`);e&&`text`in e&&(r=e.text.trim())}return r=r.split(`
|
|
2
2
|
`)[0]||``,r.length>50&&(r=r.substring(0,49)+`…`),r}function P(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)}async function F(e){let t=e.options.tools||[];return T(e.messages,t)}async function I(e,t,n){let r=await F(t),i=n.trim();if(i){let t=i.endsWith(`.txt`)?i:i.replace(/\.[^.]+$/,``)+`.txt`,n=D(g(),t);try{return p(n,r,{encoding:`utf-8`,flush:!0}),e(`Conversation exported to: ${n}`),null}catch(t){return e(`Failed to export conversation: ${t instanceof Error?t.message:`Unknown error`}`),null}}let a=N(t.messages),o=M(new Date),s;if(a){let e=P(a);s=e?`${o}-${e}.txt`:`conversation-${o}.txt`}else s=`conversation-${o}.txt`;return(0,L.jsx)(O,{content:r,defaultFilename:s,onDone:t=>{e(t.message)}})}var L;e((()=>{r(),j(),h(),E(),m(),L=f()}))();export{I as call,N as extractFirstPrompt,P as sanitizeFilename};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,Tn as r,rt as i,wn as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,Tn as r,rt as i,wn as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{LT as s,dC as c,jT as l,uC as u,zT as d}from"./loadAgentsDir-BfEZacjM.js";import{n as f,t as p}from"./staticRender-DKFIRhkH.js";import{n as m,t as h}from"./Messages-D1-i4MMT.js";function g({children:e}){let{bindings:t}=d(),n=(0,b.useRef)(null),r=(0,b.useRef)(new Map),a=(0,b.useRef)(new Set).current;return(0,x.jsx)(i,{bindings:t,pendingChordRef:n,pendingChord:null,setPendingChord:()=>{},activeContexts:a,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:r,children:e})}function _(e){if(!(`message`in e))return 1;let t=e.message.content;return Array.isArray(t)?t.length:1}async function v(e,t,n,{columns:i,verbose:a=!1,chunkSize:o=40,onProgress:s}={}){let c=n=>f((0,x.jsx)(u,{children:(0,x.jsx)(g,{children:(0,x.jsx)(h,{messages:e,tools:t,commands:[],verbose:a,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:`export`,screen:`prompt`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:n})})}),i),l=o;for(let t of e)l+=_(t);for(let e=0;e<l;e+=o){let t=await c([e,e+o]);if(r(t).trim()===``)break;await n(t),s?.(e+o)}}async function y(e,t=[],n){let i=[];return await v(e,t,e=>void i.push(r(e)),{columns:n}),i.join(``)}var b,x,S=e((()=>{b=t(n(),1),a(),m(),l(),s(),c(),p(),x=o()}));export{y as n,S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./extra-usage-CmP6V7HX.js";e();export{t as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./extra-usage-core-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./extra-usage-core-BqJClmf4.js";import{r as a,t as o}from"./login-SuUxFLIY.js";async function s(e,t){let n=await r();return n.type===`message`?(e(n.value),null):(0,c.jsx)(o,{startingMessage:`Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.`,onDone:n=>{t.onChangeAPIKey(),e(n?`Login successful`:`Login interrupted`)}})}var c,l=e((()=>{t(),a(),i(),c=n()}));export{l as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Da as i,dc as a,ka as o,on as s,tn as c,yc as l}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Da as i,dc as a,ka as o,on as s,tn as c,yc as l}from"./paths-nIHVpTn2.js";import{l as u,u as d}from"./oauth-CdZEzMww.js";import{o as f,s as p}from"./log-DSV4Ht5l.js";import{a as m,l as h,o as g}from"./api-C-KY7A3r.js";import{n as _,t as v}from"./browser-Bt-ckCaU.js";import{n as y,t as b}from"./usage-BRv8mBDf.js";import{i as x,r as S}from"./overageCreditGrant-BOSyVk3U.js";async function C(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests`;return(await t.post(a,e,{headers:i})).data}async function w(e,n){let{accessToken:r,orgUUID:i}=await h(),a={...m(r),"x-organization-uuid":i},o=`${u().BASE_API_URL}/api/oauth/organizations/${i}/admin_requests/me?request_type=${e}`;for(let e of n)o+=`&statuses=${e}`;return(await t.get(o,{headers:a})).data}async function T(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${u().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests/eligibility?request_type=${e}`;return(await t.get(a,{headers:i})).data}var E=e((()=>{n(),d(),g()}));async function D(){a().hasVisitedExtraUsage||r(e=>({...e,hasVisitedExtraUsage:!0})),x();let e=c(),t=e===`team`||e===`enterprise`;if(!i()&&t){let e;try{e=(await b())?.extra_usage}catch(e){p(e)}if(e?.is_enabled&&e.monthly_limit===null)return{type:`message`,value:`Your organization already has unlimited extra usage. No request needed.`};try{if((await T(`limit_increase`))?.is_allowed===!1)return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}catch(e){p(e)}try{let e=await w(`limit_increase`,[`pending`,`dismissed`]);if(e&&e.length>0)return{type:`message`,value:`You have already submitted a request for extra usage to your admin.`}}catch(e){p(e)}try{return await C({request_type:`limit_increase`,details:null}),{type:`message`,value:e?.is_enabled?`Request sent to your admin to increase extra usage.`:`Request sent to your admin to enable extra usage.`}}catch(e){p(e)}return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}let n=t?`https://claude.ai/admin-settings/usage`:`https://claude.ai/settings/usage`;try{return{type:`browser-opened`,url:n,opened:await _(n)}}catch(e){return p(e),{type:`message`,value:`Failed to open browser. Please visit ${n} to manage extra usage.`}}}var O=e((()=>{E(),S(),y(),s(),o(),v(),l(),f()}));export{D as n,O as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./extra-usage-core-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./extra-usage-core-BqJClmf4.js";async function r(){let e=await t();return e.type===`message`?{type:`text`,value:e.value}:{type:`text`,value:e.opened?`Browser opened to manage extra usage. If it didn't open, visit: ${e.url}`:`Please visit ${e.url} to manage extra usage.`}}e((()=>{n()}))();export{r as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,g as i,h as a,nt as o,p as ee,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Br as u,Cr as d,Ol as te,Pr as f,Ps as p,Qa as ne,Rr as m,bi as re,dn as h,dr as g,kl as _,li as v,lo as ie,on as y,oo as b,ur as ae,vi as x,xi as S,yi as oe}from"./paths-nIHVpTn2.js";import{n as C,r as se}from"./analytics-DqMQntaB.js";import{Aj as ce,By as w,Dj as T,Fj as le,Hf as E,OC as ue,Pj as de,Vf as fe,bj as D,dC as O,fC as k,jj as pe,kC as A,kj as j,mC as me,sS as he,xj as M,yj as N}from"./loadAgentsDir-BfEZacjM.js";import{t as P}from"./useKeybinding-DPOUuymz.js";import{n as ge,t as F}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";function I(e,t){if(!j(t))return;let n=M(t,e);return`${L(n)} ${n} · /effort`}function L(e){switch(e){case`low`:return`○`;case`medium`:return`◐`;case`high`:return`●`;case`xhigh`:return`⦿`;case`max`:return`◉`;default:return`●`}}var R=e((()=>{p(),T()}));function z({initial:e,sessionModel:t,onSelect:n,onCancel:s,isStandaloneCommand:l,showFastModeNotice:u,headerText:d,skipSettingsWrite:f}){let p=me(),h=ge(),g=e===null?G:e,[_,y]=(0,U.useState)(g),b=k(e=>S()?e.fastMode:!1),[x,C]=(0,U.useState)(()=>new Set(ae(g)?[g.replace(/\[1m\]/i,``)]:[])),w=(0,U.useCallback)(()=>{if(!_||_===G)return;let e=_.replace(/\[1m\]/i,``);C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[_]),[T,E]=(0,U.useState)(!1),D=k(e=>e.effortValue),[O,A]=(0,U.useState)(D===void 0?void 0:N(D)),M=(0,U.useMemo)(()=>fe(b??!1),[b]),P=(0,U.useMemo)(()=>e!==null&&!M.some(t=>t.value===e)?[...M,{value:e,label:m(e),description:`Current model`}]:M,[M,e]),F=(0,U.useMemo)(()=>P.map(e=>({...e,value:e.value===null?G:e.value})),[P]),I=(0,U.useMemo)(()=>F.some(e=>e.value===g)?g:F[0]?.value??void 0,[F,g]),L=Math.min(10,F.length),R=Math.max(0,F.length-L),z=F.find(e=>e.value===_)?.label,K=B(_),q=_!==void 0&&_!==G&&x.has(_.replace(/\[1m\]/i,``)),J=K?j(K):!1,Y=K?pe(K):!1,X=K?ce(K):!1,Z=H(_),Q=O===`max`&&!X?Y?`xhigh`:`high`:O===`xhigh`&&!Y?`high`:O,ve=(0,U.useCallback)(e=>{y(e),!T&&D===void 0&&A(H(e))},[T,D]),$=(0,U.useCallback)(e=>{J&&(A(t=>_e(t??Z,e,Y,X)),E(!0))},[J,Y,X,Z]);o({"modelPicker:decreaseEffort":()=>$(`left`),"modelPicker:increaseEffort":()=>$(`right`),"modelPicker:toggle1M":()=>w()},{context:`ModelPicker`});function ye(e){if(se(`tengu_model_command_menu_effort`,{effort:O}),!f){let t=de(O,H(e),ne(`userSettings`)?.effortLevel,T),n=le(t);n!==void 0&&ie(`userSettings`,{effortLevel:n}),p(e=>({...e,effortValue:t}))}let t=B(e),r=T&&t&&j(t)?O:void 0;if(e===G){n(null,r);return}let i=e.replace(/\[1m\]/i,``);n(x.has(i)?`${i}[1m]`:i,r)}let be=(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsxs)(c,{marginBottom:1,flexDirection:`column`,children:[(0,W.jsx)(r,{color:`remember`,bold:!0,children:`Select model`}),(0,W.jsx)(r,{dimColor:!0,children:d??`Choose a model for this and future sessions. Use ← → to adjust effort, Space to toggle 1M context.`}),t&&(0,W.jsxs)(r,{dimColor:!0,children:[`Currently using `,m(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,W.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,W.jsx)(c,{flexDirection:`column`,children:(0,W.jsx)(he,{defaultValue:g,defaultFocusValue:I,options:F,onChange:ye,onFocus:ve,onCancel:s??(()=>{}),visibleOptionCount:L})}),R>0&&(0,W.jsx)(c,{paddingLeft:3,children:(0,W.jsxs)(r,{dimColor:!0,children:[`and `,R,` more…`]})})]}),(0,W.jsxs)(c,{marginBottom:1,flexDirection:`column`,children:[J?(0,W.jsxs)(r,{dimColor:!0,children:[(0,W.jsx)(V,{effort:Q}),` `,te(Q),` effort`,Q===Z?` (default)`:``,` `,(0,W.jsx)(r,{color:`subtle`,children:`← → to adjust`})]}):(0,W.jsxs)(r,{color:`subtle`,children:[(0,W.jsx)(V,{effort:void 0}),` Effort not supported`,z?` for ${z}`:``]}),q?(0,W.jsxs)(r,{dimColor:!0,children:[(0,W.jsx)(V,{effort:`high`}),` 1M context on`,(0,W.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]}):(0,W.jsxs)(r,{color:`subtle`,children:[(0,W.jsx)(V,{effort:void 0}),` 1M context off`,z?` for ${z}`:``,(0,W.jsx)(r,{color:`subtle`,children:` · Space to toggle`})]})]}),S()?u?(0,W.jsx)(c,{marginBottom:1,children:(0,W.jsxs)(r,{dimColor:!0,children:[`Fast mode is `,(0,W.jsx)(r,{bold:!0,children:`ON`}),` and available with `,v,` only (/fast). Switching to other models turn off fast mode.`]})}):oe()&&!re()?(0,W.jsx)(c,{marginBottom:1,children:(0,W.jsxs)(r,{dimColor:!0,children:[`Use `,(0,W.jsx)(r,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,v,` only).`]})}):null:null]}),l&&(0,W.jsx)(r,{dimColor:!0,italic:!0,children:h.pending?(0,W.jsxs)(W.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,W.jsxs)(a,{children:[(0,W.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,W.jsx)(ue,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return l?(0,W.jsx)(ee,{color:`permission`,children:be}):be}function B(e){if(e)return e===G?d():u(e)}function V({effort:e}){return(0,W.jsx)(r,{color:e?`claude`:`subtle`,children:L(e??`low`)})}function _e(e,t,n,r){let i=[`low`,`medium`,`high`,...n?[`xhigh`]:[],...r?[`max`]:[]],a=i.indexOf(e),o=a===-1?i.indexOf(`high`):a;return t===`right`?i[(o+1)%i.length]:i[(o-1+i.length)%i.length]}function H(e){let t=D(B(e)??d());return t===void 0?`high`:N(t)}var U,W,G,K=e((()=>{_(),n(),U=t(n(),1),g(),F(),C(),x(),s(),P(),O(),T(),f(),E(),b(),A(),w(),R(),W=l(),G=`__NO_PREFERENCE__`}));function q(e,t,n){if(!h())return!1;if(t)return!0;if(e===null||!ae(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var J=e((()=>{y(),g()}));export{L as a,K as i,q as n,I as o,z as r,R as s,J as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{au as e,iu as t,ou as n,ru as r}from"./loadAgentsDir-BfEZacjM.js";n();export{r as drainPendingExtraction,t as executeExtractMemories,e as initExtractMemories};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./fast-Dd2jZVF-.js";t();export{n as FastModePicker,e as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Q as i,Rn as a,b as o,f as s,nt as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Di as p,Ps as m,Si as h,ci as g,dc as _,di as v,fi as y,li as b,lo as x,mi as S,oi as C,oo as w,si as T,ui as E,vi as D,xi as O,yc as k}from"./paths-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Q as i,Rn as a,b as o,f as s,nt as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{Di as p,Ps as m,Si as h,ci as g,dc as _,di as v,fi as y,li as b,lo as x,mi as S,oi as C,oo as w,si as T,ui as E,vi as D,xi as O,yc as k}from"./paths-nIHVpTn2.js";import{n as A,r as j}from"./analytics-DqMQntaB.js";import{b as M,u as N}from"./startupProfiler-CBcN1Chw.js";import{dC as P,fC as F,mC as I}from"./loadAgentsDir-BfEZacjM.js";import{t as L}from"./useKeybinding-DPOUuymz.js";import{n as R,t as z}from"./systemTheme-eRWGHYSL.js";function B({cooldown:e}){return e?(0,H.jsx)(o,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(o,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let r=R(_().theme);return t?n.dim(u(`promptBorder`,r)(`↯`)):u(`fastMode`,r)(`↯`)}var H,U=e((()=>{r(),a(),m(),l(),k(),z(),H=f()}));function W(e,t){E(),x(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!h(e.mainLoopModel);return{...e,...t?{mainLoopModel:v(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let n=F(e=>e.mainLoopModel),r=F(e=>e.fastMode),a=I(),[l,u]=(0,J.useState)(r??!1),f=y(),p=f.status===`cooldown`,m=t!==null,g=C(T(!0));function _(){m||(W(l,a),j(`tengu_fast_mode_toggled`,{enabled:l,source:`picker`}),l?e(`${V(l)} Fast mode ON${h(n)?``:` · model set to ${b}`} · ${g}`):(a(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function v(){if(m){r&&W(!1,a),e(`Fast mode OFF`,{display:`system`});return}e(r?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function x(){m||u(e=>!e)}return c({"confirm:yes":_,"confirm:nextField":x,"confirm:next":x,"confirm:previous":x,"confirm:cycleMode":x,"confirm:toggle":x},{context:`Confirmation`}),(0,Y.jsxs)(s,{title:(0,Y.jsxs)(o,{children:[(0,Y.jsx)(B,{cooldown:p}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${b}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:v,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):m?(0,Y.jsx)(o,{children:`Esc to cancel`}):(0,Y.jsx)(o,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsx)(o,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(d,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(d,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(o,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(o,{color:l?`fastMode`:void 0,bold:l,children:l?`ON `:`OFF`}),(0,Y.jsx)(o,{dimColor:!0,children:g})]})}),p&&f.status===`cooldown`&&(0,Y.jsx)(d,{marginLeft:2,children:(0,Y.jsxs)(o,{color:`warning`,children:[f.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,N(f.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(o,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(i,{url:`https://code.claude.com/docs/en/fast-mode`,children:`https://code.claude.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=S();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),j(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${h(i)?``:` · model set to ${b}`} · ${C(T(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!O())return null;await p();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=S();return j(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{a(),J=t(a(),1),l(),U(),L(),A(),P(),D(),M(),g(),w(),Y=f()}));export{U as a,V as i,q as n,X as r,G as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Feedback-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Feedback-BMv8Kt05.js";function a(e,t,n,r=``,a={}){return(0,s.jsx)(i,{abortSignal:t,messages:n,initialDescription:r,onDone:e,backgroundTasks:a})}async function o(e,t,n){let r=n||``;return a(e,t.abortController.signal,t.messages,r)}var s;e((()=>{t(),r(),s=n()}))();export{o as call,a as renderFeedbackComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,I as t,L as n,M as r,N as i,P as a,R as o,j as s,z as c}from"./paths-
|
|
1
|
+
import{F as e,I as t,L as n,M as r,N as i,P as a,R as o,j as s,z as c}from"./paths-nIHVpTn2.js";r();export{s as getEventSamplingConfig,i as initialize1PEventLogging,a as is1PEventLoggingEnabled,e as logEventTo1P,t as logGrowthBookExperimentTo1P,n as reinitialize1PEventLoggingIfConfigChanged,o as shouldSampleEvent,c as shutdown1PEventLogging};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{U as n,l as r,p as i,z as a}from"./debug-otxXY3j-.js";import{O as o,k as s}from"./rcDebugLog-
|
|
1
|
+
import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{U as n,l as r,p as i,z as a}from"./debug-otxXY3j-.js";import{O as o,k as s}from"./rcDebugLog-Bv_x5w_B.js";import{i as c}from"./workSecret-DJu7k30X.js";import{t as l}from"./ccrClient-CDrBxSox.js";import{n as u,t as d}from"./SSETransport-BM2xz03M.js";u(),r(),n(),o();function f(e){return{write:t=>e.write(t),writeBatch:t=>e.writeBatch(t),close:()=>e.close(),isConnectedStatus:()=>e.isConnectedStatus(),getStateLabel:()=>e.getStateLabel(),setOnData:t=>e.setOnData(t),setOnClose:t=>e.setOnClose(t),setOnConnect:t=>e.setOnConnect(t),connect:()=>void e.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return e.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function p(e){let{sessionUrl:t,ingressToken:n,sessionId:r,initialSequenceNum:o,getAuthToken:u}=e,f;u?f=()=>{let e=u();return e?{Authorization:`Bearer ${e}`}:{}}:s(n);let p=e.epoch??await c(t,n);i(`[bridge:repl] CCR v2: worker sessionId=${r} epoch=${p}${e.epoch===void 0?` (via registerWorker)`:` (from /bridge)`}`);let m=new URL(t);m.pathname=m.pathname.replace(/\/$/,``)+`/worker/events/stream`;let h=new d(m,{},r,void 0,o,f),g,_=new l(h,new URL(t),{getAuthHeaders:f,heartbeatIntervalMs:e.heartbeatIntervalMs,heartbeatJitterFraction:e.heartbeatJitterFraction,onEpochMismatch:()=>{i(`[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery`);try{_.close(),h.close(),g?.(4090)}catch(e){i(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${a(e)}`,{level:`error`})}throw Error(`epoch superseded`)}});h.setOnEvent(e=>{_.reportDelivery(e.event_id,`received`),_.reportDelivery(e.event_id,`processed`)});let v,y=!1,b=!1;return{write(e){return _.writeEvent(e)},async writeBatch(e){for(let t of e){if(b)break;await _.writeEvent(t)}},close(){b=!0,_.close(),h.close()},isConnectedStatus(){return y},getStateLabel(){return h.isClosedStatus()?`closed`:h.isConnectedStatus()?y?`connected`:`init`:`connecting`},setOnData(e){h.setOnData(e)},setOnClose(e){g=e,h.setOnClose(t=>{_.close(),e(t??4092)})},setOnConnect(e){v=e},getLastSequenceNum(){return h.getLastSequenceNum()},droppedBatchCount:0,reportState(e){_.reportState(e)},reportMetadata(e){_.reportMetadata(e)},reportDelivery(e,t){_.reportDelivery(e,t)},flush(){return _.flush()},connect(){e.outboundOnly||h.connect(),_.initialize(p).then(()=>{y=!0,i(`[bridge:repl] v2 transport ready for writes (epoch=${p}, sse=${h.isConnectedStatus()?`open`:`opening`})`),v?.()},e=>{i(`[bridge:repl] CCR v2 initialize failed: ${a(e)}`,{level:`error`}),_.close(),h.close(),g?.(4091)})}}}e();var m=class{constructor(){t(this,`_active`,!1),t(this,`_pending`,[])}get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...e){return this._active?(this._pending.push(...e),!0):!1}drop(){this._active=!1;let e=this._pending.length;return this._pending.length=0,e}deactivate(){this._active=!1}};export{f as n,p as r,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{S as r,g as i}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{S as r,g as i}from"./paths-nIHVpTn2.js";function a(){return{...u,...i(`tengu_malort_pedway`,u)}}function o(){return!0}function s(){return process.env.USER_TYPE===`ant`&&process.env.MONOREPO_ROOT_DIR&&!n(process.env.ALLOW_ANT_COMPUTER_USE_MCP)?!1:o()&&a().enabled}function c(){let{enabled:e,coordinateMode:t,...n}=a();return n}function l(){return d??(d=a().coordinateMode),d}var u,d,f=e((()=>{r(),t(),u={enabled:!0,pixelValidation:!1,clipboardPasteMultiline:!0,mouseAnimation:!0,hideBeforeAction:!0,autoTargetDisplay:!0,clipboardGuard:!0,coordinateMode:`pixels`}}));export{f as i,s as n,c as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t}from"./gates-lWoKqpJ1.js";e();export{t as getChicagoEnabled};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{o as a,u as o}from"./proxy-CF7ZDxaW.js";import{G_ as s,
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{o as a,u as o}from"./proxy-CF7ZDxaW.js";import{G_ as s,Go as c,K_ as l,Qo as u,W_ as d,es as f,fD as p,go as m,pD as h,q_ as g,st as _,ut as v}from"./loadAgentsDir-BfEZacjM.js";import{G as y,H as b,K as x,P as S,U as C,W as w,q as T}from"./rcDebugLog-Bv_x5w_B.js";import{n as E,r as D}from"./SSETransport-BM2xz03M.js";import{randomUUID as O}from"crypto";function k(){return(process.env.GEMINI_BASE_URL||M).replace(/\/+$/,``)}function A(e){let t=e.replace(/^\/+/,``);return t.startsWith(`models/`)?t:`models/${t}`}async function*j(e){let t=await(e.fetchOverride??fetch)(`${k()}/${A(e.model)}:streamGenerateContent?alt=sse`,{method:`POST`,headers:{"Content-Type":`application/json`,"x-goog-api-key":process.env.GEMINI_API_KEY||``},body:JSON.stringify(e.body),signal:e.signal,...a({forAnthropicAPI:!1})});if(!t.ok){let e=await t.text();throw Error(`Gemini API request failed (${t.status} ${t.statusText}): ${e||`empty response body`}`)}if(!t.body)throw Error(`Gemini API returned no response body`);let n=t.body.getReader(),r=new TextDecoder,o=``;try{for(;;){let{done:e,value:t}=await n.read();if(e)break;o+=r.decode(t,N);let{frames:a,remaining:s}=D(o);o=s;for(let e of a)if(!(!e.data||e.data===`[DONE]`))try{yield JSON.parse(e.data)}catch(e){throw Error(`Failed to parse Gemini SSE payload: ${i(e)}`)}}o+=r.decode();let{frames:e}=D(o);for(let t of e)if(!(!t.data||t.data===`[DONE]`))try{yield JSON.parse(t.data)}catch(e){throw Error(`Failed to parse trailing Gemini SSE payload: ${i(e)}`)}}finally{n.releaseLock()}}var M,N,P=e((()=>{E(),t(),o(),M=`https://generativelanguage.googleapis.com/v1beta`,N={stream:!0}}));async function*F(e,t,n,i,a,o){try{let c=T(a.model),p=f(e,n),m=await Promise.all(n.map(e=>v(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model}))),g=m.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),{contents:_,systemInstruction:S}=y(p,t),E=w(g),D=C(a.toolChoice),k=j({model:c,signal:i,fetchOverride:a.fetchOverride,body:{contents:_,...S&&{systemInstruction:S},...E.length>0&&{tools:E},...D&&{toolConfig:{functionCallingConfig:D}},generationConfig:{...a.temperatureOverride!==void 0&&{temperature:a.temperatureOverride},...o.type!==`disabled`&&{thinkingConfig:{includeThoughts:!0,...o.type===`enabled`&&{thinkingBudget:o.budgetTokens}}}}}});r(`[Gemini] Calling model=${c}, messages=${_.length}, tools=${E.length}`);let A=b(k,c),M={},N=[],P=null,F=0,I=Date.now();for await(let e of A){switch(e.type){case`message_start`:P=e.message,F=Date.now()-I;break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?M[t]={...n,input:``}:n.type===`text`?M[t]={...n,text:``}:n.type===`thinking`?M[t]={...n,thinking:``,signature:``}:M[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=M[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.type===`thinking`?r.signature=n.signature:r[x]=n.signature);break}case`content_block_stop`:{let t=M[e.index];if(!t||!P)break;let r={message:{...P,content:u([t],n,a.agentId)},requestId:void 0,type:`assistant`,uuid:O(),timestamp:new Date().toISOString()};N.push(r),yield r;break}case`message_delta`:case`message_stop`:break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:F}:void 0}}h(a.langfuseTrace??null,{model:c,provider:`gemini`,input:d(p,t),output:s(N),usage:{input_tokens:0,output_tokens:0},startTime:new Date(I),endTime:new Date,completionStartTime:F>0?new Date(I+F):void 0,tools:l(m),thinking:o.type===`disabled`?void 0:{type:o.type,...o.type===`enabled`&&{budgetTokens:o.budgetTokens}}})}catch(e){let t=e instanceof Error?e.message:String(e);r(`[Gemini] Error: ${t}`,{level:`error`}),yield m({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{_(),n(),c(),p(),g(),P(),S()}))();export{F as queryModelGemini};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{g as t}from"./client-_sjL0I7A.js";import{l as n,p as r}from"./debug-otxXY3j-.js";import{t as i}from"./sdk-DEtgRZvI.js";import{Bl as a,
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{g as t}from"./client-_sjL0I7A.js";import{l as n,p as r}from"./debug-otxXY3j-.js";import{t as i}from"./sdk-DEtgRZvI.js";import{Bl as a,Go as o,Hl as s,No as c,Oo as l,zl as u}from"./loadAgentsDir-BfEZacjM.js";async function d(){try{let{getResolvedLanguage:e}=await import(`./language-BnQye2Mx.js`);return e()===`zh`?m:p}catch{return p}}async function f(e){let n=u();if(!n)return r(`[recap] no CacheSafeParams saved, skipping`),{kind:`no-turn`};let i=new AbortController;e.addEventListener(`abort`,()=>i.abort(),{once:!0});try{let{messages:t}=await s({promptMessages:[l({content:await d()})],cacheSafeParams:n,canUseTool:async()=>({behavior:`deny`,message:`Recap cannot use tools`,decisionReason:{type:`other`,reason:`away_summary`}}),overrides:{abortController:i},querySource:`away_summary`,forkLabel:`away_summary`,maxTurns:1,skipCacheWrite:!0,skipTranscript:!0});if(e.aborted)return{kind:`aborted`};let r=t.find(e=>e.type===`assistant`&&e.isApiErrorMessage);if(r)return{kind:`api-error`,text:c(r)??``};let a=t.filter(e=>e.type===`assistant`&&!e.isApiErrorMessage).pop();if(!a)return{kind:`failed`};let o=c(a);return!o||o.trim().length===0?{kind:`failed`}:{kind:`ok`,text:o.trim()}}catch(n){return n instanceof t||e.aborted||i.signal.aborted?{kind:`aborted`}:(r(`[recap] generation failed: ${n}`),{kind:`failed`})}}var p,m;e((()=>{i(),n(),a(),o(),p=`The user stepped away and is coming back. Recap in under 40 words, 1-2 plain sentences, no markdown. Lead with the overall goal and current task, then the one next action. Skip root-cause narrative, fix internals, secondary to-dos, and em-dash tangents.`,m=`用户离开后回来了。用中文写 1-2 句话,不超过 60 字,无 markdown。先说明高层目标和当前任务,再说明下一步操作。跳过根因分析和次要待办。`}))();export{f as generateRecap};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{s as a,u as o}from"./types-KeqFPzY5.js";import{
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{s as a,u as o}from"./types-KeqFPzY5.js";import{Go as s,jo as c,nt as l,tt as u,uk as d}from"./loadAgentsDir-BfEZacjM.js";import{X as f}from"./rcDebugLog-Bv_x5w_B.js";import{r as p,t as m}from"./sessionTitle-DJMmUKBJ.js";async function h(e,t){let n=m(e);if(!n)return null;try{let e=await l({systemPrompt:f([`Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.`]),userPrompt:n,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1}},signal:t,options:{querySource:`rename_generate_name`,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),r=o(Array.isArray(e.message.content)?c(e.message.content):e.message.content);return r&&typeof r==`object`&&`name`in r&&typeof r.name==`string`?r.name:null}catch(e){return r(`generateSessionName failed: ${i(e)}`,{level:`error`}),null}}var g=e((()=>{u(),n(),t(),a(),s(),p(),d()}));export{g as n,h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as e,ot as t}from"./state-sIHsFpDu.js";import{Cc as n,Jc as r,Uc as i,dc as a,yc as o}from"./paths-
|
|
1
|
+
import{cn as e,ot as t}from"./state-sIHsFpDu.js";import{Cc as n,Jc as r,Uc as i,dc as a,yc as o}from"./paths-nIHVpTn2.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{E as l,T as u,r as d,v as f}from"./git-C0IuvuIy.js";import{a as p,n as m,o as h}from"./detectRepository-2ICvGD0U.js";import{realpath as g}from"fs/promises";e(),o(),s(),p(),i(),l(),f();async function _(){try{let e=await m();if(!e){c(`Not in a GitHub repository, skipping path mapping update`);return}let r=t(),i=d(r)??r,o;try{o=(await g(i)).normalize(`NFC`)}catch{o=i}let s=e.toLowerCase(),l=a().githubRepoPaths?.[s]??[];if(l[0]===o){c(`Path ${o} already tracked for repo ${s}`);return}let u=l.filter(e=>e!==o),f=[o,...u];n(e=>({...e,githubRepoPaths:{...e.githubRepoPaths,[s]:f}})),c(`Added ${o} to tracked paths for repo ${s}`)}catch(e){c(`Error updating repo path mapping: ${e}`)}}function v(e){let t=a(),n=e.toLowerCase();return t.githubRepoPaths?.[n]??[]}async function y(e){let t=await Promise.all(e.map(r));return e.filter((e,n)=>t[n])}async function b(e,t){try{let n=await u(e);if(!n)return!1;let r=h(n);return r?r.toLowerCase()===t.toLowerCase():!1}catch{return!1}}function x(e,t){let r=a(),i=e.toLowerCase(),o=r.githubRepoPaths?.[i]??[],s=o.filter(e=>e!==t);if(s.length===o.length)return;let l={...r.githubRepoPaths};s.length===0?delete l[i]:l[i]=s,n(e=>({...e,githubRepoPaths:l})),c(`Removed ${t} from tracked paths for repo ${i}`)}export{b as a,_ as i,v as n,x as r,y as t};
|