claude-code-best 2.6.12 → 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-LhW1QZFL.js +0 -1
- package/dist/chunks/App-DYMNbl0d.js +0 -1
- package/dist/chunks/ApproveApiKey-B1XCQNW6.js +0 -1
- package/dist/chunks/ApproveApiKey-Bi2Iq_gN.js +0 -1
- package/dist/chunks/AssistantSessionChooser-Dv6yYR3s.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-qS15If6H.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-Bhjd2F2o.js +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-CxBS5xZY.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CiANFiNV.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-nuKXhM2t.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-C8FzG3uF.js +0 -1
- package/dist/chunks/DesktopHandoff-BSpzQF0U.js +0 -1
- package/dist/chunks/DevChannelsDialog-B2xqlZtS.js +0 -1
- package/dist/chunks/DiffDialog-XmOsaUeN.js +0 -3
- package/dist/chunks/Doctor-C6FXh99k.js +0 -1
- package/dist/chunks/Doctor-DLx7Z_sA.js +0 -3
- package/dist/chunks/ExitFlow-CHDj7fv7.js +0 -2
- package/dist/chunks/Feedback-CUjTJbIh.js +0 -2
- package/dist/chunks/Grove-B8ZQOflC.js +0 -1
- package/dist/chunks/Grove-fenDMHVw.js +0 -11
- package/dist/chunks/HybridTransport-CP63usH9.js +0 -4
- package/dist/chunks/ITermBackend-Bp_3qpix.js +0 -1
- package/dist/chunks/InvalidConfigDialog-CgD7HSg0.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-pYMa5Fp4.js +0 -1
- package/dist/chunks/MCPConnectionManager-ip1xShU_.js +0 -1
- package/dist/chunks/McpParsingWarnings-DhobExFM.js +0 -1
- package/dist/chunks/MessageSelector-B2X6zrsb.js +0 -3
- package/dist/chunks/Messages-CmsZIA66.js +0 -11
- package/dist/chunks/Onboarding-BaoLhLiT.js +0 -1
- package/dist/chunks/OverageCreditUpsell-DnLMobAh.js +0 -1
- package/dist/chunks/PluginSettings-BetzicTb.js +0 -17
- package/dist/chunks/PromptInputFooterSuggestions-D-1hRFAD.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-DnQj3Hpq.js +0 -1
- package/dist/chunks/QueryEngine-BwvqdZVN.js +0 -1
- package/dist/chunks/REPL-CCgaPc2g.js +0 -1
- package/dist/chunks/REPL-zS2s1JnV.js +0 -97
- package/dist/chunks/RemoteCallout-B9hClSYj.js +0 -1
- package/dist/chunks/RemoteSessionManager-BgLIvi8Z.js +0 -2
- package/dist/chunks/ResumeConversation-DAMMGHGc.js +0 -1
- package/dist/chunks/SSETransport-CD7R7FfS.js +0 -4
- package/dist/chunks/SearchExtraToolsTool-CP6G9xhL.js +0 -1
- package/dist/chunks/SentryErrorBoundary-6dQQW6kh.js +0 -2
- package/dist/chunks/SentryErrorBoundary-B2e3QmqR.js +0 -1
- package/dist/chunks/Settings-DgW58gbY.js +0 -2
- package/dist/chunks/TeleportProgress-D_USKi0I.js +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-C1-iWmRP.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-BX9nUVsC.js +0 -1
- package/dist/chunks/ThemePicker-C0JghXSS.js +0 -1
- package/dist/chunks/TmuxBackend-BxPiis2l.js +0 -9
- package/dist/chunks/TrustDialog-BZD-KGrA.js +0 -1
- package/dist/chunks/ValidationErrorsList-CTFdkGiH.js +0 -2
- package/dist/chunks/WelcomeV2-C7F1y8zh.js +0 -1
- package/dist/chunks/WindowsTerminalBackend-DLxmmXo4.js +0 -2
- package/dist/chunks/add-dir-Dhv9aEca.js +0 -1
- package/dist/chunks/agentDisplay-BoBFMmGh.js +0 -1
- package/dist/chunks/agents-Bt9kYpgi.js +0 -2
- package/dist/chunks/agents-CdsfzK3E.js +0 -103
- package/dist/chunks/ant-Bo6XJuE9.js +0 -1
- package/dist/chunks/api-CRPzfBL5.js +0 -1
- package/dist/chunks/api-CslgFoHj.js +0 -1
- package/dist/chunks/asciicast-C3nf97NR.js +0 -1
- package/dist/chunks/asciicast-DIsaWcsJ.js +0 -4
- package/dist/chunks/assistant--L1Ll62G.js +0 -1
- package/dist/chunks/assistant-DypEudjI.js +0 -1
- package/dist/chunks/assistant-od6Nf6EJ.js +0 -1
- package/dist/chunks/auth-BaaTtn3M.js +0 -1
- package/dist/chunks/auth-yKNn60lZ.js +0 -1
- package/dist/chunks/autoMode-C4b9u7WQ.js +0 -45
- package/dist/chunks/autonomy-7nZpCyNC.js +0 -19
- package/dist/chunks/autonomy-rMsykUYN.js +0 -1
- package/dist/chunks/autonomyPanel-j0q1dMDj.js +0 -1
- package/dist/chunks/backgroundHousekeeping-DGAYPsK9.js +0 -1
- package/dist/chunks/backgroundHousekeeping-KCpR7i2h.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-GL4WvvLa.js +0 -3
- package/dist/chunks/bridge-BVzpVEsr.js +0 -2
- package/dist/chunks/bridgeConfig-B1OTOi0O.js +0 -1
- package/dist/chunks/bridgeConfig-C110hgnb.js +0 -1
- package/dist/chunks/bridgeEnabled-DrW-kkAr.js +0 -1
- package/dist/chunks/bridgeEnabled-Zk2slA-p.js +0 -1
- package/dist/chunks/bridgeMain-C-MUVlCX.js +0 -68
- package/dist/chunks/bridgeMain-L1ScqrgM.js +0 -1
- package/dist/chunks/bridgeMessaging-DobCpZGY.js +0 -1
- package/dist/chunks/bridgePointer-B2FPGDWR.js +0 -1
- package/dist/chunks/browser-fLRXxIsQ.js +0 -1
- package/dist/chunks/btw-CSDRs-n8.js +0 -1
- package/dist/chunks/buddy-D3Owb2U5.js +0 -3
- package/dist/chunks/bypassPermissionsKillswitch-B_5qku-e.js +0 -1
- package/dist/chunks/caches-CpgRh__l.js +0 -1
- package/dist/chunks/caches-Di_WVMtD.js +0 -3
- package/dist/chunks/ccrClient-CWH1f8Nk.js +0 -1
- package/dist/chunks/changeDetector-DEStinxa.js +0 -1
- package/dist/chunks/channelNotification-DxAS15nL.js +0 -1
- package/dist/chunks/channelNotification-Y5fNpq-B.js +0 -1
- package/dist/chunks/chrome-Cgl-Sq1y.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-Dja0RB_p.js +0 -1
- package/dist/chunks/cliLaunch-BQa48gsr.js +0 -1
- package/dist/chunks/client-DuWXRBa0.js +0 -1
- package/dist/chunks/color-tvVGbuuv.js +0 -1
- package/dist/chunks/commands-ElmJnxRE.js +0 -1
- package/dist/chunks/commitAttribution-CedoNRL0.js +0 -2
- package/dist/chunks/commitAttribution-D6vYpAMS.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-BwsLImWZ.js +0 -3
- package/dist/chunks/companion-C3hWMSgF.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-BHCIawwx.js +0 -1
- package/dist/chunks/config-Dh0QGc4B.js +0 -1
- package/dist/chunks/context-CSHiU4LG.js +0 -1
- package/dist/chunks/context-noninteractive-CKFY_j1P.js +0 -54
- package/dist/chunks/context-noninteractive-DirFwn0d.js +0 -1
- package/dist/chunks/conversation-DfIv8Jzc.js +0 -1
- package/dist/chunks/conversation-Dyb5kfil.js +0 -1
- package/dist/chunks/copy-BSyDpOx5.js +0 -7
- package/dist/chunks/createSSHSession-PfzB7zZR.js +0 -6
- package/dist/chunks/createSession-Bk6r39b1.js +0 -1
- package/dist/chunks/createSession-DdsaDZoq.js +0 -1
- package/dist/chunks/cronJitterConfig-BFVNIkjD.js +0 -6
- package/dist/chunks/crossProjectResume-CdoH1cwH.js +0 -40
- package/dist/chunks/daemon-CCtZ9wY3.js +0 -2
- package/dist/chunks/datadog-By0GhDXI.js +0 -1
- package/dist/chunks/datadog-CTRRIaBJ.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-BV6CI329.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-qDuBFv-P.js +0 -1
- package/dist/chunks/directoryCompletion-D7EGwonO.js +0 -1
- package/dist/chunks/doctor-BtTsew-G.js +0 -1
- package/dist/chunks/earlyInput-RoVleNEN.js +0 -1
- package/dist/chunks/effort-DSpAOBeU.js +0 -9
- package/dist/chunks/entry-CYCQJU7M.js +0 -14
- package/dist/chunks/env-chR0gV31.js +0 -1
- package/dist/chunks/envLessBridgeConfig-B3o52JMX.js +0 -1
- package/dist/chunks/envLessBridgeConfig-BKs6Mk4e.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-BgaIlRuS.js +0 -1
- package/dist/chunks/export-BOQCWSMm.js +0 -2
- package/dist/chunks/exportRenderer-B-2J3ocI.js +0 -1
- package/dist/chunks/extra-usage-BLVbAE1O.js +0 -1
- package/dist/chunks/extra-usage-S4WYpDn5.js +0 -1
- package/dist/chunks/extra-usage-core-Sq4JALS7.js +0 -1
- package/dist/chunks/extra-usage-noninteractive-BlJVTTwe.js +0 -1
- package/dist/chunks/extraUsage-CMJ1LEPS.js +0 -1
- package/dist/chunks/extractMemories-BpN0fQF-.js +0 -1
- package/dist/chunks/fast-B8a-zz4X.js +0 -1
- package/dist/chunks/fast-OzVowRYW.js +0 -1
- package/dist/chunks/feedback-BZet1Qu_.js +0 -1
- package/dist/chunks/firstPartyEventLogger-DeytNcUC.js +0 -1
- package/dist/chunks/flushGate-CeFJrqgK.js +0 -1
- package/dist/chunks/gates-Be4ovdxj.js +0 -1
- package/dist/chunks/gates-WmmZ-8JT.js +0 -1
- package/dist/chunks/gemini-DExthrur.js +0 -1
- package/dist/chunks/generateRecap-BIFrnTIe.js +0 -1
- package/dist/chunks/generateSessionName-DlC0lhSv.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-BKB2G52c.js +0 -1
- package/dist/chunks/grok-BNxCseLh.js +0 -1
- package/dist/chunks/growthbook-B3_MJJ45.js +0 -1
- package/dist/chunks/heapdump-sPWpCjXq.js +0 -5
- package/dist/chunks/help-BuUi6cM0.js +0 -1
- package/dist/chunks/hooks-5vDlGpNp.js +0 -79
- package/dist/chunks/hooks-CVJA4uQu.js +0 -1
- package/dist/chunks/hostAdapter-BfBHV5nj.js +0 -1
- package/dist/chunks/hostGuard-zim_4F9V.js +0 -1
- package/dist/chunks/ide-DvUftvRn.js +0 -2
- package/dist/chunks/inboundAttachments-CQyeysIk.js +0 -1
- package/dist/chunks/inboundAttachments-CiF42Eku.js +0 -1
- package/dist/chunks/initReplBridge-Bzg5Gx97.js +0 -1
- package/dist/chunks/insights-CvwFcRQt.js +0 -822
- package/dist/chunks/install-github-app-DxxG2VlZ.js +0 -147
- package/dist/chunks/install-slack-app-Bc5m1UFG.js +0 -1
- package/dist/chunks/install-tclc0QHM.js +0 -1
- package/dist/chunks/instrumentation-Dn_FDn6G.js +0 -12
- package/dist/chunks/job-ssZ2ESAX.js +0 -2
- package/dist/chunks/jwtUtils-CpXwh_du.js +0 -1
- package/dist/chunks/keybindings-DVZlobLM.js +0 -2
- package/dist/chunks/lang-BQ--zwb1.js +0 -1
- package/dist/chunks/language-BM5numKK.js +0 -1
- package/dist/chunks/language-CcxtaVJA.js +0 -1
- package/dist/chunks/launchAgentsPlatform-CLwlpK5C.js +0 -1
- package/dist/chunks/launchAutofixPr-vGLlC4Jm.js +0 -18
- package/dist/chunks/launchLocalMemory-DJ4pR8a2.js +0 -3
- package/dist/chunks/launchLocalVault-Cl7Dds3W.js +0 -3
- package/dist/chunks/launchMemoryStores-Czk-a1P6.js +0 -1
- package/dist/chunks/launchOnboarding-66gN_781.js +0 -8
- package/dist/chunks/launchSchedule-Tx5efcfv.js +0 -1
- package/dist/chunks/launchSkillStore-BGPd1KCD.js +0 -1
- package/dist/chunks/launchTeleport-DzXrNn2h.js +0 -3
- package/dist/chunks/launchVault-C5djf6XO.js +0 -1
- package/dist/chunks/loadAgentsDir-DaApSWNv.js +0 -4671
- package/dist/chunks/loadAgentsDir-_BePoo3r.js +0 -1
- package/dist/chunks/loadPluginHooks-GENkKqO8.js +0 -1
- package/dist/chunks/localSearch-BQuH38SB.js +0 -1
- package/dist/chunks/localSearch-BSR9byCr.js +0 -1
- package/dist/chunks/log-CzsijfHZ.js +0 -1
- package/dist/chunks/login-C64M5OdJ.js +0 -1
- package/dist/chunks/login-dkrrvdEl.js +0 -1
- package/dist/chunks/logoV2Utils-D6ceZmK0.js +0 -1
- package/dist/chunks/logout-BITK5qkB.js +0 -1
- package/dist/chunks/magicDocs-KPodA4bi.js +0 -57
- package/dist/chunks/main-D9fUXJiD.js +0 -31
- package/dist/chunks/main-wb2H0Xbt.js +0 -1108
- package/dist/chunks/mappers-D54WYYhL.js +0 -1
- package/dist/chunks/mcp-Bgeq8jbd.js +0 -6
- package/dist/chunks/mcp-CJvRg7ft.js +0 -2
- package/dist/chunks/mcp-Ddvz5we7.js +0 -1
- package/dist/chunks/mcpServer-VYXTzAFl.js +0 -1
- package/dist/chunks/mcpServer-d0863d94.js +0 -1
- package/dist/chunks/memoize-DxwLawI2.js +0 -1
- package/dist/chunks/memory-BNyVCuw9.js +0 -1
- package/dist/chunks/mode-D_L3DNsz.js +0 -2
- package/dist/chunks/model-DevOJk2A.js +0 -1
- package/dist/chunks/model-Dy_oUo2C.js +0 -1
- package/dist/chunks/onChangeAppState-GPs10FBm.js +0 -1
- package/dist/chunks/openai-C0CrRENO.js +0 -10
- package/dist/chunks/overageCreditGrant-DCiIf_SF.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-C9oR06Fa.js +0 -1
- package/dist/chunks/path-B3lx7yHn.js +0 -1
- package/dist/chunks/paths-BZbIj1Z1.js +0 -39
- package/dist/chunks/permissions-DNb8DG22.js +0 -3
- package/dist/chunks/pipeTransport-Cx55TUNu.js +0 -1
- package/dist/chunks/plan-D-RJTUxb.js +0 -1
- package/dist/chunks/platform-CuyedWpe.js +0 -2
- package/dist/chunks/plugin-BV-DabiK.js +0 -1
- package/dist/chunks/pluginAutoupdate-DPciQRLz.js +0 -1
- package/dist/chunks/pluginBlocklist-CtSUf3sp.js +0 -1
- package/dist/chunks/pluginCliCommands-Cbcc-AQq.js +0 -1
- package/dist/chunks/pluginFlagging-D2d7jd4v.js +0 -1
- package/dist/chunks/pluginOperations-rU56uptC.js +0 -2
- package/dist/chunks/pluginStartupCheck-DuhCLRbp.js +0 -1
- package/dist/chunks/pluginStartupCheck-DwY7j_Cg.js +0 -1
- package/dist/chunks/plugins-LbLpZOhz.js +0 -4
- package/dist/chunks/policyLimits-Dl863Z85.js +0 -1
- package/dist/chunks/pollConfig-orFqIbGd.js +0 -1
- package/dist/chunks/poor-2u_yWIRG.js +0 -1
- package/dist/chunks/poorMode-BBr7GGQ3.js +0 -1
- package/dist/chunks/poorMode-DtQVZvON.js +0 -1
- package/dist/chunks/print-BgLbepaC.js +0 -39
- package/dist/chunks/privacy-settings-CC_FyvjV.js +0 -1
- package/dist/chunks/processBashCommand-DnekNzlT.js +0 -1
- package/dist/chunks/processSlashCommand-sLL0pyIW.js +0 -6
- package/dist/chunks/projectContext-D5FgyE-d.js +0 -1
- package/dist/chunks/prompt-DHHypkUR.js +0 -222
- package/dist/chunks/prompt-Dexwn9YP.js +0 -1
- package/dist/chunks/prompt-DhaPVt1T.js +0 -1
- package/dist/chunks/promptEditor-I8ZpszKv.js +0 -4
- package/dist/chunks/protocolHandler-CEsrhel_.js +0 -13
- package/dist/chunks/proxy-CfZp-wce.js +0 -99
- package/dist/chunks/rate-limit-options-B0Iyzr4x.js +0 -1
- package/dist/chunks/rcDebugLog-CF73Wofq.js +0 -11
- package/dist/chunks/referral-Nz20w4pB.js +0 -1
- package/dist/chunks/refresh-DecpoOX1.js +0 -1
- package/dist/chunks/registerProtocol-CAoaYyt8.js +0 -36
- package/dist/chunks/registry-BQdQRu-K.js +0 -1
- package/dist/chunks/release-notes-C0HeOmQY.js +0 -4
- package/dist/chunks/releaseNotes-BDzfbUAu.js +0 -2
- package/dist/chunks/reload-plugins-BZ4LTYY3.js +0 -1
- package/dist/chunks/remote-env-CPalv-BL.js +0 -1
- package/dist/chunks/remoteBridgeCore-B2yFfG6S.js +0 -1
- package/dist/chunks/remoteControlServer-CsnLedUv.js +0 -3
- package/dist/chunks/rename-CQPtjj_Q.js +0 -1
- package/dist/chunks/renderOptions-rmj4Mkls.js +0 -1
- package/dist/chunks/resume-Ycuezjv2.js +0 -2
- package/dist/chunks/runtimeObserver-CW0_wm1t.js +0 -1
- package/dist/chunks/runtimeObserver-DnhLm9O1.js +0 -10
- package/dist/chunks/sandbox-adapter-BOsa-en7.js +0 -1
- package/dist/chunks/sandbox-toggle-Bl5Drxeo.js +0 -1
- package/dist/chunks/searchExtraTools-CgdrY8XO.js +0 -1
- package/dist/chunks/sentry-BN3GTgYM.js +0 -13
- package/dist/chunks/session-ULekTZVn.js +0 -2
- package/dist/chunks/sessionDiscovery-DAmbR6o-.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-C-o5001P.js +0 -1
- package/dist/chunks/sessionMemory-Bg458voj.js +0 -1
- package/dist/chunks/sessionMemory-DR-esdhZ.js +0 -1
- package/dist/chunks/sessionMemoryUtils-DgVGiwjB.js +0 -1
- package/dist/chunks/sessionObserver-C5cujEe6.js +0 -1
- package/dist/chunks/sessionObserver-CQ3PQWgU.js +0 -20
- package/dist/chunks/sessionStorage-BIDUQ8wo.js +0 -1
- package/dist/chunks/sessionTitle-DyexSH43.js +0 -14
- package/dist/chunks/sessionTracing-gKle2qzF.js +0 -11
- package/dist/chunks/settingsSync-BWW4FOMm.js +0 -1
- package/dist/chunks/setup-DX6984LY.js +0 -1
- package/dist/chunks/setup-OvlOCIFL.js +0 -2
- package/dist/chunks/setup-n91rSYO2.js +0 -9
- package/dist/chunks/shadowedRuleDetection-uYIZBoii.js +0 -1
- package/dist/chunks/shellQuote-DgjT8KBA.js +0 -1
- package/dist/chunks/sideQuestion-DIMsNoEc.js +0 -20
- package/dist/chunks/sink-BBn0HwoH.js +0 -1
- package/dist/chunks/sink-DLRpC2qX.js +0 -1
- package/dist/chunks/sinks-BI1hGD9c.js +0 -2
- package/dist/chunks/sinks-DKGE2sSC.js +0 -1
- package/dist/chunks/skill-learning-Dz-Zq-xT.js +0 -5
- package/dist/chunks/skillChangeDetector-C2Te20cK.js +0 -1
- package/dist/chunks/skillGapStore-BFpryJIe.js +0 -5
- package/dist/chunks/skillGapStore-CxPjoWci.js +0 -1
- package/dist/chunks/skillGenerator-BGOIb5p-.js +0 -8
- package/dist/chunks/skillLearning-BRvWwB8E.js +0 -1
- package/dist/chunks/skillLearning-DTo7lCKd.js +0 -1
- package/dist/chunks/skillPanel-DzYZLnuH.js +0 -28
- package/dist/chunks/skillSearchPanel-DrysL5R-.js +0 -21
- package/dist/chunks/skills-CTfNqisc.js +0 -1
- package/dist/chunks/sprites-CHzZCAGE.js +0 -1
- package/dist/chunks/startupProfiler-DnXZaX4A.js +0 -3
- package/dist/chunks/startupProfiler-SOE--nM9.js +0 -1
- package/dist/chunks/stats-D2s-hIY8.js +0 -1
- package/dist/chunks/status-XxrX2kHw.js +0 -1
- package/dist/chunks/statusNoticeHelpers-CUm1pflC.js +0 -1
- package/dist/chunks/stickers-BMh2qjgF.js +0 -1
- package/dist/chunks/tag-FV031rKW.js +0 -11
- package/dist/chunks/tasks-aK2rp8CW.js +0 -1
- package/dist/chunks/teamHelpers-2m66Mr8w.js +0 -1
- package/dist/chunks/teamHelpers-Bg3nHlWr.js +0 -1
- package/dist/chunks/teammateModeSnapshot-BtdUJBKp.js +0 -1
- package/dist/chunks/teammateModeSnapshot-VojvAMbR.js +0 -1
- package/dist/chunks/teleport-4x9eIl8c.js +0 -1
- package/dist/chunks/templateJobs-fEz4DGWh.js +0 -12
- package/dist/chunks/terminalSetup-Cjdlcznm.js +0 -33
- package/dist/chunks/terminalSetup-EirH-l0a.js +0 -1
- package/dist/chunks/theme-BjdEyakL.js +0 -1
- package/dist/chunks/thinkback-CrW3VlCR.js +0 -1
- package/dist/chunks/thinkback-DHyz-lmU.js +0 -1
- package/dist/chunks/thinkback-play-B46ystVF.js +0 -1
- package/dist/chunks/tmux-CvbhsfwG.js +0 -1
- package/dist/chunks/toolEventObserver-CJ68x4wM.js +0 -1
- package/dist/chunks/toolEventObserver-Dak6ETA6.js +0 -1
- package/dist/chunks/toolPool-3CMCh3QU.js +0 -1
- package/dist/chunks/toolPool-BHdCDihh.js +0 -1
- package/dist/chunks/trustedDevice-QhApqKq4.js +0 -1
- package/dist/chunks/trustedDevice-oDn6E85N.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-Ar9zzqz4.js +0 -3
- package/dist/chunks/undercover-D1ieJ54D.js +0 -1
- package/dist/chunks/undercover-DZq2Tf-o.js +0 -31
- package/dist/chunks/up-D-U4wUCe.js +0 -12
- package/dist/chunks/updateCCB-Db3CfFcn.js +0 -11
- package/dist/chunks/upgrade-B28O0zeQ.js +0 -1
- package/dist/chunks/upgrade-BZvNOhEJ.js +0 -1
- package/dist/chunks/upload-DAmbsBq4.js +0 -1
- package/dist/chunks/upstreamproxy-Ci5T_JCo.js +0 -11
- package/dist/chunks/usage-COv9UCxX.js +0 -1
- package/dist/chunks/usage-Dtv3YQf8.js +0 -1
- package/dist/chunks/useMainLoopModel-BpM3dlzJ.js +0 -1
- package/dist/chunks/useManagePlugins-DZ-_Ll9E.js +0 -1
- package/dist/chunks/useMergedTools-INKnp2ij.js +0 -1
- package/dist/chunks/useSearchInput-DobM3JKI.js +0 -1
- package/dist/chunks/useSettingsErrors-DjvaCC5-.js +0 -1
- package/dist/chunks/useVoice-exDfbv1t.js +0 -1
- package/dist/chunks/util-CDzNDmax.js +0 -1
- package/dist/chunks/utils-B0iiiW_p.js +0 -1
- package/dist/chunks/validatePlugin-DaLnfLSC.js +0 -1
- package/dist/chunks/vim-CPKu15l_.js +0 -1
- package/dist/chunks/voice-BcA5h8ya.js +0 -8
- package/dist/chunks/voice-gNxUce-I.js +0 -2
- package/dist/chunks/voiceModeEnabled-CwPbMJ9C.js +0 -1
- package/dist/chunks/voiceModeEnabled-DEwGjUP6.js +0 -1
- package/dist/chunks/voiceStreamSTT-6b3Oslnl.js +0 -1
- package/dist/chunks/voiceStreamSTT-BjX-mTB_.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-Bc6t6VlK.js +0 -1
- package/dist/chunks/worktree-NnuvJmoP.js +0 -1
- package/dist/chunks/xml-Dg8-vY8G.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
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,J as o,Ln as s,Rn as c,Ut as l,_ as u,a as d,b as f,f as p,i as m,n as h,o as g,p as ee,r as te,t as _,tt as ne,x as v,xt as y}from"./src-Di342QoJ.js";import{t as b}from"./jsx-runtime-D-D469L8.js";import{cn as re,ot as x}from"./state-sIHsFpDu.js";import{Bo as S,Po as C,Ro as w,Vo as T,Xa as E,Xs as D,jo as O,nc as k,oo as A}from"./paths-BZbIj1Z1.js";import{E as j,w as M}from"./debug-UI3T040K.js";import{H as ie,HS as ae,K as oe,Lx as N,Rx as P,U as se,Ux as ce,V as le,VS as ue,Vo as de,W as fe,WS as pe,Wx as F,dA as I,hD as me,mA as L,mD as R,q as z,qw as he,uD as B,vo as ge,vp as _e,vu as V,yp as ve,yu as ye}from"./loadAgentsDir-DaApSWNv.js";import{t as be}from"./useKeybinding-FsOnjW6T.js";import{l as xe,u as Se}from"./referral-Nz20w4pB.js";import{n as Ce,t as we}from"./AddWorkspaceDirectory-LhW1QZFL.js";import{t as Te}from"./SearchBox-DfOmUoaI.js";import{n as Ee,t as De}from"./useSearchInput-DobM3JKI.js";import{n as H,t as Oe}from"./shadowedRuleDetection-uYIZBoii.js";import{n as ke,t as Ae}from"./autoModeDenials-D8eQ1CoM.js";function je({ruleValue:e}){switch(e.toolName){case V.name:return e.ruleContent?e.ruleContent.endsWith(`:*`)?(0,U.jsxs)(f,{dimColor:!0,children:[`Any Bash command starting with `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent.slice(0,-2)})]}):(0,U.jsxs)(f,{dimColor:!0,children:[`The Bash command `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent})]}):(0,U.jsx)(f,{dimColor:!0,children:`Any Bash command`});default:return e.ruleContent?null:(0,U.jsxs)(f,{dimColor:!0,children:[`Any use of the `,(0,U.jsx)(f,{bold:!0,children:e.toolName}),` tool`]})}}var U,Me=e((()=>{c(),_(),ye(),U=b()}));function Ne(e){switch(e){case`localSettings`:return{label:`Project settings (local)`,description:`Saved in ${E(`localSettings`)}`,value:e};case`projectSettings`:return{label:`Project settings`,description:`Checked in at ${E(`projectSettings`)}`,value:e};case`userSettings`:return{label:`User settings`,description:`Saved in at ~/.claude/settings.json`,value:e}}}function Pe({onAddRules:e,onCancel:t,ruleValues:n,ruleBehavior:r,initialContext:i,setToolPermissionContext:a}){let o=D.map(Ne),s=(0,Fe.useCallback)(o=>{if(o===`cancel`){t();return}else if(D.includes(o)){let t=o,s=B(i,{type:`addRules`,rules:n,behavior:r,destination:t});me({type:`addRules`,rules:n,behavior:r,destination:t}),a(s);let c=n.map(e=>({ruleValue:e,ruleBehavior:r,source:t})),l=Oe(s,{sandboxAutoAllowEnabled:I.isSandboxingEnabled()&&I.isAutoAllowBashIfSandboxedEnabled()}).filter(e=>n.some(t=>t.toolName===e.rule.ruleValue.toolName&&t.ruleContent===e.rule.ruleValue.ruleContent));e(c,l.length>0?l:void 0)}},[e,t,n,r,i,a]);return(0,W.jsxs)(p,{title:`Add ${r} permission ${C(n.length,`rule`)}`,onCancel:t,color:`permission`,children:[(0,W.jsx)(v,{flexDirection:`column`,paddingX:2,children:n.map(e=>(0,W.jsxs)(v,{flexDirection:`column`,children:[(0,W.jsx)(f,{bold:!0,children:T(e)}),(0,W.jsx)(je,{ruleValue:e})]},T(e)))}),(0,W.jsxs)(v,{flexDirection:`column`,marginY:1,children:[(0,W.jsx)(f,{children:n.length===1?`Where should this rule be saved?`:`Where should these rules be saved?`}),(0,W.jsx)(N,{options:o,onChange:s})]})]})}var Fe,W,Ie=e((()=>{c(),Fe=t(c(),1),P(),_(),R(),w(),H(),L(),k(),A(),O(),Me(),W=b()}));function Le({onCancel:e,onSubmit:t,ruleBehavior:n}){let[a,s]=(0,Re.useState)(``),[c,l]=(0,Re.useState)(0),u=Se();ne(`confirm:no`,e,{context:`Settings`});let{columns:d}=i(),p=d-6;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,G.jsxs)(f,{bold:!0,color:`permission`,children:[`Add `,n,` permission rule`]}),(0,G.jsxs)(v,{flexDirection:`column`,children:[(0,G.jsxs)(f,{children:[`Permission rules are a tool name, optionally followed by a specifier in parentheses.`,(0,G.jsx)(o,{}),`e.g., `,(0,G.jsx)(f,{bold:!0,children:T({toolName:_e.name})}),(0,G.jsx)(f,{bold:!1,children:` or `}),(0,G.jsx)(f,{bold:!0,children:T({toolName:V.name,ruleContent:`ls:*`})})]}),(0,G.jsx)(v,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,G.jsx)(ce,{showCursor:!0,value:a,onChange:s,onSubmit:e=>{let r=e.trim();r.length!==0&&t(S(r),n)},placeholder:`Enter permission rule${r.ellipsis}`,columns:p,cursorOffset:c,onChangeCursorOffset:l})})]})]}),(0,G.jsx)(v,{marginLeft:3,children:u.pending?(0,G.jsxs)(f,{dimColor:!0,children:[`Press `,u.keyName,` again to exit`]}):(0,G.jsx)(f,{dimColor:!0,children:`Enter to submit · Esc to cancel`})})]})}var Re,G,ze=e((()=>{n(),c(),Re=t(c(),1),F(),xe(),he(),_(),be(),ye(),ve(),w(),G=b()}));function Be({onHeaderFocusChange:e,onStateChange:t}){let{headerFocused:n,focusHeader:r}=m();(0,K.useEffect)(()=>{e?.(n)},[n,e]);let[i]=(0,K.useState)(()=>Ae()),[a,o]=(0,K.useState)(()=>new Set),[s,c]=(0,K.useState)(()=>new Set),[l,u]=(0,K.useState)(0);(0,K.useEffect)(()=>{t({approved:a,retry:s,denials:i})},[a,s,i,t]);let d=(0,K.useCallback)(e=>{let t=Number(e);o(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),p=(0,K.useCallback)(e=>{u(Number(e))},[]);if(y((e,t)=>{e===`r`&&(c(e=>{let t=new Set(e);return t.has(l)?t.delete(l):t.add(l),t}),o(e=>{if(e.has(l))return e;let t=new Set(e);return t.add(l),t}))},{isActive:i.length>0}),i.length===0)return(0,q.jsx)(f,{dimColor:!0,children:`No recent denials. Commands denied by the auto mode classifier will appear here.`});let h=i.map((e,t)=>{let n=a.has(t),r=s.has(t)?` (retry)`:``;return{label:(0,q.jsxs)(f,{children:[(0,q.jsx)(g,{status:n?`success`:`error`,withSpace:!0}),e.display,(0,q.jsx)(f,{dimColor:!0,children:r})]}),value:String(t)}});return(0,q.jsxs)(v,{flexDirection:`column`,children:[(0,q.jsx)(f,{children:`Commands recently denied by the auto mode classifier.`}),(0,q.jsx)(v,{marginTop:1,children:(0,q.jsx)(N,{options:h,onChange:d,onFocus:p,visibleOptionCount:Math.min(10,h.length),isDisabled:n,onUpFromFirstItem:r})})]})}var K,q,Ve=e((()=>{c(),K=t(c(),1),_(),ke(),P(),q=b()}));function He({directoryPath:e,onRemove:t,onCancel:n,permissionContext:r,setPermissionContext:i}){let a=(0,J.useCallback)(()=>{i(B(r,{type:`removeDirectories`,directories:[e],destination:`session`})),t()},[e,r,i,t]),o=(0,J.useCallback)(e=>{e===`yes`?a():n()},[a,n]);return(0,Y.jsxs)(p,{title:`Remove directory from workspace?`,onCancel:n,color:`error`,children:[(0,Y.jsx)(v,{marginX:2,flexDirection:`column`,children:(0,Y.jsx)(f,{bold:!0,children:e})}),(0,Y.jsx)(f,{children:`Claude Code will no longer have access to files in this directory.`}),(0,Y.jsx)(N,{onChange:o,onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]})}var J,Y,Ue=e((()=>{c(),J=t(c(),1),P(),_(),R(),Y=b()}));function We({onExit:e,toolPermissionContext:t,onRequestAddDirectory:n,onRequestRemoveDirectory:i,onHeaderFocusChange:a}){let{headerFocused:o,focusHeader:s}=m();(0,X.useEffect)(()=>{a?.(o)},[o,a]);let c=Ge.useMemo(()=>Array.from(t.additionalWorkingDirectories.keys()).map(e=>({path:e,isCurrent:!1,isDeletable:!0})),[t.additionalWorkingDirectories]),l=(0,X.useCallback)(e=>{if(e===`add-directory`){n();return}let t=c.find(t=>t.path===e);t&&t.isDeletable&&i(t.path)},[c,n,i]),u=(0,X.useCallback)(()=>e(`Workspace dialog dismissed`,{display:`system`}),[e]),d=Ge.useMemo(()=>{let e=c.map(e=>({label:e.path,value:e.path}));return e.push({label:`Add directory${r.ellipsis}`,value:`add-directory`}),e},[c]);return(0,Z.jsxs)(v,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsxs)(v,{flexDirection:`row`,marginTop:1,marginLeft:2,gap:1,children:[(0,Z.jsx)(f,{children:`- ${x()}`}),(0,Z.jsx)(f,{dimColor:!0,children:`(Original working directory)`})]}),(0,Z.jsx)(N,{options:d,onChange:l,onCancel:u,visibleOptionCount:Math.min(10,d.length),onUpFromFirstItem:s,isDisabled:o})]})}var Ge,X,Z,Ke=e((()=>{n(),Ge=t(c(),1),X=t(c(),1),re(),P(),_(),Z=b()}));function qe({rule:e}){return(0,$.jsx)(f,{dimColor:!0,children:`From ${z(e.source)}`})}function Je(e){switch(e){case`allow`:return`allowed`;case`deny`:return`denied`;case`ask`:return`ask`}}function Ye({rule:e,onDelete:t,onCancel:n}){let r=Se();ne(`confirm:no`,n,{context:`Confirmation`});let i=(0,$.jsxs)(v,{flexDirection:`column`,marginX:2,children:[(0,$.jsx)(f,{bold:!0,children:T(e.ruleValue)}),(0,$.jsx)(je,{ruleValue:e.ruleValue}),(0,$.jsx)(qe,{rule:e})]}),a=(0,$.jsx)(v,{marginLeft:3,children:r.pending?(0,$.jsxs)(f,{dimColor:!0,children:[`Press `,r.keyName,` again to exit`]}):(0,$.jsx)(f,{dimColor:!0,children:`Esc to cancel`})});return e.source===`policySettings`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,$.jsx)(f,{bold:!0,color:`permission`,children:`Rule details`}),i,(0,$.jsxs)(f,{italic:!0,children:[`This rule is configured by managed settings and cannot be modified.`,`
|
|
2
|
-
`,`Contact your system administrator for more information.`]})]}),a]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`error`,children:[(0,$.jsxs)(f,{bold:!0,color:`error`,children:[`Delete `,Je(e.ruleBehavior),` tool?`]}),i,(0,$.jsx)(f,{children:`Are you sure you want to delete this permission rule?`}),(0,$.jsx)(N,{onChange:e=>e===`yes`?t():n(),onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]}),a]})}function Xe(e){let{options:t,searchQuery:n,isSearchMode:r,isFocused:i,onSelect:a,onCancel:o,lastFocusedRuleKey:s,cursorOffset:c,onHeaderFocusChange:l}=e,f=d(),{headerFocused:p,focusHeader:h,blurHeader:g}=m();return(0,Q.useEffect)(()=>{r&&p&&g()},[r,p,g]),(0,Q.useEffect)(()=>{l?.(p)},[p,l]),(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(v,{marginBottom:1,flexDirection:`column`,children:(0,$.jsx)(u,{query:n,isFocused:r&&!p,isTerminalFocused:i,width:f,cursorOffset:c})}),(0,$.jsx)(N,{options:t,onChange:a,onCancel:o,visibleOptionCount:Math.min(10,t.length),isDisabled:r||p,defaultFocusValue:s,onUpFromFirstItem:h})]})}function Ze({tab:e,getRulesOptions:t,handleToolSelect:n,...r}){return(0,$.jsxs)(v,{flexDirection:`column`,flexShrink:e===`allow`?0:void 0,children:[(0,$.jsx)(f,{children:{allow:`Claude Code won't ask before using allowed tools.`,ask:`Claude Code will always ask for confirmation before using these tools.`,deny:`Claude Code will always reject requests to use denied tools.`}[e]}),(0,$.jsx)(Xe,{options:t(e,r.searchQuery).options,onSelect:t=>n(t,e),...r})]})}function Qe({onExit:e,initialTab:t,onRetryDenials:n}){let i=Ae().length>0,o=t??(i?`recent`:`allow`),[s,c]=(0,Q.useState)([]),u=ae(e=>e.toolPermissionContext),d=pe(),p=l(),m=(0,Q.useRef)({approved:new Set,retry:new Set,denials:[]}),g=(0,Q.useCallback)(e=>{m.current=e},[]),[_,y]=(0,Q.useState)(),[b,re]=(0,Q.useState)(),[x,S]=(0,Q.useState)(null),[C,w]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(null),[A,M]=(0,Q.useState)(!1),[oe,N]=(0,Q.useState)(!0),P=(0,Q.useCallback)(e=>{N(e)},[]),ce=(0,Q.useMemo)(()=>{let e=new Map;return ie(u).forEach(t=>{e.set(j(t),t)}),e},[u]),ue=(0,Q.useMemo)(()=>{let e=new Map;return fe(u).forEach(t=>{e.set(j(t),t)}),e},[u]),de=(0,Q.useMemo)(()=>{let e=new Map;return se(u).forEach(t=>{e.set(j(t),t)}),e},[u]),F=(0,Q.useCallback)((e,t=``)=>{let n=(()=>{switch(e){case`allow`:return ce;case`deny`:return ue;case`ask`:return de;case`workspace`:case`recent`:return new Map}})(),i=[];e!==`workspace`&&e!==`recent`&&!t&&i.push({label:`Add a new rule${r.ellipsis}`,value:`add-new-rule`});let a=Array.from(n.keys()).sort((e,t)=>{let r=n.get(e),i=n.get(t);if(r&&i){let e=T(r.ruleValue).toLowerCase(),t=T(i.ruleValue).toLowerCase();return e.localeCompare(t)}return 0}),o=t.toLowerCase();for(let e of a){let r=n.get(e);if(r){let n=T(r.ruleValue);if(t&&!n.toLowerCase().includes(o))continue;i.push({label:n,value:e})}}return{options:i,rulesByKey:n}},[ce,ue,de]),I=Se(),L=!_&&!x&&!C&&!E&&!O,{query:R,setQuery:z,cursorOffset:he}=Ee({isActive:L&&A,onExit:()=>{M(!1)}}),ge=(0,Q.useCallback)(e=>{L&&(A||e.ctrl||e.meta||(e.key===`/`?(e.preventDefault(),M(!0),z(``)):e.key.length===1&&e.key!==`j`&&e.key!==`k`&&e.key!==`m`&&e.key!==`i`&&e.key!==`r`&&e.key!==` `&&(e.preventDefault(),M(!0),z(e.key))))},[L,A,z]),_e=(0,Q.useCallback)((e,t)=>{let{rulesByKey:n}=F(t);if(e===`add-new-rule`){S(t);return}else{y(n.get(e));return}},[F]),V=(0,Q.useCallback)(()=>{S(null)},[]),ve=(0,Q.useCallback)((e,t)=>{w({ruleValue:e,ruleBehavior:t}),S(null)},[]),ye=(0,Q.useCallback)((e,t)=>{w(null);for(let t of e)c(e=>[...e,`Added ${t.ruleBehavior} rule ${a.bold(T(t.ruleValue))}`]);if(t&&t.length>0)for(let e of t){let t=e.shadowType===`deny`?`blocked`:`shadowed`;c(n=>[...n,a.yellow(`${r.warning} Warning: ${T(e.rule.ruleValue)} is ${t}`),a.dim(` ${e.reason}`),a.dim(` Fix: ${e.fix}`)])}},[]),be=(0,Q.useCallback)(()=>{w(null)},[]),xe=(0,Q.useCallback)(()=>D(!0),[]),Ce=(0,Q.useCallback)(e=>k(e),[]),Te=(0,Q.useCallback)(()=>{let t=m.current,r=e=>Array.from(e).map(e=>t.denials[e]).filter(e=>e!==void 0),i=r(t.retry);if(i.length>0){let t=i.map(e=>e.display);n?.(t),e(void 0,{shouldQuery:!0,metaMessages:[`Permission granted for: ${t.join(`, `)}. You may now retry ${t.length===1?`this command`:`these commands`} if you would like.`]});return}let o=r(t.approved);o.length>0||s.length>0?e([...o.length>0?[`Approved ${o.map(e=>a.bold(e.display)).join(`, `)}`]:[],...s].join(`
|
|
3
|
-
`)):e(`Permissions dialog dismissed`,{display:`system`})},[s,e,n]);ne(`confirm:no`,Te,{context:`Settings`,isActive:L&&!A});let De=()=>{if(!_)return;let{options:e}=F(_.ruleBehavior),t=j(_),n=e.filter(e=>e.value!==`add-new-rule`).map(e=>e.value),r=n.indexOf(t),i;r!==-1&&(r<n.length-1?i=n[r+1]:r>0&&(i=n[r-1])),re(i),le({rule:_,initialContext:u,setToolPermissionContext(e){d(t=>({...t,toolPermissionContext:e}))}}),c(e=>[...e,`Deleted ${_.ruleBehavior} rule ${a.bold(T(_.ruleValue))}`]),y(void 0)};if(_)return(0,$.jsx)(Ye,{rule:_,onDelete:De,onCancel:()=>y(void 0)});if(x&&x!==`workspace`&&x!==`recent`)return(0,$.jsx)(Le,{onCancel:V,onSubmit:ve,ruleBehavior:x});if(C)return(0,$.jsx)(Pe,{onAddRules:ye,onCancel:be,ruleValues:[C.ruleValue],ruleBehavior:C.ruleBehavior,initialContext:u,setToolPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});if(E)return(0,$.jsx)(we,{onAddDirectory:(e,t)=>{let n={type:`addDirectories`,directories:[e],destination:t?`localSettings`:`session`},r=B(u,n);d(e=>({...e,toolPermissionContext:r})),t&&me(n),c(n=>[...n,`Added directory ${a.bold(e)} to workspace${t?` and saved to local settings`:` for this session`}`]),D(!1)},onCancel:()=>D(!1),permissionContext:u});if(O)return(0,$.jsx)(He,{directoryPath:O,onRemove:()=>{c(e=>[...e,`Removed directory ${a.bold(O)} from workspace`]),k(null)},onCancel:()=>k(null),permissionContext:u,setPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});let H={searchQuery:R,isSearchMode:A,isFocused:p,onCancel:Te,lastFocusedRuleKey:b,cursorOffset:he,getRulesOptions:F,handleToolSelect:_e,onHeaderFocusChange:P};return(0,$.jsx)(v,{flexDirection:`column`,onKeyDown:ge,children:(0,$.jsxs)(ee,{color:`permission`,children:[(0,$.jsxs)(te,{title:`Permissions:`,color:`permission`,defaultTab:o,hidden:!!_||!!x||!!C||E||!!O,initialHeaderFocused:!i,navFromContent:!A,children:[(0,$.jsx)(h,{id:`recent`,title:`Recently denied`,children:(0,$.jsx)(Be,{onHeaderFocusChange:P,onStateChange:g})}),(0,$.jsx)(h,{id:`allow`,title:`Allow`,children:(0,$.jsx)(Ze,{tab:`allow`,...H})}),(0,$.jsx)(h,{id:`ask`,title:`Ask`,children:(0,$.jsx)(Ze,{tab:`ask`,...H})}),(0,$.jsx)(h,{id:`deny`,title:`Deny`,children:(0,$.jsx)(Ze,{tab:`deny`,...H})}),(0,$.jsx)(h,{id:`workspace`,title:`Workspace`,children:(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(f,{children:`Claude Code can read files in the workspace, and make edits when auto-accept edits is on.`}),(0,$.jsx)(We,{onExit:e,toolPermissionContext:u,onRequestAddDirectory:xe,onRequestRemoveDirectory:Ce,onHeaderFocusChange:P})]})})]}),(0,$.jsx)(v,{marginTop:1,paddingLeft:1,children:(0,$.jsx)(f,{dimColor:!0,children:I.pending?(0,$.jsxs)($.Fragment,{children:[`Press `,I.keyName,` again to exit`]}):oe?(0,$.jsx)($.Fragment,{children:`←/→ tab switch · ↓ return · Esc cancel`}):A?(0,$.jsx)($.Fragment,{children:`Type to filter · Enter/↓ select · ↑ tabs · Esc clear`}):i&&o===`recent`?(0,$.jsx)($.Fragment,{children:`Enter approve · r retry · ↑↓ navigate · ←/→ switch · Esc cancel`}):(0,$.jsx)($.Fragment,{children:`↑↓ navigate · Enter select · Type to search · ←/→ switch · Esc cancel`})})})]})})}var Q,$,$e=e((()=>{s(),n(),c(),Q=t(c(),1),ue(),R(),P(),xe(),De(),_(),be(),ke(),w(),oe(),M(),Te(),Ie(),Ce(),Me(),ze(),Ve(),Ue(),Ke(),$=b()})),et,tt;e((()=>{$e(),de(),et=b(),tt=async(e,t)=>(0,et.jsx)(Qe,{onExit:e,onRetryDenials:e=>{t.setMessages(t=>[...t,ge(e)])}})}))();export{tt as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{o as r}from"./log-CzsijfHZ.js";import{a as i,o as a}from"./teamHelpers-2m66Mr8w.js";import{join as o}from"path";import"fs/promises";import"net";import"events";function s(e){let t=a(e);if(!t)return[];let n=new Set(t.hiddenPaneIds??[]),r=[];for(let e of t.members){if(e.name===`team-lead`)continue;let t=e.isActive===!1?`idle`:`running`;r.push({name:e.name,agentId:e.agentId,agentType:e.agentType,model:e.model,prompt:e.prompt,status:t,color:e.color,tmuxPaneId:e.tmuxPaneId,cwd:e.cwd,worktreePath:e.worktreePath,isHidden:n.has(e.tmuxPaneId),backendType:e.backendType,mode:e.mode})}return r}var c=e((()=>{i()}));function l(){return o(t(),`pipes`)}function u(e){return e?.pipeIpc??d}var d,f=e((()=>{n(),r(),d={role:`main`,subIndex:null,displayRole:`main`,serverName:null,attachedBy:null,localIp:null,hostname:null,machineId:null,mac:null,statusVisible:!1,selectorOpen:!1,selectedPipes:[],routeMode:`selected`,slaves:{},discoveredPipes:[]}}));export{c as a,s as i,l as n,f as r,u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{cn as o,rn as s}from"./state-sIHsFpDu.js";import{Jv as c,Qv as l,Yv as u,_x as d,cx as f,j as p,mD as m,uD as h,w as g}from"./loadAgentsDir-DaApSWNv.js";import{a as _,i as v,r as y,t as b}from"./promptEditor-I8ZpszKv.js";import{r as x,t as S}from"./staticRender-Br64h1E1.js";function C({planContent:e,planPath:t,editorName:r}){return(0,T.jsxs)(i,{flexDirection:`column`,children:[(0,T.jsx)(n,{bold:!0,children:`Current Plan`}),(0,T.jsx)(n,{dimColor:!0,children:t}),(0,T.jsx)(i,{marginTop:1,children:(0,T.jsx)(n,{children:e})}),r&&(0,T.jsxs)(i,{marginTop:1,children:[(0,T.jsx)(n,{dimColor:!0,children:`"/plan open"`}),(0,T.jsx)(n,{dimColor:!0,children:` to edit this plan in `}),(0,T.jsx)(n,{bold:!0,dimColor:!0,children:r})]})]})}async function w(e,t,n){let{getAppState:r,setAppState:i}=t,a=r().toolPermissionContext.mode;if(a!==`plan`){s(a,`plan`),i(e=>({...e,toolPermissionContext:h(p(e.toolPermissionContext),{type:`setMode`,mode:`plan`,destination:`session`})}));let t=n.trim();return t&&t!==`open`?e(`Enabled plan mode`,{shouldQuery:!0}):e(`Enabled plan mode`),null}let o=c(),l=u();if(!o)return e(`Already in plan mode. No plan written yet.`),null;if(n.trim().split(/\s+/)[0]===`open`){let t=await b(l);return t.error?e(`Failed to open plan in editor: ${t.error}`):e(`Opened plan in editor: ${l}`),null}let f=v();return e(await x((0,T.jsx)(C,{planContent:o,planPath:l,editorName:f?d(f):void 0}))),null}var T;e((()=>{t(),o(),r(),_(),f(),m(),g(),l(),y(),S(),T=a()}))();export{w as call};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{h as r,p as i}from"./debug-UI3T040K.js";import{o as a,s as o}from"./log-CzsijfHZ.js";import{release as s}from"os";import{readFile as c,readdir as l}from"fs/promises";async function u(e){let t=new Set;process.env.P4PORT&&t.add(`perforce`);try{let n=e??i().cwd(),r=new Set(await l(n));for(let[e,n]of h)r.has(e)&&t.add(n)}catch{}return[...t]}var d,f,p,m,h,g=e((()=>{n(),r(),a(),d=[`macos`,`wsl`],f=t(()=>{try{if(process.platform===`darwin`)return`macos`;if(process.platform===`win32`)return`windows`;if(process.platform===`linux`){try{let e=i().readFileSync(`/proc/version`,{encoding:`utf8`});if(e.toLowerCase().includes(`microsoft`)||e.toLowerCase().includes(`wsl`))return`wsl`}catch(e){o(e)}return`linux`}return`unknown`}catch(e){return o(e),`unknown`}}),p=t(()=>{if(process.platform===`linux`)try{let e=i().readFileSync(`/proc/version`,{encoding:`utf8`}),t=e.match(/WSL(\d+)/i);return t&&t[1]?t[1]:e.toLowerCase().includes(`microsoft`)?`1`:void 0}catch(e){o(e);return}}),m=t(async()=>{if(process.platform!==`linux`)return;let e={linuxKernel:s()};try{let t=await c(`/etc/os-release`,`utf8`);for(let n of t.split(`
|
|
2
|
-
`)){let t=n.match(/^(ID|VERSION_ID)=(.*)$/);if(t&&t[1]&&t[2]){let n=t[2].replace(/^"|"$/g,``);t[1]===`ID`?e.linuxDistroId=n:e.linuxDistroVersion=n}}}catch{}return e}),h=[[`.git`,`git`],[`.hg`,`mercurial`],[`.svn`,`svn`],[`.p4config`,`perforce`],[`$tf`,`tfs`],[`.tfvc`,`tfs`],[`.jj`,`jujutsu`],[`.sl`,`sapling`]]}));export{p as a,f as i,u as n,g as o,m as r,d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./PluginSettings-BetzicTb.js";async function a(e,t,n){return(0,o.jsx)(i,{onComplete:e,args:n})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Fc as n,ws as r,xs as i}from"./paths-BZbIj1Z1.js";import{L as a,V as o,d as s,s as c}from"./debug-UI3T040K.js";import{o as l,s as u}from"./log-CzsijfHZ.js";import{As as d,Fs as f,Gs as p,Ks as m,Ms as h,Vs as g,Ys as _}from"./loadAgentsDir-DaApSWNv.js";import{i as v,o as y}from"./xml-Dg8-vY8G.js";import{f as b,s as x}from"./pluginOperations-rU56uptC.js";function S(e){return O=e,k!==null&&k.length>0&&(e(k),k=null),()=>{O=null}}async function C(){let e=await m(),t=g(),n=new Set;for(let[i,a]of Object.entries(e)){let e=t[i]?.autoUpdate;(e===void 0?r(i,a):e)&&n.add(i.toLowerCase())}return n}async function w(e,t){let n=!1;for(let{scope:r}of t)try{let t=await b(e,r);t.success&&!t.alreadyUpToDate?(n=!0,s(`Plugin autoupdate: updated ${e} from ${t.oldVersion} to ${t.newVersion}`)):t.alreadyUpToDate||s(`Plugin autoupdate: failed to update ${e}: ${t.message}`,{level:`warn`})}catch(t){s(`Plugin autoupdate: error updating ${e}: ${a(t)}`,{level:`warn`})}return n?e:null}async function T(e){let t=f(),n=Object.keys(t.plugins);return n.length===0?[]:(await Promise.allSettled(n.map(async n=>{let{marketplace:r}=y(n);if(!r||!e.has(r.toLowerCase()))return null;let i=t.plugins[n];if(!i||i.length===0)return null;let a=i.filter(h);return a.length===0?null:w(n,a)}))).filter(e=>e.status===`fulfilled`&&e.value!==null).map(e=>e.value)}async function E(e){return T(e)}function D(){(async()=>{if(n()){s(`Plugin autoupdate: skipped (auto-updater disabled)`);return}try{let e=await C();if(e.size===0)return;let t=(await Promise.allSettled(Array.from(e).map(async e=>{try{await _(e,void 0,{disableCredentialHelper:!0})}catch(t){s(`Plugin autoupdate: failed to refresh marketplace ${e}: ${a(t)}`,{level:`warn`})}}))).filter(e=>e.status===`rejected`);t.length>0&&s(`Plugin autoupdate: ${t.length} marketplace refresh(es) failed`,{level:`warn`}),s(`Plugin autoupdate: checking installed plugins`);let n=await E(e);n.length>0&&(O?O(n):k=n)}catch(e){u(e)}})()}var O,k,A=e((()=>{x(),t(),c(),o(),l(),d(),p(),v(),i(),O=null,k=null}));export{T as i,A as n,S as r,D as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{L as e,V as t,d as n,s as r}from"./debug-UI3T040K.js";import{As as i,Gs as a,Hs as o,Is as s,qs as c}from"./loadAgentsDir-DaApSWNv.js";import{d as l,s as u}from"./pluginOperations-rU56uptC.js";import{i as d,n as f,r as p,t as m}from"./pluginFlagging-D2d7jd4v.js";u(),r(),t(),i(),a(),p();function h(e,t,n){let r=new Set(t.plugins.map(e=>e.name)),i=`@${n}`,a=[];for(let t of Object.keys(e.plugins)){if(!t.endsWith(i))continue;let e=t.slice(0,-i.length);r.has(e)||a.push(t)}return a}async function g(){await d();let t=s(),r=f(),i=await c(),a=[];for(let s of Object.keys(i))try{let i=await o(s);if(!i.forceRemoveDeletedPlugins)continue;let c=h(t,i,s);for(let i of c){if(i in r)continue;let o=t.plugins[i]??[];if(o.some(e=>e.scope===`user`||e.scope===`project`||e.scope===`local`)){for(let t of o){let{scope:r}=t;if(!(r!==`user`&&r!==`project`&&r!==`local`))try{await l(i,r)}catch(t){n(`Failed to auto-uninstall delisted plugin ${i} from ${r}: ${e(t)}`,{level:`error`})}}await m(i),a.push(i)}}}catch(t){n(`Failed to check for delisted plugins in "${s}": ${e(t)}`,{level:`warn`})}return a}export{g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./figures-gfT9mM8P.js";import{L as n,V as r}from"./debug-UI3T040K.js";import{n as i,r as a}from"./analytics-DqMQntaB.js";import{n as o,o as s}from"./process-DMKLUQIO.js";import{o as c,s as l}from"./log-CzsijfHZ.js";import{Os as u,Q_ as d,X_ as f,Z_ as p,ks as m,rE as h,tE as g}from"./loadAgentsDir-DaApSWNv.js";import{i as _,o as v}from"./xml-Dg8-vY8G.js";import{a as y,c as b,d as x,f as S,i as C,r as w,s as T}from"./pluginOperations-rU56uptC.js";e(),r(),h(),c(),m(),_(),o(),d(),i(),T();function E(e,r,i){l(e);let o=i?`${r} plugin "${i}"`:r===`disable-all`?`disable all plugins`:`${r} plugins`;console.error(`${t.cross} Failed to ${o}: ${n(e)}`);let s=i?(()=>{let{name:e,marketplace:t}=v(i);return{_PROTO_plugin_name:e,...t&&{_PROTO_marketplace_name:t},...f(e,t,u())}})():{};a(`tengu_plugin_command_failed`,{command:r,error_category:p(e),...s}),process.exit(1)}async function D(e,n=`user`){try{console.log(`Installing plugin "${e}"...`);let r=await b(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_installed_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope||n,install_source:`cli-explicit`,...f(i,o,u())}),process.exit(0)}catch(t){E(t,`install`,e)}}async function O(e,n=`user`,r=!1){try{let i=await x(e,n,!r);if(!i.success)throw Error(i.message);console.log(`${t.tick} ${i.message}`);let{name:o,marketplace:s}=v(i.pluginId||e);a(`tengu_plugin_uninstalled_cli`,{_PROTO_plugin_name:o,...s&&{_PROTO_marketplace_name:s},scope:i.scope||n,...f(o,s,u())}),process.exit(0)}catch(t){E(t,`uninstall`,e)}}async function k(e,n){try{let r=await y(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_enabled_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...f(i,o,u())}),process.exit(0)}catch(t){E(t,`enable`,e)}}async function A(e,n){try{let r=await C(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_disabled_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...f(i,o,u())}),process.exit(0)}catch(t){E(t,`disable`,e)}}async function j(){try{let e=await w();if(!e.success)throw Error(e.message);console.log(`${t.tick} ${e.message}`),a(`tengu_plugin_disabled_all_cli`,{}),process.exit(0)}catch(e){E(e,`disable-all`)}}async function M(e,n){try{s(`Checking for updates for plugin "${e}" at ${n} scope…\n`);let r=await S(e,n);if(!r.success)throw Error(r.message);if(s(`${t.tick} ${r.message}\n`),!r.alreadyUpToDate){let{name:t,marketplace:n}=v(r.pluginId||e);a(`tengu_plugin_updated_cli`,{_PROTO_plugin_name:t,...n&&{_PROTO_marketplace_name:n},old_version:r.oldVersion||`unknown`,new_version:r.newVersion||`unknown`,...f(t,n,u())})}await g(0)}catch(t){E(t,`update`,e)}}export{O as a,D as i,A as n,M as o,k as r,j as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,T as n,d as r,h as i,p as a,s as o,w as s}from"./debug-UI3T040K.js";import{o as c,s as l}from"./log-CzsijfHZ.js";import{cA as u,lA as d}from"./loadAgentsDir-DaApSWNv.js";import{join as f}from"path";import{randomBytes as p}from"crypto";import{readFile as m,rename as h,unlink as g,writeFile as _}from"fs/promises";function v(){return f(u(),D)}function y(e){let t=n(e);if(typeof t!=`object`||!t||!(`plugins`in t)||typeof t.plugins!=`object`||t.plugins===null)return{};let r=t.plugins,i={};for(let[e,t]of Object.entries(r))if(t&&typeof t==`object`&&`flaggedAt`in t&&typeof t.flaggedAt==`string`){let n={flaggedAt:t.flaggedAt};`seenAt`in t&&typeof t.seenAt==`string`&&(n.seenAt=t.seenAt),i[e]=n}return i}async function b(){try{return y(await m(v(),{encoding:`utf-8`}))}catch{return{}}}async function x(e){let n=v(),r=`${n}.${p(8).toString(`hex`)}.tmp`;try{await a().mkdir(u()),await _(r,t({plugins:e},null,2),{encoding:`utf-8`,mode:384}),await h(r,n),k=e}catch(e){l(e);try{await g(r)}catch{}}}async function S(){let e=await b(),t=Date.now(),n=!1;for(let[r,i]of Object.entries(e))i.seenAt&&t-new Date(i.seenAt).getTime()>=O&&(delete e[r],n=!0);k=e,n&&await x(e)}function C(){return k??{}}async function w(e){k===null&&(k=await b()),await x({...k,[e]:{flaggedAt:new Date().toISOString()}}),r(`Flagged plugin: ${e}`)}async function T(e){k===null&&(k=await b());let t=new Date().toISOString(),n=!1,r={...k};for(let i of e){let e=r[i];e&&!e.seenAt&&(r[i]={...e,seenAt:t},n=!0)}n&&await x(r)}async function E(e){if(k===null&&(k=await b()),!(e in k))return;let{[e]:t,...n}=k;k=n,await x(n)}var D,O,k,A=e((()=>{o(),i(),c(),s(),d(),D=`flagged-plugins.json`,O=2880*60*1e3,k=null}));export{T as a,S as i,C as n,E as o,A as r,w as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{Po as r,Qa as i,jo as a,lo as o,oo as s}from"./paths-BZbIj1Z1.js";import{K as c,U as l,V as u,h as d,p as f}from"./debug-UI3T040K.js";import{o as p,s as m}from"./log-CzsijfHZ.js";import{As as h,BA as g,Ds as _,Es as v,Fs as y,Fw as ee,Gs as b,Hs as x,Is as S,Ks as C,Ls as w,Lw as te,RA as T,Rs as ne,Ss as E,Ws as D,_s as O,aA as k,ds as re,gs as ie,hc as A,hs as ae,lA as oe,mc as se,ms as j,oh as ce,pc as M,ps as N,sh as P,ws as F,xs as I,ys as L,zA as R}from"./loadAgentsDir-DaApSWNv.js";import{i as z,m as B,o as V,p as H,s as U}from"./xml-Dg8-vY8G.js";import{n as W,t as G}from"./pluginStartupCheck-DuhCLRbp.js";import{dirname as le,join as K}from"path";function q(e){if(!Q.includes(e))throw Error(`Invalid scope "${e}". Must be one of: ${Q.join(`, `)}`)}function ue(e){return Q.includes(e)}function J(e){return e===`project`||e===`local`?n():void 0}function de(e){return i(`projectSettings`)?.enabledPlugins?.[e]===!0}function fe(e){let t=e.includes(`@`);for(let n of[`local`,`project`,`user`]){let r=i(U(n))?.enabledPlugins;if(r){for(let i of Object.keys(r))if(t?i===e:i.startsWith(`${e}@`))return{pluginId:i,scope:n}}}return null}function pe(e,t){let{name:n,marketplace:r}=V(e);return t.find(t=>t.name===e||t.name===n?!0:r&&t.source?t.name===n&&t.source.includes(`@${r}`):!1)}function me(e){let{name:t}=V(e),n=S();if(n.plugins[e]?.length)return{pluginId:e,pluginName:t};let r=Object.keys(n.plugins).find(e=>{let{name:r}=V(e);return r===t&&(n.plugins[e]?.length??0)>0});return r?{pluginId:r,pluginName:t}:null}function Y(e){let t=S().plugins[e];if(!t||t.length===0)return{scope:`user`};let r=n(),i=t.find(e=>e.scope===`local`&&e.projectPath===r);if(i)return{scope:i.scope,projectPath:i.projectPath};let a=t.find(e=>e.scope===`project`&&e.projectPath===r);if(a)return{scope:a.scope,projectPath:a.projectPath};let o=t.find(e=>e.scope===`user`);return o?{scope:o.scope}:{scope:t[0].scope,projectPath:t[0].projectPath}}async function he(e,t=`user`){q(t);let{name:n,marketplace:r}=V(e),i,a,o;if(r){let t=await D(e);t&&(i=t.entry,a=r,o=t.marketplaceInstallLocation)}else{let e=await C();for(let[t,r]of Object.entries(e))try{let e=(await x(t)).plugins.find(e=>e.name===n);if(e){i=e,a=t,o=r.installLocation;break}}catch(e){m(c(e))}}if(!i||!a)return{success:!1,message:`Plugin "${n}" not found in ${r?`marketplace "${r}"`:`any configured marketplace`}`};let s=i,l=`${s.name}@${a}`,u=await F({pluginId:l,entry:s,scope:t,marketplaceInstallLocation:o});if(!u.ok){let e=u;switch(e.reason){case`local-source-no-location`:return{success:!1,message:`Cannot install local plugin "${e.pluginName}" without marketplace install location`};case`settings-write-failed`:return{success:!1,message:`Failed to update settings: ${e.message}`};case`resolution-failed`:return{success:!1,message:I(e.resolution)};case`blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" is blocked by your organization's policy and cannot be installed`};case`dependency-blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" depends on "${e.blockedDependency}", which is blocked by your organization's policy`}}}return{success:!0,message:`Successfully installed plugin: ${l} (scope: ${t})${u.depNote}`,pluginId:l,pluginName:s.name,scope:t}}async function ge(e,t=`user`,n=!0){q(t);let{enabled:r,disabled:a}=await O(),s=[...r,...a],c=pe(e,s),l=U(t),u=i(l),d,f;if(c)d=Object.keys(u?.enabledPlugins??{}).find(t=>t===e||t===c.name||t.startsWith(`${c.name}@`))??(e.includes(`@`)?e:c.name),f=c.name;else{let t=me(e);if(!t)return{success:!1,message:`Plugin "${e}" not found in installed plugins`};d=t.pluginId,f=t.pluginName}let p=J(t),m=S().plugins[d],h=m?.find(e=>e.scope===t&&e.projectPath===p);if(!h){let{scope:n}=Y(d);return n!==t&&m&&m.length>0?n===`project`?{success:!1,message:`Plugin "${e}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: claude plugin disable ${e} --scope local`}:{success:!1,message:`Plugin "${e}" is installed in ${n} scope, not ${t}. Use --scope ${n} to uninstall.`}:{success:!1,message:`Plugin "${e}" is not installed in ${t} scope. Use --scope to specify the correct scope.`}}let g=h.installPath,_={...u?.enabledPlugins};_[d]=void 0,o(l,{enabledPlugins:_}),M(),w(d,t,p);let v=S().plugins[d],y=!v||v.length===0;y&&g&&await A(g),y&&(ee(d),n&&await k(d));let b=T(d,s),x=R(b);return{success:!0,message:`Successfully uninstalled plugin: ${f} (scope: ${t})${x}`,pluginId:d,pluginName:f,scope:t,reverseDependents:b.length>0?b:void 0}}async function X(e,t,n){let r=t?`enable`:`disable`;if(B(e)){let{error:n}=o(`userSettings`,{enabledPlugins:{...i(`userSettings`)?.enabledPlugins,[e]:t}});if(n)return{success:!1,message:`Failed to ${r} built-in plugin: ${n.message}`};M();let{name:a}=V(e);return{success:!0,message:`Successfully ${r}d built-in plugin: ${a}`,pluginId:e,pluginName:a,scope:`user`}}n&&q(n);let a,s,c=fe(e);if(n)if(s=n,c)a=c.pluginId;else if(e.includes(`@`))a=e;else return{success:!1,message:`Plugin "${e}" not found in settings. Use plugin@marketplace format.`};else if(c)a=c.pluginId,s=c.scope;else if(e.includes(`@`))a=e,s=`user`;else return{success:!1,message:`Plugin "${e}" not found in any editable settings scope. Use plugin@marketplace format.`};if(t&&P(a))return{success:!1,message:`Plugin "${a}" is blocked by your organization's policy and cannot be enabled`};let l=U(s),u=i(l)?.enabledPlugins?.[a],d={user:0,project:1,local:2},f=n&&c&&d[n]>d[c.scope];if(n&&u===void 0&&c&&c.scope!==n&&!f)return{success:!1,message:`Plugin "${e}" is installed at ${c.scope} scope, not ${n}. Use --scope ${c.scope} or omit --scope to auto-detect.`};if(t===(n&&!f?u===!0:G().has(a)))return{success:!1,message:`Plugin "${e}" is already ${t?`enabled`:`disabled`}${n?` at ${n} scope`:``}`};let p;if(!t){let{enabled:e,disabled:t}=await O(),n=T(a,[...e,...t]);n.length>0&&(p=n)}let{error:m}=o(l,{enabledPlugins:{...i(l)?.enabledPlugins,[a]:t}});if(m)return{success:!1,message:`Failed to ${r} plugin: ${m.message}`};M();let{name:h}=V(a),g=R(p);return{success:!0,message:`Successfully ${r}d plugin: ${h} (scope: ${s})${g}`,pluginId:a,pluginName:h,scope:s,reverseDependents:p}}async function _e(e,t){return X(e,!0,t)}async function ve(e,t){return X(e,!1,t)}async function Z(){let e=G();if(e.size===0)return{success:!0,message:`No enabled plugins to disable`};let t=[],n=[];for(let[r]of e){let e=await X(r,!1);e.success?t.push(r):n.push(`${r}: ${e.message}`)}return n.length>0?{success:!1,message:`Disabled ${t.length} ${r(t.length,`plugin`)}, ${n.length} failed:\n${n.join(`
|
|
2
|
-
`)}`}:{success:!0,message:`Disabled ${t.length} ${r(t.length,`plugin`)}`}}async function ye(e,t){let{name:n,marketplace:r}=V(e),i=r?`${n}@${r}`:e,a=await D(e);if(!a)return{success:!1,message:`Plugin "${n}" not found`,pluginId:i,scope:t};let{entry:o,marketplaceInstallLocation:s}=a,c=y().plugins[i];if(!c||c.length===0)return{success:!1,message:`Plugin "${n}" is not installed`,pluginId:i,scope:t};let l=J(t),u=c.find(e=>e.scope===t&&e.projectPath===l);return u?be({pluginId:i,pluginName:n,entry:o,marketplaceInstallLocation:s,installation:u,scope:t,projectPath:l}):{success:!1,message:`Plugin "${n}" is not installed at scope ${l?`${t} (${l})`:t}`,pluginId:i,scope:t}}async function be({pluginId:e,pluginName:t,entry:n,marketplaceInstallLocation:r,installation:i,scope:a,projectPath:o}){let s=f(),c=i.version,u,d,p=!1,m;if(typeof n.source!=`string`){let t=await re(n.source,{manifest:{name:n.name}});u=t.path,p=!0,m=t.gitCommitSha,d=await v(e,n.source,t.manifest,t.path,n.version,t.gitCommitSha)}else{let t;try{t=await s.stat(r)}catch(t){if(l(t))return{success:!1,message:`Marketplace directory not found at ${r}`,pluginId:e,scope:a};throw t}u=K(t.isDirectory()?r:le(r),n.source);try{await s.stat(u)}catch(t){if(l(t))return{success:!1,message:`Plugin source not found at ${u}`,pluginId:e,scope:a};throw t}let i,o=K(u,`.claude-plugin`,`plugin.json`);try{i=await L(o,n.name,n.source)}catch{}d=await v(e,n.source,i,u,n.version)}try{let r=j(e,d),s=ae(e,d);if(i.version===d||i.installPath===r||i.installPath===s)return{success:!0,message:`${t} is already at the latest version (${d}).`,pluginId:e,newVersion:d,oldVersion:c,alreadyUpToDate:!0,scope:a};r=await N(u,e,d,n);let l=i.installPath;if(ne(e,a,o,r,d,m),l&&l!==r){let e=y();Object.values(e.plugins).some(e=>e.some(e=>e.installPath===l))||await A(l)}let f=o?`${a} (${o})`:a;return{success:!0,message:`Plugin "${t}" updated from ${c||`unknown`} to ${d} for scope ${f}. Restart to apply changes.`,pluginId:e,newVersion:d,oldVersion:c,scope:a}}finally{p&&u!==j(e,d)&&await s.rm(u,{recursive:!0,force:!0})}}var Q,$,xe=e((()=>{t(),H(),u(),d(),p(),se(),g(),h(),b(),oe(),z(),E(),ie(),te(),ce(),W(),_(),s(),a(),Q=[`user`,`project`,`local`],$=[`user`,`project`,`local`,`managed`]}));export{_e as a,he as c,ge as d,ye as f,ve as i,ue as l,$ as n,Y as o,Z as r,xe as s,Q as t,de as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Cs as t,Qa as n,lo as r,oo as i,xs as a}from"./paths-BZbIj1Z1.js";import{d as o,s}from"./debug-UI3T040K.js";import{n as c,t as l}from"./cwd--iizewsn.js";import{o as u,s as d}from"./log-CzsijfHZ.js";import{As as f,Gs as p,HA as m,Ss as h,Ts as g,VA as _,Ws as v,bs as y}from"./loadAgentsDir-DaApSWNv.js";import{i as b,s as x}from"./xml-Dg8-vY8G.js";import{join as S}from"path";function C(){let e=new Map,t=_();for(let[n,r]of Object.entries(t))n.includes(`@`)&&(r===!0?e.set(n,`flag`):r===!1&&e.delete(n));for(let{scope:r,source:i}of[{scope:`managed`,source:`policySettings`},{scope:`user`,source:`userSettings`},{scope:`project`,source:`projectSettings`},{scope:`local`,source:`localSettings`},{scope:`flag`,source:`flagSettings`}]){let a=n(i);if(a?.enabledPlugins)for(let[n,s]of Object.entries(a.enabledPlugins))n.includes(`@`)&&(n in t&&t[n]!==s&&o(`Plugin ${n} from --add-dir (${t[n]}) overridden by ${i} (${s})`),s===!0?e.set(n,r):s===!1&&e.delete(n))}return o(`Found ${e.size} enabled plugins with scopes: ${Array.from(e.entries()).map(([e,t])=>`${e}(${t})`).join(`, `)}`),e}async function w(e,i,a=`user`){let o=a===`user`?void 0:l(),s=x(a),c=n(s),u={...c?.enabledPlugins},f=[],p=[];for(let n=0;n<e.length;n++){let r=e[n];if(r){i&&i(r,n+1,e.length);try{let e=await v(r);if(!e){p.push({name:r,error:`Plugin not found in any marketplace`});continue}let{entry:n,marketplaceInstallLocation:i}=e;t(n.source)?g({pluginId:r,installPath:S(i,n.source),version:n.version},a,o):await y(r,n,a,o),u[r]=!0,f.push(r)}catch(e){let t=e instanceof Error?e.message:String(e);p.push({name:r,error:t}),d(e)}}}return r(s,{...c,enabledPlugins:u}),{installed:f,failed:p}}var T=e((()=>{c(),s(),u(),i(),m(),f(),p(),b(),h(),a()}));export{T as n,w as r,C as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./pluginStartupCheck-DuhCLRbp.js";e();export{t as getPluginEditableScopes};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./figures-gfT9mM8P.js";import{Or as n,cn as r}from"./state-sIHsFpDu.js";import{Po as i,jo as a}from"./paths-BZbIj1Z1.js";import{E as o,L as s,V as c,w as l}from"./debug-UI3T040K.js";import{n as u,r as d}from"./analytics-DqMQntaB.js";import{o as f,s as p}from"./log-CzsijfHZ.js";import{$s as m,As as h,Gs as g,Is as _,Js as v,Ks as y,Nw as ee,Ps as b,Pw as x,UA as S,WA as C,Ys as w,Zs as te,_s as ne,dc as T,gs as E,lc as D,mc as O,pc as k,rc as A,zs as j}from"./loadAgentsDir-DaApSWNv.js";import{i as M,o as N,s as P}from"./xml-Dg8-vY8G.js";import{n as F,t as I}from"./exit-_obETqBv.js";import{n as L,t as R}from"./pluginOperations-rU56uptC.js";import{a as z,i as B,n as V,o as H,r as U,t as W}from"./pluginCliCommands-Cbcc-AQq.js";import{a as re,c as G,i as K,n as q,r as J,s as Y,t as X}from"./validatePlugin-DaLnfLSC.js";import{basename as ie,dirname as Z}from"path";e(),r(),u(),C(),c(),f(),O(),G(),h(),D(),g(),ee(),K(),M(),E(),X(),l(),a();function Q(e,n){p(e),I(`${t.cross} Failed to ${n}: ${s(e)}`)}function $(e){e.errors.length>0&&(console.log(`${t.cross} Found ${e.errors.length} ${i(e.errors.length,`error`)}:\n`),e.errors.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``)),e.warnings.length>0&&(console.log(`${t.warning} Found ${e.warnings.length} ${i(e.warnings.length,`warning`)}:\n`),e.warnings.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``))}async function ae(e,r){r.cowork&&n(!0);try{let n=await q(e);console.log(`Validating ${n.fileType} manifest: ${n.filePath}\n`),$(n);let r=[];if(n.fileType===`plugin`){let e=Z(n.filePath);if(ie(e)===`.claude-plugin`){r=await J(Z(e));for(let e of r)console.log(`Validating ${e.fileType}: ${e.filePath}\n`),$(e)}}let i=n.success&&r.every(e=>e.success),a=n.warnings.length>0||r.some(e=>e.warnings.length>0);i?F(a?`${t.tick} Validation passed with warnings`:`${t.tick} Validation passed`):(console.log(`${t.cross} Validation failed`),process.exit(1))}catch(e){p(e),console.error(`${t.cross} Unexpected error during validation: ${s(e)}`),process.exit(2)}}async function oe(e){e.cowork&&n(!0),d(`tengu_plugin_list_command`,{});let r=_(),{getPluginEditableScopes:i}=await import(`./pluginStartupCheck-DwY7j_Cg.js`),a=i(),s=Object.keys(r.plugins),{enabled:c,disabled:l,errors:u}=await ne(),f=[...c,...l],p=f.filter(e=>e.source.endsWith(`@inline`)),m=u.filter(e=>e.source.endsWith(`@inline`)||e.source.startsWith(`inline[`));if(e.json){let t=new Map(f.map(e=>[e.source,e])),n=[];for(let e of s.sort()){let i=r.plugins[e];if(!i||i.length===0)continue;let o=N(e).name,s=u.filter(t=>t.source===e||`plugin`in t&&t.plugin===o).map(S);for(let r of i){let i=t.get(e),o;if(i){let e=i.mcpServers||await x(i);e&&Object.keys(e).length>0&&(o=e)}n.push({id:e,version:r.version||`unknown`,scope:r.scope,enabled:a.has(e),installPath:r.installPath,installedAt:r.installedAt,lastUpdated:r.lastUpdated,projectPath:r.projectPath,mcpServers:o,errors:s.length>0?s:void 0})}}for(let e of p){let t=e.mcpServers||await x(e),r=m.filter(t=>t.source===e.source||`plugin`in t&&t.plugin===e.name).map(S);n.push({id:e.source,version:e.manifest.version??`unknown`,scope:`session`,enabled:e.enabled!==!1,installPath:e.path,mcpServers:t&&Object.keys(t).length>0?t:void 0,errors:r.length>0?r:void 0})}for(let e of m.filter(e=>e.source.startsWith(`inline[`)))n.push({id:e.source,version:`unknown`,scope:`session`,enabled:!1,installPath:`path`in e?e.path:``,errors:[S(e)]});if(e.available){let e=[];try{let[t,n]=await Promise.all([y(),Y()]),{marketplaces:r}=await T(t);for(let{name:t,data:i}of r)if(i)for(let r of i.plugins){let i=A(r.name,t);b(i)||e.push({pluginId:i,name:r.name,description:r.description,marketplaceName:t,version:r.version,source:r.source,installCount:n?.get(i)})}}catch{}F(o({installed:n,available:e},null,2))}else F(o(n,null,2))}s.length===0&&p.length===0&&m.length===0&&F("No plugins installed. Use `claude plugin install` to install a plugin."),s.length>0&&console.log(`Installed plugins:
|
|
2
|
-
`);for(let e of s.sort()){let n=r.plugins[e];if(!n||n.length===0)continue;let i=N(e).name,o=u.filter(t=>t.source===e||`plugin`in t&&t.plugin===i);for(let r of n){let n=a.has(e),i=o.length>0?`${t.cross} failed to load`:n?`${t.tick} enabled`:`${t.cross} disabled`,s=r.version||`unknown`,c=r.scope;console.log(` ${t.pointer} ${e}`),console.log(` Version: ${s}`),console.log(` Scope: ${c}`),console.log(` Status: ${i}`);for(let e of o)console.log(` Error: ${S(e)}`);console.log(``)}}if(p.length>0||m.length>0){console.log(`Session-only plugins (--plugin-dir):
|
|
3
|
-
`);for(let e of p){let n=m.filter(t=>t.source===e.source||`plugin`in t&&t.plugin===e.name),r=n.length>0?`${t.cross} loaded with errors`:`${t.tick} loaded`;console.log(` ${t.pointer} ${e.source}`),console.log(` Version: ${e.manifest.version??`unknown`}`),console.log(` Path: ${e.path}`),console.log(` Status: ${r}`);for(let e of n)console.log(` Error: ${S(e)}`);console.log(``)}for(let e of m.filter(e=>e.source.startsWith(`inline[`)))console.log(` ${t.pointer} ${e.source}: ${t.cross} ${S(e)}\n`)}F()}async function se(e,r){r.cowork&&n(!0);try{let n=await re(e);n||I(`${t.cross} Invalid marketplace source format. Try: owner/repo, https://..., or ./path`),`error`in n&&I(`${t.cross} ${n.error}`);let i=r.scope??`user`;i!==`user`&&i!==`project`&&i!==`local`&&I(`${t.cross} Invalid scope '${i}'. Use: user, project, or local`);let a=P(i),o=n;r.sparse&&r.sparse.length>0&&(o.source===`github`||o.source===`git`?o={...o,sparsePaths:r.sparse}:I(`${t.cross} --sparse is only supported for github and git marketplace sources (got: ${o.source})`)),console.log(`Adding marketplace...`);let{name:s,alreadyMaterialized:c,resolvedSource:l}=await j(o,e=>{console.log(e)});m(s,{source:l},a),k();let u=o.source;o.source===`github`&&(u=o.repo),d(`tengu_marketplace_added`,{source_type:u}),F(c?`${t.tick} Marketplace '${s}' already on disk — declared in ${i} settings`:`${t.tick} Successfully added marketplace: ${s} (declared in ${i} settings)`)}catch(e){Q(e,`add marketplace`)}}async function ce(e){e.cowork&&n(!0);try{let n=await y(),r=Object.keys(n);e.json&&F(o(r.sort().map(e=>{let t=n[e],r=t?.source;return{name:e,source:r?.source,...r?.source===`github`&&{repo:r.repo},...r?.source===`git`&&{url:r.url},...r?.source===`url`&&{url:r.url},...r?.source===`directory`&&{path:r.path},...r?.source===`file`&&{path:r.path},installLocation:t?.installLocation}}),null,2)),r.length===0&&F(`No marketplaces configured`),console.log(`Configured marketplaces:
|
|
4
|
-
`),r.forEach(e=>{let r=n[e];if(console.log(` ${t.pointer} ${e}`),r?.source){let e=r.source;e.source===`github`?console.log(` Source: GitHub (${e.repo})`):e.source===`git`?console.log(` Source: Git (${e.url})`):e.source===`url`?console.log(` Source: URL (${e.url})`):e.source===`directory`?console.log(` Source: Directory (${e.path})`):e.source===`file`&&console.log(` Source: File (${e.path})`)}console.log(``)}),F()}catch(e){Q(e,`list marketplaces`)}}async function le(e,r){r.cowork&&n(!0);try{await te(e),k(),d(`tengu_marketplace_removed`,{marketplace_name:e}),F(`${t.tick} Successfully removed marketplace: ${e}`)}catch(e){Q(e,`remove marketplace`)}}async function ue(e,r){r.cowork&&n(!0);try{if(e)console.log(`Updating marketplace: ${e}...`),await w(e,e=>{console.log(e)}),k(),d(`tengu_marketplace_updated`,{marketplace_name:e}),F(`${t.tick} Successfully updated marketplace: ${e}`);else{let e=await y(),n=Object.keys(e);n.length===0&&F(`No marketplaces configured`),console.log(`Updating ${n.length} marketplace(s)...`),await v(),k(),d(`tengu_marketplace_updated_all`,{count:n.length}),F(`${t.tick} Successfully updated ${n.length} marketplace(s)`)}}catch(e){Q(e,`update marketplace(s)`)}}async function de(e,t){t.cowork&&n(!0);let r=t.scope||`user`;t.cowork&&r!==`user`&&I(`--cowork can only be used with user scope`),R.includes(r)||I(`Invalid scope: ${r}. Must be one of: ${R.join(`, `)}.`);let{name:i,marketplace:a}=N(e);d(`tengu_plugin_install_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r}),await B(e,r)}async function fe(e,t){t.cowork&&n(!0);let r=t.scope||`user`;t.cowork&&r!==`user`&&I(`--cowork can only be used with user scope`),R.includes(r)||I(`Invalid scope: ${r}. Must be one of: ${R.join(`, `)}.`);let{name:i,marketplace:a}=N(e);d(`tengu_plugin_uninstall_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r}),await z(e,r,t.keepData)}async function pe(e,t){t.cowork&&n(!0);let r;t.scope&&(R.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${R.join(`, `)}`),r=t.scope),t.cowork&&r!==void 0&&r!==`user`&&I(`--cowork can only be used with user scope`),t.cowork&&r===void 0&&(r=`user`);let{name:i,marketplace:a}=N(e);d(`tengu_plugin_enable_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r??`auto`}),await U(e,r)}async function me(e,t){if(t.all&&e&&I(`Cannot use --all with a specific plugin`),!t.all&&!e&&I(`Please specify a plugin name or use --all to disable all plugins`),t.cowork&&n(!0),t.all){t.scope&&I(`Cannot use --scope with --all`),d(`tengu_plugin_disable_command`,{}),await W();return}let r;t.scope&&(R.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${R.join(`, `)}`),r=t.scope),t.cowork&&r!==void 0&&r!==`user`&&I(`--cowork can only be used with user scope`),t.cowork&&r===void 0&&(r=`user`);let{name:i,marketplace:a}=N(e);d(`tengu_plugin_disable_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r??`auto`}),await V(e,r)}async function he(e,t){t.cowork&&n(!0);let{name:r,marketplace:i}=N(e);d(`tengu_plugin_update_command`,{_PROTO_plugin_name:r,...i&&{_PROTO_marketplace_name:i}});let a=`user`;t.scope&&(L.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${L.join(`, `)}`),a=t.scope),t.cowork&&a!==`user`&&I(`--cowork can only be used with user scope`),await H(e,a)}export{se as marketplaceAddHandler,ce as marketplaceListHandler,le as marketplaceRemoveHandler,ue as marketplaceUpdateHandler,me as pluginDisableHandler,pe as pluginEnableHandler,de as pluginInstallHandler,oe as pluginListHandler,fe as pluginUninstallHandler,he as pluginUpdateHandler,ae as pluginValidateHandler};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ha as e,Wa as t,Xa as n}from"./loadAgentsDir-DaApSWNv.js";e();export{t as isPolicyAllowed,n as waitForPolicyLimitsToLoad};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Cn as e,wn as t}from"./schemas-BGAvj1T4.js";import{t as n}from"./v4-f1i_CNUT.js";import{S as r,v as i}from"./paths-BZbIj1Z1.js";import{n as a,t as o}from"./lazySchema-2sOku3cX.js";n(),o(),r();var s=2e3,c=6e5,l={poll_interval_ms_not_at_capacity:s,poll_interval_ms_at_capacity:c,non_exclusive_heartbeat_interval_ms:0,multisession_poll_interval_ms_not_at_capacity:s,multisession_poll_interval_ms_partial_capacity:s,multisession_poll_interval_ms_at_capacity:c,reclaim_older_than_ms:5e3,session_keepalive_interval_v2_ms:12e4},u={message:`must be 0 (disabled) or ≥100ms`},d=a(()=>t({poll_interval_ms_not_at_capacity:e().int().min(100),poll_interval_ms_at_capacity:e().int().refine(e=>e===0||e>=100,u),non_exclusive_heartbeat_interval_ms:e().int().min(0).default(0),multisession_poll_interval_ms_not_at_capacity:e().int().min(100).default(l.multisession_poll_interval_ms_not_at_capacity),multisession_poll_interval_ms_partial_capacity:e().int().min(100).default(l.multisession_poll_interval_ms_partial_capacity),multisession_poll_interval_ms_at_capacity:e().int().refine(e=>e===0||e>=100,u).default(l.multisession_poll_interval_ms_at_capacity),reclaim_older_than_ms:e().int().min(1).default(5e3),session_keepalive_interval_v2_ms:e().int().min(0).default(12e4)}).refine(e=>e.non_exclusive_heartbeat_interval_ms>0||e.poll_interval_ms_at_capacity>0,{message:`at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or poll_interval_ms_at_capacity > 0`}).refine(e=>e.non_exclusive_heartbeat_interval_ms>0||e.multisession_poll_interval_ms_at_capacity>0,{message:`at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or multisession_poll_interval_ms_at_capacity > 0`}));function f(){let e=i(`tengu_bridge_poll_interval_config`,l,300*1e3),t=d().safeParse(e);return t.success?t.data:l}export{l as n,f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,n,t as r}from"./poorMode-DtQVZvON.js";var i;e((()=>{r(),i=async(e,r)=>{let i=!n();return t(i),i?r.setAppState(e=>({...e,promptSuggestionEnabled:!1})):r.setAppState(e=>({...e,promptSuggestionEnabled:!0})),{type:`text`,value:`Poor mode ${i?`ON`:`OFF`} — ${i?`extract_memories and prompt_suggestion are disabled`:`extract_memories and prompt_suggestion are restored`}`}}}))();export{i as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./poorMode-DtQVZvON.js";t();export{e as isPoorModeActive};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{Ka as n,lo as r,oo as i}from"./paths-BZbIj1Z1.js";var a=t({isPoorModeActive:()=>o,setPoorMode:()=>s});function o(){return c===null&&(c=n().poorMode===!0),c}function s(e){c=e,r(`userSettings`,{poorMode:e||void 0})}var c,l=e((()=>{i(),c=null}));export{s as i,o as n,a as r,l as t};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-DR8-3Aex.js";import{c as t,l as n,s as r,u as i}from"./envUtils-BWeoiL4Y.js";import{n as a,t as o}from"./defineProperty-80gRi2ZW.js";import{B as s,b as c,v as l}from"./server-DzOdtq8A.js";import{Ct as u,F as d,In as f,R as p,Tn as m,Vn as h,_n as g,_r as ee,cn as _,jr as te,ln as v,nr as y,tr as b,tt as x,y as S}from"./state-sIHsFpDu.js";import{Aa as C,Br as w,Bt as ne,C as re,Cr as ie,Dr as ae,El as T,Et as oe,Fa as se,Ki as ce,Ma as E,Ml as le,Na as ue,Ot as D,Pr as O,Rr as de,S as fe,Si as pe,Tl as me,Xn as he,Xo as k,Yn as ge,_ as _e,a as ve,bl as ye,c as be,jl as xe,kt as Se,ls as Ce,ms as we,no as A,on as Te,oo as Ee,pi as De,qi as Oe,ss as ke,to as Ae,vi as j,xi as je,xs as M,yi as Me,yl as Ne}from"./paths-BZbIj1Z1.js";import{E as N,K as Pe,L as P,T as Fe,V as Ie,X as Le,Y as Re,c as ze,d as F,h as Be,p as Ve,s as I,w as L}from"./debug-UI3T040K.js";import{n as He,r as R}from"./analytics-DqMQntaB.js";import{n as Ue,t as We}from"./cwd--iizewsn.js";import{i as Ge,n as z,o as B}from"./process-DMKLUQIO.js";import{F as Ke,I as qe,P as V}from"./git-CN3qtTb_.js";import{J as Je,K as Ye,c as H,et as U,i as Xe,o as Ze,s as W}from"./log-CzsijfHZ.js";import{i as Qe,n as $e}from"./path-B3lx7yHn.js";import{s as et,u as tt}from"./types-Csi32ZXh.js";import{C as nt,c as rt,d as it,l as at,m as ot,s as st,x as G}from"./teammate-DMYOtLTK.js";import{n as ct,t as lt}from"./sleep-8Eb9j_Ly.js";import{Ai as ut,Ax as dt,BD as ft,Bc as pt,Bs as mt,CO as ht,Cc as gt,Cn as _t,D as vt,Db as yt,Dn as bt,Dx as xt,EA as St,EE as Ct,Ex as wt,F as Tt,FE as Et,Fl as Dt,Fv as Ot,Fx as kt,G as At,GD as jt,GS as Mt,G_ as Nt,Gs as Pt,Gt as Ft,HD as It,Ha as Lt,Hy as Rt,Il as zt,Ix as Bt,JD as Vt,JE as Ht,JT as Ut,Ju as Wt,K as Gt,KD as Kt,KS as qt,KT as Jt,Ki as Yt,LE as Xt,LO as Zt,Lc as Qt,MC as $t,MD as en,MT as tn,Mf as nn,Mr as rn,Mv as an,ND as on,NT as sn,Nf as cn,Nr as ln,Nv as un,Nx as dn,O as fn,OE as pn,OO as mn,Ob as hn,On as gn,Ov as _n,PC as vn,Pr as yn,Pv as bn,QA as xn,QD as Sn,QT as Cn,RO as wn,Rc as Tn,S as En,SA as Dn,Sc as On,Si as kn,TE as An,TO as jn,Tc as Mn,Tv as Nn,UD as Pn,Ui as Fn,VD as In,VT as Ln,Vo as Rn,Vs as zn,Vy as Bn,WD as Vn,W_ as Hn,Wa as Un,Xs as Wn,YD as Gn,YE as Kn,Yi as qn,ZD as Jn,ZT as Yn,Zu as Xn,_C as Zn,_E as Qn,_O as $n,_c as er,_o as tr,aD as nr,ag as rr,ay as ir,bc as ar,bi as or,bj as sr,bw as cr,cp as lr,cr as ur,dA as dr,dy as fr,ea as pr,fs as mr,gC as hr,gE as gr,gO as _r,gc as vr,gi as yr,gs as br,gw as xr,hE as Sr,hb as Cr,hi as wr,iE as Tr,ig as Er,iy as Dr,jC as Or,jO as kr,ji as Ar,kE as jr,kv as Mr,lj as Nr,ls as Pr,lu as Fr,mA as Ir,mC as Lr,mw as Rr,nD as zr,nE as K,ny as Br,o as Vr,oD as Hr,oO as Ur,ou as Wr,ow as Gr,oy as Kr,p as qr,pa as Jr,pj as Yr,pr as Xr,pw as Zr,qC as Qr,qD as $r,qh as ei,qs as ti,qu as ni,rD as ri,rE as ii,rO as ai,ri as oi,rw as si,s as ci,sD as li,sj as ui,sp as di,su as fi,tD as pi,tE as mi,tg as hi,u as gi,uj as _i,us as vi,uy as yi,vE as bi,vO as q,vc as xi,vj as Si,vs as Ci,w as wi,wO as Ti,wc as Ei,ww as Di,wx as Oi,x as ki,xc as Ai,yb as ji,yc as Mi,yi as Ni,yw as Pi,zD as J,zc as Fi}from"./loadAgentsDir-DaApSWNv.js";import{F as Ii,Hn as Li,Ht as Ri,M as zi,Nt as Bi,Pt as Vi,Vn as Hi,_t as Ui,pn as Wi,vt as Gi,xn as Ki}from"./prompt-DHHypkUR.js";import{i as qi,o as Ji}from"./xml-Dg8-vY8G.js";import{a as Yi,o as Xi,s as Zi}from"./fileStateCache-C7-TxF8G.js";import{A as Qi,C as $i,D as ea,N as ta,O as na,P as ra,Z as ia,_ as aa,d as oa,g as sa,h as ca,m as la,u as ua,v as da,y as fa}from"./rcDebugLog-CF73Wofq.js";import{c as pa,l as ma}from"./commitAttribution-CedoNRL0.js";import{P as ha,V as ga,a as _a,d as va}from"./teamHelpers-2m66Mr8w.js";import{t as ya}from"./pollConfig-orFqIbGd.js";import{r as ba}from"./inboundAttachments-CiF42Eku.js";import{i as xa,n as Sa,s as Ca}from"./mappers-D54WYYhL.js";import{n as wa,r as Ta}from"./sessionTitle-DyexSH43.js";import{n as Ea,t as Da}from"./ccrClient-CWH1f8Nk.js";import{n as Oa,t as ka}from"./HybridTransport-CP63usH9.js";import{n as Aa,t as ja}from"./SSETransport-CD7R7FfS.js";import{t as Ma}from"./pluginBlocklist-CtSUf3sp.js";import{c as Na,d as Pa,f as Fa,l as Ia,o as La,r as Ra,s as za,u as Ba}from"./channelNotification-Y5fNpq-B.js";import{t as Va}from"./onChangeAppState-GPs10FBm.js";import{t as Ha}from"./settingsSync-BWW4FOMm.js";import{a as Ua,c as Wa,d as Ga,f as Ka,l as qa,m as Ja,o as Ya,p as Xa,r as Za,t as Qa}from"./cronJitterConfig-BFVNIkjD.js";import{i as $a,n as eo}from"./toolPool-BHdCDihh.js";import{n as to,r as no}from"./QueryEngine-BwvqdZVN.js";import{n as ro,r as io}from"./sideQuestion-DIMsNoEc.js";import{n as ao,r as oo}from"./context-noninteractive-CKFY_j1P.js";import{a as so,o as co,t as lo}from"./skillChangeDetector-C2Te20cK.js";import{n as uo,t as fo}from"./refresh-DecpoOX1.js";import{dirname as po,join as mo}from"path";import{PassThrough as ho}from"stream";import{randomUUID as Y}from"crypto";import{readFile as go,stat as _o}from"fs/promises";import{URL as vo}from"url";import{cwd as X}from"process";a(),_(),Ue(),Re(),Ie(),L(),Be(),z(),I(),V(),U(),Ze(),Qe(),et(),G(),M(),Ee(),se(),E(),Oe(),O(),ge(),lt(),Te(),at(),fe(),ve(),Hi(),Ki(),Dn(),Ir(),jn(),Pn(),on(),Kn(),ta(),Ct(),ha(),ii(),Ln(),na(),Hn(),oa(),Fi(),Tn(),vi(),Rn(),pr(),yn(),gn(),_t(),Ha(),r(),Aa();function yo(e,t={},n,r){if(i(process.env.CLAUDE_CODE_USE_CCR_V2)){let i=new vo(e.href);return i.protocol===`wss:`?i.protocol=`https:`:i.protocol===`ws:`&&(i.protocol=`http:`),i.pathname=i.pathname.replace(/\/$/,``)+`/worker/events/stream`,new ja(i,t,n,r)}if(e.protocol===`ws:`||e.protocol===`wss:`)return i(process.env.CLAUDE_CODE_POST_FOR_SESSION_INGRESS_V2)?new ka(e,t,n,r):new Oa(e,t,n,r);throw Error(`Unsupported protocol: ${e.protocol}`)}r(),Aa();var bo=class extends Ga{constructor(e,t,n){let r=new ho({encoding:`utf8`});super(r,n),o(this,`url`,void 0),o(this,`transport`,void 0),o(this,`inputStream`,void 0),o(this,`isBridge`,!1),o(this,`isDebug`,!1),o(this,`ccrClient`,null),o(this,`keepAliveTimer`,null),this.inputStream=r,this.url=new vo(e);let a={},s=ea();s?a.Authorization=`Bearer ${s}`:F(`[remote-io] No session ingress token available`,{level:`error`});let c=process.env.CLAUDE_CODE_ENVIRONMENT_RUNNER_VERSION;if(c&&(a[`x-environment-runner-version`]=c),this.transport=yo(this.url,a,u(),()=>{let e={},t=ea();t&&(e.Authorization=`Bearer ${t}`);let n=process.env.CLAUDE_CODE_ENVIRONMENT_RUNNER_VERSION;return n&&(e[`x-environment-runner-version`]=n),e}),this.isBridge=process.env.CLAUDE_CODE_ENVIRONMENT_KIND===`bridge`,this.isDebug=ze(),this.transport.setOnData(e=>{this.inputStream.write(e),this.isBridge&&this.isDebug&&B(e.endsWith(`
|
|
2
|
-
`)?e:e+`
|
|
3
|
-
`)}),this.transport.setOnClose(()=>{this.inputStream.end()}),i(process.env.CLAUDE_CODE_USE_CCR_V2)){if(!(this.transport instanceof ja))throw Error(`CCR v2 requires SSETransport; check getTransportForUrl`);this.ccrClient=new Da(this.transport,this.url);let e=this.ccrClient.initialize();this.restoredWorkerState=e.catch(()=>null),e.catch(e=>{Ke(`error`,`cli_worker_lifecycle_init_failed`,{reason:e instanceof Ea?e.reason:`unknown`}),W(Error(`CCRClient initialization failed: ${P(e)}`)),mi(1,`other`)}),Le(async()=>this.ccrClient?.close()),Ar((e,t,n)=>this.ccrClient.writeInternalEvent(e,t,n)),ut(()=>this.ccrClient.readInternalEvents(),()=>this.ccrClient.readSubagentInternalEvents());let t={started:`processing`,completed:`processed`};jt((e,n)=>{this.ccrClient?.reportDelivery(e,t[n])}),da((e,t)=>{this.ccrClient?.reportState(e,t)}),aa(e=>{this.ccrClient?.reportMetadata(e)},{replayCurrent:!0})}this.transport.connect();let l=ya().session_keepalive_interval_v2_ms;if(this.isBridge&&l>0&&(this.keepAliveTimer=setInterval(()=>{F(`[remote-io] keep_alive sent`),this.write({type:`keep_alive`}).catch(e=>{F(`[remote-io] keep_alive write failed: ${P(e)}`)})},l),this.keepAliveTimer.unref?.()),Le(async()=>this.close()),t){let e=this.inputStream;(async()=>{for await(let n of t)e.write(String(n).replace(/\n$/,``)+`
|
|
4
|
-
`)})()}}flushInternalEvents(){return this.ccrClient?.flushInternalEvents()??Promise.resolve()}get internalEventsPending(){return this.ccrClient?.internalEventsPending??0}async write(e){this.ccrClient?await this.ccrClient.writeEvent(e):await this.transport.write(e),this.isBridge&&(e.type===`control_request`||this.isDebug)&&B(Ka(e)+`
|
|
5
|
-
`)}close(){this.keepAliveTimer&&(clearInterval(this.keepAliveTimer),this.keepAliveTimer=null),this.transport.close(),this.inputStream.end()}};Wi(),k(),Ri(),Vi(),[...Bi],Re(),I();var xo=`[stdout-guard]`,So=!1,Z=``,Co=null;function wo(e){if(e.length===0)return!0;try{return JSON.parse(e),!0}catch{return!1}}function To(){So||(So=!0,Co=process.stdout.write.bind(process.stdout),process.stdout.write=function(e,t,n){let r=typeof e==`string`?e:Buffer.from(e).toString(`utf-8`);Z+=r;let i,a=!0;for(;(i=Z.indexOf(`
|
|
6
|
-
`))!==-1;){let e=Z.slice(0,i);Z=Z.slice(i+1),wo(e)?a=Co(e+`
|
|
7
|
-
`):(process.stderr.write(`${xo} ${e}\n`),F(`streamJsonStdoutGuard diverted non-JSON stdout line: ${e.slice(0,200)}`))}let o=typeof t==`function`?t:n;return o&&queueMicrotask(()=>o()),a},Le(async()=>{Z.length>0&&(Co&&wo(Z)?Co(Z+`
|
|
8
|
-
`):process.stderr.write(`${xo} ${Z}\n`),Z=``),Co&&(process.stdout.write=Co,Co=null),So=!1}))}Ne(),Ce(),Si(),ui(),qi(),Gi(),Xi(),ra(),Hr(),Xt(),Pi(),Gr(),fr(),an(),_n(),Xn(),gt(),Pt(),br(),Gt(),Vr(),Ba(),Na(),eo(),Nn(),Ie(),Ze(),na(),Br(),I(),ii();function Eo(e){let t=process.env.CLAUDE_CODE_EXIT_AFTER_STOP_DELAY,n=t?parseInt(t,10):null,r=n&&!isNaN(n)&&n>0,i=null,a=0;return{start(){i&&(clearTimeout(i),i=null),r&&(a=Date.now(),i=setTimeout(()=>{let t=Date.now()-a;e()&&t>=n&&(F(`Exiting after ${n}ms of idle time`),K())},n))},stop(){i&&(clearTimeout(i),i=null)}}}xe(),me(),j(),Zt(),pi(),gr(),sn(),qt(),yt(),ji(),zt(),Lt(),wi(),Ta(),ro();function Do(e){if(e.toLowerCase().endsWith(`.jsonl`))return{sessionId:Y(),ingressUrl:null,isUrl:!1,jsonlFile:e,isJsonlFile:!0};if(Nt(e))return{sessionId:e,ingressUrl:null,isUrl:!1,jsonlFile:null,isJsonlFile:!1};try{let t=new URL(e);return{sessionId:Y(),ingressUrl:t.href,isUrl:!0,jsonlFile:null,isJsonlFile:!1}}catch{}return null}s(),D(),ai(),Gn(),In(),ma(),Yn(),Or(),Lr(),dn(),cn(),Wr(),Sa(),oo(),I();async function Oo(){try{let e=await go(ar(),`utf-8`),t=we().safeParse(Fe(e));return t.success?t.data:(F(`Invalid known_marketplaces.json in zip cache: ${t.error.message}`,{level:`error`}),{})}catch{return{}}}async function ko(e){await vr(ar(),N(e,null,2))}async function Ao(e,t){let n=Mi();if(!n)return;let r=await jo(t);r!==null&&await vr(mo(n,xi(e)),r)}async function jo(e){let t=[mo(e,`.claude-plugin`,`marketplace.json`),mo(e,`marketplace.json`),e];for(let e of t)try{return await go(e,`utf-8`)}catch{}return null}async function Mo(){let e=await ti();for(let[t,n]of Object.entries(e))if(n.installLocation)try{await Ao(t,n.installLocation)}catch(e){F(`Failed to save marketplace JSON for ${t}: ${e}`)}await ko({...await Oo(),...e})}He(),Re(),I(),V(),Ze(),Pt(),gt();async function No(){let e=Mn();F(`installPluginsForHeadless: starting${e?` (zip cache mode)`:``}`);let t=await Wn();t&&(mt(),mr(`headlessPluginInstall: seed marketplaces registered`)),e&&(await Ve().mkdir(Ai()),await Ve().mkdir(On()));let n=Object.keys(zn()).length,r={marketplaces_installed:0,delisted_count:0},i=t;try{if(n===0)F(`installPluginsForHeadless: no marketplaces declared`);else{let t=await qe(`headless_marketplace_reconcile`,()=>Wa({skip:e?(e,t)=>!Ei(t):void 0,onProgress:e=>{e.type===`installed`?F(`installPluginsForHeadless: installed marketplace ${e.name}`):e.type===`failed`&&F(`installPluginsForHeadless: failed to install marketplace ${e.name}: ${e.error}`)}}),e=>({installed_count:e.installed.length,updated_count:e.updated.length,failed_count:e.failed.length,skipped_count:e.skipped.length}));t.skipped.length>0&&F(`installPluginsForHeadless: skipped ${t.skipped.length} marketplace(s) unsupported by zip cache: ${t.skipped.join(`, `)}`);let n=t.installed.length+t.updated.length;n>0&&(mt(),mr(`headlessPluginInstall: marketplaces reconciled`),i=!0),r.marketplaces_installed=n}e&&await Mo();let t=await Ma();return r.delisted_count=t.length,t.length>0&&(i=!0),i&&mr(`headlessPluginInstall: plugins changed`),e&&Le(er),i}catch(e){return W(e),!1}finally{R(`tengu_headless_plugin_install`,r)}}He(),I(),V(),Pn(),oa(),Ze(),z(),Hn(),ii(),Re(),Ue(),_(),yn(),Rn(),L(),r(),fo(),br(),ei(),_a(),jr(),Bn(),di(),Ie();var Q=(bi(),e(Qn)),$=(fa(),e($i)),Po=(Ya(),e(Ua)),Fo=(Za(),e(Qa)),Io=(zi(),e(Ii)),Lo=`<system-reminder>
|
|
9
|
-
You are running in non-interactive mode and cannot return a response to the user until your team is shut down.
|
|
10
|
-
|
|
11
|
-
You MUST shut down your team before preparing your final response:
|
|
12
|
-
1. Use requestShutdown to ask each team member to shut down gracefully
|
|
13
|
-
2. Wait for shutdown approvals
|
|
14
|
-
3. Use the cleanup operation to clean up the team
|
|
15
|
-
4. Only then provide your final response to the user
|
|
16
|
-
|
|
17
|
-
The user cannot receive your response until the team is completely shut down.
|
|
18
|
-
</system-reminder>
|
|
19
|
-
|
|
20
|
-
Shut down your team and prepare your final response for the user.`,Ro=1e4,zo=new Set,Bo=[];function Vo(e){if(zo.has(e))return!1;if(zo.add(e),Bo.push(e),Bo.length>Ro){let e=Bo.splice(0,Bo.length-Ro);for(let t of e)zo.delete(t)}return!0}function Ho(e){return typeof e==`string`?[{type:`text`,text:e}]:e}function Uo(e){return e.length===1?e[0]:e.every(e=>typeof e==`string`)?e.join(`
|
|
21
|
-
`):e.flatMap(Ho)}function Wo(e,t){return t!==void 0&&t.mode===`prompt`&&t.workload===e.workload&&t.isMeta===e.isMeta}async function Go(e,t,n,r,a,o,s,c){if(process.env.USER_TYPE===`ant`&&i(process.env.CLAUDE_CODE_EXIT_AFTER_FIRST_RENDER)&&(process.stderr.write(`\nStartup time: ${Math.round(process.uptime()*1e3)}ms\n`),process.exit(0)),St.subscribe(e=>{Mt(e,n),je()&&n(e=>{let t=e.settings,n=t.fastMode===!0&&!t.fastModePerSessionOptIn;return{...e,fastMode:n}})}),$&&!$.isProactiveActive()&&i(process.env.CLAUDE_CODE_PROACTIVE)&&$.activateProactive(`command`),typeof Bun<`u`&&setInterval(()=>{process.memoryUsage.rss()>350*1024*1024?Bun.gc(!0):Bun.gc(!1)},1e3).unref(),ft(),J(`runHeadless_entry`),await Cn()&&await Ut(),J(`after_grove_check`),re(),c.resumeSessionAt&&!c.resume){process.stderr.write(`Error: --resume-session-at requires --resume
|
|
22
|
-
`),K(1);return}if(c.rewindFiles&&!c.resume){process.stderr.write(`Error: --rewind-files requires --resume
|
|
23
|
-
`),K(1);return}if(c.rewindFiles&&e){process.stderr.write(`Error: --rewind-files is a standalone operation and cannot be used with a prompt
|
|
24
|
-
`),K(1);return}let l=rs(e,c);c.outputFormat===`stream-json`&&To();let d=dr.getSandboxUnavailableReason();if(d){if(dr.isSandboxRequired()){process.stderr.write(`\nError: sandbox required but unavailable: ${d}\n sandbox.failIfUnavailable is set — refusing to start without a working sandbox.\n\n`),K(1);return}process.stderr.write(`\n⚠ Sandbox disabled: ${d}\n Commands will run WITHOUT sandboxing. Network and filesystem restrictions will NOT be enforced.\n\n`)}else if(dr.isSandboxingEnabled())try{await dr.initialize(l.createSandboxAskCallback())}catch(e){process.stderr.write(`\n❌ Sandbox Error: ${P(e)}\n`),K(1,`other`);return}c.outputFormat===`stream-json`&&c.verbose&&pt(e=>{let t=(()=>{switch(e.type){case`started`:return{type:`system`,subtype:`hook_started`,hook_id:e.hookId,hook_name:e.hookName,hook_event:e.hookEvent,uuid:Y(),session_id:u()};case`progress`:return{type:`system`,subtype:`hook_progress`,hook_id:e.hookId,hook_name:e.hookName,hook_event:e.hookEvent,stdout:e.stdout,stderr:e.stderr,output:e.output,uuid:Y(),session_id:u()};case`response`:return{type:`system`,subtype:`hook_response`,hook_id:e.hookId,hook_name:e.hookName,hook_event:e.hookEvent,output:e.output,stdout:e.stdout,stderr:e.stderr,exit_code:e.exitCode,outcome:e.outcome,uuid:Y(),session_id:u()}}})();l.write(t)}),c.setupTrigger&&await bn(c.setupTrigger),J(`before_loadInitialMessages`);let f=t(),{messages:p,turnInterruptionState:m,agentSetting:h}=await ns(n,{continue:c.continue,teleport:c.teleport,resume:c.resume,resumeSessionAt:c.resumeSessionAt,forkSession:c.forkSession,outputFormat:c.outputFormat,sessionStartHooksPromise:c.sessionStartHooksPromise,restoredWorkerState:l.restoredWorkerState}),g=Ot();if(g&&l.prependUserMessage(g),!c.agent&&!x()&&h){let{agentDefinition:e}=so(h,void 0,{activeAgents:s,allAgents:s});if(e){if(n(t=>({...t,agent:e.agentType})),!c.systemPrompt&&!ci(e)){let t=e.getSystemPrompt();t&&(c.systemPrompt=t)}Ni(e.agentType)}}if(p.length===0&&process.exitCode!==void 0)return;if(c.rewindFiles){let e=p.find(e=>e.uuid===c.rewindFiles);if(!e||e.type!==`user`){process.stderr.write(`Error: --rewind-files requires a user message UUID, but ${c.rewindFiles} is not a user message in this session\n`),K(1);return}let r=t(),i=await Xo(c.rewindFiles,r,n,!1);if(!i.canRewind){process.stderr.write(`Error: ${i.error||`Unexpected error`}\n`),K(1);return}process.stdout.write(`Files rewound to state at message ${c.rewindFiles}\n`),K(0);return}let ee=typeof c.resume==`string`&&(!!Nt(c.resume)||c.resume.endsWith(`.jsonl`)),_=!!c.sdkUrl;if(!e&&!ee&&!_){process.stderr.write(`Error: Input must be provided either through stdin or as a prompt argument when using --print
|
|
25
|
-
`),K(1);return}if(c.outputFormat===`stream-json`&&!c.verbose){process.stderr.write(`Error: When using --print, --output-format=stream-json requires --verbose
|
|
26
|
-
`),K(1);return}let te=Wt(f.mcp.tools,f.toolPermissionContext),v=[...a,...te],y=Jo(c.sdkUrl?`stdio`:c.permissionPromptToolName,l,()=>t().mcp.tools,e=>{n(e=>({...e,attribution:{...e.attribution,permissionPromptCount:e.attribution.permissionPromptCount+1}})),ca(`requires_action`,e)});c.permissionPromptToolName&&(v=v.filter(e=>!Li(e,c.permissionPromptToolName))),Ge(),J(`after_loadInitialMessages`),await C(),J(`after_modelStrings`);let b=c.outputFormat===`json`&&c.verbose,S=[],w;J(`before_runHeadlessStreaming`);for await(let e of Ko(l,f.mcp.clients,[...r,...f.mcp.commands],v,p,y,o,t,n,s,c,m))c.outputFormat===`stream-json`&&c.verbose&&await l.write(e),e.type!==`control_response`&&e.type!==`control_request`&&e.type!==`control_cancel_request`&&!(e.type===`system`&&(e.subtype===`session_state_changed`||e.subtype===`task_notification`||e.subtype===`task_started`||e.subtype===`task_progress`||e.subtype===`post_turn_summary`))&&e.type!==`stream_event`&&e.type!==`keep_alive`&&e.type!==`streamlined_text`&&e.type!==`streamlined_tool_use_summary`&&e.type!==`prompt_suggestion`&&(b&&S.push(e),w=e);switch(c.outputFormat){case`json`:if(!w||w.type!==`result`)throw Error(`No messages returned`);if(c.verbose){B(N(S)+`
|
|
27
|
-
`);break}B(N(w)+`
|
|
28
|
-
`);break;case`stream-json`:break;default:if(!w||w.type!==`result`)throw Error(`No messages returned`);switch(w.subtype){case`success`:B(w.result.endsWith(`
|
|
29
|
-
`)?w.result:w.result+`
|
|
30
|
-
`);break;case`error_during_execution`:B(`Execution error`);break;case`error_max_turns`:B(`Error: Reached max turns (${c.maxTurns}).\nTip: Increase the limit with --max-turns or continue in a new session.`);break;case`error_max_budget_usd`:B(`Error: Exceeded USD budget ($${c.maxBudgetUsd}).\nTip: Increase the limit with --max-budget-usd or start a new session to continue.`);break;case`error_max_structured_output_retries`:B(`Error: Failed to provide valid structured output after maximum retries.
|
|
31
|
-
Tip: Simplify your schema or check if the output format matches the expected structure.`)}}if(It(),be())try{let{drainPendingExtraction:e}=await import(`./extractMemories-BpN0fQF-.js`);await e()}catch{}K(w?.type===`result`&&w?.is_error?1:0)}function Ko(e,r,a,o,s,m,h,g,_,te,v,y){let x=!1,S,C=!1,re=!1,se=null,E,D=e.outbound;process.on(`SIGINT`,()=>{Ke(`info`,`shutdown_signal`,{signal:`SIGINT`}),E&&!E.signal.aborted&&E.abort(),mi(0)}),Le(async()=>{let t={};for(let e of pn(g()))Rt(e)&&(t[e.type]=(t[e.type]??0)+1);Ke(`info`,`run_state_at_shutdown`,{run_active:x,run_phase:S,worker_status:ua(),internal_events_pending:e.internalEventsPending,bg_tasks:t})}),sa(e=>{(e===`default`||e===`acceptEdits`||e===`bypassPermissions`||e===`plan`||e===`auto`||e===`dontAsk`)&&D.enqueue({type:`system`,subtype:`status`,status:null,permissionMode:e,uuid:Y(),session_id:u()})});let O={abortController:null,inflightPromise:null,lastEmitted:null,pendingSuggestion:null,pendingLastEmittedEntry:null},fe;v.enableAuthStatus&&(fe=ce.getInstance().subscribe(e=>{D.enqueue({type:`auth_status`,isAuthenticating:e.isAuthenticating,output:e.output,error:e.error,uuid:Y(),session_id:u()})}));let me=e=>{let t=Ca(e);t&&D.enqueue({type:`rate_limit_event`,rate_limit_info:t,uuid:Y(),session_id:u()})};wn.add(me);let k=s,ge=Et(s,X(),100),ve=Yi(100),be=process.env.CLAUDE_CODE_RESUME_INTERRUPTED_TURN;y&&y.kind!==`none`&&be&&(F(`[print.ts] Auto-resuming interrupted turn (kind: ${y.kind})`),ts(k,y.message),q({mode:`prompt`,value:y.message.message.content,uuid:Y()}));let xe=nn().map(e=>{let t=e.value===null?`default`:e.value,n=t===`default`?ie():w(t),r=Nr(n),i=sr(n),a=pe(e.value),o=he(n);return{name:t,value:t,displayName:e.label,description:e.description,...r&&{supportsEffort:!0,supportedEffortLevels:_i(n)?[...xn]:xn.filter(e=>e!==`max`)},...i&&{supportsAdaptiveThinking:!0},...a&&{supportsFastMode:!0},...o&&{supportsAutoMode:!0}}}),Ce=v.userSpecifiedModel;function we(e,t){let n=tr(e,de(t));k.push(...n);for(let e of n)typeof e.message.content==`string`&&e.message.content.includes(`<local-command-stdout>`)&&D.enqueue({type:`user`,content:e.message.content,message:e.message,session_id:u(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}let A=[],Te=[],Ee=new Set;function De(t){for(let n of t){if(n.type!==`connected`||Ee.has(n.name)||n.config.type===`sdk`)continue;let t=n.name;try{n.client.setRequestHandler(l,async(n,r)=>{H(t,`Elicitation request received in print mode: ${N(n)}`);let i=n.params.mode===`url`?`url`:`form`;R(`tengu_mcp_elicitation_shown`,{mode:i});let a=await hr(t,n.params,r.signal);if(a)return H(t,`Elicitation resolved by hook: ${N(a)}`),R(`tengu_mcp_elicitation_response`,{mode:i,action:a.action}),a;let o=`url`in n.params?n.params.url:void 0,s=`requestedSchema`in n.params?n.params.requestedSchema:void 0,c=`elicitationId`in n.params?n.params.elicitationId:void 0,l=await Zn(t,await e.handleElicitation(t,n.params.message,s,r.signal,i,o,c),r.signal,i,c);return R(`tengu_mcp_elicitation_response`,{mode:i,action:l.action}),l}),n.client.setNotificationHandler(c,e=>{let{elicitationId:n}=e.params;H(t,`Elicitation completion notification: ${n}`),Ft({message:`MCP server "${t}" confirmed elicitation ${n} complete`,notificationType:`elicitation_complete`}),D.enqueue({type:`system`,subtype:`elicitation_complete`,mcp_server_name:t,elicitation_id:n,uuid:Y(),session_id:u()})}),Ee.add(t)}catch{}}}async function Oe(){let t=new Set(Object.keys(h)),n=new Set(A.map(e=>e.name)),r=Array.from(t).some(e=>!n.has(e)),i=Array.from(n).some(e=>!t.has(e)),a=A.some(e=>e.type===`pending`),o=A.some(e=>e.type===`failed`);if(r||i||a||o){for(let e of A)t.has(e.name)||e.type===`connected`&&await e.cleanup();let r=await Bt(h,(t,n)=>e.sendMcpMessage(t,n));A=r.clients,Te=r.tools;let i=nt([...n,...t]);_(e=>({...e,mcp:{...e.mcp,tools:[...e.mcp.tools.filter(e=>!i.some(t=>e.name.startsWith(ke(t)))),...Te]}})),li(A)}}Oe();let j={clients:[],tools:[],configs:{}},je=e=>{let t=ni(e.toolPermissionContext,e.mcp.tools),n=ye($a([...o,...Te,...j.tools],t,e.toolPermissionContext.mode),`name`);v.permissionPromptToolName&&(n=n.filter(e=>!Li(e,v.permissionPromptToolName)));let r=p();if(r&&!v.jsonSchema){let e=Ui(r);`tool`in e&&(n=[...n,e.tool])}return n},M=null,Me=0;function Ne(){if(!M)return;let e=Math.min(Me,k.length),t=k.slice(e).filter(e=>e.type===`user`||e.type===`assistant`);Me=k.length,t.length>0&&M.writeMessages(t)}let Fe=Promise.resolve({response:{added:[],removed:[],errors:{}},sdkServersChanged:!1});function Ie(e){let t=async()=>{let t=new Set(A.map(e=>e.name)),n=await os(e,{configs:h,clients:A,tools:Te},j,_);for(let e of Object.keys(h))delete h[e];if(Object.assign(h,n.newSdkState.configs),A=n.newSdkState.clients,Te=n.newSdkState.tools,j=n.newDynamicState,n.sdkServersChanged){let e=new Set(A.map(e=>e.name)),n=nt([...t,...e]);_(e=>({...e,mcp:{...e.mcp,tools:[...e.mcp.tools.filter(e=>!n.some(t=>e.name.startsWith(ke(t)))),...Te]}}))}return{response:n.response,sdkServersChanged:n.sdkServersChanged}};return Fe=Fe.then(t,t),Fe}function Re(){let e=g(),t=e.mcp.clients,n=ye([...e.mcp.tools,...j.tools],`name`),r=new Set([...t.map(e=>e.name),...A.map(e=>e.name)]);return[...t,...A,...j.clients.filter(e=>!r.has(e.name))].map(e=>{let t;if(e.config.type===`sse`||e.config.type===`http`)t={type:e.config.type,url:e.config.url,headers:e.config.headers,oauth:e.config.oauth};else if(e.config.type===`claudeai-proxy`)t={type:`claudeai-proxy`,url:e.config.url,id:e.config.id};else if(e.config.type===`stdio`||e.config.type===void 0){let n=e.config;t={type:`stdio`,command:n.command,args:n.args}}let r=e.type===`connected`?si(n,e.name).map(e=>({name:e.mcpInfo?.toolName??e.name,annotations:{readOnly:e.isReadOnly({})||void 0,destructive:e.isDestructive?.({})||void 0,openWorld:e.isOpenWorld?.({})||void 0}})):void 0,i;if(e.type===`connected`&&e.capabilities.experimental){let t={...e.capabilities.experimental};t[`claude/channel`]&&(!Fa()||!Pa(e.config.pluginSource))&&delete t[`claude/channel`],Object.keys(t).length>0&&(i={experimental:t})}return{name:e.name,status:e.type,serverInfo:e.type===`connected`?e.serverInfo:void 0,error:e.type===`failed`?e.error:void 0,config:t,scope:e.config.scope,tools:r,capabilities:i}})}async function ze(){try{await Promise.all([Promise.resolve(),qe(`headless_managed_settings_wait`,()=>Jt())]),await No()&&await Ue()}catch(e){W(e)}}let Be=null;t()||(i(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)?Be=ze():ze());let Ve=Eo(()=>!x),I=a,L=te;async function He(){let{agentDefinitions:e}=await uo(_);I=await qn(X());let t=L.filter(e=>e.source===`flagSettings`);L=[...e.allAgents,...t]}async function Ue(){let{servers:e}=await Rr(),t={};for(let[n,r]of Object.entries(e)){let e=r.type;(e===void 0||e===`stdio`||e===`sse`||e===`http`||e===`sdk`)&&(t[n]=r)}for(let[e,n]of Object.entries(h))n.type===`sdk`&&!(e in t)&&(t[e]=n);let{response:n,sdkServersChanged:r}=await Ie(t);r&&Oe(),F(`Headless MCP refresh: added=${n.added.length}, removed=${n.removed.length}`)}let We=lo.subscribe(()=>{Fn(),qn(X()).then(e=>{I=e})}),Ge=()=>{setTimeout(()=>{!$?.isProactiveActive()||$.isProactivePaused()||C||(async()=>{let e=await Sn({basePrompt:`<${Je}>${new Date().toLocaleTimeString()}</${Je}>`,currentDir:X(),shouldCreate:()=>!C});if(C){await Kt({commands:e});return}for(let t of e)q({...t,uuid:Y()});z()})().catch(e=>{W(e),F(`[Proactive] failed to create headless tick: ${e}`,{level:`error`})})},0)};kr(()=>{E&&ht(`now`).length>0&&E.abort(`interrupt`)});let z=async()=>{if(x)return;if(x=!0,S=void 0,ca(`running`),Ve.stop(),J(`run_entry`),await Oe(),J(`after_updateSdkMcp`),Be){let e=parseInt(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS||``,10);if(e>0){let t=ct(e).then(()=>`timeout`);await Promise.race([Be,t])===`timeout`&&(W(Error(`CLAUDE_CODE_SYNC_PLUGIN_INSTALL: plugin installation timed out after ${e}ms`)),R(`tengu_sync_plugin_install_timeout`,{timeout_ms:e}))}else await Be;Be=null,await He();let{setupPluginHookHotReload:t}=await import(`./loadPluginHooks-GENkKqO8.js`);t()}let t=e=>e.agentId===void 0;try{let r,i=!1,a=async()=>{for(;r=_r(t);){if(r.mode!==`prompt`&&r.mode!==`orphaned-permission`&&r.mode!==`task-notification`)throw Error(`only prompt commands are supported in streaming mode`);let i=[r];if(r.mode===`prompt`)for(;Wo(r,mn(t));)i.push(_r(t));let a=await $r(i);if(i=a.attachmentCommands,i.length===0)continue;r=i[0],r.mode===`prompt`&&i.length>1&&(r={...r,value:Uo(i.map(e=>e.value)),uuid:i.findLast(e=>e.uuid)?.uuid??r.uuid});let o=i.map(e=>e.uuid).filter(e=>e!==void 0);if(v.replayUserMessages&&i.length>1)for(let e of i)e.uuid&&e.uuid!==r.uuid&&D.enqueue({type:`user`,content:e.value,message:{role:`user`,content:e.value},session_id:u(),parent_tool_use_id:null,uuid:e.uuid,isReplay:!0});let s=g(),c=[...s.mcp.clients,...A,...j.clients];De(c);for(let e of c)$o(e);let l=je(s);for(let e of o)Vn(e,`started`);if(r.mode===`task-notification`){let e=typeof r.value==`string`?r.value:``,t=e.match(/<task-id>([^<]+)<\/task-id>/),n=e.match(/<tool-use-id>([^<]+)<\/tool-use-id>/),i=e.match(/<output-file>([^<]+)<\/output-file>/),a=e.match(/<status>([^<]+)<\/status>/),o=e.match(/<summary>([^<]+)<\/summary>/),s=e=>e===`completed`||e===`failed`||e===`stopped`||e===`killed`,c=a?.[1],l=s(c)?c===`killed`?`stopped`:c:`completed`,d=e.match(/<usage>([\s\S]*?)<\/usage>/)?.[1]??``,f=d.match(/<total_tokens>(\d+)<\/total_tokens>/),p=d.match(/<tool_uses>(\d+)<\/tool_uses>/),m=d.match(/<duration_ms>(\d+)<\/duration_ms>/);a&&D.enqueue({type:`system`,subtype:`task_notification`,task_id:t?.[1]??``,tool_use_id:n?.[1],status:l,output_file:i?.[1]??``,summary:o?.[1]??``,usage:f&&p?{total_tokens:parseInt(f[1],10),tool_uses:parseInt(p[1],10),duration_ms:m?parseInt(m[1],10):0}:void 0,session_id:u(),uuid:Y()})}let d=r.value,f=a.claimedCommands;if(e instanceof bo&&r.mode===`prompt`&&R(`tengu_bridge_message_received`,{is_repl:!1}),O.abortController?.abort(),O.abortController=null,O.pendingSuggestion=null,O.pendingLastEmittedEntry=null,O.lastEmitted&&r.mode===`prompt`){let e=typeof d==`string`?d:d.find(e=>e.type===`text`)?.text;typeof e==`string`&&zr(O.lastEmitted.text,e,O.lastEmitted.emittedAt,O.lastEmitted.promptId,O.lastEmitted.generationRequestId),O.lastEmitted=null}E=en(),J(`before_ask`),Fr();let h=r,ee=!1;try{if(await Se(h.workload??v.workload,async()=>{for await(let t of to({commands:ye([...I,...s.mcp.commands],`name`),prompt:d,promptUuid:h.uuid,isMeta:h.isMeta,cwd:X(),tools:l,verbose:v.verbose,mcpClients:c,thinkingConfig:v.thinkingConfig,maxTurns:v.maxTurns,maxBudgetUsd:v.maxBudgetUsd,taskBudget:v.taskBudget,canUseTool:m,userSpecifiedModel:Ce,fallbackModel:v.fallbackModel,jsonSchema:p()??v.jsonSchema,mutableMessages:k,getReadFileCache:()=>ve.size===0?ge:Zi(ge,ve),setReadFileCache:e=>{ge=e;for(let[e,t]of ve.entries()){let n=ge.get(e);(!n||t.timestamp>n.timestamp)&&ge.set(e,t)}ve.clear()},customSystemPrompt:v.systemPrompt,appendSystemPrompt:v.appendSystemPrompt,getAppState:g,setAppState:_,abortController:E,replayUserMessages:v.replayUserMessages,includePartialMessages:v.includePartialMessages,handleElicitation:(t,n,r)=>e.handleElicitation(t,n.message,void 0,r,n.mode,n.url,`elicitationId`in n?n.elicitationId:void 0),agents:L,orphanedPermission:h.orphanedPermission,setSDKStatus:e=>{D.enqueue({type:`system`,subtype:`status`,status:e,session_id:u(),uuid:Y()})}}))if(Ne(),t.type===`result`){ee=!!t.is_error;for(let e of Qi())D.enqueue(e);pn(g()).some(e=>(e.type===`local_agent`||e.type===`local_workflow`)&&Rt(e))?se=t:(se=null,D.enqueue(t))}else{for(let e of Qi())D.enqueue(e);D.enqueue(t)}}),ee)await Vt({commands:f,outcome:{type:`failed`,message:`ask() returned an error result`},currentDir:X(),priority:`later`,workload:h.workload??v.workload});else{let e=await Vt({commands:f,outcome:{type:`completed`},currentDir:X(),priority:`later`,workload:h.workload??v.workload});for(let t of e)q({...t,uuid:Y()})}}catch(e){throw await Vt({commands:f,outcome:{type:`failed`,error:e},currentDir:X(),priority:`later`,workload:h.workload??v.workload}),e}for(let e of o)Vn(e,`completed`);if(Ne(),M?.sendResult(),v.promptSuggestions&&!n(process.env.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION)){O.abortController?.abort();let e=new AbortController;O.abortController=e;let t=Dt();if(!t)ri(`sdk_no_params`,void 0,void 0,`sdk`);else{let n={promise:null};n.promise=(async()=>{try{let n=await nr(e,k,g,t,`sdk`);if(!n||e.signal.aborted)return;let r={type:`prompt_suggestion`,suggestion:n.suggestion,uuid:Y(),session_id:u()},i={text:n.suggestion,emittedAt:Date.now(),promptId:n.promptId,generationRequestId:n.generationRequestId};se?(O.pendingSuggestion=r,O.pendingLastEmittedEntry={text:i.text,promptId:i.promptId,generationRequestId:i.generationRequestId}):(O.lastEmitted=i,D.enqueue(r))}catch(e){if(e instanceof Error&&(e.name===`AbortError`||e.name===`APIUserAbortError`)){ri(`aborted`,void 0,void 0,`sdk`);return}W(Pe(e))}finally{O.inflightPromise===n.promise&&(O.inflightPromise=null)}})(),O.inflightPromise=n.promise}}It(),fi(),ft()}};do{for(let e of Qi())D.enqueue(e);S=`draining_commands`,await a(),i=!1;{let e=pn(g()).some(e=>Rt(e)&&e.type!==`in_process_teammate`),n=mn(t)!==void 0;(e||n)&&(i=!0,n||(S=`waiting_for_agents`,await ct(100)))}}while(i);se&&(D.enqueue(se),se=null,O.pendingSuggestion&&(D.enqueue(O.pendingSuggestion),O.pendingLastEmittedEntry&&(O.lastEmitted={...O.pendingLastEmittedEntry,emittedAt:Date.now()},O.pendingLastEmittedEntry=null),O.pendingSuggestion=null))}catch(t){try{await e.write({type:`result`,subtype:`error_during_execution`,duration_ms:0,duration_api_ms:0,is_error:!0,num_turns:0,stop_reason:null,session_id:u(),total_cost_usd:0,usage:ia,modelUsage:{},permission_denials:[],uuid:Y(),errors:[P(t),...Xe().map(e=>e.error)]})}catch{}O.abortController?.abort(),K(1);return}finally{if(S=`finally_flush`,await e.flushInternalEvents(),S=`finally_post_flush`,!Tr()){ca(`idle`);for(let e of Qi())D.enqueue(e)}x=!1,Ve.start()}if($?.isProactiveActive()&&!$.isProactivePaused()&&mn(t)===void 0&&!C){Ge();return}if(mn(t)!==void 0){z();return}{let e=g().teamContext;if(e&&it(e)){let e=`team-lead`;for(;;){let t=g();if(!(st(t)||t.teamContext&&Object.keys(t.teamContext.teammates).length>0)){F(`[print.ts] No more active teammates, stopping poll`);break}let n=await rr(e,t.teamContext?.teamName);if(n.length>0){F(`[print.ts] Team-lead found ${n.length} unread messages`),await Er(e,t.teamContext?.teamName);let r=t.teamContext?.teamName;for(let e of n){let n=hi(e.text);if(n&&r){let e=n.from;F(`[print.ts] Processing shutdown_approved from ${e}`);let i=t.teamContext?.teammates?Object.entries(t.teamContext.teammates).find(([,t])=>t.name===e)?.[0]:void 0;i&&(va(r,{agentId:i,name:e}),F(`[print.ts] Removed ${e} from team file`),await ga(r,i,e,`shutdown`),_(e=>{if(!e.teamContext?.teammates||!(i in e.teamContext.teammates))return e;let{[i]:t,...n}=e.teamContext.teammates;return{...e,teamContext:{...e.teamContext,teammates:n}}}))}}q({mode:`prompt`,value:n.map(e=>`<${Ye} teammate_id="${e.from}"${e.color?` color="${e.color}"`:``}>\n${e.text}\n</${Ye}>`).join(`
|
|
32
|
-
|
|
33
|
-
`),uuid:Y()}),z();return}if(C&&!re){re=!0,F(`[print.ts] Input closed with active teammates, injecting shutdown prompt`),q({mode:`prompt`,value:Lo,uuid:Y()}),z();return}await ct(500)}}}C&&(await(async()=>{let e=g();rt(e)&&await ot(_,e);let t=g(),n=t.teamContext;return n&&Object.keys(n.teammates).length>0||st(t)})()?(q({mode:`prompt`,value:Lo,uuid:Y()}),z()):(O.inflightPromise&&await Promise.race([O.inflightPromise,ct(5e3)]),O.abortController?.abort(),O.abortController=null,await Qt(),We(),fe?.(),wn.delete(me),D.done()))},B=null;if(Io.isKairosCronEnabled()){let e=e=>{C||(async()=>{let t=await Jn({basePrompt:e.basePrompt,trigger:`scheduled-task`,currentDir:X(),sourceId:e.sourceId,sourceLabel:e.sourceLabel,workload:oe,shouldCreate:()=>!C});if(t){if(C){await Kt({commands:[t]});return}await e.onSuccess(t)}})().catch(t=>{W(t),F(`[ScheduledTasks] failed to enqueue headless task${e.logSuffix}: ${t}`,{level:`error`})})},t=e=>{q({...e,uuid:Y()}),z()};B=Po.createCronScheduler({onFire:n=>{e({basePrompt:n,sourceId:n,sourceLabel:n,logSuffix:``,onSuccess:t})},onFireTask:n=>{if(n.agentId){e({basePrompt:n.prompt,sourceId:n.id,sourceLabel:n.prompt,logSuffix:` ${n.id}`,onSuccess:async e=>{await Ur(e.autonomy.runId,`No teammate runtime available for scheduled task owner ${n.agentId} in headless mode.`,e.autonomy.rootDir)}});return}e({basePrompt:n.prompt,sourceId:n.id,sourceLabel:n.prompt,logSuffix:` ${n.id}`,onSuccess:t})},isLoading:()=>x||C,getJitterConfig:Fo?.getCronJitterConfig,isKilled:()=>!Io?.isKairosCronEnabled()}),B.start()}let V=function(e,t){D.enqueue({type:`control_response`,response:{subtype:`success`,request_id:e.request_id,response:t}})},U=function(e,t){D.enqueue({type:`control_response`,response:{subtype:`error`,request_id:e.request_id,error:t}})},Ze=new Set;e.setUnexpectedResponseCallback(async e=>{await is({message:e,setAppState:_,handledToolUseIds:Ze,onEnqueued:()=>{z()}})});let Qe=new Map,et=new Map,tt=new Set,at=new Map,G=null;return(async()=>{let t=!1;Ke(`info`,`cli_message_loop_started`);for await(let n of e.structuredInput){let i=`uuid`in n?n.uuid:void 0;if(i&&n.type!==`user`&&n.type!==`control_response`&&Vn(i,`completed`),n.type===`control_request`){let i=n,o=i.request;if(i.request.subtype===`interrupt`)_(e=>({...e,attribution:{...e.attribution,escapeCount:e.attribution.escapeCount+1}})),E&&E.abort(),O.abortController?.abort(),O.abortController=null,O.lastEmitted=null,O.pendingSuggestion=null,V(i);else if(o.subtype===`end_session`){F(`[print.ts] end_session received, reason=${o.reason??`unspecified`}`),E&&E.abort(),O.abortController?.abort(),O.abortController=null,O.lastEmitted=null,O.pendingSuggestion=null,V(i);break}else if(i.request.subtype===`initialize`){if(i.request.sdkMcpServers&&i.request.sdkMcpServers.length>0)for(let e of i.request.sdkMcpServers)h[e]={type:`sdk`,name:e};await Yo(i.request,i.request_id,t,D,a,xe,e,!!v.enableAuthStatus,v,te,g),i.request.promptSuggestions&&_(e=>e.promptSuggestionEnabled?e:{...e,promptSuggestionEnabled:!0}),i.request.agentProgressSummaries&&_e(`tengu_slate_prism`,!0)&&ee(!0),t=!0,Ti()&&z()}else if(i.request.subtype===`set_permission_mode`){let e=i.request;_(t=>({...t,toolPermissionContext:Zo(e,i.request_id,t.toolPermissionContext,D),isUltraplanMode:e.ultraplan??t.isUltraplanMode}))}else if(i.request.subtype===`set_model`){let e=i.request.model??`default`,t=e===`default`?ie():e;Ce=t,b(t),la({model:t}),we(e,t),V(i)}else if(i.request.subtype===`set_max_thinking_tokens`)i.request.max_thinking_tokens===null?v.thinkingConfig=void 0:i.request.max_thinking_tokens===0?v.thinkingConfig={type:`disabled`}:v.thinkingConfig={type:`enabled`,budgetTokens:i.request.max_thinking_tokens},V(i);else if(i.request.subtype===`mcp_status`)V(i,{mcpServers:Re()});else if(i.request.subtype===`get_context_usage`)try{let e=g();V(i,{...await ao({messages:k,getAppState:g,options:{mainLoopModel:ae(),tools:je(e),agentDefinitions:e.agentDefinitions,customSystemPrompt:v.systemPrompt,appendSystemPrompt:v.appendSystemPrompt}})})}catch(e){U(i,P(e))}else if(i.request.subtype===`mcp_message`){let e=i.request,t=A.find(t=>t.name===e.server_name);t&&t.type===`connected`&&t.client?.transport?.onmessage&&t.client.transport.onmessage(e.message),V(i)}else if(i.request.subtype===`rewind_files`){let e=g(),t=await Xo(i.request.user_message_id,e,_,i.request.dry_run??!1);t.canRewind||i.request.dry_run?V(i,t):U(i,t.error??`Unexpected error`)}else if(i.request.subtype===`cancel_async_message`){let e=i.request.message_uuid;V(i,{cancelled:$n(t=>t.uuid===e).length>0})}else if(i.request.subtype===`seed_read_state`){try{let e=$e(i.request.path),t=Math.floor((await _o(e)).mtimeMs);if(t<=i.request.mtime){let n=await go(e,`utf-8`),r=(n.charCodeAt(0)===65279?n.slice(1):n).replaceAll(`\r
|
|
34
|
-
`,`
|
|
35
|
-
`);ve.set(e,{content:r,timestamp:t,offset:void 0,limit:void 0})}}catch{}V(i)}else if(i.request.subtype===`mcp_set_servers`){let{response:e,sdkServersChanged:t}=await Ie(i.request.servers);V(i,e),t&&Oe()}else if(i.request.subtype===`reload_plugins`)try{let e=await uo(_),t=L.filter(e=>e.source===`flagSettings`);L=[...e.agentDefinitions.allAgents,...t];let n=[],[r,a,o]=await Promise.allSettled([qn(X()),Ue(),Ci()]);r.status===`fulfilled`?I=r.value:W(r.reason),a.status===`rejected`&&W(a.reason),o.status===`fulfilled`?n=o.value.enabled.map(e=>({name:e.name,path:e.path,source:e.source})):W(o.reason),V(i,{commands:I.filter(e=>e.userInvocable!==!1).map(e=>({name:Jr(e),description:Yt(e),argumentHint:e.argumentHint||``})),agents:L.map(e=>({name:e.agentType,description:e.whenToUse,model:e.model===`inherit`?void 0:e.model})),plugins:n,mcpServers:Re(),error_count:e.error_count})}catch(e){U(i,P(e))}else if(i.request.subtype===`mcp_reconnect`){let e=g(),{serverName:t}=i.request;Ee.delete(t);let n=xr(t)??r.find(e=>e.name===t)?.config??A.find(e=>e.name===t)?.config??j.clients.find(e=>e.name===t)?.config??e.mcp.clients.find(e=>e.name===t)?.config??null;if(!n)U(i,`Server not found: ${t}`);else{let e=await kt(t,n),r=ke(t);_(n=>({...n,mcp:{...n.mcp,clients:n.mcp.clients.map(n=>n.name===t?e.client:n),tools:[...T(n.mcp.tools,e=>e.name?.startsWith(r)),...e.tools],commands:[...T(n.mcp.commands,e=>Qr(e,t)),...e.commands],resources:e.resources&&e.resources.length>0?{...n.mcp.resources,[t]:e.resources}:le(n.mcp.resources,t)}})),j={...j,clients:[...j.clients.filter(e=>e.name!==t),e.client],tools:[...j.tools.filter(e=>!e.name?.startsWith(r)),...e.tools]},e.client.type===`connected`?(De([e.client]),$o(e.client),V(i)):U(i,e.client.type===`failed`?e.client.error??`Connection failed`:`Server status: ${e.client.type}`)}}else if(i.request.subtype===`mcp_toggle`){let e=g(),{serverName:t,enabled:n}=i.request;Ee.delete(t);let a=xr(t)??r.find(e=>e.name===t)?.config??A.find(e=>e.name===t)?.config??j.clients.find(e=>e.name===t)?.config??e.mcp.clients.find(e=>e.name===t)?.config??null;if(!a)U(i,`Server not found: ${t}`);else if(n){Di(t,!0);let e=await kt(t,a),n=ke(t);_(r=>({...r,mcp:{...r.mcp,clients:r.mcp.clients.map(n=>n.name===t?e.client:n),tools:[...T(r.mcp.tools,e=>e.name?.startsWith(n)),...e.tools],commands:[...T(r.mcp.commands,e=>Qr(e,t)),...e.commands],resources:e.resources&&e.resources.length>0?{...r.mcp.resources,[t]:e.resources}:le(r.mcp.resources,t)}})),e.client.type===`connected`?(De([e.client]),$o(e.client),V(i)):U(i,e.client.type===`failed`?e.client.error??`Connection failed`:`Server status: ${e.client.type}`)}else{Di(t,!1);let n=[...r,...A,...j.clients,...e.mcp.clients].find(e=>e.name===t);n&&n.type===`connected`&&await wt(t,a);let o=ke(t);_(e=>({...e,mcp:{...e.mcp,clients:e.mcp.clients.map(e=>e.name===t?{name:t,type:`disabled`,config:a}:e),tools:T(e.mcp.tools,e=>e.name?.startsWith(o)),commands:T(e.mcp.commands,e=>Qr(e,t)),resources:le(e.mcp.resources,t)}})),V(i)}}else if(o.subtype===`channel_enable`){let e=g();Qo(i.request_id,o.serverName,[...e.mcp.clients,...A,...j.clients],D)}else if(o.subtype===`mcp_authenticate`){let e=o.serverName,t=g(),n=xr(e)??r.find(t=>t.name===e)?.config??t.mcp.clients.find(t=>t.name===e)?.config??null;if(!n)U(i,`Server not found: ${e}`);else if(n.type!==`sse`&&n.type!==`http`)U(i,`Server type "${n.type}" does not support OAuth authentication`);else try{Qe.get(e)?.abort();let t=new AbortController;Qe.set(e,t);let r,a=new Promise(e=>{r=e}),o=$t(e,n,e=>r(e),t.signal,{skipBrowserOpen:!0,onWaitingForCallback:t=>{et.set(e,t)}}),s=await Promise.race([a,o.then(()=>null)]);s?V(i,{authUrl:s,requiresUserAction:!0}):V(i,{requiresUserAction:!1}),at.set(e,o),o.then(async()=>{if(cr(e)||tt.has(e))return;let t=await kt(e,n),r=ke(e);_(n=>({...n,mcp:{...n.mcp,clients:n.mcp.clients.map(n=>n.name===e?t.client:n),tools:[...T(n.mcp.tools,e=>e.name?.startsWith(r)),...t.tools],commands:[...T(n.mcp.commands,t=>Qr(t,e)),...t.commands],resources:t.resources&&t.resources.length>0?{...n.mcp.resources,[e]:t.resources}:le(n.mcp.resources,e)}})),j={...j,clients:[...j.clients.filter(t=>t.name!==e),t.client],tools:[...j.tools.filter(e=>!e.name?.startsWith(r)),...t.tools]}}).catch(t=>{F(`MCP OAuth failed for ${e}: ${t}`,{level:`error`})}).finally(()=>{Qe.get(e)===t&&(Qe.delete(e),et.delete(e),tt.delete(e),at.delete(e))})}catch(e){U(i,P(e))}}else if(o.subtype===`mcp_oauth_callback_url`){let e=o.serverName,t=o.callbackUrl,n=et.get(e);if(n){let r=!1;try{let e=new URL(t);r=e.searchParams.has(`code`)||e.searchParams.has(`error`)}catch{}if(!r)U(i,`Invalid callback URL: missing authorization code. Please paste the full redirect URL including the code parameter.`);else{tt.add(e),n(t);let r=at.get(e);if(r)try{await r,V(i)}catch(e){U(i,e instanceof Error?e.message:`OAuth authentication failed`)}else V(i)}}else U(i,`No active OAuth flow for server: ${e}`)}else if(o.subtype===`claude_authenticate`){let e=o.loginWithClaudeAi;G?.service.cleanup(),R(`tengu_oauth_flow_start`,{loginWithClaudeAi:e??!0});let t=new tn,n,r=new Promise(e=>{n=e}),a=t.startOAuthFlow(async(e,t)=>{n({manualUrl:e,automaticUrl:t})},{loginWithClaudeAi:e??!0,skipBrowserOpen:!0}).then(async t=>{await hn(t),R(`tengu_oauth_success`,{loginWithClaudeAi:e??!0})}).finally(()=>{t.cleanup(),G?.service===t&&(G=null)});G={service:t,flow:a},a.catch(e=>F(`claude_authenticate flow ended: ${e}`,{level:`info`}));try{let{manualUrl:e,automaticUrl:t}=await Promise.race([r,a.then(()=>{throw Error(`OAuth flow completed without producing auth URLs`)})]);V(i,{manualUrl:e,automaticUrl:t})}catch(e){U(i,P(e))}}else if(o.subtype===`claude_oauth_callback`||o.subtype===`claude_oauth_wait_for_completion`)if(!G)U(i,`No active claude_authenticate flow`);else{o.subtype===`claude_oauth_callback`&&G.service.handleManualAuthCodeInput({authorizationCode:o.authorizationCode,state:o.state});let{flow:e}=G;e.then(()=>{let e=ne();V(i,{account:{email:e?.email,organization:e?.organization,subscriptionType:e?.subscription,tokenSource:e?.tokenSource,apiKeySource:e?.apiKeySource,apiProvider:ue()}})},e=>U(i,P(e)))}else if(o.subtype===`mcp_clear_auth`){let e=o.serverName,t=g(),n=xr(e)??r.find(t=>t.name===e)?.config??t.mcp.clients.find(t=>t.name===e)?.config??null;if(!n)U(i,`Server not found: ${e}`);else if(n.type!==`sse`&&n.type!==`http`)U(i,`Cannot clear auth for server type "${n.type}"`);else{await vn(e,n);let t=await kt(e,n),r=ke(e);_(n=>({...n,mcp:{...n.mcp,clients:n.mcp.clients.map(n=>n.name===e?t.client:n),tools:[...T(n.mcp.tools,e=>e.name?.startsWith(r)),...t.tools],commands:[...T(n.mcp.commands,t=>Qr(t,e)),...t.commands],resources:t.resources&&t.resources.length>0?{...n.mcp.resources,[e]:t.resources}:le(n.mcp.resources,e)}})),V(i,{})}}else if(i.request.subtype===`apply_flag_settings`){let e=ae(),t=d()??{},n=i.request.settings,r={...t,...n};for(let e of Object.keys(r))r[e]===null&&delete r[e];f(r),St.notifyChange(`flagSettings`),`model`in n&&(n.model==null?b(void 0):b(String(n.model)));let a=ae();if(a!==e){Ce=a;let e=n.model?String(n.model):`default`;la({model:a}),we(e,a)}V(i)}else if(i.request.subtype===`get_settings`){let e=g(),t=ae(),n=Nr(t)?Yr(t,e.effortValue):void 0;V(i,{...Ae(),applied:{model:t,effort:typeof n==`string`?n:null}})}else if(i.request.subtype===`stop_task`){let{task_id:e}=i.request;try{await lr(e,{getAppState:g,setAppState:_}),V(i,{})}catch(e){U(i,P(e))}}else if(o.subtype===`generate_session_title`){let e=o.description,t=o.persist,n=(E&&!E.signal.aborted?E:en()).signal;(async()=>{try{let r=await wa(e,n);if(r&&t)try{or(u(),r)}catch(e){W(e)}V(i,{title:r})}catch(e){U(i,P(e))}})()}else if(o.subtype===`side_question`){let e=o.question;(async()=>{try{let t=Dt();V(i,{response:(await io({question:e,cacheSafeParams:t?{...t,toolUseContext:{...t.toolUseContext,abortController:en()}}:await no({tools:je(g()),commands:I,mcpClients:[...g().mcp.clients,...A,...j.clients],messages:k,readFileState:ge,getAppState:g,setAppState:_,customSystemPrompt:v.systemPrompt,appendSystemPrompt:v.appendSystemPrompt,thinkingConfig:v.thinkingConfig,agents:L})})).response})}catch(e){U(i,P(e))}})()}else if(i.request.subtype===`set_proactive`)i.request.enabled?$.isProactiveActive()||($.activateProactive(`command`),Ge()):$.deactivateProactive(),V(i);else if(o.subtype===`remote_control`)if(o.enabled)if(M)V(i,{session_url:Sr(M.bridgeSessionId,M.sessionIngressUrl),connect_url:Cr(M.environmentId,M.sessionIngressUrl),environment_id:M.environmentId});else{let t;try{let{initReplBridge:n}=await import(`./initReplBridge-Bzg5Gx97.js`),r=await n({onInboundMessage(e){let t=qa(e);if(!t)return;let{content:n,uuid:r}=t;q({value:n,mode:`prompt`,uuid:r,skipSlashCommands:!0}),z()},onPermissionResponse(t){e.injectControlResponse(t)},onInterrupt(){E?.abort()},onSetModel(e){let t=e===`default`?ie():e;Ce=t,b(t)},onSetMaxThinkingTokens(e){e===null?v.thinkingConfig=void 0:e===0?v.thinkingConfig={type:`disabled`}:v.thinkingConfig={type:`enabled`,budgetTokens:e}},onStateChange(e,n){e===`failed`&&(t=n),F(`[bridge:sdk] State change: ${e}${n?` — ${n}`:``}`),D.enqueue({type:`system`,subtype:`bridge_state`,state:e,detail:n,uuid:Y(),session_id:u()})},initialMessages:k.length>0?k:void 0});r?(M=r,Me=k.length,e.setOnControlRequestSent(e=>{r.sendControlRequest(e)}),e.setOnControlRequestResolved(e=>{r.sendControlCancelRequest(e)}),V(i,{session_url:Sr(r.bridgeSessionId,r.sessionIngressUrl),connect_url:Cr(r.environmentId,r.sessionIngressUrl),environment_id:r.environmentId})):U(i,t??`Remote Control initialization failed`)}catch(e){U(i,P(e))}}else M&&(e.setOnControlRequestSent(void 0),e.setOnControlRequestResolved(void 0),await M.teardown(),M=null),V(i);else U(i,`Unsupported control request subtype: ${i.request.subtype}`);continue}else if(n.type===`control_response`){v.replayUserMessages&&D.enqueue(n);continue}else if(n.type===`keep_alive`)continue;else if(n.type===`update_environment_variables`)continue;else if(n.type===`assistant`||n.type===`system`){let e=xa([n]);k.push(...e),n.type===`assistant`&&v.replayUserMessages&&D.enqueue(n);continue}if(n.type!==`user`)continue;let o=n;if(t=!0,o.uuid){let e=u(),t=await ur(e,o.uuid);if(t||zo.has(o.uuid)){F(`Skipping duplicate user message: ${o.uuid}`),v.replayUserMessages&&(F(`Sending acknowledgment for duplicate user message: ${o.uuid}`),D.enqueue({type:`user`,content:o.message?.content??``,message:o.message,session_id:e,parent_tool_use_id:null,uuid:o.uuid,timestamp:o.timestamp,isReplay:!0})),t&&Vn(o.uuid,`completed`);continue}Vo(o.uuid)}q({mode:`prompt`,value:await ba(o,o.message.content),uuid:o.uuid,priority:o.priority}),_(e=>({...e,attribution:pa(e.attribution,e=>{oi(e).catch(e=>{F(`Attribution: Failed to save snapshot: ${e}`)})})})),z()}C=!0,B?.stop(),x||(O.inflightPromise&&await Promise.race([O.inflightPromise,ct(5e3)]),O.abortController?.abort(),O.abortController=null,await Qt(),We(),fe?.(),wn.delete(me),D.done())})(),D}function qo(e){let t=async(n,r,i,a,o,s)=>{let c=s??await At(n,r,i,a,o);if(c.behavior===`allow`||c.behavior===`deny`)return c;let{signal:l,cleanup:u}=bt(i.abortController.signal);if(l.aborted)return u(),{behavior:`deny`,message:`Permission prompt was aborted.`,decisionReason:{type:`permissionPromptTool`,permissionPromptToolName:n.name,toolResult:void 0}};let d=new Promise(e=>{l.addEventListener(`abort`,()=>e(`aborted`),{once:!0})}),f=e.call({tool_name:n.name,input:r,tool_use_id:o},i,t,a),p=await Promise.race([f,d]);if(u(),p===`aborted`||l.aborted)return{behavior:`deny`,message:`Permission prompt was aborted.`,decisionReason:{type:`permissionPromptTool`,permissionPromptToolName:n.name,toolResult:void 0}};let m=p,h=e.mapToolResultToToolResultBlockParam(m.data,`1`);if(!h.content||!Array.isArray(h.content)||!h.content[0]||h.content[0].type!==`text`||typeof h.content[0].text!=`string`)throw Error(`Permission prompt tool returned an invalid result. Expected a single text block param with type="text" and a string text value.`);return Ja(Xa().parse(tt(h.content[0].text)),e,r,i)};return t}function Jo(e,t,n,r){if(e===`stdio`)return t.createCanUseTool(r);if(!e)return async(e,t,n,r,i,a)=>a??await At(e,t,n,r,i);let i=null;return async(t,r,a,o,s,c)=>{if(!i){let t=n(),r=t.find(t=>Li(t,e));if(!r){let n=`Error: MCP tool ${e} (passed via --permission-prompt-tool) not found. Available MCP tools: ${t.map(e=>e.name).join(`, `)||`none`}`;throw process.stderr.write(`${n}\n`),K(1),Error(n)}if(!r.inputJSONSchema){let t=`Error: tool ${e} (passed via --permission-prompt-tool) must be an MCP tool`;throw process.stderr.write(`${t}\n`),K(1),Error(t)}i=qo(r)}return i(t,r,a,o,s,c)}}async function Yo(e,t,n,r,i,a,o,s,c,l,d){if(n){r.enqueue({type:`control_response`,response:{subtype:`error`,error:`Already initialized`,request_id:t,pending_permission_requests:o.getPendingPermissionRequests()}});return}if(e.systemPrompt!==void 0&&(c.systemPrompt=e.systemPrompt),e.appendSystemPrompt!==void 0&&(c.appendSystemPrompt=e.appendSystemPrompt),e.promptSuggestions!==void 0&&(c.promptSuggestions=e.promptSuggestions),e.agents){let t=qr(e.agents,`flagSettings`);l.push(...t)}if(c.agent){let e=x()===c.agent,t=l.find(e=>e.agentType===c.agent);if(t&&!e){if(y(t.agentType),!c.systemPrompt&&!ci(t)){let e=t.getSystemPrompt();e&&(c.systemPrompt=e)}!c.userSpecifiedModel&&t.model&&t.model!==`inherit`&&b(w(t.model)),t.initialPrompt&&o.prependUserMessage(t.initialPrompt)}else t?.initialPrompt&&o.prependUserMessage(t.initialPrompt)}let f=A()?.outputStyle||`default`,p=await Pr(We()),m=ne();if(e.hooks){let t={};for(let[n,r]of Object.entries(e.hooks))t[n]=r.map(e=>{let t=e.hookCallbackIds.map(t=>o.createHookCallback(t,e.timeout));return{matcher:e.matcher,hooks:t}});g(t)}e.jsonSchema&&h(e.jsonSchema);let ee={commands:i.filter(e=>e.userInvocable!==!1).map(e=>({name:Jr(e),description:Yt(e),argumentHint:e.argumentHint||``})),agents:l.map(e=>({name:e.agentType,description:e.whenToUse,model:e.model===`inherit`?void 0:e.model})),output_style:f,available_output_styles:Object.keys(p),models:a,account:{email:m?.email,organization:m?.organization,subscriptionType:m?.subscription,tokenSource:m?.tokenSource,apiKeySource:m?.apiKeySource,apiProvider:ue()},pid:process.pid};if(je()&&Me()){let e=d();ee.fast_mode_state=De(c.userSpecifiedModel??null,e.fastMode)}if(r.enqueue({type:`control_response`,response:{subtype:`success`,request_id:t,response:ee}}),s){let e=ce.getInstance().getStatus();e&&r.enqueue({type:`auth_status`,isAuthenticating:e.isAuthenticating,output:e.output,error:e.error,uuid:Y(),session_id:u()})}}async function Xo(e,t,n,r){if(!ir())return{canRewind:!1,error:`File rewinding is not enabled.`,filesChanged:[]};if(!Dr(t.fileHistory,e))return{canRewind:!1,error:`No file checkpoint found for this message.`,filesChanged:[]};if(r){let n=await Kr(t.fileHistory,e);return{canRewind:!0,filesChanged:n?.filesChanged??[],insertions:n?.insertions,deletions:n?.deletions}}try{await yi(e=>n(t=>({...t,fileHistory:e(t.fileHistory)})),e)}catch(e){return{canRewind:!1,error:`Failed to rewind: ${P(e)}`,filesChanged:[]}}return{canRewind:!0,filesChanged:[]}}function Zo(e,t,n,r){if(e.mode===`bypassPermissions`){if(fn())return r.enqueue({type:`control_response`,response:{subtype:`error`,request_id:t,error:`Cannot set permission mode to bypassPermissions because it is disabled by settings or configuration`}}),n;if(!n.isBypassPermissionsModeAvailable)return r.enqueue({type:`control_response`,response:{subtype:`error`,request_id:t,error:`Cannot set permission mode to bypassPermissions because the session was not launched with --dangerously-skip-permissions`}}),n}if(e.mode===`auto`&&!vt()){let e=En();return r.enqueue({type:`control_response`,response:{subtype:`error`,request_id:t,error:e?`Cannot set permission mode to auto: ${ki(e)}`:`Cannot set permission mode to auto`}}),n}return r.enqueue({type:`control_response`,response:{subtype:`success`,request_id:t,response:{mode:e.mode}}}),{...Tt(n.mode,e.mode,n),mode:e.mode}}function Qo(e,t,n,r){let i=t=>r.enqueue({type:`control_response`,response:{subtype:`error`,request_id:e,error:t}}),a=n.find(e=>e.name===t&&e.type===`connected`);if(!a||a.type!==`connected`)return i(`server ${t} is not connected`);let o=a.config.pluginSource,s=o?Ji(o):void 0;if(!s?.marketplace)return i(`server ${t} is not plugin-sourced; channel_enable requires a marketplace plugin`);let c={kind:`plugin`,name:s.name,marketplace:s.marketplace},l=S(),u=l.some(e=>e.kind===`plugin`&&e.name===c.name&&e.marketplace===c.marketplace);u||m([...l,c]);let d=za(t,a.capabilities,o);if(d.action===`skip`)return u||m(l),i(d.reason);let f=`${c.name}@${c.marketplace}`;H(t,`Channel notifications registered`),R(`tengu_mcp_channel_enable`,{plugin:f}),a.client.setNotificationHandler(Ra(),async e=>{let{content:n,meta:r}=e.params;H(t,`notifications/claude/channel: ${n.slice(0,80)}`),R(`tengu_mcp_channel_message`,{content_length:n.length,meta_key_count:Object.keys(r??{}).length,entry_kind:`plugin`,is_dev:!1,plugin:f}),q({mode:`prompt`,value:Ia(t,n,r),priority:`next`,isMeta:!0,origin:{kind:`channel`,server:t},skipSlashCommands:!0})}),r.enqueue({type:`control_response`,response:{subtype:`success`,request_id:e,response:void 0}})}function $o(e){if(e.type!==`connected`||za(e.name,e.capabilities,e.config.pluginSource).action!==`register`)return;let t=La(e.name,S()),n=t?.kind===`plugin`?`${t.name}@${t.marketplace}`:void 0;H(e.name,`Channel notifications re-registered after reconnect`),e.client.setNotificationHandler(Ra(),async r=>{let{content:i,meta:a}=r.params;H(e.name,`notifications/claude/channel: ${i.slice(0,80)}`),R(`tengu_mcp_channel_message`,{content_length:i.length,meta_key_count:Object.keys(a??{}).length,entry_kind:t?.kind,is_dev:t?.dev??!1,plugin:n}),q({mode:`prompt`,value:Ia(e.name,i,a),priority:`next`,isMeta:!0,origin:{kind:`channel`,server:e.name},skipSlashCommands:!0})})}function es(e,t){if(t===`stream-json`){let t={type:`result`,subtype:`error_during_execution`,duration_ms:0,duration_api_ms:0,is_error:!0,num_turns:0,stop_reason:null,session_id:u(),total_cost_usd:0,usage:ia,modelUsage:{},permission_denials:[],uuid:Y(),errors:[e]};process.stdout.write(N(t)+`
|
|
36
|
-
`)}else process.stderr.write(e+`
|
|
37
|
-
`)}function ts(e,t){let n=e.findIndex(e=>e.uuid===t.uuid);n!==-1&&e.splice(n,2)}async function ns(t,n){let r=!v();if(n.continue)try{R(`tengu_continue_print`,{});let i=await Mr(void 0,void 0);if(i){if(Q){let n=Q.matchSessionMode(i.mode);if(n){process.stderr.write(n+`
|
|
38
|
-
`);let{getAgentDefinitionsWithOverrides:r,getActiveAgentsFromList:i}=(Vr(),e(gi));r.cache.clear?.();let a=await r(We());t(e=>({...e,agentDefinitions:{...a,allAgents:a.allAgents,activeAgents:i(a.allAgents)}}))}}return n.forkSession||i.sessionId&&(te(An(i.sessionId),i.fullPath?po(i.fullPath):null),r&&await wr()),co(i,t),yr(n.forkSession?{...i,worktreeSession:void 0}:i),Q&&kn(Q.isCoordinatorMode()?`coordinator`:`normal`),{messages:i.messages,turnInterruptionState:i.turnInterruptionState,agentSetting:i.agentSetting}}}catch(e){return W(e),K(1),{messages:[]}}if(n.teleport)try{if(!Un(`allow_remote_sessions`))throw Error(`Remote sessions are disabled by your organization's policy.`);if(R(`tengu_teleport_print`,{}),typeof n.teleport!=`string`)throw Error(`No session ID provided for teleport`);let{checkOutTeleportedSessionBranch:e,processMessagesForTeleportResume:t,teleportResumeCodeSession:r,validateGitState:i}=await import(`./teleport-4x9eIl8c.js`);await i();let a=await r(n.teleport),{branchError:o}=await e(a.branch);return{messages:t(a.log,o)}}catch(e){return W(e),K(1),{messages:[]}}if(n.resume)try{R(`tengu_resume_print`,{});let a=Do(typeof n.resume==`string`?n.resume:``);if(!a){let e=`Error: --resume requires a valid session ID when used with --print. Usage: claude -p --resume <session-id>`;return typeof n.resume==`string`&&(e+=`. Session IDs must be in UUID format (e.g., 550e8400-e29b-41d4-a716-446655440000). Provided value "${n.resume}" is not a valid UUID`),es(e,n.outputFormat),K(1),{messages:[]}}if(i(process.env.CLAUDE_CODE_USE_CCR_V2)){let[,e]=await Promise.all([rn(a.sessionId),n.restoredWorkerState]);e&&(t(Va(e)),typeof e.model==`string`&&b(e.model))}else a.isUrl&&a.ingressUrl&&i(process.env.ENABLE_SESSION_PERSISTENCE)&&await ln(a.sessionId,a.ingressUrl);let o=await Mr(a.sessionId,a.jsonlFile||void 0);if(!o||o.messages.length===0)return a.isUrl||i(process.env.CLAUDE_CODE_USE_CCR_V2)?{messages:await(n.sessionStartHooksPromise??un(`startup`))}:(es(`No conversation found with session ID: ${a.sessionId}`,n.outputFormat),K(1),{messages:[]});if(n.resumeSessionAt){let e=o.messages.findIndex(e=>e.uuid===n.resumeSessionAt);if(e<0)return es(`No message found with message.uuid of: ${n.resumeSessionAt}`,n.outputFormat),K(1),{messages:[]};o.messages=e>=0?o.messages.slice(0,e+1):[]}if(Q){let n=Q.matchSessionMode(o.mode);if(n){process.stderr.write(n+`
|
|
39
|
-
`);let{getAgentDefinitionsWithOverrides:r,getActiveAgentsFromList:i}=(Vr(),e(gi));r.cache.clear?.();let a=await r(We());t(e=>({...e,agentDefinitions:{...a,allAgents:a.allAgents,activeAgents:i(a.allAgents)}}))}}return!n.forkSession&&o.sessionId&&(te(An(o.sessionId),o.fullPath?po(o.fullPath):null),r&&await wr()),co(o,t),yr(n.forkSession?{...o,worktreeSession:void 0}:o),Q&&kn(Q.isCoordinatorMode()?`coordinator`:`normal`),{messages:o.messages,turnInterruptionState:o.turnInterruptionState,agentSetting:o.agentSetting}}catch(e){return W(e),es(e instanceof Error?`Failed to resume session: ${e.message}`:`Failed to resume session with --print mode`,n.outputFormat),K(1),{messages:[]}}return{messages:await(n.sessionStartHooksPromise??un(`startup`))}}function rs(e,t){let n;return n=typeof e==`string`?e.trim()===``?Ht([]):Ht([N({type:`user`,content:e,uuid:``,session_id:``,message:{role:`user`,content:e},parent_tool_use_id:null})]):e,t.sdkUrl?new bo(t.sdkUrl,n,t.replayUserMessages):new Ga(n,t.replayUserMessages)}async function is({message:e,setAppState:t,onEnqueued:n,handledToolUseIds:r}){let i=e.response;if(i?.subtype===`success`&&i.response?.toolUseID&&typeof i.response.toolUseID==`string`){let e=i.response,t=e.toolUseID;if(!t)return!1;if(F(`handleOrphanedPermissionResponse: received orphaned control_response for toolUseID=${t} request_id=${i.request_id}`),r.has(t))return F(`handleOrphanedPermissionResponse: skipping duplicate orphaned permission for toolUseID=${t} (already handled)`),!1;let a=await Xr(t);return a?(r.add(t),F(`handleOrphanedPermissionResponse: enqueuing orphaned permission for toolUseID=${t} messageID=${a.message.id}`),q({mode:`orphaned-permission`,value:[],orphanedPermission:{permissionResult:e,assistantMessage:a}}),n?.(),!0):(F(`handleOrphanedPermissionResponse: no unresolved tool_use found for toolUseID=${t} (already resolved in transcript)`),!1)}return!1}function as(e){return{...e,scope:`dynamic`}}async function os(e,t,n,r){let{allowed:i,blocked:a}=Zr(e),o={};for(let e of a)o[e]=`Blocked by enterprise policy (allowedMcpServers/deniedMcpServers)`;let s={},c={};for(let[e,t]of Object.entries(i))t.type===`sdk`?s[e]=t:c[e]=t;let l=new Set(Object.keys(t.configs)),u=new Set(Object.keys(s)),d=[],f=[],p={...t.configs},m=[...t.clients],h=[...t.tools];for(let e of l)if(!u.has(e)){let t=m.find(t=>t.name===e);t&&t.type===`connected`&&await t.cleanup(),m=m.filter(t=>t.name!==e);let n=`mcp__${e}__`;h=h.filter(e=>!e.name.startsWith(n)),delete p[e],f.push(e)}for(let[e,t]of Object.entries(s))if(!l.has(e)){p[e]=t;let n={type:`pending`,name:e,config:{...t,scope:`dynamic`}};m=[...m,n],d.push(e)}let g=await ss(c,n,r);return{response:{added:[...d,...g.response.added],removed:[...f,...g.response.removed],errors:{...o,...g.response.errors}},newSdkState:{configs:p,clients:m,tools:h},newDynamicState:g.newState,sdkServersChanged:d.length>0||f.length>0}}async function ss(e,t,n){let r=new Set(Object.keys(t.configs)),i=new Set(Object.keys(e)),a=[...r].filter(e=>!i.has(e)),o=[...i].filter(e=>!r.has(e)),s=[...r].filter(e=>i.has(e)).filter(n=>{let r=t.configs[n],i=e[n];return!r||!i?!0:!Oi(r,as(i))}),c=[],l=[],u={},d=[...t.clients],f=[...t.tools];for(let e of[...a,...s]){let n=d.find(t=>t.name===e),r=t.configs[e];if(n&&r){if(n.type===`connected`)try{await n.cleanup()}catch(e){W(e)}await wt(e,r)}let i=`mcp__${e}__`;f=f.filter(e=>!e.name.startsWith(i)),d=d.filter(t=>t.name!==e),a.includes(e)&&c.push(e)}for(let t of[...o,...s]){let n=e[t];if(!n)continue;let r=as(n);if(n.type===`sdk`){l.push(t);continue}try{let e=await xt(t,r);if(d.push(e),e.type===`connected`){let t=await dt(e);f.push(...t)}else e.type===`failed`&&(u[t]=e.error||`Connection failed`);l.push(t)}catch(e){let n=Pe(e);u[t]=n.message,W(n)}}let p={};for(let t of i){let n=e[t];n&&(p[t]=as(n))}let m={clients:d,tools:f,configs:p};return n(e=>{let n=new Set([...Object.keys(t.configs),...Object.keys(p)]),r=e.mcp.tools.filter(e=>{for(let t of n)if(e.name.startsWith(`mcp__${t}__`))return!1;return!0}),i=e.mcp.clients.filter(e=>!n.has(e.name));return{...e,mcp:{...e.mcp,tools:[...r,...f],clients:[...i,...d]}}}),{response:{added:l,removed:c,errors:u},newState:m}}export{Go as runHeadless};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,r as i}from"./analytics-DqMQntaB.js";import{QT as a,XT as o,YT as s,ZT as c}from"./loadAgentsDir-DaApSWNv.js";import{n as l,r as u,t as d}from"./Grove-fenDMHVw.js";async function f(e){if(!await a())return e(m),null;let[t,n]=await Promise.all([o(),s()]);if(!t.success)return e(m),null;let r=t.data,c=n.success?n.data:null;async function u(t){if(t===`escape`||t===`defer`){e(`Privacy settings dialog dismissed`,{display:`system`});return}await f()}async function f(){let t=await o();if(!t.success){e(`Unable to retrieve updated privacy settings`,{display:`system`});return}let n=t.data;e(`"Help improve Claude" set to ${n.grove_enabled?`true`:`false`}.`),r.grove_enabled!==null&&r.grove_enabled!==n.grove_enabled&&i(`tengu_grove_policy_toggled`,{state:n.grove_enabled,location:`settings`})}return r.grove_enabled===null?(0,p.jsx)(d,{showIfAlreadyViewed:!0,onDone:u,location:`settings`}):(0,p.jsx)(l,{settings:r,domainExcluded:c?.domain_excluded,onDone:f})}var p,m;e((()=>{t(),u(),r(),c(),p=n(),m=`Review and manage your privacy settings at https://claude.ai/settings/data-privacy-controls`}))();export{f as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-DR8-3Aex.js";import{Rn as t,t as n,x as r}from"./src-Di342QoJ.js";import{t as i}from"./jsx-runtime-D-D469L8.js";import{Ka as a,oo as o}from"./paths-BZbIj1Z1.js";import{L as s,N as c,V as l}from"./debug-UI3T040K.js";import{n as u,r as d}from"./analytics-DqMQntaB.js";import{Ag as f,Am as p,CC as m,Co as h,Hm as g,SC as _,Um as v,Vo as y,Zo as b,bo as x,jg as S,jm as C,vu as w,wo as T,yu as E}from"./loadAgentsDir-DaApSWNv.js";import{Ft as D,Pt as O}from"./prompt-DHHypkUR.js";import{r as k,t as A}from"./xml-Dg8-vY8G.js";import{randomUUID as j}from"crypto";t(),n(),E(),S(),v();var M=i();function N({input:e,progress:t,verbose:n}){return(0,M.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,M.jsx)(f,{addMargin:!1,param:{text:`<bash-input>${e}</bash-input>`,type:`text`}}),t?(0,M.jsx)(g,{fullOutput:t.fullOutput,output:t.output,elapsedTimeSeconds:t.elapsedTimeSeconds,totalLines:t.totalLines,verbose:n}):w.renderToolUseProgressMessage?.([],{verbose:n,tools:[],terminalSize:void 0})]})}u(),l(),_(),y(),o();function P(){return a().defaultShell??`bash`}E(),O(),k();async function F(t,n,r,i,a){let o=D()&&P()===`powershell`;d(`tengu_input_bash`,{powershell:o});let l=T({content:b({inputString:`<bash-input>${t}</bash-input>`,precedingInputBlocks:n})}),u;a({jsx:(0,M.jsx)(N,{input:t,progress:null,verbose:i.options.verbose}),shouldHidePromptInput:!1});try{let n={...i,setToolJSX:e=>{u=e?.jsx}},s=e=>{a({jsx:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(N,{input:t,progress:e.data,verbose:i.options.verbose}),u]}),shouldHidePromptInput:!1,showSpinner:!1})},c=null;o&&(c=(C(),e(p)).PowerShellTool);let d=c??w,f=(c?await c.call({command:t,dangerouslyDisableSandbox:!0},n,void 0,void 0,s):await w.call({command:t,dangerouslyDisableSandbox:!0},n,void 0,void 0,s)).data;if(!f)throw Error(`No result received from shell command`);let h=f.stderr,g=await m(d,{...f,stderr:``},j()),_=typeof g.content==`string`?g.content:A(f.stdout);return{messages:[x(),l,...r,T({content:`<bash-stdout>${_}</bash-stdout><bash-stderr>${A(h)}</bash-stderr>`})],shouldQuery:!1}}catch(e){return e instanceof c?e.interrupted?{messages:[x(),l,h({toolUse:!1}),...r],shouldQuery:!1}:{messages:[x(),l,...r,T({content:`<bash-stdout>${A(e.stdout)}</bash-stdout><bash-stderr>${A(e.stderr)}</bash-stderr>`})],shouldQuery:!1}:{messages:[x(),l,...r,T({content:`<bash-stderr>Command failed: ${A(s(e))}</bash-stderr>`})],shouldQuery:!1}}finally{a(null)}}export{F as processBashCommand};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{Ct as r,cn as i,mr as a,t as o}from"./state-sIHsFpDu.js";import{$ as s,As as c,Dt as l,Ot as u,Zc as d,el as f,ks as p,tt as m}from"./paths-BZbIj1Z1.js";import{M as h,V as g,d as _,h as v,k as y,p as b,s as x}from"./debug-UI3T040K.js";import{n as S,r as C}from"./analytics-DqMQntaB.js";import{O as w,et as T,k as E,o as D,s as O}from"./log-CzsijfHZ.js";import{n as k,t as ee}from"./sleep-8Eb9j_Ly.js";import{$D as te,$f as ne,$i as re,A as ie,Ac as ae,Aw as oe,Co as se,Dl as ce,FD as le,G as ue,GA as de,Gi as fe,Ho as pe,ID as me,Ik as he,Il as ge,J_ as _e,Ji as ve,K as A,KA as j,Ko as M,Ll as N,MD as P,M_ as F,ND as ye,N_ as be,Nc as xe,Oo as Se,Pl as I,Q_ as Ce,Qf as we,Rk as Te,TO as Ee,Tl as De,U_ as Oe,Vi as ke,Vo as Ae,W_ as je,XE as Me,YE as Ne,Y_ as L,Yo as Pe,Zo as R,_k as Fe,bo as z,eO as Ie,ea as Le,go as B,j_ as Re,jc as ze,jw as Be,kw as Ve,mk as He,o_ as Ue,pa as V,q_ as We,rO as Ge,rS as Ke,s_ as H,tS as qe,vO as Je,w as Ye,wo as U,xo as Xe,yO as Ze}from"./loadAgentsDir-DaApSWNv.js";import{a as W,i as Qe,o as G}from"./xml-Dg8-vY8G.js";import{E as $e,T as et,w as tt}from"./sessionTracing-gKle2qzF.js";import{n as nt,t as rt}from"./slashCommandParsing-Cari0pNg.js";import{randomUUID as K}from"crypto";function it(e,t,n,r,i){let a=0;for(let o of p){let s=n[o];if(s)for(let n of s)for(let s of n.hooks){let c=s.once?()=>{_(`Removing one-shot hook for event ${o} in skill '${r}'`),be(e,t,o,s)}:void 0;Re(e,t,o,n.matcher||``,s,c,i),a++}}a>0&&_(`Registered ${a} hooks from skill '${r}'`)}var at=e((()=>{c(),x(),F()}));function ot(){return!1}function st(){if(!ot())throw Error(`ToolUseContext.options.allowBackgroundForkedSlashCommands is test-only and cannot be enabled outside NODE_ENV=test.`)}async function q(e,t,n,r,i,a,o){let s=Oe(),c=e.pluginInfo?G(e.pluginInfo.repository).marketplace:void 0;C(`tengu_slash_command_forked`,{command_name:e.name,invocation_trigger:`user-slash`,...e.pluginInfo&&{_PROTO_plugin_name:e.pluginInfo.pluginManifest.name,...c&&{_PROTO_marketplace_name:c},...L(e.pluginInfo)}});let{skillContent:u,modifiedGetAppState:f,baseAgent:p,promptMessages:m}=await N(e,t,n),h=e.effort===void 0?p:{...p,effort:e.effort};_(`Executing forked slash command /${e.name} with agent ${h.agentType}`);let g=await n.getAppState();n.options.allowBackgroundForkedSlashCommands===!0&&st();let v=!1;if(g.kairosEnabled&&(v=!0),v){let t=P(),r=V(e),i=l(),c=e=>Ze({value:e,mode:`prompt`,priority:`later`,isMeta:!0,skipSlashCommands:!0,workload:i}),u=async()=>{if(!o?.runId)return;let e=await te({runId:o.runId,rootDir:o.rootDir,priority:`later`,workload:i});for(let t of e)Je(t)},d=async e=>{o?.runId&&await Ie({runId:o.runId,rootDir:o.rootDir,error:e instanceof Error?e.message:String(e)})};return(async()=>{let i=Date.now()+$;for(;Date.now()<i&&n.getAppState().mcp.clients.some(e=>e.type===`pending`);)await k(Q);let o=n.options.refreshTools?.()??n.options.tools,l=[];for await(let r of H({agentDefinition:h,promptMessages:m,toolUseContext:{...n,getAppState:f,abortController:t},canUseTool:a,isAsync:!0,querySource:`agent:custom`,model:e.model,availableTools:o,override:{agentId:s}}))l.push(r);let d=I(l,`Command completed`);_(`Background forked command /${r} completed (agent ${s})`),c(`<scheduled-task-result command="/${r}">\n${d}\n</scheduled-task-result>`);try{await u()}catch(e){O(e)}})().catch(async e=>{O(e),c(`<scheduled-task-result command="/${r}" status="failed">\n${e instanceof Error?e.message:String(e)}\n</scheduled-task-result>`),await d(e)}),{messages:[],shouldQuery:!1,command:e,deferAutonomyCompletion:!!o?.runId}}let y=[],b=[],x=`forked-command-${e.name}`,S=0,w=e=>(S++,{type:`progress`,data:{message:e,type:`agent_progress`,prompt:u,agentId:s},parentToolUseID:x,toolUseID:`${x}-${S}`,timestamp:new Date().toISOString(),uuid:K()}),T=()=>{i({jsx:ne(b,{tools:n.options.tools,verbose:!1}),shouldHidePromptInput:!1,shouldContinueAnimation:!0,showSpinner:!0})};T();try{for await(let t of H({agentDefinition:h,promptMessages:m,toolUseContext:{...n,getAppState:f},canUseTool:a,isAsync:!1,querySource:`agent:custom`,model:e.model,availableTools:n.options.tools})){y.push(t);let e=Pe([t]);if(t.type===`assistant`){let r=He(t);r>0&&n.setResponseLength(e=>e+r);let i=e[0];i&&i.type===`assistant`&&(b.push(w(t)),T())}if(t.type===`user`){let t=e[0];t&&t.type===`user`&&(b.push(w(t)),T())}}}finally{i(null)}let E=I(y,`Command completed`);return _(`Forked slash command /${e.name} completed with agent ${s}`),process.env.USER_TYPE===`ant`&&(E=`[ANT-ONLY] API calls: ${d(le(s))}\n${E}`),{messages:[U({content:R({inputString:`/${V(e)} ${t}`.trim(),precedingInputBlocks:r})}),U({content:`<local-command-stdout>\n${E}\n</local-command-stdout>`})],shouldQuery:!1,command:e,resultText:E}}function ct(e){return!/[^a-zA-Z0-9:\-_]/.test(e)}async function lt(e,t,n,r,i,o,s,c,l,u){let d=nt(e);if(!d){C(`tengu_input_slash_missing`,{});let e="Commands are in the form `/command [args]`";return{messages:[z(),...r,U({content:R({inputString:e,precedingInputBlocks:t})})],shouldQuery:!1,resultText:e}}let{commandName:f,args:p,isMcp:m}=d,h=m?`mcp`:ke().has(f)?f:`custom`;if(!re(f,i.options.commands)){let n=!1;try{await b().stat(`/${f}`),n=!0}catch{}if(ct(f)&&!n){C(`tengu_input_slash_invalid`,{input:f});let e=`Unknown skill: ${f}`;return{messages:[z(),...r,U({content:R({inputString:e,precedingInputBlocks:t})}),...p?[Xe(`Args from unknown skill: ${p}`,`warning`)]:[]],shouldQuery:!1,resultText:e}}let i=K();return a(i),C(`tengu_input_prompt`,{}),et(`user_prompt`,{prompt_length:String(e.length),prompt:$e(e),"prompt.id":i}),{messages:[U({content:R({inputString:e,precedingInputBlocks:t}),uuid:s}),...r],shouldQuery:!0}}let{messages:g,shouldQuery:_,allowedTools:v,model:y,effort:x,command:S,resultText:w,nextInput:T,submitNextInput:E,deferAutonomyCompletion:D}=await ut(f,p,o,i,t,n,c,l,s,u);if(g.length===0){let e={input:h};if(S.type===`prompt`&&S.pluginInfo){let{pluginManifest:t,repository:n}=S.pluginInfo,{marketplace:r}=G(n),i=W(r);e._PROTO_plugin_name=t.name,r&&(e._PROTO_marketplace_name=r),e.plugin_repository=i?n:`third-party`,e.plugin_name=i?t.name:`third-party`,i&&t.version&&(e.plugin_version=t.version),Object.assign(e,L(S.pluginInfo))}return C(`tengu_input_command`,{...e,invocation_trigger:`user-slash`,...process.env.USER_TYPE===`ant`&&{skill_name:f,...S.type===`prompt`&&{skill_source:S.source},...S.loadedFrom&&{skill_loaded_from:S.loadedFrom},...S.kind&&{skill_kind:S.kind}}}),{messages:[],shouldQuery:!1,model:y,nextInput:T,submitNextInput:E,deferAutonomyCompletion:D}}if(g.length===2&&g[1].type===`user`&&typeof g[1].message.content==`string`&&g[1].message.content.startsWith(`Unknown command:`))return e.startsWith(`/var`)||e.startsWith(`/tmp`)||e.startsWith(`/private`)||C(`tengu_input_slash_invalid`,{input:f}),{messages:[z(),...g],shouldQuery:_,allowedTools:v,model:y};let O={input:h};if(S.type===`prompt`&&S.pluginInfo){let{pluginManifest:e,repository:t}=S.pluginInfo,{marketplace:n}=G(t),r=W(n);O._PROTO_plugin_name=e.name,n&&(O._PROTO_marketplace_name=n),O.plugin_repository=r?t:`third-party`,O.plugin_name=r?e.name:`third-party`,r&&e.version&&(O.plugin_version=e.version),Object.assign(O,L(S.pluginInfo))}C(`tengu_input_command`,{...O,invocation_trigger:`user-slash`,...process.env.USER_TYPE===`ant`&&{skill_name:f,...S.type===`prompt`&&{skill_source:S.source},...S.loadedFrom&&{skill_loaded_from:S.loadedFrom},...S.kind&&{skill_kind:S.kind}}});let k=g.length>0&&g[0]&&pe(g[0]);return{messages:_||g.every(M)||k?g:[z(),...g],shouldQuery:_,allowedTools:v,model:y,effort:x,resultText:w,nextInput:T,submitNextInput:E,deferAutonomyCompletion:D}}async function ut(e,t,n,r,i,a,o,s,c,l){let u=ve(e,r.options.commands);if(u.type===`prompt`&&u.userInvocable!==!1&&_e(e),u.userInvocable===!1)return{messages:[U({content:R({inputString:`/${e}`,precedingInputBlocks:i})}),U({content:`This skill can only be invoked by Claude, not directly by users. Ask Claude to use the "${e}" skill for you.`})],shouldQuery:!1,command:u};try{switch(u.type){case`local-jsx`:return new Promise(e=>{let a=!1,o=(n,r)=>{if(a=!0,r?.display===`skip`){e({messages:[],shouldQuery:!1,command:u,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput});return}let o=(r?.metaMessages??[]).map(e=>U({content:e,isMeta:!0})),s=Ke()&&typeof n==`string`&&n.endsWith(` dismissed`);e({messages:r?.display===`system`?s?o:[B(J(u,t)),B(`<local-command-stdout>${n}</local-command-stdout>`),...o]:[U({content:R({inputString:J(u,t),precedingInputBlocks:i})}),U(n?{content:`<local-command-stdout>${n}</local-command-stdout>`}:{content:`<local-command-stdout>${de}</local-command-stdout>`}),...o],shouldQuery:r?.shouldQuery??!1,command:u,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput})};u.load().then(e=>e.call(o,{...r,canUseTool:s},t)).then(t=>{if(t!=null){if(r.options.isNonInteractiveSession){e({messages:[],shouldQuery:!1,command:u});return}a||n({jsx:t,shouldHidePromptInput:!0,showSpinner:!1,isLocalJSXCommand:!0,isImmediate:u.immediate===!0})}}).catch(t=>{O(t),!a&&(a=!0,n({jsx:null,shouldHidePromptInput:!1,clearLocalJSX:!0}),e({messages:[],shouldQuery:!1,command:u}))})});case`local`:{let e=U({content:R({inputString:J(u,u.isSensitive&&t.trim()?`***`:t),precedingInputBlocks:i})});try{let n=z(),i=await(await u.load()).call(t,r);if(i.type===`skip`)return{messages:[],shouldQuery:!1,command:u};if(i.type===`compact`){let t=[n,e,...i.displayText?[U({content:`<local-command-stdout>${i.displayText}</local-command-stdout>`,timestamp:new Date(Date.now()+100).toISOString()})]:[]],r={...i.compactionResult,messagesToKeep:[...i.compactionResult.messagesToKeep??[],...t]};return Te(),{messages:De(r),shouldQuery:!1,command:u}}return{messages:[e,B(`<local-command-stdout>${i.value}</local-command-stdout>`)],shouldQuery:!1,command:u,resultText:i.value}}catch(t){return O(t),{messages:[e,B(`<local-command-stderr>${String(t)}</local-command-stderr>`)],shouldQuery:!1,command:u}}}case`prompt`:try{return u.context===`fork`?await q(u,t,r,i,n,s??ue,l):await Z(u,t,r,i,a,c)}catch(e){return e instanceof y?{messages:[U({content:R({inputString:J(u,t),precedingInputBlocks:i})}),se({toolUse:!1})],shouldQuery:!1,command:u}:{messages:[U({content:R({inputString:J(u,t),precedingInputBlocks:i})}),U({content:`<local-command-stderr>${String(e)}</local-command-stderr>`})],shouldQuery:!1,command:u}}}}catch(e){if(e instanceof h)return{messages:[U({content:R({inputString:e.message,precedingInputBlocks:i})})],shouldQuery:!1,command:u};throw e}}function J(e,t){return Se(V(e),t)}function Y(e,t=`loading`){return[`<${w}>${e}</${w}>`,`<${E}>${e}</${E}>`,`<skill-format>true</skill-format>`].join(`
|
|
2
|
-
`)}function dt(e,t){return[`<${w}>${e}</${w}>`,`<${E}>/${e}</${E}>`,t?`<command-args>${t}</command-args>`:null].filter(Boolean).join(`
|
|
3
|
-
`)}function X(e,t){return e.userInvocable===!1&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)?Y(e.name,e.progressMessage):dt(e.name,t)}async function ft(e,t,n,r,i=[]){let a=fe(e,n);if(!a)throw new h(`Unknown command: ${e}`);if(a.type!==`prompt`)throw Error(`Unexpected ${a.type} command. Expected 'prompt' command. Use /${e} directly in the main conversation.`);return Z(a,t,r,[],i)}async function Z(e,t,i,a=[],c=[],l){if(n(process.env.CLAUDE_CODE_COORDINATOR_MODE)&&!i.agentId){let n=X(e,t),r=[`Skill "/${e.name}" is available for workers.`];e.description&&r.push(`Description: ${e.description}`),e.whenToUse&&r.push(`When to use: ${e.whenToUse}`);let i=e.allowedTools??[];i.length>0&&r.push(`This skill grants workers additional tool permissions: ${i.join(`, `)}`),r.push(`\nInstruct a worker to use this skill by including "Use the /${e.name} skill" in your Agent prompt. The worker has access to the Skill tool and will receive the skill's content and permissions when it invokes it.`);let a=[{type:`text`,text:r.join(`
|
|
4
|
-
`)}];return{messages:[U({content:n,uuid:l}),U({content:a,isMeta:!0})],shouldQuery:!0,model:e.model,effort:e.effort,command:e}}let u=await e.getPromptForCommand(t,i),d=!oe(`hooks`)||Be(e.source);if(e.hooks&&d){let t=r();it(i.setAppState,t,e.hooks,e.name,e.type===`prompt`?e.skillRoot:void 0)}let f=e.source?`${e.source}:${e.name}`:e.name,p=u.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
5
|
-
|
|
6
|
-
`);o(e.name,f,p,s()?.agentId??null);let m=X(e,t),h=ie(e.allowedTools??[]),g=c.length>0||a.length>0?[...c,...a,...u]:u,_=await Me(ze(u.filter(e=>e.type===`text`).map(e=>e.text).join(` `),i,null,[],i.messages,`repl_main_thread`,{skipSkillDiscovery:!0}));return{messages:[U({content:m,uuid:l}),U({content:g,isMeta:!0}),..._,ae({type:`command_permissions`,allowedTools:h,model:e.model})],shouldQuery:!0,allowedTools:h,model:e.model,effort:e.effort,command:e}}var Q,$;e((()=>{i(),Le(),j(),T(),S(),me(),ce(),he(),Ue(),we(),ye(),m(),xe(),x(),t(),g(),f(),ge(),v(),qe(),Ne(),at(),D(),Ee(),Ae(),Ye(),A(),Qe(),Ve(),rt(),ee(),We(),tt(),Ce(),Fe(),je(),Ge(),u(),Q=200,$=1e4}))();export{Y as formatSkillLoadingMetadata,ft as processPromptSlashCommand,lt as processSlashCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./projectContext-iWPqcl0Z.js";e();export{s as getProjectContextPath,r as getProjectStorageDir,a as getProjectsRegistryPath,n as getSkillLearningRootDir,i as listKnownProjects,o as resetProjectContextCacheForTest,t as resolveProjectContext};
|