claude-code-best 2.6.13 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-BqR8LhJq.js +1 -0
- package/dist/chunks/App-DkBMWXkK.js +1 -0
- package/dist/chunks/ApproveApiKey-5xd0lUV7.js +1 -0
- package/dist/chunks/ApproveApiKey-Dmr2VaVA.js +1 -0
- package/dist/chunks/AssistantSessionChooser-C7rigDkQ.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-RtEwbumC.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-7s3ULbNF.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-Bjv-sERa.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BTysDIlI.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DosNL91g.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-Cc1yaM-M.js +1 -0
- package/dist/chunks/DesktopHandoff-Cy89ZB_9.js +1 -0
- package/dist/chunks/DevChannelsDialog-ws8prcNK.js +1 -0
- package/dist/chunks/DiffDialog-BhqgxA7o.js +3 -0
- package/dist/chunks/Doctor-BWouB_9X.js +1 -0
- package/dist/chunks/Doctor-Ts5k8hn1.js +3 -0
- package/dist/chunks/ExitFlow-BBoImtT_.js +2 -0
- package/dist/chunks/Feedback-BVbSMBwY.js +2 -0
- package/dist/chunks/Grove-CTQrX7WO.js +1 -0
- package/dist/chunks/Grove-ZMHK4CBZ.js +11 -0
- package/dist/chunks/HybridTransport-B9g074Y1.js +4 -0
- package/dist/chunks/ITermBackend-DaFK8DOH.js +1 -0
- package/dist/chunks/InvalidConfigDialog-BkZkVKB4.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-Lr60eQWj.js +1 -0
- package/dist/chunks/MCPConnectionManager-DmJ6dLOp.js +1 -0
- package/dist/chunks/McpParsingWarnings-CE2pQPXV.js +1 -0
- package/dist/chunks/MessageSelector-BT1FDbwv.js +3 -0
- package/dist/chunks/Messages-DT2gDtrJ.js +11 -0
- package/dist/chunks/Onboarding-DsqnXQel.js +1 -0
- package/dist/chunks/OverageCreditUpsell-UWtCrOmN.js +1 -0
- package/dist/chunks/PluginSettings-OJQz3d5V.js +17 -0
- package/dist/chunks/PromptInputFooterSuggestions-BImBB6Yk.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-CblAb9vk.js +1 -0
- package/dist/chunks/QueryEngine-_re1pGHr.js +1 -0
- package/dist/chunks/REPL-eBTeslsR.js +147 -0
- package/dist/chunks/REPL-wIg0cBqS.js +1 -0
- package/dist/chunks/RemoteCallout-DMQai8_P.js +1 -0
- package/dist/chunks/RemoteSessionManager-DQmsHvj_.js +2 -0
- package/dist/chunks/ResumeConversation-D81hDeTl.js +1 -0
- package/dist/chunks/SSETransport-BbeM6bi9.js +4 -0
- package/dist/chunks/SearchExtraToolsTool-QbJQCWXd.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BQJXHbWh.js +2 -0
- package/dist/chunks/SentryErrorBoundary-Cnw74oVG.js +1 -0
- package/dist/chunks/Settings-DiXc-_IG.js +2 -0
- package/dist/chunks/TeleportProgress-B3oRJlWH.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-GPuEipFy.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-CcDuR6o9.js +1 -0
- package/dist/chunks/ThemePicker-BjSRjA_L.js +1 -0
- package/dist/chunks/TmuxBackend-BE3zsPKE.js +9 -0
- package/dist/chunks/TrustDialog-B6Qg0xUr.js +1 -0
- package/dist/chunks/ValidationErrorsList-C5BoLiye.js +2 -0
- package/dist/chunks/WelcomeV2-BJAKZYz1.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-BcwpxU2Q.js +2 -0
- package/dist/chunks/add-dir-OR7-VVcq.js +1 -0
- package/dist/chunks/agentDisplay-CMqTUh0A.js +1 -0
- package/dist/chunks/agents-DRtgUZ6t.js +103 -0
- package/dist/chunks/agents-EolUGDZB.js +2 -0
- package/dist/chunks/ant-Bgl31h7a.js +1 -0
- package/dist/chunks/api-BpQPVgif.js +1 -0
- package/dist/chunks/api-xFvB7WoB.js +1 -0
- package/dist/chunks/asciicast-CJObpRg9.js +1 -0
- package/dist/chunks/asciicast-Dr_Div_R.js +4 -0
- package/dist/chunks/assistant-CENsWvTb.js +1 -0
- package/dist/chunks/assistant-CHawoD04.js +1 -0
- package/dist/chunks/assistant-s7XNIA76.js +1 -0
- package/dist/chunks/auth-DX12yVM8.js +1 -0
- package/dist/chunks/auth-h6VL9BbC.js +1 -0
- package/dist/chunks/autoMode-BDzVqEPm.js +45 -0
- package/dist/chunks/autonomy-CeqOXzJl.js +19 -0
- package/dist/chunks/autonomy-D2YudQnH.js +1 -0
- package/dist/chunks/autonomyPanel-B0OQV4lv.js +1 -0
- package/dist/chunks/backgroundHousekeeping-CvHD981l.js +17 -0
- package/dist/chunks/backgroundHousekeeping-DMkk-QoZ.js +1 -0
- package/dist/chunks/banner-DNLUJFS_.js +2 -0
- package/dist/chunks/bg-D_H-uZDS.js +9 -0
- package/dist/chunks/bg-FtpmvQuT.js +1 -0
- package/dist/chunks/branch-D44HjlJp.js +3 -0
- package/dist/chunks/bridge-4sldfa8u.js +2 -0
- package/dist/chunks/bridgeConfig-BM7iHryd.js +1 -0
- package/dist/chunks/bridgeConfig-CcCNsSBX.js +1 -0
- package/dist/chunks/bridgeEnabled-CYddgTU1.js +1 -0
- package/dist/chunks/bridgeEnabled-DoT2l1Oj.js +1 -0
- package/dist/chunks/bridgeMain-DaO51duk.js +68 -0
- package/dist/chunks/bridgeMain-Dc4-ZK69.js +1 -0
- package/dist/chunks/bridgeMessaging-IlSWKGmC.js +1 -0
- package/dist/chunks/bridgePointer-fFD_tbSk.js +1 -0
- package/dist/chunks/browser-DwnUS505.js +1 -0
- package/dist/chunks/btw-CrdUyRUP.js +1 -0
- package/dist/chunks/buddy-Ci0hdCf9.js +3 -0
- package/dist/chunks/bypassPermissionsKillswitch-BWOlc_sK.js +1 -0
- package/dist/chunks/caches-BHRJHGlc.js +1 -0
- package/dist/chunks/caches-CitduRKp.js +3 -0
- package/dist/chunks/ccrClient-yNKhQYnf.js +1 -0
- package/dist/chunks/changeDetector-B1tCH9Pa.js +1 -0
- package/dist/chunks/channelNotification-D8NPg8I8.js +1 -0
- package/dist/chunks/channelNotification-oE3eipDZ.js +1 -0
- package/dist/chunks/chrome-CwAwCY0V.js +1 -0
- package/dist/chunks/chromeNativeHost-63xqELw-.js +1 -0
- package/dist/chunks/claudeDesktop-CX1AsJie.js +1 -0
- package/dist/chunks/cleanup-C0gyKaOb.js +1 -0
- package/dist/chunks/clear-B5D08sZ0.js +1 -0
- package/dist/chunks/cliLaunch-8aeIk2ts.js +1 -0
- package/dist/chunks/client-un1k_6md.js +1 -0
- package/dist/chunks/color-BtVvrSvq.js +1 -0
- package/dist/chunks/commands--qEK1j9j.js +1 -0
- package/dist/chunks/commitAttribution-AEb-sE-t.js +1 -0
- package/dist/chunks/commitAttribution-HP_CWP0X.js +2 -0
- package/dist/chunks/common-BBRP_KzA.js +1 -0
- package/dist/chunks/common-BD4Q7osK.js +1 -0
- package/dist/chunks/common-C56I-_O3.js +1 -0
- package/dist/chunks/compact-BNhxD2UA.js +3 -0
- package/dist/chunks/companion-BlhNrZiL.js +1 -0
- package/dist/chunks/completionCache-BHSsdkBs.js +1 -0
- package/dist/chunks/completionCache-Daqaxlf3.js +4 -0
- package/dist/chunks/computerUseLock-BoEK9xYv.js +1 -0
- package/dist/chunks/config-9z8716kz.js +1 -0
- package/dist/chunks/config-f8Cx16Z6.js +1 -0
- package/dist/chunks/context-BdOjhAmM.js +1 -0
- package/dist/chunks/context-noninteractive-CnaDbgvf.js +54 -0
- package/dist/chunks/context-noninteractive-DRM7gbFk.js +1 -0
- package/dist/chunks/conversation-B9pq-m4L.js +1 -0
- package/dist/chunks/conversation-DUxXVrGj.js +1 -0
- package/dist/chunks/copy-Cjl0-hg1.js +7 -0
- package/dist/chunks/createSSHSession-CYaHalxc.js +6 -0
- package/dist/chunks/createSession-DoR2K7ay.js +1 -0
- package/dist/chunks/createSession-VlSLvi7J.js +1 -0
- package/dist/chunks/cronJitterConfig-DjSd7nvj.js +6 -0
- package/dist/chunks/crossProjectResume-CDWr5DFl.js +40 -0
- package/dist/chunks/daemon-FAp0WyY6.js +2 -0
- package/dist/chunks/datadog-CahWdK03.js +1 -0
- package/dist/chunks/datadog-DPkKCR8M.js +1 -0
- package/dist/chunks/debug-DIYxb3SF.js +1 -0
- package/dist/chunks/debug-otxXY3j-.js +5 -0
- package/dist/chunks/debugUtils-CiEnbhiz.js +1 -0
- package/dist/chunks/desktop-y3mzgaWo.js +1 -0
- package/dist/chunks/detached-Brq3-vHi.js +5 -0
- package/dist/chunks/detectRepository-CSN3yxkq.js +1 -0
- package/dist/chunks/detectRepository-CbR0WgtE.js +1 -0
- package/dist/chunks/detection-BPPZCanO.js +1 -0
- package/dist/chunks/detection-DrdKrqbQ.js +1 -0
- package/dist/chunks/diff-hpp0dp6U.js +1 -0
- package/dist/chunks/directoryCompletion-DAc3u1K2.js +1 -0
- package/dist/chunks/doctor-B230p0R_.js +1 -0
- package/dist/chunks/earlyInput-vv9abU2L.js +1 -0
- package/dist/chunks/effort-D7i2v6vd.js +9 -0
- package/dist/chunks/entry-Du3gtq9o.js +14 -0
- package/dist/chunks/env-BH-OBzcA.js +1 -0
- package/dist/chunks/envLessBridgeConfig-CKD4eOEe.js +1 -0
- package/dist/chunks/envLessBridgeConfig-DI0ouryy.js +1 -0
- package/dist/chunks/escHotkey-DfdC44i7.js +259 -0
- package/dist/chunks/execFileNoThrow-B_aZH_GP.js +1 -0
- package/dist/chunks/execSyncWrapper-Bn7EJqtD.js +1 -0
- package/dist/chunks/executor-BJb5d6mo.js +1 -0
- package/dist/chunks/executor-Dmn3RTuI.js +1561 -0
- package/dist/chunks/exit-fntBGxEC.js +1 -0
- package/dist/chunks/export-Dy9M7FnZ.js +2 -0
- package/dist/chunks/exportRenderer-Ckv4v0ye.js +1 -0
- package/dist/chunks/extra-usage-DLEvlKzs.js +1 -0
- package/dist/chunks/extra-usage-core-3KkeQSve.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DUezD54f.js +1 -0
- package/dist/chunks/extra-usage-pU11YXHS.js +1 -0
- package/dist/chunks/extraUsage-B-l-oe-7.js +1 -0
- package/dist/chunks/extractMemories-CXarlmZp.js +1 -0
- package/dist/chunks/fast-BzfzSH7K.js +1 -0
- package/dist/chunks/fast-CbLu_WYL.js +1 -0
- package/dist/chunks/feedback-DiyZIbov.js +1 -0
- package/dist/chunks/firstPartyEventLogger-Dig8Mv7_.js +1 -0
- package/dist/chunks/flushGate-Ci3NHOV4.js +1 -0
- package/dist/chunks/gates-CtkQH6jy.js +1 -0
- package/dist/chunks/gates-xscCu8-N.js +1 -0
- package/dist/chunks/gemini-BCuY2aYj.js +1 -0
- package/dist/chunks/generateRecap-DA0SNyFR.js +1 -0
- package/dist/chunks/generateSessionName-BtQ4NGXP.js +1 -0
- package/dist/chunks/genericProcessUtils-D-78JZxz.js +23 -0
- package/dist/chunks/git-BZEgupMC.js +1 -0
- package/dist/chunks/git-DayFjsvj.js +6 -0
- package/dist/chunks/githubRepoPathMapping-C5RkiJWj.js +1 -0
- package/dist/chunks/goal-B6GHfd9J.js +3 -0
- package/dist/chunks/grok-DDM6xYuy.js +1 -0
- package/dist/chunks/growthbook-D-Po5Uxl.js +1 -0
- package/dist/chunks/heapdump-DHlUfpVV.js +5 -0
- package/dist/chunks/help-BulgC9m7.js +1 -0
- package/dist/chunks/hooks-D5AcFnD1.js +1 -0
- package/dist/chunks/hooks-jxIrev-X.js +79 -0
- package/dist/chunks/hostAdapter-BvraKy0o.js +1 -0
- package/dist/chunks/hostGuard-CWijeIyE.js +1 -0
- package/dist/chunks/ide-tx4qMFln.js +2 -0
- package/dist/chunks/inboundAttachments-C93Q7Dvt.js +1 -0
- package/dist/chunks/inboundAttachments-DxcFiX4f.js +1 -0
- package/dist/chunks/initReplBridge-BEldrf6f.js +1 -0
- package/dist/chunks/insights-HEsEDeCQ.js +822 -0
- package/dist/chunks/install-DRsM0bJO.js +1 -0
- package/dist/chunks/install-github-app-BVK5Z95c.js +147 -0
- package/dist/chunks/install-slack-app-DCw3O2J_.js +1 -0
- package/dist/chunks/instrumentation-DJ-R1s8C.js +12 -0
- package/dist/chunks/job-CUz_OGIq.js +2 -0
- package/dist/chunks/jwtUtils-DVyv2jab.js +1 -0
- package/dist/chunks/keybindings-Chr5nGBu.js +2 -0
- package/dist/chunks/lang-C7kJlPIh.js +1 -0
- package/dist/chunks/language-CQXwoDkI.js +1 -0
- package/dist/chunks/language-Lx3WlBN6.js +1 -0
- package/dist/chunks/launchAgentsPlatform-Fsslu42L.js +1 -0
- package/dist/chunks/launchAutofixPr-Cww8uS_5.js +18 -0
- package/dist/chunks/launchLocalMemory-BywmyvSJ.js +3 -0
- package/dist/chunks/launchLocalVault-BU3a5NV7.js +3 -0
- package/dist/chunks/launchMemoryStores-QUCODCJS.js +1 -0
- package/dist/chunks/launchOnboarding-BriZ0oIA.js +8 -0
- package/dist/chunks/launchSchedule-uLm7zt_B.js +1 -0
- package/dist/chunks/launchSkillStore-DMo2bV8X.js +1 -0
- package/dist/chunks/launchTeleport-DgQWSfXM.js +3 -0
- package/dist/chunks/launchVault-DfnBBFne.js +1 -0
- package/dist/chunks/loadAgentsDir-Br5fGLLI.js +4697 -0
- package/dist/chunks/loadAgentsDir-DDYPdQKP.js +1 -0
- package/dist/chunks/loadPluginHooks-C4soqr6g.js +1 -0
- package/dist/chunks/localSearch-CELyiWF6.js +1 -0
- package/dist/chunks/localSearch-DhZMcy5t.js +1 -0
- package/dist/chunks/log-DS97_rIr.js +1 -0
- package/dist/chunks/login-CvvIpkpq.js +1 -0
- package/dist/chunks/login-DjgITOAw.js +1 -0
- package/dist/chunks/logoV2Utils-BN_HrHSc.js +1 -0
- package/dist/chunks/logout-DOFJpZEJ.js +1 -0
- package/dist/chunks/magicDocs-2Zr7bYY_.js +57 -0
- package/dist/chunks/main-BafHJuKH.js +31 -0
- package/dist/chunks/main-D61CvHRy.js +1312 -0
- package/dist/chunks/mappers-BCiceNt3.js +1 -0
- package/dist/chunks/mcp-BV4m1Gbl.js +2 -0
- package/dist/chunks/mcp-CrAgAK9u.js +1 -0
- package/dist/chunks/mcp-DK4m73gO.js +6 -0
- package/dist/chunks/mcpServer-7zyXl9Wg.js +1 -0
- package/dist/chunks/mcpServer-sa9Z183j.js +1 -0
- package/dist/chunks/memoize-CPexXTP7.js +1 -0
- package/dist/chunks/memory-BrJPVgxn.js +1 -0
- package/dist/chunks/mode-Cr-NTlRa.js +2 -0
- package/dist/chunks/model-CCjuMV6k.js +1 -0
- package/dist/chunks/model-aJS_plgM.js +1 -0
- package/dist/chunks/onChangeAppState-C9EvI3EH.js +1 -0
- package/dist/chunks/openai-Cvb_-1A-.js +10 -0
- package/dist/chunks/overageCreditGrant-cGQilawd.js +1 -0
- package/dist/chunks/panel-DO_faHV-.js +1 -0
- package/dist/chunks/panelCall-DqZuxAf0.js +1 -0
- package/dist/chunks/parser-BXWr_mLL.js +1 -0
- package/dist/chunks/parser-DbKSpFRq.js +1 -0
- package/dist/chunks/passes-DsrceO14.js +1 -0
- package/dist/chunks/path-nCzt96pE.js +1 -0
- package/dist/chunks/paths-DfGsIjPm.js +39 -0
- package/dist/chunks/permissions-CjPIu4IE.js +3 -0
- package/dist/chunks/pipeTransport-C5u1K0wu.js +1 -0
- package/dist/chunks/plan-YjMAcn6g.js +1 -0
- package/dist/chunks/platform-DYZVoA9J.js +2 -0
- package/dist/chunks/plugin-Oux5bBQj.js +1 -0
- package/dist/chunks/pluginAutoupdate-Dl9U-fbk.js +1 -0
- package/dist/chunks/pluginBlocklist-BzI5DNeN.js +1 -0
- package/dist/chunks/pluginCliCommands-CExAcsaR.js +1 -0
- package/dist/chunks/pluginFlagging-BeqrbhgG.js +1 -0
- package/dist/chunks/pluginOperations-s0FQGOBm.js +2 -0
- package/dist/chunks/pluginStartupCheck-BVag9B-T.js +1 -0
- package/dist/chunks/pluginStartupCheck-BuorUEEf.js +1 -0
- package/dist/chunks/plugins-DTQHVJtY.js +4 -0
- package/dist/chunks/policyLimits-zoyF_6O4.js +1 -0
- package/dist/chunks/pollConfig-C19GiX7i.js +1 -0
- package/dist/chunks/poor-Bx5vvamq.js +1 -0
- package/dist/chunks/poorMode-BCoeB5zB.js +1 -0
- package/dist/chunks/poorMode-CTd_csCl.js +1 -0
- package/dist/chunks/print-UXl3rG8y.js +39 -0
- package/dist/chunks/privacy-settings-e43D9a4o.js +1 -0
- package/dist/chunks/processBashCommand-CvR9-gf8.js +1 -0
- package/dist/chunks/processSlashCommand-CB3wyAX7.js +6 -0
- package/dist/chunks/projectContext-D3_u80TY.js +1 -0
- package/dist/chunks/prompt-53lRY98R.js +1 -0
- package/dist/chunks/prompt-B8M-HLIS.js +227 -0
- package/dist/chunks/prompt-CooZNM1u.js +1 -0
- package/dist/chunks/promptEditor-CHiopfD7.js +4 -0
- package/dist/chunks/protocolHandler-DjivYn8H.js +13 -0
- package/dist/chunks/proxy-nPT6a6QY.js +99 -0
- package/dist/chunks/rate-limit-options-B-vndk5W.js +1 -0
- package/dist/chunks/rcDebugLog-BoroyfjB.js +11 -0
- package/dist/chunks/referral-DOqhciQu.js +1 -0
- package/dist/chunks/refresh-C8uLznwm.js +1 -0
- package/dist/chunks/registerProtocol-4lQ7O4Cc.js +36 -0
- package/dist/chunks/registry-q6v98JYd.js +1 -0
- package/dist/chunks/release-notes-C7JHshX3.js +4 -0
- package/dist/chunks/releaseNotes-CXY-xAja.js +2 -0
- package/dist/chunks/reload-plugins-DLS5lQcc.js +1 -0
- package/dist/chunks/remote-env-DhHea8yK.js +1 -0
- package/dist/chunks/remoteBridgeCore-BhOLhQIA.js +1 -0
- package/dist/chunks/remoteControlServer-CI0F83pg.js +3 -0
- package/dist/chunks/rename-DiKWWCzB.js +1 -0
- package/dist/chunks/renderOptions-DKe32LfM.js +1 -0
- package/dist/chunks/resume-DA4ToJFW.js +2 -0
- package/dist/chunks/runtimeObserver-BfVC8KK9.js +1 -0
- package/dist/chunks/runtimeObserver-DetZ5Tek.js +10 -0
- package/dist/chunks/sandbox-adapter-wh4cKN45.js +1 -0
- package/dist/chunks/sandbox-toggle-D8MgV0DT.js +1 -0
- package/dist/chunks/searchExtraTools-DbPpcAPw.js +1 -0
- package/dist/chunks/sentry-C3sL9nhF.js +13 -0
- package/dist/chunks/session-Bd-4QCqc.js +2 -0
- package/dist/chunks/sessionDiscovery-D_KPF86E.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-COne5L2E.js +1 -0
- package/dist/chunks/sessionMemory-0Jqo1_MV.js +1 -0
- package/dist/chunks/sessionMemory-BDt_8bNB.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BFIJ1nqF.js +1 -0
- package/dist/chunks/sessionObserver-CEky1SLb.js +1 -0
- package/dist/chunks/sessionObserver-CQxIKV8D.js +20 -0
- package/dist/chunks/sessionStorage-D1XhqZyW.js +1 -0
- package/dist/chunks/sessionTitle-CB0ZEkS_.js +14 -0
- package/dist/chunks/sessionTracing-BIKXLTJZ.js +11 -0
- package/dist/chunks/settingsSync-pI3L3CeR.js +1 -0
- package/dist/chunks/setup-BSi50fkU.js +1 -0
- package/dist/chunks/setup-DjsmjRKQ.js +2 -0
- package/dist/chunks/setup-Dq0_SRA1.js +9 -0
- package/dist/chunks/shadowedRuleDetection-DvAjOOPL.js +1 -0
- package/dist/chunks/shellQuote-D8XPeqkc.js +1 -0
- package/dist/chunks/sideQuestion-BrTA8ooG.js +20 -0
- package/dist/chunks/sink-CqWxcRl9.js +1 -0
- package/dist/chunks/sink-Dkat5kH9.js +1 -0
- package/dist/chunks/sinks--frMI4-5.js +2 -0
- package/dist/chunks/sinks-CvPAVcMY.js +1 -0
- package/dist/chunks/skill-learning-2LV0yuwF.js +5 -0
- package/dist/chunks/skillChangeDetector-B5CGPl7e.js +1 -0
- package/dist/chunks/skillGapStore-Dc29T-OG.js +1 -0
- package/dist/chunks/skillGapStore-KzRf6Ezr.js +5 -0
- package/dist/chunks/skillGenerator-BdOHsgc4.js +8 -0
- package/dist/chunks/skillLearning-CdcVIG14.js +1 -0
- package/dist/chunks/skillLearning-DXWMxSA2.js +1 -0
- package/dist/chunks/skillPanel-zMY8o-86.js +28 -0
- package/dist/chunks/skillSearchPanel-l8aolUP8.js +21 -0
- package/dist/chunks/skills-BeMWJPup.js +1 -0
- package/dist/chunks/sprites-qel_EgTP.js +1 -0
- package/dist/chunks/startupProfiler-CnDpob1v.js +3 -0
- package/dist/chunks/startupProfiler-TrMfE6Q4.js +1 -0
- package/dist/chunks/stats-CEBfahqM.js +1 -0
- package/dist/chunks/status-C9KXyfDk.js +1 -0
- package/dist/chunks/statusNoticeHelpers-CxoN9oDh.js +1 -0
- package/dist/chunks/stickers-eHrGA1W5.js +1 -0
- package/dist/chunks/tag-Dvl7Us9y.js +11 -0
- package/dist/chunks/tasks-BhiwUF0n.js +1 -0
- package/dist/chunks/teamHelpers-COQazluD.js +1 -0
- package/dist/chunks/teamHelpers-Mgfrv-Jf.js +1 -0
- package/dist/chunks/teammateModeSnapshot-8EWjlA-s.js +1 -0
- package/dist/chunks/teammateModeSnapshot-BV-P8s5r.js +1 -0
- package/dist/chunks/teleport-U5Zgqw3H.js +1 -0
- package/dist/chunks/templateJobs-C3idypN_.js +12 -0
- package/dist/chunks/terminalSetup-CmAEgt-5.js +33 -0
- package/dist/chunks/terminalSetup-mvAN4no7.js +1 -0
- package/dist/chunks/theme-BD2H4vJi.js +1 -0
- package/dist/chunks/thinkback-BOByXYp2.js +1 -0
- package/dist/chunks/thinkback-Dzu2mnNF.js +1 -0
- package/dist/chunks/thinkback-play-BX1K2UMY.js +1 -0
- package/dist/chunks/tmux-DruHFjDy.js +1 -0
- package/dist/chunks/toolEventObserver-B6cLV_dK.js +1 -0
- package/dist/chunks/toolEventObserver-i6it3p2_.js +1 -0
- package/dist/chunks/toolPool--2gNFbrz.js +1 -0
- package/dist/chunks/toolPool-dNV2JxUI.js +1 -0
- package/dist/chunks/trustedDevice-DY8OosTr.js +1 -0
- package/dist/chunks/trustedDevice-zya_Ml1N.js +1 -0
- package/dist/chunks/tui-KoYD82tT.js +6 -0
- package/dist/chunks/types-D5R26wwH.js +17 -0
- package/dist/chunks/udsClient-RkYuzeZC.js +1 -0
- package/dist/chunks/ultrareviewCommand-CCkKby4J.js +3 -0
- package/dist/chunks/undercover-CIutVLEO.js +1 -0
- package/dist/chunks/undercover-D9O2McNG.js +31 -0
- package/dist/chunks/up-BPM85EYl.js +12 -0
- package/dist/chunks/updateCCB-Bmn3Y63Y.js +11 -0
- package/dist/chunks/upgrade-D3rVOeHO.js +1 -0
- package/dist/chunks/upgrade-Dq3l14ZY.js +1 -0
- package/dist/chunks/upload-1PmElPfW.js +1 -0
- package/dist/chunks/upstreamproxy-BBTSJnad.js +11 -0
- package/dist/chunks/usage-B5G8FOZ3.js +1 -0
- package/dist/chunks/usage-VtTu7beE.js +1 -0
- package/dist/chunks/useMainLoopModel-CaQLIr1V.js +1 -0
- package/dist/chunks/useManagePlugins-BvoeOnqq.js +1 -0
- package/dist/chunks/useMergedTools-C133BfRp.js +1 -0
- package/dist/chunks/useSearchInput-CROB7AbC.js +1 -0
- package/dist/chunks/useSettingsErrors-DRxtFXoe.js +1 -0
- package/dist/chunks/useVoice-BQ9aSFJe.js +1 -0
- package/dist/chunks/util-BZnJgF79.js +1 -0
- package/dist/chunks/utils-4gsxQpga.js +1 -0
- package/dist/chunks/validatePlugin-DlrnBhPA.js +1 -0
- package/dist/chunks/vim-BXQCLoFJ.js +1 -0
- package/dist/chunks/voice-CeRmLRHT.js +2 -0
- package/dist/chunks/voice-QHyDff3f.js +8 -0
- package/dist/chunks/voiceModeEnabled-Bq_rttkL.js +1 -0
- package/dist/chunks/voiceModeEnabled-CLAVCVLW.js +1 -0
- package/dist/chunks/voiceStreamSTT-BDKenO5F.js +1 -0
- package/dist/chunks/voiceStreamSTT-CL52x8wZ.js +1 -0
- package/dist/chunks/which-BnEnzWhs.js +1 -0
- package/dist/chunks/windowsPaths-43st5EQF.js +1 -0
- package/dist/chunks/windowsPaths-DerzGPcz.js +2 -0
- package/dist/chunks/workSecret-qRMNrQy2.js +1 -0
- package/dist/chunks/workerRegistry-BUD3lBk_.js +1 -0
- package/dist/chunks/worktree-C0f9Ke-R.js +1 -0
- package/dist/chunks/xml-DvVQHZ1N.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AddWorkspaceDirectory-BKIYdg96.js +0 -1
- package/dist/chunks/App-BAwWP3iN.js +0 -1
- package/dist/chunks/ApproveApiKey-CJFvgVKS.js +0 -1
- package/dist/chunks/ApproveApiKey-da08NX2f.js +0 -1
- package/dist/chunks/AssistantSessionChooser-DQMKGO_q.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-Jtiqm4k2.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-D7TJ4Qn1.js +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-CuPz5Xfi.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CRC6kEV1.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-J0uv5XzG.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-CE4OlAHo.js +0 -1
- package/dist/chunks/DesktopHandoff-B_vNnZS5.js +0 -1
- package/dist/chunks/DevChannelsDialog-kjRnWtNf.js +0 -1
- package/dist/chunks/DiffDialog-CSBWOnXJ.js +0 -3
- package/dist/chunks/Doctor-DhK599q8.js +0 -1
- package/dist/chunks/Doctor-VJ5ZGb8g.js +0 -3
- package/dist/chunks/ExitFlow-M5XPGBHL.js +0 -2
- package/dist/chunks/Feedback-FHvqI2bu.js +0 -2
- package/dist/chunks/Grove-68muTpx6.js +0 -1
- package/dist/chunks/Grove-BC2IZIhN.js +0 -11
- package/dist/chunks/HybridTransport-Df_FceV2.js +0 -4
- package/dist/chunks/ITermBackend-DkpK9X1H.js +0 -1
- package/dist/chunks/InvalidConfigDialog-Cm6Yvt00.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-Ai3D8AL1.js +0 -1
- package/dist/chunks/MCPConnectionManager-BqNXYQEr.js +0 -1
- package/dist/chunks/McpParsingWarnings-BZcVbGhE.js +0 -1
- package/dist/chunks/MessageSelector-BXOoEogr.js +0 -3
- package/dist/chunks/Messages-F6OIAv8C.js +0 -11
- package/dist/chunks/Onboarding-n1aA7tmN.js +0 -1
- package/dist/chunks/OverageCreditUpsell-Bt23I92r.js +0 -1
- package/dist/chunks/PluginSettings-Dgu23nzv.js +0 -17
- package/dist/chunks/PromptInputFooterSuggestions-uiV23aG4.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-D84vnNKM.js +0 -1
- package/dist/chunks/QueryEngine-CEodAvI2.js +0 -1
- package/dist/chunks/REPL-CTTa9BK0.js +0 -97
- package/dist/chunks/REPL-IO7wsKaQ.js +0 -1
- package/dist/chunks/RemoteCallout-BYKqws96.js +0 -1
- package/dist/chunks/RemoteSessionManager-Dq0W_fcj.js +0 -2
- package/dist/chunks/ResumeConversation-CxzeCdL8.js +0 -1
- package/dist/chunks/SSETransport-CJrrD1ln.js +0 -4
- package/dist/chunks/SearchExtraToolsTool-DI-36R5p.js +0 -1
- package/dist/chunks/SentryErrorBoundary-BKPxEWOf.js +0 -1
- package/dist/chunks/SentryErrorBoundary-CcI0kkLW.js +0 -2
- package/dist/chunks/Settings-CGcBR9CD.js +0 -2
- package/dist/chunks/TeleportProgress-C7muqjDw.js +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-B3pUiRc2.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-ClyBQR3K.js +0 -1
- package/dist/chunks/ThemePicker-CGIB6YiW.js +0 -1
- package/dist/chunks/TmuxBackend-m2ldrneQ.js +0 -9
- package/dist/chunks/TrustDialog-o5kqmn6m.js +0 -1
- package/dist/chunks/ValidationErrorsList-D7bXMb0U.js +0 -2
- package/dist/chunks/WelcomeV2-Ckp3JPnA.js +0 -1
- package/dist/chunks/WindowsTerminalBackend-DsDqNWSP.js +0 -2
- package/dist/chunks/add-dir-DTP3NrLy.js +0 -1
- package/dist/chunks/agentDisplay-BEn43jMP.js +0 -1
- package/dist/chunks/agents-3ii2LyeQ.js +0 -2
- package/dist/chunks/agents-g0PDZl_l.js +0 -103
- package/dist/chunks/ant-PZvt_t1G.js +0 -1
- package/dist/chunks/api-BRckHGQ5.js +0 -1
- package/dist/chunks/api-DBvyymX6.js +0 -1
- package/dist/chunks/asciicast-C3nf97NR.js +0 -1
- package/dist/chunks/asciicast-DIsaWcsJ.js +0 -4
- package/dist/chunks/assistant-BBmaU8-A.js +0 -1
- package/dist/chunks/assistant-CMaN0QzY.js +0 -1
- package/dist/chunks/assistant-CVhvOfqJ.js +0 -1
- package/dist/chunks/auth-BXzbkJcE.js +0 -1
- package/dist/chunks/auth-Cud9tPJB.js +0 -1
- package/dist/chunks/autoMode-BREcJLYf.js +0 -45
- package/dist/chunks/autonomy-CuQizTZi.js +0 -1
- package/dist/chunks/autonomy-h9vver1r.js +0 -19
- package/dist/chunks/autonomyPanel-DVyrTxfP.js +0 -1
- package/dist/chunks/backgroundHousekeeping-DwA5WO9N.js +0 -1
- package/dist/chunks/backgroundHousekeeping-Ij_q7KN8.js +0 -17
- package/dist/chunks/banner-32EBTKI7.js +0 -2
- package/dist/chunks/bg-DK0E4ZtW.js +0 -9
- package/dist/chunks/bg-Dbh5z3Y8.js +0 -1
- package/dist/chunks/branch-B9AQFFTX.js +0 -3
- package/dist/chunks/bridge-BkL7g0ua.js +0 -2
- package/dist/chunks/bridgeConfig-BPP3lJRh.js +0 -1
- package/dist/chunks/bridgeConfig-BZQBBfap.js +0 -1
- package/dist/chunks/bridgeEnabled-Bkmqv-2V.js +0 -1
- package/dist/chunks/bridgeEnabled-BwBjPmEE.js +0 -1
- package/dist/chunks/bridgeMain-CbGj0plH.js +0 -68
- package/dist/chunks/bridgeMain-DpQRGiMo.js +0 -1
- package/dist/chunks/bridgeMessaging-C-ZFPTiZ.js +0 -1
- package/dist/chunks/bridgePointer-B2FPGDWR.js +0 -1
- package/dist/chunks/browser-fLRXxIsQ.js +0 -1
- package/dist/chunks/btw-BSme4Kzi.js +0 -1
- package/dist/chunks/buddy-DX94yYTy.js +0 -3
- package/dist/chunks/bypassPermissionsKillswitch-Crl2aipx.js +0 -1
- package/dist/chunks/caches-DeXmHls9.js +0 -3
- package/dist/chunks/caches-U1iFQIc7.js +0 -1
- package/dist/chunks/ccrClient-BYD1ONzC.js +0 -1
- package/dist/chunks/changeDetector-PaQPe1HQ.js +0 -1
- package/dist/chunks/channelNotification-Aq0p9f-W.js +0 -1
- package/dist/chunks/channelNotification-B0QskFjB.js +0 -1
- package/dist/chunks/chrome-B8ByN3u6.js +0 -1
- package/dist/chunks/chromeNativeHost-DX8f9Y2L.js +0 -1
- package/dist/chunks/claudeDesktop-C1qQs6os.js +0 -1
- package/dist/chunks/cleanup-Pv6U3HiI.js +0 -1
- package/dist/chunks/clear-CeJ5tgg8.js +0 -1
- package/dist/chunks/cliLaunch-BQa48gsr.js +0 -1
- package/dist/chunks/client-B7AdqRap.js +0 -1
- package/dist/chunks/color-OlMWmMnJ.js +0 -1
- package/dist/chunks/commands-BwfOl3fk.js +0 -1
- package/dist/chunks/commitAttribution-C479aqmn.js +0 -2
- package/dist/chunks/commitAttribution-CZ1OOh8F.js +0 -1
- package/dist/chunks/common-B379wT22.js +0 -1
- package/dist/chunks/common-B_BC3eMY.js +0 -1
- package/dist/chunks/common-CMCv4N_v.js +0 -1
- package/dist/chunks/compact-Dq-J7j1C.js +0 -3
- package/dist/chunks/companion-CtJjyD3N.js +0 -1
- package/dist/chunks/completionCache-DHfUBBMH.js +0 -1
- package/dist/chunks/completionCache-DORrtxkS.js +0 -4
- package/dist/chunks/computerUseLock-BjoDJH2h.js +0 -1
- package/dist/chunks/config-DcnYYwCy.js +0 -1
- package/dist/chunks/config-_KcvL7RX.js +0 -1
- package/dist/chunks/context-CShSBp-i.js +0 -1
- package/dist/chunks/context-noninteractive-BApFNncX.js +0 -54
- package/dist/chunks/context-noninteractive-uMvPKhng.js +0 -1
- package/dist/chunks/conversation-BlUHkj1_.js +0 -1
- package/dist/chunks/conversation-CCzL-eYb.js +0 -1
- package/dist/chunks/copy-DIMR3Q3S.js +0 -7
- package/dist/chunks/createSSHSession-DvSnUdsD.js +0 -6
- package/dist/chunks/createSession-D8tcktmP.js +0 -1
- package/dist/chunks/createSession-DaT4x1E6.js +0 -1
- package/dist/chunks/cronJitterConfig-C2a-Ybqm.js +0 -6
- package/dist/chunks/crossProjectResume-B3Chhiwf.js +0 -40
- package/dist/chunks/daemon-CCtZ9wY3.js +0 -2
- package/dist/chunks/datadog-BYNSi8R3.js +0 -1
- package/dist/chunks/datadog-DCukMGn4.js +0 -1
- package/dist/chunks/debug-DM5ezCBS.js +0 -1
- package/dist/chunks/debug-UI3T040K.js +0 -5
- package/dist/chunks/debugUtils-BBMFODKH.js +0 -1
- package/dist/chunks/desktop-BXj3JEMV.js +0 -1
- package/dist/chunks/detached-D300jlhj.js +0 -5
- package/dist/chunks/detectRepository-CBk3S2zv.js +0 -1
- package/dist/chunks/detectRepository-DCTvg4p0.js +0 -1
- package/dist/chunks/detection-CQsNad64.js +0 -1
- package/dist/chunks/detection-DJ-vTbBf.js +0 -1
- package/dist/chunks/diff-D3Xuv_4J.js +0 -1
- package/dist/chunks/directoryCompletion-D7EGwonO.js +0 -1
- package/dist/chunks/doctor-B5-jh6lS.js +0 -1
- package/dist/chunks/earlyInput-RoVleNEN.js +0 -1
- package/dist/chunks/effort-CpHnXRxJ.js +0 -9
- package/dist/chunks/entry-YXnIL7B7.js +0 -14
- package/dist/chunks/env-chR0gV31.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CcgSiwvA.js +0 -1
- package/dist/chunks/envLessBridgeConfig-MaElAFPV.js +0 -1
- package/dist/chunks/escHotkey-Cyz0yyh1.js +0 -259
- package/dist/chunks/execFileNoThrow-CuQN1sz8.js +0 -1
- package/dist/chunks/execSyncWrapper-C2XQnFVo.js +0 -1
- package/dist/chunks/executor-4EeD8GNm.js +0 -1561
- package/dist/chunks/executor-BHEuNh5F.js +0 -1
- package/dist/chunks/exit-DKG0r57m.js +0 -1
- package/dist/chunks/export-BNbcpW3p.js +0 -2
- package/dist/chunks/exportRenderer-pYMIcnO4.js +0 -1
- package/dist/chunks/extra-usage-DTXphHAD.js +0 -1
- package/dist/chunks/extra-usage-H-U38bGx.js +0 -1
- package/dist/chunks/extra-usage-core-N4VLj0ye.js +0 -1
- package/dist/chunks/extra-usage-noninteractive-BGUiGr3a.js +0 -1
- package/dist/chunks/extraUsage-X6CmSsdg.js +0 -1
- package/dist/chunks/extractMemories-C8R4DJVc.js +0 -1
- package/dist/chunks/fast-BJwQnvAP.js +0 -1
- package/dist/chunks/fast-DMkPYQmQ.js +0 -1
- package/dist/chunks/feedback-DLcYu4id.js +0 -1
- package/dist/chunks/firstPartyEventLogger-C00GfHTl.js +0 -1
- package/dist/chunks/flushGate-0DZFLUEb.js +0 -1
- package/dist/chunks/gates-DP4JyL5e.js +0 -1
- package/dist/chunks/gates-DeLWne9R.js +0 -1
- package/dist/chunks/gemini-CnKaXUJJ.js +0 -1
- package/dist/chunks/generateRecap-BUS2DEdj.js +0 -1
- package/dist/chunks/generateSessionName-CnPPgvyy.js +0 -1
- package/dist/chunks/genericProcessUtils-BGvcwuPt.js +0 -23
- package/dist/chunks/git-CN3qtTb_.js +0 -6
- package/dist/chunks/git-D23Mzu_K.js +0 -1
- package/dist/chunks/githubRepoPathMapping-CnXpQRPY.js +0 -1
- package/dist/chunks/grok-C2BUbWJR.js +0 -1
- package/dist/chunks/growthbook-CPTqwUyC.js +0 -1
- package/dist/chunks/heapdump-pamjtM2a.js +0 -5
- package/dist/chunks/help-z7XnNKDT.js +0 -1
- package/dist/chunks/hooks-BEAaBqmd.js +0 -1
- package/dist/chunks/hooks-iTfSDH96.js +0 -79
- package/dist/chunks/hostAdapter-DWD430of.js +0 -1
- package/dist/chunks/hostGuard-zim_4F9V.js +0 -1
- package/dist/chunks/ide-BK8Td_CD.js +0 -2
- package/dist/chunks/inboundAttachments-DQ4Czsr5.js +0 -1
- package/dist/chunks/inboundAttachments-Dq3IYudc.js +0 -1
- package/dist/chunks/initReplBridge-BeGirV3Q.js +0 -1
- package/dist/chunks/insights-DfD6PMkd.js +0 -822
- package/dist/chunks/install-CNq--Fit.js +0 -1
- package/dist/chunks/install-github-app-Dhq_T_EJ.js +0 -147
- package/dist/chunks/install-slack-app-mz5O3xo_.js +0 -1
- package/dist/chunks/instrumentation-CM0poWjx.js +0 -12
- package/dist/chunks/job-CKI1I_Va.js +0 -2
- package/dist/chunks/jwtUtils-CpXwh_du.js +0 -1
- package/dist/chunks/keybindings-5qahtcNc.js +0 -2
- package/dist/chunks/lang-BMNwfSRv.js +0 -1
- package/dist/chunks/language-DXpi4083.js +0 -1
- package/dist/chunks/language-GlWQb4l9.js +0 -1
- package/dist/chunks/launchAgentsPlatform-BU4bAPan.js +0 -1
- package/dist/chunks/launchAutofixPr-B80p6iq-.js +0 -18
- package/dist/chunks/launchLocalMemory-CDAa9B30.js +0 -3
- package/dist/chunks/launchLocalVault-B19lF8tP.js +0 -3
- package/dist/chunks/launchMemoryStores-C6wJI-8V.js +0 -1
- package/dist/chunks/launchOnboarding-BIlwEdkk.js +0 -8
- package/dist/chunks/launchSchedule-DjMh3--x.js +0 -1
- package/dist/chunks/launchSkillStore-Bs5thijU.js +0 -1
- package/dist/chunks/launchTeleport-CDlWx4xC.js +0 -3
- package/dist/chunks/launchVault-C40NAyOp.js +0 -1
- package/dist/chunks/loadAgentsDir-BYqiLHDS.js +0 -1
- package/dist/chunks/loadAgentsDir-C9Ee_fs1.js +0 -4672
- package/dist/chunks/loadPluginHooks-DaETszNq.js +0 -1
- package/dist/chunks/localSearch-B3zijtEM.js +0 -1
- package/dist/chunks/localSearch-BTGnGPVi.js +0 -1
- package/dist/chunks/log-CzsijfHZ.js +0 -1
- package/dist/chunks/login-B3IQj5YQ.js +0 -1
- package/dist/chunks/login-CUM0odSh.js +0 -1
- package/dist/chunks/logoV2Utils-CW73xjcW.js +0 -1
- package/dist/chunks/logout-B3hPrJSX.js +0 -1
- package/dist/chunks/magicDocs-BysWdjbO.js +0 -57
- package/dist/chunks/main-CnAyCMYQ.js +0 -1108
- package/dist/chunks/main-D9fUXJiD.js +0 -31
- package/dist/chunks/mappers-D1SAyuKF.js +0 -1
- package/dist/chunks/mcp-BIiXcANN.js +0 -1
- package/dist/chunks/mcp-BLcZi9zs.js +0 -2
- package/dist/chunks/mcp-nOKz2_By.js +0 -6
- package/dist/chunks/mcpServer-CJOTyq3O.js +0 -1
- package/dist/chunks/mcpServer-DaiouIKs.js +0 -1
- package/dist/chunks/memoize-DxwLawI2.js +0 -1
- package/dist/chunks/memory-DtFuXZHl.js +0 -1
- package/dist/chunks/mode-BPNUYCpk.js +0 -2
- package/dist/chunks/model-Cky6xlFt.js +0 -1
- package/dist/chunks/model-DC5bOhtE.js +0 -1
- package/dist/chunks/onChangeAppState-pafR88Yw.js +0 -1
- package/dist/chunks/openai-BOxlfR-k.js +0 -10
- package/dist/chunks/overageCreditGrant-BmmOYjTh.js +0 -1
- package/dist/chunks/panel-s9fbCKfl.js +0 -1
- package/dist/chunks/parser-CmngCwjB.js +0 -1
- package/dist/chunks/parser-SWIZo39J.js +0 -1
- package/dist/chunks/passes-CqiFdifM.js +0 -1
- package/dist/chunks/path-B3lx7yHn.js +0 -1
- package/dist/chunks/paths-C2JRlUsH.js +0 -39
- package/dist/chunks/permissions-BHJUxNga.js +0 -3
- package/dist/chunks/pipeTransport-BTYiqf9e.js +0 -1
- package/dist/chunks/plan-CF_ClJlj.js +0 -1
- package/dist/chunks/platform-CuyedWpe.js +0 -2
- package/dist/chunks/plugin-Bz3RKbru.js +0 -1
- package/dist/chunks/pluginAutoupdate-Ck0wWoNE.js +0 -1
- package/dist/chunks/pluginBlocklist-7dlesHcW.js +0 -1
- package/dist/chunks/pluginCliCommands-D502zE25.js +0 -1
- package/dist/chunks/pluginFlagging-DfHARfd-.js +0 -1
- package/dist/chunks/pluginOperations-BBRf8tuH.js +0 -2
- package/dist/chunks/pluginStartupCheck-BKEhWQR2.js +0 -1
- package/dist/chunks/pluginStartupCheck-ZcaocOSL.js +0 -1
- package/dist/chunks/plugins-JnZ3lNqG.js +0 -4
- package/dist/chunks/policyLimits-CtOjYdHx.js +0 -1
- package/dist/chunks/pollConfig-Duecunu0.js +0 -1
- package/dist/chunks/poor-CUwZAV9z.js +0 -1
- package/dist/chunks/poorMode-DOoZ0U-8.js +0 -1
- package/dist/chunks/poorMode-DRcH1fuh.js +0 -1
- package/dist/chunks/print-D9IhN66j.js +0 -39
- package/dist/chunks/privacy-settings-DmbuvR-R.js +0 -1
- package/dist/chunks/processBashCommand-Cg8we9vS.js +0 -1
- package/dist/chunks/processSlashCommand-BBQQEGZd.js +0 -6
- package/dist/chunks/projectContext-D5FgyE-d.js +0 -1
- package/dist/chunks/prompt-7Vt8FUX_.js +0 -1
- package/dist/chunks/prompt-Cj0hg3CU.js +0 -1
- package/dist/chunks/prompt-thBQB2X5.js +0 -222
- package/dist/chunks/promptEditor-C8B2TEXp.js +0 -4
- package/dist/chunks/protocolHandler-BUKWgksO.js +0 -13
- package/dist/chunks/proxy-CfZp-wce.js +0 -99
- package/dist/chunks/rate-limit-options-PruvKAQt.js +0 -1
- package/dist/chunks/rcDebugLog-CIS3PU-H.js +0 -11
- package/dist/chunks/referral-CXmDvb7V.js +0 -1
- package/dist/chunks/refresh-C_FDHRT7.js +0 -1
- package/dist/chunks/registerProtocol-WxQUBybC.js +0 -36
- package/dist/chunks/registry-CeBTik9J.js +0 -1
- package/dist/chunks/release-notes-aZ6QUVnT.js +0 -4
- package/dist/chunks/releaseNotes-2GPd_O_r.js +0 -2
- package/dist/chunks/reload-plugins-BDh4ZhHi.js +0 -1
- package/dist/chunks/remote-env-BIOFHNQC.js +0 -1
- package/dist/chunks/remoteBridgeCore-DyA_2GrL.js +0 -1
- package/dist/chunks/remoteControlServer-BjW9GsPd.js +0 -3
- package/dist/chunks/rename-CKlAeppY.js +0 -1
- package/dist/chunks/renderOptions-rmj4Mkls.js +0 -1
- package/dist/chunks/resume-Dm71Aeni.js +0 -2
- package/dist/chunks/runtimeObserver-BYOo5dT0.js +0 -1
- package/dist/chunks/runtimeObserver-CA7pdBvT.js +0 -10
- package/dist/chunks/sandbox-adapter-C7TBAehE.js +0 -1
- package/dist/chunks/sandbox-toggle-fHc9E9xW.js +0 -1
- package/dist/chunks/searchExtraTools-CpFsg_tS.js +0 -1
- package/dist/chunks/sentry-B1g5Tgp2.js +0 -13
- package/dist/chunks/session-C46oy7nX.js +0 -2
- package/dist/chunks/sessionDiscovery-CtrJ2Bfr.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-dwF5SFoS.js +0 -1
- package/dist/chunks/sessionMemory-BqCsLnFl.js +0 -1
- package/dist/chunks/sessionMemory-D4-Ymn0Q.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BKdYMir6.js +0 -1
- package/dist/chunks/sessionObserver-Bfu8q0_K.js +0 -1
- package/dist/chunks/sessionObserver-DoBuLaCJ.js +0 -20
- package/dist/chunks/sessionStorage-CUUU_J4D.js +0 -1
- package/dist/chunks/sessionTitle-BOM0LQlq.js +0 -14
- package/dist/chunks/sessionTracing-BEKULg2L.js +0 -11
- package/dist/chunks/settingsSync-BIsGiZhM.js +0 -1
- package/dist/chunks/setup-C3FOTg1s.js +0 -1
- package/dist/chunks/setup-ChF37I92.js +0 -9
- package/dist/chunks/setup-DvFPFV-3.js +0 -2
- package/dist/chunks/shadowedRuleDetection-spwhhTXF.js +0 -1
- package/dist/chunks/shellQuote-DgjT8KBA.js +0 -1
- package/dist/chunks/sideQuestion-iy7kJEkr.js +0 -20
- package/dist/chunks/sink-D6dxOYIw.js +0 -1
- package/dist/chunks/sink-FeQonv8-.js +0 -1
- package/dist/chunks/sinks-DKMqKJ66.js +0 -1
- package/dist/chunks/sinks-zNh_PVeS.js +0 -2
- package/dist/chunks/skill-learning-ChAFwJf0.js +0 -5
- package/dist/chunks/skillChangeDetector-8LVraP0Y.js +0 -1
- package/dist/chunks/skillGapStore-CUws9CQ6.js +0 -5
- package/dist/chunks/skillGapStore-CdPgIARS.js +0 -1
- package/dist/chunks/skillGenerator-CLtTRIjy.js +0 -8
- package/dist/chunks/skillLearning-CBosoKl-.js +0 -1
- package/dist/chunks/skillLearning-f7-aknmS.js +0 -1
- package/dist/chunks/skillPanel-Cd0AFEZf.js +0 -28
- package/dist/chunks/skillSearchPanel-VWiAbmdr.js +0 -21
- package/dist/chunks/skills-oQtI4eDn.js +0 -1
- package/dist/chunks/sprites-Cp4_DJUI.js +0 -1
- package/dist/chunks/startupProfiler-DnXZaX4A.js +0 -3
- package/dist/chunks/startupProfiler-SOE--nM9.js +0 -1
- package/dist/chunks/stats-B1X-nxO8.js +0 -1
- package/dist/chunks/status-BtCnWZEv.js +0 -1
- package/dist/chunks/statusNoticeHelpers-B6GW2gMe.js +0 -1
- package/dist/chunks/stickers-BMh2qjgF.js +0 -1
- package/dist/chunks/tag-B6WpuUE_.js +0 -11
- package/dist/chunks/tasks-DIOPZDoF.js +0 -1
- package/dist/chunks/teamHelpers-9p7wPcXj.js +0 -1
- package/dist/chunks/teamHelpers-PLGwYL4x.js +0 -1
- package/dist/chunks/teammateModeSnapshot-DO-3AkNP.js +0 -1
- package/dist/chunks/teammateModeSnapshot-DU8JCRRs.js +0 -1
- package/dist/chunks/teleport-DPUoWpD4.js +0 -1
- package/dist/chunks/templateJobs-DOSQvjx0.js +0 -12
- package/dist/chunks/terminalSetup-DdHkyElj.js +0 -33
- package/dist/chunks/terminalSetup-tSFJeCVl.js +0 -1
- package/dist/chunks/theme-Hf1fhR3q.js +0 -1
- package/dist/chunks/thinkback-5QYAbr0P.js +0 -1
- package/dist/chunks/thinkback-B5IraP81.js +0 -1
- package/dist/chunks/thinkback-play-Bqv85sjY.js +0 -1
- package/dist/chunks/tmux-CvbhsfwG.js +0 -1
- package/dist/chunks/toolEventObserver-B-mqmRv0.js +0 -1
- package/dist/chunks/toolEventObserver-_Fk1dSYg.js +0 -1
- package/dist/chunks/toolPool-C2KLBvek.js +0 -1
- package/dist/chunks/toolPool-CiEaFfxq.js +0 -1
- package/dist/chunks/trustedDevice-BowIKqqC.js +0 -1
- package/dist/chunks/trustedDevice-f8HslQu2.js +0 -1
- package/dist/chunks/tui-geoc3zxu.js +0 -6
- package/dist/chunks/types-Csi32ZXh.js +0 -17
- package/dist/chunks/udsClient-BdPOrL1H.js +0 -1
- package/dist/chunks/ultrareviewCommand-DbmRN6Lg.js +0 -3
- package/dist/chunks/undercover-Ch9wnIbk.js +0 -31
- package/dist/chunks/undercover-X6-EJ_7K.js +0 -1
- package/dist/chunks/up-D-U4wUCe.js +0 -12
- package/dist/chunks/updateCCB-DFHrOTEX.js +0 -11
- package/dist/chunks/upgrade-B6Ih-Ubj.js +0 -1
- package/dist/chunks/upgrade-CC4cnsnt.js +0 -1
- package/dist/chunks/upload-DSTB33ZR.js +0 -1
- package/dist/chunks/upstreamproxy-Ci5T_JCo.js +0 -11
- package/dist/chunks/usage-CNqpSfd2.js +0 -1
- package/dist/chunks/usage-DiZsjcMM.js +0 -1
- package/dist/chunks/useMainLoopModel-Bo6iEtB3.js +0 -1
- package/dist/chunks/useManagePlugins-Cvj0XfLp.js +0 -1
- package/dist/chunks/useMergedTools-BEpwy0Ec.js +0 -1
- package/dist/chunks/useSearchInput-YiO4crrI.js +0 -1
- package/dist/chunks/useSettingsErrors-BE-PITl4.js +0 -1
- package/dist/chunks/useVoice-D1sKPiqb.js +0 -1
- package/dist/chunks/util-C8_5375U.js +0 -1
- package/dist/chunks/utils-Dmh9vBcg.js +0 -1
- package/dist/chunks/validatePlugin-BQA60S_J.js +0 -1
- package/dist/chunks/vim-oNiLgw0C.js +0 -1
- package/dist/chunks/voice-BcA5h8ya.js +0 -8
- package/dist/chunks/voice-CGsMzVaA.js +0 -2
- package/dist/chunks/voiceModeEnabled-DprM_JSH.js +0 -1
- package/dist/chunks/voiceModeEnabled-Dpx-sP8V.js +0 -1
- package/dist/chunks/voiceStreamSTT-CASv4SGl.js +0 -1
- package/dist/chunks/voiceStreamSTT-CaI5Uz-7.js +0 -1
- package/dist/chunks/which-DqSAIvp2.js +0 -1
- package/dist/chunks/windowsPaths-C9CigqoF.js +0 -1
- package/dist/chunks/windowsPaths-swxCp7bX.js +0 -2
- package/dist/chunks/workSecret-mS2OrpxF.js +0 -1
- package/dist/chunks/workerRegistry-CCYrYthd.js +0 -1
- package/dist/chunks/worktree-C9WNXNFR.js +0 -1
- package/dist/chunks/xml-BW5T-oW-.js +0 -1
- /package/dist/chunks/{InProcessTransport-gJLr5CIx.js → InProcessTransport-B0mmAoxw.js} +0 -0
- /package/dist/chunks/{attributionHooks-Br5LZ6bk.js → attributionHooks-DZJjA8p9.js} +0 -0
- /package/dist/chunks/{attributionTrailer-BMTuK4Ax.js → attributionTrailer-CZY9XTcr.js} +0 -0
- /package/dist/chunks/{autoModeDenials-D8eQ1CoM.js → autoModeDenials-CGAtAGGf.js} +0 -0
- /package/dist/chunks/{bedrockClient-Ci523Btx.js → bedrockClient-DZgaJTHp.js} +0 -0
- /package/dist/chunks/{ccshareResume-CqNm2k-J.js → ccshareResume-CZggHNOf.js} +0 -0
- /package/dist/chunks/{connectHeadless-DFCrE6O4.js → connectHeadless-KNT0Sg7Z.js} +0 -0
- /package/dist/chunks/{dangerousBackend-Du0K4q5Z.js → dangerousBackend-ByOAEFld.js} +0 -0
- /package/dist/chunks/{earlyInput-feVuZGzR.js → earlyInput-BFcdUMaX.js} +0 -0
- /package/dist/chunks/{eventLoopStallDetector-XfubcyMN.js → eventLoopStallDetector-l83_98VR.js} +0 -0
- /package/dist/chunks/{fpsMetrics-CEQt6Tk1.js → fpsMetrics-DOI_SIeY.js} +0 -0
- /package/dist/chunks/{fuse-TM-TeOo_.js → fuse-Bp7rmZ5x.js} +0 -0
- /package/dist/chunks/{instinctParser-CJPM8VjX.js → instinctParser-Bxhe2LOF.js} +0 -0
- /package/dist/chunks/{lockfile-Y1hwdHrQ.js → lockfile-CeCEBLtN.js} +0 -0
- /package/dist/chunks/{mobile-umu5P0cM.js → mobile-Cydobb55.js} +0 -0
- /package/dist/chunks/{observationStore-gFvWXJmc.js → observationStore-BaPq7CKI.js} +0 -0
- /package/dist/chunks/{openaiShared-Dy78YERG.js → openaiShared-Crt0cZLO.js} +0 -0
- /package/dist/chunks/{output-style-BmEQscMd.js → output-style-BkOnFmfe.js} +0 -0
- /package/dist/chunks/{parseConnectUrl-C6cvMkkH.js → parseConnectUrl-BFNiff4c.js} +0 -0
- /package/dist/chunks/{poller-Dbo07OEA.js → poller-DADqVTWi.js} +0 -0
- /package/dist/chunks/{postCommitAttribution-DhFkZMxJ.js → postCommitAttribution-CA9Z2sqn.js} +0 -0
- /package/dist/chunks/{projectContext-iWPqcl0Z.js → projectContext-CwJlxP2Y.js} +0 -0
- /package/dist/chunks/{rewind-DAn-nNs-.js → rewind-DTk4TFYB.js} +0 -0
- /package/dist/chunks/{sanitization-JYRkZFrK.js → sanitization-DD414_3t.js} +0 -0
- /package/dist/chunks/{sdkHeapDumpMonitor-DKtfJW5o.js → sdkHeapDumpMonitor-fNRF2fbK.js} +0 -0
- /package/dist/chunks/{server-CswFAYwN.js → server-DTd90dmm.js} +0 -0
- /package/dist/chunks/{serverBanner-CImTYGhY.js → serverBanner-B7UaaCCl.js} +0 -0
- /package/dist/chunks/{serverLog-Bwt7XEmk.js → serverLog-DRvGpDtt.js} +0 -0
- /package/dist/chunks/{sessionDataUploader-CKRXCBxI.js → sessionDataUploader-BDsz_1Uy.js} +0 -0
- /package/dist/chunks/{sessionManager-Ca2O821f.js → sessionManager-Bh-Z-YXy.js} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
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{Tt as re,cn as ie,jr as S,lr as C}from"./state-sIHsFpDu.js";import{Ac as ae,Dr as oe,Pr as se,_c as ce,no as le,oo as ue}from"./paths-DfGsIjPm.js";import{l as de,p as fe}from"./sessionStoragePortable-DJZ_6cL8.js";import{$u as pe,Ep as me,Fr as he,G as ge,Hf as _e,K as ve,Qu as ye,Sr as be,Ta as xe,Tp as Se,Vf as Ce,Xv as we,Yv as Te,Zi as Ee,bD as De,i as Oe,na as ke,o as Ae,wa as je,xD as Me}from"./loadAgentsDir-Br5fGLLI.js";import{Qn as Ne,Zn as Pe}from"./prompt-B8M-HLIS.js";import{o as Fe,t as Ie}from"./fileStateCache-C7-TxF8G.js";import{t as Le}from"./QueryEngine-_re1pGHr.js";import*as w from"node:path";import{dirname as Re}from"node:path";import{randomUUID as ze}from"node:crypto";import{Readable as Be,Writable as Ve}from"node:stream";ne();var T={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`},E={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`},He=x({_meta:m(p(),g()).nullish(),terminal:v().optional().default(!1)}),Ue=x({_meta:m(p(),g()).nullish(),label:p().nullish(),name:p(),optional:v().optional().default(!1),secret:v().optional().default(!0)}),We=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),name:p()}),Ge=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:p(),link:p().nullish(),name:p(),vars:h(Ue)}),Ke=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),description:p().nullish(),env:m(p(),p()).optional(),id:p(),name:p()}),qe=_([Ge.and(x({type:b(`env_var`)})),Ke.and(x({type:b(`terminal`)})),We]),Je=x({_meta:m(p(),g()).nullish(),methodId:p()}),Ye=x({_meta:m(p(),g()).nullish()}),Xe=x({_meta:m(p(),g()).nullish(),blob:p(),mimeType:p().nullish(),uri:p()}),Ze=x({default:v().nullish(),description:p().nullish(),title:p().nullish()}),Qe=x({_meta:m(p(),g()).nullish()}),$e=x({_meta:m(p(),g()).nullish()}),et=x({amount:f(),currency:p()}),tt=x({_meta:m(p(),g()).nullish(),terminalId:p()}),nt=x({_meta:m(p(),g()).nullish(),newText:p(),oldText:p().nullish(),path:p()}),rt=_([p(),f(),f(),v(),h(p())]),it=y(_([x({content:m(p(),rt).nullish()}).and(x({action:b(`accept`)})),x({action:b(`decline`)}),x({action:b(`cancel`)})]),x({_meta:m(p(),g()).nullish()})),at=x({_meta:m(p(),g()).nullish()}),ot=p(),st=x({_meta:m(p(),g()).nullish(),elicitationId:ot}),ct=b(`object`),lt=b(`string`),ut=x({_meta:m(p(),g()).nullish()}),dt=x({_meta:m(p(),g()).nullish(),form:at.nullish(),url:ut.nullish()}),ft=x({const:p(),title:p()}),pt=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),mt=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()}),ht=g(),gt=g(),_t=g(),vt=x({_meta:m(p(),g()).nullish(),readTextFile:v().optional().default(!1),writeTextFile:v().optional().default(!1)}),yt=x({_meta:m(p(),g()).nullish(),name:p(),value:p()}),bt=x({_meta:m(p(),g()).nullish(),name:p(),title:p().nullish(),version:p()}),xt=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),St=x({_meta:m(p(),g()).nullish()}),Ct=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cursor:p().nullish(),cwd:p().nullish()}),wt=x({_meta:m(p(),g()).nullish()}),Tt=x({_meta:m(p(),g()).nullish(),logout:wt.nullish()}),Et=x({_meta:m(p(),g()).nullish()}),Dt=x({_meta:m(p(),g()).nullish()}),Ot=x({_meta:m(p(),g()).nullish(),http:v().optional().default(!1),sse:v().optional().default(!1)}),kt=x({_meta:m(p(),g()).nullish(),headers:h(yt),name:p(),url:p()}),At=x({_meta:m(p(),g()).nullish(),headers:h(yt),name:p(),url:p()}),jt=x({_meta:m(p(),g()).nullish(),args:h(p()),command:p(),env:h(pt),name:p()}),D=_([kt.and(x({type:b(`http`)})),At.and(x({type:b(`sse`)})),jt]),O=p(),Mt=x({_meta:m(p(),g()).nullish(),description:p().nullish(),modelId:O,name:p()}),Nt=_([b(`error`),b(`warning`),b(`information`),b(`hint`)]),Pt=x({_meta:m(p(),g()).nullish()}),Ft=x({_meta:m(p(),g()).nullish()}),It=x({_meta:m(p(),g()).nullish()}),Lt=x({_meta:m(p(),g()).nullish()}),Rt=x({_meta:m(p(),g()).nullish()}),zt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),Bt=x({diff:p(),uri:p()}),Vt=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()}),Ht=x({_meta:m(p(),g()).nullish()}),Ut=x({_meta:m(p(),g()).nullish()}),Wt=x({languageId:p(),text:p(),uri:p()}),Gt=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),Kt=_([b(`rejected`),b(`ignored`),b(`replaced`),b(`cancelled`)]),qt=x({excerpts:h(Vt),uri:p()}),Jt=x({_meta:m(p(),g()).nullish()}),Yt=x({_meta:m(p(),g()).nullish()}),Xt=x({name:p(),owner:p(),remoteUrl:p()}),Zt=x({_meta:m(p(),g()).nullish()}),Qt=x({_meta:m(p(),g()).nullish(),jump:Ht.nullish(),rename:Yt.nullish(),searchAndReplace:Zt.nullish()}),$t=x({id:p(),isRegex:v().nullish(),replace:p(),search:p(),uri:p()}),en=_([b(`automatic`),b(`diagnostic`),b(`manual`)]),tn=x({_meta:m(p(),g()).nullish(),maxCount:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish()}),nn=x({_meta:m(p(),g()).nullish(),diagnostics:Pt.nullish(),editHistory:zt.nullish(),openFiles:Ut.nullish(),recentFiles:Gt.nullish(),relatedSnippets:Jt.nullish(),userActions:tn.nullish()}),rn=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(D)}),an=x({default:f().nullish(),description:p().nullish(),maximum:f().nullish(),minimum:f().nullish(),title:p().nullish()}),on=p(),sn=_([b(`allow_once`),b(`allow_always`),b(`reject_once`),b(`reject_always`)]),cn=x({_meta:m(p(),g()).nullish(),kind:sn,name:p(),optionId:on}),ln=_([b(`high`),b(`medium`),b(`low`)]),un=_([b(`pending`),b(`in_progress`),b(`completed`)]),dn=x({_meta:m(p(),g()).nullish(),content:p(),priority:ln,status:un}),fn=x({_meta:m(p(),g()).nullish(),entries:h(dn)}),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`})}),pn=x({id:p(),position:k,uri:p()}),mn=x({id:p(),newName:p(),position:k,uri:p()}),hn=x({action:p(),position:k,timestampMs:f(),uri:p()}),gn=_([b(`utf-16`),b(`utf-32`),b(`utf-8`)]),_n=x({_meta:m(p(),g()).nullish(),auth:He.optional().default({terminal:!1}),elicitation:dt.nullish(),fs:vt.optional().default({readTextFile:!1,writeTextFile:!1}),nes:Qt.nullish(),positionEncodings:h(gn).optional(),terminal:v().optional().default(!1)}),vn=x({_meta:m(p(),g()).nullish(),audio:v().optional().default(!1),embeddedContext:v().optional().default(!1),image:v().optional().default(!1)}),yn=f().int().gte(0).lte(65535),bn=x({_meta:m(p(),g()).nullish(),clientCapabilities:_n.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:bt.nullish(),protocolVersion:yn}),A=x({end:k,start:k}),xn=x({message:p(),range:A,severity:Nt,uri:p()}),Sn=x({languageId:p(),lastFocusedMs:f().nullish(),uri:p(),visibleRange:A.nullish()}),Cn=x({_meta:m(p(),g()).nullish(),diagnostics:h(xn).nullish(),editHistory:h(Bt).nullish(),openFiles:h(Sn).nullish(),recentFiles:h(Wt).nullish(),relatedSnippets:h(qt).nullish(),userActions:h(hn).nullish()}),wn=x({newText:p(),range:A}),Tn=_([x({cursorPosition:k.nullish(),edits:h(wn),id:p(),uri:p()}).and(x({kind:b(`edit`)})),pn.and(x({kind:b(`jump`)})),mn.and(x({kind:b(`rename`)})),$t.and(x({kind:b(`searchAndReplace`)}))]),En=x({_meta:m(p(),g()).nullish(),content:p()}),Dn=x({_meta:m(p(),g()).nullish()}),j=_([f(),p()]).nullable();x({_meta:m(p(),g()).nullish(),requestId:j});var On=x({requestId:j}),kn=te([`assistant`,`user`]),M=x({_meta:m(p(),g()).nullish(),audience:h(kn).nullish(),lastModified:p().nullish(),priority:f().nullish()}),An=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p()}),jn=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),data:p(),mimeType:p(),uri:p().nullish()}),Mn=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()}),Nn=x({_meta:m(p(),g()).nullish(),optionId:on}),Pn=_([x({outcome:b(`cancelled`)}),Nn.and(x({outcome:b(`selected`)}))]),Fn=x({_meta:m(p(),g()).nullish(),outcome:Pn}),In=x({_meta:m(p(),g()).nullish()}),Ln=x({_meta:m(p(),g()).nullish()}),Rn=x({currentValue:v()}),zn=p(),Bn=p(),Vn=_([b(`mode`),b(`model`),b(`thought_level`),p()]),N=p(),Hn=x({_meta:m(p(),g()).nullish(),description:p().nullish(),name:p(),value:N}),Un=x({_meta:m(p(),g()).nullish(),group:zn,name:p(),options:h(Hn)}),P=y(_([x({currentValue:N,options:_([h(Hn),h(Un)])}).and(x({type:b(`select`)})),Rn.and(x({type:b(`boolean`)}))]),x({_meta:m(p(),g()).nullish(),category:Vn.nullish(),description:p().nullish(),id:Bn,name:p()})),Wn=x({_meta:m(p(),g()).nullish(),configOptions:h(P)}),Gn=x({_meta:m(p(),g()).nullish()}),F=p(),Kn=x({_meta:m(p(),g()).nullish(),id:p(),sessionId:F}),qn=x({_meta:m(p(),g()).nullish(),sessionId:F}),Jn=x({_meta:m(p(),g()).nullish(),sessionId:F}),Yn=x({_meta:m(p(),g()).nullish(),sessionId:F}),Xn=x({_meta:m(p(),g()).nullish(),args:h(p()).optional(),command:p(),cwd:p().nullish(),env:h(pt).optional(),outputByteLimit:f().nullish(),sessionId:F}),Zn=x({_meta:m(p(),g()).nullish(),sessionId:F,uri:p()}),Qn=x({_meta:m(p(),g()).nullish(),position:k,sessionId:F,uri:p(),version:f(),visibleRange:A}),$n=x({_meta:m(p(),g()).nullish(),languageId:p(),sessionId:F,text:p(),uri:p(),version:f()}),er=x({_meta:m(p(),g()).nullish(),sessionId:F,uri:p()}),tr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(D).optional(),sessionId:F}),nr=x({_meta:m(p(),g()).nullish(),sessionId:F,terminalId:p()}),rr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(D),sessionId:F}),ir=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:F}),ar=x({_meta:m(p(),g()).nullish(),id:p(),reason:Kt.nullish(),sessionId:F}),or=x({_meta:m(p(),g()).nullish(),sessionId:F,terminalId:p()}),sr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),mcpServers:h(D).optional(),sessionId:F}),cr=x({_meta:m(p(),g()).nullish(),additionalDirectories:h(p()).optional(),cwd:p(),sessionId:F,title:p().nullish(),updatedAt:p().nullish()}),lr=x({_meta:m(p(),g()).nullish(),nextCursor:p().nullish(),sessions:h(cr)}),ur=x({_meta:m(p(),g()).nullish(),title:p().nullish(),updatedAt:p().nullish()}),dr=x({_meta:m(p(),g()).nullish()}),I=p(),fr=x({_meta:m(p(),g()).nullish(),currentModeId:I}),pr=x({_meta:m(p(),g()).nullish(),description:p().nullish(),id:I,name:p()}),L=x({_meta:m(p(),g()).nullish(),availableModes:h(pr),currentModeId:I}),R=x({_meta:m(p(),g()).nullish(),availableModels:h(Mt),currentModelId:O}),mr=x({_meta:m(p(),g()).nullish(),configOptions:h(P).nullish(),models:R.nullish(),modes:L.nullish(),sessionId:F}),hr=x({_meta:m(p(),g()).nullish(),configOptions:h(P).nullish(),models:R.nullish(),modes:L.nullish()}),gr=x({_meta:m(p(),g()).nullish(),configOptions:h(P).nullish(),models:R.nullish(),modes:L.nullish(),sessionId:F}),_r=x({_meta:m(p(),g()).nullish(),configOptions:h(P).nullish(),models:R.nullish(),modes:L.nullish()}),vr=x({_meta:m(p(),g()).nullish()}),yr=x({_meta:m(p(),g()).nullish(),additionalDirectories:In.nullish(),close:Ln.nullish(),fork:Gn.nullish(),list:dr.nullish(),resume:vr.nullish()}),br=y(_([x({type:b(`boolean`),value:v()}),x({value:N})]),x({_meta:m(p(),g()).nullish(),configId:Bn,sessionId:F})),xr=x({_meta:m(p(),g()).nullish(),configOptions:h(P)}),Sr=x({_meta:m(p(),g()).nullish(),modeId:I,sessionId:F}),Cr=x({_meta:m(p(),g()).nullish()}),wr=x({_meta:m(p(),g()).nullish(),modelId:O,sessionId:F}),Tr=x({_meta:m(p(),g()).nullish()}),Er=x({_meta:m(p(),g()).nullish(),sessionId:F}),Dr=_([b(`end_turn`),b(`max_tokens`),b(`max_turn_requests`),b(`refusal`),b(`cancelled`)]),Or=_([b(`email`),b(`uri`),b(`date`),b(`date-time`)]),kr=x({default:p().nullish(),description:p().nullish(),enum:h(p()).nullish(),format:Or.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(ft).nullish(),pattern:p().nullish(),title:p().nullish()}),Ar=x({_meta:m(p(),g()).nullish(),context:Cn.nullish(),position:k,selection:A.nullish(),sessionId:F,triggerKind:en,uri:p(),version:f()}),jr=x({_meta:m(p(),g()).nullish(),suggestions:h(Tn)}),Mr=x({_meta:m(p(),g()).nullish(),terminalId:p()}),Nr=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()}),Pr=x({_meta:m(p(),g()).nullish(),sessionId:F,terminalId:p()}),Fr=x({_meta:m(p(),g()).nullish(),exitStatus:Nr.nullish(),output:p(),truncated:v()}),Ir=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),text:p()}),Lr=x({range:A.nullish(),text:p()}),Rr=x({_meta:m(p(),g()).nullish(),contentChanges:h(Lr),sessionId:F,uri:p(),version:f()});x({method:p(),params:_([qn,$n,Rr,Zn,er,Qn,Kn,ar,ht]).nullish()});var zr=_([b(`full`),b(`incremental`)]),Br=x({_meta:m(p(),g()).nullish(),syncKind:zr}),Vr=x({_meta:m(p(),g()).nullish(),didChange:Br.nullish(),didClose:Ft.nullish(),didFocus:It.nullish(),didOpen:Lt.nullish(),didSave:Rt.nullish()}),Hr=x({_meta:m(p(),g()).nullish(),document:Vr.nullish()}),Ur=x({_meta:m(p(),g()).nullish(),context:nn.nullish(),events:Hr.nullish()}),Wr=x({_meta:m(p(),g()).nullish(),auth:Tt.optional().default({}),loadSession:v().optional().default(!1),mcpCapabilities:Ot.optional().default({http:!1,sse:!1}),nes:Ur.nullish(),positionEncoding:gn.nullish(),promptCapabilities:vn.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:yr.optional().default({})}),Gr=x({_meta:m(p(),g()).nullish(),agentCapabilities:Wr.optional().default({auth:{},loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:bt.nullish(),authMethods:h(qe).optional().default([]),protocolVersion:yn}),Kr=_([x({_meta:m(p(),g()).nullish(),mimeType:p().nullish(),text:p(),uri:p()}),Xe]),qr=x({_meta:m(p(),g()).nullish(),annotations:M.nullish(),resource:Kr}),z=_([Ir.and(x({type:b(`text`)})),jn.and(x({type:b(`image`)})),An.and(x({type:b(`audio`)})),Mn.and(x({type:b(`resource_link`)})),qr.and(x({type:b(`resource`)}))]),Jr=x({_meta:m(p(),g()).nullish(),content:z}),B=x({_meta:m(p(),g()).nullish(),content:z,messageId:p().nullish()}),Yr=x({_meta:m(p(),g()).nullish(),messageId:p().nullish(),prompt:h(z),sessionId:F}),Xr=x({anyOf:h(ft)}),Zr=_([Jr.and(x({type:b(`content`)})),nt.and(x({type:b(`diff`)})),Mr.and(x({type:b(`terminal`)}))]),V=p(),Qr=x({sessionId:F,toolCallId:V.nullish()}),$r=y(_([Qr,On]),x({elicitationId:ot,url:p().url()})),ei=x({_meta:m(p(),g()).nullish(),line:f().int().gte(0).max(4294967295,{message:`Invalid value: Expected uint32 to be <= 4294967295`}).nullish(),path:p()}),ti=_([b(`pending`),b(`in_progress`),b(`completed`),b(`failed`)]),ni=_([b(`read`),b(`edit`),b(`delete`),b(`move`),b(`search`),b(`execute`),b(`think`),b(`fetch`),b(`switch_mode`),b(`other`)]),ri=x({_meta:m(p(),g()).nullish(),content:h(Zr).optional(),kind:ni.optional(),locations:h(ei).optional(),rawInput:g().optional(),rawOutput:g().optional(),status:ti.optional(),title:p(),toolCallId:V}),ii=x({_meta:m(p(),g()).nullish(),content:h(Zr).nullish(),kind:ni.nullish(),locations:h(ei).nullish(),rawInput:g().optional(),rawOutput:g().optional(),status:ti.nullish(),title:p().nullish(),toolCallId:V}),ai=x({_meta:m(p(),g()).nullish(),options:h(cn),sessionId:F,toolCall:ii}),oi=x({_meta:m(p(),g()).nullish(),hint:p()}),si=x({_meta:m(p(),g()).nullish(),description:p(),input:oi.nullish(),name:p()}),ci=x({_meta:m(p(),g()).nullish(),availableCommands:h(si)}),li=_([x({enum:h(p()),type:lt}),Xr]),ui=x({default:h(p()).nullish(),description:p().nullish(),items:li,maxItems:f().nullish(),minItems:f().nullish(),title:p().nullish()}),di=_([kr.and(x({type:b(`string`)})),an.and(x({type:b(`number`)})),xt.and(x({type:b(`integer`)})),Ze.and(x({type:b(`boolean`)})),ui.and(x({type:b(`array`)}))]),fi=x({description:p().nullish(),properties:m(p(),di).optional().default({}),required:h(p()).nullish(),title:p().nullish(),type:ct.optional().default(`object`)}),pi=y(_([y(_([Qr,On]),x({requestedSchema:fi})).and(x({mode:b(`form`)})),$r.and(x({mode:b(`url`)}))]),x({_meta:m(p(),g()).nullish(),message:p()})),mi=x({cachedReadTokens:f().nullish(),cachedWriteTokens:f().nullish(),inputTokens:f(),outputTokens:f(),thoughtTokens:f().nullish(),totalTokens:f()});_([x({id:j,result:_([Gr,Ye,Dt,gr,hr,lr,mr,_r,$e,Cr,xr,x({_meta:m(p(),g()).nullish(),stopReason:Dr,usage:mi.nullish(),userMessageId:p().nullish()}),Tr,Er,jr,Qe,_t])}),x({error:mt,id:j})]);var hi=x({_meta:m(p(),g()).nullish(),cost:et.nullish(),size:f(),used:f()}),gi=_([B.and(x({sessionUpdate:b(`user_message_chunk`)})),B.and(x({sessionUpdate:b(`agent_message_chunk`)})),B.and(x({sessionUpdate:b(`agent_thought_chunk`)})),ri.and(x({sessionUpdate:b(`tool_call`)})),ii.and(x({sessionUpdate:b(`tool_call_update`)})),fn.and(x({sessionUpdate:b(`plan`)})),ci.and(x({sessionUpdate:b(`available_commands_update`)})),fr.and(x({sessionUpdate:b(`current_mode_update`)})),Wn.and(x({sessionUpdate:b(`config_option_update`)})),ur.and(x({sessionUpdate:b(`session_info_update`)})),hi.and(x({sessionUpdate:b(`usage_update`)}))]),_i=x({_meta:m(p(),g()).nullish(),sessionId:F,update:gi});x({method:p(),params:_([_i,st,ht]).nullish()});var vi=x({_meta:m(p(),g()).nullish(),sessionId:F,terminalId:p()}),yi=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()}),bi=x({name:p(),uri:p()}),xi=x({_meta:m(p(),g()).nullish(),repository:Xt.nullish(),workspaceFolders:h(bi).nullish(),workspaceUri:p().nullish()});x({id:j,method:p(),params:_([bn,Je,Et,rn,rr,Ct,tr,sr,Yn,Sr,br,Yr,wr,xi,Ar,Jn,gt]).nullish()});var Si=x({_meta:m(p(),g()).nullish(),content:p(),path:p(),sessionId:F});x({id:j,method:p(),params:_([Si,ir,ai,Xn,Pr,or,vi,nr,pi,gt]).nullish()}),_([x({id:j,result:_([x({_meta:m(p(),g()).nullish()}),En,Fn,tt,Fr,Dn,yi,St,it,_t])}),x({error:mt,id:j})]),e(),d(),r(),s(),i(),o();function Ci(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
|
+
`);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 wi,H=new WeakMap,Ti=class{constructor(e,t){l(this,H,void 0);let n=e(this);u(H,this,new ji(async(e,t)=>{switch(e){case T.initialize:{let e=bn.parse(t);return n.initialize(e)}case T.session_new:{let e=rn.parse(t);return n.newSession(e)}case T.session_load:{if(!n.loadSession)throw Z.methodNotFound(e);let r=rr.parse(t);return n.loadSession(r)}case T.session_list:{if(!n.listSessions)throw Z.methodNotFound(e);let r=Ct.parse(t);return n.listSessions(r)}case T.session_fork:{if(!n.unstable_forkSession)throw Z.methodNotFound(e);let r=tr.parse(t);return n.unstable_forkSession(r)}case T.session_resume:{if(!n.unstable_resumeSession)throw Z.methodNotFound(e);let r=sr.parse(t);return n.unstable_resumeSession(r)}case T.session_close:{if(!n.unstable_closeSession)throw Z.methodNotFound(e);let r=Yn.parse(t);return n.unstable_closeSession(r)}case T.session_set_mode:{if(!n.setSessionMode)throw Z.methodNotFound(e);let r=Sr.parse(t);return await n.setSessionMode(r)??{}}case T.authenticate:{let e=Je.parse(t);return await n.authenticate(e)??{}}case T.logout:{if(!n.unstable_logout)throw Z.methodNotFound(e);let r=Et.parse(t);return await n.unstable_logout(r)??{}}case T.session_prompt:{let e=Yr.parse(t);return n.prompt(e)}case T.session_set_model:{if(!n.unstable_setSessionModel)throw Z.methodNotFound(e);let r=wr.parse(t);return await n.unstable_setSessionModel(r)??{}}case T.session_set_config_option:{if(!n.setSessionConfigOption)throw Z.methodNotFound(e);let r=br.parse(t);return n.setSessionConfigOption(r)}case T.nes_start:{if(!n.unstable_startNes)throw Z.methodNotFound(e);let r=xi.parse(t);return n.unstable_startNes(r)}case T.nes_suggest:{if(!n.unstable_suggestNes)throw Z.methodNotFound(e);let r=Ar.parse(t);return n.unstable_suggestNes(r)}case T.nes_close:{if(!n.unstable_closeNes)throw Z.methodNotFound(e);let r=Jn.parse(t);return await n.unstable_closeNes(r)??{}}default:if(n.extMethod)return n.extMethod(e,t);throw Z.methodNotFound(e)}},async(e,t)=>{switch(e){case T.session_cancel:{let e=qn.parse(t);return n.cancel(e)}case T.document_did_open:{if(!n.unstable_didOpenDocument)return;let e=$n.parse(t);return n.unstable_didOpenDocument(e)}case T.document_did_change:{if(!n.unstable_didChangeDocument)return;let e=Rr.parse(t);return n.unstable_didChangeDocument(e)}case T.document_did_close:{if(!n.unstable_didCloseDocument)return;let e=Zn.parse(t);return n.unstable_didCloseDocument(e)}case T.document_did_save:{if(!n.unstable_didSaveDocument)return;let e=er.parse(t);return n.unstable_didSaveDocument(e)}case T.document_did_focus:{if(!n.unstable_didFocusDocument)return;let e=Qn.parse(t);return n.unstable_didFocusDocument(e)}case T.nes_accept:{if(!n.unstable_acceptNes)return;let e=Kn.parse(t);return n.unstable_acceptNes(e)}case T.nes_reject:{if(!n.unstable_rejectNes)return;let e=ar.parse(t);return n.unstable_rejectNes(e)}default:if(n.extNotification)return n.extNotification(e,t);throw Z.methodNotFound(e)}},t))}async sessionUpdate(e){return await c(H,this).sendNotification(E.session_update,e)}async requestPermission(e){return await c(H,this).sendRequest(E.session_request_permission,e)}async readTextFile(e){return await c(H,this).sendRequest(E.fs_read_text_file,e)}async writeTextFile(e){return await c(H,this).sendRequest(E.fs_write_text_file,e)??{}}async createTerminal(e){return new Ei((await c(H,this).sendRequest(E.terminal_create,e)).terminalId,e.sessionId,c(H,this))}async unstable_createElicitation(e){return await c(H,this).sendRequest(E.elicitation_create,e)}async unstable_completeElicitation(e){return await c(H,this).sendNotification(E.elicitation_complete,e)}async extMethod(e,t){return await c(H,this).sendRequest(e,t)}async extNotification(e,t){return await c(H,this).sendNotification(e,t)}get signal(){return c(H,this).signal}get closed(){return c(H,this).closed}},U=new WeakMap,W=new WeakMap;wi=Symbol.asyncDispose;var Ei=class{constructor(e,n,r){t(this,`id`,void 0),l(this,U,void 0),l(this,W,void 0),this.id=e,u(U,this,n),u(W,this,r)}async currentOutput(){return await c(W,this).sendRequest(E.terminal_output,{sessionId:c(U,this),terminalId:this.id})}async waitForExit(){return await c(W,this).sendRequest(E.terminal_wait_for_exit,{sessionId:c(U,this),terminalId:this.id})}async kill(){return await c(W,this).sendRequest(E.terminal_kill,{sessionId:c(U,this),terminalId:this.id})??{}}async release(){return await c(W,this).sendRequest(E.terminal_release,{sessionId:c(U,this),terminalId:this.id})??{}}async[wi](){await this.release()}},G=new WeakMap,Di=new WeakMap,Oi=new WeakMap,ki=new WeakMap,K=new WeakMap,q=new WeakMap,J=new WeakMap,Ai=new WeakMap,Y=new WeakSet,ji=class{constructor(e,t,r){a(this,Y),l(this,G,new Map),l(this,Di,0),l(this,Oi,void 0),l(this,ki,void 0),l(this,K,void 0),l(this,q,Promise.resolve()),l(this,J,new AbortController),l(this,Ai,void 0),u(Oi,this,e),u(ki,this,t),u(K,this,r),u(Ai,this,new Promise(e=>{c(J,this).signal.addEventListener(`abort`,()=>e())})),n(Y,this,Mi).call(this)}get signal(){return c(J,this).signal}get closed(){return c(Ai,this)}async sendRequest(e,t){var r,i;n(Y,this,Ri).call(this);let a=(u(Di,this,(r=c(Di,this),i=r++,r)),i),o=new Promise((e,t)=>{c(G,this).set(a,{resolve:e,reject:t})});return await n(Y,this,X).call(this,{jsonrpc:`2.0`,id:a,method:e,params:t}),o}async sendNotification(e,t){n(Y,this,Ri).call(this),await n(Y,this,X).call(this,{jsonrpc:`2.0`,method:e,params:t})}};async function Mi(){let e;try{let e=c(K,this).readable.getReader();try{for(;!c(J,this).signal.aborted;){let{value:t,done:r}=await e.read();if(r)break;if(t)try{n(Y,this,Pi).call(this,t)}catch(e){console.error(`Unexpected error during message processing:`,t,e),`id`in t&&t.id!==void 0&&n(Y,this,X).call(this,{jsonrpc:`2.0`,id:t.id,error:{code:-32700,message:`Parse error`}})}}}finally{e.releaseLock()}}catch(t){e=t}finally{n(Y,this,Ni).call(this,e)}}function Ni(e){if(c(J,this).signal.aborted)return;let t=e??Error(`ACP connection closed`);for(let e of c(G,this).values())e.reject(t);c(G,this).clear(),c(J,this).abort(t)}async function Pi(e){if(`method`in e&&`id`in e){let t=await n(Y,this,Fi).call(this,e.method,e.params);`error`in t&&console.error(`Error handling request`,e,t.error),await n(Y,this,X).call(this,{jsonrpc:`2.0`,id:e.id,...t})}else if(`method`in e){let t=await n(Y,this,Ii).call(this,e.method,e.params);`error`in t&&console.error(`Error handling notification`,e,t.error)}else `id`in e?n(Y,this,Li).call(this,e):console.error(`Invalid message`,{message:e})}async function Fi(e,t){try{return{result:await c(Oi,this).call(this,e,t)??null}}catch(e){if(e instanceof Z)return e.toResult();if(e instanceof ee)return Z.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 Z.internalError(t?JSON.parse(t):{}).toResult()}catch{return Z.internalError({details:t}).toResult()}}}async function Ii(e,t){try{return await c(ki,this).call(this,e,t),{result:null}}catch(e){if(e instanceof Z)return e.toResult();if(e instanceof ee)return Z.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 Z.internalError(t?JSON.parse(t):{}).toResult()}catch{return Z.internalError({details:t}).toResult()}}}function Li(e){let t=c(G,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 Z(n,r,i))}c(G,this).delete(e.id)}else console.error(`Got response to unknown request`,e.id)}function Ri(){if(c(J,this).signal.aborted)throw c(J,this).signal.reason??Error(`ACP connection closed`)}async function X(e){return u(q,this,c(q,this).then(async()=>{let t=c(K,this).writable.getWriter();try{await t.write(e)}finally{t.releaseLock()}}).catch(e=>{n(Y,this,Ni).call(this,e)})),c(q,this)}var Z=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}}};ie(),de(),ae(),ue(),Ne(),Fe(),Me(),we(),pe(),ke(),he(),ve(),Ae();var zi=!(typeof process.geteuid==`function`?process.geteuid()===0:typeof process.getuid==`function`&&process.getuid()===0)||!!process.env.IS_SANDBOX,Bi={auto:`auto`,default:`default`,acceptedits:`acceptEdits`,dontask:`dontAsk`,plan:`plan`,bypasspermissions:`bypassPermissions`,bypass:`bypassPermissions`};function Vi(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=Bi[n];if(!r)throw Error(`Invalid ${t}: ${e}.`);if(r===`bypassPermissions`&&!zi)throw Error(`Invalid ${t}: bypassPermissions is not available when running as root.`);return r}function Hi(e){let t=[...e.mcpServers??[]].sort((e,t)=>e.name.localeCompare(t.name));return JSON.stringify({cwd:e.cwd,mcpServers:t})}var Ui=256;function Wi(e){let t=e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim();return t.length<=Ui?t:t.slice(0,Ui-1)+`…`}function Gi(e,t){if(!t)return e;let n=w.resolve(t),r=w.resolve(e);return r.startsWith(n+w.sep)||r===n?w.relative(n,r).replaceAll(`\\`,`/`):e}function Ki(e){let t="```";for(let n of e.matchAll(/^```+/gm)??[])for(;n[0].length>=t.length;)t+="`";return t+`
|
|
4
|
+
`+e+(e.endsWith(`
|
|
5
|
+
`)?``:`
|
|
6
|
+
`)+t}var qi=console;function Q(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 n=i?.command??`Terminal`,r=i?.description;return{title:n,kind:`execute`,content:t?[{type:`terminal`,terminalId:e.id}]:r?[{type:`content`,content:{type:`text`,text:r}}]:[]}}case`Read`:{let e=i?.file_path??`File`,t=i?.offset,r=i?.limit,a=``;return r&&r>0?a=` (${t??1} - ${(t??1)+r-1})`:t&&(a=` (from line ${t})`),{title:`Read ${e?Gi(e,n):`File`}${a}`,kind:`read`,locations:e?[{path:e,line:t??1}]:[],content:[]}}case`Write`:{let e=i?.file_path??``,t=i?.content??``,r=e?Gi(e,n):void 0;return{title:r?`Write ${r}`:`Write`,kind:`edit`,content:e?[{type:`diff`,path:e,oldText:null,newText:t}]:[{type:`content`,content:{type:`text`,text:t}}],locations:e?[{path:e}]:[]}}case`Edit`:{let e=i?.file_path??``,t=i?.old_string??``,r=i?.new_string??``,a=e?Gi(e,n):void 0;return{title:a?`Edit ${a}`:`Edit`,kind:`edit`,content:e?[{type:`diff`,path:e,oldText:t||null,newText:r}]:[],locations:e?[{path:e}]:[]}}case`Glob`:{let e=i?.path??``,t=i?.pattern??``,n=`Find`;return e&&(n+=` \`${e}\``),t&&(n+=` \`${t}\``),{title:n,kind:`search`,content:[],locations:e?[{path:e}]:[]}}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 Ji(e,t,n=!1){if(!t)return{};let r=e.is_error===!0,i=e.content;if(r&&i)return Yi(i,!0);switch(t.name){case`Read`:return typeof i==`string`&&i.length>0?{content:[{type:`content`,content:{type:`text`,text:Ki(i)}}]}:Array.isArray(i)&&i.length>0?{content:i.map(e=>({type:`content`,content:e.type===`text`?{type:`text`,text:Ki(e.text)}:Xi(e,!1)}))}:{};case`Bash`:{let e=``,a=+!!r,o=String(t.id);if(i&&typeof i==`object`&&!Array.isArray(i)&&i.type===`bash_code_execution_result`){let t=i;e=[t.stdout,t.stderr].filter(Boolean).join(`
|
|
7
|
+
`),a=t.return_code??+!!r}else typeof i==`string`?e=i:Array.isArray(i)&&i.length>0&&(e=i.map(e=>e.type===`text`?e.text:``).join(`
|
|
8
|
+
`));return n?{content:[{type:`terminal`,terminalId:o}],_meta:{terminal_info:{terminal_id:o},terminal_output:{terminal_id:o,data:e},terminal_exit:{terminal_id:o,exit_code:a,signal:null}}}:e.trim()?{content:[{type:`content`,content:{type:`text`,text:`\`\`\`console\n${e.trimEnd()}\n\`\`\``}}]}:{}}case`Edit`:case`Write`:return{};case`ExitPlanMode`:return{title:`Exited Plan Mode`};default:return Yi(i??``,r)}}function Yi(e,t){return Array.isArray(e)&&e.length>0?{content:e.map(e=>({type:`content`,content:Xi(e,t)}))}:typeof e==`string`&&e.length>0?{content:[{type:`content`,content:{type:`text`,text:t?`\`\`\`\n${e}\n\`\`\``:e}}]}:{}}function Xi(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`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(`
|
|
9
|
+
`)||``)}case`text_editor_code_execution_tool_result_error`:return n(`Error: ${e.error_code}${e.error_message?` - ${e.error_message}`:``}`);default:try{return{type:`text`,text:JSON.stringify(e)}}catch{return{type:`text`,text:`[content]`}}}}function Zi(e,t){if(t.aborted)return Promise.resolve({done:!0,value:void 0});let n,r=new Promise(e=>{n=()=>e({done:!0,value:void 0}),t.addEventListener(`abort`,n,{once:!0})});return Promise.race([e.next(),r]).finally(()=>{n&&t.removeEventListener(`abort`,n)})}async function Qi(e,t,n,r,i,a,o,s){let c=`end_turn`,l={inputTokens:0,outputTokens:0,cachedReadTokens:0,cachedWriteTokens:0},u=null,d=null,f=2e5,p=!1;try{for(;!r.aborted;){let s=await Zi(t,r);if(s.done||r.aborted)break;let m=s.value;if(m==null)continue;let h=m;switch(h.type){case`system`:h.subtype===`compact_boundary`&&(u=0,await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`usage_update`,used:0,size:f}}),await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:`
|
|
10
|
+
|
|
11
|
+
Compacting completed.`}}}));break;case`result`:{let t=h.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=h.modelUsage;if(i&&d){let e=ia(i,d);e?.contextWindow&&(f=e.contextWindow)}let a=u??l.inputTokens+l.outputTokens+l.cachedReadTokens+l.cachedWriteTokens,o=h.total_cost_usd;await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`usage_update`,used:a,size:f,cost:o==null?void 0:{amount:o,currency:`USD`}}});let s=h.subtype,p=h.is_error;if(r.aborted){c=`cancelled`;break}switch(s){case`success`:h.stop_reason===`max_tokens`&&(c=`max_tokens`),p&&(c=`end_turn`);break;case`error_during_execution`:c=h.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=ea(h,e,i,n,{clientCapabilities:a,cwd:o});for(let e of t)await n.sessionUpdate(e);p=!0;break}case`assistant`:{let t=h.message,r=h.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=$i(h,e,i,n,{clientCapabilities:a,cwd:o,parentToolUseId:r,streamingActive:p});for(let e of s)await n.sessionUpdate(e);break}case`user`:break;case`progress`:{let t=h.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:`usage_update`,used:0,size:f}}),await n.sessionUpdate({sessionId:e,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:`
|
|
12
|
+
|
|
13
|
+
Compacting completed.`}}});break;default:qi.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}}function $i(e,t,n,r,i){let a=e.message;if(!a)return[];let o=a.content;if(!o)return[];if(typeof o==`string`)return[{sessionId:t,update:{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:o}}}];let s=i?.streamingActive?o.filter(e=>e.type!==`text`&&e.type!==`thinking`):o;return s.length===0?[]:$(s,`assistant`,t,n,r,void 0,i)}function ea(e,t,n,r,i){let a=e.event;if(!a)return[];switch(a.type){case`content_block_start`:{let o=a.content_block;return o?$([o],`assistant`,t,n,r,void 0,{clientCapabilities:i?.clientCapabilities,parentToolUseId:e.parent_tool_use_id,cwd:i?.cwd}):[]}case`content_block_delta`:{let o=a.delta;return o?$([o],`assistant`,t,n,r,void 0,{clientCapabilities:i?.clientCapabilities,parentToolUseId:e.parent_tool_use_id,cwd:i?.cwd}):[]}case`message_start`:case`message_delta`:case`message_stop`:case`content_block_stop`:return[];default:return[]}}function $(e,t,n,r,i,a,o){let s=[];for(let i of e){let e=i.type,a=null;switch(e){case`text`:case`text_delta`:{let e=i.text??``;a={sessionUpdate:t===`assistant`?`agent_message_chunk`:`user_message_chunk`,content:{type:`text`,text:e}};break}case`thinking`:case`thinking_delta`:a={sessionUpdate:`agent_thought_chunk`,content:{type:`text`,text:i.thinking??``}};break;case`image`:{let e=i.source;e?.type===`base64`&&(a={sessionUpdate:t===`assistant`?`agent_message_chunk`:`user_message_chunk`,content:{type:`image`,data:e.data,mimeType:e.media_type}});break}case`tool_use`:case`server_tool_use`:case`mcp_tool_use`:{let t=i.id??``,n=i.name??`unknown`,s=i.input,c=t in r;if(r[t]={type:e,id:t,name:n,input:s},n===`TodoWrite`){let e=s?.todos;Array.isArray(e)&&(a={sessionUpdate:`plan`,entries:e.map(e=>({content:e.content,status:ta(e.status),priority:`medium`}))})}else{let e=s?{...s}:{};a=c?{_meta:{claudeCode:{toolName:n}},toolCallId:t,sessionUpdate:`tool_call_update`,rawInput:e,...Q({name:n,id:t,input:s??{}},!1,o?.cwd)}:{_meta:{claudeCode:{toolName:n}},toolCallId:t,sessionUpdate:`tool_call`,rawInput:e,status:`pending`,...Q({name:n,id:t,input:s??{}},!1,o?.cwd)}}break}case`tool_result`:case`mcp_tool_result`:{let e=i.tool_use_id??``,t=r[e];if(!t)break;if(t.name!==`TodoWrite`){let n=Ji(i,{name:t.name,id:t.id},!1);a={_meta:{claudeCode:{toolName:t.name}},toolCallId:e,sessionUpdate:`tool_call_update`,status:i.is_error===!0?`failed`:`completed`,rawOutput:i.content,...n}}break}case`redacted_thinking`:case`input_json_delta`:case`citations_delta`:case`signature_delta`:case`container_upload`:case`compaction`:case`compaction_delta`:break}if(a){if(o?.parentToolUseId){let e=a._meta;a._meta={...e,claudeCode:{...e?.claudeCode??{},parentToolUseId:o.parentToolUseId}}}s.push({sessionId:n,update:a})}}return s}function ta(e){return e===`in_progress`?`in_progress`:e===`completed`?`completed`:`pending`}async function na(e,t,n,r,i,a){for(let o of t){let t=o;if(t.type!==`user`&&t.type!==`assistant`){qi.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;await n.sessionUpdate({sessionId:e,update:{sessionUpdate:c===`assistant`?`agent_message_chunk`:`user_message_chunk`,content:{type:`text`,text:s}}});continue}if(Array.isArray(s)){let t=$(s,c,e,r,n,void 0,{clientCapabilities:i,cwd:a});for(let e of t)await n.sessionUpdate(e)}}}function ra(e,t){let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;return n}function ia(e,t){let n=null,r=0;for(let i of Object.keys(e)){let e=ra(i,t);e>r&&(r=e,n=i)}return n?e[n]??null:null}function aa(e,t,n,r,i,a,o){return async(n,s,c,l,u,d)=>{let f=sa(r);if(n.name===`ExitPlanMode`)return oa(e,t,u,s,f,i,a,o);if(d!==void 0)return d;try{let e=await ge(n,s,c,l,u);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:u}}let p=Q({name:n.name,id:u,input:s},f,i),m={toolCallId:u,title:p.title,kind:p.kind,status:`pending`,rawInput:s},h=[{kind:`allow_always`,name:`Always Allow`,optionId:`allow_always`},{kind:`allow_once`,name:`Allow`,optionId:`allow`},{kind:`reject_once`,name:`Reject`,optionId:`reject`}];try{let n=await e.requestPermission({sessionId:t,toolCall:m,options:h});if(n.outcome.outcome===`cancelled`)return{behavior:`deny`,message:`Permission request cancelled by client`,decisionReason:{type:`mode`,mode:`default`}};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:s}}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 oa(e,t,n,r,i,a,o,s){let c=[{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&&c.unshift({kind:`allow_always`,name:`Yes, and bypass permissions`,optionId:`bypassPermissions`});let l=Q({name:`ExitPlanMode`,id:n,input:r},i,a),u={toolCallId:n,title:l.title,kind:l.kind,status:`pending`,rawInput:r},d=await e.requestPermission({sessionId:t,toolCall:u,options:c});if(d.outcome.outcome===`cancelled`)return{behavior:`deny`,message:`Tool use aborted`,decisionReason:{type:`mode`,mode:`default`}};if(d.outcome.outcome===`selected`&&`optionId`in d.outcome&&d.outcome.optionId!==void 0){let n=d.outcome.optionId;if(c.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 sa(e){if(!e)return!1;let t=e._meta;return!t||typeof t!=`object`?!1:t.terminal_output===!0}function ca(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(la(n,r))}else if(e.type===`resource`){let n=e.resource;n&&typeof n.text==`string`&&t.push(n.text)}}return t.filter(e=>e.length>0).join(`
|
|
14
|
+
`)}function la(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`}Se(),se(),_e(),e();var ua=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,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}},promptCapabilities:{image:!0,embeddedContext:!0},mcpCapabilities:{http:!0,sse:!0},loadSession:!0,sessionCapabilities:{fork:{},list:{},resume:{},close:{}}}}}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);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async loadSession(e){let t=await this.getOrCreateSession(e);return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async listSessions(e){let t=await me({dir:e.cwd??void 0,limit:100}),n=[];for(let e of t)e.cwd&&n.push({sessionId:e.sessionId,cwd:e.cwd,title:Wi(e.summary??``),updatedAt:new Date(e.lastModified).toISOString()});return{sessions:n}}async unstable_forkSession(e){let t=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta});return this.scheduleAvailableCommandsUpdate(t.sessionId),t}async unstable_closeSession(e){if(!this.sessions.get(e.sessionId))throw Error(`Session not found`);return await this.teardownSession(e.sessionId),{}}async prompt(e){let t=this.sessions.get(e.sessionId);if(!t)throw Error(`Session ${e.sessionId} not found`);let n=ca(e.prompt);if(!n.trim())return{stopReason:`end_turn`};let r=t.cancelGeneration;if(t.promptRunning){let e=ze();if(await new Promise(n=>{t.pendingQueue.push(e),t.pendingMessages.set(e,{resolve:n})}))return{stopReason:`cancelled`}}if(t.cancelGeneration!==r)return{stopReason:`cancelled`};t.cancelled=!1,t.promptRunning=!0;try{t.queryEngine.resetAbortController(),S(e.sessionId,re());let r=t.queryEngine.submitMessage(n),{stopReason:i,usage:a}=await Qi(e.sessionId,r,this.conn,t.queryEngine.getAbortSignal(),t.toolUseCache,this.clientCapabilities,t.cwd,()=>t.cancelled);return t.cancelled?{stopReason:`cancelled`}:{stopReason:i,usage:a?{inputTokens:a.inputTokens,outputTokens:a.outputTokens,cachedReadTokens:a.cachedReadTokens,cachedWriteTokens:a.cachedWriteTokens,totalTokens:a.inputTokens+a.outputTokens+a.cachedReadTokens+a.cachedWriteTokens}:void 0}}catch(n){if(t.cancelled)return{stopReason:`cancelled`};throw n instanceof Error&&(n.message.includes(`terminated`)||n.message.includes(`process exited`))?(this.teardownSession(e.sessionId),Error(`The Claude Agent process exited unexpectedly. Please start a new session.`)):n}finally{let e=Sa(t);e?(t.promptRunning=!0,e.resolve(!1)):t.promptRunning=!1}}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.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 setSessionConfigOption(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)}`);if(!t.configOptions.find(t=>t.id===e.configId))throw Error(`Unknown config option: ${e.configId}`);let n=e.value;return e.configId===`mode`?(this.applySessionMode(e.sessionId,n),await this.conn.sessionUpdate({sessionId:e.sessionId,update:{sessionUpdate:`current_mode_update`,currentModeId:n}})):e.configId===`model`&&t.queryEngine.setModel(n),this.syncSessionConfigState(t,e.configId,n),t.configOptions=t.configOptions.map(t=>t.id===e.configId&&typeof t.currentValue==`string`?{...t,currentValue:n}:t),{configOptions:t.configOptions}}async createSession(e,t={}){ce();let n=t.sessionId??ze(),r=e.cwd;S(n,re()),C(r);let i=process.cwd(),a=!1;try{process.chdir(r),a=!0}catch{}try{let i=Pe(),a=ye(i),o=e._meta,s=ga(o,`permissionMode`),c=s?o?.permissionMode:void 0,l=this.getSetting(`permissions.defaultMode`),u=pa(c,s,l),d=aa(this.conn,n,()=>this.sessions.get(n)?.modes.currentModeId??`default`,this.clientCapabilities,r,e=>{this.applySessionMode(n,e)},()=>this.sessions.get(n)?.appState.toolPermissionContext.isBypassPermissionsModeAvailable??!1),f=_a(l),p={...De(),toolPermissionContext:{...i,mode:u,isBypassPermissionsModeAvailable:f}},[m,h]=await Promise.all([Ee(r),Oe(r)]);p.agentDefinitions=h;let g=new Le({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 Ie(500,50*1024*1024),includePartialMessages:!0,replayUserMessages:!0,initialMessages:t.initialMessages}),_={currentModeId:u,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=Ce(),v=oe(),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=wa(_,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:this.clientCapabilities,appState:p,commands:m,sessionFingerprint:Hi({cwd:r,mcpServers:e.mcpServers})};return this.sessions.set(n,te),{sessionId:n,models:y,modes:_,configOptions:b}}finally{a&&process.chdir(i)}}async getOrCreateSession(e){let t=this.sessions.get(e.sessionId);if(t){if(Hi({cwd:e.cwd,mcpServers:e.mcpServers})===t.sessionFingerprint){let n=await fe(e.sessionId,e.cwd);return S(e.sessionId,n?Re(n.filePath):null),C(e.cwd),await this.replaySessionHistory(e),{sessionId:e.sessionId,modes:t.modes,models:t.models,configOptions:t.configOptions}}await this.teardownSession(e.sessionId)}let n=await fe(e.sessionId,e.cwd),r=n?Re(n.filePath):null;S(e.sessionId,r),C(e.cwd);let i;if(n)try{let t=await be(e.sessionId);t&&t.messages.length>0&&(i=Te(t.messages))}catch(e){console.error(`[ACP] Failed to load session history:`,e)}let a=await this.createSession({cwd:e.cwd,mcpServers:e.mcpServers??[],_meta:e._meta},{sessionId:e.sessionId,initialMessages:i});if(i&&i.length>0){let t=this.sessions.get(e.sessionId);t&&await na(e.sessionId,i,this.conn,t.toolUseCache,this.clientCapabilities,t.cwd)}return{sessionId:a.sessionId,modes:a.modes,models:a.models,configOptions:a.configOptions}}async teardownSession(e){this.sessions.get(e)&&(await this.cancel({sessionId:e}),this.sessions.delete(e))}async replaySessionHistory(e){try{let t=await be(e.sessionId);if(!t||t.messages.length===0)return;let n=Te(t.messages);if(n.length===0)return;let r=this.sessions.get(e.sessionId);if(!r)return;await na(e.sessionId,n,this.conn,r.toolUseCache,this.clientCapabilities,r.cwd)}catch(e){console.error(`[ACP] Failed to replay session history:`,e)}}applySessionMode(e,t){if(!fa(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 updateConfigOption(e,t,n){let r=this.sessions.get(e);r&&(this.syncSessionConfigState(r,t,n),r.configOptions=r.configOptions.map(e=>e.id===t&&typeof e.currentValue==`string`?{...e,currentValue:n}:e),await this.conn.sessionUpdate({sessionId:e,update:{sessionUpdate:`config_option_update`,configOptions:r.configOptions}}))}syncSessionConfigState(e,t,n){t===`mode`?e.modes={...e.modes,currentModeId:n}:t===`model`&&(e.models={...e.models,currentModelId:n})}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)}getSetting(e){let t=le();return e.split(`.`).reduce((e,t)=>{if(!(!e||typeof e!=`object`))return e[t]},t)}},da=[`auto`,`default`,`acceptEdits`,`bypassPermissions`,`dontAsk`,`plan`];function fa(e){return da.includes(e)}function pa(e,t,n){if(t){let t=ma(e,`_meta.permissionMode`);if(t===`bypassPermissions`&&!_a(n))throw Error(`Mode not available: bypassPermissions requires a local ACP bypass opt-in.`);return t}return ha(n)??`default`}function ma(e,t){if(e==null)throw Error(`Invalid ${t}: expected a string.`);return Vi(e,t)}function ha(e){if(e!=null)try{return Vi(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 ga(e,t){return!!e&&Object.hasOwn(e,t)}function _a(e){return va()&&(ya()||ba(e))}function va(){return process.env.IS_SANDBOX?!0:typeof process.geteuid==`function`?process.geteuid()!==0:typeof process.getuid==`function`?process.getuid()!==0:!0}function ya(){return process.env.ACP_PERMISSION_MODE===`bypassPermissions`||xa(process.env.CLAUDE_CODE_ACP_ALLOW_BYPASS_PERMISSIONS)}function ba(e){try{return Vi(e)===`bypassPermissions`}catch{return!1}}function xa(e){return e===`1`||e?.toLowerCase()===`true`}function Sa(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),Ca(e),n}Ca(e)}function Ca(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)}}function wa(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}))}]}ae(),xe();function Ta(e,t){let n=Be.toWeb(e);return Ci(Ve.toWeb(t),n)}async function Ea(){ce(),je();let e=Ta(process.stdin,process.stdout),t,n=new Ti(e=>(t=new ua(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{Ea as runAcpAgent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,s as i,u as a}from"./envUtils-BWeoiL4Y.js";import{_ as o,h as s}from"./debug-otxXY3j-.js";import{c,u as l}from"./oauth-CdZEzMww.js";import{r as u,t as d}from"./bundledMode-kSQejuY4.js";import{n as f,r as p,t as m}from"./which-BnEnzWhs.js";import{homedir as h}from"os";import{join as g}from"path";function _(e,t){return{cmd:p(e)??e,args:t}}var v=e((()=>{m()}));async function y(e){try{return!!await f(e)}catch{return!1}}function b(){return process.env.__CFBundleIdentifier===`com.conductor.app`}function x(){if(process.env.CURSOR_TRACE_ID||process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`cursor`))return`cursor`;if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`windsurf`))return`windsurf`;if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`antigravity`))return`antigravity`;let e=process.env.__CFBundleIdentifier?.toLowerCase();if(e?.includes(`vscodium`))return`codium`;if(e?.includes(`windsurf`))return`windsurf`;if(e?.includes(`com.google.android.studio`))return`androidstudio`;if(e){for(let t of A)if(e.includes(t))return t}if(process.env.VisualStudioVersion)return`visualstudio`;if(process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`)return process.platform,`pycharm`;if(process.env.TERM===`xterm-ghostty`)return`ghostty`;if(process.env.TERM?.includes(`kitty`))return`kitty`;if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return`tmux`;if(process.env.STY)return`screen`;if(process.env.KONSOLE_VERSION)return`konsole`;if(process.env.GNOME_TERMINAL_SERVICE)return`gnome-terminal`;if(process.env.XTERM_VERSION)return`xterm`;if(process.env.VTE_VERSION)return`vte-based`;if(process.env.TERMINATOR_UUID)return`terminator`;if(process.env.KITTY_WINDOW_ID)return`kitty`;if(process.env.ALACRITTY_LOG)return`alacritty`;if(process.env.TILIX_ID)return`tilix`;if(process.env.WT_SESSION)return`windows-terminal`;if(process.env.SESSIONNAME&&process.env.TERM===`cygwin`)return`cygwin`;if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return`conemu`;if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(S())return`ssh-session`;if(process.env.TERM){let e=process.env.TERM;return e.includes(`alacritty`)?`alacritty`:e.includes(`rxvt`)?`rxvt`:e.includes(`termite`)?`termite`:process.env.TERM}return process.stdout.isTTY?null:`non-interactive`}function S(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function C(){let e=process.env.CLAUDE_CODE_HOST_PLATFORM;return e===`win32`||e===`darwin`||e===`linux`?e:M.platform}var w,T,E,D,O,k,A,j,M,N=e((()=>{n(),l(),d(),i(),v(),o(),m(),w=t(()=>{if(s().existsSync(g(r(),`.config.json`)))return g(r(),`.config.json`);let e=`.claude${c()}.json`;return g(process.env.CLAUDE_CONFIG_DIR||h(),e)}),T=t(async()=>{try{let{default:e}=await import(`./axios-DLnc2dVy.js`);return await e.head(`http://1.1.1.1`,{signal:AbortSignal.timeout(1e3)}),!0}catch{return!1}}),E=t(async()=>{let e=[];return await y(`npm`)&&e.push(`npm`),await y(`yarn`)&&e.push(`yarn`),await y(`pnpm`)&&e.push(`pnpm`),e}),D=t(async()=>{let e=[];return await y(`bun`)&&e.push(`bun`),await y(`deno`)&&e.push(`deno`),await y(`node`)&&e.push(`node`),e}),O=t(()=>{try{return s().existsSync(`/proc/sys/fs/binfmt_misc/WSLInterop`)}catch{return!1}}),k=t(()=>{try{if(!O())return!1;let{cmd:e}=_(`npm`,[]);return e.startsWith(`/mnt/c/`)}catch{return!1}}),A=[`pycharm`,`intellij`,`webstorm`,`phpstorm`,`rubymine`,`clion`,`goland`,`rider`,`datagrip`,`appcode`,`dataspell`,`aqua`,`gateway`,`fleet`,`jetbrains`,`androidstudio`],j=t(()=>{if(a(process.env.CODESPACES))return`codespaces`;if(process.env.GITPOD_WORKSPACE_ID)return`gitpod`;if(process.env.REPL_ID||process.env.REPL_SLUG)return`replit`;if(process.env.PROJECT_DOMAIN)return`glitch`;if(a(process.env.VERCEL))return`vercel`;if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return`railway`;if(a(process.env.RENDER))return`render`;if(a(process.env.NETLIFY))return`netlify`;if(process.env.DYNO)return`heroku`;if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return`fly.io`;if(a(process.env.CF_PAGES))return`cloudflare-pages`;if(process.env.DENO_DEPLOYMENT_ID)return`deno-deploy`;if(process.env.AWS_LAMBDA_FUNCTION_NAME)return`aws-lambda`;if(process.env.AWS_EXECUTION_ENV===`AWS_ECS_FARGATE`)return`aws-fargate`;if(process.env.AWS_EXECUTION_ENV===`AWS_ECS_EC2`)return`aws-ecs`;try{if(s().readFileSync(`/sys/hypervisor/uuid`,{encoding:`utf8`}).trim().toLowerCase().startsWith(`ec2`))return`aws-ec2`}catch{}if(process.env.K_SERVICE)return`gcp-cloud-run`;if(process.env.GOOGLE_CLOUD_PROJECT)return`gcp`;if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return`azure-app-service`;if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return`azure-functions`;if(process.env.APP_URL?.includes(`ondigitalocean.app`))return`digitalocean-app-platform`;if(process.env.SPACE_CREATOR_USER_ID)return`huggingface-spaces`;if(a(process.env.GITHUB_ACTIONS))return`github-actions`;if(a(process.env.GITLAB_CI))return`gitlab-ci`;if(process.env.CIRCLECI)return`circleci`;if(process.env.BUILDKITE)return`buildkite`;if(a(process.env.CI))return`ci`;if(process.env.KUBERNETES_SERVICE_HOST)return`kubernetes`;try{if(s().existsSync(`/.dockerenv`))return`docker`}catch{}return M.platform===`darwin`?`unknown-darwin`:M.platform===`linux`?`unknown-linux`:M.platform===`win32`?`unknown-win32`:`unknown`}),M={hasInternetAccess:T,isCI:a(process.env.CI),platform:[`win32`,`darwin`].includes(process.platform)?process.platform:`linux`,arch:process.arch,nodeVersion:process.version,terminal:x(),isSSH:S,getPackageManagers:E,getRuntimes:D,isRunningWithBun:t(u),isWslEnvironment:O,isNpmFromWindowsPath:k,isConductor:b,detectDeploymentEnvironment:j}}));export{N as a,C as i,M as n,_ as o,w as r,v as s,A as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t}from"./envLessBridgeConfig-DI0ouryy.js";t();export{e as shouldShowAppUpgradeMessage};
|
|
@@ -0,0 +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-DfGsIjPm.js";import{n as c,t as l}from"./lazySchema-2sOku3cX.js";import{i as u,r as d}from"./semver-Tw0AFar5.js";import{r as f,s as p}from"./bridgeEnabled-DoT2l1Oj.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.7.0`,e.min_version)?`Your version of Claude Code (2.7.0) 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,259 @@
|
|
|
1
|
+
import{a as e,n as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{l as a,p as o}from"./debug-otxXY3j-.js";import{tmpdir as s}from"os";import{join as c}from"path";import{readFileSync as l,unlinkSync as u}from"fs";function d(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var f=t((()=>{})),ee=n({apps:()=>_,display:()=>g,screenshot:()=>v});function p(e){let t=Bun.spawnSync({cmd:[`osascript`,`-l`,`JavaScript`,`-e`,e],stdout:`pipe`,stderr:`pipe`});return new TextDecoder().decode(t.stdout).trim()}async function m(e){let t=Bun.spawn([`osascript`,`-e`,e],{stdout:`pipe`,stderr:`pipe`}),n=await new Response(t.stdout).text();return await t.exited,n.trim()}async function te(e){let t=Bun.spawn([`osascript`,`-l`,`JavaScript`,`-e`,e],{stdout:`pipe`,stderr:`pipe`}),n=await new Response(t.stdout).text();return await t.exited,n.trim()}async function h(e){let t=c(s(),`cu-screenshot-${Date.now()}.png`);await Bun.spawn([`screencapture`,...e,t],{stdout:`pipe`,stderr:`pipe`}).exited;try{let e=l(t);return{base64:e.toString(`base64`),width:e.readUInt32BE(16),height:e.readUInt32BE(20)}}finally{try{u(t)}catch{}}}var g,_,v,ne=t((()=>{g={getSize(e){let t=this.listAll();if(e!==void 0){let n=t.find(t=>t.displayId===e);if(n)return n}return t[0]??{width:1920,height:1080,scaleFactor:2,displayId:1}},listAll(){try{let e=p(`
|
|
2
|
+
ObjC.import("CoreGraphics");
|
|
3
|
+
var displays = $.CGDisplayCopyAllDisplayModes ? [] : [];
|
|
4
|
+
var active = $.CGGetActiveDisplayList(10, null, Ref());
|
|
5
|
+
var countRef = Ref();
|
|
6
|
+
$.CGGetActiveDisplayList(0, null, countRef);
|
|
7
|
+
var count = countRef[0];
|
|
8
|
+
var idBuf = Ref();
|
|
9
|
+
$.CGGetActiveDisplayList(count, idBuf, countRef);
|
|
10
|
+
var result = [];
|
|
11
|
+
for (var i = 0; i < count; i++) {
|
|
12
|
+
var did = idBuf[i];
|
|
13
|
+
var w = $.CGDisplayPixelsWide(did);
|
|
14
|
+
var h = $.CGDisplayPixelsHigh(did);
|
|
15
|
+
var mode = $.CGDisplayCopyDisplayMode(did);
|
|
16
|
+
var pw = $.CGDisplayModeGetPixelWidth(mode);
|
|
17
|
+
var sf = pw > 0 && w > 0 ? pw / w : 2;
|
|
18
|
+
result.push({width: w, height: h, scaleFactor: sf, displayId: did});
|
|
19
|
+
}
|
|
20
|
+
JSON.stringify(result);
|
|
21
|
+
`);return JSON.parse(e).map(e=>({width:Number(e.width),height:Number(e.height),scaleFactor:Number(e.scaleFactor),displayId:Number(e.displayId)}))}catch{try{let e=p(`
|
|
22
|
+
ObjC.import("AppKit");
|
|
23
|
+
var screens = $.NSScreen.screens;
|
|
24
|
+
var result = [];
|
|
25
|
+
for (var i = 0; i < screens.count; i++) {
|
|
26
|
+
var s = screens.objectAtIndex(i);
|
|
27
|
+
var frame = s.frame;
|
|
28
|
+
var desc = s.deviceDescription;
|
|
29
|
+
var screenNumber = desc.objectForKey($("NSScreenNumber")).intValue;
|
|
30
|
+
var backingFactor = s.backingScaleFactor;
|
|
31
|
+
result.push({
|
|
32
|
+
width: Math.round(frame.size.width),
|
|
33
|
+
height: Math.round(frame.size.height),
|
|
34
|
+
scaleFactor: backingFactor,
|
|
35
|
+
displayId: screenNumber
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
JSON.stringify(result);
|
|
39
|
+
`);return JSON.parse(e).map(e=>({width:Number(e.width),height:Number(e.height),scaleFactor:Number(e.scaleFactor),displayId:Number(e.displayId)}))}catch{return[{width:1920,height:1080,scaleFactor:2,displayId:1}]}}}},_={async prepareDisplay(e,t,n){return{activated:``,hidden:[]}},async previewHideSet(e,t){return[]},async findWindowDisplays(e){return e.map(e=>({bundleId:e,displayIds:[1]}))},async appUnderPoint(e,t){try{let n=await te(`
|
|
40
|
+
ObjC.import("CoreGraphics");
|
|
41
|
+
ObjC.import("AppKit");
|
|
42
|
+
var pt = $.CGPointMake(${e}, ${t});
|
|
43
|
+
var app = $.NSWorkspace.sharedWorkspace.frontmostApplication;
|
|
44
|
+
JSON.stringify({bundleId: app.bundleIdentifier.js, displayName: app.localizedName.js});
|
|
45
|
+
`);return JSON.parse(n)}catch{return null}},async listInstalled(){try{let e=[`/Applications`,`~/Applications`,`/System/Applications`],t=[];for(let n of e){let e=n.startsWith(`~`)?c(process.env.HOME??`~`,n.slice(1)):n,r=Bun.spawn([`bash`,`-c`,`for f in "${e}"/*.app; do [ -d "$f" ] || continue; bid=$(mdls -name kMDItemCFBundleIdentifier "$f" 2>/dev/null | sed 's/.*= "//;s/"//'); name=$(basename "$f" .app); echo "$f|$name|$bid"; done`],{stdout:`pipe`,stderr:`pipe`}),i=await new Response(r.stdout).text();await r.exited;for(let e of i.split(`
|
|
46
|
+
`).filter(Boolean)){let[n,r,i]=e.split(`|`,3);n&&r&&i&&i!==`(null)`&&t.push({bundleId:i,displayName:r,path:n})}}let n=new Set;return t.filter(e=>n.has(e.bundleId)?!1:(n.add(e.bundleId),!0))}catch{return[]}},iconDataUrl(e){return null},listRunning(){try{let e=p(`
|
|
47
|
+
var apps = Application("System Events").applicationProcesses.whose({backgroundOnly: false});
|
|
48
|
+
var result = [];
|
|
49
|
+
for (var i = 0; i < apps.length; i++) {
|
|
50
|
+
try {
|
|
51
|
+
var a = apps[i];
|
|
52
|
+
result.push({bundleId: a.bundleIdentifier(), displayName: a.name()});
|
|
53
|
+
} catch(e) {}
|
|
54
|
+
}
|
|
55
|
+
JSON.stringify(result);
|
|
56
|
+
`);return JSON.parse(e)}catch{return[]}},async open(e){await m(`tell application id "${e}" to activate`)},async unhide(e){for(let t of e)await m(`
|
|
57
|
+
tell application "System Events"
|
|
58
|
+
set visible of application process (name of application process whose bundle identifier is "${t}") to true
|
|
59
|
+
end tell
|
|
60
|
+
`)}},v={async captureExcluding(e,t,n,r,i){let a=[`-x`];return i!==void 0&&a.push(`-D`,String(i)),h(a)},async captureRegion(e,t,n,r,i,a,o,s,c){let l=[`-x`,`-R`,`${t},${n},${r},${i}`];return c!==void 0&&l.push(`-D`,String(c)),h(l)},captureWindowTarget(e){return null}}})),re=n({listWindows:()=>y});function y(){let e=Bun.spawnSync({cmd:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,b],stdout:`pipe`,stderr:`pipe`}),t=new TextDecoder().decode(e.stdout).trim();return t?t.split(`
|
|
61
|
+
`).filter(Boolean).map(e=>{let t=e.trim(),n=t.indexOf(`|`),r=t.indexOf(`|`,n+1);if(n===-1||r===-1)return null;let i=t.slice(0,n),a=Number(t.slice(n+1,r)),o=t.slice(r+1);return!i||isNaN(a)||!o?null:{hwnd:i,pid:a,title:o}}).filter(e=>e!==null):[]}var b,x=t((()=>{b=`
|
|
62
|
+
Add-Type @'
|
|
63
|
+
using System;
|
|
64
|
+
using System.Collections.Generic;
|
|
65
|
+
using System.Runtime.InteropServices;
|
|
66
|
+
using System.Text;
|
|
67
|
+
public class WinEnum {
|
|
68
|
+
public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
|
|
69
|
+
|
|
70
|
+
[DllImport("user32.dll")]
|
|
71
|
+
public static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
|
|
72
|
+
[DllImport("user32.dll")]
|
|
73
|
+
public static extern bool IsWindowVisible(IntPtr hWnd);
|
|
74
|
+
[DllImport("user32.dll", CharSet=CharSet.Unicode)]
|
|
75
|
+
public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
|
|
76
|
+
[DllImport("user32.dll")]
|
|
77
|
+
public static extern int GetWindowTextLength(IntPtr hWnd);
|
|
78
|
+
[DllImport("user32.dll")]
|
|
79
|
+
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
|
|
80
|
+
|
|
81
|
+
public static List<string> results = new List<string>();
|
|
82
|
+
|
|
83
|
+
public static void Run() {
|
|
84
|
+
results.Clear();
|
|
85
|
+
EnumWindows(delegate(IntPtr hWnd, IntPtr lParam) {
|
|
86
|
+
if (!IsWindowVisible(hWnd)) return true;
|
|
87
|
+
int len = GetWindowTextLength(hWnd);
|
|
88
|
+
if (len == 0) return true;
|
|
89
|
+
StringBuilder sb = new StringBuilder(len + 1);
|
|
90
|
+
GetWindowText(hWnd, sb, sb.Capacity);
|
|
91
|
+
string title = sb.ToString();
|
|
92
|
+
if (string.IsNullOrWhiteSpace(title)) return true;
|
|
93
|
+
uint pid = 0;
|
|
94
|
+
GetWindowThreadProcessId(hWnd, out pid);
|
|
95
|
+
results.Add(hWnd.ToInt64() + "|" + pid + "|" + title);
|
|
96
|
+
return true;
|
|
97
|
+
}, IntPtr.Zero);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
'@
|
|
101
|
+
[WinEnum]::Run()
|
|
102
|
+
[WinEnum]::results | ForEach-Object { $_ }
|
|
103
|
+
`}));function S(e){let t=e.trim();if(!t||t===`NOT_FOUND`||t===`INVALID_SIZE`)return null;let n=t.indexOf(`,`),r=t.indexOf(`,`,n+1);if(n===-1||r===-1)return null;let i=Number(t.slice(0,n)),a=Number(t.slice(n+1,r)),o=t.slice(r+1);return!i||!a||!o?null:{base64:o,width:i,height:a}}function C(e){let t=Bun.spawnSync({cmd:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,e],stdout:`pipe`,stderr:`pipe`});return new TextDecoder().decode(t.stdout).trim()}function ie(e){return S(C(`${T}\n[WinCap]::Capture('${e.replace(/'/g,`''`)}')`))}function w(e){return S(C(`${E}\n[WinCapH]::Capture([IntPtr]::new(${e}))`))}var T,E,ae=t((()=>{T=`
|
|
104
|
+
Add-Type -AssemblyName System.Drawing
|
|
105
|
+
Add-Type -ReferencedAssemblies System.Drawing @'
|
|
106
|
+
using System;
|
|
107
|
+
using System.Runtime.InteropServices;
|
|
108
|
+
using System.Drawing;
|
|
109
|
+
using System.Drawing.Imaging;
|
|
110
|
+
public class WinCap {
|
|
111
|
+
[DllImport("user32.dll", CharSet=CharSet.Unicode)]
|
|
112
|
+
public static extern IntPtr FindWindow(string c, string t);
|
|
113
|
+
[DllImport("user32.dll")]
|
|
114
|
+
public static extern bool GetWindowRect(IntPtr h, out RECT r);
|
|
115
|
+
[DllImport("user32.dll")]
|
|
116
|
+
public static extern bool PrintWindow(IntPtr h, IntPtr hdc, uint f);
|
|
117
|
+
[StructLayout(LayoutKind.Sequential)]
|
|
118
|
+
public struct RECT { public int L, T, R, B; }
|
|
119
|
+
|
|
120
|
+
public static string Capture(string title) {
|
|
121
|
+
IntPtr hwnd = FindWindow(null, title);
|
|
122
|
+
if (hwnd == IntPtr.Zero) return "NOT_FOUND";
|
|
123
|
+
RECT r; GetWindowRect(hwnd, out r);
|
|
124
|
+
int w = r.R - r.L; int h = r.B - r.T;
|
|
125
|
+
if (w <= 0 || h <= 0) return "INVALID_SIZE";
|
|
126
|
+
Bitmap bmp = new Bitmap(w, h);
|
|
127
|
+
Graphics g = Graphics.FromImage(bmp);
|
|
128
|
+
IntPtr hdc = g.GetHdc();
|
|
129
|
+
PrintWindow(hwnd, hdc, 2);
|
|
130
|
+
g.ReleaseHdc(hdc); g.Dispose();
|
|
131
|
+
var ms = new System.IO.MemoryStream();
|
|
132
|
+
bmp.Save(ms, ImageFormat.Png);
|
|
133
|
+
bmp.Dispose();
|
|
134
|
+
return w + "," + h + "," + Convert.ToBase64String(ms.ToArray());
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
'@
|
|
138
|
+
`,E=`
|
|
139
|
+
Add-Type -AssemblyName System.Drawing
|
|
140
|
+
Add-Type -ReferencedAssemblies System.Drawing @'
|
|
141
|
+
using System;
|
|
142
|
+
using System.Runtime.InteropServices;
|
|
143
|
+
using System.Drawing;
|
|
144
|
+
using System.Drawing.Imaging;
|
|
145
|
+
public class WinCapH {
|
|
146
|
+
[DllImport("user32.dll")]
|
|
147
|
+
public static extern bool GetWindowRect(IntPtr h, out RECT r);
|
|
148
|
+
[DllImport("user32.dll")]
|
|
149
|
+
public static extern bool PrintWindow(IntPtr h, IntPtr hdc, uint f);
|
|
150
|
+
[DllImport("user32.dll")]
|
|
151
|
+
public static extern bool IsWindow(IntPtr hWnd);
|
|
152
|
+
[StructLayout(LayoutKind.Sequential)]
|
|
153
|
+
public struct RECT { public int L, T, R, B; }
|
|
154
|
+
|
|
155
|
+
public static string Capture(IntPtr hwnd) {
|
|
156
|
+
if (!IsWindow(hwnd)) return "NOT_FOUND";
|
|
157
|
+
RECT r; GetWindowRect(hwnd, out r);
|
|
158
|
+
int w = r.R - r.L; int h = r.B - r.T;
|
|
159
|
+
if (w <= 0 || h <= 0) return "INVALID_SIZE";
|
|
160
|
+
Bitmap bmp = new Bitmap(w, h);
|
|
161
|
+
Graphics g = Graphics.FromImage(bmp);
|
|
162
|
+
IntPtr hdc = g.GetHdc();
|
|
163
|
+
PrintWindow(hwnd, hdc, 2);
|
|
164
|
+
g.ReleaseHdc(hdc); g.Dispose();
|
|
165
|
+
var ms = new System.IO.MemoryStream();
|
|
166
|
+
bmp.Save(ms, ImageFormat.Png);
|
|
167
|
+
bmp.Dispose();
|
|
168
|
+
return w + "," + h + "," + Convert.ToBase64String(ms.ToArray());
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
'@
|
|
172
|
+
`})),oe=n({apps:()=>A,display:()=>k,screenshot:()=>j});function D(e){let t=Bun.spawnSync({cmd:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,e],stdout:`pipe`,stderr:`pipe`});return new TextDecoder().decode(t.stdout).trim()}async function O(e){let t=Bun.spawn([`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,e],{stdout:`pipe`,stderr:`pipe`}),n=await new Response(t.stdout).text();return await t.exited,n.trim()}var k,A,j,se=t((()=>{x(),ae(),k={getSize(e){let t=this.listAll();if(e!==void 0){let n=t.find(t=>t.displayId===e);if(n)return n}return t[0]??{width:1920,height:1080,scaleFactor:1,displayId:0}},listAll(){try{return D(`
|
|
173
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
174
|
+
$result = @()
|
|
175
|
+
$idx = 0
|
|
176
|
+
foreach ($s in [System.Windows.Forms.Screen]::AllScreens) {
|
|
177
|
+
$result += "$($s.Bounds.Width),$($s.Bounds.Height),$idx,$($s.Primary)"
|
|
178
|
+
$idx++
|
|
179
|
+
}
|
|
180
|
+
$result -join "|"
|
|
181
|
+
`).split(`|`).filter(Boolean).map(e=>{let[t,n,r,i]=e.split(`,`);return{width:Number(t),height:Number(n),scaleFactor:1,displayId:Number(r)}})}catch{return[{width:1920,height:1080,scaleFactor:1,displayId:0}]}}},A={async prepareDisplay(e,t,n){return{activated:``,hidden:[]}},async previewHideSet(e,t){return[]},async findWindowDisplays(e){return e.map(e=>({bundleId:e,displayIds:[0]}))},async appUnderPoint(e,t){try{let n=D(`
|
|
182
|
+
Add-Type @'
|
|
183
|
+
using System;
|
|
184
|
+
using System.Runtime.InteropServices;
|
|
185
|
+
public class WinPt {
|
|
186
|
+
[StructLayout(LayoutKind.Sequential)] public struct POINT { public int X; public int Y; }
|
|
187
|
+
[DllImport("user32.dll")] public static extern IntPtr WindowFromPoint(POINT p);
|
|
188
|
+
[DllImport("user32.dll")] public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint pid);
|
|
189
|
+
}
|
|
190
|
+
'@
|
|
191
|
+
$pt = New-Object WinPt+POINT
|
|
192
|
+
$pt.X = ${e}; $pt.Y = ${t}
|
|
193
|
+
$hwnd = [WinPt]::WindowFromPoint($pt)
|
|
194
|
+
$pid = [uint32]0
|
|
195
|
+
[WinPt]::GetWindowThreadProcessId($hwnd, [ref]$pid) | Out-Null
|
|
196
|
+
$proc = Get-Process -Id $pid -ErrorAction SilentlyContinue
|
|
197
|
+
"$($proc.MainModule.FileName)|$($proc.ProcessName)"
|
|
198
|
+
`);if(!n||!n.includes(`|`))return null;let[r,i]=n.split(`|`,2);return{bundleId:r,displayName:i}}catch{return null}},async listInstalled(){try{return(await O(`
|
|
199
|
+
$apps = @()
|
|
200
|
+
$paths = @(
|
|
201
|
+
'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*',
|
|
202
|
+
'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*',
|
|
203
|
+
'HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'
|
|
204
|
+
)
|
|
205
|
+
foreach ($p in $paths) {
|
|
206
|
+
Get-ItemProperty $p -ErrorAction SilentlyContinue | Where-Object { $_.DisplayName } | ForEach-Object {
|
|
207
|
+
$apps += "$($_.DisplayName)|$($_.InstallLocation)|$($_.PSChildName)"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
$apps | Select-Object -Unique | Select-Object -First 200
|
|
211
|
+
`)).split(`
|
|
212
|
+
`).filter(Boolean).map(e=>{let[t,n,r]=e.split(`|`,3);return{bundleId:r??t??``,displayName:t??``,path:n??``}})}catch{return[]}},iconDataUrl(e){return null},listRunning(){try{return y().map(e=>({bundleId:String(e.hwnd),displayName:e.title}))}catch{return[]}},async open(e){let t=e.replace(/'/g,`''`);await O(`
|
|
213
|
+
if (Test-Path '${t}') {
|
|
214
|
+
Start-Process '${t}'
|
|
215
|
+
} else {
|
|
216
|
+
Start-Process -FilePath '${t}' -ErrorAction SilentlyContinue
|
|
217
|
+
}`)},async unhide(e){for(let t of e)await O(`
|
|
218
|
+
Add-Type @'
|
|
219
|
+
using System;
|
|
220
|
+
using System.Runtime.InteropServices;
|
|
221
|
+
public class WinShow {
|
|
222
|
+
[DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmd);
|
|
223
|
+
[DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd);
|
|
224
|
+
}
|
|
225
|
+
'@
|
|
226
|
+
$proc = Get-Process -Name "${t}" -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
227
|
+
if ($proc) { [WinShow]::ShowWindow($proc.MainWindowHandle, 9) | Out-Null; [WinShow]::SetForegroundWindow($proc.MainWindowHandle) | Out-Null }
|
|
228
|
+
`)}},j={async captureExcluding(e,t,n,r,i){let a=await O(`
|
|
229
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
230
|
+
Add-Type -AssemblyName System.Drawing
|
|
231
|
+
$screen = if (${i??-1} -ge 0) { [System.Windows.Forms.Screen]::AllScreens[${i??0}] } else { [System.Windows.Forms.Screen]::PrimaryScreen }
|
|
232
|
+
$bounds = $screen.Bounds
|
|
233
|
+
$bmp = New-Object System.Drawing.Bitmap($bounds.Width, $bounds.Height)
|
|
234
|
+
$g = [System.Drawing.Graphics]::FromImage($bmp)
|
|
235
|
+
$g.CopyFromScreen($bounds.Location, [System.Drawing.Point]::Empty, $bounds.Size)
|
|
236
|
+
$g.Dispose()
|
|
237
|
+
$ms = New-Object System.IO.MemoryStream
|
|
238
|
+
$bmp.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png)
|
|
239
|
+
$bmp.Dispose()
|
|
240
|
+
$bytes = $ms.ToArray()
|
|
241
|
+
$ms.Dispose()
|
|
242
|
+
"$($bounds.Width),$($bounds.Height)," + [Convert]::ToBase64String($bytes)
|
|
243
|
+
`),o=a.indexOf(`,`),s=a.indexOf(`,`,o+1),c=Number(a.slice(0,o)),l=Number(a.slice(o+1,s));return{base64:a.slice(s+1),width:c,height:l}},async captureRegion(e,t,n,r,i,a,o,s,c){let l=await O(`
|
|
244
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
245
|
+
Add-Type -AssemblyName System.Drawing
|
|
246
|
+
$bmp = New-Object System.Drawing.Bitmap(${r}, ${i})
|
|
247
|
+
$g = [System.Drawing.Graphics]::FromImage($bmp)
|
|
248
|
+
$g.CopyFromScreen(${t}, ${n}, 0, 0, (New-Object System.Drawing.Size(${r}, ${i})))
|
|
249
|
+
$g.Dispose()
|
|
250
|
+
$ms = New-Object System.IO.MemoryStream
|
|
251
|
+
$bmp.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png)
|
|
252
|
+
$bmp.Dispose()
|
|
253
|
+
$bytes = $ms.ToArray()
|
|
254
|
+
$ms.Dispose()
|
|
255
|
+
"${r},${i}," + [Convert]::ToBase64String($bytes)
|
|
256
|
+
`),u=l.indexOf(`,`),d=l.indexOf(`,`,u+1);return{base64:l.slice(d+1),width:r,height:i}},captureWindowTarget(e){return typeof e==`number`?w(e):ie(e)}}})),ce=n({apps:()=>I,display:()=>F,screenshot:()=>R});function M(e){let t=Bun.spawnSync({cmd:e,stdout:`pipe`,stderr:`pipe`});return new TextDecoder().decode(t.stdout).trim()}async function N(e){let t=Bun.spawn(e,{stdout:`pipe`,stderr:`pipe`}),n=await new Response(t.stdout).text();return await t.exited,n.trim()}function P(e){return Bun.spawnSync({cmd:[`which`,e],stdout:`pipe`,stderr:`pipe`}).exitCode===0}var F,I,L,R,z=t((()=>{F={getSize(e){let t=this.listAll();if(e!==void 0){let n=t.find(t=>t.displayId===e);if(n)return n}return t[0]??{width:1920,height:1080,scaleFactor:1,displayId:0}},listAll(){try{let e=M([`xrandr`,`--query`]),t=[],n=0,r=/^\S+\s+connected\s+(?:primary\s+)?(\d+)x(\d+)\+\d+\+\d+/gm,i;for(;(i=r.exec(e))!==null;)t.push({width:Number(i[1]),height:Number(i[2]),scaleFactor:1,displayId:n++});return t.length===0?[{width:1920,height:1080,scaleFactor:1,displayId:0}]:t}catch{return[{width:1920,height:1080,scaleFactor:1,displayId:0}]}}},I={async prepareDisplay(e,t,n){return{activated:``,hidden:[]}},async previewHideSet(e,t){return[]},async findWindowDisplays(e){return e.map(e=>({bundleId:e,displayIds:[0]}))},async appUnderPoint(e,t){try{let n=M([`xdotool`,`mousemove`,`--sync`,String(e),String(t),`getmouselocation`,`--shell`]).match(/WINDOW=(\d+)/);if(!n)return null;let r=n[1],i=M([`xdotool`,`getwindowpid`,r]);if(!i)return null;let a=``;try{a=M([`readlink`,`-f`,`/proc/${i}/exe`])}catch{}let o=``;try{o=M([`cat`,`/proc/${i}/comm`])}catch{}return!a&&!o?null:{bundleId:a||i,displayName:o||`unknown`}}catch{return null}},async listInstalled(){try{let e=[`/usr/share/applications`,`/usr/local/share/applications`,`${process.env.HOME}/.local/share/applications`],t=[];for(let n of e){let e;try{e=M([`find`,n,`-name`,`*.desktop`,`-maxdepth`,`1`])}catch{continue}for(let n of e.split(`
|
|
257
|
+
`).filter(Boolean))try{let e=M([`cat`,n]),r=e.match(/^Name=(.+)$/m),i=e.match(/^Exec=(.+)$/m);if(e.match(/^NoDisplay=true$/m))continue;let a=r?.[1]??``,o=i?.[1]??``;if(!a)continue;t.push({bundleId:n.split(`/`).pop()?.replace(`.desktop`,``)??``,displayName:a,path:o.split(/\s+/)[0]??``})}catch{}}return t.slice(0,200)}catch{return[]}},iconDataUrl(e){return null},listRunning(){try{if(P(`wmctrl`)){let e=M([`wmctrl`,`-l`,`-p`]),t=[];for(let n of e.split(`
|
|
258
|
+
`).filter(Boolean)){let e=n.split(/\s+/)[2];if(!e||e===`0`)continue;let r=``;try{r=M([`readlink`,`-f`,`/proc/${e}/exe`])}catch{}let i=``;try{i=M([`cat`,`/proc/${e}/comm`])}catch{}i&&t.push({bundleId:r||e,displayName:i})}let n=new Set;return t.filter(e=>n.has(e.bundleId)?!1:(n.add(e.bundleId),!0)).slice(0,50)}let e=M([`ps`,`-eo`,`pid,comm`,`--no-headers`]),t=[];for(let n of e.split(`
|
|
259
|
+
`).filter(Boolean).slice(0,50)){let e=n.trim().match(/^(\d+)\s+(.+)$/);e&&t.push({bundleId:e[1],displayName:e[2]})}return t}catch{return[]}},async open(e){try{let t=e.endsWith(`.desktop`)?e:`${e}.desktop`;if(P(`gtk-launch`)){await N([`gtk-launch`,t]);return}}catch{}await N([`xdg-open`,e])},async unhide(e){for(let t of e)try{P(`wmctrl`)&&t.startsWith(`0x`)?await N([`wmctrl`,`-i`,`-R`,t]):await N([`xdotool`,`search`,`--name`,t,`windowactivate`])}catch{}}},L=`/tmp/cu-screenshot.png`,R={async captureExcluding(e,t,n,r,i){try{await N([`scrot`,`-o`,L]);let e=await Bun.file(L).arrayBuffer(),t=Buffer.from(e).toString(`base64`),n=F.getSize(i);return{base64:t,width:n.width,height:n.height}}catch{return{base64:``,width:0,height:0}}},async captureRegion(e,t,n,r,i,a,o,s,c){try{await N([`scrot`,`-a`,`${t},${n},${r},${i}`,`-o`,L]);let e=await Bun.file(L).arrayBuffer();return{base64:Buffer.from(e).toString(`base64`),width:r,height:i}}catch{return{base64:``,width:0,height:0}}},captureWindowTarget(e){return null}}})),le=n({ComputerUseAPI:()=>V});function ue(){try{if(process.platform===`darwin`)return ne(),e(ee);if(process.platform===`win32`)return se(),e(oe);if(process.platform===`linux`)return z(),e(ce)}catch{return null}return null}var B,V,de=t((()=>{r(),B=ue(),V=class{constructor(){i(this,`apps`,B?.apps??{async prepareDisplay(){return{activated:``,hidden:[]}},async previewHideSet(){return[]},async findWindowDisplays(e){return e.map(e=>({bundleId:e,displayIds:[]}))},async appUnderPoint(){return null},async listInstalled(){return[]},iconDataUrl(){return null},listRunning(){return[]},async open(){throw Error(`@ant/computer-use-swift: macOS only`)},async unhide(){}}),i(this,`display`,B?.display??{getSize(){throw Error(`@ant/computer-use-swift: macOS only`)},listAll(){throw Error(`@ant/computer-use-swift: macOS only`)}}),i(this,`screenshot`,B?.screenshot??{async captureExcluding(){throw Error(`@ant/computer-use-swift: macOS only`)},async captureRegion(){throw Error(`@ant/computer-use-swift: macOS only`)}})}async resolvePrepareCapture(e,t,n,r,i,a){return this.screenshot.captureExcluding(e,n,r,i,a)}}}));function H(){if(U)return U;let t=(de(),e(le));return U=t.ComputerUseAPI&&typeof t.ComputerUseAPI==`function`?new t.ComputerUseAPI:t,U}var U,W=t((()=>{}));function fe(e){e?._drainMainRunLoop?.()}function G(){J++,q===void 0&&(q=setInterval(fe,1,H()),o(`[drainRunLoop] pump started`,{level:`verbose`}))}function K(){J--,J<=0&&q!==void 0&&(clearInterval(q),q=void 0,o(`[drainRunLoop] pump stopped`,{level:`verbose`}),J=0)}function pe(e){e(Error(`computer-use native call exceeded ${Y}ms`))}async function me(e){if(process.platform!==`darwin`)return e();G();let t;try{let n=e();n.catch(()=>{});let r=d();return t=setTimeout(pe,Y,r.reject),await Promise.race([n,r.promise])}finally{clearTimeout(t),K()}}var q,J,Y,X,Z,Q=t((()=>{a(),f(),W(),J=0,Y=3e4,X=G,Z=K}));function he(e){return process.platform===`darwin`?$?!0:H().hotkey?.registerEscape(e)?(X(),$=!0,o(`[cu-esc] registered`),!0):(o(`[cu-esc] registerEscape returned false`,{level:`warn`}),!1):!1}function ge(){if($)try{H().hotkey?.unregister()}finally{Z(),$=!1,o(`[cu-esc] unregistered`)}}function _e(){$&&H().hotkey?.notifyExpectedEscape()}var $,ve=t((()=>{a(),Q(),W(),$=!1}));export{me as a,H as c,re as d,f,ge as i,x as l,_e as n,Q as o,d as p,he as r,W as s,ve as t,y as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,k as n}from"./debug-otxXY3j-.js";import{n as r,t as i}from"./cwd--iizewsn.js";import{n as a,r as o,t as s}from"./execa-CGue6Z3n.js";import{o as c,s as l}from"./log-DS97_rIr.js";function u(e,t,r=10*f*d){let o;o=t===void 0?{}:t instanceof AbortSignal?{abortSignal:t,timeout:r}:t;let{abortSignal:s,timeout:c=10*f*d,input:l,stdio:u=[`ignore`,`pipe`,`pipe`]}=o;s?.throwIfAborted(),n`exec: ${e.slice(0,200)}`;try{let t=a(e,{env:process.env,maxBuffer:1e6,timeout:c,cwd:i(),stdio:u,shell:!0,reject:!1,input:l});return t.stdout&&t.stdout.trim()||null}catch{return null}}var d,f,p=e((()=>{o(),r(),t(),d=1e3,f=60}));function m(e,t,n={timeout:10*v*_,preserveOutputOnError:!0,useCwd:!0}){return g(e,t,{abortSignal:n.abortSignal,timeout:n.timeout,preserveOutputOnError:n.preserveOutputOnError,cwd:n.useCwd?i():void 0,env:n.env,stdin:n.stdin,input:n.input})}function h(e,t){return e.shortMessage?e.shortMessage:typeof e.signal==`string`?e.signal:String(t)}function g(e,t,{abortSignal:n,timeout:r=10*v*_,preserveOutputOnError:i=!0,cwd:a,env:o,maxBuffer:c,shell:u,stdin:d,input:f}={timeout:10*v*_,preserveOutputOnError:!0,maxBuffer:1e6}){return new Promise(p=>{s(e,t,{maxBuffer:c,cancelSignal:n,timeout:r,cwd:a,env:o,shell:u,stdin:d,input:f,reject:!1}).then(e=>{if(e.failed)if(i){let t=e.exitCode??1;p({stdout:e.stdout||``,stderr:e.stderr||``,code:t,error:h(e,t)})}else p({stdout:``,stderr:``,code:e.exitCode??1});else p({stdout:e.stdout,stderr:e.stderr,code:0})}).catch(e=>{l(e),p({stdout:``,stderr:``,code:1})})})}var _,v,y=e((()=>{o(),r(),c(),p(),_=1e3,v=60}));export{p as a,u as i,g as n,y as r,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,k as n}from"./debug-otxXY3j-.js";import{execSync as r}from"child_process";function i(e,t){return n`execSync: ${e.slice(0,100)}`,r(e,t)}var a=e((()=>{t()}));export{a as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./executor-Dmn3RTuI.js";e();export{t as unhideComputerUseApps};
|