claude-code-best 2.6.13 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-BqR8LhJq.js +1 -0
- package/dist/chunks/App-DkBMWXkK.js +1 -0
- package/dist/chunks/ApproveApiKey-5xd0lUV7.js +1 -0
- package/dist/chunks/ApproveApiKey-Dmr2VaVA.js +1 -0
- package/dist/chunks/AssistantSessionChooser-C7rigDkQ.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-RtEwbumC.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-7s3ULbNF.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-Bjv-sERa.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BTysDIlI.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DosNL91g.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-Cc1yaM-M.js +1 -0
- package/dist/chunks/DesktopHandoff-Cy89ZB_9.js +1 -0
- package/dist/chunks/DevChannelsDialog-ws8prcNK.js +1 -0
- package/dist/chunks/DiffDialog-BhqgxA7o.js +3 -0
- package/dist/chunks/Doctor-BWouB_9X.js +1 -0
- package/dist/chunks/Doctor-Ts5k8hn1.js +3 -0
- package/dist/chunks/ExitFlow-BBoImtT_.js +2 -0
- package/dist/chunks/Feedback-BVbSMBwY.js +2 -0
- package/dist/chunks/Grove-CTQrX7WO.js +1 -0
- package/dist/chunks/Grove-ZMHK4CBZ.js +11 -0
- package/dist/chunks/HybridTransport-B9g074Y1.js +4 -0
- package/dist/chunks/ITermBackend-DaFK8DOH.js +1 -0
- package/dist/chunks/InvalidConfigDialog-BkZkVKB4.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-Lr60eQWj.js +1 -0
- package/dist/chunks/MCPConnectionManager-DmJ6dLOp.js +1 -0
- package/dist/chunks/McpParsingWarnings-CE2pQPXV.js +1 -0
- package/dist/chunks/MessageSelector-BT1FDbwv.js +3 -0
- package/dist/chunks/Messages-DT2gDtrJ.js +11 -0
- package/dist/chunks/Onboarding-DsqnXQel.js +1 -0
- package/dist/chunks/OverageCreditUpsell-UWtCrOmN.js +1 -0
- package/dist/chunks/PluginSettings-OJQz3d5V.js +17 -0
- package/dist/chunks/PromptInputFooterSuggestions-BImBB6Yk.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-CblAb9vk.js +1 -0
- package/dist/chunks/QueryEngine-_re1pGHr.js +1 -0
- package/dist/chunks/REPL-eBTeslsR.js +147 -0
- package/dist/chunks/REPL-wIg0cBqS.js +1 -0
- package/dist/chunks/RemoteCallout-DMQai8_P.js +1 -0
- package/dist/chunks/RemoteSessionManager-DQmsHvj_.js +2 -0
- package/dist/chunks/ResumeConversation-D81hDeTl.js +1 -0
- package/dist/chunks/SSETransport-BbeM6bi9.js +4 -0
- package/dist/chunks/SearchExtraToolsTool-QbJQCWXd.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BQJXHbWh.js +2 -0
- package/dist/chunks/SentryErrorBoundary-Cnw74oVG.js +1 -0
- package/dist/chunks/Settings-DiXc-_IG.js +2 -0
- package/dist/chunks/TeleportProgress-B3oRJlWH.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-GPuEipFy.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-CcDuR6o9.js +1 -0
- package/dist/chunks/ThemePicker-BjSRjA_L.js +1 -0
- package/dist/chunks/TmuxBackend-BE3zsPKE.js +9 -0
- package/dist/chunks/TrustDialog-B6Qg0xUr.js +1 -0
- package/dist/chunks/ValidationErrorsList-C5BoLiye.js +2 -0
- package/dist/chunks/WelcomeV2-BJAKZYz1.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-BcwpxU2Q.js +2 -0
- package/dist/chunks/add-dir-OR7-VVcq.js +1 -0
- package/dist/chunks/agentDisplay-CMqTUh0A.js +1 -0
- package/dist/chunks/agents-DRtgUZ6t.js +103 -0
- package/dist/chunks/agents-EolUGDZB.js +2 -0
- package/dist/chunks/ant-Bgl31h7a.js +1 -0
- package/dist/chunks/api-BpQPVgif.js +1 -0
- package/dist/chunks/api-xFvB7WoB.js +1 -0
- package/dist/chunks/asciicast-CJObpRg9.js +1 -0
- package/dist/chunks/asciicast-Dr_Div_R.js +4 -0
- package/dist/chunks/assistant-CENsWvTb.js +1 -0
- package/dist/chunks/assistant-CHawoD04.js +1 -0
- package/dist/chunks/assistant-s7XNIA76.js +1 -0
- package/dist/chunks/auth-DX12yVM8.js +1 -0
- package/dist/chunks/auth-h6VL9BbC.js +1 -0
- package/dist/chunks/autoMode-BDzVqEPm.js +45 -0
- package/dist/chunks/autonomy-CeqOXzJl.js +19 -0
- package/dist/chunks/autonomy-D2YudQnH.js +1 -0
- package/dist/chunks/autonomyPanel-B0OQV4lv.js +1 -0
- package/dist/chunks/backgroundHousekeeping-CvHD981l.js +17 -0
- package/dist/chunks/backgroundHousekeeping-DMkk-QoZ.js +1 -0
- package/dist/chunks/banner-DNLUJFS_.js +2 -0
- package/dist/chunks/bg-D_H-uZDS.js +9 -0
- package/dist/chunks/bg-FtpmvQuT.js +1 -0
- package/dist/chunks/branch-D44HjlJp.js +3 -0
- package/dist/chunks/bridge-4sldfa8u.js +2 -0
- package/dist/chunks/bridgeConfig-BM7iHryd.js +1 -0
- package/dist/chunks/bridgeConfig-CcCNsSBX.js +1 -0
- package/dist/chunks/bridgeEnabled-CYddgTU1.js +1 -0
- package/dist/chunks/bridgeEnabled-DoT2l1Oj.js +1 -0
- package/dist/chunks/bridgeMain-DaO51duk.js +68 -0
- package/dist/chunks/bridgeMain-Dc4-ZK69.js +1 -0
- package/dist/chunks/bridgeMessaging-IlSWKGmC.js +1 -0
- package/dist/chunks/bridgePointer-fFD_tbSk.js +1 -0
- package/dist/chunks/browser-DwnUS505.js +1 -0
- package/dist/chunks/btw-CrdUyRUP.js +1 -0
- package/dist/chunks/buddy-Ci0hdCf9.js +3 -0
- package/dist/chunks/bypassPermissionsKillswitch-BWOlc_sK.js +1 -0
- package/dist/chunks/caches-BHRJHGlc.js +1 -0
- package/dist/chunks/caches-CitduRKp.js +3 -0
- package/dist/chunks/ccrClient-yNKhQYnf.js +1 -0
- package/dist/chunks/changeDetector-B1tCH9Pa.js +1 -0
- package/dist/chunks/channelNotification-D8NPg8I8.js +1 -0
- package/dist/chunks/channelNotification-oE3eipDZ.js +1 -0
- package/dist/chunks/chrome-CwAwCY0V.js +1 -0
- package/dist/chunks/chromeNativeHost-63xqELw-.js +1 -0
- package/dist/chunks/claudeDesktop-CX1AsJie.js +1 -0
- package/dist/chunks/cleanup-C0gyKaOb.js +1 -0
- package/dist/chunks/clear-B5D08sZ0.js +1 -0
- package/dist/chunks/cliLaunch-8aeIk2ts.js +1 -0
- package/dist/chunks/client-un1k_6md.js +1 -0
- package/dist/chunks/color-BtVvrSvq.js +1 -0
- package/dist/chunks/commands--qEK1j9j.js +1 -0
- package/dist/chunks/commitAttribution-AEb-sE-t.js +1 -0
- package/dist/chunks/commitAttribution-HP_CWP0X.js +2 -0
- package/dist/chunks/common-BBRP_KzA.js +1 -0
- package/dist/chunks/common-BD4Q7osK.js +1 -0
- package/dist/chunks/common-C56I-_O3.js +1 -0
- package/dist/chunks/compact-BNhxD2UA.js +3 -0
- package/dist/chunks/companion-BlhNrZiL.js +1 -0
- package/dist/chunks/completionCache-BHSsdkBs.js +1 -0
- package/dist/chunks/completionCache-Daqaxlf3.js +4 -0
- package/dist/chunks/computerUseLock-BoEK9xYv.js +1 -0
- package/dist/chunks/config-9z8716kz.js +1 -0
- package/dist/chunks/config-f8Cx16Z6.js +1 -0
- package/dist/chunks/context-BdOjhAmM.js +1 -0
- package/dist/chunks/context-noninteractive-CnaDbgvf.js +54 -0
- package/dist/chunks/context-noninteractive-DRM7gbFk.js +1 -0
- package/dist/chunks/conversation-B9pq-m4L.js +1 -0
- package/dist/chunks/conversation-DUxXVrGj.js +1 -0
- package/dist/chunks/copy-Cjl0-hg1.js +7 -0
- package/dist/chunks/createSSHSession-CYaHalxc.js +6 -0
- package/dist/chunks/createSession-DoR2K7ay.js +1 -0
- package/dist/chunks/createSession-VlSLvi7J.js +1 -0
- package/dist/chunks/cronJitterConfig-DjSd7nvj.js +6 -0
- package/dist/chunks/crossProjectResume-CDWr5DFl.js +40 -0
- package/dist/chunks/daemon-FAp0WyY6.js +2 -0
- package/dist/chunks/datadog-CahWdK03.js +1 -0
- package/dist/chunks/datadog-DPkKCR8M.js +1 -0
- package/dist/chunks/debug-DIYxb3SF.js +1 -0
- package/dist/chunks/debug-otxXY3j-.js +5 -0
- package/dist/chunks/debugUtils-CiEnbhiz.js +1 -0
- package/dist/chunks/desktop-y3mzgaWo.js +1 -0
- package/dist/chunks/detached-Brq3-vHi.js +5 -0
- package/dist/chunks/detectRepository-CSN3yxkq.js +1 -0
- package/dist/chunks/detectRepository-CbR0WgtE.js +1 -0
- package/dist/chunks/detection-BPPZCanO.js +1 -0
- package/dist/chunks/detection-DrdKrqbQ.js +1 -0
- package/dist/chunks/diff-hpp0dp6U.js +1 -0
- package/dist/chunks/directoryCompletion-DAc3u1K2.js +1 -0
- package/dist/chunks/doctor-B230p0R_.js +1 -0
- package/dist/chunks/earlyInput-vv9abU2L.js +1 -0
- package/dist/chunks/effort-D7i2v6vd.js +9 -0
- package/dist/chunks/entry-Du3gtq9o.js +14 -0
- package/dist/chunks/env-BH-OBzcA.js +1 -0
- package/dist/chunks/envLessBridgeConfig-CKD4eOEe.js +1 -0
- package/dist/chunks/envLessBridgeConfig-DI0ouryy.js +1 -0
- package/dist/chunks/escHotkey-DfdC44i7.js +259 -0
- package/dist/chunks/execFileNoThrow-B_aZH_GP.js +1 -0
- package/dist/chunks/execSyncWrapper-Bn7EJqtD.js +1 -0
- package/dist/chunks/executor-BJb5d6mo.js +1 -0
- package/dist/chunks/executor-Dmn3RTuI.js +1561 -0
- package/dist/chunks/exit-fntBGxEC.js +1 -0
- package/dist/chunks/export-Dy9M7FnZ.js +2 -0
- package/dist/chunks/exportRenderer-Ckv4v0ye.js +1 -0
- package/dist/chunks/extra-usage-DLEvlKzs.js +1 -0
- package/dist/chunks/extra-usage-core-3KkeQSve.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DUezD54f.js +1 -0
- package/dist/chunks/extra-usage-pU11YXHS.js +1 -0
- package/dist/chunks/extraUsage-B-l-oe-7.js +1 -0
- package/dist/chunks/extractMemories-CXarlmZp.js +1 -0
- package/dist/chunks/fast-BzfzSH7K.js +1 -0
- package/dist/chunks/fast-CbLu_WYL.js +1 -0
- package/dist/chunks/feedback-DiyZIbov.js +1 -0
- package/dist/chunks/firstPartyEventLogger-Dig8Mv7_.js +1 -0
- package/dist/chunks/flushGate-Ci3NHOV4.js +1 -0
- package/dist/chunks/gates-CtkQH6jy.js +1 -0
- package/dist/chunks/gates-xscCu8-N.js +1 -0
- package/dist/chunks/gemini-BCuY2aYj.js +1 -0
- package/dist/chunks/generateRecap-DA0SNyFR.js +1 -0
- package/dist/chunks/generateSessionName-BtQ4NGXP.js +1 -0
- package/dist/chunks/genericProcessUtils-D-78JZxz.js +23 -0
- package/dist/chunks/git-BZEgupMC.js +1 -0
- package/dist/chunks/git-DayFjsvj.js +6 -0
- package/dist/chunks/githubRepoPathMapping-C5RkiJWj.js +1 -0
- package/dist/chunks/goal-B6GHfd9J.js +3 -0
- package/dist/chunks/grok-DDM6xYuy.js +1 -0
- package/dist/chunks/growthbook-D-Po5Uxl.js +1 -0
- package/dist/chunks/heapdump-DHlUfpVV.js +5 -0
- package/dist/chunks/help-BulgC9m7.js +1 -0
- package/dist/chunks/hooks-D5AcFnD1.js +1 -0
- package/dist/chunks/hooks-jxIrev-X.js +79 -0
- package/dist/chunks/hostAdapter-BvraKy0o.js +1 -0
- package/dist/chunks/hostGuard-CWijeIyE.js +1 -0
- package/dist/chunks/ide-tx4qMFln.js +2 -0
- package/dist/chunks/inboundAttachments-C93Q7Dvt.js +1 -0
- package/dist/chunks/inboundAttachments-DxcFiX4f.js +1 -0
- package/dist/chunks/initReplBridge-BEldrf6f.js +1 -0
- package/dist/chunks/insights-HEsEDeCQ.js +822 -0
- package/dist/chunks/install-DRsM0bJO.js +1 -0
- package/dist/chunks/install-github-app-BVK5Z95c.js +147 -0
- package/dist/chunks/install-slack-app-DCw3O2J_.js +1 -0
- package/dist/chunks/instrumentation-DJ-R1s8C.js +12 -0
- package/dist/chunks/job-CUz_OGIq.js +2 -0
- package/dist/chunks/jwtUtils-DVyv2jab.js +1 -0
- package/dist/chunks/keybindings-Chr5nGBu.js +2 -0
- package/dist/chunks/lang-C7kJlPIh.js +1 -0
- package/dist/chunks/language-CQXwoDkI.js +1 -0
- package/dist/chunks/language-Lx3WlBN6.js +1 -0
- package/dist/chunks/launchAgentsPlatform-Fsslu42L.js +1 -0
- package/dist/chunks/launchAutofixPr-Cww8uS_5.js +18 -0
- package/dist/chunks/launchLocalMemory-BywmyvSJ.js +3 -0
- package/dist/chunks/launchLocalVault-BU3a5NV7.js +3 -0
- package/dist/chunks/launchMemoryStores-QUCODCJS.js +1 -0
- package/dist/chunks/launchOnboarding-BriZ0oIA.js +8 -0
- package/dist/chunks/launchSchedule-uLm7zt_B.js +1 -0
- package/dist/chunks/launchSkillStore-DMo2bV8X.js +1 -0
- package/dist/chunks/launchTeleport-DgQWSfXM.js +3 -0
- package/dist/chunks/launchVault-DfnBBFne.js +1 -0
- package/dist/chunks/loadAgentsDir-Br5fGLLI.js +4697 -0
- package/dist/chunks/loadAgentsDir-DDYPdQKP.js +1 -0
- package/dist/chunks/loadPluginHooks-C4soqr6g.js +1 -0
- package/dist/chunks/localSearch-CELyiWF6.js +1 -0
- package/dist/chunks/localSearch-DhZMcy5t.js +1 -0
- package/dist/chunks/log-DS97_rIr.js +1 -0
- package/dist/chunks/login-CvvIpkpq.js +1 -0
- package/dist/chunks/login-DjgITOAw.js +1 -0
- package/dist/chunks/logoV2Utils-BN_HrHSc.js +1 -0
- package/dist/chunks/logout-DOFJpZEJ.js +1 -0
- package/dist/chunks/magicDocs-2Zr7bYY_.js +57 -0
- package/dist/chunks/main-BafHJuKH.js +31 -0
- package/dist/chunks/main-D61CvHRy.js +1312 -0
- package/dist/chunks/mappers-BCiceNt3.js +1 -0
- package/dist/chunks/mcp-BV4m1Gbl.js +2 -0
- package/dist/chunks/mcp-CrAgAK9u.js +1 -0
- package/dist/chunks/mcp-DK4m73gO.js +6 -0
- package/dist/chunks/mcpServer-7zyXl9Wg.js +1 -0
- package/dist/chunks/mcpServer-sa9Z183j.js +1 -0
- package/dist/chunks/memoize-CPexXTP7.js +1 -0
- package/dist/chunks/memory-BrJPVgxn.js +1 -0
- package/dist/chunks/mode-Cr-NTlRa.js +2 -0
- package/dist/chunks/model-CCjuMV6k.js +1 -0
- package/dist/chunks/model-aJS_plgM.js +1 -0
- package/dist/chunks/onChangeAppState-C9EvI3EH.js +1 -0
- package/dist/chunks/openai-Cvb_-1A-.js +10 -0
- package/dist/chunks/overageCreditGrant-cGQilawd.js +1 -0
- package/dist/chunks/panel-DO_faHV-.js +1 -0
- package/dist/chunks/panelCall-DqZuxAf0.js +1 -0
- package/dist/chunks/parser-BXWr_mLL.js +1 -0
- package/dist/chunks/parser-DbKSpFRq.js +1 -0
- package/dist/chunks/passes-DsrceO14.js +1 -0
- package/dist/chunks/path-nCzt96pE.js +1 -0
- package/dist/chunks/paths-DfGsIjPm.js +39 -0
- package/dist/chunks/permissions-CjPIu4IE.js +3 -0
- package/dist/chunks/pipeTransport-C5u1K0wu.js +1 -0
- package/dist/chunks/plan-YjMAcn6g.js +1 -0
- package/dist/chunks/platform-DYZVoA9J.js +2 -0
- package/dist/chunks/plugin-Oux5bBQj.js +1 -0
- package/dist/chunks/pluginAutoupdate-Dl9U-fbk.js +1 -0
- package/dist/chunks/pluginBlocklist-BzI5DNeN.js +1 -0
- package/dist/chunks/pluginCliCommands-CExAcsaR.js +1 -0
- package/dist/chunks/pluginFlagging-BeqrbhgG.js +1 -0
- package/dist/chunks/pluginOperations-s0FQGOBm.js +2 -0
- package/dist/chunks/pluginStartupCheck-BVag9B-T.js +1 -0
- package/dist/chunks/pluginStartupCheck-BuorUEEf.js +1 -0
- package/dist/chunks/plugins-DTQHVJtY.js +4 -0
- package/dist/chunks/policyLimits-zoyF_6O4.js +1 -0
- package/dist/chunks/pollConfig-C19GiX7i.js +1 -0
- package/dist/chunks/poor-Bx5vvamq.js +1 -0
- package/dist/chunks/poorMode-BCoeB5zB.js +1 -0
- package/dist/chunks/poorMode-CTd_csCl.js +1 -0
- package/dist/chunks/print-UXl3rG8y.js +39 -0
- package/dist/chunks/privacy-settings-e43D9a4o.js +1 -0
- package/dist/chunks/processBashCommand-CvR9-gf8.js +1 -0
- package/dist/chunks/processSlashCommand-CB3wyAX7.js +6 -0
- package/dist/chunks/projectContext-D3_u80TY.js +1 -0
- package/dist/chunks/prompt-53lRY98R.js +1 -0
- package/dist/chunks/prompt-B8M-HLIS.js +227 -0
- package/dist/chunks/prompt-CooZNM1u.js +1 -0
- package/dist/chunks/promptEditor-CHiopfD7.js +4 -0
- package/dist/chunks/protocolHandler-DjivYn8H.js +13 -0
- package/dist/chunks/proxy-nPT6a6QY.js +99 -0
- package/dist/chunks/rate-limit-options-B-vndk5W.js +1 -0
- package/dist/chunks/rcDebugLog-BoroyfjB.js +11 -0
- package/dist/chunks/referral-DOqhciQu.js +1 -0
- package/dist/chunks/refresh-C8uLznwm.js +1 -0
- package/dist/chunks/registerProtocol-4lQ7O4Cc.js +36 -0
- package/dist/chunks/registry-q6v98JYd.js +1 -0
- package/dist/chunks/release-notes-C7JHshX3.js +4 -0
- package/dist/chunks/releaseNotes-CXY-xAja.js +2 -0
- package/dist/chunks/reload-plugins-DLS5lQcc.js +1 -0
- package/dist/chunks/remote-env-DhHea8yK.js +1 -0
- package/dist/chunks/remoteBridgeCore-BhOLhQIA.js +1 -0
- package/dist/chunks/remoteControlServer-CI0F83pg.js +3 -0
- package/dist/chunks/rename-DiKWWCzB.js +1 -0
- package/dist/chunks/renderOptions-DKe32LfM.js +1 -0
- package/dist/chunks/resume-DA4ToJFW.js +2 -0
- package/dist/chunks/runtimeObserver-BfVC8KK9.js +1 -0
- package/dist/chunks/runtimeObserver-DetZ5Tek.js +10 -0
- package/dist/chunks/sandbox-adapter-wh4cKN45.js +1 -0
- package/dist/chunks/sandbox-toggle-D8MgV0DT.js +1 -0
- package/dist/chunks/searchExtraTools-DbPpcAPw.js +1 -0
- package/dist/chunks/sentry-C3sL9nhF.js +13 -0
- package/dist/chunks/session-Bd-4QCqc.js +2 -0
- package/dist/chunks/sessionDiscovery-D_KPF86E.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-COne5L2E.js +1 -0
- package/dist/chunks/sessionMemory-0Jqo1_MV.js +1 -0
- package/dist/chunks/sessionMemory-BDt_8bNB.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BFIJ1nqF.js +1 -0
- package/dist/chunks/sessionObserver-CEky1SLb.js +1 -0
- package/dist/chunks/sessionObserver-CQxIKV8D.js +20 -0
- package/dist/chunks/sessionStorage-D1XhqZyW.js +1 -0
- package/dist/chunks/sessionTitle-CB0ZEkS_.js +14 -0
- package/dist/chunks/sessionTracing-BIKXLTJZ.js +11 -0
- package/dist/chunks/settingsSync-pI3L3CeR.js +1 -0
- package/dist/chunks/setup-BSi50fkU.js +1 -0
- package/dist/chunks/setup-DjsmjRKQ.js +2 -0
- package/dist/chunks/setup-Dq0_SRA1.js +9 -0
- package/dist/chunks/shadowedRuleDetection-DvAjOOPL.js +1 -0
- package/dist/chunks/shellQuote-D8XPeqkc.js +1 -0
- package/dist/chunks/sideQuestion-BrTA8ooG.js +20 -0
- package/dist/chunks/sink-CqWxcRl9.js +1 -0
- package/dist/chunks/sink-Dkat5kH9.js +1 -0
- package/dist/chunks/sinks--frMI4-5.js +2 -0
- package/dist/chunks/sinks-CvPAVcMY.js +1 -0
- package/dist/chunks/skill-learning-2LV0yuwF.js +5 -0
- package/dist/chunks/skillChangeDetector-B5CGPl7e.js +1 -0
- package/dist/chunks/skillGapStore-Dc29T-OG.js +1 -0
- package/dist/chunks/skillGapStore-KzRf6Ezr.js +5 -0
- package/dist/chunks/skillGenerator-BdOHsgc4.js +8 -0
- package/dist/chunks/skillLearning-CdcVIG14.js +1 -0
- package/dist/chunks/skillLearning-DXWMxSA2.js +1 -0
- package/dist/chunks/skillPanel-zMY8o-86.js +28 -0
- package/dist/chunks/skillSearchPanel-l8aolUP8.js +21 -0
- package/dist/chunks/skills-BeMWJPup.js +1 -0
- package/dist/chunks/sprites-qel_EgTP.js +1 -0
- package/dist/chunks/startupProfiler-CnDpob1v.js +3 -0
- package/dist/chunks/startupProfiler-TrMfE6Q4.js +1 -0
- package/dist/chunks/stats-CEBfahqM.js +1 -0
- package/dist/chunks/status-C9KXyfDk.js +1 -0
- package/dist/chunks/statusNoticeHelpers-CxoN9oDh.js +1 -0
- package/dist/chunks/stickers-eHrGA1W5.js +1 -0
- package/dist/chunks/tag-Dvl7Us9y.js +11 -0
- package/dist/chunks/tasks-BhiwUF0n.js +1 -0
- package/dist/chunks/teamHelpers-COQazluD.js +1 -0
- package/dist/chunks/teamHelpers-Mgfrv-Jf.js +1 -0
- package/dist/chunks/teammateModeSnapshot-8EWjlA-s.js +1 -0
- package/dist/chunks/teammateModeSnapshot-BV-P8s5r.js +1 -0
- package/dist/chunks/teleport-U5Zgqw3H.js +1 -0
- package/dist/chunks/templateJobs-C3idypN_.js +12 -0
- package/dist/chunks/terminalSetup-CmAEgt-5.js +33 -0
- package/dist/chunks/terminalSetup-mvAN4no7.js +1 -0
- package/dist/chunks/theme-BD2H4vJi.js +1 -0
- package/dist/chunks/thinkback-BOByXYp2.js +1 -0
- package/dist/chunks/thinkback-Dzu2mnNF.js +1 -0
- package/dist/chunks/thinkback-play-BX1K2UMY.js +1 -0
- package/dist/chunks/tmux-DruHFjDy.js +1 -0
- package/dist/chunks/toolEventObserver-B6cLV_dK.js +1 -0
- package/dist/chunks/toolEventObserver-i6it3p2_.js +1 -0
- package/dist/chunks/toolPool--2gNFbrz.js +1 -0
- package/dist/chunks/toolPool-dNV2JxUI.js +1 -0
- package/dist/chunks/trustedDevice-DY8OosTr.js +1 -0
- package/dist/chunks/trustedDevice-zya_Ml1N.js +1 -0
- package/dist/chunks/tui-KoYD82tT.js +6 -0
- package/dist/chunks/types-D5R26wwH.js +17 -0
- package/dist/chunks/udsClient-RkYuzeZC.js +1 -0
- package/dist/chunks/ultrareviewCommand-CCkKby4J.js +3 -0
- package/dist/chunks/undercover-CIutVLEO.js +1 -0
- package/dist/chunks/undercover-D9O2McNG.js +31 -0
- package/dist/chunks/up-BPM85EYl.js +12 -0
- package/dist/chunks/updateCCB-Bmn3Y63Y.js +11 -0
- package/dist/chunks/upgrade-D3rVOeHO.js +1 -0
- package/dist/chunks/upgrade-Dq3l14ZY.js +1 -0
- package/dist/chunks/upload-1PmElPfW.js +1 -0
- package/dist/chunks/upstreamproxy-BBTSJnad.js +11 -0
- package/dist/chunks/usage-B5G8FOZ3.js +1 -0
- package/dist/chunks/usage-VtTu7beE.js +1 -0
- package/dist/chunks/useMainLoopModel-CaQLIr1V.js +1 -0
- package/dist/chunks/useManagePlugins-BvoeOnqq.js +1 -0
- package/dist/chunks/useMergedTools-C133BfRp.js +1 -0
- package/dist/chunks/useSearchInput-CROB7AbC.js +1 -0
- package/dist/chunks/useSettingsErrors-DRxtFXoe.js +1 -0
- package/dist/chunks/useVoice-BQ9aSFJe.js +1 -0
- package/dist/chunks/util-BZnJgF79.js +1 -0
- package/dist/chunks/utils-4gsxQpga.js +1 -0
- package/dist/chunks/validatePlugin-DlrnBhPA.js +1 -0
- package/dist/chunks/vim-BXQCLoFJ.js +1 -0
- package/dist/chunks/voice-CeRmLRHT.js +2 -0
- package/dist/chunks/voice-QHyDff3f.js +8 -0
- package/dist/chunks/voiceModeEnabled-Bq_rttkL.js +1 -0
- package/dist/chunks/voiceModeEnabled-CLAVCVLW.js +1 -0
- package/dist/chunks/voiceStreamSTT-BDKenO5F.js +1 -0
- package/dist/chunks/voiceStreamSTT-CL52x8wZ.js +1 -0
- package/dist/chunks/which-BnEnzWhs.js +1 -0
- package/dist/chunks/windowsPaths-43st5EQF.js +1 -0
- package/dist/chunks/windowsPaths-DerzGPcz.js +2 -0
- package/dist/chunks/workSecret-qRMNrQy2.js +1 -0
- package/dist/chunks/workerRegistry-BUD3lBk_.js +1 -0
- package/dist/chunks/worktree-C0f9Ke-R.js +1 -0
- package/dist/chunks/xml-DvVQHZ1N.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AddWorkspaceDirectory-BKIYdg96.js +0 -1
- package/dist/chunks/App-BAwWP3iN.js +0 -1
- package/dist/chunks/ApproveApiKey-CJFvgVKS.js +0 -1
- package/dist/chunks/ApproveApiKey-da08NX2f.js +0 -1
- package/dist/chunks/AssistantSessionChooser-DQMKGO_q.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-Jtiqm4k2.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-D7TJ4Qn1.js +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-CuPz5Xfi.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CRC6kEV1.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-J0uv5XzG.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-CE4OlAHo.js +0 -1
- package/dist/chunks/DesktopHandoff-B_vNnZS5.js +0 -1
- package/dist/chunks/DevChannelsDialog-kjRnWtNf.js +0 -1
- package/dist/chunks/DiffDialog-CSBWOnXJ.js +0 -3
- package/dist/chunks/Doctor-DhK599q8.js +0 -1
- package/dist/chunks/Doctor-VJ5ZGb8g.js +0 -3
- package/dist/chunks/ExitFlow-M5XPGBHL.js +0 -2
- package/dist/chunks/Feedback-FHvqI2bu.js +0 -2
- package/dist/chunks/Grove-68muTpx6.js +0 -1
- package/dist/chunks/Grove-BC2IZIhN.js +0 -11
- package/dist/chunks/HybridTransport-Df_FceV2.js +0 -4
- package/dist/chunks/ITermBackend-DkpK9X1H.js +0 -1
- package/dist/chunks/InvalidConfigDialog-Cm6Yvt00.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-Ai3D8AL1.js +0 -1
- package/dist/chunks/MCPConnectionManager-BqNXYQEr.js +0 -1
- package/dist/chunks/McpParsingWarnings-BZcVbGhE.js +0 -1
- package/dist/chunks/MessageSelector-BXOoEogr.js +0 -3
- package/dist/chunks/Messages-F6OIAv8C.js +0 -11
- package/dist/chunks/Onboarding-n1aA7tmN.js +0 -1
- package/dist/chunks/OverageCreditUpsell-Bt23I92r.js +0 -1
- package/dist/chunks/PluginSettings-Dgu23nzv.js +0 -17
- package/dist/chunks/PromptInputFooterSuggestions-uiV23aG4.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-D84vnNKM.js +0 -1
- package/dist/chunks/QueryEngine-CEodAvI2.js +0 -1
- package/dist/chunks/REPL-CTTa9BK0.js +0 -97
- package/dist/chunks/REPL-IO7wsKaQ.js +0 -1
- package/dist/chunks/RemoteCallout-BYKqws96.js +0 -1
- package/dist/chunks/RemoteSessionManager-Dq0W_fcj.js +0 -2
- package/dist/chunks/ResumeConversation-CxzeCdL8.js +0 -1
- package/dist/chunks/SSETransport-CJrrD1ln.js +0 -4
- package/dist/chunks/SearchExtraToolsTool-DI-36R5p.js +0 -1
- package/dist/chunks/SentryErrorBoundary-BKPxEWOf.js +0 -1
- package/dist/chunks/SentryErrorBoundary-CcI0kkLW.js +0 -2
- package/dist/chunks/Settings-CGcBR9CD.js +0 -2
- package/dist/chunks/TeleportProgress-C7muqjDw.js +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-B3pUiRc2.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-ClyBQR3K.js +0 -1
- package/dist/chunks/ThemePicker-CGIB6YiW.js +0 -1
- package/dist/chunks/TmuxBackend-m2ldrneQ.js +0 -9
- package/dist/chunks/TrustDialog-o5kqmn6m.js +0 -1
- package/dist/chunks/ValidationErrorsList-D7bXMb0U.js +0 -2
- package/dist/chunks/WelcomeV2-Ckp3JPnA.js +0 -1
- package/dist/chunks/WindowsTerminalBackend-DsDqNWSP.js +0 -2
- package/dist/chunks/add-dir-DTP3NrLy.js +0 -1
- package/dist/chunks/agentDisplay-BEn43jMP.js +0 -1
- package/dist/chunks/agents-3ii2LyeQ.js +0 -2
- package/dist/chunks/agents-g0PDZl_l.js +0 -103
- package/dist/chunks/ant-PZvt_t1G.js +0 -1
- package/dist/chunks/api-BRckHGQ5.js +0 -1
- package/dist/chunks/api-DBvyymX6.js +0 -1
- package/dist/chunks/asciicast-C3nf97NR.js +0 -1
- package/dist/chunks/asciicast-DIsaWcsJ.js +0 -4
- package/dist/chunks/assistant-BBmaU8-A.js +0 -1
- package/dist/chunks/assistant-CMaN0QzY.js +0 -1
- package/dist/chunks/assistant-CVhvOfqJ.js +0 -1
- package/dist/chunks/auth-BXzbkJcE.js +0 -1
- package/dist/chunks/auth-Cud9tPJB.js +0 -1
- package/dist/chunks/autoMode-BREcJLYf.js +0 -45
- package/dist/chunks/autonomy-CuQizTZi.js +0 -1
- package/dist/chunks/autonomy-h9vver1r.js +0 -19
- package/dist/chunks/autonomyPanel-DVyrTxfP.js +0 -1
- package/dist/chunks/backgroundHousekeeping-DwA5WO9N.js +0 -1
- package/dist/chunks/backgroundHousekeeping-Ij_q7KN8.js +0 -17
- package/dist/chunks/banner-32EBTKI7.js +0 -2
- package/dist/chunks/bg-DK0E4ZtW.js +0 -9
- package/dist/chunks/bg-Dbh5z3Y8.js +0 -1
- package/dist/chunks/branch-B9AQFFTX.js +0 -3
- package/dist/chunks/bridge-BkL7g0ua.js +0 -2
- package/dist/chunks/bridgeConfig-BPP3lJRh.js +0 -1
- package/dist/chunks/bridgeConfig-BZQBBfap.js +0 -1
- package/dist/chunks/bridgeEnabled-Bkmqv-2V.js +0 -1
- package/dist/chunks/bridgeEnabled-BwBjPmEE.js +0 -1
- package/dist/chunks/bridgeMain-CbGj0plH.js +0 -68
- package/dist/chunks/bridgeMain-DpQRGiMo.js +0 -1
- package/dist/chunks/bridgeMessaging-C-ZFPTiZ.js +0 -1
- package/dist/chunks/bridgePointer-B2FPGDWR.js +0 -1
- package/dist/chunks/browser-fLRXxIsQ.js +0 -1
- package/dist/chunks/btw-BSme4Kzi.js +0 -1
- package/dist/chunks/buddy-DX94yYTy.js +0 -3
- package/dist/chunks/bypassPermissionsKillswitch-Crl2aipx.js +0 -1
- package/dist/chunks/caches-DeXmHls9.js +0 -3
- package/dist/chunks/caches-U1iFQIc7.js +0 -1
- package/dist/chunks/ccrClient-BYD1ONzC.js +0 -1
- package/dist/chunks/changeDetector-PaQPe1HQ.js +0 -1
- package/dist/chunks/channelNotification-Aq0p9f-W.js +0 -1
- package/dist/chunks/channelNotification-B0QskFjB.js +0 -1
- package/dist/chunks/chrome-B8ByN3u6.js +0 -1
- package/dist/chunks/chromeNativeHost-DX8f9Y2L.js +0 -1
- package/dist/chunks/claudeDesktop-C1qQs6os.js +0 -1
- package/dist/chunks/cleanup-Pv6U3HiI.js +0 -1
- package/dist/chunks/clear-CeJ5tgg8.js +0 -1
- package/dist/chunks/cliLaunch-BQa48gsr.js +0 -1
- package/dist/chunks/client-B7AdqRap.js +0 -1
- package/dist/chunks/color-OlMWmMnJ.js +0 -1
- package/dist/chunks/commands-BwfOl3fk.js +0 -1
- package/dist/chunks/commitAttribution-C479aqmn.js +0 -2
- package/dist/chunks/commitAttribution-CZ1OOh8F.js +0 -1
- package/dist/chunks/common-B379wT22.js +0 -1
- package/dist/chunks/common-B_BC3eMY.js +0 -1
- package/dist/chunks/common-CMCv4N_v.js +0 -1
- package/dist/chunks/compact-Dq-J7j1C.js +0 -3
- package/dist/chunks/companion-CtJjyD3N.js +0 -1
- package/dist/chunks/completionCache-DHfUBBMH.js +0 -1
- package/dist/chunks/completionCache-DORrtxkS.js +0 -4
- package/dist/chunks/computerUseLock-BjoDJH2h.js +0 -1
- package/dist/chunks/config-DcnYYwCy.js +0 -1
- package/dist/chunks/config-_KcvL7RX.js +0 -1
- package/dist/chunks/context-CShSBp-i.js +0 -1
- package/dist/chunks/context-noninteractive-BApFNncX.js +0 -54
- package/dist/chunks/context-noninteractive-uMvPKhng.js +0 -1
- package/dist/chunks/conversation-BlUHkj1_.js +0 -1
- package/dist/chunks/conversation-CCzL-eYb.js +0 -1
- package/dist/chunks/copy-DIMR3Q3S.js +0 -7
- package/dist/chunks/createSSHSession-DvSnUdsD.js +0 -6
- package/dist/chunks/createSession-D8tcktmP.js +0 -1
- package/dist/chunks/createSession-DaT4x1E6.js +0 -1
- package/dist/chunks/cronJitterConfig-C2a-Ybqm.js +0 -6
- package/dist/chunks/crossProjectResume-B3Chhiwf.js +0 -40
- package/dist/chunks/daemon-CCtZ9wY3.js +0 -2
- package/dist/chunks/datadog-BYNSi8R3.js +0 -1
- package/dist/chunks/datadog-DCukMGn4.js +0 -1
- package/dist/chunks/debug-DM5ezCBS.js +0 -1
- package/dist/chunks/debug-UI3T040K.js +0 -5
- package/dist/chunks/debugUtils-BBMFODKH.js +0 -1
- package/dist/chunks/desktop-BXj3JEMV.js +0 -1
- package/dist/chunks/detached-D300jlhj.js +0 -5
- package/dist/chunks/detectRepository-CBk3S2zv.js +0 -1
- package/dist/chunks/detectRepository-DCTvg4p0.js +0 -1
- package/dist/chunks/detection-CQsNad64.js +0 -1
- package/dist/chunks/detection-DJ-vTbBf.js +0 -1
- package/dist/chunks/diff-D3Xuv_4J.js +0 -1
- package/dist/chunks/directoryCompletion-D7EGwonO.js +0 -1
- package/dist/chunks/doctor-B5-jh6lS.js +0 -1
- package/dist/chunks/earlyInput-RoVleNEN.js +0 -1
- package/dist/chunks/effort-CpHnXRxJ.js +0 -9
- package/dist/chunks/entry-YXnIL7B7.js +0 -14
- package/dist/chunks/env-chR0gV31.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CcgSiwvA.js +0 -1
- package/dist/chunks/envLessBridgeConfig-MaElAFPV.js +0 -1
- package/dist/chunks/escHotkey-Cyz0yyh1.js +0 -259
- package/dist/chunks/execFileNoThrow-CuQN1sz8.js +0 -1
- package/dist/chunks/execSyncWrapper-C2XQnFVo.js +0 -1
- package/dist/chunks/executor-4EeD8GNm.js +0 -1561
- package/dist/chunks/executor-BHEuNh5F.js +0 -1
- package/dist/chunks/exit-DKG0r57m.js +0 -1
- package/dist/chunks/export-BNbcpW3p.js +0 -2
- package/dist/chunks/exportRenderer-pYMIcnO4.js +0 -1
- package/dist/chunks/extra-usage-DTXphHAD.js +0 -1
- package/dist/chunks/extra-usage-H-U38bGx.js +0 -1
- package/dist/chunks/extra-usage-core-N4VLj0ye.js +0 -1
- package/dist/chunks/extra-usage-noninteractive-BGUiGr3a.js +0 -1
- package/dist/chunks/extraUsage-X6CmSsdg.js +0 -1
- package/dist/chunks/extractMemories-C8R4DJVc.js +0 -1
- package/dist/chunks/fast-BJwQnvAP.js +0 -1
- package/dist/chunks/fast-DMkPYQmQ.js +0 -1
- package/dist/chunks/feedback-DLcYu4id.js +0 -1
- package/dist/chunks/firstPartyEventLogger-C00GfHTl.js +0 -1
- package/dist/chunks/flushGate-0DZFLUEb.js +0 -1
- package/dist/chunks/gates-DP4JyL5e.js +0 -1
- package/dist/chunks/gates-DeLWne9R.js +0 -1
- package/dist/chunks/gemini-CnKaXUJJ.js +0 -1
- package/dist/chunks/generateRecap-BUS2DEdj.js +0 -1
- package/dist/chunks/generateSessionName-CnPPgvyy.js +0 -1
- package/dist/chunks/genericProcessUtils-BGvcwuPt.js +0 -23
- package/dist/chunks/git-CN3qtTb_.js +0 -6
- package/dist/chunks/git-D23Mzu_K.js +0 -1
- package/dist/chunks/githubRepoPathMapping-CnXpQRPY.js +0 -1
- package/dist/chunks/grok-C2BUbWJR.js +0 -1
- package/dist/chunks/growthbook-CPTqwUyC.js +0 -1
- package/dist/chunks/heapdump-pamjtM2a.js +0 -5
- package/dist/chunks/help-z7XnNKDT.js +0 -1
- package/dist/chunks/hooks-BEAaBqmd.js +0 -1
- package/dist/chunks/hooks-iTfSDH96.js +0 -79
- package/dist/chunks/hostAdapter-DWD430of.js +0 -1
- package/dist/chunks/hostGuard-zim_4F9V.js +0 -1
- package/dist/chunks/ide-BK8Td_CD.js +0 -2
- package/dist/chunks/inboundAttachments-DQ4Czsr5.js +0 -1
- package/dist/chunks/inboundAttachments-Dq3IYudc.js +0 -1
- package/dist/chunks/initReplBridge-BeGirV3Q.js +0 -1
- package/dist/chunks/insights-DfD6PMkd.js +0 -822
- package/dist/chunks/install-CNq--Fit.js +0 -1
- package/dist/chunks/install-github-app-Dhq_T_EJ.js +0 -147
- package/dist/chunks/install-slack-app-mz5O3xo_.js +0 -1
- package/dist/chunks/instrumentation-CM0poWjx.js +0 -12
- package/dist/chunks/job-CKI1I_Va.js +0 -2
- package/dist/chunks/jwtUtils-CpXwh_du.js +0 -1
- package/dist/chunks/keybindings-5qahtcNc.js +0 -2
- package/dist/chunks/lang-BMNwfSRv.js +0 -1
- package/dist/chunks/language-DXpi4083.js +0 -1
- package/dist/chunks/language-GlWQb4l9.js +0 -1
- package/dist/chunks/launchAgentsPlatform-BU4bAPan.js +0 -1
- package/dist/chunks/launchAutofixPr-B80p6iq-.js +0 -18
- package/dist/chunks/launchLocalMemory-CDAa9B30.js +0 -3
- package/dist/chunks/launchLocalVault-B19lF8tP.js +0 -3
- package/dist/chunks/launchMemoryStores-C6wJI-8V.js +0 -1
- package/dist/chunks/launchOnboarding-BIlwEdkk.js +0 -8
- package/dist/chunks/launchSchedule-DjMh3--x.js +0 -1
- package/dist/chunks/launchSkillStore-Bs5thijU.js +0 -1
- package/dist/chunks/launchTeleport-CDlWx4xC.js +0 -3
- package/dist/chunks/launchVault-C40NAyOp.js +0 -1
- package/dist/chunks/loadAgentsDir-BYqiLHDS.js +0 -1
- package/dist/chunks/loadAgentsDir-C9Ee_fs1.js +0 -4672
- package/dist/chunks/loadPluginHooks-DaETszNq.js +0 -1
- package/dist/chunks/localSearch-B3zijtEM.js +0 -1
- package/dist/chunks/localSearch-BTGnGPVi.js +0 -1
- package/dist/chunks/log-CzsijfHZ.js +0 -1
- package/dist/chunks/login-B3IQj5YQ.js +0 -1
- package/dist/chunks/login-CUM0odSh.js +0 -1
- package/dist/chunks/logoV2Utils-CW73xjcW.js +0 -1
- package/dist/chunks/logout-B3hPrJSX.js +0 -1
- package/dist/chunks/magicDocs-BysWdjbO.js +0 -57
- package/dist/chunks/main-CnAyCMYQ.js +0 -1108
- package/dist/chunks/main-D9fUXJiD.js +0 -31
- package/dist/chunks/mappers-D1SAyuKF.js +0 -1
- package/dist/chunks/mcp-BIiXcANN.js +0 -1
- package/dist/chunks/mcp-BLcZi9zs.js +0 -2
- package/dist/chunks/mcp-nOKz2_By.js +0 -6
- package/dist/chunks/mcpServer-CJOTyq3O.js +0 -1
- package/dist/chunks/mcpServer-DaiouIKs.js +0 -1
- package/dist/chunks/memoize-DxwLawI2.js +0 -1
- package/dist/chunks/memory-DtFuXZHl.js +0 -1
- package/dist/chunks/mode-BPNUYCpk.js +0 -2
- package/dist/chunks/model-Cky6xlFt.js +0 -1
- package/dist/chunks/model-DC5bOhtE.js +0 -1
- package/dist/chunks/onChangeAppState-pafR88Yw.js +0 -1
- package/dist/chunks/openai-BOxlfR-k.js +0 -10
- package/dist/chunks/overageCreditGrant-BmmOYjTh.js +0 -1
- package/dist/chunks/panel-s9fbCKfl.js +0 -1
- package/dist/chunks/parser-CmngCwjB.js +0 -1
- package/dist/chunks/parser-SWIZo39J.js +0 -1
- package/dist/chunks/passes-CqiFdifM.js +0 -1
- package/dist/chunks/path-B3lx7yHn.js +0 -1
- package/dist/chunks/paths-C2JRlUsH.js +0 -39
- package/dist/chunks/permissions-BHJUxNga.js +0 -3
- package/dist/chunks/pipeTransport-BTYiqf9e.js +0 -1
- package/dist/chunks/plan-CF_ClJlj.js +0 -1
- package/dist/chunks/platform-CuyedWpe.js +0 -2
- package/dist/chunks/plugin-Bz3RKbru.js +0 -1
- package/dist/chunks/pluginAutoupdate-Ck0wWoNE.js +0 -1
- package/dist/chunks/pluginBlocklist-7dlesHcW.js +0 -1
- package/dist/chunks/pluginCliCommands-D502zE25.js +0 -1
- package/dist/chunks/pluginFlagging-DfHARfd-.js +0 -1
- package/dist/chunks/pluginOperations-BBRf8tuH.js +0 -2
- package/dist/chunks/pluginStartupCheck-BKEhWQR2.js +0 -1
- package/dist/chunks/pluginStartupCheck-ZcaocOSL.js +0 -1
- package/dist/chunks/plugins-JnZ3lNqG.js +0 -4
- package/dist/chunks/policyLimits-CtOjYdHx.js +0 -1
- package/dist/chunks/pollConfig-Duecunu0.js +0 -1
- package/dist/chunks/poor-CUwZAV9z.js +0 -1
- package/dist/chunks/poorMode-DOoZ0U-8.js +0 -1
- package/dist/chunks/poorMode-DRcH1fuh.js +0 -1
- package/dist/chunks/print-D9IhN66j.js +0 -39
- package/dist/chunks/privacy-settings-DmbuvR-R.js +0 -1
- package/dist/chunks/processBashCommand-Cg8we9vS.js +0 -1
- package/dist/chunks/processSlashCommand-BBQQEGZd.js +0 -6
- package/dist/chunks/projectContext-D5FgyE-d.js +0 -1
- package/dist/chunks/prompt-7Vt8FUX_.js +0 -1
- package/dist/chunks/prompt-Cj0hg3CU.js +0 -1
- package/dist/chunks/prompt-thBQB2X5.js +0 -222
- package/dist/chunks/promptEditor-C8B2TEXp.js +0 -4
- package/dist/chunks/protocolHandler-BUKWgksO.js +0 -13
- package/dist/chunks/proxy-CfZp-wce.js +0 -99
- package/dist/chunks/rate-limit-options-PruvKAQt.js +0 -1
- package/dist/chunks/rcDebugLog-CIS3PU-H.js +0 -11
- package/dist/chunks/referral-CXmDvb7V.js +0 -1
- package/dist/chunks/refresh-C_FDHRT7.js +0 -1
- package/dist/chunks/registerProtocol-WxQUBybC.js +0 -36
- package/dist/chunks/registry-CeBTik9J.js +0 -1
- package/dist/chunks/release-notes-aZ6QUVnT.js +0 -4
- package/dist/chunks/releaseNotes-2GPd_O_r.js +0 -2
- package/dist/chunks/reload-plugins-BDh4ZhHi.js +0 -1
- package/dist/chunks/remote-env-BIOFHNQC.js +0 -1
- package/dist/chunks/remoteBridgeCore-DyA_2GrL.js +0 -1
- package/dist/chunks/remoteControlServer-BjW9GsPd.js +0 -3
- package/dist/chunks/rename-CKlAeppY.js +0 -1
- package/dist/chunks/renderOptions-rmj4Mkls.js +0 -1
- package/dist/chunks/resume-Dm71Aeni.js +0 -2
- package/dist/chunks/runtimeObserver-BYOo5dT0.js +0 -1
- package/dist/chunks/runtimeObserver-CA7pdBvT.js +0 -10
- package/dist/chunks/sandbox-adapter-C7TBAehE.js +0 -1
- package/dist/chunks/sandbox-toggle-fHc9E9xW.js +0 -1
- package/dist/chunks/searchExtraTools-CpFsg_tS.js +0 -1
- package/dist/chunks/sentry-B1g5Tgp2.js +0 -13
- package/dist/chunks/session-C46oy7nX.js +0 -2
- package/dist/chunks/sessionDiscovery-CtrJ2Bfr.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-dwF5SFoS.js +0 -1
- package/dist/chunks/sessionMemory-BqCsLnFl.js +0 -1
- package/dist/chunks/sessionMemory-D4-Ymn0Q.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BKdYMir6.js +0 -1
- package/dist/chunks/sessionObserver-Bfu8q0_K.js +0 -1
- package/dist/chunks/sessionObserver-DoBuLaCJ.js +0 -20
- package/dist/chunks/sessionStorage-CUUU_J4D.js +0 -1
- package/dist/chunks/sessionTitle-BOM0LQlq.js +0 -14
- package/dist/chunks/sessionTracing-BEKULg2L.js +0 -11
- package/dist/chunks/settingsSync-BIsGiZhM.js +0 -1
- package/dist/chunks/setup-C3FOTg1s.js +0 -1
- package/dist/chunks/setup-ChF37I92.js +0 -9
- package/dist/chunks/setup-DvFPFV-3.js +0 -2
- package/dist/chunks/shadowedRuleDetection-spwhhTXF.js +0 -1
- package/dist/chunks/shellQuote-DgjT8KBA.js +0 -1
- package/dist/chunks/sideQuestion-iy7kJEkr.js +0 -20
- package/dist/chunks/sink-D6dxOYIw.js +0 -1
- package/dist/chunks/sink-FeQonv8-.js +0 -1
- package/dist/chunks/sinks-DKMqKJ66.js +0 -1
- package/dist/chunks/sinks-zNh_PVeS.js +0 -2
- package/dist/chunks/skill-learning-ChAFwJf0.js +0 -5
- package/dist/chunks/skillChangeDetector-8LVraP0Y.js +0 -1
- package/dist/chunks/skillGapStore-CUws9CQ6.js +0 -5
- package/dist/chunks/skillGapStore-CdPgIARS.js +0 -1
- package/dist/chunks/skillGenerator-CLtTRIjy.js +0 -8
- package/dist/chunks/skillLearning-CBosoKl-.js +0 -1
- package/dist/chunks/skillLearning-f7-aknmS.js +0 -1
- package/dist/chunks/skillPanel-Cd0AFEZf.js +0 -28
- package/dist/chunks/skillSearchPanel-VWiAbmdr.js +0 -21
- package/dist/chunks/skills-oQtI4eDn.js +0 -1
- package/dist/chunks/sprites-Cp4_DJUI.js +0 -1
- package/dist/chunks/startupProfiler-DnXZaX4A.js +0 -3
- package/dist/chunks/startupProfiler-SOE--nM9.js +0 -1
- package/dist/chunks/stats-B1X-nxO8.js +0 -1
- package/dist/chunks/status-BtCnWZEv.js +0 -1
- package/dist/chunks/statusNoticeHelpers-B6GW2gMe.js +0 -1
- package/dist/chunks/stickers-BMh2qjgF.js +0 -1
- package/dist/chunks/tag-B6WpuUE_.js +0 -11
- package/dist/chunks/tasks-DIOPZDoF.js +0 -1
- package/dist/chunks/teamHelpers-9p7wPcXj.js +0 -1
- package/dist/chunks/teamHelpers-PLGwYL4x.js +0 -1
- package/dist/chunks/teammateModeSnapshot-DO-3AkNP.js +0 -1
- package/dist/chunks/teammateModeSnapshot-DU8JCRRs.js +0 -1
- package/dist/chunks/teleport-DPUoWpD4.js +0 -1
- package/dist/chunks/templateJobs-DOSQvjx0.js +0 -12
- package/dist/chunks/terminalSetup-DdHkyElj.js +0 -33
- package/dist/chunks/terminalSetup-tSFJeCVl.js +0 -1
- package/dist/chunks/theme-Hf1fhR3q.js +0 -1
- package/dist/chunks/thinkback-5QYAbr0P.js +0 -1
- package/dist/chunks/thinkback-B5IraP81.js +0 -1
- package/dist/chunks/thinkback-play-Bqv85sjY.js +0 -1
- package/dist/chunks/tmux-CvbhsfwG.js +0 -1
- package/dist/chunks/toolEventObserver-B-mqmRv0.js +0 -1
- package/dist/chunks/toolEventObserver-_Fk1dSYg.js +0 -1
- package/dist/chunks/toolPool-C2KLBvek.js +0 -1
- package/dist/chunks/toolPool-CiEaFfxq.js +0 -1
- package/dist/chunks/trustedDevice-BowIKqqC.js +0 -1
- package/dist/chunks/trustedDevice-f8HslQu2.js +0 -1
- package/dist/chunks/tui-geoc3zxu.js +0 -6
- package/dist/chunks/types-Csi32ZXh.js +0 -17
- package/dist/chunks/udsClient-BdPOrL1H.js +0 -1
- package/dist/chunks/ultrareviewCommand-DbmRN6Lg.js +0 -3
- package/dist/chunks/undercover-Ch9wnIbk.js +0 -31
- package/dist/chunks/undercover-X6-EJ_7K.js +0 -1
- package/dist/chunks/up-D-U4wUCe.js +0 -12
- package/dist/chunks/updateCCB-DFHrOTEX.js +0 -11
- package/dist/chunks/upgrade-B6Ih-Ubj.js +0 -1
- package/dist/chunks/upgrade-CC4cnsnt.js +0 -1
- package/dist/chunks/upload-DSTB33ZR.js +0 -1
- package/dist/chunks/upstreamproxy-Ci5T_JCo.js +0 -11
- package/dist/chunks/usage-CNqpSfd2.js +0 -1
- package/dist/chunks/usage-DiZsjcMM.js +0 -1
- package/dist/chunks/useMainLoopModel-Bo6iEtB3.js +0 -1
- package/dist/chunks/useManagePlugins-Cvj0XfLp.js +0 -1
- package/dist/chunks/useMergedTools-BEpwy0Ec.js +0 -1
- package/dist/chunks/useSearchInput-YiO4crrI.js +0 -1
- package/dist/chunks/useSettingsErrors-BE-PITl4.js +0 -1
- package/dist/chunks/useVoice-D1sKPiqb.js +0 -1
- package/dist/chunks/util-C8_5375U.js +0 -1
- package/dist/chunks/utils-Dmh9vBcg.js +0 -1
- package/dist/chunks/validatePlugin-BQA60S_J.js +0 -1
- package/dist/chunks/vim-oNiLgw0C.js +0 -1
- package/dist/chunks/voice-BcA5h8ya.js +0 -8
- package/dist/chunks/voice-CGsMzVaA.js +0 -2
- package/dist/chunks/voiceModeEnabled-DprM_JSH.js +0 -1
- package/dist/chunks/voiceModeEnabled-Dpx-sP8V.js +0 -1
- package/dist/chunks/voiceStreamSTT-CASv4SGl.js +0 -1
- package/dist/chunks/voiceStreamSTT-CaI5Uz-7.js +0 -1
- package/dist/chunks/which-DqSAIvp2.js +0 -1
- package/dist/chunks/windowsPaths-C9CigqoF.js +0 -1
- package/dist/chunks/windowsPaths-swxCp7bX.js +0 -2
- package/dist/chunks/workSecret-mS2OrpxF.js +0 -1
- package/dist/chunks/workerRegistry-CCYrYthd.js +0 -1
- package/dist/chunks/worktree-C9WNXNFR.js +0 -1
- package/dist/chunks/xml-BW5T-oW-.js +0 -1
- /package/dist/chunks/{InProcessTransport-gJLr5CIx.js → InProcessTransport-B0mmAoxw.js} +0 -0
- /package/dist/chunks/{attributionHooks-Br5LZ6bk.js → attributionHooks-DZJjA8p9.js} +0 -0
- /package/dist/chunks/{attributionTrailer-BMTuK4Ax.js → attributionTrailer-CZY9XTcr.js} +0 -0
- /package/dist/chunks/{autoModeDenials-D8eQ1CoM.js → autoModeDenials-CGAtAGGf.js} +0 -0
- /package/dist/chunks/{bedrockClient-Ci523Btx.js → bedrockClient-DZgaJTHp.js} +0 -0
- /package/dist/chunks/{ccshareResume-CqNm2k-J.js → ccshareResume-CZggHNOf.js} +0 -0
- /package/dist/chunks/{connectHeadless-DFCrE6O4.js → connectHeadless-KNT0Sg7Z.js} +0 -0
- /package/dist/chunks/{dangerousBackend-Du0K4q5Z.js → dangerousBackend-ByOAEFld.js} +0 -0
- /package/dist/chunks/{earlyInput-feVuZGzR.js → earlyInput-BFcdUMaX.js} +0 -0
- /package/dist/chunks/{eventLoopStallDetector-XfubcyMN.js → eventLoopStallDetector-l83_98VR.js} +0 -0
- /package/dist/chunks/{fpsMetrics-CEQt6Tk1.js → fpsMetrics-DOI_SIeY.js} +0 -0
- /package/dist/chunks/{fuse-TM-TeOo_.js → fuse-Bp7rmZ5x.js} +0 -0
- /package/dist/chunks/{instinctParser-CJPM8VjX.js → instinctParser-Bxhe2LOF.js} +0 -0
- /package/dist/chunks/{lockfile-Y1hwdHrQ.js → lockfile-CeCEBLtN.js} +0 -0
- /package/dist/chunks/{mobile-umu5P0cM.js → mobile-Cydobb55.js} +0 -0
- /package/dist/chunks/{observationStore-gFvWXJmc.js → observationStore-BaPq7CKI.js} +0 -0
- /package/dist/chunks/{openaiShared-Dy78YERG.js → openaiShared-Crt0cZLO.js} +0 -0
- /package/dist/chunks/{output-style-BmEQscMd.js → output-style-BkOnFmfe.js} +0 -0
- /package/dist/chunks/{parseConnectUrl-C6cvMkkH.js → parseConnectUrl-BFNiff4c.js} +0 -0
- /package/dist/chunks/{poller-Dbo07OEA.js → poller-DADqVTWi.js} +0 -0
- /package/dist/chunks/{postCommitAttribution-DhFkZMxJ.js → postCommitAttribution-CA9Z2sqn.js} +0 -0
- /package/dist/chunks/{projectContext-iWPqcl0Z.js → projectContext-CwJlxP2Y.js} +0 -0
- /package/dist/chunks/{rewind-DAn-nNs-.js → rewind-DTk4TFYB.js} +0 -0
- /package/dist/chunks/{sanitization-JYRkZFrK.js → sanitization-DD414_3t.js} +0 -0
- /package/dist/chunks/{sdkHeapDumpMonitor-DKtfJW5o.js → sdkHeapDumpMonitor-fNRF2fbK.js} +0 -0
- /package/dist/chunks/{server-CswFAYwN.js → server-DTd90dmm.js} +0 -0
- /package/dist/chunks/{serverBanner-CImTYGhY.js → serverBanner-B7UaaCCl.js} +0 -0
- /package/dist/chunks/{serverLog-Bwt7XEmk.js → serverLog-DRvGpDtt.js} +0 -0
- /package/dist/chunks/{sessionDataUploader-CKRXCBxI.js → sessionDataUploader-BDsz_1Uy.js} +0 -0
- /package/dist/chunks/{sessionManager-Ca2O821f.js → sessionManager-Bh-Z-YXy.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./context-noninteractive-CnaDbgvf.js";t();export{n as call,e as collectContextData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./conversation-DUxXVrGj.js";e();export{t as clearConversation};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t}from"./chunk-DR8-3Aex.js";import{Ct as n,Jn as r,Xn as i,Z as a,cn as o,gn as s,ot as c,qn as l,yn as u}from"./state-sIHsFpDu.js";import{n as d,r as f}from"./analytics-DqMQntaB.js";import{o as p,s as m}from"./log-DS97_rIr.js";import{$t as h,Ab as g,Ai as _,BE as v,Cn as y,Di as b,Fn as x,Fr as S,In as C,JE as w,KE as T,Mu as E,Nn as D,Nu as O,Ot as k,Tt as A,_d as j,_r as M,by as N,ey as P,gi as F,jb as ee,lv as I,mh as L,mn as R,ph as z,py as B,sr as V,ty as H,uv as U,vd as W,zE as G}from"./loadAgentsDir-Br5fGLLI.js";import{C as K,y as q}from"./rcDebugLog-BoroyfjB.js";import{l as J,r as Y}from"./commitAttribution-HP_CWP0X.js";import{n as X,t as Z}from"./caches-CitduRKp.js";import{randomUUID as Q}from"crypto";function $(){let e=j();if(!e)return;e.markTranscriptReset?.();let t={type:`status`,subtype:`status`,status:`conversation_cleared`,message:`conversation_cleared`,uuid:Q()};e.writeSdkMessages([t])}async function te({setMessages:t,readFileState:o,discoveredSkillNames:d,loadedNestedMemoryPaths:p,getAppState:g,setAppState:y,setConversationId:C}){let w=R();await h(`clear`,{getAppState:g,setAppState:y,signal:AbortSignal.timeout(w),timeoutMs:w});let E=a();E&&f(`tengu_cache_eviction_hint`,{scope:`conversation_clear`,last_request_id:E});let k=new Set,j=[],N=e=>`isBackgrounded`in e&&e.isBackgrounded===!1;if(g)for(let e of Object.values(g().tasks))N(e)||(O(e)?(k.add(e.agentId),j.push(e)):ee(e)&&k.add(e.identity.agentId));t(()=>[]),$();{let{setContextBlocked:t}=(q(),e(K));t(!1)}C&&C(Q()),Z(k),l(null),r(null),i(null),u(),L(c()),o.clear(),d?.clear(),p?.clear(),y&&y(e=>{let t={};for(let[n,r]of Object.entries(e.tasks)){if(!N(r)){t[n]=r;continue}try{r.status===`running`&&(U(r)&&(r.shellCommand?.kill(),r.shellCommand?.cleanup(),r.cleanupTimeoutId&&clearTimeout(r.cleanupTimeoutId)),`abortController`in r&&r.abortController?.abort(),`unregisterCleanup`in r&&r.unregisterCleanup?.())}catch(e){m(e)}D(n)}return{...e,tasks:t,attribution:Y(),standaloneAgentContext:void 0,fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:e.mcp.pluginReconnectKey}}}),B(),V(),s({setCurrentAsParent:!0}),process.env.USER_TYPE===`ant`&&process.env.CLAUDE_CODE_SESSION_ID&&(process.env.CLAUDE_CODE_SESSION_ID=n()),await F();for(let e of j)e.status===`running`&&x(e.id,M(T(e.agentId)));{let{saveMode:t}=(S(),e(_)),{isCoordinatorMode:n}=(v(),e(G));t(n()?`coordinator`:`normal`)}let P=A();P&&b(P);let I=await H(`clear`);I.length>0&&t(()=>I)}var ne=t((()=>{W(),o(),d(),g(),E(),I(),w(),J(),y(),p(),N(),z(),P(),S(),C(),k(),X()}));export{ne as n,te as t};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Cn as n,Rn as r,b as i,g as a,h as o,p as s,t as c,tn as l,x as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Ac as f,Oo as p,Pc as m,Sc as h,jo as g}from"./paths-DfGsIjPm.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{Uo as y,aS as b,ko as x,nA as S,ns as C,oS as w,rA as T}from"./loadAgentsDir-Br5fGLLI.js";import{tmpdir as E}from"os";import{join as D}from"path";import{mkdir as O,writeFile as k}from"fs/promises";function A(e){let t=S.lexer(C(e)),n=[];for(let e of t)if(e.type===`code`){let t=e;n.push({code:t.text,lang:t.lang})}return n}function j(e){let t=[];for(let n=e.length-1;n>=0&&t.length<V;n--){let r=e[n];if(r?.type!==`assistant`||r.isApiErrorMessage)continue;let i=r.message.content;if(!Array.isArray(i))continue;let a=x(i,`
|
|
2
|
+
|
|
3
|
+
`);a&&t.push(a)}return t}function M(e){if(e){let t=e.replace(/[^a-zA-Z0-9]/g,``);if(t&&t!==`plaintext`)return`.${t}`}return`.txt`}async function N(e,t){let n=D(z,t);return await O(z,{recursive:!0}),await k(n,e,`utf-8`),n}async function P(e,t){let n=await l(e);n&&process.stdout.write(n);let r=p(e,`
|
|
4
|
+
`)+1,i=e.length;try{return`Copied to clipboard (${i} characters, ${r} lines)\nAlso written to ${await N(e,t)}`}catch{return`Copied to clipboard (${i} characters, ${r} lines)`}}function F(e,t){let r=e.split(`
|
|
5
|
+
`)[0]??``;if(n(r)<=t)return r;let i=``,a=0,o=t-1;for(let e of r){let t=n(e);if(a+t>o)break;i+=e,a+=t}return i+`…`}function I({fullText:e,codeBlocks:t,messageAge:n,onDone:r}){let c=(0,L.useRef)(`full`),l=[{label:`Full response`,value:`full`,description:`${e.length} chars, ${p(e,`
|
|
6
|
+
`)+1} lines`},...t.map((e,t)=>{let n=p(e.code,`
|
|
7
|
+
`)+1;return{label:F(e.code,60),value:t,description:[e.lang,n>1?`${n} lines`:void 0].filter(Boolean).join(`, `)||void 0}}),{label:`Always copy full response`,value:`always`,description:`Skip this picker in the future (revert via /config)`}];function d(n){if(n===`full`||n===`always`)return{text:e,filename:B};let r=t[n];return{text:r.code,filename:`copy${M(r.lang)}`,blockIndex:n}}async function f(e){let i=d(e);if(e===`always`){h().copyFullResponse||m(e=>({...e,copyFullResponse:!0})),v(`tengu_copy`,{block_count:t.length,always:!0,message_age:n}),r(`${await P(i.text,i.filename)}\nPreference saved. Use /config to change copyFullResponse`);return}v(`tengu_copy`,{selected_block:i.blockIndex,block_count:t.length,message_age:n}),r(await P(i.text,i.filename))}async function g(e){let i=d(e);v(`tengu_copy`,{selected_block:i.blockIndex,block_count:t.length,message_age:n,write_shortcut:!0});try{r(`Written to ${await N(i.text,i.filename)}`)}catch(e){r(`Failed to write file: ${e instanceof Error?e.message:e}`)}}function _(e){e.key===`w`&&(e.preventDefault(),g(c.current))}return(0,R.jsx)(s,{children:(0,R.jsxs)(u,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:_,children:[(0,R.jsx)(i,{dimColor:!0,children:`Select content to copy:`}),(0,R.jsx)(b,{options:l,hideIndexes:!1,onFocus:e=>{c.current=e},onChange:e=>{f(e)},onCancel:()=>{r(`Copy cancelled`,{display:`system`})}}),(0,R.jsx)(i,{dimColor:!0,children:(0,R.jsxs)(o,{children:[(0,R.jsx)(a,{shortcut:`enter`,action:`copy`}),(0,R.jsx)(a,{shortcut:`w`,action:`write to file`}),(0,R.jsx)(a,{shortcut:`esc`,action:`cancel`})]})})]})})}var L,R,z,B,V,H;e((()=>{T(),L=t(r(),1),w(),c(),_(),f(),y(),g(),R=d(),z=D(E(),`claude`),B=`response.md`,V=20,H=async(e,t,n)=>{let r=j(t.messages);if(r.length===0)return e(`No assistant message to copy`),null;let i=0,a=n?.trim();if(a){let t=Number(a);if(!Number.isInteger(t)||t<1)return e(`Usage: /copy [N] where N is 1 (latest), 2, 3, \u2026 Got: ${a}`),null;if(t>r.length)return e(`Only ${r.length} assistant ${r.length===1?`message`:`messages`} available to copy`),null;i=t-1}let o=r[i],s=A(o),c=h();return s.length===0||c.copyFullResponse?(v(`tengu_copy`,{always:c.copyFullResponse,block_count:s.length,message_age:i}),e(await P(o,B)),null):(0,R.jsx)(I,{fullText:o,codeBlocks:s,messageAge:i,onDone:e})}}))();export{H as call,j as collectRecentAssistantTexts,M as fileExtension};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{n as e,t}from"./defineProperty-80gRi2ZW.js";import{Jt as n,on as r}from"./paths-DfGsIjPm.js";import{D as i,E as a,O as o,l as s,p as c}from"./debug-otxXY3j-.js";import{l,u}from"./oauth-CdZEzMww.js";import{i as d,t as f}from"./cliLaunch-8aeIk2ts.js";import{resolve as p}from"path";import{existsSync as m,unlinkSync as h}from"fs";import{randomUUID as g}from"crypto";s(),a(),e();function _(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`}var v=2e3,y=15e3,b=3,x=class{constructor(e,n){t(this,`proc`,void 0),t(this,`options`,void 0),t(this,`connected`,!1),t(this,`disconnected`,!1),t(this,`readLoopAbort`,null),t(this,`reconnectAttempt`,0),t(this,`maxReconnectAttempts`,void 0),t(this,`userInitiatedDisconnect`,!1),t(this,`reconnecting`,!1),this.proc=e,this.options=n,this.maxReconnectAttempts=n.maxReconnectAttempts??b}connect(){this.connected||(this.readLoopAbort=new AbortController,this.startReadLoop(),this.monitorExit(),this.connected=!0,this.options.onConnected())}async startReadLoop(){let e=this.proc.stdout;if(!e){this.options.onError(Error(`SSH process stdout is not available`));return}let t=e.getReader(),n=new TextDecoder,r=``;try{for(;!this.disconnected;){let{done:e,value:i}=await t.read();if(e)break;r+=n.decode(i,{stream:!0});let a=r.split(`
|
|
2
|
+
`);r=a.pop()??``;for(let e of a){let t=e.trim();t&&this.processLine(t)}}}catch(e){this.disconnected||this.options.onError(e instanceof Error?e:Error(String(e)))}finally{t.releaseLock(),!this.disconnected&&!this.userInitiatedDisconnect&&this.handleProcessExit()}}monitorExit(){if(this.proc.exitCode!==null){this.userInitiatedDisconnect||this.handleProcessExit();return}this.proc.exited.then(()=>{!this.disconnected&&!this.userInitiatedDisconnect&&this.handleProcessExit()}).catch(()=>{!this.disconnected&&!this.userInitiatedDisconnect&&this.handleProcessExit()})}async handleProcessExit(){if(!(this.disconnected||this.reconnecting)){if(this.connected=!1,!this.options.reconnect){this.disconnected=!0,this.options.onDisconnected();return}if(this.reconnectAttempt>=this.maxReconnectAttempts){this.disconnected=!0,this.options.onDisconnected();return}this.reconnecting=!0;try{await this.attemptReconnect()}finally{this.reconnecting=!1}}}async attemptReconnect(){let e=this.options.reconnect;for(;this.reconnectAttempt<this.maxReconnectAttempts;){this.reconnectAttempt++,this.options.onReconnecting(this.reconnectAttempt,this.maxReconnectAttempts);let t=Math.min(v*2**(this.reconnectAttempt-1),y);if(await new Promise(e=>setTimeout(e,t)),this.userInitiatedDisconnect)return;try{this.proc=await e(),this.reconnectAttempt=0,this.connected=!0,this.startReadLoop(),this.monitorExit(),this.options.onConnected();return}catch(e){c(`[SSH] reconnect attempt ${this.reconnectAttempt} failed: ${e instanceof Error?e.message:String(e)}`)}}this.disconnected=!0,this.options.onDisconnected()}processLine(e){let t;try{t=i(e)}catch{return}if(!_(t))return;let n=t;if(n.type===`control_request`){let e=n;e.request.subtype===`can_use_tool`?this.options.onPermissionRequest(e.request,e.request_id):(c(`[SSH] Unsupported control request subtype: ${e.request.subtype}`),this.sendErrorResponse(e.request_id,`Unsupported control request subtype: ${e.request.subtype}`));return}n.type!==`control_response`&&n.type!==`keep_alive`&&n.type!==`control_cancel_request`&&n.type!==`streamlined_text`&&n.type!==`streamlined_tool_use_summary`&&!(n.type===`system`&&n.subtype===`post_turn_summary`)&&this.options.onMessage(n)}writeToStdin(e){try{let t=this.proc.stdin;if(!t||typeof t==`number`||this.disconnected)return!1;let n=new TextEncoder().encode(e+`
|
|
3
|
+
`);return t.write(n),t.flush?.(),!0}catch{return!1}}async sendMessage(e){let t=o({type:`user`,message:{role:`user`,content:e},parent_tool_use_id:null,session_id:``});return this.writeToStdin(t)}sendInterrupt(){let e=o({type:`control_request`,request_id:crypto.randomUUID(),request:{subtype:`interrupt`}});this.writeToStdin(e)}respondToPermissionRequest(e,t){let n=o({type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}});this.writeToStdin(n)}sendErrorResponse(e,t){let n=o({type:`control_response`,response:{subtype:`error`,request_id:e,error:t}});this.writeToStdin(n)}disconnect(){if(!this.disconnected){this.userInitiatedDisconnect=!0,this.disconnected=!0,this.connected=!1,this.readLoopAbort?.abort();try{let e=this.proc.stdin;e&&typeof e!=`number`&&e.end?.()}catch{}try{this.proc.kill()}catch{}}}isConnected(){return this.connected&&!this.disconnected}};r(),u(),s();var S=process.platform===`win32`;function C(){let e=process.env.ANTHROPIC_API_KEY;if(e)return{"x-api-key":e};let t=n();return t?.accessToken?{Authorization:`Bearer ${t.accessToken}`}:{}}function w(){return process.env.ANTHROPIC_BASE_URL||l().BASE_API_URL}async function T(e,t){if(t&&e.headers.get(`x-auth-nonce`)!==t)return new Response(`Forbidden`,{status:403});let n=w(),r=new URL(e.url),i=`${n}${r.pathname}${r.search}`,a=C();if(Object.keys(a).length===0)return new Response(JSON.stringify({error:`No API credentials available on local machine`}),{status:401,headers:{"content-type":`application/json`}});let o=new Headers(e.headers);for(let[e,t]of Object.entries(a))o.set(e,t);o.delete(`host`),o.delete(`x-auth-nonce`),c(`[SSHAuthProxy] ${e.method} ${r.pathname} -> ${i}`);try{let t=await fetch(i,{method:e.method,headers:o,body:e.body,duplex:`half`}),n=new Headers(t.headers);return n.delete(`content-encoding`),n.delete(`content-length`),new Response(t.body,{status:t.status,statusText:t.statusText,headers:n})}catch(e){let t=e instanceof Error?e.message:String(e);return c(`[SSHAuthProxy] upstream error: ${t}`),new Response(JSON.stringify({error:`Proxy upstream error: ${t}`}),{status:502,headers:{"content-type":`application/json`}})}}async function E(){let e=g();return S?O(e):D(e)}async function D(e){let t=`/tmp/claude-ssh-auth-${e}.sock`,n=Bun.serve({unix:t,fetch:e=>T(e,null)});return c(`[SSHAuthProxy] listening on unix:${t}`),{proxy:{stop(){n.stop(!0);try{h(t)}catch{}}},localAddress:t,authEnv:{ANTHROPIC_AUTH_SOCKET:t}}}async function O(e){let t=g(),n=Bun.serve({port:0,hostname:`127.0.0.1`,fetch:e=>T(e,t)}),r=n.port;return c(`[SSHAuthProxy] listening on TCP 127.0.0.1:${r} (nonce-protected)`),{proxy:{stop(){n.stop(!0)}},localAddress:`127.0.0.1:${r}`,authEnv:{ANTHROPIC_BASE_URL:`http://127.0.0.1:${r}`,ANTHROPIC_AUTH_NONCE:t}}}s();var k=15e3,A=class extends Error{constructor(e){super(e),this.name=`SSHProbeError`}};async function j(e,t){t?.(`Probing remote host…`);let n=Bun.spawn([`ssh`,`-o`,`BatchMode=yes`,`-o`,`ConnectTimeout=10`,e,`CLAUDE_BIN=$(test -x "$HOME/.local/bin/claude" && echo "$HOME/.local/bin/claude" || command -v claude 2>/dev/null); echo "$CLAUDE_BIN"; $CLAUDE_BIN --version 2>/dev/null; uname -sm; pwd`],{stdin:`ignore`,stdout:`pipe`,stderr:`pipe`}),r=await Promise.race([n.exited,new Promise((e,t)=>setTimeout(()=>t(new A(`SSH probe timed out after ${k/1e3}s`)),k))]),i=await new Response(n.stdout).text(),a=await new Response(n.stderr).text();if(r!==0)throw new A(`SSH probe failed: ${a.trim()||`exit code ${r}`}`);let o=i.split(`
|
|
4
|
+
`).map(e=>e.trim()).filter(Boolean);c(`[SSHProbe] raw lines: ${JSON.stringify(o)}`);let s=o.findIndex(e=>/^(Linux|Darwin)\s/.test(e));if(s===-1)throw new A(`Could not detect remote platform (uname output missing)`);let l=s>=2&&o[s-2]||null,u=s>=1&&o[s-1]||null,d=u&&/^\d+\.\d+/.test(u)?u:null,f=l!==null&&l.startsWith(`/`),p=o[s+1]||`/`,[m,h]=o[s].split(/\s+/),g=m===`Darwin`?`darwin`:`linux`,_=h===`aarch64`||h===`arm64`?`arm64`:`x64`;return t?.(`Detected ${g}/${_}`),{hasBinary:f&&d!==null,remoteVersion:d,remotePlatform:g,remoteArch:_,defaultCwd:p,binaryPath:f?l:null}}s();var M=6e4,N=`~/.local/bin`,P=`claude-code-cli.js`,F=`claude`;async function I(e,t,n=M){let r=Bun.spawn([`ssh`,`-o`,`ConnectTimeout=10`,e,t],{stdout:`pipe`,stderr:`pipe`}),i=setTimeout(()=>r.kill(),n);try{let[e,t]=await Promise.all([new Response(r.stdout).text(),new Response(r.stderr).text()]),n=await r.exited;return{stdout:e.trim(),stderr:t.trim(),exitCode:n}}finally{clearTimeout(i)}}function L(){let e=p(import.meta.dir,`../..`),t=p(e,`dist/cli.js`);if(m(t))return t;let n=p(e,`src/entrypoints/cli.tsx`);if(m(n))return n;throw Error("Cannot find local CLI binary to deploy. Run `bun run build` first.")}async function R(e){let{host:t,remotePlatform:n,remoteArch:r,localVersion:i,onProgress:a}=e;if(n!==`linux`&&n!==`darwin`)throw Error(`Remote platform "${n}" is not supported. Only linux and darwin are supported.`);c(`[SSHDeploy] deploying to ${t} (${n}/${r}, v${i})`);let o=L();c(`[SSHDeploy] local binary: ${o}`),a?.(`Creating remote directory...`);let s=await I(t,`mkdir -p ${N}`);if(s.exitCode!==0)throw Error(`Failed to create remote directory: ${s.stderr}`);a?.(`Uploading binary...`);let l=`${N}/${P}`,u=Bun.spawn([`scp`,`-o`,`ConnectTimeout=10`,o,`${t}:${l}`],{stdout:`pipe`,stderr:`pipe`}),d=setTimeout(()=>u.kill(),M),f=await new Response(u.stderr).text(),p=await u.exited;if(clearTimeout(d),p!==0)throw Error(`SCP upload failed (exit ${p}): ${f.trim()}`);a?.(`Installing wrapper script...`);let m=await I(t,[`cat > ${N}/${F} << 'WRAPPER'`,`#!/bin/sh`,`exec bun ${N}/${P} "$@"`,`WRAPPER`,`chmod +x ${N}/${F}`].join(`
|
|
5
|
+
`));if(m.exitCode!==0)throw Error(`Failed to install wrapper script: ${m.stderr}`);a?.(`Verifying installation...`);let h=await I(t,`${N}/${F} --version`);if(h.exitCode!==0)throw Error(`Binary deployed but verification failed (exit ${h.exitCode}): ${h.stderr}`);return c(`[SSHDeploy] deployed successfully, remote version: ${h.stdout}`),a?.(`Deployed v${h.stdout}`),`${N}/${F}`}d(),s(),a();var z=3e4,B=20,V=class extends Error{constructor(e){super(e),this.name=`SSHSessionError`}};async function H(e,t){let{host:n,localVersion:r,extraCliArgs:i,remoteBin:a}=e,o=t?.onProgress,s,l=`/`;if(a){o?.(`Using custom remote binary, skipping probe/deploy…`),s=a,c(`[SSH] custom remoteBin: ${a}`);try{let e=Bun.spawn([`ssh`,`-o`,`BatchMode=yes`,`-o`,`ConnectTimeout=5`,n,`pwd`],{stdin:`ignore`,stdout:`pipe`,stderr:`ignore`});await e.exited;let t=(await new Response(e.stdout).text()).trim();t.startsWith(`/`)&&(l=t)}catch{}}else{let e=await j(n,o);c(`[SSH] probe result: ${JSON.stringify(e)}`),l=e.defaultCwd,s=e.binaryPath??`~/.local/bin/claude`,(!e.hasBinary||e.remoteVersion!==r)&&(o?.(e.hasBinary?`Updating remote binary (${e.remoteVersion} → ${r})…`:`Deploying binary to remote…`),s=await R({host:n,remotePlatform:e.remotePlatform,remoteArch:e.remoteArch,localVersion:r,onProgress:o}))}let{proxy:u,localAddress:d,authEnv:f}=await E();c(`[SSH] auth proxy listening on ${d}`);let p=g().slice(0,8),m=process.platform===`win32`,h=[];for(let[e,t]of Object.entries(f))h.push(`${e}=${t}`);h.push(s,`--output-format`,`stream-json`,`--input-format`,`stream-json`,`--verbose`,`-p`),e.cwd&&h.push(`--cwd`,e.cwd),e.permissionMode&&h.push(`--permission-mode`,e.permissionMode),e.dangerouslySkipPermissions&&h.push(`--dangerously-skip-permissions`),h.push(...i);let _=[`ssh`];if(m){let e=d.split(`:`)[1],t=1e4+Math.floor(Math.random()*5e4);_.push(`-R`,`${t}:127.0.0.1:${e}`);let n=h.findIndex(e=>e.startsWith(`ANTHROPIC_BASE_URL=`));n!==-1&&(h[n]=`ANTHROPIC_BASE_URL=http://127.0.0.1:${t}`)}else{let e=`/tmp/claude-ssh-auth-${p}.sock`;_.push(`-R`,`${e}:${d}`),_.push(`-o`,`StreamLocalBindUnlink=yes`);let t=h.indexOf(`ANTHROPIC_AUTH_SOCKET=${f.ANTHROPIC_AUTH_SOCKET}`);t!==-1&&(h[t]=`ANTHROPIC_AUTH_SOCKET=${e}`)}_.push(n,h.join(` `)),o?.(`Starting remote session…`),c(`[SSH] spawning: ${_.join(` `)}`);let v;try{v=Bun.spawn(_,{stdin:`pipe`,stdout:`pipe`,stderr:`pipe`})}catch(e){throw u.stop(),new V(`Failed to spawn SSH process: ${e instanceof Error?e.message:String(e)}`)}let y=[];G(v,y);let b;if(a){let t=await Promise.race([v.exited.then(e=>e),new Promise(e=>setTimeout(()=>e(null),3e3))]);if(t!==null){u.stop();let e=y.join(``).trim();throw new V(`Remote process exited immediately (code ${t})${e?`: ${e}`:``}`)}b=e.cwd||l||`/`}else try{b=await W(v,e.cwd||l)}catch(e){throw u.stop(),v.kill(),e}c(`[SSH] remote session initialized, remoteCwd=${b}`);let S=v,C=async()=>{c(`[SSH] reconnect: re-spawning SSH process with --continue`);let e=[..._],t=e.length-1,n=e[t];n.includes(`--continue`)||(e[t]=n.replace(/ -p(?:\s|$)/,` -p --continue `));let r=Bun.spawn(e,{stdin:`pipe`,stdout:`pipe`,stderr:`pipe`}),i=[];return G(r,i),await W(r,b),S=r,y.length=0,y.push(...i),r};return{remoteCwd:b,get proc(){return S},proxy:u,createManager(e){return new x(S,{...e,reconnect:C})},getStderrTail(){return y.slice(-B).join(``)}}}async function U(e){let{proxy:t,authEnv:n}=await E(),r=[`--output-format`,`stream-json`,`--input-format`,`stream-json`,`-p`];e.cwd&&r.push(`--cwd`,e.cwd),e.permissionMode&&r.push(`--permission-mode`,e.permissionMode),e.dangerouslySkipPermissions&&r.push(`--dangerously-skip-permissions`);let i=f(r),a;try{a=Bun.spawn([i.execPath,...i.args],{stdin:`pipe`,stdout:`pipe`,stderr:`pipe`,env:{...i.env,...n}})}catch(e){throw t.stop(),new V(`Failed to spawn local CLI process: ${e instanceof Error?e.message:String(e)}`)}c(`[SSH] local session spawned, waiting for init message...`);let o=[];G(a,o);let s;try{s=await W(a,e.cwd)}catch(e){throw t.stop(),a.kill(),e}c(`[SSH] local session initialized, remoteCwd=${s}`);let l=a,u=async()=>{c(`[SSH] local reconnect: re-spawning CLI with --continue`);let e=[...r];e.includes(`--continue`)||e.push(`--continue`);let t=f(e),i=Bun.spawn([t.execPath,...t.args],{stdin:`pipe`,stdout:`pipe`,stderr:`pipe`,env:{...t.env,...n}}),a=[];return G(i,a),await W(i,s),l=i,o.length=0,o.push(...a),i};return{remoteCwd:s,get proc(){return l},proxy:t,createManager(e){return new x(l,{...e,reconnect:u})},getStderrTail(){return o.slice(-B).join(``)}}}async function W(e,t){let n=e.stdout;if(!n)throw new V(`Child process stdout is not readable`);let r=n.getReader(),a=new TextDecoder,o=``,s=Date.now()+z;try{for(;Date.now()<s;){let e=s-Date.now(),n=await Promise.race([r.read(),new Promise((t,n)=>setTimeout(()=>n(new V(`Remote CLI did not initialize within 30 seconds. Check SSH connectivity and remote binary.`)),e))]);if(n.done)throw new V(`Child process exited before sending init message`);o+=a.decode(n.value,{stream:!0});let c=o.split(`
|
|
6
|
+
`);o=c.pop()??``;for(let e of c){let n=e.trim();if(n)try{let e=i(n);if(e.type===`system`&&e.subtype===`init`)return r.releaseLock(),e.cwd||t||process.cwd()}catch{}}}}catch(e){throw r.releaseLock(),e instanceof V?e:new V(`Error reading init message: ${e instanceof Error?e.message:String(e)}`)}throw r.releaseLock(),new V(`Remote CLI did not initialize within 30 seconds. Check SSH connectivity and remote binary.`)}function G(e,t){let n=e.stderr;if(!n)return;let r=n.getReader(),i=new TextDecoder;(async()=>{try{for(;;){let{done:e,value:n}=await r.read();if(e)break;t.push(i.decode(n,{stream:!0})),t.length>B*2&&t.splice(0,t.length-B)}}catch{}})()}export{V as SSHSessionError,U as createLocalSSHSession,H as createSSHSession};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,r}from"./createSession-VlSLvi7J.js";t();export{n as createBridgeSession,r as getBridgeSession,e as updateBridgeSessionTitle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{U as t,l as n,p as r,z as i}from"./debug-otxXY3j-.js";import{c as a,d as o,i as s,o as c}from"./debugUtils-CiEnbhiz.js";async function l({environmentId:e,title:t,events:n,gitRepoUrl:a,branch:o,signal:c,baseUrl:l,getAccessToken:u,permissionMode:d}){let{getClaudeAIOAuthTokens:f}=await import(`./auth-h6VL9BbC.js`),{getOrganizationUUID:p}=await import(`./client-un1k_6md.js`),{getOauthConfig:m}=await import(`./oauth-CmensepG.js`),{getOAuthHeaders:h}=await import(`./api-xFvB7WoB.js`),{parseGitHubRepository:g}=await import(`./detectRepository-CbR0WgtE.js`),{getDefaultBranch:_}=await import(`./git-BZEgupMC.js`),{getMainLoopModel:v}=await import(`./model-CCjuMV6k.js`),{default:y}=await import(`./axios-DLnc2dVy.js`),{isSelfHostedBridge:b}=await import(`./bridgeConfig-BM7iHryd.js`),x=u?.()??f()?.accessToken;if(!x)return r(`[bridge] No access token for session creation`),null;let S=b()?`self-hosted`:await p();if(!S)return r(`[bridge] No org UUID for session creation`),null;let C=null,w=null;if(a){let{parseGitRemote:e}=await import(`./detectRepository-CbR0WgtE.js`),t=e(a);if(t){let{host:e,owner:n,name:r}=t,i=o||await _()||void 0;C={type:`git_repository`,url:`https://${e}/${n}/${r}`,revision:i},w={type:`git_repository`,git_info:{type:`github`,repo:`${n}/${r}`,branches:[`claude/${o||`task`}`]}}}else{let e=g(a);if(e){let[t,n]=e.split(`/`);if(t&&n){let e=o||await _()||void 0;C={type:`git_repository`,url:`https://github.com/${t}/${n}`,revision:e},w={type:`git_repository`,git_info:{type:`github`,repo:`${t}/${n}`,branches:[`claude/${o||`task`}`]}}}}}}let T={...t!==void 0&&{title:t},events:n,session_context:{sources:C?[C]:[],outcomes:w?[w]:[],model:v()},environment_id:e,source:`remote-control`,...d&&{permission_mode:d}},E={...h(x),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":S},D=`${l??m().BASE_API_URL}/v1/sessions`,O;try{O=await y.post(D,T,{headers:E,signal:c,validateStatus:e=>e<500})}catch(e){return r(`[bridge] Session creation request failed: ${i(e)}`),null}if(!(O.status===200||O.status===201)){let e=s(O.data);return r(`[bridge] Session creation failed with status ${O.status}${e?`: ${e}`:``}`),null}let k=O.data;return!k||typeof k!=`object`||!(`id`in k)||typeof k.id!=`string`?(r(`[bridge] No session ID in response`),null):k.id}async function u(e,t){let{getClaudeAIOAuthTokens:n}=await import(`./auth-h6VL9BbC.js`),{getOrganizationUUID:a}=await import(`./client-un1k_6md.js`),{getOauthConfig:o}=await import(`./oauth-CmensepG.js`),{getOAuthHeaders:c}=await import(`./api-xFvB7WoB.js`),{default:l}=await import(`./axios-DLnc2dVy.js`),{isSelfHostedBridge:u}=await import(`./bridgeConfig-BM7iHryd.js`),d=t?.getAccessToken?.()??n()?.accessToken;if(!d)return r(`[bridge] No access token for session fetch`),null;let f=u()?`self-hosted`:await a();if(!f)return r(`[bridge] No org UUID for session fetch`),null;let p={...c(d),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":f},m=`${t?.baseUrl??o().BASE_API_URL}/v1/sessions/${e}`;r(`[bridge] Fetching session ${e}`);let h;try{h=await l.get(m,{headers:p,timeout:1e4,validateStatus:e=>e<500})}catch(e){return r(`[bridge] Session fetch request failed: ${i(e)}`),null}if(h.status!==200){let e=s(h.data);return r(`[bridge] Session fetch failed with status ${h.status}${e?`: ${e}`:``}`),null}return h.data}async function d(e,t){let{getClaudeAIOAuthTokens:n}=await import(`./auth-h6VL9BbC.js`),{getOrganizationUUID:i}=await import(`./client-un1k_6md.js`),{getOauthConfig:a}=await import(`./oauth-CmensepG.js`),{getOAuthHeaders:o}=await import(`./api-xFvB7WoB.js`),{default:c}=await import(`./axios-DLnc2dVy.js`),{isSelfHostedBridge:l}=await import(`./bridgeConfig-BM7iHryd.js`),u=t?.getAccessToken?.()??n()?.accessToken;if(!u){r(`[bridge] No access token for session archive`);return}let d=l()?`self-hosted`:await i();if(!d){r(`[bridge] No org UUID for session archive`);return}let f={...o(u),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":d},p=`${t?.baseUrl??a().BASE_API_URL}/v1/sessions/${e}/archive`;r(`[bridge] Archiving session ${e}`);let m=await c.post(p,{},{headers:f,timeout:t?.timeoutMs??1e4,validateStatus:e=>e<500});if(m.status===200)r(`[bridge] Session ${e} archived successfully`);else{let e=s(m.data);r(`[bridge] Session archive failed with status ${m.status}${e?`: ${e}`:``}`)}}async function f(e,t,n){let{getClaudeAIOAuthTokens:a}=await import(`./auth-h6VL9BbC.js`),{getOrganizationUUID:c}=await import(`./client-un1k_6md.js`),{getOauthConfig:l}=await import(`./oauth-CmensepG.js`),{getOAuthHeaders:u}=await import(`./api-xFvB7WoB.js`),{default:d}=await import(`./axios-DLnc2dVy.js`),{isSelfHostedBridge:f}=await import(`./bridgeConfig-BM7iHryd.js`),p=n?.getAccessToken?.()??a()?.accessToken;if(!p){r(`[bridge] No access token for session title update`);return}let m=f()?`self-hosted`:await c();if(!m){r(`[bridge] No org UUID for session title update`);return}let h={...u(p),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":m},g=o(e),_=`${n?.baseUrl??l().BASE_API_URL}/v1/sessions/${g}`;r(`[bridge] Updating session title: ${g} → ${t}`);try{let e=await d.patch(_,{title:t},{headers:h,timeout:1e4,validateStatus:e=>e<500});if(e.status===200)r(`[bridge] Session title updated successfully`);else{let t=s(e.data);r(`[bridge] Session title update failed with status ${e.status}${t?`: ${t}`:``}`)}}catch(e){r(`[bridge] Session title update request failed: ${i(e)}`)}}var p=e((()=>{n(),t(),c(),a()}));export{f as a,p as i,l as n,u as r,d as t};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./defineProperty-80gRi2ZW.js";import{Cn as i,Ln as a,Mn as o,Tt as s,Xn as c,Yn as l,kt as u,ln as d,un as f,vt as p,wn as m,wt as h}from"./schemas-BGAvj1T4.js";import{n as g,t as _}from"./v4-f1i_CNUT.js";import{Ct as v,St as ee,cn as y,gr as te,gt as b,ot as x,ut as S,vn as ne}from"./state-sIHsFpDu.js";import{Fl as C,Il as re,S as w,Ss as ie,al as ae,el as oe,v as se,xs as ce}from"./paths-DfGsIjPm.js";import{B as le,D as ue,E as T,O as E,Q as de,U as D,Z as fe,j as pe,l as O,p as k,z as me}from"./debug-otxXY3j-.js";import{n as he,r as A}from"./analytics-DqMQntaB.js";import{n as ge,o as _e}from"./process-DMKLUQIO.js";import{F as ve,P as ye,n as be,v as xe}from"./git-DayFjsvj.js";import{o as Se,s as j}from"./log-DS97_rIr.js";import{s as Ce,u as we}from"./types-D5R26wwH.js";import{n as M,t as N}from"./lazySchema-2sOku3cX.js";import{a as Te,i as Ee}from"./genericProcessUtils-D-78JZxz.js";import{Ag as De,An as Oe,Bg as ke,Cn as Ae,Fg as je,G as Me,Gg as Ne,Hg as Pe,ID as P,Ig as Fe,Js as Ie,K as Le,Kg as F,Lg as I,Mg as L,ND as R,Ng as Re,Pg as ze,RD as Be,Rg as Ve,Ug as He,Us as Ue,Vg as We,Vs as Ge,Wg as Ke,dO as qe,dk as Je,fO as Ye,fk as Xe,hf as Ze,hu as Qe,jg as $e,kn as et,mf as tt,mu as nt,qg as rt,qs as it,qt as at,zg as ot}from"./loadAgentsDir-Br5fGLLI.js";import{B as z,H as st,I as B,J as ct,K as lt,R as ut,V as dt,W as ft,q as pt,z as mt}from"./prompt-B8M-HLIS.js";import{n as ht,r as gt}from"./cron-DiW7eIPP.js";import{d as _t,h as vt}from"./rcDebugLog-BoroyfjB.js";import{t as yt}from"./controlMessageCompat-BJhFiS7u.js";import{dirname as bt,isAbsolute as xt,join as St,resolve as Ct}from"path";import{randomUUID as V}from"crypto";import{mkdir as wt,readFile as Tt,unlink as Et,writeFile as H}from"fs/promises";_(),N(),rt();var Dt=M(()=>c()),Ot=M(()=>m({matcher:a().optional(),hookCallbackIds:s(a()),timeout:i().optional()}).describe(`Configuration for matching and routing hook callbacks.`)),kt=M(()=>m({subtype:f(`initialize`),hooks:o(ze(),s(Ot())).optional(),sdkMcpServers:s(a()).optional(),jsonSchema:o(a(),c()).optional(),systemPrompt:a().optional(),appendSystemPrompt:a().optional(),agents:o(a(),$e()).optional(),promptSuggestions:u().optional(),agentProgressSummaries:u().optional()}).describe(`Initializes the SDK session with hooks, MCP servers, and agent configuration.`));M(()=>m({commands:s(F()),agents:s(L()),output_style:a(),available_output_styles:s(a()),models:s(Ve()),account:De(),pid:i().optional().describe(`@internal CLI process PID for tmux socket isolation`),fast_mode_state:Re().optional()}).describe(`Response from session initialization with available commands, models, and account info.`));var At=M(()=>m({subtype:f(`interrupt`)}).describe(`Interrupts the currently running conversation turn.`)),jt=M(()=>m({subtype:f(`can_use_tool`),tool_name:a(),input:o(a(),c()),permission_suggestions:s(ke()).optional(),blocked_path:a().optional(),decision_reason:a().optional(),title:a().optional(),display_name:a().optional(),tool_use_id:a(),agent_id:a().optional(),description:a().optional()}).describe(`Requests permission to use a tool with the given input.`)),Mt=M(()=>m({subtype:f(`set_permission_mode`),mode:ot(),ultraplan:u().optional().describe(`@internal CCR ultraplan session marker.`)}).describe(`Sets the permission mode for tool execution handling.`)),Nt=M(()=>m({subtype:f(`set_model`),model:a().optional()}).describe(`Sets the model to use for subsequent conversation turns.`)),Pt=M(()=>m({subtype:f(`set_max_thinking_tokens`),max_thinking_tokens:i().nullable()}).describe(`Sets the maximum number of thinking tokens for extended thinking.`)),Ft=M(()=>m({subtype:f(`mcp_status`)}).describe(`Requests the current status of all MCP server connections.`));M(()=>m({mcpServers:s(I())}).describe(`Response containing the current status of all MCP server connections.`));var It=M(()=>m({subtype:f(`get_context_usage`)}).describe(`Requests a breakdown of current context window usage by category.`)),Lt=M(()=>m({name:a(),tokens:i(),color:a(),isDeferred:u().optional()})),Rt=M(()=>m({color:a(),isFilled:u(),categoryName:a(),tokens:i(),percentage:i(),squareFullness:i()}));M(()=>m({categories:s(Lt()),totalTokens:i(),maxTokens:i(),rawMaxTokens:i(),percentage:i(),gridRows:s(s(Rt())),model:a(),memoryFiles:s(m({path:a(),type:a(),tokens:i()})),mcpTools:s(m({name:a(),serverName:a(),tokens:i(),isLoaded:u().optional()})),deferredBuiltinTools:s(m({name:a(),tokens:i(),isLoaded:u()})).optional(),systemTools:s(m({name:a(),tokens:i()})).optional(),systemPromptSections:s(m({name:a(),tokens:i()})).optional(),agents:s(m({agentType:a(),source:a(),tokens:i()})),slashCommands:m({totalCommands:i(),includedCommands:i(),tokens:i()}).optional(),skills:m({totalSkills:i(),includedSkills:i(),tokens:i(),skillFrontmatter:s(m({name:a(),source:a(),tokens:i()}))}).optional(),autoCompactThreshold:i().optional(),isAutoCompactEnabled:u(),messageBreakdown:m({toolCallTokens:i(),toolResultTokens:i(),attachmentTokens:i(),assistantMessageTokens:i(),userMessageTokens:i(),toolCallsByType:s(m({name:a(),callTokens:i(),resultTokens:i()})),attachmentsByType:s(m({name:a(),tokens:i()}))}).optional(),apiUsage:m({input_tokens:i(),output_tokens:i(),cache_creation_input_tokens:i(),cache_read_input_tokens:i()}).nullable()}).describe(`Breakdown of current context window usage by category (system prompt, tools, messages, etc.).`));var zt=M(()=>m({subtype:f(`rewind_files`),user_message_id:a(),dry_run:u().optional()}).describe(`Rewinds file changes made since a specific user message.`));M(()=>m({canRewind:u(),error:a().optional(),filesChanged:s(a()).optional(),insertions:i().optional(),deletions:i().optional()}).describe(`Result of a rewindFiles operation.`));var Bt=M(()=>m({subtype:f(`cancel_async_message`),message_uuid:a()}).describe(`Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.`));M(()=>m({cancelled:u()}).describe(`Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).`));var Vt=M(()=>m({subtype:f(`seed_read_state`),path:a(),mtime:i()}).describe(`Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.`)),Ht=M(()=>m({subtype:f(`hook_callback`),callback_id:a(),input:je(),tool_use_id:a().optional()}).describe(`Delivers a hook callback with its input data.`)),Ut=M(()=>m({subtype:f(`mcp_message`),server_name:a(),message:Dt()}).describe(`Sends a JSON-RPC message to a specific MCP server.`)),Wt=M(()=>m({subtype:f(`mcp_set_servers`),servers:o(a(),Fe())}).describe(`Replaces the set of dynamically managed MCP servers.`));M(()=>m({added:s(a()),removed:s(a()),errors:o(a(),a())}).describe(`Result of replacing the set of dynamically managed MCP servers.`));var Gt=M(()=>m({subtype:f(`reload_plugins`)}).describe(`Reloads plugins from disk and returns the refreshed session components.`));M(()=>m({commands:s(F()),agents:s(L()),plugins:s(m({name:a(),path:a(),source:a().optional()})),mcpServers:s(I()),error_count:i()}).describe(`Refreshed commands, agents, plugins, and MCP server status after reload.`));var Kt=M(()=>m({subtype:f(`mcp_reconnect`),serverName:a()}).describe(`Reconnects a disconnected or failed MCP server.`)),qt=M(()=>m({subtype:f(`mcp_toggle`),serverName:a(),enabled:u()}).describe(`Enables or disables an MCP server.`)),Jt=M(()=>m({subtype:f(`stop_task`),task_id:a()}).describe(`Stops a running task.`)),Yt=M(()=>m({subtype:f(`apply_flag_settings`),settings:o(a(),c())}).describe(`Merges the provided settings into the flag settings layer, updating the active configuration.`)),Xt=M(()=>m({subtype:f(`get_settings`)}).describe(`Returns the effective merged settings and the raw per-source settings.`));M(()=>m({effective:o(a(),c()),sources:s(m({source:p([`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`]),settings:o(a(),c())})).describe(`Ordered low-to-high priority — later entries override earlier ones.`),applied:m({model:a(),effort:p([`low`,`medium`,`high`,`xhigh`,`max`]).nullable()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe(`Effective merged settings plus raw per-source settings in merge order.`));var Zt=M(()=>m({subtype:f(`elicitation`),mcp_server_name:a(),message:a(),mode:p([`form`,`url`]).optional(),url:a().optional(),elicitation_id:a().optional(),requested_schema:o(a(),c()).optional()}).describe(`Requests the SDK consumer to handle an MCP elicitation (user input request).`)),Qt=M(()=>m({action:p([`accept`,`decline`,`cancel`]),content:o(a(),c()).optional()}).describe(`Response from the SDK consumer for an elicitation request.`)),$t=M(()=>l([At(),jt(),kt(),Mt(),Nt(),Pt(),Ft(),It(),Ht(),Ut(),zt(),Bt(),Vt(),Wt(),Gt(),Kt(),qt(),Jt(),Yt(),Xt(),Zt()])),U=M(()=>m({type:f(`control_request`),request_id:a(),request:$t()})),en=M(()=>m({subtype:f(`success`),request_id:a(),response:o(a(),c()).optional()})),tn=M(()=>m({subtype:f(`error`),request_id:a(),error:a(),pending_permission_requests:s(d(()=>U())).optional()})),nn=M(()=>m({type:f(`control_response`),response:l([en(),tn()])})),rn=M(()=>m({type:f(`control_cancel_request`),request_id:a()}).describe(`Cancels a currently open control request.`)),an=M(()=>m({type:f(`keep_alive`)}).describe(`Keep-alive message to maintain WebSocket connection.`)),on=M(()=>m({type:f(`update_environment_variables`),variables:o(a(),a())}).describe(`Updates environment variables at runtime.`));M(()=>l([We(),He(),Ke(),Pe(),nn(),U(),rn(),an()])),M(()=>l([Ne(),U(),nn(),an(),on()])),n(),y(),fe(),D(),T(),ge(),ye(),Oe(),_(),O(),N(),P(),tt(),M(()=>g.object({tool_name:g.string().describe(`The name of the tool requesting permission`),input:g.record(g.string(),g.unknown()).describe(`The input for the tool`),tool_use_id:g.string().optional().describe(`The unique tool use request ID`)}));var sn=M(()=>g.enum([`user_temporary`,`user_permanent`,`user_reject`]).optional().catch(void 0)),cn=M(()=>g.object({behavior:g.literal(`allow`),updatedInput:g.record(g.string(),g.unknown()),updatedPermissions:g.array(Ze()).optional().catch(e=>{k(`Malformed updatedPermissions from SDK host ignored: ${e.error.issues[0]?.message??`unknown`}`,{level:`warn`})}),toolUseID:g.string().optional(),decisionClassification:sn()})),ln=M(()=>g.object({behavior:g.literal(`deny`),message:g.string(),interrupt:g.boolean().optional(),toolUseID:g.string().optional(),decisionClassification:sn()})),W=M(()=>g.union([cn(),ln()]));function G(e,t,n,r){let i={type:`permissionPromptTool`,permissionPromptToolName:t.name,toolResult:e};if(e.behavior===`allow`){let t=e.updatedPermissions;t&&(r.setAppState(e=>({...e,toolPermissionContext:R(e.toolPermissionContext,t)})),Be(t));let a=Object.keys(e.updatedInput).length>0?e.updatedInput:n;return{...e,updatedInput:a,decisionReason:i}}else e.behavior===`deny`&&e.interrupt&&(k(`SDK permission prompt deny+interrupt: tool=${t.name} message=${e.message}`),r.abortController.abort());return{...e,decisionReason:i}}he(),Se(),oe(),ce(),w(),qe(),_t(),Qe(),Ae(),Le();var un=/\u2028|\u2029/g;function dn(e){return e.replace(un,e=>e===`\u2028`?`\\u2028`:`\\u2029`)}function fn(e){return dn(E(e))}O(),T(),_(),P();var pn=`SandboxNetworkAccess`;function mn(e){if(e){if(e.type===`classifier`)return e.reason;switch(e.type){case`rule`:case`mode`:case`subcommandResults`:case`permissionPromptTool`:return;case`hook`:case`asyncAgent`:case`sandboxOverride`:case`workingDir`:case`safetyCheck`:case`other`:return e.reason}}}function hn(e,t,n,r){let i;try{i=e.getActivityDescription?.(t)??e.getToolUseSummary?.(t)??e.userFacingName(t)}catch{i=e.name}return{tool_name:e.name,action_description:i,tool_use_id:n,request_id:r,input:t}}var gn=1e3,_n=class{constructor(e,t){r(this,`structuredInput`,void 0),r(this,`pendingRequests`,new Map),r(this,`restoredWorkerState`,Promise.resolve(null)),r(this,`inputClosed`,!1),r(this,`unexpectedResponseCallback`,void 0),r(this,`resolvedToolUseIds`,new Set),r(this,`prependedLines`,[]),r(this,`onControlRequestSent`,void 0),r(this,`onControlRequestResolved`,void 0),r(this,`outbound`,new nt),this.input=e,this.replayUserMessages=t,this.input=e,this.structuredInput=this.read()}trackResolvedToolUseId(e){let t=e.request;if(t.subtype===`can_use_tool`&&(this.resolvedToolUseIds.add(t.tool_use_id),this.resolvedToolUseIds.size>gn)){let e=this.resolvedToolUseIds.values().next().value;e!==void 0&&this.resolvedToolUseIds.delete(e)}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(e){this.prependedLines.push(E({type:`user`,content:e,uuid:``,session_id:``,message:{role:`user`,content:e},parent_tool_use_id:null})+`
|
|
2
|
+
`)}async*read(){let e=``,t=async function*(){for(;;){this.prependedLines.length>0&&(e=this.prependedLines.join(``)+e,this.prependedLines=[]);let t=e.indexOf(`
|
|
3
|
+
`);if(t===-1)break;let n=e.slice(0,t);e=e.slice(t+1);let r=await this.processLine(n);r&&(ve(`info`,`cli_stdin_message_parsed`,{type:r.type}),yield r)}}.bind(this);yield*t();for await(let n of this.input)e+=n,yield*t();if(e){let t=await this.processLine(e);t&&(yield t)}this.inputClosed=!0;for(let e of this.pendingRequests.values())e.reject(Error(`Tool permission stream closed before response received`))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map(e=>e.request).filter(e=>e.request.subtype===`can_use_tool`)}setUnexpectedResponseCallback(e){this.unexpectedResponseCallback=e}injectControlResponse(e){let t=e.response,n=t?.request_id;if(!n)return;let r=this.pendingRequests.get(n);if(r)if(this.trackResolvedToolUseId(r.request),this.pendingRequests.delete(n),this.write({type:`control_cancel_request`,request_id:n}),t.subtype===`error`)r.reject(Error(t.error));else{let e=t.response;if(r.schema)try{r.resolve(r.schema.parse(e))}catch(e){r.reject(e)}else r.resolve({})}}setOnControlRequestSent(e){this.onControlRequestSent=e}setOnControlRequestResolved(e){this.onControlRequestResolved=e}async processLine(e){if(e)try{let t=yt(ue(e));if(t.type===`keep_alive`)return;if(t.type===`update_environment_variables`){let e=t.variables??{},n=Object.keys(e);for(let[t,n]of Object.entries(e))process.env[t]=n;k(`[structuredIO] applied update_environment_variables: ${n.join(`, `)}`);return}if(t.type===`control_response`){let e=`uuid`in t&&typeof t.uuid==`string`?t.uuid:void 0;e&&Ye(e,`completed`);let n=t.response,r=this.pendingRequests.get(n.request_id);if(!r){let e=(n.subtype===`success`?n.response:void 0)?.toolUseID;if(typeof e==`string`&&this.resolvedToolUseIds.has(e)){k(`Ignoring duplicate control_response for already-resolved toolUseID=${e} request_id=${n.request_id}`);return}this.unexpectedResponseCallback&&await this.unexpectedResponseCallback(t);return}if(this.trackResolvedToolUseId(r.request),this.pendingRequests.delete(n.request_id),r.request.request.subtype===`can_use_tool`&&this.onControlRequestResolved&&this.onControlRequestResolved(n.request_id),n.subtype===`error`){r.reject(Error(n.error??`Unknown error`));return}let i=n.response;if(r.schema)try{r.resolve(r.schema.parse(i))}catch(e){r.reject(e)}else r.resolve({});return this.replayUserMessages?t:void 0}if(t.type!==`user`&&t.type!==`control_request`&&t.type!==`assistant`&&t.type!==`system`){k(`Ignoring unknown message type: ${t.type}`,{level:`warn`});return}return t.type===`control_request`?(t.request||vn(`Error: Missing request on control_request`),t):(t.type===`assistant`||t.type===`system`||t.message?.role!==`user`&&vn(`Error: Expected message role 'user', got '${t.message?.role}'`),t)}catch(t){console.error(`Error parsing streaming input line: ${e}: ${t}`),process.exit(1)}}async write(e){_e(fn(e)+`
|
|
4
|
+
`)}async sendRequest(e,t,n,r=V()){let i={type:`control_request`,request_id:r,request:e};if(this.inputClosed)throw Error(`Stream closed`);if(n?.aborted)throw Error(`Request aborted`);this.outbound.enqueue(i),e.subtype===`can_use_tool`&&this.onControlRequestSent&&this.onControlRequestSent(i);let a=()=>{this.outbound.enqueue({type:`control_cancel_request`,request_id:r});let e=this.pendingRequests.get(r);e&&(this.trackResolvedToolUseId(e.request),e.reject(new pe))};n&&n.addEventListener(`abort`,a,{once:!0});try{return await new Promise((n,i)=>{this.pendingRequests.set(r,{request:{type:`control_request`,request_id:r,request:e},resolve:e=>{n(e)},reject:i,schema:t})})}finally{n&&n.removeEventListener(`abort`,a),this.pendingRequests.delete(r)}}createCanUseTool(e){return async(t,n,r,i,a,o)=>{let s=o??await Me(t,n,r,i,a);if(s.behavior===`allow`||s.behavior===`deny`)return s;let c=new AbortController,l=r.abortController.signal,u=()=>c.abort();l.addEventListener(`abort`,u,{once:!0});try{let i=yn(t.name,a,n,r,s.suggestions).then(e=>({source:`hook`,decision:e})),o=V();e?.(hn(t,n,a,o));let l=this.sendRequest({subtype:`can_use_tool`,tool_name:t.name,input:n,permission_suggestions:s.suggestions,blocked_path:s.blockedPath,decision_reason:mn(s.decisionReason),tool_use_id:a,agent_id:r.agentId},W(),c.signal,o).then(e=>({source:`sdk`,result:e})),u=await Promise.race([i,l]);return u.source===`hook`?u.decision?(l.catch(()=>{}),c.abort(),u.decision):G((await l).result,t,n,r):G(u.result,t,n,r)}catch(e){return G({behavior:`deny`,message:`Tool permission request failed: ${e}`,toolUseID:a},t,n,r)}finally{this.getPendingPermissionRequests().length===0&&vt(`running`),l.removeEventListener(`abort`,u)}}}createHookCallback(e,t){return{type:`callback`,timeout:t,callback:async(t,n,r)=>{try{return await this.sendRequest({subtype:`hook_callback`,callback_id:e,input:t,tool_use_id:n||void 0},et(),r)}catch(t){return console.error(`Error in hook callback ${e}:`,t),{}}}}}async handleElicitation(e,t,n,r,i,a,o){try{return await this.sendRequest({subtype:`elicitation`,mcp_server_name:e,message:t,mode:i,url:a,elicitation_id:o,requested_schema:n},Qt(),r)}catch{return{action:`cancel`}}}createSandboxAskCallback(){return async e=>{try{return(await this.sendRequest({subtype:`can_use_tool`,tool_name:pn,input:{host:e.host},tool_use_id:V(),description:`Allow network connection to ${e.host}?`},W())).behavior===`allow`}catch{return!1}}}async sendMcpMessage(e,t){return(await this.sendRequest({subtype:`mcp_message`,server_name:e,message:t},m({mcp_response:h()}))).mcp_response}};function vn(e){console.error(e),process.exit(1)}async function yn(e,t,n,r,i){let a=r.getAppState().toolPermissionContext.mode,o=at(e,t,n,r,a,i,r.abortController.signal);for await(let e of o)if(e.permissionRequestResult&&(e.permissionRequestResult.behavior===`allow`||e.permissionRequestResult.behavior===`deny`)){let t=e.permissionRequestResult;if(t.behavior===`allow`){let e=t.updatedInput||n,i=t.updatedPermissions??[];if(i.length>0){Be(i);let e=R(r.getAppState().toolPermissionContext,i);r.setAppState(t=>t.toolPermissionContext===e?t:{...t,toolPermissionContext:e})}return{behavior:`allow`,updatedInput:e,userModified:!1,decisionReason:{type:`hook`,hookName:`PermissionRequest`}}}else return{behavior:`deny`,message:t.message||`Permission denied by PermissionRequest hook`,decisionReason:{type:`hook`,hookName:`PermissionRequest`}}}}Xe();function bn(e){if(e.type!==`user`)return;let t=e.message?.content;if(!t||Array.isArray(t)&&t.length===0)return;let n=`uuid`in e&&typeof e.uuid==`string`?e.uuid:void 0;return{content:Array.isArray(t)?xn(t):t,uuid:n}}function xn(e){return e.some(Sn)?e.map(e=>{if(!Sn(e))return e;let t=e.source,n=typeof t.mediaType==`string`&&t.mediaType?t.mediaType:Je(e.source.data);return{...e,source:{type:`base64`,media_type:n,data:e.source.data}}}):e}function Sn(e){return e.type!==`image`||e.source?.type!==`base64`?!1:!e.source.media_type}C(),O(),D(),xe(),it();function Cn(e,t,n){let r=[],i=[],a=[];for(let[o,s]of Object.entries(e)){let e=t[o],c=Tn(s.source,n?.projectRoot);e?s.sourceIsFallback||re(c,e.source)?a.push(o):i.push({name:o,declaredSource:c,materializedSource:e.source}):r.push(o)}return{missing:r,sourceChanged:i,upToDate:a}}async function wn(e){let t=Ue();if(Object.keys(t).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let n;try{n=await Ie()}catch(e){j(e),n={}}let r=Cn(t,n,{projectRoot:x()}),i=[...r.missing.map(e=>({name:e,source:Tn(t[e].source),action:`install`})),...r.sourceChanged.map(({name:e,declaredSource:t})=>({name:e,source:t,action:`update`}))],a=[],o=[];for(let t of i){if(e?.skip?.(t.name,t.source)){a.push(t.name);continue}if(t.action===`update`&&ie(t.source)&&!await ae(t.source.path)){k(`[reconcile] '${t.name}' declared path does not exist; keeping materialized entry`),a.push(t.name);continue}o.push(t)}if(o.length===0)return{installed:[],updated:[],failed:[],upToDate:r.upToDate,skipped:a};k(`[reconcile] ${o.length} marketplace(s): ${o.map(e=>`${e.name}(${e.action})`).join(`, `)}`);let s=[],c=[],l=[];for(let t=0;t<o.length;t++){let{name:n,source:r,action:i}=o[t];e?.onProgress?.({type:`installing`,name:n,action:i,index:t+1,total:o.length});try{let t=await Ge(r);i===`install`?s.push(n):c.push(n),e?.onProgress?.({type:`installed`,name:n,alreadyMaterialized:t.alreadyMaterialized})}catch(t){let r=me(t);l.push({name:n,error:r}),e?.onProgress?.({type:`failed`,name:n,error:r}),j(t)}}return{installed:s,updated:c,failed:l,upToDate:r.upToDate,skipped:a}}function Tn(e,t){if((e.source===`directory`||e.source===`file`)&&!xt(e.path)){let n=t??x(),r=be(n);return{...e,path:Ct(r??n,e.path)}}return e}function K(e){return St(e??S(),kn)}async function En(e){let t;try{t=await Tt(K(e),`utf8`)}catch{return}let n=An().safeParse(we(t,!1));return n.success?n.data:void 0}async function Dn(e,t){let n=K(t),r=E(e);try{return await H(n,r,{flag:`wx`}),!0}catch(e){let t=le(e);if(t===`EEXIST`)return!1;if(t===`ENOENT`){await wt(bt(n),{recursive:!0});try{return await H(n,r,{flag:`wx`}),!0}catch(e){if(le(e)===`EEXIST`)return!1;throw e}}throw e}}function q(e){Y?.(),Y=de(async()=>{await J(e)})}async function On(e){let t=e?.dir,n=e?.lockIdentity??v(),r={sessionId:n,pid:process.pid,acquiredAt:Date.now()};if(await Dn(r,t))return X=void 0,q(e),k(`[ScheduledTasks] acquired scheduler lock (PID ${process.pid})`),!0;let i=await En(t);return i?.sessionId===n?(i.pid!==process.pid&&(await H(K(t),E(r)),q(e)),!0):i&&Te(i.pid)?(X!==i.sessionId&&(X=i.sessionId,k(`[ScheduledTasks] scheduler lock held by session ${i.sessionId} (PID ${i.pid})`)),!1):(i&&k(`[ScheduledTasks] recovering stale scheduler lock from PID ${i.pid}`),await Et(K(t)).catch(()=>{}),await Dn(r,t)?(X=void 0,q(e),!0):!1)}async function J(e){Y?.(),Y=void 0,X=void 0;let t=e?.dir,n=e?.lockIdentity??v(),r=await En(t);if(!(!r||r.sessionId!==n))try{await Et(K(t)),k(`[ScheduledTasks] released scheduler lock`)}catch{}}var kn,An,Y,X,jn=e((()=>{_(),y(),O(),D(),Ee(),Ce(),N(),T(),kn=St(`.claude`,`scheduled_tasks.lock`),An=M(()=>m({sessionId:a(),pid:i(),acquiredAt:i()}))})),Mn=t({buildMissedTaskNotification:()=>Fn,createCronScheduler:()=>Pn,isRecurringTaskAged:()=>Nn});function Nn(e,t,n){return n===0?!1:!!(e.recurring&&!e.permanent&&t-e.createdAt>=n)}function Pn(e){let{onFire:t,isLoading:n,assistantMode:r=!1,onFireTask:i,onMissed:a,dir:o,lockIdentity:s,getJitterConfig:c,isKilled:l,filter:u}=e,d=o||s?{dir:o,lockIdentity:s}:void 0,f=[],p=new Map,m=new Set,h=new Set,g=null,_=null,v=null,y=null,x=!1,S=!1;async function C(e){let n=await pt(o);if(x||(f=n,!e))return;let r=ut(n,Date.now()).filter(e=>!e.recurring&&!m.has(e.id)&&(!u||u(e)));if(r.length>0){for(let e of r)m.add(e.id),p.set(e.id,1/0);A(`tengu_scheduled_task_missed`,{count:r.length,taskIds:r.map(e=>e.id).join(`,`)}),a?a(r):t(Fn(r)),ct(r.map(e=>e.id),o).catch(e=>k(`[ScheduledTasks] failed to remove missed tasks: ${e}`)),k(`[ScheduledTasks] surfaced ${r.length} missed one-shot task(s)`)}}function re(){if(l?.()||n()&&!r)return;let e=Date.now(),a=new Set,s=[],d=c?.()??B;function m(n,r){if(u&&!u(n)||(a.add(n.id),h.has(n.id)))return;let c=p.get(n.id);if(c===void 0&&(c=n.recurring?st(n.cron,n.lastFiredAt??n.createdAt,n.id,d)??1/0:lt(n.cron,n.createdAt,n.id,d)??1/0,p.set(n.id,c),k(`[ScheduledTasks] scheduled ${n.id} for ${c===1/0?`never`:new Date(c).toISOString()}`)),e<c)return;k(`[ScheduledTasks] firing ${n.id}${n.recurring?` (recurring)`:``}`),A(`tengu_scheduled_task_fire`,{recurring:n.recurring??!1,taskId:n.id}),i?i(n):t(n.prompt);let l=Nn(n,e,d.recurringMaxAgeMs);if(l){let t=Math.floor((e-n.createdAt)/1e3/60/60);k(`[ScheduledTasks] recurring task ${n.id} aged out (${t}h since creation), deleting after final fire`),A(`tengu_scheduled_task_expired`,{taskId:n.id,ageHours:t})}if(n.recurring&&!l){let t=st(n.cron,e,n.id,d)??1/0;p.set(n.id,t),r||s.push(n.id)}else r?(ne([n.id]),p.delete(n.id)):(h.add(n.id),ct([n.id],o).catch(e=>k(`[ScheduledTasks] failed to remove task ${n.id}: ${e}`)).finally(()=>h.delete(n.id)),p.delete(n.id))}if(S){for(let e of f)m(e,!1);if(s.length>0){for(let e of s)h.add(e);ft(s,e,o).catch(e=>k(`[ScheduledTasks] failed to persist lastFiredAt: ${e}`)).finally(()=>{for(let e of s)h.delete(e)})}}if(o===void 0)for(let e of ee())m(e,!0);if(a.size===0){p.clear();return}for(let e of p.keys())a.has(e)||p.delete(e)}async function w(){if(x)return;g&&(clearInterval(g),g=null);let{default:e}=await import(`./chokidar-BcI3rIKm.js`);if(x)return;if(S=await On(d).catch(()=>!1),x){S&&(S=!1,J(d));return}S||(v=setInterval(()=>{On(d).then(e=>{if(x){e&&J(d);return}e&&(S=!0,v&&(clearInterval(v),v=null))}).catch(e=>k(String(e),{level:`error`}))},Q),v.unref?.()),C(!0);let t=mt(o);y=e.watch(t,{persistent:!1,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:In},ignorePermissionErrors:!0}),y.on(`add`,()=>void C(!1)),y.on(`change`,()=>void C(!1)),y.on(`unlink`,()=>{x||(f=[],p.clear())}),_=setInterval(re,Z),_.unref?.()}return{start(){if(x=!1,o!==void 0){k(`[ScheduledTasks] scheduler start() — dir=${o}, hasTasks=${z(o)}`),w();return}if(k(`[ScheduledTasks] scheduler start() — enabled=${b()}, hasTasks=${z()}`),!b()&&(r||z())&&te(!0),b()){w();return}g=setInterval(e=>{b()&&e()},Z,w),g.unref?.()},stop(){x=!0,g&&(clearInterval(g),g=null),_&&(clearInterval(_),_=null),v&&(clearInterval(v),v=null),y?.close(),y=null,S&&(S=!1,J(d))},getNextFireTime(){let e=1/0;for(let t of p.values())t<e&&(e=t);return e===1/0?null:e}}}function Fn(e){let t=e.length>1;return`${`The following one-shot scheduled task${t?`s were`:` was`} missed while Claude was not running. ${t?`They have`:`It has`} already been removed from .claude/scheduled_tasks.json.\n\nDo NOT execute ${t?`these prompts`:`this prompt`} yet. First use the AskUserQuestion tool to ask whether to run ${t?`each one`:`it`} now. Only execute if the user confirms.`}\n\n${e.map(e=>{let t=`[${ht(e.cron)}, created ${new Date(e.createdAt).toLocaleString()}]`,n=(e.prompt.match(/`+/g)??[]).reduce((e,t)=>Math.max(e,t.length),0),r="`".repeat(Math.max(3,n+1));return`${t}\n${r}\n${e.prompt}\n${r}`}).join(`
|
|
5
|
+
|
|
6
|
+
`)}`}var Z,In,Q,Ln=e((()=>{y(),gt(),dt(),jn(),O(),Z=1e3,In=300,Q=5e3})),Rn=t({getCronJitterConfig:()=>zn});function zn(){let e=se(`tengu_kairos_cron_config`,B,Bn),t=Hn().safeParse(e);return t.success?t.data:B}var Bn,$,Vn,Hn,Un=e((()=>{_(),dt(),N(),Bn=60*1e3,$=1800*1e3,Vn=720*60*60*1e3,Hn=M(()=>m({recurringFrac:i().min(0).max(1),recurringCapMs:i().int().min(0).max($),oneShotMaxMs:i().int().min(0).max($),oneShotFloorMs:i().int().min(0).max($),oneShotMinuteMod:i().int().min(1).max(60),recurringMaxAgeMs:i().int().min(0).max(Vn).default(B.recurringMaxAgeMs)}).refine(e=>e.oneShotFloorMs<=e.oneShotMaxMs))}));export{Mn as a,wn as c,_n as d,fn as f,Pn as i,bn as l,G as m,zn as n,Ln as o,W as p,Un as r,Cn as s,Rn as t,pn as u};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{Cn as i,F as a,In as o,Ln as s,Mn as c,Rn as l,T as u,Ut as d,_ as f,b as p,g as m,h,l as ee,m as te,t as g,tt as _,x as v,xt as y}from"./src-Di342QoJ.js";import{t as b}from"./jsx-runtime-D-D469L8.js";import{Ct as ne,cn as x,ot as re}from"./state-sIHsFpDu.js";import{Mr as ie,Pr as ae}from"./paths-DfGsIjPm.js";import{D as S,E as oe,l as C,p as w}from"./debug-otxXY3j-.js";import{n as se,r as T}from"./analytics-DqMQntaB.js";import{i as ce,v as le}from"./git-DayFjsvj.js";import{a as ue,o as E,s as de}from"./log-DS97_rIr.js";import{b as D,x as fe}from"./teammate-DMYOtLTK.js";import{E as O,g as pe,p as me,x as k}from"./startupProfiler-CnDpob1v.js";import{$u as he,DC as A,EC as j,Fr as ge,Jr as _e,Jy as ve,Ky as ye,Lr as be,R_ as xe,Ri as Se,Si as Ce,Zu as we,_b as Te,aS as Ee,dS as De,fS as Oe,hT as ke,kr as M,oS as Ae,vb as je,xr as Me,z_ as Ne,zi as Pe,zr as Fe}from"./loadAgentsDir-Br5fGLLI.js";import{i as N,r as P}from"./shellQuote-D8XPeqkc.js";import{t as Ie}from"./useKeybinding-FsOnjW6T.js";import{l as Le,u as Re}from"./referral-DOqhciQu.js";import{t as ze}from"./SearchBox-DfOmUoaI.js";import{n as Be,t as Ve}from"./useSearchInput-CROB7AbC.js";import{n as He,t as F}from"./Messages-DT2gDtrJ.js";import{n as Ue,t as We}from"./fuse-Bp7rmZ5x.js";import{sep as I}from"path";function Ge({log:e,onExit:t,onSelect:n}){let[r,i]=L.useState(null);L.useEffect(()=>{i(null),Fe(e)&&_e(e).then(i)},[e]);let a=Fe(e)&&r===null,o=r??e,s=M(o)||``,c=we();return _(`confirm:no`,t,{context:`Confirmation`}),_(`confirm:yes`,(0,L.useCallback)(()=>{n(r??e)},[n,r,e]),{context:`Confirmation`}),a?(0,R.jsxs)(v,{flexDirection:`column`,padding:1,children:[(0,R.jsx)(ee,{message:`Loading session…`}),(0,R.jsx)(p,{dimColor:!0,children:(0,R.jsx)(h,{children:(0,R.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})})})]}):(0,R.jsxs)(v,{flexDirection:`column`,children:[(0,R.jsx)(F,{messages:o.messages,tools:c,commands:[],verbose:!0,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:s,screen:`transcript`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1}),(0,R.jsxs)(v,{flexShrink:0,flexDirection:`column`,borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:`single`,paddingLeft:2,children:[(0,R.jsxs)(p,{children:[pe(o.modified),` · `,o.messageCount,` messages`,o.gitBranch?` · ${o.gitBranch}`:``]}),(0,R.jsx)(p,{dimColor:!0,children:(0,R.jsxs)(h,{children:[(0,R.jsx)(m,{shortcut:`Enter`,action:`resume`}),(0,R.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})]})}var L,R,z=e((()=>{L=t(l(),1),g(),Ie(),he(),k(),ge(),A(),He(),R=b()}));function Ke(e,t){if(e===V)return 3+H;let n=i(e),r=t?Math.min(n,t-H-U):n;return Math.max(0,r)+H+U}function qe(e,t){let n=t-H-U;return i(e)<=n?e:n<=1?e.charAt(0):O(e,n)}function Je({tabs:e,selectedIndex:t,availableWidth:n,showAllProjects:r=!1}){let i=r?`Resume (All Projects)`:`Resume`,a=i.length+1,o=Math.max(W,G),s=n-a-o-2,c=Math.max(0,Math.min(t,e.length-1)),l=Math.max(20,Math.floor(s/2)),u=e.map(e=>Ke(e,l)),d=0,f=e.length;if(u.reduce((e,t,n)=>e+t+ +(n<u.length-1),0)>s){let t=s-et,n=u[c]??0;for(d=c,f=c+1;d>0||f<e.length;){let r=d>0,i=f<e.length;if(r){let e=(u[d-1]??0)+1;if(n+e<=t){d--,n+=e;continue}}if(i){let e=(u[f]??0)+1;if(n+e<=t){f++,n+=e;continue}}break}}let m=d,h=e.length-f,ee=e.slice(d,f),te=ee.map((e,t)=>d+t);return(0,B.jsxs)(v,{flexDirection:`row`,gap:1,children:[(0,B.jsx)(p,{color:`suggestion`,children:i}),m>0&&(0,B.jsxs)(p,{dimColor:!0,children:[Ye,m]}),ee.map((e,t)=>{let n=te[t]===c,r=e===V?e:`#${qe(e,l-H)}`;return(0,B.jsxs)(p,{backgroundColor:n?`suggestion`:void 0,color:n?`inverseText`:void 0,bold:n,children:[` `,r,` `]},e)}),h>0?(0,B.jsxs)(p,{dimColor:!0,children:[Xe,h,Ze]}):(0,B.jsx)(p,{dimColor:!0,children:Qe})]})}var B,V,H,U,Ye,Xe,Ze,Qe,$e,et,W,G,tt=e((()=>{l(),g(),k(),B=b(),V=`All`,H=2,U=1,Ye=`← `,Xe=`→`,Ze=` (tab to cycle)`,Qe=`(tab to cycle)`,$e=2,et=2+$e+1,W=1+$e+15,G=14}));function nt({nodes:e,onSelect:t,onCancel:n,onFocus:r,focusNodeId:i,visibleOptionCount:a,layout:o=`expanded`,isDisabled:s=!1,hideIndexes:c=!1,isNodeExpanded:l,onExpand:u,onCollapse:d,getParentPrefix:f,getChildPrefix:p,onUpFromFirstItem:m}){let[h,ee]=K.useState(new Set),te=K.useRef(!1),g=K.useRef(null),_=K.useCallback(e=>l?l(e):h.has(e),[l,h]),y=K.useMemo(()=>{let t=[];function n(e,r,i){let a=!!e.children&&e.children.length>0,o=_(e.id);if(t.push({node:e,depth:r,isExpanded:o,hasChildren:a,parentId:i}),a&&o&&e.children)for(let t of e.children)n(t,r+1,e.id)}for(let t of e)n(t,0);return t},[e,_]),b=K.useCallback(e=>e?`▼ `:`▶ `,[]),ne=K.useCallback(e=>` ▸ `,[]),x=f??b,re=p??ne,ie=K.useCallback(e=>{let t=``;return e.hasChildren?t=x(e.isExpanded):e.depth>0&&(t=re(e.depth)),t+e.node.label},[x,re]),ae=K.useMemo(()=>y.map(e=>({label:ie(e),description:e.node.description,dimDescription:e.node.dimDescription??!0,value:e.node.id})),[y,ie]),S=K.useMemo(()=>{let e=new Map;return y.forEach(t=>e.set(t.node.id,t.node)),e},[y]),oe=K.useCallback(e=>y.find(t=>t.node.id===e),[y]),C=K.useCallback((e,t)=>{let n=oe(e);!n||!n.hasChildren||(t?u?u(e):ee(t=>new Set(t).add(e)):d?d(e):ee(t=>{let n=new Set(t);return n.delete(e),n}))},[oe,u,d]);return(0,rt.jsx)(v,{tabIndex:0,autoFocus:!0,onKeyDown:e=>{if(!i||s)return;let t=oe(i);if(t){if(e.key===`right`&&t.hasChildren)e.preventDefault(),C(i,!0);else if(e.key===`left`){if(t.hasChildren&&t.isExpanded)e.preventDefault(),C(i,!1);else if(t.parentId!==void 0&&(e.preventDefault(),te.current=!0,C(t.parentId,!1),r)){let e=S.get(t.parentId);e&&r(e)}}}},children:(0,rt.jsx)(Ee,{options:ae,onChange:K.useCallback(e=>{let n=S.get(e);n&&t(n)},[S,t]),onFocus:K.useCallback(e=>{if(te.current){te.current=!1;return}if(g.current!==e&&(g.current=e,r)){let t=S.get(e);t&&r(t)}},[r,S]),onCancel:n,defaultFocusValue:i,visibleOptionCount:a,layout:o,isDisabled:s,hideIndexes:c,onUpFromFirstItem:m})})}var K,rt,it=e((()=>{K=t(l(),1),g(),Ae(),rt=b()}));function at(e,t){return O(e.replace(/\s+/g,` `).trim(),t)}function ot({before:e,match:t,after:n},r){return o.dim(e)+r(t)+o.dim(n)}function st(e,t,n){let r=e.toLowerCase().indexOf(t.toLowerCase());if(r===-1)return null;let i=r+t.length,a=Math.max(0,r-n),o=Math.min(e.length,i+n),s=e.slice(a,r),c=e.slice(r,i),l=e.slice(i,o);return{before:(a>0?`…`:``)+s.replace(/\s+/g,` `).trimStart(),match:c.trim(),after:l.replace(/\s+/g,` `).trimEnd()+(o<e.length?`…`:``)}}function ct(e,t,n){let{isGroupHeader:r=!1,isChild:i=!1,forkCount:a=0}=n||{},o=r&&a>0?ht:i?Y:0,s=r&&a>0?` (+${a} other ${a===1?`session`:`sessions`})`:``,c=e.isSidechain?` (sidechain)`:``,l=t-o-c.length-s.length;return`${at(ue(e),l)}${c}${s}`}function lt(e,t){let{isChild:n=!1,showProjectPath:r=!1}=t||{},i=n?` `:``,a=me(e),o=r&&e.projectPath?` · ${e.projectPath}`:``;return i+a+o}function ut({logs:e,maxHeight:t=1/0,forceWidth:n,onCancel:i,onSelect:o,onLogsChanged:s,onLoadMore:l,initialSearchQuery:ee,showAllProjects:g=!1,onToggleAllProjects:b,onAgenticSearch:x}){let ie=a(),ae=n===void 0?ie.columns:n,S=Re(i),oe=d(),C=be(),w=process.env.USER_TYPE===`ant`,[se]=u(),le=Te(se),E=q.useMemo(()=>e=>c(e,le.warning),[le.warning]),de=process.env.USER_TYPE===`ant`,[D,fe]=q.useState(null),[O,pe]=q.useState(!1),[k,he]=q.useState(!1),[A,ge]=q.useState(!1),_e=q.useMemo(()=>re(),[]),[ve,xe]=q.useState(``),[we,Oe]=q.useState(0),[ke,Ae]=q.useState(new Set),[je,Ne]=q.useState(null),[Pe,Fe]=q.useState(1),[N,P]=q.useState(`list`),[Ie,Le]=q.useState(null),ze=q.useRef(null),[Ve,He]=q.useState(0),[F,Ue]=q.useState({status:`idle`}),[I,L]=q.useState(!1),R=q.useRef(null),{query:z,setQuery:Ke,cursorOffset:qe}=Be({isActive:N===`search`&&F.status!==`searching`,onExit:()=>{P(`list`),T(`tengu_session_search_toggled`,{enabled:!1})},onExitUp:()=>{P(`list`),T(`tengu_session_search_toggled`,{enabled:!1})},passthroughCtrlKeys:[`n`],initialQuery:ee||``}),B=q.useDeferredValue(z),[V,H]=q.useState(``);q.useEffect(()=>{if(!B){H(``);return}let e=setTimeout(H,300,B);return()=>clearTimeout(e)},[B]);let[U,Ye]=q.useState(null),[Xe,Ze]=q.useState(!1);q.useEffect(()=>{ce().then(e=>fe(e)),Se(_e).then(e=>{ge(e.length>1)})},[_e]);let Qe=q.useMemo(()=>new Map(e.map(e=>[e,ft(e)])),[e]),$e=q.useMemo(()=>w?new We(e.map(e=>({log:e,searchableText:Qe.get(e)??``})).filter(e=>e.searchableText),{keys:[`searchableText`],threshold:gt,ignoreLocation:!0,includeScore:!0}):null,[e,Qe,w]),et=q.useMemo(()=>mt(e),[e]),W=et.length>0,G=q.useMemo(()=>W?[`All`,...et]:[],[W,et]),tt=G.length>0&&Ve<G.length?Ve:0,K=G[tt],rt=K===`All`?void 0:K,it=+!!W,ut=q.useMemo(()=>{let t=e;return C&&(t=e.filter(e=>{let t=ne(),n=M(e);return!!(t&&n===t||e.customTitle||Me(e.messages)||e.firstPrompt||e.customTitle)})),rt!==void 0&&(t=t.filter(e=>e.tag===rt)),O&&D&&(t=t.filter(e=>e.gitBranch===D)),A&&!k&&(t=t.filter(e=>e.projectPath===_e)),t},[e,C,rt,O,D,A,k,_e]),dt=q.useMemo(()=>{if(!z)return ut;let e=z.toLowerCase();return ut.filter(t=>{let n=ue(t).toLowerCase(),r=(t.gitBranch||``).toLowerCase(),i=(t.tag||``).toLowerCase(),a=t.prNumber?`pr #${t.prNumber} ${t.prRepository||``}`.toLowerCase():``;return n.includes(e)||r.includes(e)||i.includes(e)||a.includes(e)})},[ut,z]);q.useEffect(()=>{w&&B&&B!==V&&Ze(!0)},[B,V,w]),q.useEffect(()=>{if(!w||!V||!$e){Ye(null),Ze(!1);return}let e=setTimeout((e,t,n,r)=>{let i=e.search(t);i.sort((e,t)=>{let n=new Date(e.item.log.modified).getTime(),r=new Date(t.item.log.modified).getTime()-n;return Math.abs(r)>_t?r:(e.score??1)-(t.score??1)}),n({results:i.map(e=>({log:e.item.log,score:e.score,searchableText:e.item.searchableText})),query:t}),r(!1)},0,$e,V,Ye,Ze);return()=>{clearTimeout(e)}},[V,$e,w]);let{filteredLogs:ht,snippets:Y}=q.useMemo(()=>{let e=new Map,t=dt;if(U&&V&&U.query===V){for(let t of U.results)if(t.searchableText){let n=st(t.searchableText,V,vt);n&&e.set(t.log,n)}let n=new Set(t.map(e=>e.messages[0]?.uuid)),r=U.results.map(e=>e.log).filter(e=>!n.has(e.messages[0]?.uuid));t=[...t,...r]}return{filteredLogs:t,snippets:e}},[dt,U,V]),X=q.useMemo(()=>F.status===`results`&&F.results.length>0?F.results:ht,[F,ht]),Z=Math.max(30,ae-4),Q=q.useMemo(()=>{if(!C)return[];let e=pt(X);return Array.from(e.entries()).map(([e,t])=>{let n=t[0],r=X.indexOf(n),i=Y.get(n),a=i?ot(i,E):null;if(t.length===1){let t=lt(n,{showProjectPath:g});return{id:`log:${e}:0`,value:{log:n,indexInFiltered:r},label:ct(n,Z),description:a?`${t}\n ${a}`:t,dimDescription:!0}}let o=t.length-1,s=t.slice(1).map((t,n)=>{let r=X.indexOf(t),i=Y.get(t),a=i?ot(i,E):null,o=lt(t,{isChild:!0,showProjectPath:g});return{id:`log:${e}:${n+1}`,value:{log:t,indexInFiltered:r},label:ct(t,Z,{isChild:!0}),description:a?`${o}\n ${a}`:o,dimDescription:!0}}),c=lt(n,{showProjectPath:g});return{id:`group:${e}`,value:{log:n,indexInFiltered:r},label:ct(n,Z,{isGroupHeader:!0,forkCount:o}),description:a?`${c}\n ${a}`:c,dimDescription:!0,children:s}})},[C,X,Z,g,Y,E]),yt=q.useMemo(()=>C?[]:X.map((e,t)=>{let n=at(ue(e)+(e.isSidechain?` (sidechain)`:``),Z),r=me(e),i=g&&e.projectPath?` · ${e.projectPath}`:``,a=Y.get(e),o=a?ot(a,E):null;return{label:n,description:o?`${r}${i}\n ${o}`:r+i,dimDescription:!0,value:t.toString()}}),[C,X,E,Z,g,Y]),$=je?.value.log??null,bt=()=>{if(!C||!$)return``;let e=M($);if(!e)return``;let t=X.filter(t=>M(t)===e);if(!(t.length>1))return``;let n=ke.has(e);return t.indexOf($)>0||n?`← to collapse`:`→ to expand`},xt=q.useCallback(async()=>{let e=$?M($):void 0;if(!$||!e){P(`list`),xe(``);return}ve.trim()&&(await Ce(e,ve.trim(),$.fullPath),C&&s&&s()),P(`list`),xe(``)},[$,ve,s,C]),St=q.useCallback(()=>{P(`list`),T(`tengu_session_search_toggled`,{enabled:!1})},[]),Ct=q.useCallback(()=>{P(`search`),T(`tengu_session_search_toggled`,{enabled:!0})},[]),wt=q.useCallback(async()=>{if(!z.trim()||!x||!de)return;R.current?.abort();let t=new AbortController;R.current=t,Ue({status:`searching`}),T(`tengu_agentic_search_started`,{query_length:z.length});try{let n=await x(z,e,t.signal);if(t.signal.aborted)return;Ue({status:`results`,results:n,query:z}),T(`tengu_agentic_search_completed`,{query_length:z.length,results_count:n.length})}catch(e){if(t.signal.aborted)return;Ue({status:`error`,message:e instanceof Error?e.message:`Search failed`}),T(`tengu_agentic_search_error`,{query_length:z.length})}},[z,x,de,e]);q.useEffect(()=>{F.status!==`idle`&&F.status!==`searching`&&(F.status===`results`&&F.query!==z||F.status===`error`)&&Ue({status:`idle`})},[z,F]),q.useEffect(()=>()=>{R.current?.abort()},[]);let Tt=q.useRef(F.status);q.useEffect(()=>{let e=Tt.current;if(Tt.current=F.status,e===`searching`&&F.status===`results`){if(C&&Q.length>0)Ne(Q[0]);else if(!C&&X.length>0){let e=X[0];Ne({id:`0`,value:{log:e,indexInFiltered:0},label:``})}}},[F.status,C,Q,X]);let Et=q.useCallback(e=>{let t=parseInt(e,10),n=X[t];!n||ze.current===t.toString()||(ze.current=t.toString(),Ne({id:t.toString(),value:{log:n,indexInFiltered:t},label:``}),Fe(t+1))},[X]),Dt=q.useCallback(e=>{Ne(e);let t=X.findIndex(t=>M(t)===M(e.value.log));t>=0&&Fe(t+1)},[X]);_(`confirm:no`,()=>{R.current?.abort(),Ue({status:`idle`}),T(`tengu_agentic_search_cancelled`,{})},{context:`Confirmation`,isActive:N!==`preview`&&F.status===`searching`}),_(`confirm:no`,()=>{P(`list`),xe(``)},{context:`Settings`,isActive:N===`rename`&&F.status!==`searching`}),_(`confirm:no`,()=>{Ke(``),L(!1),i?.()},{context:`Confirmation`,isActive:N!==`preview`&&N!==`rename`&&N!==`search`&&I&&F.status!==`searching`}),y((e,t)=>{if(N!==`preview`&&F.status!==`searching`&&N!==`rename`)if(N===`search`)e.toLowerCase()===`n`&&t.ctrl?St():(t.return||t.downArrow)&&z.trim()&&x&&de&&F.status!==`results`&&L(!0);else{if(I){if(t.return){wt(),L(!1);return}else if(t.downArrow){L(!1);return}else if(t.upArrow){P(`search`),L(!1);return}}if(W&&t.tab){let e=t.shift?-1:1;He(t=>{let n=((t<G.length?t:0)+G.length+e)%G.length,r=G[n];return T(`tengu_session_tag_filter_changed`,{is_all:r===`All`,tag_count:et.length}),n});return}let n=!t.ctrl&&!t.meta,r=e.toLowerCase();if(r===`a`&&t.ctrl&&b)b(),T(`tengu_session_all_projects_toggled`,{enabled:!g});else if(r===`b`&&t.ctrl){let e=!O;pe(e),T(`tengu_session_branch_filter_toggled`,{enabled:e})}else if(r===`w`&&t.ctrl&&A){let e=!k;he(e),T(`tengu_session_worktree_filter_toggled`,{enabled:e})}else r===`/`&&n?(P(`search`),T(`tengu_session_search_toggled`,{enabled:!0})):r===`r`&&t.ctrl&&$?(P(`rename`),xe(``),T(`tengu_session_rename_started`,{})):r===`v`&&t.ctrl&&$?(Le($),P(`preview`),T(`tengu_session_preview_opened`,{messageCount:$.messageCount})):$&&n&&e.length>0&&!/^\s+$/.test(e)&&(P(`search`),Ke(e),T(`tengu_session_search_toggled`,{enabled:!0}))}},{isActive:!0});let Ot=[];O&&D&&Ot.push(D),A&&!k&&Ot.push(`current worktree`);let kt=8+ +(Ot.length>0&&N!==`search`)+it,At=Math.max(1,Math.floor((t-kt-2)/3));return q.useEffect(()=>{l&&Pe+At*2>=X.length&&l(At*3)},[Pe,At,X.length,l]),e.length===0?null:N===`preview`&&Ie&&C?(0,J.jsx)(Ge,{log:Ie,onExit:()=>{P(`list`),Le(null)},onSelect:o}):(0,J.jsxs)(v,{flexDirection:`column`,height:t-1,children:[(0,J.jsx)(v,{flexShrink:0,children:(0,J.jsx)(te,{color:`suggestion`})}),(0,J.jsx)(v,{flexShrink:0,children:(0,J.jsx)(p,{children:` `})}),W?(0,J.jsx)(Je,{tabs:G,selectedIndex:tt,availableWidth:ae,showAllProjects:g}):(0,J.jsx)(v,{flexShrink:0,children:(0,J.jsxs)(p,{bold:!0,color:`suggestion`,children:[`Resume Session`,N===`list`&&X.length>At&&(0,J.jsxs)(p,{dimColor:!0,children:[` `,`(`,Pe,` of `,X.length,`)`]})]})}),(0,J.jsx)(f,{query:z,isFocused:N===`search`,isTerminalFocused:oe,cursorOffset:qe}),Ot.length>0&&N!==`search`&&(0,J.jsx)(v,{flexShrink:0,paddingLeft:2,children:(0,J.jsx)(p,{dimColor:!0,children:(0,J.jsx)(h,{children:Ot})})}),(0,J.jsx)(v,{flexShrink:0,children:(0,J.jsx)(p,{children:` `})}),F.status===`searching`&&(0,J.jsxs)(v,{paddingLeft:1,flexShrink:0,children:[(0,J.jsx)(ye,{}),(0,J.jsx)(p,{children:` Searching…`})]}),F.status===`results`&&F.results.length>0&&(0,J.jsx)(v,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(p,{dimColor:!0,italic:!0,children:`Claude found these results:`})}),F.status===`results`&&F.results.length===0&&ht.length===0&&(0,J.jsx)(v,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(p,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),F.status===`error`&&ht.length===0&&(0,J.jsx)(v,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(p,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),!!z.trim()&&x&&de&&F.status!==`searching`&&F.status!==`results`&&F.status!==`error`&&(0,J.jsxs)(v,{flexShrink:0,flexDirection:`column`,children:[(0,J.jsxs)(v,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(p,{color:I?`suggestion`:void 0,children:I?r.pointer:` `}),(0,J.jsx)(p,{color:I?`suggestion`:void 0,bold:I,children:`Search deeply using Claude →`})]}),(0,J.jsx)(v,{height:1})]}),F.status===`searching`?null:N===`rename`&&$?(0,J.jsxs)(v,{paddingLeft:2,flexDirection:`column`,children:[(0,J.jsx)(p,{bold:!0,children:`Rename session:`}),(0,J.jsx)(v,{paddingTop:1,children:(0,J.jsx)(De,{value:ve,onChange:xe,onSubmit:xt,placeholder:ue($,`Enter new session name`),columns:ae,cursorOffset:we,onChangeCursorOffset:Oe,showCursor:!0})})]}):C?(0,J.jsx)(nt,{nodes:Q,onSelect:e=>{o(e.value.log)},onFocus:Dt,onCancel:i,focusNodeId:je?.id,visibleOptionCount:At,layout:`expanded`,isDisabled:N===`search`||I,hideIndexes:!1,isNodeExpanded:e=>{if(N===`search`||O)return!0;let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;return t?ke.has(t):!1},onExpand:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&(Ae(e=>new Set(e).add(t)),T(`tengu_session_group_expanded`,{}))},onCollapse:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&Ae(e=>{let n=new Set(e);return n.delete(t),n})},onUpFromFirstItem:Ct}):(0,J.jsx)(Ee,{options:yt,onChange:e=>{let t=X[parseInt(e,10)];t&&o(t)},visibleOptionCount:At,onCancel:i,onFocus:Et,defaultFocusValue:je?.id.toString(),layout:`expanded`,isDisabled:N===`search`||I,onUpFromFirstItem:Ct}),(0,J.jsx)(v,{paddingLeft:2,children:S.pending?(0,J.jsxs)(p,{dimColor:!0,children:[`Press `,S.keyName,` again to exit`]}):N===`rename`?(0,J.jsx)(p,{dimColor:!0,children:(0,J.jsxs)(h,{children:[(0,J.jsx)(m,{shortcut:`Enter`,action:`save`}),(0,J.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):F.status===`searching`?(0,J.jsx)(p,{dimColor:!0,children:(0,J.jsxs)(h,{children:[(0,J.jsx)(p,{children:`Searching with Claude…`}),(0,J.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):I?(0,J.jsx)(p,{dimColor:!0,children:(0,J.jsxs)(h,{children:[(0,J.jsx)(m,{shortcut:`Enter`,action:`search`}),(0,J.jsx)(m,{shortcut:`↓`,action:`skip`}),(0,J.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):N===`search`?(0,J.jsx)(p,{dimColor:!0,children:(0,J.jsxs)(h,{children:[(0,J.jsx)(p,{children:Xe&&w?`Searching…`:`Type to Search`}),(0,J.jsx)(m,{shortcut:`Enter`,action:`select`}),(0,J.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`clear`})]})}):(0,J.jsx)(p,{dimColor:!0,children:(0,J.jsxs)(h,{children:[b&&(0,J.jsx)(m,{shortcut:`Ctrl+A`,action:`show ${g?`current dir`:`all projects`}`}),D&&(0,J.jsx)(m,{shortcut:`Ctrl+B`,action:`toggle branch`}),A&&(0,J.jsx)(m,{shortcut:`Ctrl+W`,action:`show ${k?`current worktree`:`all worktrees`}`}),(0,J.jsx)(m,{shortcut:`Ctrl+V`,action:`preview`}),(0,J.jsx)(m,{shortcut:`Ctrl+R`,action:`rename`}),(0,J.jsx)(p,{children:`Type to search`}),(0,J.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`}),bt()&&(0,J.jsx)(p,{children:bt()})]})})})]})}function dt(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function ft(e){let t=(e.messages.length<=X?e.messages:[...e.messages.slice(0,Z),...e.messages.slice(-Z)]).map(dt).filter(Boolean).join(` `),n=`${[e.customTitle,e.summary,e.firstPrompt,e.gitBranch,e.tag,e.prNumber?`PR #${e.prNumber}`:void 0,e.prRepository].filter(Boolean).join(` `)} ${t}`.trim();return n.length>Q?n.slice(0,Q):n}function pt(e){let t=new Map;for(let n of e){let e=M(n);if(e){let r=t.get(e);r?r.push(n):t.set(e,[n])}}return t.forEach(e=>e.sort((e,t)=>new Date(t.modified).getTime()-new Date(e.modified).getTime())),t}function mt(e){let t=new Set;for(let n of e)n.tag&&t.add(n.tag);return Array.from(t).sort((e,t)=>e.localeCompare(t))}var q,J,ht,Y,X,Z,Q,gt,_t,vt,yt=e((()=>{s(),n(),Ue(),q=t(l(),1),x(),Le(),Ve(),ke(),g(),Ie(),se(),k(),Pe(),le(),E(),ge(),je(),A(),Ae(),ze(),z(),ve(),tt(),Oe(),it(),J=b(),ht=2,Y=4,X=2e3,Z=1e3,Q=5e4,gt=.3,_t=60*1e3,vt=50}));function $(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function bt(e){if(e.length===0)return``;let t=(e.length<=wt?e:[...e.slice(0,wt/2),...e.slice(-wt/2)]).map($).filter(Boolean).join(` `).replace(/\s+/g,` `).trim();return t.length>Ct?t.slice(0,Ct)+`…`:t}function xt(e,t){return!!(ue(e).toLowerCase().includes(t)||e.customTitle?.toLowerCase().includes(t)||e.tag?.toLowerCase().includes(t)||e.gitBranch?.toLowerCase().includes(t)||e.summary?.toLowerCase().includes(t)||e.firstPrompt?.toLowerCase().includes(t)||e.messages&&e.messages.length>0&&bt(e.messages).toLowerCase().includes(t))}async function St(e,t,n){if(!e.trim()||t.length===0)return[];let r=e.toLowerCase(),i=t.filter(e=>xt(e,r)),a;if(i.length>=Tt)a=i.slice(0,Tt);else{let e=t.filter(e=>!xt(e,r)),n=Tt-i.length;a=[...i,...e.slice(0,n)]}w(`Agentic search: ${a.length}/${t.length} logs, query="${e}", matching: ${i.length}, with messages: ${D(a,e=>e.messages?.length>0)}`);let o=a.map(async e=>{if(Fe(e))try{return await _e(e)}catch(t){return de(t),e}return e}),s=await Promise.all(o);w(`Agentic search: loaded ${D(s,e=>e.messages?.length>0)}/${a.length} logs with transcripts`);let c=`Sessions:
|
|
2
|
+
${s.map((e,t)=>{let n=[`${t}:`],r=ue(e);if(n.push(r),e.customTitle&&e.customTitle!==r&&n.push(`[custom title: ${e.customTitle}]`),e.tag&&n.push(`[tag: ${e.tag}]`),e.gitBranch&&n.push(`[branch: ${e.gitBranch}]`),e.summary&&n.push(`- Summary: ${e.summary}`),e.firstPrompt&&e.firstPrompt!==`No prompt`&&n.push(`- First message: ${e.firstPrompt.slice(0,300)}`),e.messages&&e.messages.length>0){let t=bt(e.messages);t&&n.push(`- Transcript: ${t}`)}return n.join(` `)}).join(`
|
|
3
|
+
`)}
|
|
4
|
+
|
|
5
|
+
Search query: "${e}"
|
|
6
|
+
|
|
7
|
+
Find the sessions that are most relevant to this query.`;w(`Agentic search prompt (first 500 chars): ${c.slice(0,500)}...`);try{let e=ie();w(`Agentic search using model: ${e}`);let t=(await Ne({model:e,system:Et,messages:[{role:`user`,content:c}],signal:n,querySource:`session_search`})).content.find(e=>e.type===`text`);if(!t||t.type!==`text`)return w(`No text content in agentic search response`),[];w(`Agentic search response: ${t.text}`);let r=t.text.match(/\{[\s\S]*\}/);if(!r)return w(`Could not find JSON in agentic search response`),[];let i=(S(r[0]).relevant_indices||[]).filter(e=>e>=0&&e<s.length).map(e=>s[e]);return w(`Agentic search found ${i.length} relevant sessions`),i}catch(e){return de(e),w(`Agentic search error: ${e}`),[]}}var Ct,wt,Tt,Et,Dt=e((()=>{fe(),C(),E(),ae(),ge(),xe(),oe(),Ct=2e3,wt=100,Tt=100,Et=`Your goal is to find relevant sessions based on a user's search query.
|
|
8
|
+
|
|
9
|
+
You will be given a list of sessions with their metadata and a search query. Identify which sessions are most relevant to the query.
|
|
10
|
+
|
|
11
|
+
Each session may include:
|
|
12
|
+
- Title (display name or custom title)
|
|
13
|
+
- Tag (user-assigned category, shown as [tag: name] - users tag sessions with /tag command to categorize them)
|
|
14
|
+
- Branch (git branch name, shown as [branch: name])
|
|
15
|
+
- Summary (AI-generated summary)
|
|
16
|
+
- First message (beginning of the conversation)
|
|
17
|
+
- Transcript (excerpt of conversation content)
|
|
18
|
+
|
|
19
|
+
IMPORTANT: Tags are user-assigned labels that indicate the session's topic or category. If the query matches a tag exactly or partially, those sessions should be highly prioritized.
|
|
20
|
+
|
|
21
|
+
For each session, consider (in order of priority):
|
|
22
|
+
1. Exact tag matches (highest priority - user explicitly categorized this session)
|
|
23
|
+
2. Partial tag matches or tag-related terms
|
|
24
|
+
3. Title matches (custom titles or first message content)
|
|
25
|
+
4. Branch name matches
|
|
26
|
+
5. Summary and transcript content matches
|
|
27
|
+
6. Semantic similarity and related concepts
|
|
28
|
+
|
|
29
|
+
CRITICAL: Be VERY inclusive in your matching. Include sessions that:
|
|
30
|
+
- Contain the query term anywhere in any field
|
|
31
|
+
- Are semantically related to the query (e.g., "testing" matches sessions about "tests", "unit tests", "QA", etc.)
|
|
32
|
+
- Discuss topics that could be related to the query
|
|
33
|
+
- Have transcripts that mention the concept even in passing
|
|
34
|
+
|
|
35
|
+
When in doubt, INCLUDE the session. It's better to return too many results than too few. The user can easily scan through results, but missing relevant sessions is frustrating.
|
|
36
|
+
|
|
37
|
+
Return sessions ordered by relevance (most relevant first). If truly no sessions have ANY connection to the query, return an empty array - but this should be rare.
|
|
38
|
+
|
|
39
|
+
Respond with ONLY the JSON object, no markdown formatting:
|
|
40
|
+
{"relevant_indices": [2, 5, 0]}`}));function Ot(e,t,n){let r=re();if(!t||!e.projectPath||e.projectPath===r)return{isCrossProject:!1};if(process.env.USER_TYPE!==`ant`){let t=M(e);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${N([e.projectPath])} && claude --resume ${t}`,projectPath:e.projectPath}}if(n.some(t=>e.projectPath===t||e.projectPath.startsWith(t+I)))return{isCrossProject:!0,isSameRepoWorktree:!0,projectPath:e.projectPath};let i=M(e);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${N([e.projectPath])} && claude --resume ${i}`,projectPath:e.projectPath}}var kt=e((()=>{x(),P(),ge()}));export{ut as a,Dt as i,kt as n,yt as o,St as r,Ot as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";async function t(e,t,r){let i=r?r.trim().split(/\s+/):[],a=i[0]||`status`;return a===`attach`?(e("Use `claude daemon attach` from the CLI. Attach is not available inside the REPL.",{display:`system`}),null):(e((await n(async()=>{if(a===`bg`)await(await import(`./bg-FtpmvQuT.js`)).handleBgStart(i.slice(1));else{let{daemonMain:e}=await import(`./main-BafHJuKH.js`);await e([a,...i.slice(1)])}})).join(`
|
|
2
|
+
`)||`Done.`,{display:`system`}),null)}async function n(e){let t=[],n=console.log,r=console.error;console.log=(...e)=>t.push(e.map(String).join(` `)),console.error=(...e)=>t.push(e.map(String).join(` `));try{await e()}finally{console.log=n,console.error=r}return t}e((()=>{}))();export{t as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./datadog-DPkKCR8M.js";t();export{e as shutdownDatadog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./axios-DhfaybwJ.js";import{Ac as a,Ec as o,Fa as s,G as c,J as l,Na as u,Pr as d,br as f,ci as p,ct as m,lt as h,ri as g}from"./paths-DfGsIjPm.js";import{o as _,s as v}from"./log-DS97_rIr.js";import{createHash as y}from"crypto";function b(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}async function x(){if(N.length===0)return;let e=N;N=[];try{await r.post(E,e,{headers:{"Content-Type":`application/json`,"DD-API-KEY":D},timeout:A})}catch(e){v(e)}}function S(){P||(P=setTimeout(()=>{P=null,x()},T()).unref())}async function C(){P&&(clearTimeout(P),P=null),await x()}async function w(e,t){if(u()!==`firstParty`)return;let n=F;if(n===null&&(n=await I()),!(!n||!j.has(e)))try{let{envContext:n,...r}=await c({model:t.model,betas:t.betas}),i={...r,...n,...t,userBucket:R()};if(typeof i.toolName==`string`&&i.toolName.startsWith(`mcp__`)&&(i.toolName=`mcp`),process.env.USER_TYPE!==`ant`&&typeof i.model==`string`){let e=f(i.model.replace(/\[1m]$/i,``));i.model=e in g?e:`other`}if(typeof i.version==`string`&&(i.version=i.version.replace(/^(\d+\.\d+\.\d+-dev\.\d{8})\.t\d+\.sha[a-f0-9]+$/,`$1`)),i.status!==void 0&&i.status!==null){let e=String(i.status);i.http_status=e;let t=e.charAt(0);t>=`1`&&t<=`5`&&(i.http_status_range=`${t}xx`),delete i.status}let a=i,o={ddsource:`nodejs`,ddtags:[`event:${e}`,...M.filter(e=>a[e]!==void 0&&a[e]!==null).map(e=>`${b(e)}:${a[e]}`)].join(`,`),message:e,service:`claude-code`,hostname:`claude-code`,env:process.env.USER_TYPE};for(let[e,t]of Object.entries(i))t!=null&&(o[b(e)]=t);N.push(o),N.length>=k?(P&&(clearTimeout(P),P=null),x()):S()}catch(e){v(e)}}function T(){return parseInt(process.env.CLAUDE_CODE_DATADOG_FLUSH_INTERVAL_MS||``,10)||O}var E,D,O,k,A,j,M,N,P,F,I,L,R,z=e((()=>{i(),n(),a(),_(),d(),s(),p(),m(),l(),E=process.env.DATADOG_LOGS_ENDPOINT??``,D=process.env.DATADOG_API_KEY??``,O=15e3,k=100,A=5e3,j=new Set(`chrome_bridge_connection_succeeded.chrome_bridge_connection_failed.chrome_bridge_disconnected.chrome_bridge_tool_call_completed.chrome_bridge_tool_call_error.chrome_bridge_tool_call_started.chrome_bridge_tool_call_timeout.tengu_api_error.tengu_api_success.tengu_brief_mode_enabled.tengu_brief_mode_toggled.tengu_brief_send.tengu_cancel.tengu_compact_failed.tengu_exit.tengu_flicker.tengu_init.tengu_model_fallback_triggered.tengu_oauth_error.tengu_oauth_success.tengu_oauth_token_refresh_failure.tengu_oauth_token_refresh_success.tengu_oauth_token_refresh_lock_acquiring.tengu_oauth_token_refresh_lock_acquired.tengu_oauth_token_refresh_starting.tengu_oauth_token_refresh_completed.tengu_oauth_token_refresh_lock_releasing.tengu_oauth_token_refresh_lock_released.tengu_query_error.tengu_session_file_read.tengu_started.tengu_tool_use_error.tengu_tool_use_granted_in_prompt_permanent.tengu_tool_use_granted_in_prompt_temporary.tengu_tool_use_rejected_in_prompt.tengu_tool_use_success.tengu_uncaught_exception.tengu_unhandled_rejection.tengu_voice_recording_started.tengu_voice_toggled.tengu_team_mem_sync_pull.tengu_team_mem_sync_push.tengu_team_mem_sync_started.tengu_team_mem_entries_capped`.split(`.`)),M=[`arch`,`clientType`,`errorType`,`http_status_range`,`http_status`,`kairosActive`,`model`,`platform`,`provider`,`skillMode`,`subscriptionType`,`toolName`,`userBucket`,`userType`,`version`,`versionBase`],N=[],P=null,F=null,I=t(async()=>{if(h()||!E||!D)return F=!1,!1;try{return F=!0,!0}catch(e){return v(e),F=!1,!1}}),L=30,R=t(()=>{let e=o(),t=y(`sha256`).update(e).digest(`hex`);return parseInt(t.slice(0,8),16)%L})}));export{w as i,I as n,C as r,z as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as e,p as t}from"./debug-otxXY3j-.js";e();export{t as logForDebugging};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{a as n,c as r,n as i,o as a,s as o,t as s}from"./isObject-DaxDnPKm.js";import{d as c,f as l,l as u,n as d,t as f,u as p}from"./memoize-DNnuA2aU.js";import{n as m,s as h,u as ee}from"./envUtils-BWeoiL4Y.js";import{g as te}from"./client-_sjL0I7A.js";import{n as ne,t as re}from"./defineProperty-80gRi2ZW.js";import{i as ie,r as ae}from"./isSymbol-Dp3irZaY.js";import{Ai as oe,Bi as se,Ci as ce,Ct as le,Di as ue,Gi as de,Ji as fe,Ki as pe,Li as me,Ni as he,Oi as g,Pi as ge,Qi as _e,Ri as ve,Si as ye,Ui as be,Wi as xe,Zi as Se,_i as Ce,bi as we,cn as Te,gi as Ee,hi as De,ia as Oe,ki as ke,li as Ae,mi as je,pi as Me,qi as Ne,ra as Pe,ui as Fe,vi as Ie,wi as Le,xi as Re,yi as ze,zi as Be}from"./state-sIHsFpDu.js";import{t as Ve}from"./sdk-DEtgRZvI.js";import{a as He,n as Ue}from"./process-DMKLUQIO.js";import{homedir as We}from"os";import*as _ from"path";import{dirname as Ge,join as Ke}from"path";import*as v from"fs";import{closeSync as qe,fsyncSync as Je,openSync as Ye,writeFileSync as Xe}from"fs";import{appendFile as Ze,mkdir as Qe,open as y,readFile as $e,readdir as et,rename as tt,rm as nt,rmdir as rt,stat as it,symlink as at,unlink as ot}from"fs/promises";var b,st,ct=e((()=>{s(),b=Object.create,st=function(){function e(){}return function(t){if(!i(t))return{};if(b)return b(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function lt(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var ut=e((()=>{})),x,dt=e((()=>{l(),x=function(){try{var e=c(Object,`defineProperty`);return e({},``,{}),e}catch{}}()}));function ft(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var pt=e((()=>{}));function S(e,t,n){t==`__proto__`&&x?x(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var C=e((()=>{dt()}));function mt(e,t,n){var r=e[t];(!(ht.call(e,t)&&u(r,n))||n===void 0&&!(t in e))&&S(e,t,n)}var ht,gt=e((()=>{C(),p(),ht=Object.prototype.hasOwnProperty}));function w(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?S(n,s,c):mt(n,s,c)}return n}var T=e((()=>{gt(),C()}));function _t(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var vt=e((()=>{}));function yt(e){if(!i(e))return _t(e);var t=ye(e),n=[];for(var r in e)r==`constructor`&&(t||!bt.call(e,r))||n.push(r);return n}var bt,xt=e((()=>{s(),Re(),vt(),bt=Object.prototype.hasOwnProperty}));function E(e){return Ie(e)?ce(e,!0):yt(e)}var D=e((()=>{Le(),xt(),Ce()})),O,St=e((()=>{ze(),O=we(Object.getPrototypeOf,Object)}));function Ct(e,t){return e&&w(t,Ee(t),e)}var wt=e((()=>{T(),De()}));function Tt(e,t){return e&&w(t,E(t),e)}var Et=e((()=>{T(),D()}));function Dt(e,t){if(t)return e.slice();var n=e.length,r=jt?jt(n):new e.constructor(n);return e.copy(r),r}var Ot,kt,At,jt,Mt=e((()=>{o(),Ot=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kt=Ot&&typeof module==`object`&&module&&!module.nodeType&&module,At=kt&&kt.exports===Ot?r.Buffer:void 0,jt=At?At.allocUnsafe:void 0}));function Nt(e,t){return w(e,me(e),t)}var Pt=e((()=>{T(),ve()})),Ft,It=e((()=>{fe(),St(),ve(),Be(),Ft=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ne(t,me(e)),e=O(e);return t}:se}));function Lt(e,t){return w(e,Ft(e),t)}var Rt=e((()=>{T(),It()}));function zt(e){return be(e,E,Ft)}var Bt=e((()=>{xe(),It(),D()}));function Vt(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Ht.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var Ht,Ut=e((()=>{Ht=Object.prototype.hasOwnProperty}));function Wt(e){var t=new e.constructor(e.byteLength);return new Se(t).set(new Se(e)),t}var k=e((()=>{_e()}));function Gt(e,t){var n=t?Wt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Kt=e((()=>{k()}));function qt(e){var t=new e.constructor(e.source,Jt.exec(e));return t.lastIndex=e.lastIndex,t}var Jt,Yt=e((()=>{Jt=/\w*$/}));function Xt(e){return j?Object(j.call(e)):{}}var A,j,Zt=e((()=>{a(),A=n?n.prototype:void 0,j=A?A.valueOf:void 0}));function Qt(e,t){var n=t?Wt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var $t=e((()=>{k()}));function en(e,t,n){var r=e.constructor;switch(t){case un:return Wt(e);case tn:case nn:return new r(+e);case dn:return Gt(e,n);case fn:case pn:case mn:case hn:case gn:case _n:case vn:case yn:case bn:return Qt(e,n);case rn:return new r;case an:case cn:return new r(e);case on:return qt(e);case sn:return new r;case ln:return Xt(e)}}var tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn=e((()=>{k(),Kt(),Yt(),Zt(),$t(),tn=`[object Boolean]`,nn=`[object Date]`,rn=`[object Map]`,an=`[object Number]`,on=`[object RegExp]`,sn=`[object Set]`,cn=`[object String]`,ln=`[object Symbol]`,un=`[object ArrayBuffer]`,dn=`[object DataView]`,fn=`[object Float32Array]`,pn=`[object Float64Array]`,mn=`[object Int8Array]`,hn=`[object Int16Array]`,gn=`[object Int32Array]`,_n=`[object Uint8Array]`,vn=`[object Uint8ClampedArray]`,yn=`[object Uint16Array]`,bn=`[object Uint32Array]`}));function Sn(e){return typeof e.constructor==`function`&&!ye(e)?st(O(e)):{}}var Cn=e((()=>{ct(),St(),Re()}));function wn(e){return ie(e)&&Ae(e)==Tn}var Tn,En=e((()=>{Fe(),ae(),Tn=`[object Map]`})),M,Dn,On=e((()=>{En(),oe(),ue(),M=g&&g.isMap,Dn=M?ke(M):wn}));function kn(e){return ie(e)&&Ae(e)==An}var An,jn=e((()=>{Fe(),ae(),An=`[object Set]`})),N,Mn,Nn=e((()=>{jn(),oe(),ue(),N=g&&g.isSet,Mn=N?ke(N):kn}));function P(e,t,n,r,a,o){var s,c=t&Pn,l=t&Fn,u=t&In;if(n&&(s=a?n(e,r,a,o):n(e)),s!==void 0)return s;if(!i(e))return e;var d=pe(e);if(d){if(s=Vt(e),!c)return lt(e,s)}else{var f=Ae(e),p=f==I||f==Vn;if(ge(e))return Dt(e,c);if(f==L||f==F||p&&!a){if(s=l||p?{}:Sn(e),!c)return l?Lt(e,Tt(s,e)):Nt(e,Ct(s,e))}else{if(!R[f])return a?e:{};s=en(e,f,c)}}o||(o=new Pe);var m=o.get(e);if(m)return m;o.set(e,s),Mn(e)?e.forEach(function(r){s.add(P(r,t,n,r,e,o))}):Dn(e)&&e.forEach(function(r,i){s.set(i,P(r,t,n,i,e,o))});var h=d?void 0:(u?l?zt:Me:l?E:Ee)(e);return ft(h||e,function(r,i){h&&(i=r,r=e[i]),mt(s,i,P(r,t,n,i,e,o))}),s}var Pn,Fn,In,F,Ln,Rn,zn,Bn,I,Vn,Hn,Un,L,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,R,or=e((()=>{Oe(),pt(),gt(),wt(),Et(),Mt(),ut(),Pt(),Rt(),je(),Bt(),Fe(),Ut(),xn(),Cn(),de(),he(),On(),s(),Nn(),De(),D(),Pn=1,Fn=2,In=4,F=`[object Arguments]`,Ln=`[object Array]`,Rn=`[object Boolean]`,zn=`[object Date]`,Bn=`[object Error]`,I=`[object Function]`,Vn=`[object GeneratorFunction]`,Hn=`[object Map]`,Un=`[object Number]`,L=`[object Object]`,Wn=`[object RegExp]`,Gn=`[object Set]`,Kn=`[object String]`,qn=`[object Symbol]`,Jn=`[object WeakMap]`,Yn=`[object ArrayBuffer]`,Xn=`[object DataView]`,Zn=`[object Float32Array]`,Qn=`[object Float64Array]`,$n=`[object Int8Array]`,er=`[object Int16Array]`,tr=`[object Int32Array]`,nr=`[object Uint8Array]`,rr=`[object Uint8ClampedArray]`,ir=`[object Uint16Array]`,ar=`[object Uint32Array]`,R={},R[F]=R[Ln]=R[Yn]=R[Xn]=R[Rn]=R[zn]=R[Zn]=R[Qn]=R[$n]=R[er]=R[tr]=R[Hn]=R[Un]=R[L]=R[Wn]=R[Gn]=R[Kn]=R[qn]=R[nr]=R[rr]=R[ir]=R[ar]=!0,R[Bn]=R[I]=R[Jn]=!1}));function sr(e){return P(e,cr|lr)}var cr,lr,ur=e((()=>{or(),cr=1,lr=4}));function dr(e){return z.add(e),()=>z.delete(e)}async function fr(){await Promise.all(Array.from(z).map(e=>e()))}var z,pr=e((()=>{z=new Set}));function mr({writeFn:e,flushIntervalMs:t=1e3,maxBufferSize:n=100,maxBufferBytes:r=1/0,immediateMode:i=!1}){let a=[],o=0,s=null,c=null;function l(){s&&(clearTimeout(s),s=null)}function u(){c&&(e(c.join(``)),c=null),a.length!==0&&(e(a.join(``)),a=[],o=0,l())}function d(){s||(s=setTimeout(u,t))}function f(){if(c){c.push(...a),a=[],o=0,l();return}let t=a;a=[],o=0,l(),c=t,setImmediate(()=>{let t=c;c=null,t&&e(t.join(``))})}return{write(t){if(i){e(t);return}a.push(t),o+=t.length,d(),(a.length>=n||o>=r)&&f()},flush:u,dispose(){u()}}}var hr=e((()=>{}));function gr(e){let t=[],n=e.match(/^MCP server ["']([^"']+)["']/);if(n&&n[1])t.push(`mcp`),t.push(n[1].toLowerCase());else{let n=e.match(/^([^:[]+):/);n&&n[1]&&t.push(n[1].trim().toLowerCase())}let r=e.match(/^\[([^\]]+)]/);r&&r[1]&&t.push(r[1].trim().toLowerCase()),e.toLowerCase().includes(`1p event:`)&&t.push(`1p`);let i=e.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i&&i[1]){let e=i[1].trim().toLowerCase();e.length<30&&!e.includes(` `)&&t.push(e)}return Array.from(new Set(t))}function _r(e,t){return t?e.length===0?!1:t.isExclusive?!e.some(e=>t.exclude.includes(e)):e.some(e=>t.include.includes(e)):!0}function vr(e,t){return t?_r(gr(e),t):!0}var yr,br=e((()=>{f(),yr=d(e=>{if(!e||e.trim()===``)return null;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length===0)return null;let n=t.some(e=>e.startsWith(`!`)),r=t.some(e=>!e.startsWith(`!`));if(n&&r)return null;let i=t.map(e=>e.replace(/^!/,``).toLowerCase());return{include:n?[]:i,exclude:n?i:[],isExclusive:n}})}));function xr(e){return e instanceof V||e instanceof te||e instanceof Error&&e.name===`AbortError`}function Sr(e,t){return e instanceof Error&&e.message===t}function Cr(e){return e instanceof Error?e:Error(String(e))}function wr(e){return e instanceof Error?e.message:String(e)}function B(e){if(e&&typeof e==`object`&&`code`in e&&typeof e.code==`string`)return e.code}function Tr(e){return B(e)===`ENOENT`}function Er(e){if(e&&typeof e==`object`&&`path`in e&&typeof e.path==`string`)return e.path}function Dr(e,t=5){if(!(e instanceof Error))return String(e);if(!e.stack)return e.message;let n=e.stack.split(`
|
|
2
|
+
`),r=n[0]??e.message,i=n.slice(1).filter(e=>e.trim().startsWith(`at `));return i.length<=t?e.stack:[r,...i.slice(0,t)].join(`
|
|
3
|
+
`)}function Or(e){let t=B(e);return t===`ENOENT`||t===`EACCES`||t===`EPERM`||t===`ENOTDIR`||t===`ELOOP`}function kr(e){let t=wr(e);if(!e||typeof e!=`object`||!(`isAxiosError`in e)||!e.isAxiosError)return{kind:`other`,message:t};let n=e,r=n.response?.status;return r===401||r===403?{kind:`auth`,status:r,message:t}:n.code===`ECONNABORTED`?{kind:`timeout`,status:r,message:t}:n.code===`ECONNREFUSED`||n.code===`ENOTFOUND`?{kind:`network`,status:r,message:t}:{kind:`http`,status:r,message:t}}var Ar,jr,V,Mr,Nr,Pr,Fr,Ir=e((()=>{Ve(),ne(),Ar=class extends Error{constructor(e){super(e),this.name=this.constructor.name}},jr=class extends Error{},V=class extends Error{constructor(e){super(e),this.name=`AbortError`}},Mr=class extends Error{constructor(e,t,n){super(e),re(this,`filePath`,void 0),re(this,`defaultConfig`,void 0),this.name=`ConfigParseError`,this.filePath=t,this.defaultConfig=n}},Nr=class extends Error{constructor(e,t,n,r){super(`Shell command failed`),this.stdout=e,this.stderr=t,this.code=n,this.interrupted=r,this.name=`ShellError`}},Pr=class extends Error{constructor(e,t){super(e),this.formattedMessage=t,this.name=`TeleportOperationError`}},Fr=class extends Error{constructor(e,t){super(e),re(this,`telemetryMessage`,void 0),this.name=`TelemetrySafeError`,this.telemetryMessage=t??e}}}));function Lr(){return Vr}function Rr(e,t,n){return H`JSON.stringify(${e})`,JSON.stringify(e,t,n)}function zr(e,t){return H`structuredClone(${e})`,structuredClone(e,t)}function Br(e,t,n){if(H`fs.writeFileSync(${e}, ${t})`,typeof n==`object`&&n&&`flush`in n&&n.flush===!0){let r=typeof n==`object`&&`encoding`in n?n.encoding:void 0,i=typeof n==`object`&&`mode`in n?n.mode:void 0,a;try{a=Ye(e,`w`,i),Xe(a,t,{encoding:r??void 0}),Je(a)}finally{a!==void 0&&qe(a)}}else Xe(e,t,n)}var Vr,H,Hr,Ur=e((()=>{Te(),hi(),(()=>{let e=process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;if(e!==void 0){let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t}return process.env.USER_TYPE===`ant`?300:1/0})(),Vr={[Symbol.dispose](){}},H=Lr,Hr=(e,t)=>(H`JSON.parse(${e})`,t===void 0?JSON.parse(e):JSON.parse(e,t))}));function Wr(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}var Gr=e((()=>{}));function Kr(e,t){if(t.startsWith(`//`)||t.startsWith(`\\\\`))return{resolvedPath:t,isSymlink:!1,isCanonical:!1};try{let n=e.lstatSync(t);if(n.isFIFO()||n.isSocket()||n.isCharacterDevice()||n.isBlockDevice())return{resolvedPath:t,isSymlink:!1,isCanonical:!1};let r=e.realpathSync(t);return{resolvedPath:r,isSymlink:r!==t,isCanonical:!0}}catch{return{resolvedPath:t,isSymlink:!1,isCanonical:!1}}}function qr(e,t,n){let{resolvedPath:r}=Kr(e,t);return n.has(r)?!0:(n.add(r),!1)}function Jr(e,t){let n=t,r=[];for(;n!==_.dirname(n);){let t;try{t=e.lstatSync(n)}catch{r.unshift(_.basename(n)),n=_.dirname(n);continue}if(t.isSymbolicLink())try{let t=e.realpathSync(n);return r.length===0?t:_.join(t,...r)}catch{let t=e.readlinkSync(n),i=_.isAbsolute(t)?t:_.resolve(_.dirname(n),t);return r.length===0?i:_.join(i,...r)}try{let t=e.realpathSync(n);if(t!==n)return r.length===0?t:_.join(t,...r)}catch{}return}}function Yr(e){let t=e;t===`~`?t=We().normalize(`NFC`):t.startsWith(`~/`)&&(t=_.join(We().normalize(`NFC`),t.slice(2)));let n=new Set,r=U();if(n.add(t),t.startsWith(`//`)||t.startsWith(`\\\\`))return Array.from(n);try{let e=t,i=new Set;for(let a=0;a<40&&!i.has(e);a++){if(i.add(e),!r.existsSync(e)){if(e===t){let e=Jr(r,t);e!==void 0&&n.add(e)}break}let a=r.lstatSync(e);if(a.isFIFO()||a.isSocket()||a.isCharacterDevice()||a.isBlockDevice()||!a.isSymbolicLink())break;let o=r.readlinkSync(e),s=_.isAbsolute(o)?o:_.resolve(_.dirname(e),o);n.add(s),e=s}}catch{}let{resolvedPath:i,isSymlink:a}=Kr(r,t);return a&&i!==t&&n.add(i),Array.from(n)}function U(){return ei}async function Xr(e,t,n){try{var r=Wr();let i=r.a(await y(e,`r`)),a=(await i.stat()).size;if(a<=t)return null;let o=Math.min(a-t,n),s=Buffer.allocUnsafe(o),c=0;for(;c<o;){let{bytesRead:e}=await i.read(s,c,o-c,t+c);if(e===0)break;c+=e}return{content:s.toString(`utf8`,0,c),bytesRead:c,bytesTotal:a}}catch(e){r.e=e}finally{await r.d()}}async function Zr(e,t){try{var n=Wr();let r=n.a(await y(e,`r`)),i=(await r.stat()).size;if(i===0)return{content:``,bytesRead:0,bytesTotal:0};let a=Math.max(0,i-t),o=i-a,s=Buffer.allocUnsafe(o),c=0;for(;c<o;){let{bytesRead:e}=await r.read(s,c,o-c,a+c);if(e===0)break;c+=e}return{content:s.toString(`utf8`,0,c),bytesRead:c,bytesTotal:i}}catch(e){n.e=e}finally{await n.d()}}async function*Qr(e){let t=1024*4,n=await y(e,`r`);try{let e=(await n.stat()).size,r=Buffer.alloc(0),i=Buffer.alloc(t);for(;e>0;){let a=Math.min(t,e);e-=a,await n.read(i,0,a,e);let o=Buffer.concat([i.subarray(0,a),r]),s=o.indexOf(10);if(s===-1){r=o;continue}r=Buffer.from(o.subarray(0,s));let c=o.toString(`utf8`,s+1).split(`
|
|
4
|
+
`);for(let e=c.length-1;e>=0;e--){let t=c[e];t&&(yield t)}}r.length>0&&(yield r.toString(`utf8`))}finally{await n.close()}}var $r,ei,ti=e((()=>{Ir(),Ur(),Gr(),$r={cwd(){return process.cwd()},existsSync(e){return H`fs.existsSync(${e})`,v.existsSync(e)},async stat(e){return it(e)},async readdir(e){return et(e,{withFileTypes:!0})},async unlink(e){return ot(e)},async rmdir(e){return rt(e)},async rm(e,t){return nt(e,t)},async mkdir(e,t){try{await Qe(e,{recursive:!0,...t})}catch(e){if(B(e)!==`EEXIST`)throw e}},async readFile(e,t){return $e(e,{encoding:t.encoding})},async rename(e,t){return tt(e,t)},statSync(e){return H`fs.statSync(${e})`,v.statSync(e)},lstatSync(e){return H`fs.lstatSync(${e})`,v.lstatSync(e)},readFileSync(e,t){return H`fs.readFileSync(${e})`,v.readFileSync(e,{encoding:t.encoding})},readFileBytesSync(e){return H`fs.readFileBytesSync(${e})`,v.readFileSync(e)},readSync(e,t){H`fs.readSync(${e}, ${t.length} bytes)`;let n;try{n=v.openSync(e,`r`);let r=Buffer.alloc(t.length);return{buffer:r,bytesRead:v.readSync(n,r,0,t.length,0)}}finally{n&&v.closeSync(n)}},appendFileSync(e,t,n){if(H`fs.appendFileSync(${e}, ${t.length} chars)`,n?.mode!==void 0)try{let r=v.openSync(e,`ax`,n.mode);try{v.appendFileSync(r,t)}finally{v.closeSync(r)}return}catch(e){if(B(e)!==`EEXIST`)throw e}v.appendFileSync(e,t)},copyFileSync(e,t){H`fs.copyFileSync(${e} → ${t})`,v.copyFileSync(e,t)},unlinkSync(e){H`fs.unlinkSync(${e})`,v.unlinkSync(e)},renameSync(e,t){H`fs.renameSync(${e} → ${t})`,v.renameSync(e,t)},linkSync(e,t){H`fs.linkSync(${e} → ${t})`,v.linkSync(e,t)},symlinkSync(e,t,n){H`fs.symlinkSync(${e} → ${t})`,v.symlinkSync(e,t,n)},readlinkSync(e){return H`fs.readlinkSync(${e})`,v.readlinkSync(e)},realpathSync(e){return H`fs.realpathSync(${e})`,v.realpathSync(e).normalize(`NFC`)},mkdirSync(e,t){H`fs.mkdirSync(${e})`;let n={recursive:!0};t?.mode!==void 0&&(n.mode=t.mode);try{v.mkdirSync(e,n)}catch(e){if(B(e)!==`EEXIST`)throw e}},readdirSync(e){return H`fs.readdirSync(${e})`,v.readdirSync(e,{withFileTypes:!0})},readdirStringSync(e){return H`fs.readdirStringSync(${e})`,v.readdirSync(e)},isDirEmptySync(e){return H`fs.isDirEmptySync(${e})`,this.readdirSync(e).length===0},rmdirSync(e){H`fs.rmdirSync(${e})`,v.rmdirSync(e)},rmSync(e,t){H`fs.rmSync(${e})`,v.rmSync(e,t)},createWriteStream(e){return v.createWriteStream(e)},async readFileBytes(e,t){if(t===void 0)return $e(e);let n=await y(e,`r`);try{let{size:e}=await n.stat(),r=Math.min(e,t),i=Buffer.allocUnsafe(r),a=0;for(;a<r;){let{bytesRead:e}=await n.read(i,a,r-a,a);if(e===0)break;a+=e}return a<r?i.subarray(0,a):i}finally{await n.close()}}},ei=$r})),ni=t({enableDebugLogging:()=>ri,flushDebugLogs:()=>ui,getDebugFilePath:()=>X,getDebugFilter:()=>J,getDebugLogPath:()=>W,getHasFormattedOutput:()=>oi,getMinDebugLogLevel:()=>K,isDebugMode:()=>q,isDebugToStdErr:()=>Y,logAntError:()=>fi,logForDebugging:()=>di,setHasFormattedOutput:()=>ai});function ri(){let e=q()||process.env.USER_TYPE===`ant`;return pi=!0,q.cache.clear?.(),e}function ii(e){return process.env.USER_TYPE!==`ant`&&!q()||typeof process>`u`||process.versions===void 0||process.versions.node===void 0?!1:vr(e,J())}function ai(e){Z=e}function oi(){return Z}async function si(e,t,n,r){e&&await Qe(t,{recursive:!0}).catch(()=>{}),await Ze(n,r),mi()}function ci(){}function li(){if(!Q){let e=null;Q=mr({writeFn:t=>{let n=W(),r=Ge(n),i=e!==r;if(e=r,q()){if(i)try{U().mkdirSync(r)}catch{}U().appendFileSync(n,t),mi();return}$=$.then(si.bind(null,i,r,n,t)).catch(ci)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:q()}),dr(async()=>{Q?.dispose(),await $})}return Q}async function ui(){Q?.flush(),await $}function di(e,{level:t}={level:`debug`}){if(G[t]<G[K()]||!ii(e))return;Z&&e.includes(`
|
|
5
|
+
`)&&(e=Rr(e));let n=`${new Date().toISOString()} [${t.toUpperCase()}] ${e.trim()}\n`;if(Y()){He(n);return}li().write(n)}function W(){return X()??process.env.CLAUDE_CODE_DEBUG_LOGS_DIR??Ke(m(),`debug`,`${le()}.txt`)}function fi(e,t){process.env.USER_TYPE===`ant`&&t instanceof Error&&t.stack&&di(`[ANT-ONLY] ${e} stack trace:\n${t.stack}`,{level:`error`})}var G,K,pi,q,J,Y,X,Z,Q,$,mi,hi=e((()=>{f(),Te(),hr(),pr(),br(),h(),ti(),Ue(),Ur(),G={verbose:0,debug:1,info:2,warn:3,error:4},K=d(()=>{let e=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return e&&Object.hasOwn(G,e)?e:`debug`}),pi=!1,q=d(()=>pi||ee(process.env.DEBUG)||ee(process.env.DEBUG_SDK)||process.argv.includes(`--debug`)||process.argv.includes(`-d`)||Y()||process.argv.some(e=>e.startsWith(`--debug=`))||X()!==null),J=d(()=>{let e=process.argv.find(e=>e.startsWith(`--debug=`));return e?yr(e.substring(8)):null}),Y=d(()=>process.argv.includes(`--debug-to-stderr`)),X=d(()=>{for(let e=0;e<process.argv.length;e++){let t=process.argv[e];if(t.startsWith(`--debug-file=`))return t.substring(13);if(t===`--debug-file`&&e+1<process.argv.length)return process.argv[e+1]}return null}),Z=!1,Q=null,$=Promise.resolve(),mi=d(async()=>{try{let e=W(),t=Ke(Ge(e),`latest`);await ot(t).catch(()=>{}),await at(e,t)}catch{}})}));export{fr as $,Br as A,B,Wr as C,dt as Ct,Hr as D,Ur as E,Nr as F,Tr as G,Sr as H,Fr as I,Cr as J,Or as K,Pr as L,Ar as M,Mr as N,Rr as O,jr as P,dr as Q,kr as R,Zr as S,x as St,zr as T,ut as Tt,Ir as U,Er as V,xr as W,hr as X,mr as Y,pr as Z,ti as _,T as _t,J as a,Cn as at,Qr as b,S as bt,K as c,zt as ct,Y as d,Mt as dt,sr as et,fi as f,O as ft,Yr as g,w as gt,U as h,E as ht,X as i,Sn as it,V as j,H as k,hi as l,Bt as lt,ai as m,D as mt,ri as n,P as nt,W as o,Qt as ot,di as p,St as pt,Dr as q,ui as r,or as rt,oi as s,$t as st,ni as t,ur as tt,q as u,Dt as ut,qr as v,mt as vt,Gr as w,lt as wt,Kr as x,C as xt,Xr as y,gt as yt,wr as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{E as n,O as r,U as i,l as a,p as o,z as s}from"./debug-otxXY3j-.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";var u=t({setCseShimGate:()=>d,toCompatSessionId:()=>f,toInfraSessionId:()=>p});function d(e){m=e}function f(e){return!e.startsWith(`cse_`)||m&&!m()?e:`session_`+e.slice(4)}function p(e){return e.startsWith(`session_`)?`cse_`+e.slice(8):e}var m,h=e((()=>{}));function g(e){return e.replace(w,(e,t,n)=>n.length<T?`"${t}":"[REDACTED]"`:`"${t}":"${`${n.slice(0,8)}...${n.slice(-4)}`}"`)}function _(e){let t=e.replace(/\n/g,`\\n`);return t.length<=C?t:t.slice(0,C)+`... (${t.length} chars)`}function v(e){let t=g(typeof e==`string`?e:r(e));return t.length<=C?t:t.slice(0,C)+`... (${t.length} chars)`}function y(e){let t=s(e);if(e&&typeof e==`object`&&`response`in e){let n=e.response;if(n?.data&&typeof n.data==`object`){let e=n.data,r=typeof e.message==`string`?e.message:typeof e.error==`object`&&e.error&&`message`in e.error&&typeof e.error.message==`string`?e.error.message:void 0;if(r)return`${t}: ${r}`}}return t}function b(e){if(e&&typeof e==`object`&&`response`in e&&e.response&&typeof e.response.status==`number`)return e.response.status}function x(e){if(!(!e||typeof e!=`object`)){if(`message`in e&&typeof e.message==`string`)return e.message;if(`error`in e&&e.error!==null&&typeof e.error==`object`&&`message`in e.error&&typeof e.error.message==`string`)return e.error.message}}function S(e,t,n){t&&o(t),l(`tengu_bridge_repl_skipped`,{reason:e,...n!==void 0&&{v2:n}})}var C,w,T,E=e((()=>{c(),a(),i(),n(),C=2e3,w=RegExp(`"(${[`session_ingress_token`,`environment_secret`,`access_token`,`secret`,`token`].join(`|`)})"\\s*:\\s*"([^"]*)"`,`g`),T=16}));export{b as a,h as c,f as d,p as f,x as i,u as l,_ as n,E as o,y as r,S as s,v as t,d as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./DesktopHandoff-Cy89ZB_9.js";async function a(e){return(0,o.jsx)(i,{onDone:e})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{i as r,o as i,t as a}from"./cliLaunch-8aeIk2ts.js";import{dirname as o}from"path";import{closeSync as s,createReadStream as c,mkdirSync as l,openSync as u,readSync as d,statSync as f,unwatchFile as p,watchFile as m}from"fs";import{createInterface as h}from"readline";async function g(e){let t=0;try{if(t=f(e).size,t>0){let n=h({input:c(e,{start:0,end:t-1})});for await(let e of n)process.stdout.write(e+`
|
|
2
|
+
`)}}catch{}return console.log(`
|
|
3
|
+
[tail] Watching for new output... (Ctrl+C to detach)
|
|
4
|
+
`),new Promise(n=>{let r=()=>{p(e),process.removeListener(`SIGINT`,r),console.log(`
|
|
5
|
+
[tail] Detached from session.`),n()};process.on(`SIGINT`,r),m(e,{interval:300},()=>{try{let n=f(e);if(n.size<=t)return;let r=u(e,`r`);try{let e=Buffer.alloc(n.size-t);d(r,e,0,e.length,t),process.stdout.write(e),t=n.size}finally{s(r)}}catch{}})})}var _=e((()=>{})),v;e((()=>{r(),_(),t(),v=class{constructor(){n(this,`name`,`detached`),n(this,`supportsInteractiveInput`,!1)}async available(){return!0}async start(e){l(o(e.logPath),{recursive:!0});let t=u(e.logPath,`a`),n=i(a(e.args,{env:{...e.env,CLAUDE_CODE_SESSION_KIND:`bg`,CLAUDE_CODE_SESSION_NAME:e.sessionName,CLAUDE_CODE_SESSION_LOG:e.logPath}}),{detached:!0,stdio:[`ignore`,t,t],cwd:e.cwd});return n.unref(),s(t),{pid:n.pid??0,sessionName:e.sessionName,logPath:e.logPath,engineUsed:`detached`}}async attach(e){if(!e.logPath)throw Error(`Session ${e.sessionId} has no log path.`);await g(e.logPath)}}}))();export{v as DetachedEngine};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,p as n}from"./debug-otxXY3j-.js";import{n as r,t as i}from"./cwd--iizewsn.js";import{m as a,v as o}from"./git-DayFjsvj.js";function s(){m.clear()}async function c(){let e=await l();return!e||e.host!==`github.com`?null:`${e.owner}/${e.name}`}async function l(){let e=i();if(m.has(e))return m.get(e)??null;try{let t=await a();if(n(`Git remote URL: ${t}`),!t)return n(`No git remote URL found`),m.set(e,null),null;let r=d(t);return n(`Parsed repository: ${r?`${r.host}/${r.owner}/${r.name}`:null} from URL: ${t}`),m.set(e,r),r}catch(t){return n(`Error detecting repository: ${t}`),m.set(e,null),null}}function u(){let e=m.get(i());return!e||e.host!==`github.com`?null:`${e.owner}/${e.name}`}function d(e){let t=e.trim(),n=t.match(/^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/);if(n?.[1]&&n[2]&&n[3])return p(n[1])?{host:n[1],owner:n[2],name:n[3]}:null;let r=t.match(/^(https?|ssh|git):\/\/(?:[^@]+@)?([^/:]+(?::\d+)?)\/([^/]+)\/([^/]+?)(?:\.git)?$/);if(r?.[1]&&r[2]&&r[3]&&r[4]){let e=r[1],t=r[2],n=t.split(`:`)[0]??``;return p(n)?{host:e===`https`||e===`http`?t:n,owner:r[3],name:r[4]}:null}return null}function f(e){let t=e.trim(),r=d(t);if(r)return r.host===`github.com`?`${r.owner}/${r.name}`:null;if(!t.includes(`://`)&&!t.includes(`@`)&&t.includes(`/`)){let e=t.split(`/`);if(e.length===2&&e[0]&&e[1]){let t=e[1].replace(/\.git$/,``);return`${e[0]}/${t}`}}return n(`Could not parse repository from: ${t}`),null}function p(e){if(!e.includes(`.`))return!1;let t=e.split(`.`).pop();return t?/^[a-zA-Z]+$/.test(t):!1}var m,h=e((()=>{r(),t(),o(),m=new Map}));export{h as a,u as i,c as n,f as o,l as r,d as s,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,o as t,s as n}from"./detectRepository-CSN3yxkq.js";e();export{t as parseGitHubRepository,n as parseGitRemote};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{a as t,n}from"./env-BH-OBzcA.js";import{r,t as i}from"./execFileNoThrow-B_aZH_GP.js";import{c as a,o}from"./constants-41VpZw2G.js";function s(){return!!g}async function c(){return v===null&&(v=!!g),v}function l(){return _||null}async function u(){return(await i(o,[`-V`])).code===0}async function d(){return process.env.WT_SESSION?!0:(await i(`where.exe`,[`wt.exe`])).code===0}function f(){if(y!==null)return y;let e=process.env.TERM_PROGRAM,t=!!process.env.ITERM_SESSION_ID,r=n.terminal===`iTerm.app`;return y=e===`iTerm.app`||t||r,y}function p(){return b===null&&(b=!!process.env.WT_SESSION),b}async function m(){return(await i(`it2`,[`session`,`list`])).code===0}function h(){v=null,y=null,b=null}var g,_,v,y,b,x,S=e((()=>{t(),r(),a(),g=process.env.TMUX,_=process.env.TMUX_PANE,v=null,y=null,b=null,x=`it2`}));export{p as a,m as c,h as d,f as i,u as l,l as n,c as o,S as r,s,x as t,d as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./detection-BPPZCanO.js";s();export{l as IT2_COMMAND,a as getLeaderPaneId,r as isInITerm2,e as isInWindowsTerminal,o as isInsideTmux,c as isInsideTmuxSync,t as isIt2CliAvailable,i as isTmuxAvailable,u as isWindowsTerminalAvailable,n as resetDetectionCache};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./jsx-runtime-D-D469L8.js";var n,r;e((()=>{n=t(),r=async(e,t)=>{let{DiffDialog:r}=await import(`./DiffDialog-BhqgxA7o.js`);return(0,n.jsx)(r,{messages:t.messages,onDone:e})}}))();export{r as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{_ as t,h as n}from"./debug-otxXY3j-.js";import{n as r,t as i}from"./cwd--iizewsn.js";import{o as a,s as o}from"./log-DS97_rIr.js";import{n as s,t as c}from"./index.min-BJnb9GQI.js";import{i as l,n as u}from"./path-nCzt96pE.js";import{basename as d,dirname as f,join as p,sep as m}from"path";function h(e,t){if(!e)return{directory:t||i(),prefix:``};let n=u(e,t);return e.endsWith(`/`)||e.endsWith(m)?{directory:n,prefix:``}:{directory:f(n),prefix:d(e)}}async function g(e){let t=C.get(e);if(t)return t;try{let t=(await n().readdir(e)).filter(e=>e.isDirectory()&&!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:`directory`})).slice(0,100);return C.set(e,t),t}catch(e){return o(e),[]}}async function _(e,t={}){let{basePath:n=i(),maxResults:r=10}=t,{directory:a,prefix:o}=h(e,n),s=await g(a),c=o.toLowerCase();return s.filter(e=>e.name.toLowerCase().startsWith(c)).slice(0,r).map(e=>({id:e.path,displayText:e.name+`/`,description:`directory`,metadata:{type:`directory`}}))}function v(e){return e.startsWith(`~/`)||e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`)||e===`~`||e===`.`||e===`..`}async function y(e,t=!1){let r=`${e}:${t}`,i=w.get(r);if(i)return i;try{let i=(await n().readdir(e)).filter(e=>t||!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:t.isDirectory()?`directory`:`file`})).sort((e,t)=>e.type===`directory`&&t.type!==`directory`?-1:e.type!==`directory`&&t.type===`directory`?1:e.name.localeCompare(t.name)).slice(0,100);return w.set(r,i),i}catch(e){return o(e),[]}}async function b(e,t={}){let{basePath:n=i(),maxResults:r=10,includeFiles:a=!0,includeHidden:o=!1}=t,{directory:s,prefix:c}=h(e,n),l=await y(s,o),u=c.toLowerCase(),d=l.filter(e=>!a&&e.type===`file`?!1:e.name.toLowerCase().startsWith(u)).slice(0,r),f=e.includes(`/`)||e.includes(m),p=``;if(f){let t=e.lastIndexOf(`/`),n=e.lastIndexOf(m),r=Math.max(t,n);p=e.substring(0,r+1)}return(p.startsWith(`./`)||p.startsWith(`.`+m))&&(p=p.slice(2)),d.map(e=>{let t=p+e.name;return{id:t,displayText:e.type===`directory`?t+`/`:t,metadata:{type:e.type}}})}var x,S,C,w,T=e((()=>{s(),r(),t(),a(),l(),x=500,S=300*1e3,C=new c({max:x,ttl:S}),w=new c({max:x,ttl:S})}));export{v as i,b as n,T as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./jsx-runtime-D-D469L8.js";import{n,t as r}from"./Doctor-Ts5k8hn1.js";var i,a;e((()=>{n(),i=t(),a=(e,t,n)=>Promise.resolve((0,i.jsx)(r,{onDone:e}))}))();export{a as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./earlyInput-BFcdUMaX.js";export{e as startCapturingEarlyInput};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,F as r,Rn as i,Vt as a,b as o,nt as s,t as c,x as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,oo as f}from"./paths-DfGsIjPm.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{Aj as h,Cj as g,Ej as _,Lj as v,fC as y,kj as b,lC as x,uC as S,wj as C}from"./loadAgentsDir-Br5fGLLI.js";import{t as w}from"./useKeybinding-FsOnjW6T.js";import{n as T,t as E}from"./useMainLoopModel-CaQLIr1V.js";function D(e){return typeof e==`string`&&e!==`ultracode`&&A.includes(e)}function O(e){if(e!=null&&typeof e!=`number`&&D(e))return e}function ee(e){let t=A.indexOf(e);return t<=0?A[0]:A[t-1]}function te(e){let t=A.indexOf(e);return t===-1||t>=A.length-1?A[A.length-1]:A[t+1]}function k(e){return e===`ultracode`}function ne(e){let t=O(e.envOverride);return t===void 0?e.displayed:t}function re(e,t){if(k(e))return{kind:`ultracode-hint`,message:j};let n=t(e);return{kind:`apply`,message:n.message,effortUpdate:n.effortUpdate}}var A,j,M,ie=e((()=>{A=[`low`,`medium`,`high`,`xhigh`,`max`,`ultracode`],j=`ultracode is not an effort level. Use /ultracode <context> to start a multi-agent workflow.`,M=`Effort unchanged.`}));function ae(e){let[t,r]=n(e?N:null);return[t,e?r:0]}var N,oe=e((()=>{c(),N=60}));function se(e){if(!/^#[0-9a-fA-F]{6}$/.test(e))return{h:0,s:0,l:0};let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;if(s===0)return{h:0,s:0,l:o};let c=s/(1-Math.abs(2*o-1)),l;return l=i===t?60*((n-r)/s%6):i===n?60*((r-t)/s+2):60*((t-n)/s+4),l<0&&(l+=360),{h:l,s:c,l:o}}function ce(e,t,n){let r=(e%360+360)%360,i=(1-Math.abs(2*n-1))*t,a=r/60,o=i*(1-Math.abs(a%2-1)),s=0,c=0,l=0;a<1?(s=i,c=o):a<2?(s=o,c=i):a<3?(c=i,l=o):a<4?(c=o,l=i):a<5?(s=o,l=i):(s=i,l=o);let u=n-i/2,d=e=>Math.round((e+u)*255).toString(16).padStart(2,`0`);return`#${d(s)}${d(c)}${d(l)}`}function P(e,t){if(!/^#[0-9a-fA-F]{6}$/.test(e)||t===0)return e;let{h:n,s:r,l:i}=se(e);return ce(n+t,r,i)}function F(e){return e*L%360}function le(e,t=0){let n=e<0?0:e>1?1:e,r=I[Math.min(I.length-1,Math.floor(n*I.length))];return t===0?r:P(r,t)}function ue(e){let{y:t,width:n,time:r,sourceX:i,sourceY:a}=e;if(n<=0)return[];let o=F(r),s=Array(n);for(let e=0;e<n;e++){let n=e-i,c=(t-a)*1.5,l=Math.sqrt(n*n+c*c),u=l*.35-r*.004;s[e]={char:z,color:le((Math.sin(u)+1)/2*Math.max(0,1-l/90),o)}}return s}function de(e,t){let n=e.map(e=>({...e}));for(let e of t){let t=e.x;if(!(t>=n.length))for(let r=0;r<e.text.length;r++){let i=t+r;if(!(i<0)){if(i>=n.length)break;n[i]={char:e.text[r],color:e.color??n[i].color}}}}return n}function fe(e){if(e.length===0)return[];let t=[],n={text:e[0].char,color:e[0].color};for(let r=1;r<e.length;r++){let i=e[r];i.color===n.color?n.text+=i.char:(t.push(n),n={text:i.char,color:i.color})}return t.push(n),t}function pe(e,t){if(e===`transparent`)return R;let n=t<0?0:t>1?1:t;if(n<=.01)return R;if(!/^#[0-9a-fA-F]{6}$/.test(e))return e;let r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return`#${Math.round(r*n).toString(16).padStart(2,`0`)}${Math.round(i*n).toString(16).padStart(2,`0`)}${Math.round(a*n).toString(16).padStart(2,`0`)}`}function me(e,t){return e.map(e=>({char:e.char,color:pe(e.color,t)}))}var I,L,R,z,he=e((()=>{I=[`#1a1f3a`,`#1f2543`,`#252c55`,`#2e3870`,`#3a4582`,`#4a5bb0`,`#5769F7`],L=.03,R=`transparent`,z=` `}));function ge(e){let t=e-2;return t<=W*A.length?W:Math.floor(t/A.length)}function _e(e){let t=Math.max(0,Math.floor((e-9)/2));return e*(A.length-1)+t+4}function B(e,t,n){return n*e+Math.max(0,Math.floor((n-t)/2))}function ve({appStateEffort:e,onDone:t}){let n=y(),i=T(),{columns:a}=r(),c=H.useMemo(()=>ge(a),[a]),u=c*A.length,d=H.useMemo(()=>_e(c),[c]),f=C(),p=ne({envOverride:f,appStateEffort:e,displayed:g(i,e)}),[m,h]=H.useState(p),[_,v]=H.useState(!1),b=m===`ultracode`,[x,S]=H.useState(0),w=b||x>.001,[E,D]=ae(w);H.useEffect(()=>{if(!w)return;let e=+!!b;S(t=>{if(t===e)return t;let n=e>t?t+Y:t-Y;return e>t?Math.min(e,n):Math.max(e,n)})},[D,b,w]),s({"effortPanel:decrease":()=>h(e=>ee(e)),"effortPanel:increase":()=>h(e=>te(e)),"effortPanel:home":()=>h(`low`),"effortPanel:end":()=>h(`ultracode`),"effortPanel:confirm":H.useCallback(()=>{if(_)return;v(!0);let e=re(m,Q);e.kind===`apply`&&e.effortUpdate&&n(t=>({...t,effortValue:e.effortUpdate.value})),t(e.message)},[m,_,t,n]),"effortPanel:cancel":H.useCallback(()=>{_||(v(!0),t(M))},[_,t])},{context:`EffortPanel`});let O=f!=null,k=process.env.CLAUDE_CODE_EFFORT_LEVEL,j=H.useCallback((e,t)=>fe(me(de(ue({y:e+X,width:u,time:D,sourceX:d,sourceY:X}),t),x)),[D,x,u,d]);return(0,U.jsxs)(l,{ref:E,flexDirection:`column`,paddingX:1,width:u+2,children:[(0,U.jsx)(o,{bold:!0,color:`suggestion`,children:`Effort`}),O&&(0,U.jsx)(o,{color:`warning`,children:`⚠ CLAUDE_CODE_EFFORT_LEVEL=${k} overrides this session`}),w?(0,U.jsx)(be,{renderRow:j,cursor:m,fade:x,segment:c,panelWidth:u,time:D}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ye,{cursor:m,segment:c,panelWidth:u}),(0,U.jsx)(l,{marginTop:1,children:(0,U.jsx)(o,{color:`subtle`,children:`←/→ adjust · Enter confirm · Esc cancel`})})]})]})}function ye({cursor:e,segment:t,panelWidth:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(l,{marginTop:1,flexDirection:`row`,justifyContent:`space-between`,children:[(0,U.jsx)(o,{color:`suggestion`,children:`Faster`}),(0,U.jsx)(o,{color:`suggestion`,children:`Smarter`})]}),(0,U.jsx)(o,{color:`subtle`,children:`─`.repeat(n)}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:!0,color:e===n?`suggestion`:`subtle`,children:e===n?`▲`:` `})},`cursor-${n}`))}),(0,U.jsx)(l,{flexDirection:`row`,children:A.map(n=>(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{bold:e===n,color:e===n?`suggestion`:`subtle`,children:n})},`label-${n}`))}),(0,U.jsxs)(l,{flexDirection:`row`,children:[(0,U.jsx)(l,{width:t*(A.length-1)}),(0,U.jsx)(l,{width:t,justifyContent:`center`,children:(0,U.jsx)(o,{color:`subtle`,children:G})})]})]})}function be({renderRow:e,cursor:t,segment:n,panelWidth:r,time:i}){let a=A.indexOf(t),s=A.length-1,c=F(i),l=P(J,c),u=P(K,c),d=P(q,c),f={text:`Faster`,x:0,color:l},p={text:`Smarter`,x:r-7,color:l},m={text:`─`.repeat(r),x:0,color:d},h={text:`▲`,x:B(a,1,n),color:l},g=A.map((e,r)=>({text:e,x:B(r,e.length,n),color:e===t?u:d})),_={text:G,x:B(s,17,n),color:d};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(V,{segments:e(-4,[])}),(0,U.jsx)(V,{segments:e(-3,[f,p])}),(0,U.jsx)(V,{segments:e(-2,[m])}),(0,U.jsx)(V,{segments:e(-1,[h])}),(0,U.jsx)(V,{segments:e(0,g)}),(0,U.jsx)(V,{segments:e(1,[_])}),(0,U.jsx)(V,{segments:e(2,[])}),(0,U.jsx)(o,{color:q,children:`←/→ adjust · Enter confirm · Esc cancel`})]})}function V({segments:e}){let t=[];for(let n of e){let e=``,r=null,i=()=>{e===``||r===null||(t.push({text:e,kind:r?`space`:`text`,color:n.color}),e=``,r=null)};for(let t of n.text){let n=t===` `;r===null?(e=t,r=n):n===r?e+=t:(i(),e=t,r=n)}i()}return(0,U.jsx)(l,{flexDirection:`row`,children:t.map((e,t)=>e.kind===`space`?e.color===`transparent`?(0,U.jsx)(a,{children:e.text},t):(0,U.jsx)(a,{backgroundColor:e.color,children:e.text},t):(0,U.jsx)(o,{color:e.color,bold:!0,children:e.text},t))})}var H,U,W,G,K,q,J,Y,X,xe=e((()=>{H=t(i(),1),c(),w(),b(),ie(),Ae(),E(),x(),oe(),he(),U=u(),W=12,G=`xhigh + workflows`,K=`#5769F7`,q=`#7a8eff`,J=`#5769F7`,Y=.2,X=0}));function Se(e){let t=v(e);if(t!==void 0){let e=d(`userSettings`,{effortLevel:t});if(e.error)return{message:`Failed to set effort level: ${e.error.message}`}}m(`tengu_effort_command`,{effort:e});let n=C();if(n!==void 0&&n!==e){let n=process.env.CLAUDE_CODE_EFFORT_LEVEL;return t===void 0?{message:`Not applied: CLAUDE_CODE_EFFORT_LEVEL=${n} overrides effort this session, and ${e} is session-only (nothing saved)`,effortUpdate:{value:e}}:{message:`CLAUDE_CODE_EFFORT_LEVEL=${n} overrides this session — clear it and ${e} takes over`,effortUpdate:{value:e}}}let r=_(e);return{message:`Set effort level to ${e}${t===void 0?` (this session only)`:``}: ${r}`,effortUpdate:{value:e}}}function Z(e,t){let n=C(),r=n===null?void 0:n??e;return r===void 0?{message:`Effort level: auto (currently ${g(t,e)})`}:{message:`Current effort level: ${r} (${_(r)})`}}function Ce(){let e=d(`userSettings`,{effortLevel:void 0});return e.error?{message:`Failed to set effort level: ${e.error.message}`}:(m(`tengu_effort_command`,{effort:`auto`}),C()==null?{message:`Effort level set to auto`,effortUpdate:{value:void 0}}:{message:`Cleared effort from settings, but CLAUDE_CODE_EFFORT_LEVEL=${process.env.CLAUDE_CODE_EFFORT_LEVEL} still controls this session`,effortUpdate:{value:void 0}})}function Q(e){let t=e.toLowerCase();return t===`auto`||t===`unset`?Ce():h(t)?Se(t):{message:`Invalid argument: ${e}. Valid options are: low, medium, high, max, auto`}}function we({onDone:e}){let{message:t}=Z(S(e=>e.effortValue),T());return e(t),null}function Te({result:e,onDone:t}){let n=y(),{effortUpdate:r,message:i}=e;return Oe.useEffect(()=>{r&&n(e=>({...e,effortValue:r.value})),t(i)},[n,r,i,t]),null}async function Ee(e,t,n){if(n=n?.trim()||``,ke.includes(n)){e(`Usage: /effort [low|medium|high|xhigh|max|auto]
|
|
2
|
+
|
|
3
|
+
Effort levels:
|
|
4
|
+
- low: Quick, straightforward implementation
|
|
5
|
+
- medium: Balanced approach with standard testing
|
|
6
|
+
- high: Comprehensive implementation with extensive testing
|
|
7
|
+
- xhigh: Extended reasoning beyond high, short of max; including ChatGPT Codex models
|
|
8
|
+
- max: Maximum capability with deepest reasoning; maps to xhigh for ChatGPT Codex models
|
|
9
|
+
- auto: Use the default effort level for your model`);return}return!n||n===`current`||n===`status`?n===`current`||n===`status`?(0,$.jsx)(we,{onDone:e}):(0,$.jsx)(De,{onDone:e}):(0,$.jsx)(Te,{result:Q(n),onDone:e})}function De({onDone:e}){return(0,$.jsx)(ve,{appStateEffort:S(e=>e.effortValue),onDone:e})}var Oe,$,ke,Ae=e((()=>{Oe=t(i(),1),xe(),E(),p(),x(),b(),f(),$=u(),ke=[`help`,`-h`,`--help`]}));Ae();export{Ee as call,Q as executeEffort,Z as showCurrentEffort};
|