@readmagic/workmate 0.0.11 → 0.0.13
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-ag2JTpmU.js → AddWorkspaceDirectory-BzNj9rS6.js} +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-CDZPR488.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-CH9x1Ngp.js +1 -0
- package/dist/chunks/App-D-bYAYAl.js +1 -0
- package/dist/chunks/ApproveApiKey-BEGV9Zj9.js +1 -0
- package/dist/chunks/ApproveApiKey-CjacpIqq.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-A9hw_SV0.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-B05t83wa.js → BypassPermissionsModeDialog-B0BizN_J.js} +1 -1
- package/dist/chunks/{DiffDialog-DUbFrzKu.js → DiffDialog-mQ-5_TSv.js} +2 -2
- package/dist/chunks/Doctor-BC6IuQhd.js +3 -0
- package/dist/chunks/Doctor-i_5_AQd-.js +1 -0
- package/dist/chunks/ExitFlow-Bu2cVGpC.js +2 -0
- package/dist/chunks/{Grove-BDoVj02t.js → Grove-D0nn8zOV.js} +2 -2
- package/dist/chunks/{HybridTransport-C_U0IJfz.js → HybridTransport-BQNLZNa_.js} +1 -1
- package/dist/chunks/InvalidConfigDialog-C5CIiSIE.js +1 -0
- package/dist/chunks/{InvalidSettingsDialog-Br8kQOHz.js → InvalidSettingsDialog-Dq7hKXcO.js} +1 -1
- package/dist/chunks/MCPConnectionManager-aDDsYkGM.js +1 -0
- package/dist/chunks/MCPToolListView-Cr0MDkzT.js +1 -0
- package/dist/chunks/{McpParsingWarnings-COa71S9q.js → McpParsingWarnings-CUx2zexI.js} +1 -1
- package/dist/chunks/MessageSelector-DwGOWKKL.js +3 -0
- package/dist/chunks/Messages-C1jh4ixt.js +11 -0
- package/dist/chunks/Onboarding-t-P6Q5O6.js +1 -0
- package/dist/chunks/{PromptInputFooterSuggestions-to5eYBvI.js → PromptInputFooterSuggestions-R12fbdmp.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-CfMFx-TF.js → PromptInputHelpMenu-BgADIzRj.js} +1 -1
- package/dist/chunks/QueryEngine-HlLQJmsd.js +1 -0
- package/dist/chunks/REPL-Rs_JQkDc.js +1 -0
- package/dist/chunks/REPL-VKAmKkII.js +133 -0
- package/dist/chunks/RemoteSessionManager-BbgXeM-t.js +2 -0
- package/dist/chunks/ResumeConversation-66zbx12g.js +1 -0
- package/dist/chunks/{SSETransport-DN4tCDEh.js → SSETransport-BBQkdn4e.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-Bq87I_vu.js +1 -0
- package/dist/chunks/Settings-BKdLcyXe.js +2 -0
- package/dist/chunks/{TeleportProgress-C2LQVLav.js → TeleportProgress-3hmIApkj.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-BZL8Zblz.js → TeleportRepoMismatchDialog-BA1a66RK.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-wPiIs8xg.js → TeleportResumeWrapper-BT4O-Wsi.js} +1 -1
- package/dist/chunks/{ThemePicker-BT_NaRQC.js → ThemePicker-DUlhcoso.js} +1 -1
- package/dist/chunks/TrustDialog-Dpk03V1Y.js +1 -0
- package/dist/chunks/{ValidationErrorsList-C-hWdy_8.js → ValidationErrorsList-DSSUWdgd.js} +1 -1
- package/dist/chunks/add-dir-BUr0z-VU.js +1 -0
- package/dist/chunks/{agentDisplay-CuSHqgZc.js → agentDisplay-D7bdOOG7.js} +1 -1
- package/dist/chunks/{agents-CMC0iQP4.js → agents-22wiC58F.js} +1 -1
- package/dist/chunks/agents-8ELI8RJo.js +103 -0
- package/dist/chunks/allErrors-C1eMbHSv.js +1 -0
- package/dist/chunks/api-DgjIFdMn.js +1 -0
- package/dist/chunks/{api-BbJfMXRS.js → api-f3GN2I_J.js} +1 -1
- package/dist/chunks/auth-B73a4Cob.js +1 -0
- package/dist/chunks/{auth-7mJGtlZp.js → auth-Czy7GoRh.js} +1 -1
- package/dist/chunks/auth-D_0waidQ.js +1 -0
- package/dist/chunks/backgroundHousekeeping-C_ArdTFX.js +17 -0
- package/dist/chunks/backgroundHousekeeping-YJhvZ0dh.js +1 -0
- package/dist/chunks/{banner-1Wyeyawe.js → banner-BcAM7iSx.js} +1 -1
- package/dist/chunks/bg-Ci7pG4eo.js +9 -0
- package/dist/chunks/branch-bb4-bErF.js +3 -0
- package/dist/chunks/{break-cache-CAoZ9b72.js → break-cache-4rlQORVk.js} +2 -2
- package/dist/chunks/{bridgeConfig-UgaUfuP6.js → bridgeConfig-B80T_lw7.js} +1 -1
- package/dist/chunks/bridgeConfig-DywkIo_k.js +1 -0
- package/dist/chunks/{bridgeMessaging-Ci5H68MX.js → bridgeMessaging-DyvHd16Z.js} +1 -1
- package/dist/chunks/{bridgePointer-BL8-lGvN.js → bridgePointer-DHWK3LEe.js} +1 -1
- package/dist/chunks/{bridgeStatusUtil-C36w15ge.js → bridgeStatusUtil-DStiD05t.js} +1 -1
- package/dist/chunks/btw-BRmV51bR.js +1 -0
- package/dist/chunks/caches-C5DIVdvI.js +1 -0
- package/dist/chunks/caches-zDZEgNKq.js +1 -0
- package/dist/chunks/{capacityWake-BOySRJUJ.js → capacityWake-ByL6fM6I.js} +1 -1
- package/dist/chunks/{ccrClient-Br4LAofR.js → ccrClient-BALhzhPF.js} +1 -1
- package/dist/chunks/{claudeDesktop-Bgds1-YT.js → claudeDesktop-Ct_hyICL.js} +1 -1
- package/dist/chunks/{clear-C4Vtnbye.js → clear-B_yVyJXP.js} +1 -1
- package/dist/chunks/cliLaunch-OPOtzhvA.js +1 -0
- package/dist/chunks/client-7lIxWcaM.js +1 -0
- package/dist/chunks/{client-B9404qIP.js → client-BMA05FW8.js} +1 -1
- package/dist/chunks/client-DVg8PpFX.js +1 -0
- package/dist/chunks/commands-ByFXqW43.js +1 -0
- package/dist/chunks/compact-BUShp2eQ.js +2 -0
- package/dist/chunks/config-9rLTDOYW.js +3 -0
- package/dist/chunks/config-BwHNU_pI.js +1 -0
- package/dist/chunks/{config-kB2eazPX.js → config-DMKtiMzJ.js} +1 -1
- package/dist/chunks/{context-BN7DEjoH.js → context-6Pk3iVhh.js} +1 -1
- package/dist/chunks/{context-noninteractive-D91W2B8e.js → context-noninteractive-CHzerxnH.js} +2 -2
- package/dist/chunks/context-noninteractive-DFwRQyFE.js +1 -0
- package/dist/chunks/conversation-5zb5XkSA.js +1 -0
- package/dist/chunks/conversation-JP2ZXrwu.js +1 -0
- package/dist/chunks/createSSHSession-XkHMiGRN.js +6 -0
- package/dist/chunks/{createSession-DRqkLZWt.js → createSession-BNGm9fL4.js} +1 -1
- package/dist/chunks/createSession-VTqzWAu6.js +1 -0
- package/dist/chunks/crossProjectResume-DxgQVYSi.js +40 -0
- package/dist/chunks/{cwd-Cfdf7z7s.js → cwd-Besi3Os3.js} +1 -1
- package/dist/chunks/cwd-DpqwaYHw.js +1 -0
- package/dist/chunks/datadog-3WUWcCFn.js +1 -0
- package/dist/chunks/{debug-BecbSVoN.js → debug-Dr1SjdXn.js} +2 -2
- package/dist/chunks/{debugUtils-CmJfIUxW.js → debugUtils-cK-iOsEV.js} +1 -1
- package/dist/chunks/detached-CqfQYVOi.js +5 -0
- package/dist/chunks/detectRepository-BsKZDRoI.js +1 -0
- package/dist/chunks/{detectRepository-C15umvKN.js → detectRepository-CMEkS5_2.js} +1 -1
- package/dist/chunks/{diff-DeK4bwjw.js → diff-CKlLimGq.js} +1 -1
- package/dist/chunks/{directoryCompletion-BJCu19HJ.js → directoryCompletion-ByBTSuLu.js} +1 -1
- package/dist/chunks/doctor-Bvx0u0sO.js +1 -0
- package/dist/chunks/{entry-mdegyj8z.js → entry-DCbq734V.js} +4 -4
- package/dist/chunks/{envUtils-BDhHQY0-.js → envUtils-DcaKZlRU.js} +1 -1
- package/dist/chunks/{esm-Ka3lhafK.js → esm-CtQkOk5D.js} +1 -1
- package/dist/chunks/{execFileNoThrow-DHyW8FMX.js → execFileNoThrow-mXq4K0rl.js} +1 -1
- package/dist/chunks/{execSyncWrapper-CDzB0BM1.js → execSyncWrapper-Ne33rRiD.js} +1 -1
- package/dist/chunks/exit-DTsz5Lcb.js +1 -0
- package/dist/chunks/{extraUsage-BrKbpBK-.js → extraUsage-C86bZVgt.js} +1 -1
- package/dist/chunks/extractMemories-6OnMgL2S.js +1 -0
- package/dist/chunks/fast-B2ziqJEA.js +1 -0
- package/dist/chunks/{fast-DWn40OcQ.js → fast-BkhjaTkZ.js} +1 -1
- package/dist/chunks/{fileSuggestions-C7Pwq2yj.js → fileSuggestions-BalHmi1-.js} +2 -2
- package/dist/chunks/{firstPartyEventLogger-BHjBQH0J.js → firstPartyEventLogger-1RTgXHSz.js} +2 -2
- package/dist/chunks/firstPartyEventLogger-CXMzhLrF.js +1 -0
- package/dist/chunks/{flushGate-DdJjxCes.js → flushGate-DWL05x7v.js} +1 -1
- package/dist/chunks/{gemini-DHv2iVfy.js → gemini-BLpLJyli.js} +1 -1
- package/dist/chunks/generateSessionName-CdbMksHi.js +1 -0
- package/dist/chunks/{genericProcessUtils-B2HcDYhg.js → genericProcessUtils-Dc1pfb7J.js} +1 -1
- package/dist/chunks/git-Bs1vtuvX.js +1 -0
- package/dist/chunks/{git-DBlOv64X.js → git-CoQQ6YEf.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-CK56bUDe.js → githubRepoPathMapping-CmpEaQoo.js} +1 -1
- package/dist/chunks/{goal-BZG4gtnb.js → goal-V3qix-i1.js} +3 -3
- package/dist/chunks/grok-BLLATotv.js +1 -0
- package/dist/chunks/{grove-_zlQ83yR.js → grove-b9gGKgu4.js} +1 -1
- package/dist/chunks/{help-C_2tdXHC.js → help-BR7UEr5R.js} +1 -1
- package/dist/chunks/{hooks-C7Bn7MBe.js → hooks-C-QMGvCg.js} +3 -3
- package/dist/chunks/hooks-D6wtd0Qq.js +1 -0
- package/dist/chunks/{initReplBridge-NkZRcM77.js → initReplBridge-DyScxedy.js} +1 -1
- package/dist/chunks/{install-Du-DSVzj.js → install-DGH_bjUh.js} +1 -1
- package/dist/chunks/{instrumentation-DMs3b82f.js → instrumentation-DQ705pC7.js} +4 -4
- package/dist/chunks/{job-rbX1VZmp.js → job-BaMT6Lb2.js} +1 -1
- package/dist/chunks/{jwtUtils-OzxN2zts.js → jwtUtils-FQWtM6iM.js} +1 -1
- package/dist/chunks/keybindings-CG292HS1.js +2 -0
- package/dist/chunks/{launchLocalMemory-BLRCK1_o.js → launchLocalMemory-CtZrkmaw.js} +2 -2
- package/dist/chunks/{launchOnboarding-Al_X75Vz.js → launchOnboarding-CyOtdZkT.js} +1 -1
- package/dist/chunks/loadAgentsDir-4UC4yLg1.js +1 -0
- package/dist/chunks/{loadAgentsDir-BL93ulMm.js → loadAgentsDir-mcRW90aq.js} +596 -604
- package/dist/chunks/loadPluginHooks-CWI0RMUx.js +1 -0
- package/dist/chunks/{localSearch-C5ipegd9.js → localSearch-CCCDKpYx.js} +1 -1
- package/dist/chunks/localSearch-D4hVR7-d.js +1 -0
- package/dist/chunks/{log-Dauqle-Z.js → log-27kCA_9u.js} +1 -1
- package/dist/chunks/{logoV2Utils-CkvOihX7.js → logoV2Utils--8OUQQPd.js} +1 -1
- package/dist/chunks/{magicDocs-DLav5QK0.js → magicDocs-26J_l1De.js} +3 -3
- package/dist/chunks/main-CGLCy2pM.js +31 -0
- package/dist/chunks/main-DUjtDK1Q.js +513 -0
- package/dist/chunks/managedEnv-BuCurT_S.js +1 -0
- package/dist/chunks/{managedEnv-DJSCuqCb.js → managedEnv-Ds6MlFQE.js} +1 -1
- package/dist/chunks/{mappers-DQxMcezy.js → mappers-DwZw084m.js} +1 -1
- package/dist/chunks/mcp-CEKR7PjL.js +6 -0
- package/dist/chunks/mcp-DCAf2hHD.js +1 -0
- package/dist/chunks/mcp-mCuc8dNe.js +2 -0
- package/dist/chunks/{memoize-FeyE7JEh.js → memoize-Co4vS6UF.js} +1 -1
- package/dist/chunks/memory-B5SkpC7u.js +1 -0
- package/dist/chunks/{mode-Bl2RZC8M.js → mode-B80CHkqo.js} +1 -1
- package/dist/chunks/model-BqaneI4D.js +1 -0
- package/dist/chunks/model-C29_32BD.js +1 -0
- package/dist/chunks/model-NG8fvuT2.js +1 -0
- package/dist/chunks/{modelOptions-BtEZe5BB.js → modelOptions-CiZgZxZC.js} +1 -1
- package/dist/chunks/{nativeInstaller-BEwayifa.js → nativeInstaller-DqbEfGSX.js} +1 -1
- package/dist/chunks/oauth-D38aRTUb.js +1 -0
- package/dist/chunks/oauth-U649LV5H.js +1 -0
- package/dist/chunks/{observationStore-BpjlK0pG.js → observationStore-D0rm3GhP.js} +1 -1
- package/dist/chunks/{omit--yH_T4rf.js → omit-KEhe84f4.js} +1 -1
- package/dist/chunks/{onChangeAppState-ZdwI7boX.js → onChangeAppState-Dq1tIEJI.js} +1 -1
- package/dist/chunks/openai-BvnsYTpQ.js +10 -0
- package/dist/chunks/{panel-CoNfXy3K.js → panel-CoF2a-h4.js} +1 -1
- package/dist/chunks/parser-B2PlJg4C.js +1 -0
- package/dist/chunks/{parser-BH4u7QiV.js → parser-CUUiH40T.js} +1 -1
- package/dist/chunks/partition-DeT341qu.js +1 -0
- package/dist/chunks/permissions-BPpeHxpk.js +3 -0
- package/dist/chunks/pidLock-DQGDoFQP.js +3 -0
- package/dist/chunks/{plan-BNYDTnQd.js → plan-BRiC5ujG.js} +1 -1
- package/dist/chunks/{platform-B0uTQc9P.js → platform-Dg1c9F_1.js} +1 -1
- package/dist/chunks/plugin-Dcg_GGR9.js +17 -0
- package/dist/chunks/pluginAutoupdate-ByH9IPC9.js +1 -0
- package/dist/chunks/pluginBlocklist-BfoLN9a-.js +1 -0
- package/dist/chunks/pluginCliCommands-Bc2Iybhz.js +1 -0
- package/dist/chunks/{pluginFlagging-DcJ_FQuv.js → pluginFlagging-Cr0d0hBA.js} +1 -1
- package/dist/chunks/pluginOperations-CKNyYjS-.js +2 -0
- package/dist/chunks/pluginStartupCheck-B48_cGgo.js +1 -0
- package/dist/chunks/{pluginStartupCheck-CKBFaMFr.js → pluginStartupCheck-DiCDQQlr.js} +1 -1
- package/dist/chunks/plugins-BP_36tOl.js +4 -0
- package/dist/chunks/poorMode-Djw0P9Gu.js +1 -0
- package/dist/chunks/{poorMode-B_xEvuEV.js → poorMode-DxgO_bUb.js} +1 -1
- package/dist/chunks/print-2uavraPq.js +26 -0
- package/dist/chunks/processBashCommand-g3sAMpHt.js +1 -0
- package/dist/chunks/processSlashCommand-tIbeCrv5.js +5 -0
- package/dist/chunks/{projectContext-CIxul6vA.js → projectContext-BN2ZWzOG.js} +1 -1
- package/dist/chunks/{projectContext-RUMJB798.js → projectContext-Bw3o5BrN.js} +1 -1
- package/dist/chunks/{prompt-Dx7IWhBt.js → prompt-DIlq8NTy.js} +4 -4
- package/dist/chunks/prompt-DLv-Cd67.js +1 -0
- package/dist/chunks/prompt-DV5tCLRh.js +1 -0
- package/dist/chunks/{promptEditor-WCkmpejM.js → promptEditor-BILqOGl1.js} +2 -2
- package/dist/chunks/{protocolHandler-BiVWrpHi.js → protocolHandler-B83fCYI4.js} +1 -1
- package/dist/chunks/{proxy-CVn7o19p.js → proxy-BEKNaTXI.js} +1 -1
- package/dist/chunks/rcDebugLog-DSchf3Hs.js +1 -0
- package/dist/chunks/reconciler-CDq6XgAS.js +1 -0
- package/dist/chunks/refresh-ysrhoWCo.js +1 -0
- package/dist/chunks/{registerProtocol-E0Iu5hEx.js → registerProtocol-DduKPsn_.js} +1 -1
- package/dist/chunks/{reload-plugins-D-3AUT9g.js → reload-plugins-CGb0HTsH.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-CV6we3ZA.js → remoteBridgeCore-BmteXmI9.js} +1 -1
- package/dist/chunks/{remoteManagedSettings-D26Q09-7.js → remoteManagedSettings-CwDGxL5p.js} +1 -1
- package/dist/chunks/rename-1GLIUlYk.js +1 -0
- package/dist/chunks/{renderOptions-DDLbSMQU.js → renderOptions-45A-EdsK.js} +1 -1
- package/dist/chunks/resume-DWtlUiHW.js +2 -0
- package/dist/chunks/ripgrep-BLQnqPnE.js +1 -0
- package/dist/chunks/{ripgrep-C1ydIMzT.js → ripgrep-DQ_ILUJV.js} +1 -1
- package/dist/chunks/{runtimeObserver-L7pSIWBT.js → runtimeObserver-4ZqaCXYy.js} +4 -4
- package/dist/chunks/{runtimeObserver-OU8KrZQG.js → runtimeObserver-CtNY8Al2.js} +1 -1
- package/dist/chunks/sandbox-adapter-BzjRQh_r.js +1 -0
- package/dist/chunks/sandbox-toggle-Bz49-F6e.js +1 -0
- package/dist/chunks/searchExtraTools-D6vj8qJ-.js +1 -0
- package/dist/chunks/{session-DUYsfPy_.js → session-wb6X4Wrq.js} +2 -2
- package/dist/chunks/sessionFileAccessHooks-Da97UA2n.js +1 -0
- package/dist/chunks/{sessionObserver-Dv3Ba8eA.js → sessionObserver-BJQ5hwjU.js} +2 -2
- package/dist/chunks/sessionObserver-DXO4trhk.js +1 -0
- package/dist/chunks/{sessionState-D-SaBzWD.js → sessionState-Bn3ESS5f.js} +1 -1
- package/dist/chunks/sessionStorage-DlPVsQn9.js +1 -0
- package/dist/chunks/{sessionStoragePortable-JZnGwqUM.js → sessionStoragePortable-BhkGMZWp.js} +1 -1
- package/dist/chunks/sessionTitle-Cbzrb9jT.js +14 -0
- package/dist/chunks/{sessionTracing-Bqb3vJTt.js → sessionTracing-CEsm8pZL.js} +1 -1
- package/dist/chunks/settings-3ionQKNv.js +1 -0
- package/dist/chunks/settings-DiBMs2gM.js +20 -0
- package/dist/chunks/settingsSync-eHaSngKo.js +1 -0
- package/dist/chunks/setup-DeyiuGNX.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-BzAZ57p2.js → shadowedRuleDetection-D5X5fhzj.js} +1 -1
- package/dist/chunks/{shellQuote-DS6WrivY.js → shellQuote-C_I6DHLV.js} +1 -1
- package/dist/chunks/{sideQuestion-CvMBBjI8.js → sideQuestion-BHRtwhyj.js} +3 -3
- package/dist/chunks/{sinks-f7qYjbKJ.js → sinks-Bgy2UNK-.js} +2 -2
- package/dist/chunks/sinks-CgzLmim2.js +1 -0
- package/dist/chunks/skillChangeDetector-BlSP16j6.js +1 -0
- package/dist/chunks/{skillGapStore-CqaT8c0C.js → skillGapStore-BjQSSz2E.js} +2 -2
- package/dist/chunks/{skillLifecycle-CnR8IqJM.js → skillLifecycle-Sp8strFv.js} +2 -2
- package/dist/chunks/{skillSearchPanel-D9qrOXpI.js → skillSearchPanel-3sYRez_Q.js} +5 -5
- package/dist/chunks/skills-CJhWI8t1.js +1 -0
- package/dist/chunks/startupProfiler-CUlV07MD.js +1 -0
- package/dist/chunks/{startupProfiler-CmH_aVy2.js → startupProfiler-Dc5r6LgE.js} +2 -2
- package/dist/chunks/{state-BemZdQIl.js → state-BPFYBqm1.js} +1 -1
- package/dist/chunks/state-CsdHk8n-.js +1 -0
- package/dist/chunks/{stats-B8uQ-UDi.js → stats-BkadEKa-.js} +1 -1
- package/dist/chunks/status-CDCurOqs.js +2 -0
- package/dist/chunks/{status-BekdWoIj.js → status-yoQIQ2Ni.js} +1 -1
- package/dist/chunks/statusNoticeHelpers-Sl4jjauz.js +1 -0
- package/dist/chunks/{stringUtils-C8PaYpQF.js → stringUtils-Df-Lnjxd.js} +1 -1
- package/dist/chunks/{subprocessEnv-Ci8VV_bi.js → subprocessEnv-CNBOhlDV.js} +1 -1
- package/dist/chunks/subprocessEnv-DtBCqQIo.js +1 -0
- package/dist/chunks/switcher-C-m6MUwE.js +1 -0
- package/dist/chunks/switcher-uoQMHmEZ.js +1 -0
- package/dist/chunks/{syncCache-ClP9aBqK.js → syncCache-BooMjgU6.js} +1 -1
- package/dist/chunks/{tasks-Dmh6qikm.js → tasks-CHG_6sXQ.js} +1 -1
- package/dist/chunks/teleport-C9KRE4X8.js +1 -0
- package/dist/chunks/{templateJobs-CxqU-s5i.js → templateJobs-BYYfF4m5.js} +2 -2
- package/dist/chunks/{terminalSetup-BKGcmlWp.js → terminalSetup-CbXKCpWM.js} +1 -1
- package/dist/chunks/{terminalSetup-Cy19F1Js.js → terminalSetup-fwhFTxGi.js} +1 -1
- package/dist/chunks/{theme-U7lMFHQ0.js → theme-MvX7hojJ.js} +1 -1
- package/dist/chunks/tmux-d3cNCIZA.js +1 -0
- package/dist/chunks/{toolEventObserver-D9qjoVl5.js → toolEventObserver-BFEl47bq.js} +1 -1
- package/dist/chunks/toolPool-Cq74Cvjp.js +1 -0
- package/dist/chunks/trustedDevice-BGwujSqc.js +1 -0
- package/dist/chunks/{trustedDevice-DL0pWP4_.js → trustedDevice-BLiKbGpG.js} +1 -1
- package/dist/chunks/{types-DafcFtmb.js → types-BJ7qTz75.js} +1 -1
- package/dist/chunks/{udsClient-CWnfsgFP.js → udsClient-CF8BmZgN.js} +1 -1
- package/dist/chunks/{updateCCB-C6XftzIG.js → updateCCB-CfckOy7T.js} +1 -1
- package/dist/chunks/{upstreamproxy-CXmjxHpl.js → upstreamproxy-BuBFDFAD.js} +1 -1
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-DEEJhm_W.js → useExitOnCtrlCDWithKeybindings-CPLBDluY.js} +1 -1
- package/dist/chunks/useMainLoopModel-C00PbZ1Q.js +1 -0
- package/dist/chunks/useManagePlugins-DFaGntzJ.js +1 -0
- package/dist/chunks/{useMergedTools-DbhqKk1-.js → useMergedTools-DYobZ5N4.js} +1 -1
- package/dist/chunks/{useSearchInput-gUDbkLaC.js → useSearchInput-KFKh2ozY.js} +1 -1
- package/dist/chunks/useSettingsErrors-BRgjvaHd.js +1 -0
- package/dist/chunks/{userAgent-CU7Ndh79.js → userAgent-DUrr02yh.js} +1 -1
- package/dist/chunks/util-D7uwPgF1.js +1 -0
- package/dist/chunks/validatePlugin-VukX52bx.js +1 -0
- package/dist/chunks/{vim-w37BfGZ5.js → vim-C4Hs5U2h.js} +1 -1
- package/dist/chunks/{which-BRWBO7Gu.js → which-mplwBbc0.js} +1 -1
- package/dist/chunks/windowsPaths-B8p9tFRF.js +1 -0
- package/dist/chunks/{windowsPaths-DtWHLjmE.js → windowsPaths-C7Mdo9aU.js} +1 -1
- package/dist/chunks/{workSecret-BEhXgH2M.js → workSecret-XLodD7tw.js} +1 -1
- package/dist/chunks/workerRegistry-BA37PVbv.js +6 -0
- package/dist/chunks/worktree-Lik8xuKd.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/App-BuKmqFPm.js +0 -1
- package/dist/chunks/ApproveApiKey-CIWOi_7v.js +0 -1
- package/dist/chunks/ApproveApiKey-M6U-NafA.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-Pnpl3Ixx.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CSywJdVL.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-D-w166RC.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-CV6PcJOP.js +0 -1
- package/dist/chunks/Doctor-BcnUfJ4I.js +0 -1
- package/dist/chunks/Doctor-Dz4TuYas.js +0 -3
- package/dist/chunks/ExitFlow-BwyAtIHx.js +0 -2
- package/dist/chunks/InvalidConfigDialog-bih293Xt.js +0 -1
- package/dist/chunks/MCPConnectionManager-B9n4SXN4.js +0 -1
- package/dist/chunks/MCPToolListView-DJ06N1DG.js +0 -1
- package/dist/chunks/MessageSelector-o4ULADFg.js +0 -3
- package/dist/chunks/Messages-qqwHuAW5.js +0 -11
- package/dist/chunks/Onboarding-BzuQjney.js +0 -1
- package/dist/chunks/QueryEngine-Dt0BKUeF.js +0 -1
- package/dist/chunks/REPL-CUbEDqEl.js +0 -133
- package/dist/chunks/REPL-DMaKNhTa.js +0 -1
- package/dist/chunks/RemoteSessionManager-Bf44A0Ol.js +0 -2
- package/dist/chunks/ResumeConversation-Ctw5Q1g9.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-C80OdtPZ.js +0 -1
- package/dist/chunks/Settings-DfdcmvOV.js +0 -2
- package/dist/chunks/TrustDialog-ACaJ_m7A.js +0 -1
- package/dist/chunks/WelcomeV2-ZQRKlcT4.js +0 -1
- package/dist/chunks/add-dir-SAKTkw0S.js +0 -1
- package/dist/chunks/agents-ZgRKpjHv.js +0 -103
- package/dist/chunks/allErrors-_cOQksHC.js +0 -1
- package/dist/chunks/api-DS1MiW01.js +0 -1
- package/dist/chunks/auth-DGZzCbU0.js +0 -1
- package/dist/chunks/auth-DN1MUpB8.js +0 -1
- package/dist/chunks/autoMode-CBtY7ACs.js +0 -45
- package/dist/chunks/autonomy-DuQmYhq6.js +0 -15
- package/dist/chunks/autonomy-lJV7yWUl.js +0 -1
- package/dist/chunks/autonomyPanel-DAQm6lDz.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BTy71bcY.js +0 -1
- package/dist/chunks/backgroundHousekeeping-Cc7Ag7JG.js +0 -17
- package/dist/chunks/bg-CJ0YWFli.js +0 -9
- package/dist/chunks/bg-CeUrRz_7.js +0 -1
- package/dist/chunks/branch-k3kirqbA.js +0 -3
- package/dist/chunks/bridgeConfig-CzRUPn-D.js +0 -1
- package/dist/chunks/btw-nVoVuIae.js +0 -1
- package/dist/chunks/caches-B8sM3Zys.js +0 -1
- package/dist/chunks/caches-Bp9MZ7IE.js +0 -1
- package/dist/chunks/cliLaunch-BTpfAGGI.js +0 -1
- package/dist/chunks/client-BCAbKdNz.js +0 -1
- package/dist/chunks/client-CJE6gEvU.js +0 -1
- package/dist/chunks/commands-DL-BzoMQ.js +0 -1
- package/dist/chunks/compact-Cx7BPXLU.js +0 -2
- package/dist/chunks/config-S5OW4Xqr.js +0 -1
- package/dist/chunks/config-aRiTrtCv.js +0 -3
- package/dist/chunks/connectHeadless-CqRoEtrg.js +0 -1
- package/dist/chunks/context-noninteractive-DPacEFJ1.js +0 -1
- package/dist/chunks/conversation-D5Nbu9eT.js +0 -1
- package/dist/chunks/conversation-hcUx9e-C.js +0 -1
- package/dist/chunks/createSSHSession-DecOR6M5.js +0 -6
- package/dist/chunks/createSession-D27zvmOs.js +0 -1
- package/dist/chunks/crossProjectResume-Bw3U0Ty6.js +0 -40
- package/dist/chunks/cwd-ClLru_7T.js +0 -1
- package/dist/chunks/dangerousBackend-DwcP0P08.js +0 -1
- package/dist/chunks/datadog-bm551AVV.js +0 -1
- package/dist/chunks/detached-CIyF0M5O.js +0 -5
- package/dist/chunks/detectRepository-DDfLfKcM.js +0 -1
- package/dist/chunks/doctor-BJORBomU.js +0 -1
- package/dist/chunks/exit-CF3KBl-S.js +0 -1
- package/dist/chunks/extractMemories-4lBn134y.js +0 -1
- package/dist/chunks/fast-0Vi354KI.js +0 -1
- package/dist/chunks/firstPartyEventLogger-BNBnLYPK.js +0 -1
- package/dist/chunks/generateSessionName-DhS_6oHd.js +0 -1
- package/dist/chunks/git-DF4RFFaT.js +0 -1
- package/dist/chunks/grok-BS57ZhyW.js +0 -1
- package/dist/chunks/hooks-DT80Arzc.js +0 -1
- package/dist/chunks/keybindings-CwdC_8S0.js +0 -2
- package/dist/chunks/loadAgentsDir-eVKq8efm.js +0 -1
- package/dist/chunks/loadPluginHooks-B0au35a4.js +0 -1
- package/dist/chunks/localSearch-CZlFfR_X.js +0 -1
- package/dist/chunks/lockfile-D5-j7HOZ.js +0 -1
- package/dist/chunks/main-CVNWNAoh.js +0 -513
- package/dist/chunks/main-LMyE3jXY.js +0 -31
- package/dist/chunks/managedEnv-CYepSnm8.js +0 -1
- package/dist/chunks/mcp-BAbbEaBA.js +0 -1
- package/dist/chunks/mcp-Ct4Sum6A.js +0 -6
- package/dist/chunks/mcp-D5HkCqUh.js +0 -2
- package/dist/chunks/memory-COa7aUbx.js +0 -1
- package/dist/chunks/model-B7rtZ7KV.js +0 -1
- package/dist/chunks/model-Bgh_r4lg.js +0 -1
- package/dist/chunks/model-DiuEAv6h.js +0 -1
- package/dist/chunks/oauth-BN2I0_jl.js +0 -1
- package/dist/chunks/oauth-C9VBDB0Y.js +0 -1
- package/dist/chunks/openai-DWs4D-nQ.js +0 -10
- package/dist/chunks/parseConnectUrl-BiyKR5-x.js +0 -1
- package/dist/chunks/parser-BMIaRErw.js +0 -1
- package/dist/chunks/partition-DLcW5Oo_.js +0 -1
- package/dist/chunks/permissions-CaucYK3s.js +0 -3
- package/dist/chunks/pidLock-DgOBc1Xo.js +0 -3
- package/dist/chunks/plugin-BN-of1_H.js +0 -17
- package/dist/chunks/pluginAutoupdate-BBU9Jn4p.js +0 -1
- package/dist/chunks/pluginBlocklist-DXQlbG0P.js +0 -1
- package/dist/chunks/pluginCliCommands-CfdVNs8D.js +0 -1
- package/dist/chunks/pluginOperations-DnhzFbYI.js +0 -2
- package/dist/chunks/pluginStartupCheck-CpNB4jxG.js +0 -1
- package/dist/chunks/plugins-CBW7kPyp.js +0 -4
- package/dist/chunks/poorMode-yH1o41cQ.js +0 -1
- package/dist/chunks/print-BZOx09SU.js +0 -26
- package/dist/chunks/processBashCommand-dcCNCiBp.js +0 -1
- package/dist/chunks/processSlashCommand-YDiM63Qr.js +0 -5
- package/dist/chunks/prompt-CXGy0llt.js +0 -1
- package/dist/chunks/prompt-DovNDmcx.js +0 -1
- package/dist/chunks/rcDebugLog-CARUIORE.js +0 -1
- package/dist/chunks/reconciler-C2Nd_e4n.js +0 -1
- package/dist/chunks/refresh-B84H2Ezd.js +0 -1
- package/dist/chunks/rename-CSavuBIE.js +0 -1
- package/dist/chunks/resume-CROylN3J.js +0 -2
- package/dist/chunks/ripgrep-2M1GkXqJ.js +0 -1
- package/dist/chunks/sandbox-adapter-6UwMLh6e.js +0 -1
- package/dist/chunks/sandbox-toggle-YrQNWGsr.js +0 -1
- package/dist/chunks/searchExtraTools-Bdv5HJ74.js +0 -1
- package/dist/chunks/server-LdbAb0sV.js +0 -1
- package/dist/chunks/serverBanner-BdExKFHT.js +0 -1
- package/dist/chunks/serverLog-BFmvyJ93.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-Czen7Ejz.js +0 -1
- package/dist/chunks/sessionManager-CPa049BO.js +0 -1
- package/dist/chunks/sessionObserver-B0zucj_c.js +0 -1
- package/dist/chunks/sessionStorage-BM1x51Z7.js +0 -1
- package/dist/chunks/sessionTitle-uCuYaNif.js +0 -14
- package/dist/chunks/settings-BG15IFYx.js +0 -1
- package/dist/chunks/settings-D4CpDv2y.js +0 -20
- package/dist/chunks/settingsSync-BSrpnyqo.js +0 -1
- package/dist/chunks/setup-C62oq4AZ.js +0 -3
- package/dist/chunks/sinks-WJ7nzLQs.js +0 -1
- package/dist/chunks/skillChangeDetector-U5kRU5nd.js +0 -1
- package/dist/chunks/skills-BgcFh0vy.js +0 -1
- package/dist/chunks/startupProfiler-B4HBBbHN.js +0 -1
- package/dist/chunks/state-BAGmpVBn.js +0 -1
- package/dist/chunks/state-D_lk6z-C.js +0 -1
- package/dist/chunks/status-D6KlRJmR.js +0 -2
- package/dist/chunks/statusNoticeHelpers-BMM8_uJ1.js +0 -1
- package/dist/chunks/subprocessEnv-CZkA9Cdp.js +0 -1
- package/dist/chunks/switcher-Ck9CrXrr.js +0 -1
- package/dist/chunks/switcher-DnAhkyIn.js +0 -1
- package/dist/chunks/teleport-DH3IuAUQ.js +0 -1
- package/dist/chunks/tmux-D5EvHWi3.js +0 -1
- package/dist/chunks/toolPool-69mfSPAs.js +0 -1
- package/dist/chunks/trustedDevice-B6AKlsl_.js +0 -1
- package/dist/chunks/useMainLoopModel-6w7mhwhU.js +0 -1
- package/dist/chunks/useManagePlugins-CjnsO-Of.js +0 -1
- package/dist/chunks/useSettingsErrors-CgPad-H0.js +0 -1
- package/dist/chunks/util-B4oMhJKh.js +0 -1
- package/dist/chunks/validatePlugin-y_O_tCEL.js +0 -1
- package/dist/chunks/windowsPaths-BY-IVNwQ.js +0 -1
- package/dist/chunks/workerRegistry-Bq9bS5pw.js +0 -6
- package/dist/chunks/worktree-4SUJ4dtz.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$i as t,Ai as n,As as r,Bi as i,Cb as a,Cv as o,Gh as s,J as c,Jv as l,Kv as u,Ou as d,Sb as f,Sv as p,Wh as m,X as h,Yi as g,bv as _,fw as v,ih as y,js as b,ku as x,nh as S,op as C,pm as w,pw as T,sp as E,vv as D,wv as O,xv as k,yv as A}from"./loadAgentsDir-BL93ulMm.js";import{On as j,Wt as M,l as N}from"./state-BemZdQIl.js";import{S as P,v as F}from"./git-DBlOv64X.js";import{i as I,t as L}from"./detectRepository-C15umvKN.js";import{a as R,n as z}from"./fileSuggestions-C7Pwq2yj.js";import{r as B,t as V}from"./magicDocs-DLav5QK0.js";function H(e=new Set){let t=e.size>0;_.cache.clear?.(),A.cache.clear?.(),D.cache.clear?.(),o.cache.clear?.(),z(),n(),t||l(),p(null),j(null),y(),b(),a(`session_start`),C(),d(),import(`./attributionHooks-CUAoGkU6.js`).then(({clearAttributionCaches:e})=>e()),L(),c(),N(e),F(),g(),s(),V(),v(),import(`./SearchExtraToolsTool-C80OdtPZ.js`).then(({clearSearchExtraToolsDescriptionCache:e})=>e()),import(`./loadAgentsDir-eVKq8efm.js`).then(({clearAgentDefinitionsCache:e})=>e()),import(`./prompt-DovNDmcx.js`).then(({clearPromptCache:e})=>e())}var U=e((()=>{M(),i(),O(),k(),R(),w(),u(),x(),S(),m(),B(),t(),r(),h(),f(),I(),P(),E(),T()}));export{U as n,H as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./bundledMode--fG1S62b.js";import{i as r,r as i}from"./shellQuote-DS6WrivY.js";import{spawn as a}from"child_process";function o(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i===`-d`||i.startsWith(`-d `)||i.startsWith(`-d `)){n.push(i),i===`-d`&&r+1<e.length&&n.push(e[++r]);continue}if(i.startsWith(`-d`)&&i.includes(`:`)){n.push(i);continue}if(i===`--feature`){n.push(i),r+1<e.length&&n.push(e[++r]);continue}if(/^--inspect(-brk)?(=|$)/.test(i)){n.push(i);continue}if(i.startsWith(`--`)&&!i.includes(`=`)&&r+1<e.length){if(t())continue;n.push(i),n.push(e[++r]);continue}i.startsWith(`-`)&&!t()&&n.push(i)}return n}function s(e,n){let r=n?.env??process.env,i=t()||!p?[...f,...e]:[...f,p,...e],a={...r};return h&&(process.env.CLAUDE_CODE_GIT_BASH_PATH&&!a.CLAUDE_CODE_GIT_BASH_PATH&&(a.CLAUDE_CODE_GIT_BASH_PATH=process.env.CLAUDE_CODE_GIT_BASH_PATH),process.env.SHELL&&!a.SHELL&&(a.SHELL=process.env.SHELL)),{execPath:m,args:i,env:a,windowsHide:h}}function c(e,t){return a(e.execPath,e.args,{...t,env:{...e.env,...t.env},windowsHide:e.windowsHide})}function l(e){return r([e.execPath,...e.args])}function u(){return f}function d(){return p}var f,p,m,h,g=e((()=>{n(),i(),f=Object.freeze(o(process.execArgv)),p=process.argv[1],m=process.execPath,h=process.platform===`win32`}));export{l as a,g as i,u as n,c as o,d as r,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./client-B9404qIP.js";e();export{t as clearOpenAIClientCache};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Fr as e,Pr as t}from"./model-Bgh_r4lg.js";e();export{t as getOrganizationUUID};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ai as e,Bi as t,Fi as n}from"./loadAgentsDir-BL93ulMm.js";t();export{e as clearCommandsCache,n as getCommands};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Av as t,Ba as n,Ev as r,F_ as i,Kv as a,M_ as o,Ma as s,P_ as c,Qm as l,Rv as u,Tp as d,Tv as f,Wv as p,XC as m,Xm as h,YC as g,bv as _,ct as v,gv as y,hv as b,ih as x,j_ as S,kv as C,lt as w,nh as T,qv as E,vn as D,wp as O,xv as k,yv as A}from"./loadAgentsDir-BL93ulMm.js";import{di as j,ui as M}from"./src-P_wYS_NJ2.js";import{Wt as N,qt as P}from"./state-BemZdQIl.js";import{L as F,R as I}from"./debug-BecbSVoN.js";import{o as L,s as R}from"./log-Dauqle-Z.js";function z(e,t){let n=O(`tip`),r=g(`app:toggleTranscript`,`Global`,`ctrl+o`),i=[...e.options.verbose?[]:[`(${r} to see full summary)`],...t?[t]:[],...n?[n]:[]];return M.dim(`Compacted `+i.join(`
|
|
2
|
-
`))}async function B(e,t){let n=e.getAppState(),r=await v(e.options.tools,e.options.mainLoopModel,Array.from(n.toolPermissionContext.additionalWorkingDirectories.keys()),e.options.mcpClients),i=b({mainThreadAgentDefinition:void 0,toolUseContext:e,customSystemPrompt:e.options.customSystemPrompt,defaultSystemPrompt:r,appendSystemPrompt:e.options.appendSystemPrompt}),[a,o]=await Promise.all([_(),A()]);return{systemPrompt:i,userContext:a,systemContext:o,toolUseContext:e,forkContextMessages:t}}var V;e((()=>{j(),N(),w(),k(),m(),a(),i(),C(),f(),T(),h(),u(),I(),D(),L(),n(),d(),y(),V=async(e,n)=>{let{abortController:i}=n,{messages:a}=n;if(a=s(a),a.length===0)throw Error(`No messages to compact`);let u=e.trim();try{if(!u){let e=await l(a,n.agentId);if(e)return _.cache.clear?.(),x(),E(n.options.querySource??`compact`,n.agentId),P(),t(),{type:`compact`,compactionResult:e,displayText:z(n)}}let e=(await r(a,n)).messages,i=await c(e,n,await B(n,e),!1,u,!1);return p(void 0),t(),_.cache.clear?.(),x(),{type:`compact`,compactionResult:i,displayText:z(n,i.userDisplayMessage)}}catch(e){throw i.signal.aborted?Error(`Compaction canceled.`):F(e,`Not enough messages to compact. Send a few more messages first, then try again.`)?Error(o):F(e,`Compaction interrupted · This may be due to network issues — please try again.`)?Error(S):(R(e),Error(`Error during compaction: ${e}`))}}}))();export{V as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Settings-DfdcmvOV.js";var i,a;e((()=>{n(),i=t(),a=async(e,t)=>(0,i.jsx)(r,{onClose:e,context:t,defaultTab:`Config`})}))();export{a as call};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./rolldown-runtime-DaDcL9Zw.js";import{n as r,t as i}from"./isObject-C6qM3WEW.js";import{n as a,t as o}from"./memoize-BK3gG5ob.js";import{c as s,l as c,n as l,o as u}from"./envUtils-BDhHQY0-.js";import{t as d}from"./graceful-fs-DDVg0cja.js";import{Ar as f,Ci as p,Cr as m,Dr as h,Er as g,Fr as _,Or as v,Pr as ee,Si as te,Sr as ne,Wt as re,et as ie,fi as ae,gt as oe,hi as se,it as ce,jr as le,kr as ue,mi as de,oi as fe,pi as pe,si as me,vi as he,yi as ge}from"./state-BemZdQIl.js";import{n as _e,t as ve}from"./cwd-Cfdf7z7s.js";import{C as y,F as b,O as x,R as ye,S as be,c as S,f as xe,i as Se,nt as Ce,tt as we,u as C,x as Te}from"./debug-BecbSVoN.js";import{Cr as Ee,Dr as De,Fn as Oe,Or as ke,Qt as Ae,Xt as je,Yt as Me,_r as Ne,c as w,cr as Pe,g as Fe,lr as T,n as Ie,qt as E,vr as Le,wn as Re,wr as ze}from"./settings-D4CpDv2y.js";import{O as Be,k as Ve,m as He,n as Ue}from"./git-DBlOv64X.js";import{d as We,o as Ge,s as Ke,u as qe}from"./log-Dauqle-Z.js";import{m as Je}from"./sessionStoragePortable-JZnGwqUM.js";import{f as Ye,p as Xe,s as Ze,u as Qe}from"./types-DafcFtmb.js";import{n as $e,r as D}from"./analytics-DJobLaWP.js";import{homedir as et}from"os";import{basename as O,dirname as k,isAbsolute as tt,join as A,normalize as j,resolve as nt,sep as rt}from"path";import{unwatchFile as it,watchFile as at}from"fs";import{randomBytes as ot}from"crypto";var M,st=t((()=>{p(),Le(),pe(),de(),M=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)te(t,ae(e)),e=Ne(e);return t}:se}));function ct(e){return he(e,ze,M)}var lt=t((()=>{ge(),st(),Ee()}));function ut(){let e=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(c(e))return!1;if(s(e))return!0;if(c(process.env.CLAUDE_CODE_SIMPLE)||c(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let t=Ie();return t.autoMemoryEnabled===void 0||t.autoMemoryEnabled}function dt(){return!1}function ft(){return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR?process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR:l()}function pt(e,t){if(!e)return;let n=e;if(t&&(n.startsWith(`~/`)||n.startsWith(`~\\`))){let e=n.slice(2),t=j(e||`.`);if(t===`.`||t===`..`)return;n=A(et(),e)}let r=j(n).replace(/[/\\]+$/,``);if(!(!tt(r)||r.length<3||/^[A-Za-z]:$/.test(r)||r.startsWith(`\\\\`)||r.startsWith(`//`)||r.includes(`\0`)))return(r+rt).normalize(`NFC`)}function mt(){return pt(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function ht(){return pt(w(`policySettings`)?.autoMemoryDirectory??w(`flagSettings`)?.autoMemoryDirectory??w(`localSettings`)?.autoMemoryDirectory??w(`userSettings`)?.autoMemoryDirectory,!0)}function gt(){return mt()!==void 0}function _t(){return Ue(ce())??ce()}function vt(){return A(N(),xt)}function yt(e){return j(e).startsWith(N())}var bt,xt,N,St=t((()=>{o(),re(),u(),He(),Pe(),Fe(),bt=`memory`,xt=`MEMORY.md`,N=a(()=>(mt()??ht())||(A(A(ft(),`projects`),Je(_t()),bt)+rt).normalize(`NFC`),()=>ce())}));function Ct(e,t,n,i){if(!r(e))return e;t=f(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++a<o;){var l=ue(t[a]),u=n;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):void 0,u===void 0&&(u=r(d)?d:me(t[a+1])?[]:{})}De(c,l,u),c=c[l]}return e}var wt=t((()=>{ke(),le(),fe(),i(),v()}));function Tt(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=g(e,o);n(s,o)&&Ct(a,f(o,e),s)}return a}var Et=t((()=>{h(),wt(),le()}));function P(e,t){if(e==null)return{};var n=ee(ct(e),function(e){return[e]});return t=ne(t),Tt(e,n,function(e,n){return t(e,n[0])})}var Dt=t((()=>{_(),m(),Et(),lt()})),Ot=n(((e,t)=>{function n(e,t){typeof t==`boolean`&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=n,n.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},n.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},n.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error(`RetryOperation timeout occurred`)),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),n=this._timeouts.shift();else return!1;var r=this,i=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n);return this._options.unref&&i.unref(),!0},n.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},n.prototype.try=function(e){console.log(`Using RetryOperation.try() is deprecated`),this.attempt(e)},n.prototype.start=function(e){console.log(`Using RetryOperation.start() is deprecated`),this.attempt(e)},n.prototype.start=n.prototype.try,n.prototype.errors=function(){return this._errors},n.prototype.attempts=function(){return this._attempts},n.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],a=i.message,o=(e[a]||0)+1;e[a]=o,o>=n&&(t=i,n=o)}return t}})),kt=n((e=>{var t=Ot();e.operation=function(n){return new t(e.timeouts(n),{forever:n&&n.forever,unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw Error(`minTimeout is greater than maxTimeout`);for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort(function(e,t){return e-t}),r},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*t.factor**+e);return r=Math.min(r,t.maxTimeout),r},e.wrap=function(t,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var i in r=[],t)typeof t[i]==`function`&&r.push(i);for(var a=0;a<r.length;a++){var o=r[a],s=t[o];t[o]=function(r){var i=e.operation(n),a=Array.prototype.slice.call(arguments,1),o=a.pop();a.push(function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),o.apply(this,arguments))}),i.attempt(function(){r.apply(t,a)})}.bind(t,s),t[o].options=n}}})),At=n(((e,t)=>{t.exports=kt()})),jt=n(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),Mt=n(((t,n)=>{var r=global.process,i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=jt(),s=/^win/i.test(r.platform),c=e(`events`);typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),n.exports=function(e,t){if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){!p||!i(global.process)||(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),n.exports.signals=function(){return o};var p=!1,m=function(){p||!i(global.process)||(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=v,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,v=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}else return _.apply(this,arguments)}}})),Nt=n(((e,t)=>{var n=Symbol();function r(e,t,r){let i=t[n];if(i)return t.stat(e,(e,t)=>{if(e)return r(e);r(null,t.mtime,i)});let a=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,a,a,i=>{if(i)return r(i);t.stat(e,(e,i)=>{if(e)return r(e);let a=i.mtime.getTime()%1e3==0?`s`:`ms`;Object.defineProperty(t,n,{value:a}),r(null,i.mtime,a)})})}function i(e){let t=Date.now();return e===`s`&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}t.exports.probe=r,t.exports.getMtime=i})),Pt=n(((t,n)=>{var r=e(`path`),i=d(),a=At(),o=Mt(),s=Nt(),c={};function l(e,t){return t.lockfilePath||`${e}.lock`}function u(e,t,n){if(!t.realpath)return n(null,r.resolve(e));t.fs.realpath(e,n)}function f(e,t,n){let r=l(e,t);t.fs.mkdir(r,i=>{if(!i)return s.probe(r,t.fs,(e,i,a)=>{if(e)return t.fs.rmdir(r,()=>{}),n(e);n(null,i,a)});if(i.code!==`EEXIST`)return n(i);if(t.stale<=0)return n(Object.assign(Error(`Lock file is already being held`),{code:`ELOCKED`,file:e}));t.fs.stat(r,(r,i)=>{if(r)return r.code===`ENOENT`?f(e,{...t,stale:0},n):n(r);if(!p(i,t))return n(Object.assign(Error(`Lock file is already being held`),{code:`ELOCKED`,file:e}));m(e,t,r=>{if(r)return n(r);f(e,{...t,stale:0},n)})})})}function p(e,t){return e.mtime.getTime()<Date.now()-t.stale}function m(e,t,n){t.fs.rmdir(l(e,t),e=>{if(e&&e.code!==`ENOENT`)return n(e);n()})}function h(e,t){let n=c[e];n.updateTimeout||(n.updateDelay=n.updateDelay||t.update,n.updateTimeout=setTimeout(()=>{n.updateTimeout=null,t.fs.stat(n.lockfilePath,(r,i)=>{let a=n.lastUpdate+t.stale<Date.now();if(r)return r.code===`ENOENT`||a?g(e,n,Object.assign(r,{code:`ECOMPROMISED`})):(n.updateDelay=1e3,h(e,t));if(n.mtime.getTime()!==i.mtime.getTime())return g(e,n,Object.assign(Error(`Unable to update lock within the stale threshold`),{code:`ECOMPROMISED`}));let o=s.getMtime(n.mtimePrecision);t.fs.utimes(n.lockfilePath,o,o,r=>{let i=n.lastUpdate+t.stale<Date.now();if(!n.released){if(r)return r.code===`ENOENT`||i?g(e,n,Object.assign(r,{code:`ECOMPROMISED`})):(n.updateDelay=1e3,h(e,t));n.mtime=o,n.lastUpdate=Date.now(),n.updateDelay=null,h(e,t)}})})},n.updateDelay),n.updateTimeout.unref&&n.updateTimeout.unref())}function g(e,t,n){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),c[e]===t&&delete c[e],t.options.onCompromised(n)}function _(e,t,n){t={stale:1e4,update:null,realpath:!0,retries:0,fs:i,onCompromised:e=>{throw e},...t},t.retries=t.retries||0,t.retries=typeof t.retries==`number`?{retries:t.retries}:t.retries,t.stale=Math.max(t.stale||0,2e3),t.update=t.update==null?t.stale/2:t.update||0,t.update=Math.max(Math.min(t.update,t.stale/2),1e3),u(e,t,(e,r)=>{if(e)return n(e);let i=a.operation(t.retries);i.attempt(()=>{f(r,t,(e,a,o)=>{if(i.retry(e))return;if(e)return n(i.mainError());let s=c[r]={lockfilePath:l(r,t),mtime:a,mtimePrecision:o,options:t,lastUpdate:Date.now()};h(r,t),n(null,e=>{if(s.released)return e&&e(Object.assign(Error(`Lock is already released`),{code:`ERELEASED`}));v(r,{...t,realpath:!1},e)})})})})}function v(e,t,n){t={fs:i,realpath:!0,...t},u(e,t,(e,r)=>{if(e)return n(e);let i=c[r];if(!i)return n(Object.assign(Error(`Lock is not acquired/owned by you`),{code:`ENOTACQUIRED`}));i.updateTimeout&&clearTimeout(i.updateTimeout),i.released=!0,delete c[r],m(r,t,n)})}function ee(e,t,n){t={stale:1e4,realpath:!0,fs:i,...t},t.stale=Math.max(t.stale||0,2e3),u(e,t,(e,r)=>{if(e)return n(e);t.fs.stat(l(r,t),(e,r)=>e?e.code===`ENOENT`?n(null,!1):n(e):n(null,!p(r,t)))})}function te(){return c}o(()=>{for(let e in c){let t=c[e].options;try{t.fs.rmdirSync(l(e,t))}catch{}}}),n.exports.lock=_,n.exports.unlock=v,n.exports.check=ee,n.exports.getLocks=te})),Ft=n(((e,t)=>{var n=d();function r(e){let t=[`mkdir`,`realpath`,`stat`,`rmdir`,`utimes`],n={...e};return t.forEach(t=>{n[t]=(...n)=>{let r=n.pop(),i;try{i=e[`${t}Sync`](...n)}catch(e){return r(e)}r(null,i)}}),n}function i(e){return(...t)=>new Promise((n,r)=>{t.push((e,t)=>{e?r(e):n(t)}),e(...t)})}function a(e){return(...t)=>{let n,r;if(t.push((e,t)=>{n=e,r=t}),e(...t),n)throw n;return r}}function o(e){if(e={...e},e.fs=r(e.fs||n),typeof e.retries==`number`&&e.retries>0||e.retries&&typeof e.retries.retries==`number`&&e.retries.retries>0)throw Object.assign(Error(`Cannot use retries with the sync api`),{code:`ESYNC`});return e}t.exports={toPromise:i,toSync:a,toSyncOptions:o}})),It=n(((e,t)=>{var n=Pt(),{toPromise:r,toSync:i,toSyncOptions:a}=Ft();async function o(e,t){return r(await r(n.lock)(e,t))}function s(e,t){return i(i(n.lock)(e,a(t)))}function c(e,t){return r(n.unlock)(e,t)}function l(e,t){return i(n.unlock)(e,a(t))}function u(e,t){return r(n.check)(e,t)}function d(e,t){return i(n.check)(e,a(t))}t.exports=o,t.exports.lock=o,t.exports.unlock=c,t.exports.lockSync=s,t.exports.unlockSync=l,t.exports.check=u,t.exports.checkSync=d}));function F(){return I||(I=It()),I}function Lt(e,t){return F().lock(e,t)}function Rt(e,t){return F().lockSync(e,t)}function zt(e,t){return F().check(e,t)}var I,Bt=t((()=>{}));function L(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:`dark`,preferredNotifChannel:`auto`,verbose:!1,editorMode:`normal`,autoCompactEnabled:!0,showTurnDuration:!0,hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:`auto`,customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:6e4,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},respectGitignore:!0}}function Vt(){return fn||(fn=Ht())}function Ht(){if(oe())return!0;let e=B(),t=$();if(e.projects?.[t]?.hasTrustDialogAccepted)return!0;let n=T(ve());for(;;){if(e.projects?.[n]?.hasTrustDialogAccepted)return!0;let t=T(nt(n,`..`));if(t===n)break;n=t}return!1}function R(e){let t=K.config;if(!t)return!1;let n=t.oauthAccount!==void 0&&e.oauthAccount===void 0,r=t.hasCompletedOnboarding===!0&&e.hasCompletedOnboarding!==!0;return n||r}function Ut(e){let t=null;try{Zt(E(),L,n=>{let r=e(n);return r===n?n:(t={...r,projects:Kt(n.projects)},t)})&&t&&z(t)}catch(n){S(`Failed to save config with lock: ${n}`,{level:`error`});let r=H(E(),L);if(R(r)){S(`saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.`,{level:`error`}),D(`tengu_config_auth_loss_prevented`,{});return}let i=e(r);if(i===r)return;t={...i,projects:Kt(r.projects)},Xt(E(),t,G),z(t)}}function Wt(){let e=J+Y;e>0&&D(`tengu_config_cache_stats`,{cache_hits:J,cache_misses:Y,hit_rate:J/e}),J=0,Y=0}function Gt(e){if(e.installMethod!==void 0)return e;let t=e,n=`unknown`,r=e.autoUpdates??!0;switch(t.autoUpdaterStatus){case`migrated`:n=`local`;break;case`installed`:n=`native`;break;case`disabled`:r=!1;break;case`enabled`:case`no_permissions`:case`not_configured`:n=`global`;break;case void 0:break}return{...e,installMethod:n,autoUpdates:r}}function Kt(e){if(!e)return e;let t={},n=!1;for(let[r,i]of Object.entries(e)){let e=i;if(e.history!==void 0){n=!0;let{history:i,...a}=e;t[r]=a}else t[r]=i}return n?t:e}function qt(){if(Z)return;Z=!0;let e=E();at(e,{interval:pn,persistent:!1},t=>{t.mtimeMs<=K.mtime||C().readFile(e,{encoding:`utf-8`}).then(e=>{if(t.mtimeMs<=K.mtime)return;let n=Qe(Xe(e));typeof n!=`object`||!n||(K={config:Gt({...L(),...n}),mtime:t.mtimeMs},q={mtime:t.mtimeMs,size:t.size})}).catch(()=>{})}),Ce(async()=>{it(e),Z=!1})}function z(e){K={config:e,mtime:Date.now()},q=null}function B(){if(K.config)return J++,K.config;Y++;try{let e=null;try{e=C().statSync(E())}catch{}let t=Gt(H(E(),L));return K={config:t,mtime:e?.mtimeMs??Date.now()},q=e?{mtime:e.mtimeMs,size:e.size}:null,qt(),t}catch{return Gt(H(E(),L))}}function Jt(){let e=B().remoteControlAtStartup;return e!==void 0&&e}function Yt(e){let t=B();return t.customApiKeyResponses?.approved?.includes(e)?`approved`:t.customApiKeyResponses?.rejected?.includes(e)?`rejected`:`new`}function Xt(e,t,n){let r=k(e);C().mkdirSync(r),Oe(e,y(P(t,(e,t)=>y(e)!==y(n[t])),null,2),{encoding:`utf-8`,mode:384}),e===E()&&X++}function Zt(e,t,n){let r=t(),i=k(e),a=C();a.mkdirSync(i);let o;try{let i=`${e}.lock`,s=Date.now();o=Rt(e,{lockfilePath:i,onCompromised:e=>{S(`Config lock compromised: ${e}`,{level:`error`})}});let c=Date.now()-s;if(c>100&&(S(`Lock acquisition took longer than expected - another Claude instance may be running`),D(`tengu_config_lock_contention`,{lock_time_ms:c})),q&&e===E())try{let t=a.statSync(e);(t.mtimeMs!==q.mtime||t.size!==q.size)&&D(`tengu_config_stale_write`,{read_mtime:q.mtime,write_mtime:t.mtimeMs,read_size:q.size,write_size:t.size})}catch(e){if(b(e)!==`ENOENT`)throw e}let l=H(e,t);if(e===E()&&R(l))return S(`saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claude.json. See GH #3117.`,{level:`error`}),D(`tengu_config_auth_loss_prevented`,{}),!1;let u=n(l);if(u===l)return!1;let d=P(u,(e,t)=>y(e)!==y(r[t]));try{let t=O(e),n=V();try{a.mkdirSync(n)}catch(e){if(b(e)!==`EEXIST`)throw e}let r=a.readdirStringSync(n).filter(e=>e.startsWith(`${t}.backup.`)).sort().reverse(),i=r[0],o=i?Number(i.split(`.backup.`).pop()):0,s=Number.isNaN(o)||Date.now()-o>=6e4;if(s){let r=A(n,`${t}.backup.${Date.now()}`);a.copyFileSync(e,r)}let c=s?a.readdirStringSync(n).filter(e=>e.startsWith(`${t}.backup.`)).sort().reverse():r;for(let e of c.slice(5))try{a.unlinkSync(A(n,e))}catch{}}catch(e){b(e)!==`ENOENT`&&S(`Failed to backup config: ${e}`,{level:`error`})}return Oe(e,y(d,null,2),{encoding:`utf-8`,mode:384}),e===E()&&X++,!0}finally{o&&o()}}function Qt(){if(Q)return;let e=Date.now();Ve(`info`,`enable_configs_started`),Q=!0,H(E(),L,!0),Ve(`info`,`enable_configs_completed`,{duration_ms:Date.now()-e})}function V(){return A(l(),`backups`)}function $t(e){let t=C(),n=O(e),r=V();try{let e=t.readdirStringSync(r).filter(e=>e.startsWith(`${n}.backup.`)).sort().at(-1);if(e)return A(r,e)}catch{}let i=k(e);try{let r=t.readdirStringSync(i).filter(e=>e.startsWith(`${n}.backup.`)).sort().at(-1);if(r)return A(i,r);let a=`${e}.backup`;try{return t.statSync(a),a}catch{}}catch{}return null}function H(e,t,n){if(!Q)throw Error(`Config accessed before allowed.`);let r=C();try{let n=r.readFileSync(e,{encoding:`utf-8`});try{let e=be(Xe(n));return{...t(),...e}}catch(n){throw new x(n instanceof Error?n.message:String(n),e,t())}}catch(i){if(b(i)===`ENOENT`){let n=$t(e);return n&&process.stderr.write(`\nClaude configuration file not found at: ${e}\nA backup file exists at: ${n}\nYou can manually restore it by running: cp "${n}" "${e}"\n\n`),t()}if(i instanceof x&&n)throw i;if(i instanceof x){if(S(`Config file corrupted, resetting to defaults: ${i.message}`,{level:`error`}),!U){U=!0;try{Ke(i);let t=!1;try{r.statSync(`${e}.backup`),t=!0}catch{}D(`tengu_config_parse_error`,{has_backup:t})}finally{U=!1}}process.stderr.write(`\nClaude configuration file at ${e} is corrupted: ${i.message}\n`);let t=O(e),n=V();try{r.mkdirSync(n)}catch(e){if(b(e)!==`EEXIST`)throw e}let a=r.readdirStringSync(n).filter(e=>e.startsWith(`${t}.corrupted.`)),o,s=!1,c=r.readFileSync(e,{encoding:`utf-8`});for(let e of a)try{if(c===r.readFileSync(A(n,e),{encoding:`utf-8`})){s=!0;break}}catch{}if(!s){o=A(n,`${t}.corrupted.${Date.now()}`);try{r.copyFileSync(e,o),S(`Corrupted config backed up to: ${o}`,{level:`error`})}catch{}}let l=$t(e);o?process.stderr.write(`The corrupted file has been backed up to: ${o}\n`):s&&process.stderr.write(`The corrupted file has already been backed up.
|
|
2
|
-
`),l?process.stderr.write(`A backup file exists at: ${l}\nYou can manually restore it by running: cp "${l}" "${e}"\n\n`):process.stderr.write(`
|
|
3
|
-
`)}return t()}}function en(){let e=$(),t=B();if(!t.projects)return W;let n=t.projects[e]??W;return typeof n.allowedTools==`string`&&(n.allowedTools=Qe(n.allowedTools)??[]),n}function tn(e){let t=$(),n=null;try{Zt(E(),L,r=>{let i=r.projects?.[t]??W,a=e(i);return a===i?r:(n={...r,projects:{...r.projects,[t]:a}},n)})&&n&&z(n)}catch(r){S(`Failed to save config with lock: ${r}`,{level:`error`});let i=H(E(),L);if(R(i)){S(`saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.`,{level:`error`}),D(`tengu_config_auth_loss_prevented`,{});return}let a=i.projects?.[t]??W,o=e(a);if(o===a)return;n={...i,projects:{...i.projects,[t]:o}},Xt(E(),n,G),z(n)}}function nn(){return on()!==null}function rn(){return nn()&&!c(process.env.FORCE_AUTOUPDATE_PLUGINS)}function an(e){switch(e.type){case`development`:return`development build`;case`env`:return`${e.envVar} set`;case`config`:return`config`}}function on(){if(!c(process.env.ENABLE_AUTOUPDATER))return{type:`config`};if(c(process.env.DISABLE_AUTOUPDATER))return{type:`env`,envVar:`DISABLE_AUTOUPDATER`};let e=qe();if(e)return{type:`env`,envVar:e};let t=B();return t.autoUpdates===!1&&(t.installMethod!==`native`||t.autoUpdatesProtectedForNative!==!0)?{type:`config`}:null}function sn(){let e=B();if(e.userID)return e.userID;let t=ot(32).toString(`hex`);return Ut(e=>({...e,userID:t})),t}function cn(){if(!B().firstStartTime){let e=new Date().toISOString();Ut(t=>({...t,firstStartTime:t.firstStartTime??e}))}}function ln(e){let t=ie();switch(e){case`User`:return A(l(),`CLAUDE.md`);case`Local`:return A(t,`CLAUDE.local.md`);case`Project`:return A(t,`CLAUDE.md`);case`Managed`:return A(je(),`CLAUDE.md`);case`AutoMem`:return vt();default:return A(l(),`CLAUDE.md`)}}function un(){return A(je(),`.claude`,`rules`)}function dn(){return A(l(),`rules`)}var U,W,G,fn,K,q,J,Y,X,pn,Z,Q,$,mn=t((()=>{o(),Dt(),re(),St(),$e(),_e(),we(),Se(),Be(),Me(),u(),ye(),Re(),xe(),He(),Ze(),Ye(),Bt(),Ge(),Pe(),We(),Ae(),Te(),U=!1,W={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},G=L(),fn=!1,{...G},{...W},K={config:null,mtime:0},q=null,J=0,Y=0,X=0,Ce(async()=>{Wt()}),pn=1e3,Z=!1,Q=!1,$=a(()=>{let e=ie();return T(Ue(e)||nt(e))})}));export{ft as A,Lt as C,wt as D,Ct as E,dt as F,ct as I,lt as L,St as M,yt as N,vt as O,ut as P,M as R,Bt as S,P as T,cn as _,on as a,rn as b,B as c,sn as d,$ as f,nn as g,mn as h,an as i,gt as j,N as k,un as l,dn as m,Vt as n,en as o,Jt as p,Qt as r,Yt as s,G as t,ln as u,tn as v,Dt as w,zt as x,Ut as y,st as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=()=>Promise.resolve();export{e as runConnectHeadless};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./context-noninteractive-D91W2B8e.js";t();export{n as call,e as collectContextData};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t}from"./rolldown-runtime-DaDcL9Zw.js";import{An as n,B_ as r,Bs as i,Cr as a,ME as o,On as s,St as c,TE as l,Tt as u,Vs as d,Xt as f,Yh as p,Yn as m,_i as h,c_ as g,dw as _,ii as v,ir as y,jn as b,mi as x,n_ as S,o_ as C,qh as w,r_ as T,un as E,uw as D,vc as O,vn as k,z_ as A}from"./loadAgentsDir-BL93ulMm.js";import{Dn as j,G as M,Qt as N,Tn as P,Wt as F,en as I,et as L,wn as R}from"./state-BemZdQIl.js";import{o as z,s as B}from"./log-Dauqle-Z.js";import{n as V,r as H}from"./analytics-DJobLaWP.js";import{_ as U,x as W}from"./sessionState-D-SaBzWD.js";import{n as G,t as K}from"./caches-Bp9MZ7IE.js";import{randomUUID as q}from"crypto";function J(){return Y}var Y,X=t((()=>{O(),Y=null}));function Z(){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 Q({setMessages:t,readFileState:i,discoveredSkillNames:o,loadedNestedMemoryPaths:u,getAppState:p,setAppState:g,setConversationId:b}){let S=E();await f(`clear`,{getAppState:p,setAppState:g,signal:AbortSignal.timeout(S),timeoutMs:S});let D=M();D&&H(`tengu_cache_eviction_hint`,{scope:`conversation_clear`,last_request_id:D});let O=new Set,k=[],A=e=>`isBackgrounded`in e&&e.isBackgrounded===!1;if(p)for(let e of Object.values(p().tasks))A(e)||d(e)&&(O.add(e.agentId),k.push(e));t(()=>[]),Z();{let{setContextBlocked:t}=(U(),e(W));t(!1)}b&&b(q()),K(O),R(null),P(null),j(null),I(),_(L()),i.clear(),o?.clear(),u?.clear(),g&&g(e=>{let t={};for(let[n,r]of Object.entries(e.tasks)){if(!A(r)){t[n]=r;continue}try{r.status===`running`&&(T(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){B(e)}s(n)}return{...e,tasks:t,attribution:w(),standaloneAgentContext:void 0,fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:e.mcp.pluginReconnectKey}}}),l(),m(),N({setCurrentAsParent:!0}),await v();for(let e of k)e.status===`running`&&n(e.id,y(C(e.agentId)));let{saveMode:F}=(a(),e(h));F(`normal`);let z=c();z&&x(z);let V=await r(`clear`);V.length>0&&t(()=>V)}var $=t((()=>{X(),F(),V(),i(),S(),g(),p(),k(),z(),o(),D(),A(),a(),b(),u(),G()}));export{$ as n,Q as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./conversation-D5Nbu9eT.js";e();export{t as clearConversation};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./defineProperty-C-QyHrDq.js";import{C as n,S as r,c as i,i as a,x as o}from"./debug-BecbSVoN.js";import{l as s,u as c}from"./oauth-C9VBDB0Y.js";import{Bt as l,Ot as u}from"./model-Bgh_r4lg.js";import{i as d,t as f}from"./cliLaunch-BTpfAGGI.js";import{resolve as p}from"path";import{existsSync as m,unlinkSync as h}from"fs";import{randomUUID as g}from"crypto";a(),o(),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{let t=await e();this.proc=t,this.reconnectAttempt=0,this.connected=!0,this.startReadLoop(),this.monitorExit(),this.options.onConnected();return}catch(e){i(`[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=r(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):(i(`[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=n({type:`user`,message:{role:`user`,content:e},parent_tool_use_id:null,session_id:``});return this.writeToStdin(t)}sendInterrupt(){let e=n({type:`control_request`,request_id:crypto.randomUUID(),request:{subtype:`interrupt`}});this.writeToStdin(e)}respondToPermissionRequest(e,t){let r=n({type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}});this.writeToStdin(r)}sendErrorResponse(e,t){let r=n({type:`control_response`,response:{subtype:`error`,request_id:e,error:t}});this.writeToStdin(r)}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}};l(),c(),a();var S=process.platform===`win32`;function C(){let e=process.env.ANTHROPIC_API_KEY;if(e)return{"x-api-key":e};let t=u();return t?.accessToken?{Authorization:`Bearer ${t.accessToken}`}:{}}function w(){return process.env.ANTHROPIC_BASE_URL||s().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),a=`${n}${r.pathname}${r.search}`,o=C();if(Object.keys(o).length===0)return new Response(JSON.stringify({error:`No API credentials available on local machine`}),{status:401,headers:{"content-type":`application/json`}});let s=new Headers(e.headers);for(let[e,t]of Object.entries(o))s.set(e,t);s.delete(`host`),s.delete(`x-auth-nonce`),i(`[SSHAuthProxy] ${e.method} ${r.pathname} -> ${a}`);try{let t=await fetch(a,{method:e.method,headers:s,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 i(`[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 i(`[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 i(`[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}}}a();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))]),a=await new Response(n.stdout).text(),o=await new Response(n.stderr).text();if(r!==0)throw new A(`SSH probe failed: ${o.trim()||`exit code ${r}`}`);let s=a.split(`
|
|
4
|
-
`).map(e=>e.trim()).filter(Boolean);i(`[SSHProbe] raw lines: ${JSON.stringify(s)}`);let c=s.findIndex(e=>/^(Linux|Darwin)\s/.test(e));if(c===-1)throw new A(`Could not detect remote platform (uname output missing)`);let l=c>=2&&s[c-2]||null,u=c>=1&&s[c-1]||null,d=u&&/^\d+\.\d+/.test(u)?u:null,f=l!==null&&l.startsWith(`/`),p=s[c+1]||`/`,[m,h]=s[c].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}}a();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:a,onProgress:o}=e;if(n!==`linux`&&n!==`darwin`)throw Error(`Remote platform "${n}" is not supported. Only linux and darwin are supported.`);i(`[SSHDeploy] deploying to ${t} (${n}/${r}, v${a})`);let s=L();i(`[SSHDeploy] local binary: ${s}`),o?.(`Creating remote directory...`);let c=await I(t,`mkdir -p ${N}`);if(c.exitCode!==0)throw Error(`Failed to create remote directory: ${c.stderr}`);o?.(`Uploading binary...`);let l=`${N}/${P}`,u=Bun.spawn([`scp`,`-o`,`ConnectTimeout=10`,s,`${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()}`);o?.(`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}`);o?.(`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 i(`[SSHDeploy] deployed successfully, remote version: ${h.stdout}`),o?.(`Deployed v${h.stdout}`),`${N}/${F}`}d(),a(),o();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:a,remoteBin:o}=e,s=t?.onProgress,c,l=`/`;if(o){s?.(`Using custom remote binary, skipping probe/deploy…`),c=o,i(`[SSH] custom remoteBin: ${o}`);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,s);i(`[SSH] probe result: ${JSON.stringify(e)}`),l=e.defaultCwd,c=e.binaryPath??`~/.local/bin/claude`,(!e.hasBinary||e.remoteVersion!==r)&&(s?.(e.hasBinary?`Updating remote binary (${e.remoteVersion} → ${r})…`:`Deploying binary to remote…`),c=await R({host:n,remotePlatform:e.remotePlatform,remoteArch:e.remoteArch,localVersion:r,onProgress:s}))}let{proxy:u,localAddress:d,authEnv:f}=await E();i(`[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(c,`--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(...a);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(` `)),s?.(`Starting remote session…`),i(`[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(o){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}i(`[SSH] remote session initialized, remoteCwd=${b}`);let S=v,C=async()=>{i(`[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`}),a=[];return G(r,a),await W(r,b),S=r,y.length=0,y.push(...a),r};return{remoteCwd:b,get proc(){return S},proxy:u,createManager(e){return new x(S,{...e,reconnect:C})},getStderrTail(){return y.slice(-20).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 a=f(r),o;try{o=Bun.spawn([a.execPath,...a.args],{stdin:`pipe`,stdout:`pipe`,stderr:`pipe`,env:{...a.env,...n}})}catch(e){throw t.stop(),new V(`Failed to spawn local CLI process: ${e instanceof Error?e.message:String(e)}`)}i(`[SSH] local session spawned, waiting for init message...`);let s=[];G(o,s);let c;try{c=await W(o,e.cwd)}catch(e){throw t.stop(),o.kill(),e}i(`[SSH] local session initialized, remoteCwd=${c}`);let l=o,u=async()=>{i(`[SSH] local reconnect: re-spawning CLI with --continue`);let e=[...r];e.includes(`--continue`)||e.push(`--continue`);let t=f(e),a=Bun.spawn([t.execPath,...t.args],{stdin:`pipe`,stdout:`pipe`,stderr:`pipe`,env:{...t.env,...n}}),o=[];return G(a,o),await W(a,c),l=a,s.length=0,s.push(...o),a};return{remoteCwd:c,get proc(){return l},proxy:t,createManager(e){return new x(l,{...e,reconnect:u})},getStderrTail(){return s.slice(-20).join(``)}}}async function W(e,t){let n=e.stdout;if(!n)throw new V(`Child process stdout is not readable`);let i=n.getReader(),a=new TextDecoder,o=``,s=Date.now()+z;try{for(;Date.now()<s;){let e=s-Date.now(),n=await Promise.race([i.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=r(n);if(e.type===`system`&&e.subtype===`init`)return i.releaseLock(),e.cwd||t||process.cwd()}catch{}}}}catch(e){throw i.releaseLock(),e instanceof V?e:new V(`Error reading init message: ${e instanceof Error?e.message:String(e)}`)}throw i.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,r}from"./createSession-DRqkLZWt.js";t();export{n as createBridgeSession,r as getBridgeSession,e as updateBridgeSessionTitle};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{$c as n,Cr as r,Dr as i,Ei as a,Fp as o,GC as s,Gu as c,Ir as l,Iu as u,Pp as d,Pu as f,TT as ee,Ti as te,Tr as ne,Wu as re,ZC as p,dd as ie,ed as ae,hr as m,li as h,sr as oe,td as se,tl as g,ud as ce,wT as le}from"./loadAgentsDir-BL93ulMm.js";import{C as ue,D as _,Gr as v,H as de,I as y,P as b,T as x,Wt as fe,Xn as pe,ai as me,di as S,fi as C,hn as he,k as ge,ot as _e,p as ve,t as w,ui as ye}from"./src-P_wYS_NJ2.js";import{t as T}from"./jsx-runtime-Bb4Xn-E0.js";import{Wt as be,et as xe,pt as Se}from"./state-BemZdQIl.js";import{S as E,c as D,i as Ce,x as we}from"./debug-BecbSVoN.js";import{Ln as O,Rn as Te}from"./settings-D4CpDv2y.js";import{i as Ee,m as De}from"./git-DBlOv64X.js";import{a as k,o as Oe,s as ke}from"./log-Dauqle-Z.js";import{n as Ae,r as A}from"./analytics-DJobLaWP.js";import{C as j,d as je,m as Me,v as Ne}from"./startupProfiler-CmH_aVy2.js";import{_ as M,h as N}from"./model-Bgh_r4lg.js";import{i as Pe,r as Fe}from"./shellQuote-DS6WrivY.js";import{n as Ie,t as Le}from"./useExitOnCtrlCDWithKeybindings-DEEJhm_W.js";import{t as Re}from"./SearchBox-C9vUA4IM.js";import{n as ze,t as Be}from"./useSearchInput-gUDbkLaC.js";import{n as P,t as F}from"./Messages-qqwHuAW5.js";function Ve({log:e,onExit:t,onSelect:r}){let[a,o]=I.useState(null);I.useEffect(()=>{o(null),i(e)&&l(e).then(o)},[e]);let s=i(e)&&a===null,c=a??e,u=m(c)||``,f=n();return fe(`confirm:no`,t,{context:`Confirmation`}),fe(`confirm:yes`,(0,I.useCallback)(()=>{r(a??e)},[r,a,e]),{context:`Confirmation`}),s?(0,L.jsxs)(y,{flexDirection:`column`,padding:1,children:[(0,L.jsx)(ve,{message:`Loading session…`}),(0,L.jsx)(b,{dimColor:!0,children:(0,L.jsx)(x,{children:(0,L.jsx)(d,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})})})]}):(0,L.jsxs)(y,{flexDirection:`column`,children:[(0,L.jsx)(F,{messages:c.messages,tools:f,commands:[],verbose:!0,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:u,screen:`transcript`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1}),(0,L.jsxs)(y,{flexShrink:0,flexDirection:`column`,borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:`single`,paddingLeft:2,children:[(0,L.jsxs)(b,{children:[Me(c.modified),` · `,c.messageCount,` messages`,c.gitBranch?` · ${c.gitBranch}`:``]}),(0,L.jsx)(b,{dimColor:!0,children:(0,L.jsxs)(x,{children:[(0,L.jsx)(_,{shortcut:`Enter`,action:`resume`}),(0,L.jsx)(d,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})]})}var I,L,He=e((()=>{I=t(C(),1),w(),s(),g(),Ne(),r(),o(),P(),L=T()}));function R(e,t){if(e===B)return 5;let n=v(e),r=t?Math.min(n,t-V-H):n;return Math.max(0,r)+V+H}function Ue(e,t){let n=t-V-H;return v(e)<=n?e:n<=1?e.charAt(0):j(e,n)}function We({tabs:e,selectedIndex:t,availableWidth:n,showAllProjects:r=!1}){let i=r?`Resume (All Projects)`:`Resume`,a=i.length+1,o=Math.max(Ye,W),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=>R(e,l)),d=0,f=e.length;if(u.reduce((e,t,n)=>e+t+ +(n<u.length-1),0)>s){let t=s-Je,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 ee=d,te=e.length-f,ne=e.slice(d,f),re=ne.map((e,t)=>d+t);return(0,z.jsxs)(y,{flexDirection:`row`,gap:1,children:[(0,z.jsx)(b,{color:`suggestion`,children:i}),ee>0&&(0,z.jsxs)(b,{dimColor:!0,children:[U,ee]}),ne.map((e,t)=>{let n=re[t]===c,r=e===B?e:`#${Ue(e,l-V)}`;return(0,z.jsxs)(b,{backgroundColor:n?`suggestion`:void 0,color:n?`inverseText`:void 0,bold:n,children:[` `,r,` `]},e)}),te>0?(0,z.jsxs)(b,{dimColor:!0,children:[Ge,te,Ke]}):(0,z.jsx)(b,{dimColor:!0,children:qe})]})}var z,B,V,H,U,Ge,Ke,qe,Je,Ye,W,G=e((()=>{C(),w(),Ne(),z=T(),B=`All`,V=2,H=1,U=`← `,Ge=`→`,Ke=` (tab to cycle)`,qe=`(tab to cycle)`,Je=5,Ye=18,W=14}));function Xe({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:ee,onUpFromFirstItem:te}){let[ne,re]=K.useState(new Set),p=K.useRef(!1),ie=K.useRef(null),m=K.useCallback(e=>l?l(e):ne.has(e),[l,ne]),h=K.useMemo(()=>{let t=[];function n(e,r,i){let a=!!e.children&&e.children.length>0,o=m(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,m]),oe=K.useCallback(e=>e?`▼ `:`▶ `,[]),se=K.useCallback(e=>` ▸ `,[]),g=f??oe,ce=ee??se,le=K.useCallback(e=>{let t=``;return e.hasChildren?t=g(e.isExpanded):e.depth>0&&(t=ce(e.depth)),t+e.node.label},[g,ce]),ue=K.useMemo(()=>h.map(e=>({label:le(e),description:e.node.description,dimDescription:e.node.dimDescription??!0,value:e.node.id})),[h,le]),_=K.useMemo(()=>{let e=new Map;return h.forEach(t=>e.set(t.node.id,t.node)),e},[h]),v=K.useCallback(e=>h.find(t=>t.node.id===e),[h]),de=K.useCallback((e,t)=>{let n=v(e);!n||!n.hasChildren||(t?u?u(e):re(t=>new Set(t).add(e)):d?d(e):re(t=>{let n=new Set(t);return n.delete(e),n}))},[v,u,d]);return(0,Ze.jsx)(y,{tabIndex:0,autoFocus:!0,onKeyDown:e=>{if(!i||s)return;let t=v(i);if(t){if(e.key===`right`&&t.hasChildren)e.preventDefault(),de(i,!0);else if(e.key===`left`){if(t.hasChildren&&t.isExpanded)e.preventDefault(),de(i,!1);else if(t.parentId!==void 0&&(e.preventDefault(),p.current=!0,de(t.parentId,!1),r)){let e=_.get(t.parentId);e&&r(e)}}}},children:(0,Ze.jsx)(ae,{options:ue,onChange:K.useCallback(e=>{let n=_.get(e);n&&t(n)},[_,t]),onFocus:K.useCallback(e=>{if(p.current){p.current=!1;return}if(ie.current!==e&&(ie.current=e,r)){let t=_.get(e);t&&r(t)}},[r,_]),onCancel:n,defaultFocusValue:i,visibleOptionCount:a,layout:o,isDisabled:s,hideIndexes:c,onUpFromFirstItem:te})})}var K,Ze,Qe=e((()=>{K=t(C(),1),w(),se(),Ze=T()}));function $e(e,t){return j(e.replace(/\s+/g,` `).trim(),t)}function et({before:e,match:t,after:n},r){return ye.dim(e)+r(t)+ye.dim(n)}function tt(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 nt(e,t,n){let{isGroupHeader:r=!1,isChild:i=!1,forkCount:a=0}=n||{},o=r&&a>0?lt:i?ut:0,s=r&&a>0?` (+${a} other ${a===1?`session`:`sessions`})`:``,c=e.isSidechain?` (sidechain)`:``,l=t-o-c.length-s.length;return`${$e(k(e),l)}${c}${s}`}function rt(e,t){let{isChild:n=!1,showProjectPath:r=!1}=t||{},i=n?` `:``,a=je(e),o=r&&e.projectPath?` · ${e.projectPath}`:``;return i+a+o}function it({logs:e,maxHeight:t=1/0,forceWidth:n,onCancel:r,onSelect:i,onLogsChanged:a,onLoadMore:o,initialSearchQuery:s,showAllProjects:c=!1,onToggleAllProjects:l,onAgenticSearch:u}){let ee=_e(),p=n===void 0?ee.columns:n,ie=Ie(r),se=pe(),g=ne(),[le]=de(),v=re(le),S=q.useMemo(()=>e=>me(e,v.warning),[v.warning]),[C,ve]=q.useState(null),[w,ye]=q.useState(!1),[T,be]=q.useState(!1),[E,D]=q.useState(!1),Ce=q.useMemo(()=>xe(),[]),[we,O]=q.useState(``),[Te,De]=q.useState(0),[Oe,ke]=q.useState(new Set),[Ae,j]=q.useState(null),[Me,Ne]=q.useState(1),[M,N]=q.useState(`list`),[Pe,Fe]=q.useState(null),Le=q.useRef(null),[Re,Be]=q.useState(0),[P,F]=q.useState({status:`idle`}),[I,L]=q.useState(!1),He=q.useRef(null),{query:R,setQuery:Ue,cursorOffset:z}=ze({isActive:M===`search`&&P.status!==`searching`,onExit:()=>{N(`list`),A(`tengu_session_search_toggled`,{enabled:!1})},onExitUp:()=>{N(`list`),A(`tengu_session_search_toggled`,{enabled:!1})},passthroughCtrlKeys:[`n`],initialQuery:s||``}),B=q.useDeferredValue(R),[V,H]=q.useState(``);q.useEffect(()=>{if(!B){H(``);return}let e=setTimeout(H,300,B);return()=>clearTimeout(e)},[B]);let[U,Ge]=q.useState(null),[Ke,qe]=q.useState(!1);q.useEffect(()=>{Ee().then(e=>ve(e)),te(Ce).then(e=>{D(e.length>1)})},[Ce]);let Je=q.useMemo(()=>new Map(e.map(e=>[e,ot(e)])),[e]),Ye=q.useMemo(()=>null,[e,Je,!1]),W=q.useMemo(()=>ct(e),[e]),G=W.length>0,K=q.useMemo(()=>G?[`All`,...W]:[],[G,W]),Ze=K.length>0&&Re<K.length?Re:0,Qe=K[Ze],it=Qe===`All`?void 0:Qe,at=+!!G,lt=q.useMemo(()=>{let t=e;return g&&(t=e.filter(e=>{let t=Se(),n=m(e);return!!(t&&n===t||e.customTitle||oe(e.messages)||e.firstPrompt||e.customTitle)})),it!==void 0&&(t=t.filter(e=>e.tag===it)),w&&C&&(t=t.filter(e=>e.gitBranch===C)),E&&!T&&(t=t.filter(e=>e.projectPath===Ce)),t},[e,g,it,w,C,E,T,Ce]),ut=q.useMemo(()=>{if(!R)return lt;let e=R.toLowerCase();return lt.filter(t=>{let n=k(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)})},[lt,R]);q.useEffect(()=>{},[B,V,!1]),q.useEffect(()=>{Ge(null),qe(!1)},[V,Ye,!1]);let{filteredLogs:Y,snippets:X}=q.useMemo(()=>{let e=new Map,t=ut;if(U&&V&&U.query===V){for(let t of U.results)if(t.searchableText){let n=tt(t.searchableText,V,dt);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}},[ut,U,V]),Z=q.useMemo(()=>P.status===`results`&&P.results.length>0?P.results:Y,[P,Y]),Q=Math.max(30,p-4),ft=q.useMemo(()=>{if(!g)return[];let e=st(Z);return Array.from(e.entries()).map(([e,t])=>{let n=t[0],r=Z.indexOf(n),i=X.get(n),a=i?et(i,S):null;if(t.length===1){let t=rt(n,{showProjectPath:c});return{id:`log:${e}:0`,value:{log:n,indexInFiltered:r},label:nt(n,Q),description:a?`${t}\n ${a}`:t,dimDescription:!0}}let o=t.length-1,s=t.slice(1).map((t,n)=>{let r=Z.indexOf(t),i=X.get(t),a=i?et(i,S):null,o=rt(t,{isChild:!0,showProjectPath:c});return{id:`log:${e}:${n+1}`,value:{log:t,indexInFiltered:r},label:nt(t,Q,{isChild:!0}),description:a?`${o}\n ${a}`:o,dimDescription:!0}}),l=rt(n,{showProjectPath:c});return{id:`group:${e}`,value:{log:n,indexInFiltered:r},label:nt(n,Q,{isGroupHeader:!0,forkCount:o}),description:a?`${l}\n ${a}`:l,dimDescription:!0,children:s}})},[g,Z,Q,c,X,S]),pt=q.useMemo(()=>g?[]:Z.map((e,t)=>{let n=$e(k(e)+(e.isSidechain?` (sidechain)`:``),Q),r=je(e),i=c&&e.projectPath?` · ${e.projectPath}`:``,a=X.get(e),o=a?et(a,S):null;return{label:n,description:o?`${r}${i}\n ${o}`:r+i,dimDescription:!0,value:t.toString()}}),[g,Z,S,Q,c,X]),$=Ae?.value.log??null,mt=()=>{if(!g||!$)return``;let e=m($);if(!e)return``;let t=Z.filter(t=>m(t)===e);if(!(t.length>1))return``;let n=Oe.has(e);return t.indexOf($)>0||n?`← to collapse`:`→ to expand`},ht=q.useCallback(async()=>{let e=$?m($):void 0;if(!$||!e){N(`list`),O(``);return}we.trim()&&(await h(e,we.trim(),$.fullPath),g&&a&&a()),N(`list`),O(``)},[$,we,a,g]),gt=q.useCallback(()=>{N(`list`),A(`tengu_session_search_toggled`,{enabled:!1})},[]),_t=q.useCallback(()=>{N(`search`),A(`tengu_session_search_toggled`,{enabled:!0})},[]),vt=q.useCallback(async()=>{if(!R.trim()||!u||!0)return;He.current?.abort();let t=new AbortController;He.current=t,F({status:`searching`}),A(`tengu_agentic_search_started`,{query_length:R.length});try{let n=await u(R,e,t.signal);if(t.signal.aborted)return;F({status:`results`,results:n,query:R}),A(`tengu_agentic_search_completed`,{query_length:R.length,results_count:n.length})}catch(e){if(t.signal.aborted)return;F({status:`error`,message:e instanceof Error?e.message:`Search failed`}),A(`tengu_agentic_search_error`,{query_length:R.length})}},[R,u,!1,e]);q.useEffect(()=>{P.status!==`idle`&&P.status!==`searching`&&(P.status===`results`&&P.query!==R||P.status===`error`)&&F({status:`idle`})},[R,P]),q.useEffect(()=>()=>{He.current?.abort()},[]);let yt=q.useRef(P.status);q.useEffect(()=>{let e=yt.current;if(yt.current=P.status,e===`searching`&&P.status===`results`){if(g&&ft.length>0)j(ft[0]);else if(!g&&Z.length>0){let e=Z[0];j({id:`0`,value:{log:e,indexInFiltered:0},label:``})}}},[P.status,g,ft,Z]);let bt=q.useCallback(e=>{let t=parseInt(e,10),n=Z[t];!n||Le.current===t.toString()||(Le.current=t.toString(),j({id:t.toString(),value:{log:n,indexInFiltered:t},label:``}),Ne(t+1))},[Z]),xt=q.useCallback(e=>{j(e);let t=Z.findIndex(t=>m(t)===m(e.value.log));t>=0&&Ne(t+1)},[Z]);fe(`confirm:no`,()=>{He.current?.abort(),F({status:`idle`}),A(`tengu_agentic_search_cancelled`,{})},{context:`Confirmation`,isActive:M!==`preview`&&P.status===`searching`}),fe(`confirm:no`,()=>{N(`list`),O(``)},{context:`Settings`,isActive:M===`rename`&&P.status!==`searching`}),fe(`confirm:no`,()=>{Ue(``),L(!1),r?.()},{context:`Confirmation`,isActive:M!==`preview`&&M!==`rename`&&M!==`search`&&I&&P.status!==`searching`}),he((e,t)=>{if(M!==`preview`&&P.status!==`searching`&&M!==`rename`)if(M===`search`)e.toLowerCase()===`n`&&t.ctrl?gt():(t.return||t.downArrow)&&R.trim();else{if(I){if(t.return){vt(),L(!1);return}else if(t.downArrow){L(!1);return}else if(t.upArrow){N(`search`),L(!1);return}}if(G&&t.tab){let e=t.shift?-1:1;Be(t=>{let n=((t<K.length?t:0)+K.length+e)%K.length,r=K[n];return A(`tengu_session_tag_filter_changed`,{is_all:r===`All`,tag_count:W.length}),n});return}let n=!t.ctrl&&!t.meta,r=e.toLowerCase();if(r===`a`&&t.ctrl&&l)l(),A(`tengu_session_all_projects_toggled`,{enabled:!c});else if(r===`b`&&t.ctrl){let e=!w;ye(e),A(`tengu_session_branch_filter_toggled`,{enabled:e})}else if(r===`w`&&t.ctrl&&E){let e=!T;be(e),A(`tengu_session_worktree_filter_toggled`,{enabled:e})}else r===`/`&&n?(N(`search`),A(`tengu_session_search_toggled`,{enabled:!0})):r===`r`&&t.ctrl&&$?(N(`rename`),O(``),A(`tengu_session_rename_started`,{})):r===`v`&&t.ctrl&&$?(Fe($),N(`preview`),A(`tengu_session_preview_opened`,{messageCount:$.messageCount})):$&&n&&e.length>0&&!/^\s+$/.test(e)&&(N(`search`),Ue(e),A(`tengu_session_search_toggled`,{enabled:!0}))}},{isActive:!0});let St=[];w&&C&&St.push(C),E&&!T&&St.push(`current worktree`);let Ct=8+ +(St.length>0&&M!==`search`)+at,wt=Math.max(1,Math.floor((t-Ct-2)/3));return q.useEffect(()=>{if(!o)return;let e=wt*2;Me+e>=Z.length&&o(wt*3)},[Me,wt,Z.length,o]),e.length===0?null:M===`preview`&&Pe&&g?(0,J.jsx)(Ve,{log:Pe,onExit:()=>{N(`list`),Fe(null)},onSelect:i}):(0,J.jsxs)(y,{flexDirection:`column`,height:t-1,children:[(0,J.jsx)(y,{flexShrink:0,children:(0,J.jsx)(ue,{color:`suggestion`})}),(0,J.jsx)(y,{flexShrink:0,children:(0,J.jsx)(b,{children:` `})}),G?(0,J.jsx)(We,{tabs:K,selectedIndex:Ze,availableWidth:p,showAllProjects:c}):(0,J.jsx)(y,{flexShrink:0,children:(0,J.jsxs)(b,{bold:!0,color:`suggestion`,children:[`Resume Session`,M===`list`&&Z.length>wt&&(0,J.jsxs)(b,{dimColor:!0,children:[` `,`(`,Me,` of `,Z.length,`)`]})]})}),(0,J.jsx)(ge,{query:R,isFocused:M===`search`,isTerminalFocused:se,cursorOffset:z}),St.length>0&&M!==`search`&&(0,J.jsx)(y,{flexShrink:0,paddingLeft:2,children:(0,J.jsx)(b,{dimColor:!0,children:(0,J.jsx)(x,{children:St})})}),(0,J.jsx)(y,{flexShrink:0,children:(0,J.jsx)(b,{children:` `})}),P.status===`searching`&&(0,J.jsxs)(y,{paddingLeft:1,flexShrink:0,children:[(0,J.jsx)(f,{}),(0,J.jsx)(b,{children:` Searching…`})]}),P.status===`results`&&P.results.length>0&&(0,J.jsx)(y,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(b,{dimColor:!0,italic:!0,children:`Claude found these results:`})}),P.status===`results`&&P.results.length===0&&Y.length===0&&(0,J.jsx)(y,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(b,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),P.status===`error`&&Y.length===0&&(0,J.jsx)(y,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(b,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),!!R.trim()&&u&&!1,P.status===`searching`?null:M===`rename`&&$?(0,J.jsxs)(y,{paddingLeft:2,flexDirection:`column`,children:[(0,J.jsx)(b,{bold:!0,children:`Rename session:`}),(0,J.jsx)(y,{paddingTop:1,children:(0,J.jsx)(ce,{value:we,onChange:O,onSubmit:ht,placeholder:k($,`Enter new session name`),columns:p,cursorOffset:Te,onChangeCursorOffset:De,showCursor:!0})})]}):g?(0,J.jsx)(Xe,{nodes:ft,onSelect:e=>{i(e.value.log)},onFocus:xt,onCancel:r,focusNodeId:Ae?.id,visibleOptionCount:wt,layout:`expanded`,isDisabled:M===`search`||I,hideIndexes:!1,isNodeExpanded:e=>{if(M===`search`||w)return!0;let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;return t?Oe.has(t):!1},onExpand:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&(ke(e=>new Set(e).add(t)),A(`tengu_session_group_expanded`,{}))},onCollapse:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&ke(e=>{let n=new Set(e);return n.delete(t),n})},onUpFromFirstItem:_t}):(0,J.jsx)(ae,{options:pt,onChange:e=>{let t=Z[parseInt(e,10)];t&&i(t)},visibleOptionCount:wt,onCancel:r,onFocus:bt,defaultFocusValue:Ae?.id.toString(),layout:`expanded`,isDisabled:M===`search`||I,onUpFromFirstItem:_t}),(0,J.jsx)(y,{paddingLeft:2,children:ie.pending?(0,J.jsxs)(b,{dimColor:!0,children:[`Press `,ie.keyName,` again to exit`]}):M===`rename`?(0,J.jsx)(b,{dimColor:!0,children:(0,J.jsxs)(x,{children:[(0,J.jsx)(_,{shortcut:`Enter`,action:`save`}),(0,J.jsx)(d,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):P.status===`searching`?(0,J.jsx)(b,{dimColor:!0,children:(0,J.jsxs)(x,{children:[(0,J.jsx)(b,{children:`Searching with Claude…`}),(0,J.jsx)(d,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):I?(0,J.jsx)(b,{dimColor:!0,children:(0,J.jsxs)(x,{children:[(0,J.jsx)(_,{shortcut:`Enter`,action:`search`}),(0,J.jsx)(_,{shortcut:`↓`,action:`skip`}),(0,J.jsx)(d,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):M===`search`?(0,J.jsx)(b,{dimColor:!0,children:(0,J.jsxs)(x,{children:[(0,J.jsx)(b,{children:`Type to Search`}),(0,J.jsx)(_,{shortcut:`Enter`,action:`select`}),(0,J.jsx)(d,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`clear`})]})}):(0,J.jsx)(b,{dimColor:!0,children:(0,J.jsxs)(x,{children:[l&&(0,J.jsx)(_,{shortcut:`Ctrl+A`,action:`show ${c?`current dir`:`all projects`}`}),C&&(0,J.jsx)(_,{shortcut:`Ctrl+B`,action:`toggle branch`}),E&&(0,J.jsx)(_,{shortcut:`Ctrl+W`,action:`show ${T?`current worktree`:`all worktrees`}`}),(0,J.jsx)(_,{shortcut:`Ctrl+V`,action:`preview`}),(0,J.jsx)(_,{shortcut:`Ctrl+R`,action:`rename`}),(0,J.jsx)(b,{children:`Type to search`}),(0,J.jsx)(d,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`}),mt()&&(0,J.jsx)(b,{children:mt()})]})})})]})}function at(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 ot(e){let t=(e.messages.length<=Y?e.messages:[...e.messages.slice(0,X),...e.messages.slice(-1e3)]).map(at).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>Z?n.slice(0,Z):n}function st(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 ct(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,lt,ut,Y,X,Z,dt,Q=e((()=>{S(),q=t(C(),1),be(),Le(),Be(),p(),w(),s(),Ae(),Ne(),a(),De(),Oe(),r(),c(),o(),se(),Re(),He(),u(),G(),ie(),Qe(),J=T(),lt=2,ut=4,Y=2e3,X=1e3,Z=5e4,dt=50}));function ft(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 pt(e){if(e.length===0)return``;let t=(e.length<=gt?e:[...e.slice(0,gt/2),...e.slice(-100/2)]).map(ft).filter(Boolean).join(` `).replace(/\s+/g,` `).trim();return t.length>ht?t.slice(0,ht)+`…`:t}function $(e,t){return!!(k(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&&pt(e.messages).toLowerCase().includes(t))}async function mt(e,t,n){if(!e.trim()||t.length===0)return[];let r=e.toLowerCase(),a=t.filter(e=>$(e,r)),o;if(a.length>=_t)o=a.slice(0,_t);else{let e=t.filter(e=>!$(e,r)),n=_t-a.length;o=[...a,...e.slice(0,n)]}D(`Agentic search: ${o.length}/${t.length} logs, query="${e}", matching: ${a.length}, with messages: ${O(o,e=>e.messages?.length>0)}`);let s=o.map(async e=>{if(i(e))try{return await l(e)}catch(t){return ke(t),e}return e}),c=await Promise.all(s);D(`Agentic search: loaded ${O(c,e=>e.messages?.length>0)}/${o.length} logs with transcripts`);let u=`Sessions:
|
|
2
|
-
${c.map((e,t)=>{let n=[`${t}:`],r=k(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=pt(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.`;D(`Agentic search prompt (first 500 chars): ${u.slice(0,500)}...`);try{let e=N();D(`Agentic search using model: ${e}`);let t=(await ee({model:e,system:vt,messages:[{role:`user`,content:u}],signal:n,querySource:`session_search`})).content.find(e=>e.type===`text`);if(!t||t.type!==`text`)return D(`No text content in agentic search response`),[];D(`Agentic search response: ${t.text}`);let r=t.text.match(/\{[\s\S]*\}/);if(!r)return D(`Could not find JSON in agentic search response`),[];let i=(E(r[0]).relevant_indices||[]).filter(e=>e>=0&&e<c.length).map(e=>c[e]);return D(`Agentic search found ${i.length} relevant sessions`),i}catch(e){return ke(e),D(`Agentic search error: ${e}`),[]}}var ht,gt,_t,vt,yt=e((()=>{Te(),Ce(),Oe(),M(),r(),le(),we(),ht=2e3,gt=100,_t=100,vt=`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 bt(e,t){let n=xe();if(!t||!e.projectPath||e.projectPath===n)return{isCrossProject:!1};let r=m(e);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${Pe([e.projectPath])} && claude --resume ${r}`,projectPath:e.projectPath}}var xt=e((()=>{be(),Fe(),r()}));export{it as a,yt as i,xt as n,Q as o,mt as r,bt as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./cwd-Cfdf7z7s.js";e();export{t as getCwd};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class{};export{e as DangerousBackend};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{n as r,t as i}from"./axios-DaWTGg7G.js";import{d as a,h as o}from"./config-aRiTrtCv.js";import{o as s,s as c}from"./log-Dauqle-Z.js";import{W as l,_ as u,ai as d,r as f,si as p,z as m}from"./model-Bgh_r4lg.js";import{Z as h,et as g}from"./esm-Ka3lhafK.js";import{f as _,p as v}from"./firstPartyEventLogger-BHjBQH0J.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){c(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(d()!==`firstParty`)return;let n=F;if(n===null&&(n=await I()),!(!n||!j.has(e)))try{let{envContext:n,...r}=await h({model:t.model,betas:t.betas}),i={...r,...n,...t,userBucket:R()};if(typeof i.toolName==`string`&&i.toolName.startsWith(`mcp__`)&&(i.toolName=`mcp`),typeof i.model==`string`){let e=f(i.model.replace(/\[1m]$/i,``));i.model=e in m?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){c(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(),o(),s(),u(),p(),l(),_(),g(),E=process.env.DATADOG_LOGS_ENDPOINT??``,D=process.env.DATADOG_API_KEY??``,O=15e3,k=100,A=5e3,j=new Set(`tengu_api_error.tengu_api_success.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`,`model`,`platform`,`provider`,`skillMode`,`subscriptionType`,`toolName`,`userBucket`,`userType`,`version`,`versionBase`],N=[],P=null,F=null,I=t(async()=>{if(v()||!E||!D)return F=!1,!1;try{return F=!0,!0}catch(e){return c(e),F=!1,!1}}),L=30,R=t(()=>{let e=a(),t=y(`sha256`).update(e).digest(`hex`);return parseInt(t.slice(0,8),16)%L})}));export{C as n,w as r,z as t};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{i as r,o as i,t as a}from"./cliLaunch-BTpfAGGI.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,o as n}from"./detectRepository-C15umvKN.js";t();export{e as parseGitHubRepository,n as parseGitRemote};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Doctor-Dz4TuYas.js";var i,a;e((()=>{n(),i=t(),a=(e,t,n)=>Promise.resolve((0,i.jsx)(r,{onDone:e}))}))();export{a as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$d as t,St as n,Tt as r,XT as i,YT as a,tf as o,vc as s,yc as c}from"./loadAgentsDir-BL93ulMm.js";import{fi as l}from"./src-P_wYS_NJ2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{n as d,t as f}from"./ExitFlow-BwyAtIHx.js";import{spawnSync as p}from"child_process";function m(){return i(_)??`Goodbye!`}async function h(e){if(c())return e(),p(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let r=n()!==null;return r?(0,g.jsx)(f,{showWorktree:r,onDone:e,onCancel:()=>e()}):(e(m()),await t(0,`prompt_input_exit`),null)}var g,_;e((()=>{a(),l(),d(),s(),o(),r(),g=u(),_=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{h as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ic as e,Lc as t,Rc as n,zc as r}from"./loadAgentsDir-BL93ulMm.js";r();export{e as drainPendingExtraction,t as executeExtractMemories,n as initExtractMemories};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./fast-DWn40OcQ.js";t();export{n as FastModePicker,e as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./firstPartyEventLogger-BHjBQH0J.js";e();export{t as initialize1PEventLogging};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$ as t,Ba as n,Oa as r,_v as i,et as a}from"./loadAgentsDir-BL93ulMm.js";import{P as o,R as s,c,i as l}from"./debug-BecbSVoN.js";import{s as u,u as d}from"./types-DafcFtmb.js";import{at as f}from"./sessionState-D-SaBzWD.js";import{r as p,t as m}from"./sessionTitle-uCuYaNif.js";async function h(e,t){let n=m(e);if(!n)return null;try{let e=await a({systemPrompt:f([`Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.`]),userPrompt:n,outputFormat:{type:`json_schema`,schema:{type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1}},signal:t,options:{querySource:`rename_generate_name`,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),i=d(Array.isArray(e.message.content)?r(e.message.content):e.message.content);return i&&typeof i==`object`&&`name`in i&&typeof i.name==`string`?i.name:null}catch(e){return c(`generateSessionName failed: ${o(e)}`,{level:`error`}),null}}var g=e((()=>{t(),l(),s(),u(),n(),p(),i()}));export{g as n,h as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,m as n,r,u as i}from"./git-DBlOv64X.js";n();export{r as findGitRoot,t as getBranch,e as getDefaultBranch,i as getRemoteUrl};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Ba as t,DT as n,ET as r,Ky as i,Xy as a,Ya as o,ga as s,it as c,qa as l,st as u}from"./loadAgentsDir-BL93ulMm.js";import{c as d,i as f}from"./debug-BecbSVoN.js";import{V as p,W as m}from"./model-Bgh_r4lg.js";import{F as h,I as g,M as _,N as v,R as y,nt as b}from"./sessionState-D-SaBzWD.js";import{n as x,t as S}from"./openaiShared-G2-w4gJt.js";import{randomUUID as C}from"crypto";async function*w(e,t,n,a,c){try{let s=b(c.model),f=o(e,n),m=(await Promise.all(n.map(e=>u(e,{getToolPermissionContext:c.getToolPermissionContext,tools:n,agents:c.agents,allowedAgentTypes:c.allowedAgentTypes,model:c.model})))).filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),_=y(f,t),S=g(m),w=h(c.toolChoice),T=r({maxRetries:0,fetchOverride:c.fetchOverride,source:c.querySource});d(`[Grok] Calling model=${s}, messages=${_.length}, tools=${S.length}`);let E=v(await T.chat.completions.create({model:s,messages:_,...S.length>0&&{tools:S,...w&&{tool_choice:w}},stream:!0,stream_options:{include_usage:!0},...c.temperatureOverride!==void 0&&{temperature:c.temperatureOverride}},{signal:a}),s),D={},O=null,k={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},A=0,j=Date.now();for await(let e of E){switch(e.type){case`message_start`:O=e.message,A=Date.now()-j,e.message.usage&&(k=x(k,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?D[t]={...n,input:``}:n.type===`text`?D[t]={...n,text:``}:n.type===`thinking`?D[t]={...n,thinking:``,signature:``}:D[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=D[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=D[e.index];if(!t||!O)break;yield{message:{...O,content:l([t],n,c.agentId)},requestId:void 0,type:`assistant`,uuid:C(),timestamp:new Date().toISOString()};break}case`message_delta`:{let t=e.usage;t&&(k=x(k,t));break}case`message_stop`:break}e.type===`message_stop`&&k.input_tokens+k.output_tokens>0&&i(p(s,k),k,c.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:A}:void 0}}}catch(e){let t=e instanceof Error?e.message:String(e);d(`[Grok] Error: ${t}`,{level:`error`}),yield s({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{n(),S(),_(),t(),c(),f(),a(),m()}))();export{w as queryModelGrok};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Xt as e,_n as t,un as n,vn as r}from"./loadAgentsDir-BL93ulMm.js";r();export{e as executeSessionEndHooks,n as getSessionEndHookTimeoutMs,t as hasWorktreeCreateHook};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{SE as t,_E as n,bE as r,fE as i,mE as a,pE as o,xE as s,yE as c}from"./loadAgentsDir-BL93ulMm.js";import{C as l,F as u,R as d,x as f}from"./debug-BecbSVoN.js";import{r as p,t as m}from"./promptEditor-WCkmpejM.js";import{dirname as h}from"path";import{mkdir as g,writeFile as _}from"fs/promises";function v(e){let t=new Set(n.map(e=>r(e.key)));return e.map(e=>{let n={};for(let[i,a]of Object.entries(e.bindings))t.has(r(i))||(n[i]=a);return{context:e.context,bindings:n}}).filter(e=>Object.keys(e.bindings).length>0)}function y(){return l({$schema:`https://www.schemastore.org/claude-code-keybindings.json`,$docs:`https://code.claude.com/docs/en/keybindings`,bindings:v(s)},null,2)+`
|
|
2
|
-
`}var b=e((()=>{f(),t(),c()}));async function x(){if(!a())return{type:`text`,value:`Keybinding customization is not enabled. This feature is currently in preview.`};let e=i(),t=!1;await g(h(e),{recursive:!0});try{await _(e,y(),{encoding:`utf-8`,flag:`wx`})}catch(e){if(u(e)===`EEXIST`)t=!0;else throw e}let n=await m(e);return n.error?{type:`text`,value:`${t?`Opened`:`Created`} ${e}. Could not open in editor: ${n.error}`}:{type:`text`,value:t?`Opened ${e} in your editor.`:`Created ${e} with template. Opened in your editor.`}}e((()=>{o(),b(),d(),p()}))();export{x as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,t}from"./loadAgentsDir-BL93ulMm.js";e();export{t as clearAgentDefinitionsCache};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G_ as e,J_ as t,K_ as n}from"./loadAgentsDir-BL93ulMm.js";e();export{n as loadPluginHooks,t as setupPluginHookHotReload};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,o as n,t as r}from"./localSearch-C5ipegd9.js";n();export{r as clearSkillIndexCache,e as getSkillIndex,t as searchSkills};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=async()=>{},t=async()=>{},n=async()=>null;export{n as probeRunningServer,t as removeServerLock,e as writeServerLock};
|