@readmagic/workmate 0.0.10 → 0.0.12
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-Vmmm7p1c.js → AddWorkspaceDirectory-CtRxzRny.js} +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-_bI4jo_P.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-_yJJ0wqu.js +1 -0
- package/dist/chunks/App-DoAZ7CYS.js +1 -0
- package/dist/chunks/ApproveApiKey-C8LwmDM2.js +1 -0
- package/dist/chunks/ApproveApiKey-DQP3qmb0.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-CDA2noEk.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-CLSACUmo.js → BypassPermissionsModeDialog-COI_V57z.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-Dn8fO-o_.js +1 -0
- package/dist/chunks/{DiffDialog-9AYwtupw.js → DiffDialog-CRWtQ1R5.js} +3 -3
- package/dist/chunks/Doctor-CZ513Df9.js +3 -0
- package/dist/chunks/Doctor-CzPvNZzF.js +1 -0
- package/dist/chunks/ExitFlow-BFeftDv0.js +2 -0
- package/dist/chunks/{Grove-B9-hhkZA.js → Grove-DRZrhbF0.js} +2 -2
- package/dist/chunks/{HybridTransport-MxJ_W_np.js → HybridTransport-BadJQe6u.js} +4 -4
- package/dist/chunks/InvalidConfigDialog-DQaT6aen.js +1 -0
- package/dist/chunks/{InvalidSettingsDialog-YyQcHocx.js → InvalidSettingsDialog-ISzcIGPU.js} +1 -1
- package/dist/chunks/MCPConnectionManager-BpjC7CEo.js +1 -0
- package/dist/chunks/MCPToolListView-Rb1Q--jG.js +1 -0
- package/dist/chunks/{McpParsingWarnings-BCpfHaBK.js → McpParsingWarnings-xv0RZCSL.js} +1 -1
- package/dist/chunks/MessageSelector-BHB55sZb.js +3 -0
- package/dist/chunks/Messages-CPX-nIdA.js +11 -0
- package/dist/chunks/Onboarding-CymgipoF.js +1 -0
- package/dist/chunks/{PromptInputFooterSuggestions-BSA9NrZc.js → PromptInputFooterSuggestions-8-awCxOn.js} +1 -1
- package/dist/chunks/PromptInputHelpMenu-BP3UgCdi.js +1 -0
- package/dist/chunks/QueryEngine-HkswHUNv.js +1 -0
- package/dist/chunks/REPL-CZfg65kg.js +133 -0
- package/dist/chunks/REPL-eZsYNBfl.js +1 -0
- package/dist/chunks/RemoteSessionManager-B4jqKVd3.js +2 -0
- package/dist/chunks/ResumeConversation-B03XN_SP.js +1 -0
- package/dist/chunks/{SSETransport-CoxQ8YpH.js → SSETransport-je346ofV.js} +3 -3
- package/dist/chunks/SearchExtraToolsTool-C85Sanww.js +1 -0
- package/dist/chunks/Settings-C8GKWod1.js +2 -0
- package/dist/chunks/{TeleportProgress-Doucj-50.js → TeleportProgress-zmdAsogZ.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-B5I73j7Y.js → TeleportRepoMismatchDialog-CG32I4cO.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-D6kpr2c6.js → TeleportResumeWrapper-2Yjr74Lq.js} +1 -1
- package/dist/chunks/{ThemePicker-DrC8tlp0.js → ThemePicker-p7_hHk1V.js} +1 -1
- package/dist/chunks/TrustDialog-BVcny9vs.js +1 -0
- package/dist/chunks/{ValidationErrorsList-D_OUa4RT.js → ValidationErrorsList-DSSUWdgd.js} +1 -1
- package/dist/chunks/{WelcomeV2-DvfQHnZY.js → WelcomeV2-BnSYhyfu.js} +1 -1
- package/dist/chunks/add-dir-Bd7pilVx.js +1 -0
- package/dist/chunks/{agentDisplay-B755vMZE.js → agentDisplay-CfMLGPGH.js} +1 -1
- package/dist/chunks/{agents-CIvP8l0s.js → agents-BT82hwBN.js} +1 -1
- package/dist/chunks/agents-qR6r94-F.js +103 -0
- package/dist/chunks/allErrors-CS77lRvU.js +1 -0
- package/dist/chunks/api-C4VflFau.js +1 -0
- package/dist/chunks/{api-nSHc_GIQ.js → api-DAubp5q9.js} +1 -1
- package/dist/chunks/auth-CNCehj7y.js +1 -0
- package/dist/chunks/auth-DrD9DW6X.js +1 -0
- package/dist/chunks/{auth-5QB6tsfB.js → auth-yDsvFcM7.js} +2 -2
- package/dist/chunks/{autoMode-BnUiK9Cu.js → autoMode-C2lnBot9.js} +6 -6
- package/dist/chunks/backgroundHousekeeping-DbpTGbwl.js +1 -0
- package/dist/chunks/backgroundHousekeeping-SpTxViUq.js +17 -0
- package/dist/chunks/{banner-D0P7wXdw.js → banner-BcAM7iSx.js} +1 -1
- package/dist/chunks/bg-Ci7pG4eo.js +9 -0
- package/dist/chunks/{branch-DFWa4Oxo.js → branch-DJiMa8td.js} +2 -2
- package/dist/chunks/{break-cache-Chj9i9MP.js → break-cache-4rlQORVk.js} +2 -2
- package/dist/chunks/{bridgeConfig-Bb6URf4Q.js → bridgeConfig-BB6Hgali.js} +1 -1
- package/dist/chunks/bridgeConfig-Ccm79Jze.js +1 -0
- package/dist/chunks/{bridgeMessaging-C3huGcR3.js → bridgeMessaging-C9D0Lly2.js} +1 -1
- package/dist/chunks/{bridgePointer-DLYyvRKb.js → bridgePointer-DHWK3LEe.js} +1 -1
- package/dist/chunks/{bridgeStatusUtil-DFMftajD.js → bridgeStatusUtil-D8UbcVrZ.js} +1 -1
- package/dist/chunks/{btw-DSK9R2C8.js → btw-BO2B23f-.js} +1 -1
- package/dist/chunks/caches-BQmbXerw.js +1 -0
- package/dist/chunks/caches-Dtjmjm6G.js +1 -0
- package/dist/chunks/{capacityWake-amzeeBz0.js → capacityWake-ByL6fM6I.js} +1 -1
- package/dist/chunks/ccrClient-BG9HU_fW.js +1 -0
- package/dist/chunks/{claudeDesktop-CsJfF1b-.js → claudeDesktop-Ct_hyICL.js} +1 -1
- package/dist/chunks/{clear-ClFDpWVJ.js → clear-B4XN2fib.js} +1 -1
- package/dist/chunks/cliLaunch-OPOtzhvA.js +1 -0
- package/dist/chunks/client-7lIxWcaM.js +1 -0
- package/dist/chunks/client-B-2ccQZk.js +1 -0
- package/dist/chunks/{client-DFlE4fYh.js → client-BMA05FW8.js} +1 -1
- package/dist/chunks/commands-D_-v6_A0.js +1 -0
- package/dist/chunks/compact-kM0ETtB2.js +2 -0
- package/dist/chunks/config-9rLTDOYW.js +3 -0
- package/dist/chunks/config-Crf6Mzu3.js +1 -0
- package/dist/chunks/{config-CVHMRMwd.js → config-DMKtiMzJ.js} +1 -1
- package/dist/chunks/context-BY5oO5is.js +1 -0
- package/dist/chunks/{context-noninteractive-D5iQhasu.js → context-noninteractive-mAQt1p9l.js} +5 -5
- package/dist/chunks/context-noninteractive-tc4KTYfI.js +1 -0
- package/dist/chunks/conversation-CFIn-KsW.js +1 -0
- package/dist/chunks/conversation-DPI7VKBL.js +1 -0
- package/dist/chunks/createSSHSession-DjLSGm-0.js +6 -0
- package/dist/chunks/createSession-CftIZ3aq.js +1 -0
- package/dist/chunks/createSession-CjdLcRec.js +1 -0
- package/dist/chunks/crossProjectResume-BJqXBzkf.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-BGati3aQ.js +1 -0
- package/dist/chunks/debug-Dr1SjdXn.js +39 -0
- package/dist/chunks/{debugUtils-DX0KAXNK.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-CMEkS5_2.js +1 -0
- package/dist/chunks/{diff-jEJJe58I.js → diff-1HsxKGBh.js} +1 -1
- package/dist/chunks/{directoryCompletion-BbXR2bfy.js → directoryCompletion-ByBTSuLu.js} +1 -1
- package/dist/chunks/doctor-CJfvt9zR.js +1 -0
- package/dist/chunks/entry-CrZCZQQC.js +14 -0
- package/dist/chunks/{envUtils-BDhHQY0-.js → envUtils-DcaKZlRU.js} +1 -1
- package/dist/chunks/{esm-Cf4nSRjF.js → esm-BkOWaWVb.js} +1 -1
- package/dist/chunks/{execFileNoThrow-Dwu6psHW.js → execFileNoThrow-mXq4K0rl.js} +2 -2
- package/dist/chunks/execSyncWrapper-Ne33rRiD.js +1 -0
- package/dist/chunks/exit-B8MA4Ltm.js +1 -0
- package/dist/chunks/{extraUsage-Mi66JwFZ.js → extraUsage-0pUcYexI.js} +1 -1
- package/dist/chunks/extractMemories-DqhN0lba.js +1 -0
- package/dist/chunks/fast-DT5WDe3L.js +1 -0
- package/dist/chunks/{fast-BU4iUZ8E.js → fast-VOu2FUlV.js} +1 -1
- package/dist/chunks/{fileSuggestions-BMfQIDdW.js → fileSuggestions-Be-pyLLq.js} +3 -3
- package/dist/chunks/firstPartyEventLogger-B8RVGBQB.js +1 -0
- package/dist/chunks/{firstPartyEventLogger-B3cXgR67.js → firstPartyEventLogger-aFhcruXA.js} +2 -2
- package/dist/chunks/{flushGate-DgSDVGKZ.js → flushGate-BUSrMj_6.js} +1 -1
- package/dist/chunks/gemini-DB4M-MYv.js +1 -0
- package/dist/chunks/generateSessionName-DhCypqJ_.js +1 -0
- package/dist/chunks/{genericProcessUtils-CmsUPyRz.js → genericProcessUtils-Dc1pfb7J.js} +1 -1
- package/dist/chunks/git-Bs1vtuvX.js +1 -0
- package/dist/chunks/git-CoQQ6YEf.js +6 -0
- package/dist/chunks/githubRepoPathMapping-CmpEaQoo.js +1 -0
- package/dist/chunks/goal-TxXtfkQ6.js +3 -0
- package/dist/chunks/{grok-BXMvezWb.js → grok-D2a_J5wE.js} +1 -1
- package/dist/chunks/{grove-CeOjTaY6.js → grove-BnzBbGsX.js} +1 -1
- package/dist/chunks/{help-5DNZO6_H.js → help-C5ankDi4.js} +1 -1
- package/dist/chunks/{hooks-C637tFtd.js → hooks-BZS105Rd.js} +3 -3
- package/dist/chunks/hooks-D-twhU_z.js +1 -0
- package/dist/chunks/{initReplBridge-D1h10vQ9.js → initReplBridge-DL4klK0C.js} +1 -1
- package/dist/chunks/{install-C-6ItpH0.js → install-NZvHd_40.js} +1 -1
- package/dist/chunks/{instrumentation-DaiPDUst.js → instrumentation-CjBlVlFq.js} +5 -5
- package/dist/chunks/{job-BeYzQUiR.js → job-D502Zf8J.js} +1 -1
- package/dist/chunks/jwtUtils-FQWtM6iM.js +1 -0
- package/dist/chunks/keybindings-D9Boc8FD.js +2 -0
- package/dist/chunks/{launchLocalMemory-CE4J98xO.js → launchLocalMemory-DxC3LojF.js} +2 -2
- package/dist/chunks/{launchOnboarding-BfTdC6vp.js → launchOnboarding-BLp5k_H4.js} +1 -1
- package/dist/chunks/{loadAgentsDir-C7lOqvfh.js → loadAgentsDir-BXtV2jiO.js} +563 -570
- package/dist/chunks/loadAgentsDir-BjsAQWqt.js +1 -0
- package/dist/chunks/loadPluginHooks-Dt3XQ-3N.js +1 -0
- package/dist/chunks/{localSearch-BKrznW5x.js → localSearch-CeP4ef0a.js} +1 -1
- package/dist/chunks/localSearch-Cz8Ot7k2.js +1 -0
- package/dist/chunks/{log-CezCRpAN.js → log-27kCA_9u.js} +1 -1
- package/dist/chunks/{logoV2Utils-BkQfyQ1-.js → logoV2Utils-CEnU8qad.js} +1 -1
- package/dist/chunks/{magicDocs-BpVcON9o.js → magicDocs-YtfrqVC6.js} +4 -4
- package/dist/chunks/main-CGLCy2pM.js +31 -0
- package/dist/chunks/main-CkjTzYj1.js +513 -0
- package/dist/chunks/{managedEnv-DhWRJ5DK.js → managedEnv-B-BNY0xC.js} +1 -1
- package/dist/chunks/managedEnv-K9Si1UuL.js +1 -0
- package/dist/chunks/{mappers-bOab8ipV.js → mappers-IuJeXgvr.js} +1 -1
- package/dist/chunks/mcp-DMBoeQzm.js +6 -0
- package/dist/chunks/mcp-TMOPfLcW.js +1 -0
- package/dist/chunks/mcp-x5rgv-uv.js +2 -0
- package/dist/chunks/{memoize-DsqYrbeR.js → memoize-Co4vS6UF.js} +1 -1
- package/dist/chunks/memory-DDUoR63T.js +1 -0
- package/dist/chunks/{mode-DlKnUM8l.js → mode-GzBwK--u.js} +2 -2
- package/dist/chunks/model-BydaMaPr.js +1 -0
- package/dist/chunks/model-CDnVaVDR.js +1 -0
- package/dist/chunks/model-CIvbC7rW.js +1 -0
- package/dist/chunks/{modelOptions-CxP067Qv.js → modelOptions-ut0xePEe.js} +1 -1
- package/dist/chunks/nativeInstaller-fgCMR_c0.js +1 -0
- 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-D4Udf-p-.js +1 -0
- package/dist/chunks/onChangeAppState-WbvtqDtk.js +1 -0
- package/dist/chunks/{openai-B9C2XN5Q.js → openai-DaVFXyBB.js} +3 -3
- package/dist/chunks/panel-CoF2a-h4.js +1 -0
- package/dist/chunks/parser-B2PlJg4C.js +1 -0
- package/dist/chunks/{parser-BwPXQomy.js → parser-CUUiH40T.js} +1 -1
- package/dist/chunks/{partition-D-UhsUCx.js → partition-CzW_31Y1.js} +1 -1
- package/dist/chunks/permissions-BT3lxYBM.js +3 -0
- package/dist/chunks/pidLock-d1VPd6CG.js +3 -0
- package/dist/chunks/{plan-CyU2zrCK.js → plan-M9DG3AqN.js} +1 -1
- package/dist/chunks/{platform-BMPbglug.js → platform-Dg1c9F_1.js} +1 -1
- package/dist/chunks/plugin-BiNHuq3h.js +17 -0
- package/dist/chunks/pluginAutoupdate-B5lel6s5.js +1 -0
- package/dist/chunks/pluginBlocklist-CNGmIlwU.js +1 -0
- package/dist/chunks/pluginCliCommands-WLOEhb2M.js +1 -0
- package/dist/chunks/pluginFlagging-CXSSOj4J.js +1 -0
- package/dist/chunks/pluginOperations-BFbty6WT.js +2 -0
- package/dist/chunks/pluginStartupCheck-BEd0VeQC.js +1 -0
- package/dist/chunks/pluginStartupCheck-Bcdxg484.js +1 -0
- package/dist/chunks/plugins-BMZ3aYKP.js +4 -0
- package/dist/chunks/poorMode-Djw0P9Gu.js +1 -0
- package/dist/chunks/{poorMode-DEwQOAJt.js → poorMode-DxgO_bUb.js} +1 -1
- package/dist/chunks/print-DmoLcwVq.js +26 -0
- package/dist/chunks/processBashCommand-B-VqME9O.js +1 -0
- package/dist/chunks/processSlashCommand-D6zEooTy.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-C3RRe4kW.js +1 -0
- package/dist/chunks/{prompt-M2lu8_Oa.js → prompt-CRc2QEZ5.js} +5 -5
- package/dist/chunks/prompt-EtAanewG.js +1 -0
- package/dist/chunks/{promptEditor-DhcZY-iu.js → promptEditor-Bo1d8ZLq.js} +2 -2
- package/dist/chunks/{protocolHandler-CkFaJKKo.js → protocolHandler-B83fCYI4.js} +4 -4
- package/dist/chunks/{proxy-CuMaO_YV.js → proxy-BEKNaTXI.js} +3 -3
- package/dist/chunks/rcDebugLog-DSchf3Hs.js +1 -0
- package/dist/chunks/reconciler-BGav_ezX.js +1 -0
- package/dist/chunks/refresh-DumNiLvM.js +1 -0
- package/dist/chunks/{registerProtocol-CsNYRZKr.js → registerProtocol-DduKPsn_.js} +2 -2
- package/dist/chunks/{reload-plugins-B7JAE3b4.js → reload-plugins-DNEgQ5vo.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-CFLJhsB6.js → remoteBridgeCore-BGOqHADF.js} +1 -1
- package/dist/chunks/remoteManagedSettings-26nhzuca.js +1 -0
- package/dist/chunks/{rename-BCp2Vtqu.js → rename-BPknfVGF.js} +1 -1
- package/dist/chunks/{renderOptions-Q5oCLFIC.js → renderOptions-45A-EdsK.js} +1 -1
- package/dist/chunks/resume-DGz04xDh.js +2 -0
- package/dist/chunks/ripgrep-BLQnqPnE.js +1 -0
- package/dist/chunks/{ripgrep-DvOOsDMv.js → ripgrep-DQ_ILUJV.js} +5 -5
- package/dist/chunks/{runtimeObserver-CS_3BDNo.js → runtimeObserver-BZrF3GnQ.js} +4 -4
- package/dist/chunks/{runtimeObserver-DYUva6g-.js → runtimeObserver-CBV-7-w7.js} +1 -1
- package/dist/chunks/sandbox-adapter-DUqeqkQD.js +1 -0
- package/dist/chunks/sandbox-toggle-D61gVqcT.js +1 -0
- package/dist/chunks/searchExtraTools-CgsV6kb1.js +1 -0
- package/dist/chunks/{session-CO3gEqQP.js → session-Dy-_R7KP.js} +2 -2
- package/dist/chunks/sessionFileAccessHooks-BJlrZaRD.js +1 -0
- package/dist/chunks/sessionObserver-BGYoLRGx.js +1 -0
- package/dist/chunks/{sessionObserver-YkRHC-Aa.js → sessionObserver-CyLpHSkw.js} +1 -1
- package/dist/chunks/{sessionState-Bifmu95-.js → sessionState-DSWN4tMV.js} +2 -2
- package/dist/chunks/sessionStorage-zJ1esSCE.js +1 -0
- package/dist/chunks/{sessionStoragePortable-JZnGwqUM.js → sessionStoragePortable-BhkGMZWp.js} +1 -1
- package/dist/chunks/{sessionTitle-COBSgSXS.js → sessionTitle-L5tyJgdU.js} +2 -2
- package/dist/chunks/{sessionTracing-BrNx1k2V.js → sessionTracing-DpHGGIZm.js} +3 -3
- package/dist/chunks/settings-3ionQKNv.js +1 -0
- package/dist/chunks/settings-DiBMs2gM.js +20 -0
- package/dist/chunks/settingsSync-dBqlrbcU.js +1 -0
- package/dist/chunks/setup-zf3v3ICe.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-DEaw-X5j.js → shadowedRuleDetection-DZ0AA2Rw.js} +1 -1
- package/dist/chunks/{shellQuote-BYeOv3Ip.js → shellQuote-C_I6DHLV.js} +2 -2
- package/dist/chunks/{sideQuestion-D0OKljee.js → sideQuestion-BYT8FdPF.js} +2 -2
- package/dist/chunks/sinks-DppGvgz1.js +1 -0
- package/dist/chunks/sinks-mFsijQ_S.js +2 -0
- package/dist/chunks/skillChangeDetector-D-iq09Xs.js +1 -0
- package/dist/chunks/{skillGapStore-N_kmvXML.js → skillGapStore-DQXHqoP7.js} +2 -2
- package/dist/chunks/{skillLifecycle-C4F5RXuh.js → skillLifecycle-BG_RnGSh.js} +2 -2
- package/dist/chunks/skillSearchPanel-DxYP4Q6R.js +21 -0
- package/dist/chunks/skills-BD-2ofXA.js +1 -0
- package/dist/chunks/startupProfiler-CUlV07MD.js +1 -0
- package/dist/chunks/{startupProfiler-L_UWZ03w.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-IzV0_vEc.js → stats-BkadEKa-.js} +1 -1
- package/dist/chunks/status-BmHu-c7I.js +2 -0
- package/dist/chunks/{status-CeVP_uDT.js → status-CrmnCDIE.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-Bb9gxdSt.js → statusNoticeHelpers-DakAVtQO.js} +1 -1
- package/dist/chunks/{stringUtils-C84IJ91d.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-Dm646gO5.js +1 -0
- package/dist/chunks/switcher-sYTxnJQA.js +1 -0
- package/dist/chunks/syncCache-BofuFJEe.js +1 -0
- package/dist/chunks/{tasks-DZDhgx0w.js → tasks-NpI1iEem.js} +1 -1
- package/dist/chunks/teleport-Bs3kEipi.js +1 -0
- package/dist/chunks/{templateJobs-CrNPEKkh.js → templateJobs-C94jEE6O.js} +2 -2
- package/dist/chunks/{terminalSetup-CBqcwQll.js → terminalSetup-CbXKCpWM.js} +1 -1
- package/dist/chunks/{terminalSetup-D-N8YPiQ.js → terminalSetup-fwhFTxGi.js} +4 -4
- package/dist/chunks/{theme-Dazsirbw.js → theme-CEi3b_8f.js} +1 -1
- package/dist/chunks/tmux-d3cNCIZA.js +1 -0
- package/dist/chunks/{toolEventObserver-lnHJ9fLQ.js → toolEventObserver-DlL9CHmI.js} +1 -1
- package/dist/chunks/toolPool-DIT_uhtD.js +1 -0
- package/dist/chunks/trustedDevice-BokywSKL.js +1 -0
- package/dist/chunks/trustedDevice-Bzz03jCy.js +1 -0
- package/dist/chunks/{types-3j8PS-Du.js → types-BJ7qTz75.js} +2 -2
- package/dist/chunks/udsClient-CF8BmZgN.js +1 -0
- package/dist/chunks/{updateCCB-BPe9_FW6.js → updateCCB-CzBxsuJe.js} +1 -1
- package/dist/chunks/{upstreamproxy-DF00RzGG.js → upstreamproxy-BuBFDFAD.js} +2 -2
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-ChqBs9Lr.js → useExitOnCtrlCDWithKeybindings-BHQfwlAl.js} +1 -1
- package/dist/chunks/useMainLoopModel-BkyIIW9t.js +1 -0
- package/dist/chunks/useManagePlugins-BWROoGDs.js +1 -0
- package/dist/chunks/{useMergedTools-Dk5cPqLc.js → useMergedTools-CHxnwR7R.js} +1 -1
- package/dist/chunks/{useSearchInput-C7Y1I9P9.js → useSearchInput-q2CFPU4W.js} +1 -1
- package/dist/chunks/{useSettingsErrors-DAEO7AyB.js → useSettingsErrors-CPVQbsqq.js} +1 -1
- package/dist/chunks/{userAgent-CIq27vUR.js → userAgent-B7WkjI6I.js} +1 -1
- package/dist/chunks/util-BfqXOA-P.js +1 -0
- package/dist/chunks/{validatePlugin-Kk6pxnO2.js → validatePlugin-jrcrYEIu.js} +1 -1
- package/dist/chunks/{vim-EYQn94Kx.js → vim-C4Hs5U2h.js} +1 -1
- package/dist/chunks/{which-DzFN5TNM.js → which-mplwBbc0.js} +1 -1
- package/dist/chunks/windowsPaths-B8p9tFRF.js +1 -0
- package/dist/chunks/windowsPaths-C7Mdo9aU.js +1 -0
- package/dist/chunks/{workSecret-DUqdPy44.js → workSecret-XLodD7tw.js} +1 -1
- package/dist/chunks/workerRegistry-Cfo7bKlm.js +6 -0
- package/dist/chunks/worktree-D0k_pCEz.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +2 -3
- package/dist/chunks/App-C2yQjBgY.js +0 -1
- package/dist/chunks/ApproveApiKey-CKbv5C1x.js +0 -1
- package/dist/chunks/ApproveApiKey-MscC-ssL.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-CL5NWsFL.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BqNxQOXJ.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-C0-psohX.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-4mOvEer_.js +0 -1
- package/dist/chunks/Doctor-DmgAwce2.js +0 -1
- package/dist/chunks/Doctor-jEs9chPk.js +0 -3
- package/dist/chunks/ExitFlow-DVKxFdpX.js +0 -2
- package/dist/chunks/InvalidConfigDialog-o9DF1REI.js +0 -1
- package/dist/chunks/MCPConnectionManager-CUTuaa8T.js +0 -1
- package/dist/chunks/MCPToolListView-CvqB4nCw.js +0 -1
- package/dist/chunks/MessageSelector-BLzw172f.js +0 -3
- package/dist/chunks/Messages-4K5sLmNh.js +0 -11
- package/dist/chunks/Onboarding-ClwHS5rh.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-Bb4KdIX_.js +0 -1
- package/dist/chunks/QueryEngine-DPHLSsax.js +0 -1
- package/dist/chunks/REPL-Bf46iQCN.js +0 -1
- package/dist/chunks/REPL-DIaAo9M9.js +0 -133
- package/dist/chunks/RemoteSessionManager-CS6mywIn.js +0 -2
- package/dist/chunks/ResumeConversation-Br2KsBoe.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-i_YO3QvV.js +0 -1
- package/dist/chunks/Settings-BMXysXIx.js +0 -2
- package/dist/chunks/TrustDialog-Fk4m_Sy4.js +0 -1
- package/dist/chunks/add-dir-CZ6Clvq8.js +0 -1
- package/dist/chunks/agents-DHnNg4h6.js +0 -103
- package/dist/chunks/allErrors-CU89tF-z.js +0 -1
- package/dist/chunks/api-BSeE6MwB.js +0 -1
- package/dist/chunks/auth-BIGJth5U.js +0 -1
- package/dist/chunks/auth-CDQMhIZP.js +0 -1
- package/dist/chunks/autonomy-C1aSgWPQ.js +0 -1
- package/dist/chunks/autonomy-Src6sKCp.js +0 -15
- package/dist/chunks/autonomyPanel-DnHpuiy4.js +0 -1
- package/dist/chunks/backgroundHousekeeping-B-cw0UcS.js +0 -17
- package/dist/chunks/backgroundHousekeeping-BS_8z3_x.js +0 -1
- package/dist/chunks/bg-50rllUNh.js +0 -1
- package/dist/chunks/bg-DAPORXF3.js +0 -9
- package/dist/chunks/bridgeConfig-BeqChxJC.js +0 -1
- package/dist/chunks/caches-BTQAW9zc.js +0 -1
- package/dist/chunks/caches-BVtSCnV1.js +0 -1
- package/dist/chunks/ccrClient-Bu7Tf1Z5.js +0 -1
- package/dist/chunks/cliLaunch-BWcoyZDP.js +0 -1
- package/dist/chunks/client-BWQ4-rN7.js +0 -1
- package/dist/chunks/client-c-3-PW1F.js +0 -1
- package/dist/chunks/commands-Bi7k3Wg-.js +0 -1
- package/dist/chunks/compact-J-h0Yf4b.js +0 -2
- package/dist/chunks/config-Do1870_d.js +0 -3
- package/dist/chunks/config-yyFe87vW.js +0 -1
- package/dist/chunks/context-Tb1Ca2Q-.js +0 -1
- package/dist/chunks/context-noninteractive-soPYKAc9.js +0 -1
- package/dist/chunks/conversation-CSEtUxOY.js +0 -1
- package/dist/chunks/conversation-Dk1WDQuN.js +0 -1
- package/dist/chunks/createSSHSession-CJtzNQdZ.js +0 -6
- package/dist/chunks/createSession-DkT1GL8y.js +0 -1
- package/dist/chunks/createSession-eE8mswkv.js +0 -1
- package/dist/chunks/crossProjectResume-04n3Ppy9.js +0 -40
- package/dist/chunks/cwd-ClLru_7T.js +0 -1
- package/dist/chunks/datadog-DjeJThpV.js +0 -1
- package/dist/chunks/debug-RAynG_nM.js +0 -39
- package/dist/chunks/detached-X_yjYR7x.js +0 -5
- package/dist/chunks/detectRepository-DgpNd87p.js +0 -1
- package/dist/chunks/detectRepository-ctF9KDbb.js +0 -1
- package/dist/chunks/doctor-B-Wag4C1.js +0 -1
- package/dist/chunks/entry-oIqjxIjQ.js +0 -14
- package/dist/chunks/execSyncWrapper-BTZJjCuv.js +0 -1
- package/dist/chunks/exit-BtW7LfRX.js +0 -1
- package/dist/chunks/extractMemories-CUrdiNcr.js +0 -1
- package/dist/chunks/fast-C60p6AqJ.js +0 -1
- package/dist/chunks/firstPartyEventLogger-BfCYN7lt.js +0 -1
- package/dist/chunks/gemini-BwvSxGgn.js +0 -1
- package/dist/chunks/generateSessionName-DlrdedOk.js +0 -1
- package/dist/chunks/git-2c7WlGDL.js +0 -6
- package/dist/chunks/git-XtKbtJMc.js +0 -1
- package/dist/chunks/githubRepoPathMapping-DbWG4hFQ.js +0 -1
- package/dist/chunks/goal-ZmSRBx4q.js +0 -3
- package/dist/chunks/hooks-DWg07LmS.js +0 -1
- package/dist/chunks/jwtUtils-CUPXdX3W.js +0 -1
- package/dist/chunks/keybindings-DgIPdBy9.js +0 -2
- package/dist/chunks/loadAgentsDir-zikjxLvn.js +0 -1
- package/dist/chunks/loadPluginHooks-Cp8MSwAc.js +0 -1
- package/dist/chunks/localSearch-ZFyFy5FN.js +0 -1
- package/dist/chunks/main-9r5gLzUW.js +0 -605
- package/dist/chunks/main-CvOv59-7.js +0 -31
- package/dist/chunks/managedEnv-B61yLpwp.js +0 -1
- package/dist/chunks/mcp-BckPBjaM.js +0 -6
- package/dist/chunks/mcp-CS1DA3JL.js +0 -1
- package/dist/chunks/mcp-VcGPYCkW.js +0 -2
- package/dist/chunks/memory-C5ohwh-T.js +0 -1
- package/dist/chunks/model-BGu1AGq0.js +0 -1
- package/dist/chunks/model-BsZ4sP_H.js +0 -1
- package/dist/chunks/model-D19IIcll.js +0 -1
- package/dist/chunks/nativeInstaller-QB8cEJ18.js +0 -1
- package/dist/chunks/oauth-BN2I0_jl.js +0 -1
- package/dist/chunks/oauth-C9VBDB0Y.js +0 -1
- package/dist/chunks/omit-DDUIPHnl.js +0 -1
- package/dist/chunks/onChangeAppState-RBl6H7ho.js +0 -1
- package/dist/chunks/panel-KW-wmEvU.js +0 -1
- package/dist/chunks/parser-xSBaQRLH.js +0 -1
- package/dist/chunks/permissions-BoLXYN1j.js +0 -3
- package/dist/chunks/pidLock-nJHbufJN.js +0 -3
- package/dist/chunks/plugin-C6-GQke5.js +0 -17
- package/dist/chunks/pluginAutoupdate-SlRFJlTT.js +0 -1
- package/dist/chunks/pluginBlocklist-n6Imlh3y.js +0 -1
- package/dist/chunks/pluginCliCommands-Bd96zSOQ.js +0 -1
- package/dist/chunks/pluginFlagging-DZaYzecY.js +0 -1
- package/dist/chunks/pluginOperations-D90IRawu.js +0 -2
- package/dist/chunks/pluginStartupCheck-Bxkxpm4k.js +0 -1
- package/dist/chunks/pluginStartupCheck-CB2q2dLv.js +0 -1
- package/dist/chunks/plugins-B9eSjLSA.js +0 -4
- package/dist/chunks/poorMode-BAnubpn1.js +0 -1
- package/dist/chunks/print-eCRv_Li-.js +0 -26
- package/dist/chunks/processBashCommand-B5F2Cl7K.js +0 -1
- package/dist/chunks/processSlashCommand-BC_D3cH5.js +0 -5
- package/dist/chunks/prompt-C1JPqinc.js +0 -1
- package/dist/chunks/prompt-DZhBz_Vu.js +0 -1
- package/dist/chunks/rcDebugLog-CARUIORE.js +0 -1
- package/dist/chunks/reconciler-B4GDm_iC.js +0 -1
- package/dist/chunks/refresh-DBVizOzg.js +0 -1
- package/dist/chunks/remoteManagedSettings-xh_MViZH.js +0 -1
- package/dist/chunks/resume-DVCSzKvv.js +0 -2
- package/dist/chunks/ripgrep-e-iewvTf.js +0 -1
- package/dist/chunks/sandbox-adapter-BFZFHplu.js +0 -1
- package/dist/chunks/sandbox-toggle--zNSKce_.js +0 -1
- package/dist/chunks/searchExtraTools-ui5y2VSE.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-CZvCqQJ6.js +0 -1
- package/dist/chunks/sessionObserver-Ba7um95p.js +0 -1
- package/dist/chunks/sessionStorage-CedwLLQs.js +0 -1
- package/dist/chunks/settings-DkDH7WQT.js +0 -1
- package/dist/chunks/settings-DnptdP79.js +0 -20
- package/dist/chunks/settingsSync-PmU7SmkU.js +0 -1
- package/dist/chunks/setup-BEsBuzsk.js +0 -3
- package/dist/chunks/sinks-BJHgxz6Y.js +0 -1
- package/dist/chunks/sinks-D5-yhcgU.js +0 -2
- package/dist/chunks/skillChangeDetector-Dd0WPdkO.js +0 -1
- package/dist/chunks/skillSearchPanel-CftorvAM.js +0 -21
- package/dist/chunks/skills-C4CTRN9o.js +0 -1
- package/dist/chunks/startupProfiler-D4FBdEQr.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-Dzuw3hBv.js +0 -2
- package/dist/chunks/subprocessEnv-CZkA9Cdp.js +0 -1
- package/dist/chunks/switcher-4KzBvuKH.js +0 -1
- package/dist/chunks/switcher-CCs9xl1z.js +0 -1
- package/dist/chunks/syncCache-CBRiRU5x.js +0 -1
- package/dist/chunks/teleport-Bw0jSxe9.js +0 -1
- package/dist/chunks/tmux-DewYVEBm.js +0 -1
- package/dist/chunks/toolPool-CkXFlqsn.js +0 -1
- package/dist/chunks/trustedDevice-CFf5yaG-.js +0 -1
- package/dist/chunks/trustedDevice-CuwSv8dG.js +0 -1
- package/dist/chunks/udsClient-e9dIkwVA.js +0 -1
- package/dist/chunks/useMainLoopModel-2-eujv0n.js +0 -1
- package/dist/chunks/useManagePlugins-CYBIkaB1.js +0 -1
- package/dist/chunks/util-VO98TdOz.js +0 -1
- package/dist/chunks/windowsPaths-BU3yQWTB.js +0 -1
- package/dist/chunks/windowsPaths-DgZ3YY4a.js +0 -1
- package/dist/chunks/workerRegistry-C07BcZIw.js +0 -6
- package/dist/chunks/worktree-dFUkhVE_.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{$i as n,Bi as r,Hi as i,Mp as a,Zi as o,jp as s}from"./loadAgentsDir-BXtV2jiO.js";import{I as c,P as l,fi as u,h as d,t as f,y as p}from"./src-P_wYS_NJ2.js";import{t as m}from"./jsx-runtime-Bb4Xn-E0.js";import{ln as h,sn as g}from"./settings-DiBMs2gM.js";import{_,v}from"./startupProfiler-Dc5r6LgE.js";import{l as y,o as b}from"./stringUtils-Df-Lnjxd.js";function x(e,t){let n=t.trim();if(n===``)return e.slice();let r=n.toLowerCase().split(/\s+/);return e.filter(e=>{let t=`${e.name} ${e.description}`.toLowerCase();return r.every(e=>t.includes(e))})}var S=e((()=>{}));function C(e){return e===`plugin`?`plugin`:e===`mcp`?`mcp`:g(e)}function w({onExit:e,commands:t}){let[n,r]=(0,T.useState)(``),a=(0,T.useMemo)(()=>t.filter(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`commands_DEPRECATED`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)),[t]),u=(0,T.useMemo)(()=>x(a.map(e=>({...e,name:i(e),description:e.description??``})),n),[a,n]),f=(0,T.useMemo)(()=>{let e={policySettings:[],userSettings:[],projectSettings:[],localSettings:[],flagSettings:[],plugin:[],mcp:[]};for(let t of u){let n=t.source;n in e&&e[n].push(t)}for(let t of Object.values(e))t.sort((e,t)=>i(e).localeCompare(i(t)));return e},[u]),m=()=>{e(`Skills dialog dismissed`,{display:`system`})};if(a.length===0)return(0,E.jsxs)(p,{title:`Skills`,subtitle:`No skills found`,onCancel:m,hideInputGuide:!0,children:[(0,E.jsx)(l,{dimColor:!0,children:`Create skills in .workmate/skills/ or ~/.workmate/skills/`}),(0,E.jsx)(l,{dimColor:!0,italic:!0,children:(0,E.jsx)(s,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`close`})})]});let h=e=>{switch(e){case`projectSettings`:case`localSettings`:return{label:`local`,color:`yellow`};case`userSettings`:return{label:`global`,color:`cyan`};case`policySettings`:return{label:`managed`,color:`magenta`};default:return}},g=(e,t)=>{let n=`~${_(o(e))}`,r=e.source===`plugin`?e.pluginInfo?.pluginManifest.name:void 0,a=h(e.source);return(0,E.jsxs)(c,{children:[(0,E.jsx)(l,{color:t?`suggestion`:void 0,children:i(e)}),a&&(0,E.jsxs)(l,{color:a.color,children:[` [`,a.label,`]`]}),(0,E.jsxs)(l,{dimColor:!0,children:[r?` · ${r}`:``,` · `,C(e.source),` · `,n,` tokens`]})]})};return(0,E.jsx)(d,{title:`Skills`,placeholder:`Type to filter skills…`,items:(0,T.useMemo)(()=>D.flatMap(e=>f[e]),[f]),getKey:e=>`${e.name}-${e.source}`,visibleCount:12,direction:`down`,onQueryChange:r,onSelect:t=>{e(`/${i(t)}`,{display:`user`})},onCancel:m,emptyMessage:e=>e.trim()?`No skills matching "${e.trim()}"`:`No skills found`,matchLabel:n.trim()===``?`${a.length} ${y(a.length,`skill`)}`:`${u.length}/${a.length} ${y(a.length,`skill`)}`,selectAction:`invoke skill`,renderItem:(e,t)=>g(e,t)})}var T,E,D,O=e((()=>{u(),T=t(u(),1),r(),f(),n(),v(),h(),b(),a(),S(),E=m(),D=[`projectSettings`,`localSettings`,`userSettings`,`flagSettings`,`policySettings`,`plugin`,`mcp`]}));async function k(e,t){return(0,A.jsx)(w,{onExit:e,commands:t.options.commands})}var A;e((()=>{u(),O(),A=m()}))();export{k as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./startupProfiler-Dc5r6LgE.js";e();export{t as profileCheckpoint};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,l as n,o as r}from"./envUtils-DcaKZlRU.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Gr as o,t as s}from"./src-P_wYS_NJ2.js";import{Wt as ee,pt as te}from"./state-BPFYBqm1.js";import{T as c,c as l,f as u,i as d,u as ne,x as f}from"./debug-Dr1SjdXn.js";import{n as p,r as m}from"./analytics-DJobLaWP.js";import{i as h,n as g,o as _,r as v}from"./intl-D2kgJmX7.js";import{dirname as re,join as ie}from"path";function y(e,t){if(o(e)<=t)return e;if(t<=0)return`…`;if(t<5)return b(e,t);let n=e.lastIndexOf(`/`),r=n>=0?e.slice(n):e,i=n>=0?e.slice(0,n):``,a=o(r);if(a>=t-1)return x(e,t);let s=t-1-a;return s<=0?x(r,t):S(i,s)+`…`+r}function b(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t-1)break;r+=i,n+=e}return r+`…`}function x(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=[...g().segment(e)],r=0,i=n.length;for(let e=n.length-1;e>=0;e--){let a=o(n[e].segment);if(r+a>t-1)break;r+=a,i=e}return`…`+n.slice(i).map(e=>e.segment).join(``)}function S(e,t){if(o(e)<=t)return e;if(t<=0)return``;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t)break;r+=i,n+=e}return r}function C(e,t,n=!1){if(e==null)return``;let r=e;if(n){let n=e.indexOf(`
|
|
2
2
|
`);if(n!==-1)return r=e.substring(0,n),o(r)+1>t?b(r,t):`${r}…`}return o(r)<=t?r:b(r,t)}var w=e((()=>{s(),_()}));function T(e){let t=e/1024;if(t<1)return`${e} bytes`;if(t<1024)return`${t.toFixed(1).replace(/\.0$/,``)}KB`;let n=t/1024;return n<1024?`${n.toFixed(1).replace(/\.0$/,``)}MB`:`${(n/1024).toFixed(1).replace(/\.0$/,``)}GB`}function E(e){return`${(e/1e3).toFixed(1)}s`}function D(e,t){if(e<6e4)return e===0?`0s`:e<1?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/1e3).toString()}s`;let n=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),i=Math.floor(e%36e5/6e4),a=Math.round(e%6e4/1e3);a===60&&(a=0,i++),i===60&&(i=0,r++),r===24&&(r=0,n++);let o=t?.hideTrailingZeros;return t?.mostSignificantOnly?n>0?`${n}d`:r>0?`${r}h`:i>0?`${i}m`:`${a}s`:n>0?o&&r===0&&i===0?`${n}d`:o&&i===0?`${n}d ${r}h`:`${n}d ${r}h ${i}m`:r>0?o&&i===0&&a===0?`${r}h`:o&&a===0?`${r}h ${i}m`:`${r}h ${i}m ${a}s`:i>0?o&&a===0?`${i}m`:`${i}m ${a}s`:`${a}s`}function O(e){return F(e>=1e3).format(e).toLowerCase()}function k(e){return O(e).replace(`.0`,``)}function A(e,t={}){let{style:n=`narrow`,numeric:r=`always`,now:i=new Date}=t,a=e.getTime()-i.getTime(),o=Math.trunc(a/1e3);for(let{unit:e,seconds:t,shortUnit:i}of[{unit:`year`,seconds:31536e3,shortUnit:`y`},{unit:`month`,seconds:2592e3,shortUnit:`mo`},{unit:`week`,seconds:604800,shortUnit:`w`},{unit:`day`,seconds:86400,shortUnit:`d`},{unit:`hour`,seconds:3600,shortUnit:`h`},{unit:`minute`,seconds:60,shortUnit:`m`},{unit:`second`,seconds:1,shortUnit:`s`}])if(Math.abs(o)>=t){let a=Math.trunc(o/t);return n===`narrow`?o<0?`${Math.abs(a)}${i} ago`:`in ${a}${i}`:v(`long`,r).format(a,e)}return n===`narrow`?o<=0?`0s ago`:`in 0s`:v(n,r).format(0,`second`)}function j(e,t={}){let{now:n=new Date,...r}=t;return e>n?A(e,{...r,now:n}):A(e,{...r,numeric:`always`,now:n})}function M(e){let t=e.fileSize===void 0?`${e.messageCount} messages`:T(e.fileSize),n=[j(e.modified,{style:`short`}),...e.gitBranch?[e.gitBranch]:[],t];return e.tag&&n.push(`#${e.tag}`),e.agentSetting&&n.push(`@${e.agentSetting}`),e.prNumber&&n.push(e.prRepository?`${e.prRepository}#${e.prNumber}`:`#${e.prNumber}`),n.join(` · `)}function ae(e,t=!1,n=!0){if(!e)return;let r=new Date(e*1e3),i=new Date,a=r.getMinutes();if((r.getTime()-i.getTime())/(1e3*60*60)>24){let e={month:`short`,day:`numeric`,hour:n?`numeric`:void 0,minute:!n||a===0?void 0:`2-digit`,hour12:n?!0:void 0};return r.getFullYear()!==i.getFullYear()&&(e.year=`numeric`),r.toLocaleString(`en-US`,e).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}return r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:a===0?void 0:`2-digit`,hour12:!0}).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}var N,P,F,I=e((()=>{_(),w(),N=null,P=null,F=e=>e?(N||(N=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:1})),N):(P||(P=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:0})),P)}));function L(){return V}function R(e){return e.toFixed(3)}function z(e,t,n,r,i,a,o=``){let s=r?` | RSS: ${T(r.rss)}, Heap: ${T(r.heapUsed)}`:``;return`[+${R(e).padStart(i)}ms] (+${R(t).padStart(a)}ms) ${n}${o}${s}`}var B,V,H=e((()=>{I(),i(),B=class{constructor(){a(this,`marks`,new Map),a(this,`_origin`,void 0),this._origin=Number(process.hrtime.bigint()/1000n)/1e3}mark(e){this.marks.set(e,this.now())}getEntriesByType(e){if(e!==`mark`)return[];let t=[];for(let[e,n]of this.marks)t.push({name:e,startTime:n,entryType:`mark`});return t}clearMarks(e){e===void 0?this.marks.clear():this.marks.delete(e)}now(){return Number(process.hrtime.bigint()/1000n)/1e3-this._origin}},V=new B}));function U(e){X&&(L().mark(e),J&&Z.push(process.memoryUsage()))}function W(){if(!J)return`Startup profiling not enabled`;let e=L().getEntriesByType(`mark`);if(e.length===0)return`No profiling checkpoints recorded`;let t=[];t.push(`=`.repeat(80)),t.push(`STARTUP PROFILING REPORT`),t.push(`=`.repeat(80)),t.push(``);let n=0;for(let[r,i]of e.entries())t.push(z(i.startTime,i.startTime-n,i.name,Z[r],8,7)),n=i.startTime;let r=e[e.length-1];return t.push(``),t.push(`Total startup time: ${R(r?.startTime??0)}ms`),t.push(`=`.repeat(80)),t.join(`
|
|
3
|
-
`)}function G(){if(!$){if($=!0,q(),J){let e=K(),t=re(e);
|
|
3
|
+
`)}function G(){if(!$){if($=!0,q(),J){let e=K(),t=re(e);ne().mkdirSync(t),c(e,W(),{encoding:`utf8`,flush:!0}),l(`Startup profiling report:`),l(W())}L().clearMarks(),Z.length=0}}function K(){return ie(t(),`startup-perf`,`${te()}.txt`)}function q(){if(!Y)return;let e=L().getEntriesByType(`mark`);if(e.length===0)return;let t=new Map;for(let n of e)t.set(n.name,n.startTime);let n={};for(let[e,[r,i]]of Object.entries(Q)){let a=t.get(r),o=t.get(i);a!==void 0&&o!==void 0&&(n[`${e}_ms`]=Math.round(o-a))}n.checkpoint_count=e.length,m(`tengu_startup_perf`,n)}var J,Y,X,Z,Q,$,oe=e((()=>{ee(),p(),d(),r(),u(),H(),f(),J=n(process.env.CLAUDE_CODE_PROFILE_STARTUP),Y=Math.random()<.005,X=J||Y,Z=[],Q={import_time:[`cli_entry`,`main_tsx_imports_loaded`],init_time:[`init_function_start`,`init_function_end`],settings_time:[`eagerLoadSettings_start`,`eagerLoadSettings_end`],total_time:[`cli_entry`,`main_after_run`]},X&&U(`profiler_initialized`),$=!1}));export{b as C,x as S,k as _,R as a,C as b,H as c,M as d,O as f,E as g,ae as h,G as i,D as l,j as m,oe as n,z as o,A as p,U as r,L as s,K as t,T as u,I as v,S as w,y as x,w as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./isObject-C6qM3WEW.js";import{a as d,c as f,d as p,f as m,g as h,h as g,i as _,l as v,m as y,n as ee,o as te,p as ne,r as re,s as ie,t as ae,u as oe}from"./memoize-BK3gG5ob.js";import{i as b,n as se,r as x,t as ce}from"./isSymbol-BO6cdPI7.js";import{realpathSync as le}from"fs";import{randomUUID as ue}from"crypto";import{cwd as de}from"process";function fe(){this.__data__=new ie,this.size=0}var pe=e((()=>{f()}));function me(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var he=e((()=>{}));function ge(e){return this.__data__.get(e)}var _e=e((()=>{}));function ve(e){return this.__data__.has(e)}var ye=e((()=>{}));function be(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!d||r.length<xe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this}var xe,Se=e((()=>{f(),te(),_(),xe=200}));function S(e){var t=this.__data__=new ie(e);this.size=t.size}var Ce=e((()=>{f(),pe(),he(),_e(),ye(),Se(),S.prototype.clear=fe,S.prototype.delete=me,S.prototype.get=ge,S.prototype.has=ve,S.prototype.set=be}));function we(e){return this.__data__.set(e,Te),this}var Te,Ee=e((()=>{Te=`__lodash_hash_undefined__`}));function De(e){return this.__data__.has(e)}var Oe=e((()=>{}));function C(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new re;++t<n;)this.add(e[t])}var ke=e((()=>{_(),Ee(),Oe(),C.prototype.add=C.prototype.push=we,C.prototype.has=De}));function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var je=e((()=>{}));function Me(e,t){return e.has(t)}var Ne=e((()=>{}));function Pe(e,t,n,r,i,a){var o=n&Fe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Ie?new C:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ae(t,function(e,t){if(!Me(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Fe,Ie,Le=e((()=>{ke(),je(),Ne(),Fe=1,Ie=2})),w,Re=e((()=>{c(),w=n.Uint8Array}));function ze(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var Be=e((()=>{}));function Ve(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var He=e((()=>{}));function Ue(e,t,n,r,i,a,o){switch(n){case nt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tt:return!(e.byteLength!=t.byteLength||!a(new w(e),new w(t)));case Ke:case qe:case Xe:return v(+e,+t);case Je:return e.name==t.name&&e.message==t.message;case Ze:case $e:return e==t+``;case Ye:var s=ze;case Qe:var c=r&We;if(s||(s=Ve),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Ge,o.set(e,t);var u=Pe(s(e),s(t),r,i,a,o);return o.delete(e),u;case et:if(T)return T.call(e)==T.call(t)}return!1}var We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,T,it=e((()=>{o(),Re(),oe(),Le(),Be(),He(),We=1,Ge=2,Ke=`[object Boolean]`,qe=`[object Date]`,Je=`[object Error]`,Ye=`[object Map]`,Xe=`[object Number]`,Ze=`[object RegExp]`,Qe=`[object Set]`,$e=`[object String]`,et=`[object Symbol]`,tt=`[object ArrayBuffer]`,nt=`[object DataView]`,rt=t?t.prototype:void 0,T=rt?rt.valueOf:void 0}));function at(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ot=e((()=>{})),E,D=e((()=>{E=Array.isArray}));function st(e,t,n){var r=t(e);return E(e)?r:at(r,n(e))}var ct=e((()=>{ot(),D()}));function lt(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var ut=e((()=>{}));function dt(){return[]}var ft=e((()=>{})),pt,mt,ht,gt=e((()=>{ut(),ft(),pt=Object.prototype.propertyIsEnumerable,mt=Object.getOwnPropertySymbols,ht=mt?function(e){return e==null?[]:(e=Object(e),lt(mt(e),function(t){return pt.call(e,t)}))}:dt}));function _t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vt=e((()=>{}));function yt(e){return b(e)&&s(e)==bt}var bt,xt=e((()=>{r(),x(),bt=`[object Arguments]`})),St,Ct,wt,O,Tt=e((()=>{xt(),x(),St=Object.prototype,Ct=St.hasOwnProperty,wt=St.propertyIsEnumerable,O=yt(function(){return arguments}())?yt:function(e){return b(e)&&Ct.call(e,`callee`)&&!wt.call(e,`callee`)}}));function Et(){return!1}var Dt=e((()=>{})),Ot,kt,At,k,jt=e((()=>{c(),Dt(),Ot=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kt=Ot&&typeof module==`object`&&module&&!module.nodeType&&module,At=kt&&kt.exports===Ot?n.Buffer:void 0,k=(At?At.isBuffer:void 0)||Et}));function Mt(e,t){var n=typeof e;return t=t??Nt,!!t&&(n==`number`||n!=`symbol`&&Pt.test(e))&&e>-1&&e%1==0&&e<t}var Nt,Pt,A=e((()=>{Nt=9007199254740991,Pt=/^(?:0|[1-9]\d*)$/}));function j(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Ft}var Ft,It=e((()=>{Ft=9007199254740991}));function Lt(e){return b(e)&&j(e.length)&&!!M[s(e)]}var Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,M,ln=e((()=>{r(),It(),x(),Rt=`[object Arguments]`,zt=`[object Array]`,Bt=`[object Boolean]`,Vt=`[object Date]`,Ht=`[object Error]`,Ut=`[object Function]`,Wt=`[object Map]`,Gt=`[object Number]`,Kt=`[object Object]`,qt=`[object RegExp]`,Jt=`[object Set]`,Yt=`[object String]`,Xt=`[object WeakMap]`,Zt=`[object ArrayBuffer]`,Qt=`[object DataView]`,$t=`[object Float32Array]`,en=`[object Float64Array]`,tn=`[object Int8Array]`,nn=`[object Int16Array]`,rn=`[object Int32Array]`,an=`[object Uint8Array]`,on=`[object Uint8ClampedArray]`,sn=`[object Uint16Array]`,cn=`[object Uint32Array]`,M={},M[$t]=M[en]=M[tn]=M[nn]=M[rn]=M[an]=M[on]=M[sn]=M[cn]=!0,M[Rt]=M[zt]=M[Zt]=M[Bt]=M[Qt]=M[Vt]=M[Ht]=M[Ut]=M[Wt]=M[Gt]=M[Kt]=M[qt]=M[Jt]=M[Yt]=M[Xt]=!1}));function un(e){return function(t){return e(t)}}var dn=e((()=>{})),fn,N,P,F,pn=e((()=>{u(),fn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,N=fn&&typeof module==`object`&&module&&!module.nodeType&&module,P=N&&N.exports===fn&&i.process,F=function(){try{return N&&N.require&&N.require(`util`).types||P&&P.binding&&P.binding(`util`)}catch{}}()})),mn,I,hn=e((()=>{ln(),dn(),pn(),mn=F&&F.isTypedArray,I=mn?un(mn):Lt}));function gn(e,t){var n=E(e),r=!n&&O(e),i=!n&&!r&&k(e),a=!n&&!r&&!i&&I(e),o=n||r||i||a,s=o?_t(e.length,String):[],c=s.length;for(var l in e)(t||_n.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Mt(l,c)))&&s.push(l);return s}var _n,vn=e((()=>{vt(),Tt(),D(),jt(),A(),hn(),_n=Object.prototype.hasOwnProperty}));function yn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||bn)}var bn,xn=e((()=>{bn=Object.prototype}));function Sn(e,t){return function(n){return e(t(n))}}var Cn=e((()=>{})),wn,Tn=e((()=>{Cn(),wn=Sn(Object.keys,Object)}));function En(e){if(!yn(e))return wn(e);var t=[];for(var n in Object(e))Dn.call(e,n)&&n!=`constructor`&&t.push(n);return t}var Dn,On=e((()=>{xn(),Tn(),Dn=Object.prototype.hasOwnProperty}));function kn(e){return e!=null&&j(e.length)&&!h(e)}var An=e((()=>{g(),It()}));function L(e){return kn(e)?gn(e):En(e)}var jn=e((()=>{vn(),On(),An()}));function Mn(e){return st(e,L,ht)}var Nn=e((()=>{ct(),gt(),jn()}));function Pn(e,t,n,r,i,a){var o=n&Fn,s=Mn(e),c=s.length;if(c!=Mn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:In.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Fn,In,Ln=e((()=>{Nn(),Fn=1,In=Object.prototype.hasOwnProperty})),R,Rn=e((()=>{m(),c(),R=p(n,`DataView`)})),z,zn=e((()=>{m(),c(),z=p(n,`Promise`)})),B,Bn=e((()=>{m(),c(),B=p(n,`Set`)})),V,Vn=e((()=>{m(),c(),V=p(n,`WeakMap`)})),Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,H,U,$n=e((()=>{Rn(),te(),zn(),Bn(),Vn(),r(),ne(),Hn=`[object Map]`,Un=`[object Object]`,Wn=`[object Promise]`,Gn=`[object Set]`,Kn=`[object WeakMap]`,qn=`[object DataView]`,Jn=y(R),Yn=y(d),Xn=y(z),Zn=y(B),Qn=y(V),H=s,(R&&H(new R(new ArrayBuffer(1)))!=qn||d&&H(new d)!=Hn||z&&H(z.resolve())!=Wn||B&&H(new B)!=Gn||V&&H(new V)!=Kn)&&(H=function(e){var t=s(e),n=t==Un?e.constructor:void 0,r=n?y(n):``;if(r)switch(r){case Jn:return qn;case Yn:return Hn;case Xn:return Wn;case Zn:return Gn;case Qn:return Kn}return t}),U=H}));function er(e,t,n,r,i,a){var o=E(e),s=E(t),c=o?rr:U(e),l=s?rr:U(t);c=c==nr?W:c,l=l==nr?W:l;var u=c==W,d=l==W,f=c==l;if(f&&k(e)){if(!k(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new S),o||I(e)?Pe(e,t,n,r,i,a):Ue(e,t,c,n,r,i,a);if(!(n&tr)){var p=u&&ir.call(e,`__wrapped__`),m=d&&ir.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new S),i(h,g,n,r,a)}}return f?(a||(a=new S),Pn(e,t,n,r,i,a)):!1}var tr,nr,rr,W,ir,ar=e((()=>{Ce(),Le(),it(),Ln(),$n(),D(),jt(),hn(),tr=1,nr=`[object Arguments]`,rr=`[object Array]`,W=`[object Object]`,ir=Object.prototype.hasOwnProperty}));function G(e,t,n,r,i){return e===t?!0:e==null||t==null||!b(e)&&!b(t)?e!==e&&t!==t:er(e,t,n,r,G,i)}var or=e((()=>{ar(),x()}));function sr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new S;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?G(u,l,cr|lr,r,d):f))return!1}}return!0}var cr,lr,ur=e((()=>{Ce(),or(),cr=1,lr=2}));function dr(e){return e===e&&!a(e)}var fr=e((()=>{l()}));function pr(e){for(var t=L(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,dr(i)]}return t}var mr=e((()=>{fr(),jn()}));function hr(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var gr=e((()=>{}));function _r(e){var t=pr(e);return t.length==1&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||sr(n,e,t)}}var vr=e((()=>{ur(),mr(),gr()}));function yr(e,t){if(E(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||se(e)?!0:xr.test(e)||!br.test(e)||t!=null&&e in Object(t)}var br,xr,Sr=e((()=>{D(),ce(),br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xr=/^\w*$/}));function Cr(e){var t=ee(e,function(e){return n.size===wr&&n.clear(),e}),n=t.cache;return t}var wr,Tr=e((()=>{ae(),wr=500})),Er,Dr,Or,kr=e((()=>{Tr(),Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Or=Cr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Er,function(e,n,r,i){t.push(r?i.replace(Dr,`$1`):n||e)}),t})}));function Ar(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var jr=e((()=>{}));function Mr(e){if(typeof e==`string`)return e;if(E(e))return Ar(e,Mr)+``;if(se(e))return Fr?Fr.call(e):``;var t=e+``;return t==`0`&&1/e==-Nr?`-0`:t}var Nr,Pr,Fr,Ir=e((()=>{o(),jr(),D(),ce(),Nr=1/0,Pr=t?t.prototype:void 0,Fr=Pr?Pr.toString:void 0}));function Lr(e){return e==null?``:Mr(e)}var Rr=e((()=>{Ir()}));function zr(e,t){return E(e)?e:yr(e,t)?[e]:Or(Lr(e))}var Br=e((()=>{D(),Sr(),kr(),Rr()}));function K(e){if(typeof e==`string`||se(e))return e;var t=e+``;return t==`0`&&1/e==-Vr?`-0`:t}var Vr,q=e((()=>{ce(),Vr=1/0}));function Hr(e,t){t=zr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[K(t[n++])];return n&&n==r?e:void 0}var Ur=e((()=>{Br(),q()}));function Wr(e,t,n){var r=e==null?void 0:Hr(e,t);return r===void 0?n:r}var Gr=e((()=>{Ur()}));function Kr(e,t){return e!=null&&t in Object(e)}var qr=e((()=>{}));function Jr(e,t,n){t=zr(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=K(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&j(i)&&Mt(o,i)&&(E(e)||O(e)))}var Yr=e((()=>{Br(),Tt(),D(),A(),It(),q()}));function Xr(e,t){return e!=null&&Jr(e,t,Kr)}var Zr=e((()=>{qr(),Yr()}));function Qr(e,t){return yr(e)&&dr(t)?hr(K(e),t):function(n){var r=Wr(n,e);return r===void 0&&r===t?Xr(n,e):G(t,r,$r|ei)}}var $r,ei,ti=e((()=>{or(),Gr(),Zr(),Sr(),fr(),gr(),q(),$r=1,ei=2}));function ni(e){return e}var ri=e((()=>{}));function ii(e){return function(t){return t?.[e]}}var ai=e((()=>{}));function oi(e){return function(t){return Hr(t,e)}}var si=e((()=>{Ur()}));function ci(e){return yr(e)?ii(K(e)):oi(e)}var li=e((()=>{ai(),si(),Sr(),q()}));function ui(e){return typeof e==`function`?e:e==null?ni:typeof e==`object`?E(e)?Qr(e[0],e[1]):_r(e):ci(e)}var di=e((()=>{vr(),ti(),ri(),D(),li()}));function fi(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==void 0&&(n=n===void 0?a:n+a)}return n}var pi=e((()=>{}));function J(e,t){return e&&e.length?fi(e,ui(t,2)):0}var mi=e((()=>{di(),pi()})),hi=e((()=>{}));function gi(){return Y}function _i(e){Y=e}function vi(e){return X.has(e)?X.get(e):void 0}function yi(e,t){X.set(e,t)}function bi(e){return Z.get(e)}function xi(e,t){Z.set(e,t)}function Si(){Y=null,X.clear(),Z.clear()}function Ci(){return Ei}function wi(e){Ei=e}function Ti(){Ei=void 0}var Y,X,Z,Ei,Di=e((()=>{Y=null,X=new Map,Z=new Map}));function Oi(){let e=new Set;return{subscribe(t){return e.add(t),()=>{e.delete(t)}},emit(...t){for(let n of e)n(...t)},clear(){e.clear()}}}var ki=e((()=>{}));function Ai(){let e=``;if(typeof process<`u`&&typeof process.cwd==`function`&&typeof le==`function`){let t=de();try{e=le(t).normalize(`NFC`)}catch{e=t.normalize(`NFC`)}}return{originalCwd:e,projectRoot:e,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:e,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,clientType:`cli`,sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:[`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:ue(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function ji(){return Q.sessionId}function Mi(e={}){return e.setCurrentAsParent&&(Q.parentSessionId=Q.sessionId),Q.planSlugCache.delete(Q.sessionId),Q.sessionId=ue(),Q.sessionProjectDir=null,Q.sessionId}function Ni(){return Q.parentSessionId}function Pi(e,t=null){Q.planSlugCache.delete(Q.sessionId),Q.sessionId=e,Q.sessionProjectDir=t,zs.emit(e)}function Fi(){return Q.sessionProjectDir}function Ii(){return Q.originalCwd}function Li(){return Q.projectRoot}function Ri(e){Q.originalCwd=e.normalize(`NFC`)}function zi(e){Q.projectRoot=e.normalize(`NFC`)}function Bi(){return Q.cwd}function Vi(e){Q.cwd=e.normalize(`NFC`)}function Hi(){return Q.directConnectServerUrl}function Ui(e){Q.directConnectServerUrl=e}function Wi(e,t){Q.totalAPIDuration+=e,Q.totalAPIDurationWithoutRetries+=t}function Gi(e,t,n){Q.modelUsage[n]=t,Q.totalCostUSD+=e}function Ki(){return Q.totalCostUSD}function qi(){return Q.totalAPIDuration}function Ji(){return Date.now()-Q.startTime}function Yi(){return Q.totalAPIDurationWithoutRetries}function Xi(){return Q.totalToolDuration}function Zi(e){Q.totalToolDuration+=e,Q.turnToolDurationMs+=e,Q.turnToolCount++}function Qi(e){Q.turnHookDurationMs+=e,Q.turnHookCount++}function $i(){Q.turnHookDurationMs=0,Q.turnHookCount=0}function ea(){Q.turnToolDurationMs=0,Q.turnToolCount=0}function ta(e){Q.turnClassifierDurationMs+=e,Q.turnClassifierCount++}function na(){Q.turnClassifierDurationMs=0,Q.turnClassifierCount=0}function ra(){return Q.statsStore}function ia(e){Q.statsStore=e}function aa(e){e?oa():Vs=!0}function oa(){Q.lastInteractionTime=Date.now(),Vs=!1}function sa(e,t){Q.totalLinesAdded+=e,Q.totalLinesRemoved+=t}function ca(){return Q.totalLinesAdded}function la(){return Q.totalLinesRemoved}function ua(){return J(Object.values(Q.modelUsage),`inputTokens`)}function da(){return J(Object.values(Q.modelUsage),`outputTokens`)}function fa(){return J(Object.values(Q.modelUsage),`cacheReadInputTokens`)}function pa(){return J(Object.values(Q.modelUsage),`cacheCreationInputTokens`)}function ma(){return J(Object.values(Q.modelUsage),`webSearchRequests`)}function ha(){return da()-Hs}function ga(){return Us}function _a(e){Hs=da(),Us=e,$=0}function va(){return $}function ya(){$++}function ba(){Q.hasUnknownModelCost=!0}function xa(){return Q.hasUnknownModelCost}function Sa(){return Q.lastMainRequestId}function Ca(e){Q.lastMainRequestId=e}function wa(){return Q.lastApiCompletionTimestamp}function Ta(e){Q.lastApiCompletionTimestamp=e}function Ea(){Q.pendingPostCompaction=!0}function Da(){let e=Q.pendingPostCompaction;return Q.pendingPostCompaction=!1,e}function Oa(){return Q.lastInteractionTime}function ka(){return Ws}async function Aa(){for(;Ws;)await new Promise(e=>setTimeout(e,Gs).unref?.())}function ja(){return Q.modelUsage}function Ma(e){return Q.modelUsage[e]}function Na(){return Q.mainLoopModelOverride}function Pa(){return Q.initialMainLoopModel}function Fa(e){Q.mainLoopModelOverride=e}function Ia(e){Q.initialMainLoopModel=e}function La(){return Q.sdkBetas}function Ra(e){Q.sdkBetas=e}function za(){Q.totalCostUSD=0,Q.totalAPIDuration=0,Q.totalAPIDurationWithoutRetries=0,Q.totalToolDuration=0,Q.startTime=Date.now(),Q.totalLinesAdded=0,Q.totalLinesRemoved=0,Q.hasUnknownModelCost=!1,Q.modelUsage={},Q.promptId=null}function Ba({totalCostUSD:e,totalAPIDuration:t,totalAPIDurationWithoutRetries:n,totalToolDuration:r,totalLinesAdded:i,totalLinesRemoved:a,lastDuration:o,modelUsage:s}){Q.totalCostUSD=e,Q.totalAPIDuration=t,Q.totalAPIDurationWithoutRetries=n,Q.totalToolDuration=r,Q.totalLinesAdded=i,Q.totalLinesRemoved=a,s&&(Q.modelUsage=s),o&&(Q.startTime=Date.now()-o)}function Va(){return Q.modelStrings}function Ha(e){Q.modelStrings=e}function Ua(e,t){Q.meter=e,Q.sessionCounter=t(`claude_code.session.count`,{description:`Count of CLI sessions started`}),Q.locCounter=t(`claude_code.lines_of_code.count`,{description:`Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed`}),Q.prCounter=t(`claude_code.pull_request.count`,{description:`Number of pull requests created`}),Q.commitCounter=t(`claude_code.commit.count`,{description:`Number of git commits created`}),Q.costCounter=t(`claude_code.cost.usage`,{description:`Cost of the Work Mate session`,unit:`USD`}),Q.tokenCounter=t(`claude_code.token.usage`,{description:`Number of tokens used`,unit:`tokens`}),Q.codeEditToolDecisionCounter=t(`claude_code.code_edit_tool.decision`,{description:`Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools`}),Q.activeTimeCounter=t(`claude_code.active_time.total`,{description:`Total active time in seconds`,unit:`s`})}function Wa(){return Q.sessionCounter}function Ga(){return Q.locCounter}function Ka(){return Q.prCounter}function qa(){return Q.commitCounter}function Ja(){return Q.costCounter}function Ya(){return Q.tokenCounter}function Xa(){return Q.codeEditToolDecisionCounter}function Za(){return Q.activeTimeCounter}function Qa(){return Q.loggerProvider}function $a(e){Q.loggerProvider=e}function eo(){return Q.eventLogger}function to(e){Q.eventLogger=e}function no(){return Q.meterProvider}function ro(e){Q.meterProvider=e}function io(){return Q.tracerProvider}function ao(e){Q.tracerProvider=e}function oo(){return!Q.isInteractive}function so(){return Q.isInteractive}function co(e){Q.isInteractive=e}function lo(){return Q.clientType}function uo(e){Q.clientType=e}function fo(){return Q.sdkAgentProgressSummariesEnabled}function po(e){Q.sdkAgentProgressSummariesEnabled=e}function mo(){return Q.strictToolResultPairing}function ho(e){Q.sessionSource=e}function go(){return Q.questionPreviewFormat}function _o(e){Q.questionPreviewFormat=e}function vo(){return Q.agentColorMap}function yo(){return Q.flagSettingsPath}function bo(e){Q.flagSettingsPath=e}function xo(){return Q.flagSettingsInline}function So(e){Q.flagSettingsInline=e}function Co(){return Q.sessionIngressToken}function wo(e){Q.sessionIngressToken=e}function To(){return Q.oauthTokenFromFd}function Eo(e){Q.oauthTokenFromFd=e}function Do(){return Q.apiKeyFromFd}function Oo(e){Q.apiKeyFromFd=e}function ko(e){Q.lastAPIRequest=e}function Ao(e){Q.lastAPIRequestMessages=e}function jo(e){Q.lastClassifierRequests=e}function Mo(e){Q.cachedClaudeMdContent=e}function No(){return Q.cachedClaudeMdContent}function Po(){return Q.allowedSettingSources}function Fo(e){Q.allowedSettingSources=e}function Io(){return oo()&&Q.clientType!==`claude-vscode`}function Lo(e){Q.inlinePlugins=e}function Ro(){return Q.inlinePlugins}function zo(e){Q.useCoworkPlugins=e,Si()}function Bo(){return Q.useCoworkPlugins}function Vo(e){Q.sessionBypassPermissionsMode=e}function Ho(e){Q.sessionTrustAccepted=e}function Uo(){return Q.sessionTrustAccepted}function Wo(e){Q.sessionPersistenceDisabled=e}function Go(){return Q.sessionPersistenceDisabled}function Ko(){return Q.hasExitedPlanMode}function qo(e){Q.hasExitedPlanMode=e}function Jo(){return Q.needsPlanModeExitAttachment}function Yo(e){Q.needsPlanModeExitAttachment=e}function Xo(e,t){t===`plan`&&e!==`plan`&&(Q.needsPlanModeExitAttachment=!1),e===`plan`&&t!==`plan`&&(Q.needsPlanModeExitAttachment=!0)}function Zo(){return Q.needsAutoModeExitAttachment}function Qo(e){Q.needsAutoModeExitAttachment=e}function $o(e,t){if(e===`auto`&&t===`plan`||e===`plan`&&t===`auto`)return;let n=e===`auto`,r=t===`auto`;r&&!n&&(Q.needsAutoModeExitAttachment=!1),n&&!r&&(Q.needsAutoModeExitAttachment=!0)}function es(){return Q.lspRecommendationShownThisSession}function ts(e){Q.lspRecommendationShownThisSession=e}function ns(e){Q.initJsonSchema=e}function rs(){return Q.initJsonSchema}function is(e){Q.registeredHooks||(Q.registeredHooks={});for(let[t,n]of Object.entries(e)){let e=t;Q.registeredHooks[e]||(Q.registeredHooks[e]=[]),Q.registeredHooks[e].push(...n??[])}}function as(){return Q.registeredHooks}function os(){if(!Q.registeredHooks)return;let e={};for(let[t,n]of Object.entries(Q.registeredHooks)){let r=(n??[]).filter(e=>!(`pluginRoot`in e));r.length>0&&(e[t]=r)}Q.registeredHooks=Object.keys(e).length>0?e:null}function ss(){return Q.planSlugCache}function cs(e,t){if(Q.planSlugCache.size>=50){let e=Q.planSlugCache.keys().next().value;e!==void 0&&Q.planSlugCache.delete(e)}Q.planSlugCache.set(e,t)}function ls(e){Q.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:e.sessionId}}function us(){return Q.teleportedSessionInfo}function ds(){Q.teleportedSessionInfo&&(Q.teleportedSessionInfo.hasLoggedFirstMessage=!0)}function fs(e,t,n,r=null){let i=`${r??``}:${e}`;Q.invokedSkills.set(i,{skillName:e,skillPath:t,content:n,invokedAt:Date.now(),agentId:r})}function ps(e){let t=e??null,n=new Map;for(let[e,r]of Q.invokedSkills)r.agentId===t&&n.set(e,r);return n}function ms(e){if(!e||e.size===0){Q.invokedSkills.clear();return}for(let[t,n]of Q.invokedSkills)(n.agentId===null||!e.has(n.agentId))&&Q.invokedSkills.delete(t)}function hs(e){for(let[t,n]of Q.invokedSkills)n.agentId===e&&Q.invokedSkills.delete(t)}function gs(){return Q.mainThreadAgentType}function _s(e){Q.mainThreadAgentType=e}function vs(){return Q.isRemoteMode}function ys(e){Q.isRemoteMode=e}function bs(){return Q.systemPromptSectionCache}function xs(e,t){if(Q.systemPromptSectionCache.size>=100){let e=Q.systemPromptSectionCache.keys().next().value;e!==void 0&&Q.systemPromptSectionCache.delete(e)}Q.systemPromptSectionCache.set(e,t)}function Ss(){Q.systemPromptSectionCache.clear()}function Cs(){return Q.lastEmittedDate}function ws(e){Q.lastEmittedDate=e}function Ts(){return Q.additionalDirectoriesForClaudeMd}function Es(e){Q.additionalDirectoriesForClaudeMd=e}function Ds(){return Q.promptCache1hAllowlist}function Os(e){Q.promptCache1hAllowlist=e}function ks(){return Q.promptCache1hEligible}function As(e){Q.promptCache1hEligible=e}function js(){return Q.afkModeHeaderLatched}function Ms(e){Q.afkModeHeaderLatched=e}function Ns(){return Q.fastModeHeaderLatched}function Ps(e){Q.fastModeHeaderLatched=e}function Fs(){return Q.cacheEditingHeaderLatched}function Is(){Q.afkModeHeaderLatched=null,Q.fastModeHeaderLatched=null,Q.cacheEditingHeaderLatched=null}function Ls(){return Q.promptId}function Rs(e){Q.promptId=e}var Q,zs,Bs,Vs,Hs,Us,$,Ws,Gs,Ks=e((()=>{mi(),hi(),Di(),ki(),Q=Ai(),zs=Oi(),Bs=zs.subscribe,Hs=0,Us=null,$=0,Ws=!1,Gs=150}));export{To as $,Ho as $n,vn as $r,is as $t,eo as A,C as Ai,$a as An,zr as Ar,la as At,vs as B,Ri as Bn,B as Br,Ko as Bt,lo as C,ot as Ci,ys as Cn,di as Cr,Yi as Ct,ga as D,Re as Di,jo as Dn,Ur as Dr,Ji as Dt,Ja as E,w as Ei,Ta as En,Hr as Er,Ki as Et,Pa as F,ro as Fn,jr as Fr,ha as Ft,Sa as G,Rs as Gn,L as Gr,Go as Gt,wa as H,zi as Hn,Mn as Hr,xa as Ht,Ro as I,Ha as In,G as Ir,Ma as It,Na as J,Ra as Jn,Cn as Jr,Zo as Jt,Ga as K,_o as Kn,An as Kr,ds as Kt,ps as L,Qo as Ln,or as Lr,Bo as Lt,xo as M,S as Mi,Fa as Mn,Rr as Mr,Xi as Mt,yo as N,Ce as Ni,_s as Nn,Lr as Nr,ma as Nt,Bi as O,Me as Oi,ws as On,q as Or,ua as Ot,rs as P,Ua as Pn,Ar as Pr,io as Pt,ja as Q,ho as Qn,gn as Qr,Mi as Qt,so as R,Yo as Rn,U as Rr,$o as Rt,No as S,at as Si,co as Sn,ui as Sr,qi as St,qa as T,Ve as Ti,Ao as Tn,ri as Tr,fa as Tt,Cs as U,Os as Un,Nn as Ur,ya as Ut,ka as V,cs as Vn,Bn as Vr,es as Vt,Oa as W,As as Wn,jn as Wr,Ks as Wt,no as X,wo as Xn,xn as Xr,Bs as Xt,gs as Y,Vo as Yn,Sn as Yr,Jo as Yt,Va as Z,Wo as Zn,yn as Zr,Io as Zt,vo as _,ut as _i,qo as _n,Si as _r,ra as _t,sa as a,dn as ai,Ms as an,_a as ar,Ds as at,va as b,D as bi,Ia as bn,wi as br,us as bt,Is as c,jt as ci,Mo as cn,Aa as cr,go as ct,os as d,O as di,Vi as dn,Ti as dr,La as dt,hn as ei,za as en,ia as er,Ii as et,Ss as f,ht as fi,Ui as fn,bi as fr,Wa as ft,js as g,lt as gi,bo as gn,Di as gr,Uo as gt,Ts as h,dt as hi,So as hn,gi as hr,Fi as ht,Wi as i,un as ii,Es as in,zo as ir,Li as it,Ns as j,ke as ji,ts as jn,Br as jr,da as jt,Hi as k,Ne as ki,Ca as kn,K as kr,ca as kt,ms as l,k as li,uo as ln,Oi as lr,as as lt,Za as m,ft as mi,Ps as mn,Ci as mr,Co as mt,Zi as n,pn as ni,$i as nn,ls as nr,ss as nt,ta as o,A as oi,Fo as on,Pi as or,ks as ot,Da as p,gt as pi,to as pn,vi as pr,ji as pt,Qa as q,po as qn,kn as qr,Ea as qt,Gi as r,F as ri,ea as rn,ao as rr,Ka as rt,Qi as s,Mt as si,Oo as sn,aa as sr,Ls as st,fs as t,I as ti,na as tn,xs as tr,Ni as tt,hs as u,Tt as ui,Ba as un,ki as ur,fo as ut,Po as v,st as vi,ba as vn,xi as vr,mo as vt,Xa as w,He as wi,ko as wn,ni as wr,pa as wt,Fs as x,E as xi,Lo as xn,_i as xr,Ya as xt,Do as y,ct as yi,ns as yn,yi as yr,bs as yt,oo as z,Eo as zn,$n as zr,Xo as zt};
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./isObject-C6qM3WEW.js";import{a as d,c as f,d as p,f as m,g as h,h as g,i as _,l as v,m as y,n as ee,o as te,p as ne,r as re,s as ie,t as ae,u as oe}from"./memoize-BK3gG5ob.js";import{i as b,n as se,r as x,t as ce}from"./isSymbol-BO6cdPI7.js";import{realpathSync as le}from"fs";import{randomUUID as ue}from"crypto";import{cwd as de}from"process";function fe(){this.__data__=new ie,this.size=0}var pe=e((()=>{f()}));function me(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var he=e((()=>{}));function ge(e){return this.__data__.get(e)}var _e=e((()=>{}));function ve(e){return this.__data__.has(e)}var ye=e((()=>{}));function be(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!d||r.length<xe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this}var xe,Se=e((()=>{f(),te(),_(),xe=200}));function S(e){var t=this.__data__=new ie(e);this.size=t.size}var Ce=e((()=>{f(),pe(),he(),_e(),ye(),Se(),S.prototype.clear=fe,S.prototype.delete=me,S.prototype.get=ge,S.prototype.has=ve,S.prototype.set=be}));function we(e){return this.__data__.set(e,Te),this}var Te,Ee=e((()=>{Te=`__lodash_hash_undefined__`}));function De(e){return this.__data__.has(e)}var Oe=e((()=>{}));function C(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new re;++t<n;)this.add(e[t])}var ke=e((()=>{_(),Ee(),Oe(),C.prototype.add=C.prototype.push=we,C.prototype.has=De}));function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var je=e((()=>{}));function Me(e,t){return e.has(t)}var Ne=e((()=>{}));function Pe(e,t,n,r,i,a){var o=n&Fe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Ie?new C:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ae(t,function(e,t){if(!Me(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Fe,Ie,Le=e((()=>{ke(),je(),Ne(),Fe=1,Ie=2})),w,Re=e((()=>{c(),w=n.Uint8Array}));function ze(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var Be=e((()=>{}));function Ve(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var He=e((()=>{}));function Ue(e,t,n,r,i,a,o){switch(n){case nt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tt:return!(e.byteLength!=t.byteLength||!a(new w(e),new w(t)));case Ke:case qe:case Xe:return v(+e,+t);case Je:return e.name==t.name&&e.message==t.message;case Ze:case $e:return e==t+``;case Ye:var s=ze;case Qe:var c=r&We;if(s||(s=Ve),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Ge,o.set(e,t);var u=Pe(s(e),s(t),r,i,a,o);return o.delete(e),u;case et:if(T)return T.call(e)==T.call(t)}return!1}var We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,T,it=e((()=>{o(),Re(),oe(),Le(),Be(),He(),We=1,Ge=2,Ke=`[object Boolean]`,qe=`[object Date]`,Je=`[object Error]`,Ye=`[object Map]`,Xe=`[object Number]`,Ze=`[object RegExp]`,Qe=`[object Set]`,$e=`[object String]`,et=`[object Symbol]`,tt=`[object ArrayBuffer]`,nt=`[object DataView]`,rt=t?t.prototype:void 0,T=rt?rt.valueOf:void 0}));function at(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ot=e((()=>{})),E,D=e((()=>{E=Array.isArray}));function st(e,t,n){var r=t(e);return E(e)?r:at(r,n(e))}var ct=e((()=>{ot(),D()}));function lt(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var ut=e((()=>{}));function dt(){return[]}var ft=e((()=>{})),pt,mt,ht,gt=e((()=>{ut(),ft(),pt=Object.prototype.propertyIsEnumerable,mt=Object.getOwnPropertySymbols,ht=mt?function(e){return e==null?[]:(e=Object(e),lt(mt(e),function(t){return pt.call(e,t)}))}:dt}));function _t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vt=e((()=>{}));function yt(e){return b(e)&&s(e)==bt}var bt,xt=e((()=>{r(),x(),bt=`[object Arguments]`})),St,Ct,wt,O,Tt=e((()=>{xt(),x(),St=Object.prototype,Ct=St.hasOwnProperty,wt=St.propertyIsEnumerable,O=yt(function(){return arguments}())?yt:function(e){return b(e)&&Ct.call(e,`callee`)&&!wt.call(e,`callee`)}}));function Et(){return!1}var Dt=e((()=>{})),Ot,kt,At,k,jt=e((()=>{c(),Dt(),Ot=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kt=Ot&&typeof module==`object`&&module&&!module.nodeType&&module,At=kt&&kt.exports===Ot?n.Buffer:void 0,k=(At?At.isBuffer:void 0)||Et}));function Mt(e,t){var n=typeof e;return t=t??Nt,!!t&&(n==`number`||n!=`symbol`&&Pt.test(e))&&e>-1&&e%1==0&&e<t}var Nt,Pt,A=e((()=>{Nt=9007199254740991,Pt=/^(?:0|[1-9]\d*)$/}));function j(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Ft}var Ft,It=e((()=>{Ft=9007199254740991}));function Lt(e){return b(e)&&j(e.length)&&!!M[s(e)]}var Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,M,ln=e((()=>{r(),It(),x(),Rt=`[object Arguments]`,zt=`[object Array]`,Bt=`[object Boolean]`,Vt=`[object Date]`,Ht=`[object Error]`,Ut=`[object Function]`,Wt=`[object Map]`,Gt=`[object Number]`,Kt=`[object Object]`,qt=`[object RegExp]`,Jt=`[object Set]`,Yt=`[object String]`,Xt=`[object WeakMap]`,Zt=`[object ArrayBuffer]`,Qt=`[object DataView]`,$t=`[object Float32Array]`,en=`[object Float64Array]`,tn=`[object Int8Array]`,nn=`[object Int16Array]`,rn=`[object Int32Array]`,an=`[object Uint8Array]`,on=`[object Uint8ClampedArray]`,sn=`[object Uint16Array]`,cn=`[object Uint32Array]`,M={},M[$t]=M[en]=M[tn]=M[nn]=M[rn]=M[an]=M[on]=M[sn]=M[cn]=!0,M[Rt]=M[zt]=M[Zt]=M[Bt]=M[Qt]=M[Vt]=M[Ht]=M[Ut]=M[Wt]=M[Gt]=M[Kt]=M[qt]=M[Jt]=M[Yt]=M[Xt]=!1}));function un(e){return function(t){return e(t)}}var dn=e((()=>{})),fn,N,P,F,pn=e((()=>{u(),fn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,N=fn&&typeof module==`object`&&module&&!module.nodeType&&module,P=N&&N.exports===fn&&i.process,F=function(){try{return N&&N.require&&N.require(`util`).types||P&&P.binding&&P.binding(`util`)}catch{}}()})),mn,I,hn=e((()=>{ln(),dn(),pn(),mn=F&&F.isTypedArray,I=mn?un(mn):Lt}));function gn(e,t){var n=E(e),r=!n&&O(e),i=!n&&!r&&k(e),a=!n&&!r&&!i&&I(e),o=n||r||i||a,s=o?_t(e.length,String):[],c=s.length;for(var l in e)(t||_n.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Mt(l,c)))&&s.push(l);return s}var _n,vn=e((()=>{vt(),Tt(),D(),jt(),A(),hn(),_n=Object.prototype.hasOwnProperty}));function yn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||bn)}var bn,xn=e((()=>{bn=Object.prototype}));function Sn(e,t){return function(n){return e(t(n))}}var Cn=e((()=>{})),wn,Tn=e((()=>{Cn(),wn=Sn(Object.keys,Object)}));function En(e){if(!yn(e))return wn(e);var t=[];for(var n in Object(e))Dn.call(e,n)&&n!=`constructor`&&t.push(n);return t}var Dn,On=e((()=>{xn(),Tn(),Dn=Object.prototype.hasOwnProperty}));function kn(e){return e!=null&&j(e.length)&&!h(e)}var An=e((()=>{g(),It()}));function L(e){return kn(e)?gn(e):En(e)}var jn=e((()=>{vn(),On(),An()}));function Mn(e){return st(e,L,ht)}var Nn=e((()=>{ct(),gt(),jn()}));function Pn(e,t,n,r,i,a){var o=n&Fn,s=Mn(e),c=s.length;if(c!=Mn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:In.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Fn,In,Ln=e((()=>{Nn(),Fn=1,In=Object.prototype.hasOwnProperty})),R,Rn=e((()=>{m(),c(),R=p(n,`DataView`)})),z,zn=e((()=>{m(),c(),z=p(n,`Promise`)})),B,Bn=e((()=>{m(),c(),B=p(n,`Set`)})),V,Vn=e((()=>{m(),c(),V=p(n,`WeakMap`)})),Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,H,U,$n=e((()=>{Rn(),te(),zn(),Bn(),Vn(),r(),ne(),Hn=`[object Map]`,Un=`[object Object]`,Wn=`[object Promise]`,Gn=`[object Set]`,Kn=`[object WeakMap]`,qn=`[object DataView]`,Jn=y(R),Yn=y(d),Xn=y(z),Zn=y(B),Qn=y(V),H=s,(R&&H(new R(new ArrayBuffer(1)))!=qn||d&&H(new d)!=Hn||z&&H(z.resolve())!=Wn||B&&H(new B)!=Gn||V&&H(new V)!=Kn)&&(H=function(e){var t=s(e),n=t==Un?e.constructor:void 0,r=n?y(n):``;if(r)switch(r){case Jn:return qn;case Yn:return Hn;case Xn:return Wn;case Zn:return Gn;case Qn:return Kn}return t}),U=H}));function er(e,t,n,r,i,a){var o=E(e),s=E(t),c=o?rr:U(e),l=s?rr:U(t);c=c==nr?W:c,l=l==nr?W:l;var u=c==W,d=l==W,f=c==l;if(f&&k(e)){if(!k(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new S),o||I(e)?Pe(e,t,n,r,i,a):Ue(e,t,c,n,r,i,a);if(!(n&tr)){var p=u&&ir.call(e,`__wrapped__`),m=d&&ir.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new S),i(h,g,n,r,a)}}return f?(a||(a=new S),Pn(e,t,n,r,i,a)):!1}var tr,nr,rr,W,ir,ar=e((()=>{Ce(),Le(),it(),Ln(),$n(),D(),jt(),hn(),tr=1,nr=`[object Arguments]`,rr=`[object Array]`,W=`[object Object]`,ir=Object.prototype.hasOwnProperty}));function G(e,t,n,r,i){return e===t?!0:e==null||t==null||!b(e)&&!b(t)?e!==e&&t!==t:er(e,t,n,r,G,i)}var or=e((()=>{ar(),x()}));function sr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new S;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?G(u,l,cr|lr,r,d):f))return!1}}return!0}var cr,lr,ur=e((()=>{Ce(),or(),cr=1,lr=2}));function dr(e){return e===e&&!a(e)}var fr=e((()=>{l()}));function pr(e){for(var t=L(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,dr(i)]}return t}var mr=e((()=>{fr(),jn()}));function hr(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var gr=e((()=>{}));function _r(e){var t=pr(e);return t.length==1&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||sr(n,e,t)}}var vr=e((()=>{ur(),mr(),gr()}));function yr(e,t){if(E(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||se(e)?!0:xr.test(e)||!br.test(e)||t!=null&&e in Object(t)}var br,xr,Sr=e((()=>{D(),ce(),br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xr=/^\w*$/}));function Cr(e){var t=ee(e,function(e){return n.size===wr&&n.clear(),e}),n=t.cache;return t}var wr,Tr=e((()=>{ae(),wr=500})),Er,Dr,Or,kr=e((()=>{Tr(),Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Or=Cr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Er,function(e,n,r,i){t.push(r?i.replace(Dr,`$1`):n||e)}),t})}));function Ar(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var jr=e((()=>{}));function Mr(e){if(typeof e==`string`)return e;if(E(e))return Ar(e,Mr)+``;if(se(e))return Fr?Fr.call(e):``;var t=e+``;return t==`0`&&1/e==-Nr?`-0`:t}var Nr,Pr,Fr,Ir=e((()=>{o(),jr(),D(),ce(),Nr=1/0,Pr=t?t.prototype:void 0,Fr=Pr?Pr.toString:void 0}));function Lr(e){return e==null?``:Mr(e)}var Rr=e((()=>{Ir()}));function zr(e,t){return E(e)?e:yr(e,t)?[e]:Or(Lr(e))}var Br=e((()=>{D(),Sr(),kr(),Rr()}));function K(e){if(typeof e==`string`||se(e))return e;var t=e+``;return t==`0`&&1/e==-Vr?`-0`:t}var Vr,q=e((()=>{ce(),Vr=1/0}));function Hr(e,t){t=zr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[K(t[n++])];return n&&n==r?e:void 0}var Ur=e((()=>{Br(),q()}));function Wr(e,t,n){var r=e==null?void 0:Hr(e,t);return r===void 0?n:r}var Gr=e((()=>{Ur()}));function Kr(e,t){return e!=null&&t in Object(e)}var qr=e((()=>{}));function Jr(e,t,n){t=zr(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=K(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&j(i)&&Mt(o,i)&&(E(e)||O(e)))}var Yr=e((()=>{Br(),Tt(),D(),A(),It(),q()}));function Xr(e,t){return e!=null&&Jr(e,t,Kr)}var Zr=e((()=>{qr(),Yr()}));function Qr(e,t){return yr(e)&&dr(t)?hr(K(e),t):function(n){var r=Wr(n,e);return r===void 0&&r===t?Xr(n,e):G(t,r,$r|ei)}}var $r,ei,ti=e((()=>{or(),Gr(),Zr(),Sr(),fr(),gr(),q(),$r=1,ei=2}));function ni(e){return e}var ri=e((()=>{}));function ii(e){return function(t){return t?.[e]}}var ai=e((()=>{}));function oi(e){return function(t){return Hr(t,e)}}var si=e((()=>{Ur()}));function ci(e){return yr(e)?ii(K(e)):oi(e)}var li=e((()=>{ai(),si(),Sr(),q()}));function ui(e){return typeof e==`function`?e:e==null?ni:typeof e==`object`?E(e)?Qr(e[0],e[1]):_r(e):ci(e)}var di=e((()=>{vr(),ti(),ri(),D(),li()}));function fi(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==void 0&&(n=n===void 0?a:n+a)}return n}var pi=e((()=>{}));function J(e,t){return e&&e.length?fi(e,ui(t,2)):0}var mi=e((()=>{di(),pi()})),hi=e((()=>{}));function gi(){return Y}function _i(e){Y=e}function vi(e){return X.has(e)?X.get(e):void 0}function yi(e,t){X.set(e,t)}function bi(e){return Z.get(e)}function xi(e,t){Z.set(e,t)}function Si(){Y=null,X.clear(),Z.clear()}function Ci(){return Ei}function wi(e){Ei=e}function Ti(){Ei=void 0}var Y,X,Z,Ei,Di=e((()=>{Y=null,X=new Map,Z=new Map}));function Oi(){let e=new Set;return{subscribe(t){return e.add(t),()=>{e.delete(t)}},emit(...t){for(let n of e)n(...t)},clear(){e.clear()}}}var ki=e((()=>{}));function Ai(){let e=``;if(typeof process<`u`&&typeof process.cwd==`function`&&typeof le==`function`){let t=de();try{e=le(t).normalize(`NFC`)}catch{e=t.normalize(`NFC`)}}return{originalCwd:e,projectRoot:e,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:e,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,clientType:`cli`,sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:[`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:ue(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedAgentsMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForAgentsMd:[],sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function ji(){return Q.sessionId}function Mi(e={}){return e.setCurrentAsParent&&(Q.parentSessionId=Q.sessionId),Q.planSlugCache.delete(Q.sessionId),Q.sessionId=ue(),Q.sessionProjectDir=null,Q.sessionId}function Ni(){return Q.parentSessionId}function Pi(e,t=null){Q.planSlugCache.delete(Q.sessionId),Q.sessionId=e,Q.sessionProjectDir=t,zs.emit(e)}function Fi(){return Q.sessionProjectDir}function Ii(){return Q.originalCwd}function Li(){return Q.projectRoot}function Ri(e){Q.originalCwd=e.normalize(`NFC`)}function zi(e){Q.projectRoot=e.normalize(`NFC`)}function Bi(){return Q.cwd}function Vi(e){Q.cwd=e.normalize(`NFC`)}function Hi(){return Q.directConnectServerUrl}function Ui(e){Q.directConnectServerUrl=e}function Wi(e,t){Q.totalAPIDuration+=e,Q.totalAPIDurationWithoutRetries+=t}function Gi(e,t,n){Q.modelUsage[n]=t,Q.totalCostUSD+=e}function Ki(){return Q.totalCostUSD}function qi(){return Q.totalAPIDuration}function Ji(){return Date.now()-Q.startTime}function Yi(){return Q.totalAPIDurationWithoutRetries}function Xi(){return Q.totalToolDuration}function Zi(e){Q.totalToolDuration+=e,Q.turnToolDurationMs+=e,Q.turnToolCount++}function Qi(e){Q.turnHookDurationMs+=e,Q.turnHookCount++}function $i(){Q.turnHookDurationMs=0,Q.turnHookCount=0}function ea(){Q.turnToolDurationMs=0,Q.turnToolCount=0}function ta(e){Q.turnClassifierDurationMs+=e,Q.turnClassifierCount++}function na(){Q.turnClassifierDurationMs=0,Q.turnClassifierCount=0}function ra(){return Q.statsStore}function ia(e){Q.statsStore=e}function aa(e){e?oa():Vs=!0}function oa(){Q.lastInteractionTime=Date.now(),Vs=!1}function sa(e,t){Q.totalLinesAdded+=e,Q.totalLinesRemoved+=t}function ca(){return Q.totalLinesAdded}function la(){return Q.totalLinesRemoved}function ua(){return J(Object.values(Q.modelUsage),`inputTokens`)}function da(){return J(Object.values(Q.modelUsage),`outputTokens`)}function fa(){return J(Object.values(Q.modelUsage),`cacheReadInputTokens`)}function pa(){return J(Object.values(Q.modelUsage),`cacheCreationInputTokens`)}function ma(){return J(Object.values(Q.modelUsage),`webSearchRequests`)}function ha(){return da()-Hs}function ga(){return Us}function _a(e){Hs=da(),Us=e,$=0}function va(){return $}function ya(){$++}function ba(){Q.hasUnknownModelCost=!0}function xa(){return Q.hasUnknownModelCost}function Sa(){return Q.lastMainRequestId}function Ca(e){Q.lastMainRequestId=e}function wa(){return Q.lastApiCompletionTimestamp}function Ta(e){Q.lastApiCompletionTimestamp=e}function Ea(){Q.pendingPostCompaction=!0}function Da(){let e=Q.pendingPostCompaction;return Q.pendingPostCompaction=!1,e}function Oa(){return Q.lastInteractionTime}function ka(){return Ws}async function Aa(){for(;Ws;)await new Promise(e=>setTimeout(e,Gs).unref?.())}function ja(){return Q.modelUsage}function Ma(e){return Q.modelUsage[e]}function Na(){return Q.mainLoopModelOverride}function Pa(){return Q.initialMainLoopModel}function Fa(e){Q.mainLoopModelOverride=e}function Ia(e){Q.initialMainLoopModel=e}function La(){return Q.sdkBetas}function Ra(e){Q.sdkBetas=e}function za(){Q.totalCostUSD=0,Q.totalAPIDuration=0,Q.totalAPIDurationWithoutRetries=0,Q.totalToolDuration=0,Q.startTime=Date.now(),Q.totalLinesAdded=0,Q.totalLinesRemoved=0,Q.hasUnknownModelCost=!1,Q.modelUsage={},Q.promptId=null}function Ba({totalCostUSD:e,totalAPIDuration:t,totalAPIDurationWithoutRetries:n,totalToolDuration:r,totalLinesAdded:i,totalLinesRemoved:a,lastDuration:o,modelUsage:s}){Q.totalCostUSD=e,Q.totalAPIDuration=t,Q.totalAPIDurationWithoutRetries=n,Q.totalToolDuration=r,Q.totalLinesAdded=i,Q.totalLinesRemoved=a,s&&(Q.modelUsage=s),o&&(Q.startTime=Date.now()-o)}function Va(){return Q.modelStrings}function Ha(e){Q.modelStrings=e}function Ua(e,t){Q.meter=e,Q.sessionCounter=t(`claude_code.session.count`,{description:`Count of CLI sessions started`}),Q.locCounter=t(`claude_code.lines_of_code.count`,{description:`Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed`}),Q.prCounter=t(`claude_code.pull_request.count`,{description:`Number of pull requests created`}),Q.commitCounter=t(`claude_code.commit.count`,{description:`Number of git commits created`}),Q.costCounter=t(`claude_code.cost.usage`,{description:`Cost of the Work Mate session`,unit:`USD`}),Q.tokenCounter=t(`claude_code.token.usage`,{description:`Number of tokens used`,unit:`tokens`}),Q.codeEditToolDecisionCounter=t(`claude_code.code_edit_tool.decision`,{description:`Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools`}),Q.activeTimeCounter=t(`claude_code.active_time.total`,{description:`Total active time in seconds`,unit:`s`})}function Wa(){return Q.sessionCounter}function Ga(){return Q.locCounter}function Ka(){return Q.prCounter}function qa(){return Q.commitCounter}function Ja(){return Q.costCounter}function Ya(){return Q.tokenCounter}function Xa(){return Q.codeEditToolDecisionCounter}function Za(){return Q.activeTimeCounter}function Qa(){return Q.loggerProvider}function $a(e){Q.loggerProvider=e}function eo(){return Q.eventLogger}function to(e){Q.eventLogger=e}function no(){return Q.meterProvider}function ro(e){Q.meterProvider=e}function io(){return Q.tracerProvider}function ao(e){Q.tracerProvider=e}function oo(){return!Q.isInteractive}function so(){return Q.isInteractive}function co(e){Q.isInteractive=e}function lo(){return Q.clientType}function uo(e){Q.clientType=e}function fo(){return Q.sdkAgentProgressSummariesEnabled}function po(e){Q.sdkAgentProgressSummariesEnabled=e}function mo(){return Q.strictToolResultPairing}function ho(e){Q.sessionSource=e}function go(){return Q.questionPreviewFormat}function _o(e){Q.questionPreviewFormat=e}function vo(){return Q.agentColorMap}function yo(){return Q.flagSettingsPath}function bo(e){Q.flagSettingsPath=e}function xo(){return Q.flagSettingsInline}function So(e){Q.flagSettingsInline=e}function Co(){return Q.sessionIngressToken}function wo(e){Q.sessionIngressToken=e}function To(){return Q.oauthTokenFromFd}function Eo(e){Q.oauthTokenFromFd=e}function Do(){return Q.apiKeyFromFd}function Oo(e){Q.apiKeyFromFd=e}function ko(e){Q.lastAPIRequest=e}function Ao(e){Q.lastAPIRequestMessages=e}function jo(e){Q.lastClassifierRequests=e}function Mo(e){Q.cachedAgentsMdContent=e}function No(){return Q.cachedAgentsMdContent}function Po(){return Q.allowedSettingSources}function Fo(e){Q.allowedSettingSources=e}function Io(){return oo()&&Q.clientType!==`claude-vscode`}function Lo(e){Q.inlinePlugins=e}function Ro(){return Q.inlinePlugins}function zo(e){Q.useCoworkPlugins=e,Si()}function Bo(){return Q.useCoworkPlugins}function Vo(e){Q.sessionBypassPermissionsMode=e}function Ho(e){Q.sessionTrustAccepted=e}function Uo(){return Q.sessionTrustAccepted}function Wo(e){Q.sessionPersistenceDisabled=e}function Go(){return Q.sessionPersistenceDisabled}function Ko(){return Q.hasExitedPlanMode}function qo(e){Q.hasExitedPlanMode=e}function Jo(){return Q.needsPlanModeExitAttachment}function Yo(e){Q.needsPlanModeExitAttachment=e}function Xo(e,t){t===`plan`&&e!==`plan`&&(Q.needsPlanModeExitAttachment=!1),e===`plan`&&t!==`plan`&&(Q.needsPlanModeExitAttachment=!0)}function Zo(){return Q.needsAutoModeExitAttachment}function Qo(e){Q.needsAutoModeExitAttachment=e}function $o(e,t){if(e===`auto`&&t===`plan`||e===`plan`&&t===`auto`)return;let n=e===`auto`,r=t===`auto`;r&&!n&&(Q.needsAutoModeExitAttachment=!1),n&&!r&&(Q.needsAutoModeExitAttachment=!0)}function es(){return Q.lspRecommendationShownThisSession}function ts(e){Q.lspRecommendationShownThisSession=e}function ns(e){Q.initJsonSchema=e}function rs(){return Q.initJsonSchema}function is(e){Q.registeredHooks||(Q.registeredHooks={});for(let[t,n]of Object.entries(e)){let e=t;Q.registeredHooks[e]||(Q.registeredHooks[e]=[]),Q.registeredHooks[e].push(...n??[])}}function as(){return Q.registeredHooks}function os(){if(!Q.registeredHooks)return;let e={};for(let[t,n]of Object.entries(Q.registeredHooks)){let r=(n??[]).filter(e=>!(`pluginRoot`in e));r.length>0&&(e[t]=r)}Q.registeredHooks=Object.keys(e).length>0?e:null}function ss(){return Q.planSlugCache}function cs(e,t){if(Q.planSlugCache.size>=50){let e=Q.planSlugCache.keys().next().value;e!==void 0&&Q.planSlugCache.delete(e)}Q.planSlugCache.set(e,t)}function ls(e){Q.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:e.sessionId}}function us(){return Q.teleportedSessionInfo}function ds(){Q.teleportedSessionInfo&&(Q.teleportedSessionInfo.hasLoggedFirstMessage=!0)}function fs(e,t,n,r=null){let i=`${r??``}:${e}`;Q.invokedSkills.set(i,{skillName:e,skillPath:t,content:n,invokedAt:Date.now(),agentId:r})}function ps(e){let t=e??null,n=new Map;for(let[e,r]of Q.invokedSkills)r.agentId===t&&n.set(e,r);return n}function ms(e){if(!e||e.size===0){Q.invokedSkills.clear();return}for(let[t,n]of Q.invokedSkills)(n.agentId===null||!e.has(n.agentId))&&Q.invokedSkills.delete(t)}function hs(e){for(let[t,n]of Q.invokedSkills)n.agentId===e&&Q.invokedSkills.delete(t)}function gs(){return Q.mainThreadAgentType}function _s(e){Q.mainThreadAgentType=e}function vs(){return Q.isRemoteMode}function ys(e){Q.isRemoteMode=e}function bs(){return Q.systemPromptSectionCache}function xs(e,t){if(Q.systemPromptSectionCache.size>=100){let e=Q.systemPromptSectionCache.keys().next().value;e!==void 0&&Q.systemPromptSectionCache.delete(e)}Q.systemPromptSectionCache.set(e,t)}function Ss(){Q.systemPromptSectionCache.clear()}function Cs(){return Q.lastEmittedDate}function ws(e){Q.lastEmittedDate=e}function Ts(){return Q.additionalDirectoriesForAgentsMd}function Es(e){Q.additionalDirectoriesForAgentsMd=e}function Ds(){return Q.promptCache1hAllowlist}function Os(e){Q.promptCache1hAllowlist=e}function ks(){return Q.promptCache1hEligible}function As(e){Q.promptCache1hEligible=e}function js(){return Q.afkModeHeaderLatched}function Ms(e){Q.afkModeHeaderLatched=e}function Ns(){return Q.fastModeHeaderLatched}function Ps(e){Q.fastModeHeaderLatched=e}function Fs(){return Q.cacheEditingHeaderLatched}function Is(){Q.afkModeHeaderLatched=null,Q.fastModeHeaderLatched=null,Q.cacheEditingHeaderLatched=null}function Ls(){return Q.promptId}function Rs(e){Q.promptId=e}var Q,zs,Bs,Vs,Hs,Us,$,Ws,Gs,Ks=e((()=>{mi(),hi(),Di(),ki(),Q=Ai(),zs=Oi(),Bs=zs.subscribe,Hs=0,Us=null,$=0,Ws=!1,Gs=150}));export{To as $,Ho as $n,vn as $r,is as $t,eo as A,C as Ai,$a as An,zr as Ar,la as At,vs as B,Ri as Bn,B as Br,Ko as Bt,lo as C,ot as Ci,ys as Cn,di as Cr,Yi as Ct,ga as D,Re as Di,jo as Dn,Ur as Dr,Ji as Dt,Ja as E,w as Ei,Ta as En,Hr as Er,Ki as Et,Pa as F,ro as Fn,jr as Fr,ha as Ft,Sa as G,Rs as Gn,L as Gr,Go as Gt,wa as H,zi as Hn,Mn as Hr,xa as Ht,Ro as I,Ha as In,G as Ir,Ma as It,Na as J,Ra as Jn,Cn as Jr,Zo as Jt,Ga as K,_o as Kn,An as Kr,ds as Kt,ps as L,Qo as Ln,or as Lr,Bo as Lt,xo as M,S as Mi,Fa as Mn,Rr as Mr,Xi as Mt,yo as N,Ce as Ni,_s as Nn,Lr as Nr,ma as Nt,Bi as O,Me as Oi,ws as On,q as Or,ua as Ot,rs as P,Ua as Pn,Ar as Pr,io as Pt,ja as Q,ho as Qn,gn as Qr,Mi as Qt,so as R,Yo as Rn,U as Rr,$o as Rt,No as S,at as Si,co as Sn,ui as Sr,qi as St,qa as T,Ve as Ti,Ao as Tn,ri as Tr,fa as Tt,Cs as U,Os as Un,Nn as Ur,ya as Ut,ka as V,cs as Vn,Bn as Vr,es as Vt,Oa as W,As as Wn,jn as Wr,Ks as Wt,no as X,wo as Xn,xn as Xr,Bs as Xt,gs as Y,Vo as Yn,Sn as Yr,Jo as Yt,Va as Z,Wo as Zn,yn as Zr,Io as Zt,vo as _,ut as _i,qo as _n,Si as _r,ra as _t,sa as a,dn as ai,Ms as an,_a as ar,Ds as at,va as b,D as bi,Ia as bn,wi as br,us as bt,Is as c,jt as ci,Mo as cn,Aa as cr,go as ct,os as d,O as di,Vi as dn,Ti as dr,La as dt,hn as ei,za as en,ia as er,Ii as et,Ss as f,ht as fi,Ui as fn,bi as fr,Wa as ft,js as g,lt as gi,bo as gn,Di as gr,Uo as gt,Ts as h,dt as hi,So as hn,gi as hr,Fi as ht,Wi as i,un as ii,Es as in,zo as ir,Li as it,Ns as j,ke as ji,ts as jn,Br as jr,da as jt,Hi as k,Ne as ki,Ca as kn,K as kr,ca as kt,ms as l,k as li,uo as ln,Oi as lr,as as lt,Za as m,ft as mi,Ps as mn,Ci as mr,Co as mt,Zi as n,pn as ni,$i as nn,ls as nr,ss as nt,ta as o,A as oi,Fo as on,Pi as or,ks as ot,Da as p,gt as pi,to as pn,vi as pr,ji as pt,Qa as q,po as qn,kn as qr,Ea as qt,Gi as r,F as ri,ea as rn,ao as rr,Ka as rt,Qi as s,Mt as si,Oo as sn,aa as sr,Ls as st,fs as t,I as ti,na as tn,xs as tr,Ni as tt,hs as u,Tt as ui,Ba as un,ki as ur,fo as ut,Po as v,st as vi,ba as vn,xi as vr,mo as vt,Xa as w,He as wi,ko as wn,ni as wr,pa as wt,Fs as x,E as xi,Lo as xn,_i as xr,Ya as xt,Do as y,ct as yi,ns as yn,yi as yr,bs as yt,oo as z,Eo as zn,$n as zr,Xo as zt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bn as e,Wt as t,dn as n,pt as r,t as i}from"./state-BPFYBqm1.js";t();export{i as addInvokedSkill,r as getSessionId,n as setCwdState,e as setOriginalCwd};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{h as r,v as i}from"./config-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{h as r,v as i}from"./config-9rLTDOYW.js";var a=e(t(),1);r();var o=n();function s(e,t){let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);return r===i?e[r]:e[r]+(e[i]-e[r])*(n-r)}var c=1024;function l(){let e=new Map,t=new Map,n=new Map;return{increment(t,n=1){e.set(t,(e.get(t)??0)+n)},set(t,n){e.set(t,n)},observe(e,n){let r=t.get(e);if(r||(r={reservoir:[],count:0,sum:0,min:n,max:n},t.set(e,r)),r.count++,r.sum+=n,n<r.min&&(r.min=n),n>r.max&&(r.max=n),r.reservoir.length<c)r.reservoir.push(n);else{let e=Math.floor(Math.random()*r.count);e<c&&(r.reservoir[e]=n)}},add(e,t){let r=n.get(e);r||(r=new Set,n.set(e,r)),r.add(t)},getAll(){let r=Object.fromEntries(e);for(let[e,n]of t){if(n.count===0)continue;r[`${e}_count`]=n.count,r[`${e}_min`]=n.min,r[`${e}_max`]=n.max,r[`${e}_avg`]=n.sum/n.count;let t=[...n.reservoir].sort((e,t)=>e-t);r[`${e}_p50`]=s(t,50),r[`${e}_p95`]=s(t,95),r[`${e}_p99`]=s(t,99)}for(let[e,t]of n)r[e]=t.size;return r}}}var u=(0,a.createContext)(null);function d({store:e,children:t}){let n=(0,a.useMemo)(()=>l(),[]),r=e??n;return(0,a.useEffect)(()=>{let e=()=>{let e=r.getAll();Object.keys(e).length>0&&i(t=>({...t,lastSessionMetrics:e}))};return process.on(`exit`,e),()=>{process.off(`exit`,e)}},[r]),(0,o.jsx)(u.Provider,{value:r,children:t})}export{l as n,d as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,n,o as r,t as i}from"./envUtils-DcaKZlRU.js";import{n as a,t as o}from"./figures-5ThXQEtq.js";import{Db as s,Mb as c,ab as l,ib as ee,sb as u,tb as d,wb as f,xb as p}from"./loadAgentsDir-BXtV2jiO.js";import{P as m,di as h,fi as g,j as _,t as v,ui as y}from"./src-P_wYS_NJ2.js";import{t as b}from"./jsx-runtime-Bb4Xn-E0.js";import{a as x,an as S,c as C,g as w,in as T,ln as E,r as D,wn as O,xn as k}from"./settings-DiBMs2gM.js";import{f as A,v as j}from"./startupProfiler-Dc5r6LgE.js";import{Bt as M,Gt as N,_ as te,ai as P,bt as F,i as I,si as L,x as R}from"./model-CDnVaVDR.js";import{h as z,l as B,o as V,p as H}from"./proxy-BEKNaTXI.js";import{d as U,u as W}from"./pidLock-d1VPd6CG.js";import{n as G,t as K}from"./nativeInstaller-fgCMR_c0.js";import{n as q,t as J}from"./allErrors-CS77lRvU.js";function Y(){return[]}function X(e,t=null,n){let r=e?.find(e=>e.name===`ide`);if(t){let e=c(t.ideType),i=s(t.ideType)?`plugin`:`extension`;if(t.error)return[{label:`IDE`,value:(0,$.jsxs)(m,{children:[_(`error`,n)(o.cross),` Error installing `,e,` `,i,`:`,` `,t.error,`
|
|
2
|
+
`,`Please restart your IDE and try again.`]})}];if(t.installed)return r&&r.type===`connected`?t.installedVersion===r.serverInfo?.version?[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion}`}]:[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion} (server version: ${r.serverInfo?.version})`}]:[{label:`IDE`,value:`Installed ${e} ${i}`}]}else if(r){let e=p(r)??`IDE`;return r.type===`connected`?[{label:`IDE`,value:`Connected to ${e} extension`}]:[{label:`IDE`,value:`${_(`error`,n)(o.cross)} Not connected to ${e}`}]}return[]}function Z(e=[],t){let n=e.filter(e=>e.name!==`ide`);if(!n.length)return[];let r={connected:0,pending:0,needsAuth:0,failed:0};for(let e of n)e.type===`connected`?r.connected++:e.type===`pending`?r.pending++:e.type===`needs-auth`?r.needsAuth++:r.failed++;let i=[];return r.connected&&i.push(_(`success`,t)(`${r.connected} connected`)),r.needsAuth&&i.push(_(`warning`,t)(`${r.needsAuth} need auth`)),r.pending&&i.push(_(`inactive`,t)(`${r.pending} pending`)),r.failed&&i.push(_(`error`,t)(`${r.failed} failed`)),[{label:`MCP servers`,value:`${i.join(`, `)} ${_(`inactive`,t)(`· /mcp`)}`}]}async function Q(){let e=ee(await l()),t=[];return e.forEach(e=>{let n=k(e.path);t.push(`Large ${n} will impact performance (${A(e.content.length)} chars > ${A(d)})`)}),t}function ne(){return[{label:`Setting sources`,value:T().filter(e=>{let t=C(e);return t!==null&&Object.keys(t).length>0}).map(e=>{if(e===`policySettings`){let e=x();if(e===null)return null;switch(e){case`remote`:return`Enterprise managed settings (remote)`;case`plist`:return`Enterprise managed settings (plist)`;case`hklm`:return`Enterprise managed settings (HKLM)`;case`file`:{let{hasBase:e,hasDropIns:t}=D();return e&&t?`Enterprise managed settings (file + drop-ins)`:t?`Enterprise managed settings (drop-ins)`:`Enterprise managed settings (file)`}case`hkcu`:return`Enterprise managed settings (HKCU)`}}return S(e)}).filter(e=>e!==null)}]}async function re(){return(await G()).map(e=>e.message)}async function ie(){let e=await W(),t=[],{errors:n}=J();if(n.length>0){let e=Array.from(new Set(n.map(e=>e.file))).join(`, `);t.push(`Found invalid settings files: ${e}. They will be ignored.`)}return e.warnings.forEach(e=>{t.push(e.issue)}),e.hasUpdatePermissions===!1&&t.push(`No write permissions for auto-updates (requires sudo)`),t}function ae(){let e=F();if(!e)return[];let t=[];return e.subscription&&t.push({label:`Login method`,value:`${e.subscription} Account`}),e.tokenSource&&t.push({label:`Auth token`,value:e.tokenSource}),e.apiKeySource&&t.push({label:`API key`,value:e.apiKeySource}),e.organization&&!process.env.IS_DEMO&&t.push({label:`Organization`,value:e.organization}),e.email&&!process.env.IS_DEMO&&t.push({label:`Email`,value:e.email}),t}function oe(){let e=P(),r=[];if(e!==`firstParty`){let t={bedrock:`AWS Bedrock`,vertex:`Google Vertex AI`,foundry:`Microsoft Foundry`,gemini:`Gemini API`,grok:`Grok API`,openai:`OpenAI API`}[e];r.push({label:`API provider`,value:t})}if(e===`firstParty`){let e=process.env.ANTHROPIC_BASE_URL;e&&r.push({label:`API base URL`,value:e})}else if(e===`bedrock`){let e=process.env.BEDROCK_BASE_URL;e&&r.push({label:`Bedrock base URL`,value:e}),r.push({label:`AWS region`,value:i()}),t(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&r.push({value:`AWS auth skipped`})}else if(e===`vertex`){let e=process.env.VERTEX_BASE_URL;e&&r.push({label:`Vertex base URL`,value:e});let i=process.env.ANTHROPIC_VERTEX_PROJECT_ID;i&&r.push({label:`GCP project`,value:i}),r.push({label:`Default region`,value:n()}),t(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)&&r.push({value:`GCP auth skipped`})}else if(e===`foundry`){let e=process.env.ANTHROPIC_FOUNDRY_BASE_URL;e&&r.push({label:`Microsoft Foundry base URL`,value:e});let n=process.env.ANTHROPIC_FOUNDRY_RESOURCE;n&&r.push({label:`Microsoft Foundry resource`,value:n}),t(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH)&&r.push({value:`Microsoft Foundry auth skipped`})}else if(e===`gemini`){let e=process.env.GEMINI_BASE_URL||`https://generativelanguage.googleapis.com/v1beta`;r.push({label:`Gemini base URL`,value:e})}else if(e===`grok`){let e=process.env.GROK_BASE_URL;r.push({label:`Grok base URL`,value:e})}else if(e===`openai`){let e=process.env.OPENAI_BASE_URL;r.push({label:`OpenAI base URL`,value:e})}let a=V();a&&r.push({label:`Proxy`,value:a});let o=H();return process.env.NODE_EXTRA_CA_CERTS&&r.push({label:`Additional CA cert(s)`,value:process.env.NODE_EXTRA_CA_CERTS}),o&&(o.cert&&process.env.CLAUDE_CODE_CLIENT_CERT&&r.push({label:`mTLS client cert`,value:process.env.CLAUDE_CODE_CLIENT_CERT}),o.key&&process.env.CLAUDE_CODE_CLIENT_KEY&&r.push({label:`mTLS client key`,value:process.env.CLAUDE_CODE_CLIENT_KEY})),r}function se(e){let t=R(e);if(e===null&&N()){let e=I();t=`${y.bold(`Default`)} ${e}`}return t}var $,ce=e((()=>{h(),a(),g(),v(),M(),u(),U(),r(),O(),j(),f(),te(),L(),z(),K(),B(),q(),E(),w(),$=b()}));export{ie as a,Y as c,ce as d,re as i,ne as l,ae as n,Z as o,X as r,Q as s,oe as t,se as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./Settings-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./Settings-C8GKWod1.js";async function a(e,t){return(0,o.jsx)(i,{onClose:e,context:t,defaultTab:`Status`})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{na as t,ta as n}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{na as t,ta as n}from"./loadAgentsDir-BXtV2jiO.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,n)=>e+t(`${n.agentType}: ${n.whenToUse}`),0):0}var i,a=e((()=>{n(),i=15e3}));export{r as n,a as r,i as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{r,t as i}from"./which-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{r,t as i}from"./which-mplwBbc0.js";function a(e,t){return{cmd:r(e)??e,args:t}}var o=e((()=>{i()}));function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function l(e,t,n=t+`s`){return e===1?t:n}function u(e){let t=e.indexOf(`
|
|
2
2
|
`);return t===-1?e:e.slice(0,t)}function d(e,t,n=0){let r=0,i=e.indexOf(t,n);for(;i!==-1;)r++,i=e.indexOf(t,i+1);return r}function f(e){return e.replace(/[0-9]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function p(e){return e.replace(/\u3000/g,` `)}function m(e,t=`,`,n=g){let r=`...[truncated]`,i=``;for(let a of e){let e=i?t:``,o=e+a;if(i.length+o.length<=n)i+=o;else{let t=n-i.length-e.length-14;return t>0?i+=e+a.slice(0,t)+r:i+=r,i}}return i}function h(e,t){let n=e.split(`
|
|
3
3
|
`);return n.length<=t?e:n.slice(0,t).join(`
|
|
4
4
|
`)+`…`}var g,_,v=e((()=>{t(),g=2**21,_=class{constructor(e=g){n(this,`maxSize`,void 0),n(this,`content`,``),n(this,`isTruncated`,!1),n(this,`totalBytesReceived`,0),this.maxSize=e}append(e){let t=typeof e==`string`?e:e.toString();if(this.totalBytesReceived+=t.length,!(this.isTruncated&&this.content.length>=this.maxSize))if(this.content.length+t.length>this.maxSize){let e=this.maxSize-this.content.length;e>0&&(this.content+=t.slice(0,e)),this.isTruncated=!0}else this.content+=t}toString(){if(!this.isTruncated)return this.content;let e=this.totalBytesReceived-this.maxSize,t=Math.round(e/1024);return this.content+`\n... [output truncated - ${t}KB removed]`}clear(){this.content=``,this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}}));export{u as a,p as c,h as d,a as f,s as i,l,c as n,v as o,o as p,d as r,f as s,_ as t,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-DcaKZlRU.js";function r(e){o=e}function i(){let e=o?.()??{};if(!t(process.env.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB))return Object.keys(e).length>0?{...process.env,...e}:process.env;let n={...process.env,...e};for(let e of a)delete n[e],delete n[`INPUT_${e}`];return n}var a,o,s=e((()=>{n(),a=[`ANTHROPIC_API_KEY`,`CLAUDE_CODE_OAUTH_TOKEN`,`ANTHROPIC_AUTH_TOKEN`,`ANTHROPIC_FOUNDRY_API_KEY`,`ANTHROPIC_CUSTOM_HEADERS`,`OTEL_EXPORTER_OTLP_HEADERS`,`OTEL_EXPORTER_OTLP_LOGS_HEADERS`,`OTEL_EXPORTER_OTLP_METRICS_HEADERS`,`OTEL_EXPORTER_OTLP_TRACES_HEADERS`,`AWS_SECRET_ACCESS_KEY`,`AWS_SESSION_TOKEN`,`AWS_BEARER_TOKEN_BEDROCK`,`GOOGLE_APPLICATION_CREDENTIALS`,`AZURE_CLIENT_SECRET`,`AZURE_CLIENT_CERTIFICATE_PATH`,`ACTIONS_ID_TOKEN_REQUEST_TOKEN`,`ACTIONS_ID_TOKEN_REQUEST_URL`,`ACTIONS_RUNTIME_TOKEN`,`ACTIONS_RUNTIME_URL`,`ALL_INPUTS`,`OVERRIDE_GITHUB_TOKEN`,`DEFAULT_WORKFLOW_TOKEN`,`SSH_SIGNING_KEY`]}));export{r as n,i as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./subprocessEnv-CNBOhlDV.js";t();export{e as registerUpstreamProxyEnvFn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./switcher-sYTxnJQA.js";e();export{t as restoreActiveProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-DcaKZlRU.js";import{A as r,l as i,n as a,p as o,w as s}from"./external-CEp-aPkt.js";import{o as c,s as l}from"./log-27kCA_9u.js";import{dirname as u,join as d}from"path";import{existsSync as f,readFileSync as p,renameSync as m,unlinkSync as h,writeFileSync as g}from"fs";import{randomBytes as _}from"node:crypto";var v=e((()=>{a(),a()})),y,b,x,S=e((()=>{v(),y=i([`openai-compat`,`anthropic-compat`]),b=s({id:r().min(1).regex(/^[a-z0-9-]+$/,`id must be kebab-case`),kind:y,baseUrl:r().url(),apiKey:r().min(1).optional(),apiKeyEnv:r().min(1).optional(),defaultModel:r().min(1).default(`gpt-4o-mini`)}).refine(e=>!!e.apiKey||!!e.apiKeyEnv,`either apiKey or apiKeyEnv is required`),x=o(b)}));function C(){return d(t(),`providers.json`)}function w(){k=null}function T(){if(k!==null)return k;let e=E();return k=e.providers,e.providers}function E(){let e=C();if(!f(e))return{providers:[]};let t;try{t=p(e,`utf-8`)}catch(t){let n=`loadProviders: failed to read ${e}: ${t instanceof Error?t.message:String(t)}`;return l(Error(n)),{providers:[],error:n}}if(!t.trim())return{providers:[]};let n;try{n=JSON.parse(t)}catch{let t=`loadProviders: ${e} is not valid JSON. Ignoring.`;return l(Error(t)),{providers:[],error:t}}let r=x.safeParse(n);if(!r.success){let t=`loadProviders: ${e} failed schema validation: ${r.error.message}. Ignoring.`;return l(Error(t)),{providers:[],error:t}}return{providers:r.data}}function D(e,t){return(t??T()).find(t=>t.id===e)}function O(e){let t=C(),n=d(u(t),`.providers-${_(8).toString(`hex`)}.tmp`);try{g(n,JSON.stringify(e,null,2),`utf-8`),m(n,t)}catch(e){try{h(n)}catch{}throw e}return w(),e}var k,A=e((()=>{c(),n(),S(),k=null}));function j(e){if(e.apiKey)return e.apiKey;if(e.apiKeyEnv)return process.env[e.apiKeyEnv]}function M(e,t){let n=t??T(),r=D(e,n);if(!r){let t=n.map(e=>e.id).join(`, `);throw Error(`switchProvider: provider "${e}" not found. Available: ${t}`)}let i=r.kind===`anthropic-compat`?{ANTHROPIC_BASE_URL:r.baseUrl,ANTHROPIC_MODEL:r.defaultModel}:{CLAUDE_CODE_USE_OPENAI:`1`,OPENAI_BASE_URL:r.baseUrl,OPENAI_MODEL:r.defaultModel},a=[];if(r.kind===`openai-compat`){let e=process.env.CLAUDE_CODE_USE_OPENAI===`1`||!!process.env.OPENAI_API_KEY,t=!!process.env.ANTHROPIC_API_KEY;e&&t&&a.push(`Both ANTHROPIC_API_KEY and OpenAI-compat mode are set. ANTHROPIC_API_KEY is for workspace endpoints (/v1/agents, /v1/vaults). OpenAI-compat mode routes /v1/messages to a third-party provider. These are separate planes — verify this is intentional.`)}return!r.apiKey&&!r.apiKeyEnv?a.push(`Provider "${r.id}" has neither apiKey nor apiKeyEnv configured. Edit ~/.workmate/providers.json to add one.`):!r.apiKey&&r.apiKeyEnv&&!process.env[r.apiKeyEnv]&&a.push(`${r.apiKeyEnv} is not set in the current environment. Set it before starting Work Mate: export ${r.apiKeyEnv}=<your-api-key>`),{env:i,warnings:a,provider:r}}function N(e){return e.kind===`anthropic-compat`?`ANTHROPIC_API_KEY`:`OPENAI_API_KEY`}async function P(e,t){delete process.env.CLAUDE_CODE_USE_BEDROCK,delete process.env.CLAUDE_CODE_USE_VERTEX,delete process.env.CLAUDE_CODE_USE_FOUNDRY,delete process.env.CLAUDE_CODE_USE_GEMINI,delete process.env.CLAUDE_CODE_USE_GROK,e.kind===`anthropic-compat`?(delete process.env.CLAUDE_CODE_USE_OPENAI,delete process.env.OPENAI_BASE_URL,delete process.env.OPENAI_API_KEY,delete process.env.OPENAI_MODEL):(delete process.env.ANTHROPIC_BASE_URL,delete process.env.ANTHROPIC_API_KEY,delete process.env.ANTHROPIC_MODEL);let n=e.kind===`anthropic-compat`?{ANTHROPIC_BASE_URL:e.baseUrl,ANTHROPIC_API_KEY:t??``,ANTHROPIC_MODEL:e.defaultModel}:{CLAUDE_CODE_USE_OPENAI:`1`,OPENAI_BASE_URL:e.baseUrl,OPENAI_API_KEY:t??``,OPENAI_MODEL:e.defaultModel},{clearOpenAIClientCache:r}=await import(`./client-7lIxWcaM.js`);r();let{applyConfigEnvironmentVariables:i}=await import(`./managedEnv-K9Si1UuL.js`);i(),Object.assign(process.env,n)}async function F(e,t){let{provider:n,warnings:r}=M(e,t),i=j(n),a=N(n);i||r.push(`No API key available for provider "${n.id}" — ${a} will be empty. Set ${n.apiKeyEnv??`an env var`} or add an apiKey field in ~/.workmate/providers.json.`),await P(n,i);let{updateSettingsForSource:o}=await import(`./settings-3ionQKNv.js`);return o(`userSettings`,{activeProviderId:n.id,modelType:n.kind===`anthropic-compat`?`anthropic`:`openai`}),{provider:n,warnings:r}}async function I(){let{getSettingsForSource:e}=await import(`./settings-3ionQKNv.js`),t=e(`userSettings`)?.activeProviderId;if(!t)return null;let n=D(t);if(!n)return null;let r=[],i=j(n);if(!i){let e=N(n);r.push(`No API key available for provider "${n.id}" — ${e} will be empty. Set ${n.apiKeyEnv??`an env var`} or add an apiKey field in ~/.workmate/providers.json.`)}return await P(n,i),{provider:n,warnings:r}}var L=e((()=>{A()}));export{A as a,v as c,M as i,L as n,T as o,I as r,O as s,F as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gn as t,Un as n,Wn as r}from"./settings-DiBMs2gM.js";import{u as i}from"./oauth-D38aRTUb.js";import{Bt as a,Ot as o,St as s,ai as c,ci as l,si as u}from"./model-CDnVaVDR.js";function d(){p=void 0,r()}function f(){if(p!==void 0)return p;if(c()!==`firstParty`||!l()||process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`)return p=t(!1);let e=o();if(e?.accessToken&&e.subscriptionType===null||e?.accessToken&&e.scopes?.includes(`user:inference`)&&(e.subscriptionType===`enterprise`||e.subscriptionType===`team`))return p=t(!0);try{let{key:e}=s({skipRetrievingKeyFromApiKeyHelper:!0});if(e)return p=t(!0)}catch{}return p=t(!1)}var p,m=e((()=>{i(),a(),u(),n()}));export{f as n,d as r,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./BackgroundTasksDialog-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-P_wYS_NJ2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./BackgroundTasksDialog-CDA2noEk.js";async function a(e,t){return(0,o.jsx)(i,{toolUseContext:t,onDone:e})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cu as e,fu as t,hu as n,su as r,uu as i}from"./loadAgentsDir-BXtV2jiO.js";e();export{r as checkOutTeleportedSessionBranch,i as processMessagesForTeleportResume,t as teleportResumeCodeSession,n as validateGitState};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-DcaKZlRU.js";import{AE as r,g as i,h as a,kE as o,m as s}from"./loadAgentsDir-BXtV2jiO.js";import{basename as c,join as l}from"path";import{appendFileSync as u,mkdirSync as d,readFileSync as f,readdirSync as p,writeFileSync as m}from"fs";import{randomUUID as h}from"crypto";function g(){let e=a(`templates`,process.cwd()),n=l(t(),`templates`);try{return p(n),[...e,n]}catch{return e}}function _(){let e=[],t=new Set;for(let n of g()){let i;try{i=p(n)}catch{continue}for(let a of i){if(!a.endsWith(`.md`))continue;let i=c(a,`.md`);if(t.has(i))continue;t.add(i);let o=l(n,a);try{let{frontmatter:t,content:n}=r(f(o,`utf-8`),o),a=(typeof t.description==`string`?t.description:``)||s(n,`No description`);e.push({name:i,description:a,filePath:o,frontmatter:t,content:n})}catch{}}}return e}function v(e){return _().find(t=>t.name===e)??null}var y=e((()=>{o(),n(),i()}));function b(){return l(t(),`jobs`)}function x(e){return l(b(),e)}function S(e,t,n,r,i){let a=x(e);d(a,{recursive:!0});let o=new Date().toISOString(),s={jobId:e,templateName:t,createdAt:o,updatedAt:o,status:`created`,args:i};return m(l(a,`state.json`),JSON.stringify(s,null,2),`utf-8`),m(l(a,`template.md`),n,`utf-8`),m(l(a,`input.txt`),r,`utf-8`),a}function C(e){try{let t=f(l(x(e),`state.json`),`utf-8`),n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n;return typeof r.jobId!=`string`||typeof r.status!=`string`?null:r}catch{return null}}function w(e,t){let n=x(e),r=C(e);if(!r)return!1;let i=l(n,`replies.jsonl`),a=JSON.stringify({text:t,timestamp:new Date().toISOString()});try{u(i,a+`
|
|
2
2
|
`,`utf-8`)}catch{m(i,a+`
|
|
3
3
|
`,`utf-8`)}let o={...r,updatedAt:new Date().toISOString()};return m(l(n,`state.json`),JSON.stringify(o,null,2),`utf-8`),!0}var T=e((()=>{n()}));async function E(e){let t=e[0];switch(t){case`list`:k();break;case`new`:A(e.slice(1));break;case`reply`:j(e.slice(1));break;case`status`:O(e.slice(1));break;default:console.error(`Unknown template command: ${t}`),D(),process.exitCode=1}}function D(){console.log(`
|
|
4
4
|
Template Job Commands:
|
|
@@ -7,6 +7,6 @@ Template Job Commands:
|
|
|
7
7
|
claude job new <template> [args] Create a new job from a template
|
|
8
8
|
claude job reply <job-id> <text> Reply to an existing job
|
|
9
9
|
claude job status <job-id> Show job status
|
|
10
|
-
`)}function O(e){let t=e[0];if(!t){console.error(`Usage: claude job status <job-id>`),process.exitCode=1;return}let n=C(t);if(!n){console.error(`Job not found: ${t}`),process.exitCode=1;return}console.log(`Job: ${n.jobId}`),console.log(` Template: ${n.templateName}`),console.log(` Status: ${n.status}`),console.log(` Created: ${n.createdAt}`),console.log(` Updated: ${n.updatedAt}`),console.log(` Args: ${n.args.join(` `)||`(none)`}`)}function k(){let e=_();if(e.length===0){console.log(`No templates found.`),console.log(`Place .md files in .
|
|
10
|
+
`)}function O(e){let t=e[0];if(!t){console.error(`Usage: claude job status <job-id>`),process.exitCode=1;return}let n=C(t);if(!n){console.error(`Job not found: ${t}`),process.exitCode=1;return}console.log(`Job: ${n.jobId}`),console.log(` Template: ${n.templateName}`),console.log(` Status: ${n.status}`),console.log(` Created: ${n.createdAt}`),console.log(` Updated: ${n.updatedAt}`),console.log(` Args: ${n.args.join(` `)||`(none)`}`)}function k(){let e=_();if(e.length===0){console.log(`No templates found.`),console.log(`Place .md files in .workmate/templates/ or ~/.workmate/templates/`);return}console.log(`${e.length} template${e.length>1?`s`:``} found:\n`);for(let t of e)console.log(` ${t.name}`),console.log(` ${t.description}`),console.log(` Path: ${t.filePath}`),console.log()}function A(e){let t=e[0];if(!t){console.error(`Usage: claude job new <template> [args...]`),process.exitCode=1;return}let n=v(t);if(!n){console.error(`Template not found: ${t}`),console.log(`
|
|
11
11
|
Available templates:`);for(let e of _())console.log(` ${e.name}`);process.exitCode=1;return}let r=h().slice(0,8),i=e.slice(1).join(` `),a=S(r,t,`---\n${Object.entries(n.frontmatter).map(([e,t])=>`${e}: ${t}`).join(`
|
|
12
12
|
`)}\n---\n${n.content}`,i,e.slice(1));console.log(`Job created: ${r}`),console.log(` Template: ${t}`),console.log(` Directory: ${a}`),i&&console.log(` Input: ${i}`)}function j(e){let t=e[0],n=e.slice(1).join(` `);if(!t||!n){console.error(`Usage: claude job reply <job-id> <text>`),process.exitCode=1;return}if(!C(t)){console.error(`Job not found: ${t}`),process.exitCode=1;return}w(t,n)?(console.log(`Reply added to job ${t}`),console.log(` Directory: ${x(t)}`)):(console.error(`Failed to append reply to job ${t}`),process.exitCode=1)}e((()=>{y(),T()}))();export{E as templatesMain};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./terminalSetup-
|
|
1
|
+
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./terminalSetup-fwhFTxGi.js";n();export{s as call,r as getNativeCSIuTerminalDisplayName,a as hasUsedBackslashReturn,e as isShiftEnterKeyBindingInstalled,i as markBackslashReturnUsed,o as setupTerminal,t as shouldOfferTerminalSetup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{Bt as r,di as i,j as a,t as o,ui as s}from"./src-P_wYS_NJ2.js";import{n as c,t as l}from"./cwd-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{Bt as r,di as i,j as a,t as o,ui as s}from"./src-P_wYS_NJ2.js";import{n as c,t as l}from"./cwd-Besi3Os3.js";import{C as u,R as d,S as f,V as p,f as ee,u as te,x as ne}from"./debug-Dr1SjdXn.js";import{En as m,Kt as h,Yt as g,wn as re}from"./settings-DiBMs2gM.js";import{c as _,h as v,o as y,v as b,y as x}from"./config-9rLTDOYW.js";import{r as S,t as C}from"./execFileNoThrow-mXq4K0rl.js";import{o as w,s as T}from"./log-27kCA_9u.js";import{i as ie,o as ae}from"./platform-Dg1c9F_1.js";import{d as oe,o as se,s as E}from"./types-BJ7qTz75.js";import{homedir as D,platform as O}from"os";import{dirname as ce,join as k}from"path";import{randomBytes as A}from"crypto";import{copyFile as j,mkdir as M,readFile as N,stat as P,writeFile as F}from"fs/promises";import{pathToFileURL as le}from"url";function I(){let e=te().existsSync(k(l(),`AGENTS.md`)),t=m(l());return[{key:`workspace`,text:`Ask Claude to create a new app or clone a repository`,isComplete:!1,isCompletable:!0,isEnabled:t},{key:`agentsmd`,text:`Run /init to create a AGENTS.md file with instructions for Claude`,isComplete:e,isCompletable:!0,isEnabled:!t}]}function L(){return I().filter(({isCompletable:e,isEnabled:t})=>e&&t).every(({isComplete:e})=>e)}function R(){y().hasCompletedProjectOnboarding||L()&&b(e=>({...e,hasCompletedProjectOnboarding:!0}))}function ue(){b(e=>({...e,projectOnboardingSeenCount:e.projectOnboardingSeenCount+1}))}var z,B=e((()=>{n(),v(),c(),re(),ee(),z=t(()=>{let e=y();return e.hasCompletedProjectOnboarding||e.projectOnboardingSeenCount>=4||process.env.IS_DEMO?!1:!L()})}));function V(e){x(t=>({...t,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:e}))}function H(){x(e=>({...e,appleTerminalSetupInProgress:!1}))}function de(){let e=_();return{inProgress:e.appleTerminalSetupInProgress??!1,backupPath:e.appleTerminalBackupPath||null}}function U(){return k(D(),`Library`,`Preferences`,`com.apple.Terminal.plist`)}async function fe(){let e=U(),t=`${e}.bak`;try{let{code:n}=await C(`defaults`,[`export`,`com.apple.Terminal`,e]);if(n!==0)return null;try{await P(e)}catch{return null}return await C(`defaults`,[`export`,`com.apple.Terminal`,t]),V(t),t}catch(e){return T(e),null}}async function W(){let{inProgress:e,backupPath:t}=de();if(!e)return{status:`no_backup`};if(!t)return H(),{status:`no_backup`};try{await P(t)}catch{return H(),{status:`no_backup`}}try{let{code:e}=await C(`defaults`,[`import`,`com.apple.Terminal`,t]);return e===0?(await C(`killall`,[`cfprefsd`]),H(),{status:`restored`}):{status:`failed`,backupPath:t}}catch(e){return T(Error(`Failed to restore Terminal.app settings with: ${e}`)),H(),{status:`failed`,backupPath:t}}}var G=e((()=>{v(),S(),w()}));function pe(){let e=process.env.VSCODE_GIT_ASKPASS_MAIN??``,t=process.env.PATH??``;return e.includes(`.vscode-server`)||e.includes(`.cursor-server`)||e.includes(`.windsurf-server`)||t.includes(`.vscode-server`)||t.includes(`.cursor-server`)||t.includes(`.windsurf-server`)}function me(){return!h.terminal||!(h.terminal in $)?null:$[h.terminal]??null}function K(e){return r()?`\x1b]8;;${le(e).href}\x07${e}\x1b]8;;\x07`:e}function q(){return O()===`darwin`&&h.terminal===`Apple_Terminal`||h.terminal===`vscode`||h.terminal===`cursor`||h.terminal===`windsurf`||h.terminal===`alacritty`||h.terminal===`zed`}async function J(e){let t=``;switch(h.terminal){case`Apple_Terminal`:t=await ye(e);break;case`vscode`:t=await Y(`VSCode`,e);break;case`cursor`:t=await Y(`Cursor`,e);break;case`windsurf`:t=await Y(`Windsurf`,e);break;case`alacritty`:t=await be(e);break;case`zed`:t=await xe(e);break;case null:break}return x(e=>[`vscode`,`cursor`,`windsurf`,`alacritty`,`zed`].includes(h.terminal??``)?e.shiftEnterKeyBindingInstalled===!0?e:{...e,shiftEnterKeyBindingInstalled:!0}:h.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled===!0?e:{...e,optionAsMetaKeyInstalled:!0}:e),R(),t}function he(){return _().shiftEnterKeyBindingInstalled===!0}function ge(){return _().hasUsedBackslashReturn===!0}function _e(){_().hasUsedBackslashReturn||x(e=>({...e,hasUsedBackslashReturn:!0}))}async function ve(e,t,n){if(h.terminal&&h.terminal in $)return e(`Shift+Enter is natively supported in ${$[h.terminal]}.
|
|
2
2
|
|
|
3
3
|
No configuration needed. Just use Shift+Enter to add newlines.`),null;if(!q()){let t=h.terminal||`your current terminal`,n=ie(),r=``;return n===`macos`?r=` • macOS: Apple Terminal
|
|
4
4
|
`:n===`windows`&&(r=` • Windows: Windows Terminal
|
|
@@ -21,13 +21,13 @@ ${s.dim(`Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter nat
|
|
|
21
21
|
"args": { "text": "\\u001b\\r" },
|
|
22
22
|
"when": "terminalFocus"
|
|
23
23
|
}
|
|
24
|
-
]`)}${Q}`;let n=e===`VSCode`?`Code`:e,r=k(D(),O()===`win32`?k(`AppData`,`Roaming`,n,`User`):O()===`darwin`?k(`Library`,`Application Support`,n,`User`):k(`.config`,n,`User`)),i=k(r,`keybindings.json`);try{await M(r,{recursive:!0});let n=`[]`,o=[],c=!1;try{n=await N(i,{encoding:`utf-8`}),c=!0,o=oe(n)??[]}catch(e){if(!
|
|
24
|
+
]`)}${Q}`;let n=e===`VSCode`?`Code`:e,r=k(D(),O()===`win32`?k(`AppData`,`Roaming`,n,`User`):O()===`darwin`?k(`Library`,`Application Support`,n,`User`):k(`.config`,n,`User`)),i=k(r,`keybindings.json`);try{await M(r,{recursive:!0});let n=`[]`,o=[],c=!1;try{n=await N(i,{encoding:`utf-8`}),c=!0,o=oe(n)??[]}catch(e){if(!p(e))throw e}if(c){let n=`${i}.${A(4).toString(`hex`)}.bak`;try{await j(i,n)}catch{return`${a(`warning`,t)(`Error backing up existing ${e} terminal keybindings. Bailing out.`)}${Q}${s.dim(`See ${K(i)}`)}${Q}${s.dim(`Backup path: ${K(n)}`)}${Q}`}}return o.find(e=>e.key===`shift+enter`&&e.command===`workbench.action.terminal.sendSequence`&&e.when===`terminalFocus`)?`${a(`warning`,t)(`Found existing ${e} terminal Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${K(i)}`)}${Q}`:(await F(i,se(n,{key:`shift+enter`,command:`workbench.action.terminal.sendSequence`,args:{text:`\x1B\r`},when:`terminalFocus`}),{encoding:`utf-8`}),`${a(`success`,t)(`Installed ${e} terminal Shift+Enter key binding`)}${Q}${s.dim(`See ${K(i)}`)}${Q}`)}catch(t){throw T(t),Error(`Failed to install ${e} terminal Shift+Enter key binding`)}}async function X(e){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':useOptionAsMetaKey bool true`,U()]);if(t!==0){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':useOptionAsMetaKey true`,U()]);if(t!==0)return T(Error(`Failed to enable Option as Meta key for Terminal.app profile: ${e}`)),!1}return!0}async function Z(e){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Add :'Window Settings':'${e}':Bell bool false`,U()]);if(t!==0){let{code:t}=await C(`/usr/libexec/PlistBuddy`,[`-c`,`Set :'Window Settings':'${e}':Bell false`,U()]);if(t!==0)return T(Error(`Failed to disable audio bell for Terminal.app profile: ${e}`)),!1}return!0}async function ye(e){try{if(!await fe())throw Error(`Failed to create backup of Terminal.app preferences, bailing out`);let{stdout:t,code:n}=await C(`defaults`,[`read`,`com.apple.Terminal`,`Default Window Settings`]);if(n!==0||!t.trim())throw Error(`Failed to read default Terminal.app profile`);let{stdout:r,code:i}=await C(`defaults`,[`read`,`com.apple.Terminal`,`Startup Window Settings`]);if(i!==0||!r.trim())throw Error(`Failed to read startup Terminal.app profile`);let o=!1,c=t.trim(),l=await X(c),u=await Z(c);(l||u)&&(o=!0);let d=r.trim();if(d!==c){let e=await X(d),t=await Z(d);(e||t)&&(o=!0)}if(!o)throw Error(`Failed to enable Option as Meta key or disable audio bell for any Terminal.app profile`);return await C(`killall`,[`cfprefsd`]),H(),`${a(`success`,e)(`Configured Terminal.app settings:`)}${Q}${a(`success`,e)(`- Enabled "Use Option as Meta key"`)}${Q}${a(`success`,e)(`- Switched to visual bell`)}${Q}${s.dim(`Option+Enter will now enter a newline.`)}${Q}${s.dim(`You must restart Terminal.app for changes to take effect.`,e)}${Q}`}catch(e){T(e);let t=await W(),n=`Failed to enable Option as Meta key for Terminal.app.`;throw t.status===`restored`?Error(`${n} Your settings have been restored from backup.`):t.status===`failed`?Error(`${n} Restoring from backup failed, try manually with: defaults import com.apple.Terminal ${t.backupPath}`):Error(`${n} No backup was available to restore from.`)}}async function be(e){let t=[],n=process.env.XDG_CONFIG_HOME;if(n?t.push(k(n,`alacritty`,`alacritty.toml`)):t.push(k(D(),`.config`,`alacritty`,`alacritty.toml`)),O()===`win32`){let e=process.env.APPDATA;e&&t.push(k(e,`alacritty`,`alacritty.toml`))}let r=null,i=``,o=!1;for(let e of t)try{i=await N(e,{encoding:`utf-8`}),r=e,o=!0;break}catch(e){if(!p(e))throw e}if(r||(r=t[0]??null),!r)throw Error(`No valid config path found for Alacritty`);try{if(o){if(i.includes(`mods = "Shift"`)&&i.includes(`key = "Return"`))return`${a(`warning`,e)(`Found existing Alacritty Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${K(r)}`)}${Q}`;let t=A(4).toString(`hex`),n=`${r}.${t}.bak`;try{await j(r,n)}catch{return`${a(`warning`,e)(`Error backing up existing Alacritty config. Bailing out.`)}${Q}${s.dim(`See ${K(r)}`)}${Q}${s.dim(`Backup path: ${K(n)}`)}${Q}`}}else await M(ce(r),{recursive:!0});let t=i;return i&&!i.endsWith(`
|
|
25
25
|
`)&&(t+=`
|
|
26
26
|
`),t+=`
|
|
27
27
|
[[keyboard.bindings]]
|
|
28
28
|
key = "Return"
|
|
29
29
|
mods = "Shift"
|
|
30
30
|
chars = "\\u001B\\r"
|
|
31
|
-
`,await F(r,t,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Alacritty Shift+Enter key binding`)}${Q}${a(`success`,e)(`You may need to restart Alacritty for changes to take effect`)}${Q}${s.dim(`See ${K(r)}`)}${Q}`}catch(e){throw T(e),Error(`Failed to install Alacritty Shift+Enter key binding`)}}async function xe(e){let t=k(D(),`.config`,`zed`),n=k(t,`keymap.json`);try{await M(t,{recursive:!0});let r=`[]`,i=!1;try{r=await N(n,{encoding:`utf-8`}),i=!0}catch(e){if(!
|
|
32
|
-
`,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Zed Shift+Enter key binding`)}${Q}${s.dim(`See ${K(n)}`)}${Q}`}catch(e){throw T(e),Error(`Failed to install Zed Shift+Enter key binding`)}}var Q,$,Se=e((()=>{i(),o(),B(),G(),v(),g(),
|
|
31
|
+
`,await F(r,t,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Alacritty Shift+Enter key binding`)}${Q}${a(`success`,e)(`You may need to restart Alacritty for changes to take effect`)}${Q}${s.dim(`See ${K(r)}`)}${Q}`}catch(e){throw T(e),Error(`Failed to install Alacritty Shift+Enter key binding`)}}async function xe(e){let t=k(D(),`.config`,`zed`),n=k(t,`keymap.json`);try{await M(t,{recursive:!0});let r=`[]`,i=!1;try{r=await N(n,{encoding:`utf-8`}),i=!0}catch(e){if(!p(e))throw e}if(i){if(r.includes(`shift-enter`))return`${a(`warning`,e)(`Found existing Zed Shift+Enter key binding. Remove it to continue.`)}${Q}${s.dim(`See ${K(n)}`)}${Q}`;let t=`${n}.${A(4).toString(`hex`)}.bak`;try{await j(n,t)}catch{return`${a(`warning`,e)(`Error backing up existing Zed keymap. Bailing out.`)}${Q}${s.dim(`See ${K(n)}`)}${Q}${s.dim(`Backup path: ${K(t)}`)}${Q}`}}let o;try{o=f(r),Array.isArray(o)||(o=[])}catch{o=[]}return o.push({context:`Terminal`,bindings:{"shift-enter":[`terminal::SendText`,`\x1B\r`]}}),await F(n,u(o,null,2)+`
|
|
32
|
+
`,{encoding:`utf-8`}),`${a(`success`,e)(`Installed Zed Shift+Enter key binding`)}${Q}${s.dim(`See ${K(n)}`)}${Q}`}catch(e){throw T(e),Error(`Failed to install Zed Shift+Enter key binding`)}}var Q,$,Se=e((()=>{i(),o(),B(),G(),v(),g(),d(),S(),E(),w(),ae(),ne(),Q=`
|
|
33
33
|
`,$={ghostty:`Ghostty`,kitty:`Kitty`,"iTerm.app":`iTerm2`,WezTerm:`WezTerm`,WarpTerminal:`Warp`}}));export{he as a,q as c,I as d,ue as f,z as h,Se as i,W as l,R as m,me as n,_e as o,B as p,ge as r,J as s,ve as t,G as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{H as t,fi as n,t as r,x as i}from"./src-P_wYS_NJ2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{n as o,t as s}from"./ThemePicker-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{H as t,fi as n,t as r,x as i}from"./src-P_wYS_NJ2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{n as o,t as s}from"./ThemePicker-p7_hHk1V.js";function c({onDone:e}){let[,n]=t();return(0,l.jsx)(i,{color:`permission`,children:(0,l.jsx)(s,{onThemeSelect:t=>{n(t),e(`Theme set to ${t}`)},onCancel:()=>{e(`Theme picker dismissed`,{display:`system`})},skipExitHandling:!0})})}var l,u;e((()=>{n(),r(),o(),l=a(),u=async(e,t)=>(0,l.jsx)(c,{onDone:e})}))();export{u as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./defineProperty-C-QyHrDq.js";import{r as n,t as r}from"./execFileNoThrow-mXq4K0rl.js";import{i,t as a}from"./cliLaunch-OPOtzhvA.js";import{spawnSync as o}from"child_process";n(),e();var s=class{constructor(){t(this,`name`,`tmux`),t(this,`supportsInteractiveInput`,!0)}async available(){let{code:e}=await r(`tmux`,[`-V`],{useCwd:!1});return e===0}async start(e){let t=a(e.args,{env:{...e.env,CLAUDE_CODE_SESSION_KIND:`bg`,CLAUDE_CODE_SESSION_NAME:e.sessionName,CLAUDE_CODE_SESSION_LOG:e.logPath,CLAUDE_CODE_TMUX_SESSION:e.sessionName}}),n=i(t);if(o(`tmux`,[`new-session`,`-d`,`-s`,e.sessionName,n],{stdio:`inherit`,env:t.env}).status!==0)throw Error(`Failed to create tmux session.`);return{pid:0,sessionName:e.sessionName,logPath:e.logPath,engineUsed:`tmux`}}async attach(e){if(!e.tmuxSessionName)throw Error(`Session ${e.sessionId} has no tmux session name.`);if(o(`tmux`,[`attach-session`,`-t`,e.tmuxSessionName],{stdio:`inherit`}).status!==0)throw Error(`Failed to attach to tmux session '${e.tmuxSessionName}'.`)}};export{s as TmuxEngine};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,i as n}from"./debug-Dr1SjdXn.js";import{o as r,s as i}from"./log-27kCA_9u.js";import{r as a,t as o}from"./observationStore-D0rm3GhP.js";import{randomUUID as s}from"node:crypto";function c(){for(let[e,t]of T)if(t.size>x){let e=t.values(),n=t.size-S;for(let r=0;r<n;r++){let n=e.next();if(n.done)break;t.delete(n.value)}}if(T.size>C){let e=T.size-w,t=0;for(let n of T.keys()){if(t>=e)break;T.delete(n),t++}}}function l(e,t){let n=T.get(e)??new Set;n.add(t),T.delete(e),T.set(e,n),c()}function u(e,t){return T.get(e)?.has(t)??!1}function d(){T.clear()}function f(e){return{id:s(),sessionId:e.sessionId,projectId:e.projectId,projectName:e.projectName,cwd:e.cwd,timestamp:new Date().toISOString(),source:`tool-hook`,turn:e.turn}}function p(){return E||(E=Promise.all([import(`./projectContext-Bw3o5BrN.js`),import(`./featureCheck-JOur3pHb.js`),import(`./runtimeObserver-CBV-7-w7.js`)]).then(([e,t,n])=>({resolveProjectContext:e.resolveProjectContext,isSkillLearningEnabled:t.isSkillLearningEnabled,RUNTIME_SESSION_ID:n.RUNTIME_SESSION_ID,getRuntimeTurn:n.getRuntimeTurn}))),E}function m(){E=void 0}async function h(e,n,r,a){let o;try{let{resolveProjectContext:s,isSkillLearningEnabled:c,RUNTIME_SESSION_ID:l,getRuntimeTurn:u}=await p();if(!c())return a();let d=s(process.cwd());o={sessionId:r.sessionId??l,turn:r.turn??u(),projectId:d.projectId,projectName:d.projectName,cwd:d.cwd,project:d},g(o,e,n).catch(e=>{t(`skill-learning: recordToolStart error`),i(e)})}catch(e){t(`skill-learning: hook setup error`),i(e)}try{let n=await a();return o&&_(o,e,n,`success`).catch(e=>{t(`skill-learning: recordToolComplete error`),i(e)}),n}catch(n){throw o&&v(o,e,n).catch(e=>{t(`skill-learning: recordToolError error`),i(e)}),n}}async function g(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_start`,toolName:t,toolInput:b(n)},{project:e.project})}async function _(e,t,n,r=`success`){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:r},{project:e.project})}async function v(e,t,n){return l(e.sessionId,e.turn),o({...f(e),event:`tool_complete`,toolName:t,toolOutput:b(n),outcome:`failure`},{project:e.project})}async function y(e,t){return l(e.sessionId,e.turn),o({...f(e),event:`user_message`,messageText:t},{project:e.project})}function b(e){if(e!=null){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}}var x,S,C,w,T,E;e((()=>{a(),n(),r(),x=500,S=250,C=50,w=25,T=new Map}))();export{u as hasToolHookObservationsForTurn,c as pruneEmittedTurns,_ as recordToolComplete,v as recordToolError,g as recordToolStart,y as recordUserCorrection,d as resetToolHookBookkeeping,m as resetToolHookDepsCache,h as runToolCallWithSkillLearningHooks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{MT as t,NT as n,Rx as r,zx as i}from"./loadAgentsDir-BXtV2jiO.js";import{n as a,t as o}from"./partition-CzW_31Y1.js";function s(e,t,r){let[o,s]=a(n([...e,...t],`name`),i),c=(e,t)=>e.name.localeCompare(t.name);return[...s.sort(c),...o.sort(c)]}var c=e((()=>{o(),t(),r()}));export{s as n,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./trustedDevice-Bzz03jCy.js";export{t as clearTrustedDeviceToken,e as enrollTrustedDevice};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a 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{C as a,P as o,R as s,c,i as l,x as u}from"./debug-Dr1SjdXn.js";import{d,f}from"./log-27kCA_9u.js";import{l as p,u as m}from"./oauth-D38aRTUb.js";import{Bt as h,Cn as g,Sn as _,ft as v}from"./model-CDnVaVDR.js";import{hostname as y}from"os";i(),n(),m(),l(),s(),d(),g(),u();var b=`tengu_sessions_elevated_auth_enforcement`;function x(){return!1}var S=t(()=>process.env.CLAUDE_TRUSTED_DEVICE_TOKEN||_().read()?.trustedDeviceToken);function C(){if(x())return S()}function w(){S.cache?.clear?.()}function T(){if(!x())return;let e=_();try{let t=e.read();t?.trustedDeviceToken&&(delete t.trustedDeviceToken,e.update(t))}catch{}S.cache?.clear?.()}async function E(){try{if(!await!1){c(`[trusted-device] Gate ${b} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){c(`[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)`);return}let{getClaudeAIOAuthTokens:t}=(h(),e(v)),n=t()?.accessToken;if(!n){c(`[trusted-device] No OAuth token, skipping enrollment`);return}let i=_();if(f()){c(`[trusted-device] Essential traffic only, skipping enrollment`);return}let s=p().BASE_API_URL,l;try{l=await r.post(`${s}/api/auth/trusted_devices`,{display_name:`Work Mate on ${y()} · ${process.platform}`},{headers:{Authorization:`Bearer ${n}`,"Content-Type":`application/json`},timeout:1e4,validateStatus:e=>e<500})}catch(e){c(`[trusted-device] Enrollment request failed: ${o(e)}`);return}if(l.status!==200&&l.status!==201){c(`[trusted-device] Enrollment failed ${l.status}: ${a(l.data).slice(0,200)}`);return}let u=l.data?.device_token;if(!u||typeof u!=`string`){c(`[trusted-device] Enrollment response missing device_token field`);return}try{let e=i.read();if(!e){c(`[trusted-device] Cannot read storage, skipping token persist`);return}e.trustedDeviceToken=u;let t=i.update(e);if(!t.success){c(`[trusted-device] Failed to persist token: ${t.warning??`unknown`}`);return}S.cache?.clear?.(),c(`[trusted-device] Enrolled device_id=${l.data.device_id??`unknown`}`)}catch(e){c(`[trusted-device] Storage write failed: ${o(e)}`)}}catch(e){c(`[trusted-device] Enrollment error: ${o(e)}`)}}export{C as i,w as n,E as r,T as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{A as t,C as n,O as r,b as i,j as a,l as o,m as s,p as c,w as l}from"./external-CEp-aPkt.js";import{n as u,r as d,t as f}from"./lazySchema-B4D4qJVE.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{A as t,C as n,O as r,b as i,j as a,l as o,m as s,p as c,w as l}from"./external-CEp-aPkt.js";import{n as u,r as d,t as f}from"./lazySchema-B4D4qJVE.js";import{C as p,v as m,x as h,y as g}from"./debug-Dr1SjdXn.js";import{o as _,s as v}from"./log-27kCA_9u.js";import{n as y,t as b}from"./memoize-Co4vS6UF.js";import{open as x,readFile as S,stat as C}from"fs/promises";function w(e){return e.startsWith(T)?e.slice(1):e}var T,E=e((()=>{T=``}));function D(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&A(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&A(e.charCodeAt(r)))for(r++;r<e.length&&A(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&A(e.charCodeAt(r))){for(r++;r<e.length&&A(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
2
2
|
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(k(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(O(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(O(t));return o=15}if(k(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
3
3
|
`),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!k(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,k(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!A(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(O(e)||k(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function O(e){return e===32||e===9}function k(e){return e===10||e===13}function A(e){return e>=48&&e<=57}var ee,j=e((()=>{(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(ee||(ee={}))})),M,N,P,F,te=e((()=>{M=Array(20).fill(0).map((e,t)=>` `.repeat(t)),N=200,P={" ":{"\n":Array(N).fill(0).map((e,t)=>`
|
|
4
4
|
`+` `.repeat(t)),"\r":Array(N).fill(0).map((e,t)=>`\r`+` `.repeat(t)),"\r\n":Array(N).fill(0).map((e,t)=>`\r
|
|
@@ -14,4 +14,4 @@ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{A as t,C as n,O as r,b
|
|
|
14
14
|
`}function L(e,t){return`\r
|
|
15
15
|
`.indexOf(e.charAt(t))!==-1}var ae=e((()=>{j(),te()}));function oe(e,t=[],n=R.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return le(e,{onObjectBegin:()=>{let e={};o(e),a.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=a.pop()},onArrayBegin:()=>{let e=[];o(e),a.push(i),i=e,r=null},onArrayEnd:()=>{i=a.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]}function se(e,t=[],n=R.DEFAULT){let r={type:`array`,offset:-1,length:-1,children:[],parent:void 0};function i(e){r.type===`property`&&(r.length=e-r.offset,r=r.parent)}function a(e){return r.children.push(e),e}le(e,{onObjectBegin:e=>{r=a({type:`object`,offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,n)=>{r=a({type:`property`,offset:t,length:-1,parent:r,children:[]}),r.children.push({type:`string`,value:e,offset:t,length:n,parent:r})},onObjectEnd:(e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},onArrayBegin:(e,t)=>{r=a({type:`array`,offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},onLiteralValue:(e,t,n)=>{a({type:ue(e),offset:t,length:n,parent:r,value:e}),i(t+n)},onSeparator:(e,t,n)=>{r.type===`property`&&(e===`:`?r.colonOffset=t:e===`,`&&i(t))},onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n);let o=r.children[0];return o&&delete o.parent,o}function ce(e,t){if(!e)return;let n=e;for(let e of t)if(typeof e==`string`){if(n.type!==`object`||!Array.isArray(n.children))return;let t=!1;for(let r of n.children)if(Array.isArray(r.children)&&r.children[0].value===e&&r.children.length===2){n=r.children[1],t=!0;break}if(!t)return}else{let t=e;if(n.type!==`array`||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}function le(e,t,n=R.DEFAULT){let r=D(e,!1),i=[],a=0;function o(e){return e?()=>a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(e){return e?()=>{a>0?a++:e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(a=1)}:()=>!0}function u(e){return e?()=>{a>0&&a--,a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=l(t.onObjectBegin),f=c(t.onObjectProperty),p=u(t.onObjectEnd),m=l(t.onArrayBegin),h=u(t.onArrayEnd),g=c(t.onLiteralValue),_=s(t.onSeparator),v=o(t.onComment),y=s(t.onError),b=n&&n.disallowComments,x=n&&n.allowTrailingComma;function S(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:b||C(11);break;case 2:C(12);break;case 6:C(16);break}switch(e){case 12:case 13:b?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){S();break}else if(n.indexOf(e)!==-1)break;e=S()}}}function w(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),S(),!0}function T(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return S(),!0}function E(){return r.getToken()===10?(w(!1),r.getToken()===6?(_(`:`),S(),A()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0):(C(3,[],[2,5]),!1)}function O(){d(),S();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||C(4,[],[]),_(`,`),S(),r.getToken()===2&&x)break}else e&&C(6,[],[]);E()||C(4,[],[2,5]),e=!0}return p(),r.getToken()===2?S():C(7,[2],[]),!0}function k(){m(),S();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||C(4,[],[]),_(`,`),S(),r.getToken()===4&&x)break}else t&&C(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,A()||C(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?S():C(8,[4],[]),!0}function A(){switch(r.getToken()){case 3:return k();case 1:return O();case 10:return w(!0);default:return T()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):A()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}function ue(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`;case`object`:return e?Array.isArray(e)?`array`:`object`:`null`;default:return`null`}}var R,z=e((()=>{j(),(function(e){e.DEFAULT={allowTrailingComma:!1}})(R||(R={}))}));function de(e,t,n,r){let i=t.slice(),a=se(e,[]),o,s;for(;i.length>0&&(s=i.pop(),o=ce(a,i),o===void 0&&n!==void 0);)n=typeof s==`string`?{[s]:n}:[n];if(!o){if(n===void 0)throw Error(`Can not delete in empty document`);return B(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}else if(o.type===`object`&&typeof s==`string`&&Array.isArray(o.children)){let t=ce(o,[s]);if(t!==void 0)if(n===void 0){if(!t.parent)throw Error(`Malformed AST`);let n=o.children.indexOf(t.parent),i,a=t.parent.offset+t.parent.length;if(n>0){let e=o.children[n-1];i=e.offset+e.length}else i=o.offset+1,o.children.length>1&&(a=o.children[1].offset);return B(e,{offset:i,length:a-i,content:``},r)}else return B(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let t=`${JSON.stringify(s)}: ${JSON.stringify(n)}`,i=r.getInsertionIndex?r.getInsertionIndex(o.children.map(e=>e.children[0].value)):o.children.length,a;if(i>0){let e=o.children[i-1];a={offset:e.offset+e.length,length:0,content:`,`+t}}else a=o.children.length===0?{offset:o.offset+1,length:0,content:t}:{offset:o.offset+1,length:0,content:t+`,`};return B(e,a,r)}}else if(o.type===`array`&&typeof s==`number`&&Array.isArray(o.children)){let t=s;if(t===-1){let t=`${JSON.stringify(n)}`,i;if(o.children.length===0)i={offset:o.offset+1,length:0,content:t};else{let e=o.children[o.children.length-1];i={offset:e.offset+e.length,length:0,content:`,`+t}}return B(e,i,r)}else if(n===void 0&&o.children.length>=0){let t=s,n=o.children[t],i;if(o.children.length===1)i={offset:o.offset+1,length:o.length-2,content:``};else if(o.children.length-1===t){let e=o.children[t-1],n=e.offset+e.length;i={offset:n,length:o.offset+o.length-2-n,content:``}}else i={offset:n.offset,length:o.children[t+1].offset-n.offset,content:``};return B(e,i,r)}else if(n!==void 0){let t,i=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>s){let e=o.children[s];t={offset:e.offset,length:e.length,content:i}}else if(o.children.length===0||s===0)t={offset:o.offset+1,length:0,content:o.children.length===0?i:i+`,`};else{let e=s>o.children.length?o.children.length:s,n=o.children[e-1];t={offset:n.offset+n.length,length:0,content:`,`+i}}return B(e,t,r)}else throw Error(`Can not ${n===void 0?`remove`:r.isArrayInsertion?`insert`:`modify`} Array index ${t} as length is not sufficient`)}else throw Error(`Can not add ${typeof s==`number`?`property`:`index`} to parent of type ${o.type}`)}function B(e,t,n){if(!n.formattingOptions)return[t];let r=V(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!L(r,i-1);)i--;for(;a<r.length&&!L(r,a);)a++}let o=ne(r,{offset:i,length:a-i},{...n.formattingOptions,keepLines:!1});for(let e=o.length-1;e>=0;e--){let t=o[e];r=V(r,t),i=Math.min(i,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}let s=e.length-(r.length-a)-i;return[{offset:i,length:s,content:r.substring(i,a)}]}function V(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var fe=e((()=>{ae(),z()}));function pe(e,t,n,r){return de(e,t,n,r)}function me(e,t){let n=t.slice(0).sort((e,t)=>{let n=e.offset-t.offset;return n===0?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=V(e,i);else throw Error(`Overlapping edit`);r=i.offset}return e}var H,U,W,G,he=e((()=>{ae(),fe(),j(),z(),(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(H||(H={})),(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(U||(U={})),W=oe,(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(G||(G={}))}));function ge(e,t){try{return{ok:!0,value:JSON.parse(w(e))}}catch(e){return t&&v(e),{ok:!1}}}function _e(e){if(!e)return null;try{return W(w(e))}catch(e){return v(e),null}}function ve(e){let t=J,n=e.length,r=t(e);if(!r.error||r.done||r.read>=n)return r.values;let i=r.values,a=r.read;for(;a<n;){let r=typeof e==`string`?e.indexOf(`
|
|
16
16
|
`,a):e.indexOf(10,a);if(r===-1)break;a=r+1;let o=t(e,a);if(o.values.length>0&&(i=i.concat(o.values)),!o.error||o.done||o.read>=n)break;a=o.read}return i}function ye(e){let t=e.length,n=0;e[0]===239&&e[1]===187&&e[2]===191&&(n=3);let r=[];for(;n<t;){let i=e.indexOf(10,n);i===-1&&(i=t);let a=e.toString(`utf8`,n,i).trim();if(n=i+1,a)try{r.push(JSON.parse(a))}catch{}}return r}function be(e){let t=w(e),n=t.length,r=0,i=[];for(;r<n;){let e=t.indexOf(`
|
|
17
|
-
`,r);e===-1&&(e=n);let a=t.substring(r,e).trim();if(r=e+1,a)try{i.push(JSON.parse(a))}catch{}}return i}function K(e){return J?ve(e):typeof e==`string`?be(e):ye(e)}async function xe(e){try{var t=
|
|
17
|
+
`,r);e===-1&&(e=n);let a=t.substring(r,e).trim();if(r=e+1,a)try{i.push(JSON.parse(a))}catch{}}return i}function K(e){return J?ve(e):typeof e==`string`?be(e):ye(e)}async function xe(e){try{var t=m();let{size:n}=await C(e);if(n<=Y)return K(await S(e));let r=t.a(await x(e,`r`)),i=Buffer.allocUnsafe(Y),a=0,o=n-Y;for(;a<Y;){let{bytesRead:e}=await r.read(i,a,Y-a,o+a);if(e===0)break;a+=e}let s=i.indexOf(10);return s!==-1&&s<a-1?K(i.subarray(s+1,a)):K(i.subarray(0,a))}catch(e){t.e=e}finally{await t.d()}}function Se(e,t){try{if(!e||e.trim()===``)return p([t],null,4);let n=w(e),r=W(n);if(Array.isArray(r)){let e=r.length,i=pe(n,e===0?[0]:[e],t,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});return!i||i.length===0?p([...r,t],null,4):me(n,i)}else return p([t],null,4)}catch(e){return v(e),p([t],null,4)}}var Ce,q,we,J,Y,Te=e((()=>{he(),E(),_(),b(),h(),g(),Ce=8*1024,q=y(ge,e=>e,50),we=Object.assign(function(e,t=!0){if(!e)return null;let n=e.length>Ce?ge(e,t):q(e,t);return n.ok?n.value:null},{cache:q.cache}),J=(()=>{if(typeof Bun>`u`)return!1;let e=Bun.JSONL;return e?.parseChunk?e.parseChunk:!1})(),Y=100*1024*1024})),Ee,X,De,Z,Oe,ke,Ae,je,Q,Me,Ne,$,Pe,Fe=e((()=>{d(),f(),Ee=u(()=>o([`local`,`user`,`project`,`dynamic`,`enterprise`,`claudeai`,`managed`])),u(()=>o([`stdio`,`sse`,`sse-ide`,`http`,`ws`,`sdk`,`claudeai-proxy`])),X=u(()=>l({type:i(`stdio`).optional(),command:t().min(1,`Command cannot be empty`),args:c(t()).default([]),env:r(t(),t()).optional()})),De=u(()=>s()),Z=u(()=>l({clientId:t().optional(),callbackPort:n().int().positive().optional(),authServerMetadataUrl:t().url().startsWith(`https://`,{message:`authServerMetadataUrl must use https://`}).optional(),xaa:De().optional()})),Oe=u(()=>l({type:i(`sse`),url:t(),headers:r(t(),t()).optional(),headersHelper:t().optional(),oauth:Z().optional()})),ke=u(()=>l({type:i(`sse-ide`),url:t(),ideName:t(),ideRunningInWindows:s().optional()})),Ae=u(()=>l({type:i(`ws-ide`),url:t(),ideName:t(),authToken:t().optional(),ideRunningInWindows:s().optional()})),je=u(()=>l({type:i(`http`),url:t(),headers:r(t(),t()).optional(),headersHelper:t().optional(),oauth:Z().optional()})),Q=u(()=>l({type:i(`ws`),url:t(),headers:r(t(),t()).optional(),headersHelper:t().optional()})),Me=u(()=>l({type:i(`sdk`),name:t()})),Ne=u(()=>l({type:i(`claudeai-proxy`),url:t(),id:t()})),$=u(()=>a([X(),Oe(),ke(),Ae(),je(),Q(),Me(),Ne()])),Pe=u(()=>l({mcpServers:r(t(),$())}))}));export{Fe as a,K as c,_e as d,E as f,X as i,xe as l,Pe as n,Se as o,w as p,$ as r,Te as s,Ee as t,we as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-DcaKZlRU.js";import{P as r,R as i,S as a,V as o,c as s,i as c,x as l}from"./debug-Dr1SjdXn.js";import{o as u}from"./log-27kCA_9u.js";import{a as d,i as f}from"./genericProcessUtils-Dc1pfb7J.js";import"os";import{join as p}from"path";import"crypto";import{readFile as m,readdir as h}from"fs/promises";import"net";import"node:string_decoder";var g=e((()=>{i(),l()})),_=e((()=>{c(),i(),n(),g(),u(),l()}));function v(){return p(t(),`sessions`)}async function y(){let e=v(),t;try{t=await h(e)}catch(e){return o(e)||s(`[udsClient] readdir failed: ${r(e)}`),[]}let n=[];for(let r of t){if(!/^\d+\.json$/.test(r))continue;let t=parseInt(r.slice(0,-5),10);if(d(t))try{let i=a(await m(p(e,r),`utf8`));n.push({pid:t,sessionId:i.sessionId,cwd:i.cwd,startedAt:i.startedAt,kind:i.kind,name:i.name,messagingSocketPath:i.messagingSocketPath,entrypoint:i.entrypoint,bridgeSessionId:i.bridgeSessionId,alive:!0})}catch{}}return n}e((()=>{n(),c(),i(),f(),l(),_(),g()}))();export{y as listAllLiveSessions};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Qd as e,Xd as t}from"./loadAgentsDir-BXtV2jiO.js";import{di as n,ui as r}from"./src-P_wYS_NJ2.js";import{c as i,i as a}from"./debug-Dr1SjdXn.js";import{n as o,o as s}from"./process-gEbdy6uY.js";import{n as c,r as l}from"./execFileNoThrow-mXq4K0rl.js";import{l as u,u as d}from"./ripgrep-DQ_ILUJV.js";import{join as f}from"node:path";import{execSync as p}from"node:child_process";import{existsSync as m,readFileSync as h}from"node:fs";import{homedir as g}from"node:os";n(),a(),d(),l(),e(),o();var _=`@readmagic/workmate`;function v(){try{let e=f(u,`..`,`package.json`);if(m(e)){let t=JSON.parse(h(e,`utf-8`));if(t.version)return t.version}}catch{}return`0.0.12`}function y(e){try{return p(`which ${e} 2>/dev/null`,{stdio:`pipe`}),!0}catch{return!1}}function b(){return!!(process.execPath.includes(`bun`)||m(f(f(g(),`.bun`,`install`,`global`),`node_modules`,_)))}async function x(){let e=await c(`npm`,[`view`,`${_}@latest`,`version`,`--prefer-online`],{abortSignal:AbortSignal.timeout(1e4),cwd:g()});return e.code===0?e.stdout.trim():(i(`npm view failed: ${e.stderr}`),null)}function S(e,t){let n=e=>e.replace(/^\D/,``).split(`.`).map(Number),r=n(e),i=n(t);for(let e=0;e<3;e++){if((r[e]??0)>(i[e]??0))return!0;if((r[e]??0)<(i[e]??0))return!1}return!0}async function C(){let e=v();s(`Current version: ${e}\n`);let n=y(`bun`),i=b()&&n?`bun`:`npm`;s(`Package manager: ${i}\n`),s(`Checking for updates...
|
|
2
2
|
`);let a=await x();if(!a){process.stderr.write(r.red(`Failed to check for updates`)+`
|
|
3
3
|
`),process.stderr.write(`Unable to fetch latest version from npm registry.
|
|
4
4
|
`),await t(1);return}if(a===e||S(e,a)){s(r.green(`ccb is up to date (${e})`)+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./envUtils-DcaKZlRU.js";import{B as r,R as i,c as a,i as o,nt as s,tt as c}from"./debug-Dr1SjdXn.js";import{c as l,h as u,l as d,m as f,s as p}from"./proxy-BEKNaTXI.js";import{homedir as m}from"os";import{join as h}from"path";import{mkdir as g,readFile as _,unlink as v,writeFile as y}from"fs/promises";import{createServer as b}from"node:net";n(),c(),i(),o(),u(),d();var x,S=512*1024,C=3e4;function w(e){let t=e.length,n=[],r=t;for(;r>127;)n.push(r&127|128),r>>>=7;n.push(r);let i=new Uint8Array(1+n.length+t);return i[0]=10,i.set(n,1),i.set(e,1+n.length),i}function T(e){if(e.length===0)return new Uint8Array;if(e[0]!==10)return null;let t=0,n=0,r=1;for(;r<e.length;){let i=e[r];if(t|=(i&127)<<n,r++,!(i&128))break;if(n+=7,n>28)return null}return r+t>e.length?null:e.subarray(r,r+t)}function E(){return{connectBuf:Buffer.alloc(0),pending:[],wsOpen:!1,established:!1,closed:!1}}async function D(e){let t=`Basic `+Buffer.from(`${e.sessionId}:${e.token}`).toString(`base64`),n=`Bearer ${e.token}`,r=typeof Bun<`u`?O(e.wsUrl,t,n):await k(e.wsUrl,t,n);return a(`[upstreamproxy] relay listening on 127.0.0.1:${r.port}`),r}function O(e,t,n){let r=Bun.listen({hostname:`127.0.0.1`,port:0,socket:{open(e){e.data={...E(),writeBuf:[]}},data(r,i){let a=r.data;A({write:e=>{let t=typeof e==`string`?Buffer.from(e,`utf8`):e;if(a.writeBuf.length>0){a.writeBuf.push(t);return}let n=r.write(t);n<t.length&&a.writeBuf.push(t.subarray(n))},end:()=>r.end()},a,i,e,t,n)},drain(e){let t=e.data;for(;t.writeBuf.length>0;){let n=t.writeBuf[0],r=e.write(n);if(r<n.length){t.writeBuf[0]=n.subarray(r);return}t.writeBuf.shift()}},close(e){P(e.data)},error(e,t){a(`[upstreamproxy] client socket error: ${t.message}`),P(e.data)}}});return{port:r.port,stop:()=>r.stop(!0)}}async function k(e,t,n){x=(await import(`./wrapper-K8ZapJVu.js`)).default;let r=new WeakMap,i=b(i=>{let o=E();r.set(i,o);let s={write:e=>{i.write(typeof e==`string`?e:Buffer.from(e))},end:()=>i.end()};i.on(`data`,r=>A(s,o,r,e,t,n)),i.on(`close`,()=>P(r.get(i))),i.on(`error`,e=>{a(`[upstreamproxy] client socket error: ${e.message}`),P(r.get(i))})});return new Promise((e,t)=>{i.once(`error`,t),i.listen(0,`127.0.0.1`,()=>{let n=i.address();if(n===null||typeof n==`string`){t(Error(`upstreamproxy: server has no TCP address`));return}e({port:n.port,stop:()=>i.close()})})})}function A(e,t,n,r,i,a){if(!t.ws){t.connectBuf=Buffer.concat([t.connectBuf,n]);let o=t.connectBuf.indexOf(`\r
|
|
2
2
|
\r
|
|
3
3
|
`);if(o===-1){t.connectBuf.length>8192&&(e.write(`HTTP/1.1 400 Bad Request\r
|
|
4
4
|
\r
|
|
@@ -7,5 +7,5 @@ import{i as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n}from"./e
|
|
|
7
7
|
\r
|
|
8
8
|
`),e.end();return}let c=t.connectBuf.subarray(o+4);c.length>0&&t.pending.push(Buffer.from(c)),t.connectBuf=Buffer.alloc(0),j(e,t,s,r,i,a);return}if(!t.wsOpen){t.pending.push(Buffer.from(n));return}N(t.ws,n)}function j(e,t,n,r,i,o){let s={"Content-Type":`application/proto`,Authorization:o},c;c=x?new x(r,{headers:s,agent:p(r),...f()}):new globalThis.WebSocket(r,{headers:s,proxy:l(r),tls:f()||void 0}),c.binaryType=`arraybuffer`,t.ws=c,c.onopen=()=>{let e=`${n}\r\nProxy-Authorization: ${i}\r\n\r\n`;c.send(w(new Uint8Array(Buffer.from(e,`utf8`)))),t.wsOpen=!0;for(let e of t.pending)N(c,e);t.pending=[],t.pinger=setInterval(M,C,c)},c.onmessage=n=>{let r=T(n.data instanceof ArrayBuffer?new Uint8Array(n.data):new Uint8Array(Buffer.from(n.data)));r&&r.length>0&&(t.established=!0,e.write(r))},c.onerror=n=>{a(`[upstreamproxy] ws error: ${`message`in n?String(n.message):`websocket error`}`),!t.closed&&(t.closed=!0,t.established||e.write(`HTTP/1.1 502 Bad Gateway\r
|
|
9
9
|
\r
|
|
10
|
-
`),e.end(),P(t))},c.onclose=()=>{t.closed||(t.closed=!0,e.end(),P(t))}}function M(e){e.readyState===WebSocket.OPEN&&e.send(w(new Uint8Array))}function N(e,t){if(e.readyState===WebSocket.OPEN)for(let n=0;n<t.length;n+=S){let r=new Uint8Array(t.subarray(n,n+S));e.send(w(r))}}function P(e){if(e){if(e.pinger&&clearInterval(e.pinger),e.ws&&e.ws.readyState<=WebSocket.OPEN)try{e.ws.close()}catch{}e.ws=void 0}}
|
|
10
|
+
`),e.end(),P(t))},c.onclose=()=>{t.closed||(t.closed=!0,e.end(),P(t))}}function M(e){e.readyState===WebSocket.OPEN&&e.send(w(new Uint8Array))}function N(e,t){if(e.readyState===WebSocket.OPEN)for(let n=0;n<t.length;n+=S){let r=new Uint8Array(t.subarray(n,n+S));e.send(w(r))}}function P(e){if(e){if(e.pinger&&clearInterval(e.pinger),e.ws&&e.ws.readyState<=WebSocket.OPEN)try{e.ws.close()}catch{}e.ws=void 0}}o();var F=`/etc/ssl/certs/ca-certificates.crt`,I=[`localhost`,`127.0.0.1`,`::1`,`169.254.0.0/16`,`10.0.0.0/8`,`172.16.0.0/12`,`192.168.0.0/16`,`anthropic.com`,`.anthropic.com`,`*.anthropic.com`,`github.com`,`api.github.com`,`*.github.com`,`*.githubusercontent.com`,`registry.npmjs.org`,`pypi.org`,`files.pythonhosted.org`,`index.crates.io`,`proxy.golang.org`].join(`,`),L={enabled:!1};async function R(e){if(!t(process.env.CLAUDE_CODE_REMOTE)||!t(process.env.CCR_UPSTREAM_PROXY_ENABLED))return L;let n=process.env.CLAUDE_CODE_REMOTE_SESSION_ID;if(!n)return a(`[upstreamproxy] CLAUDE_CODE_REMOTE_SESSION_ID unset; proxy disabled`,{level:`warn`}),L;let r=e?.tokenPath??`/run/ccr/session_token`,i=await B(r);if(!i)return a(`[upstreamproxy] no session token file; proxy disabled`),L;V();let o=e?.ccrBaseUrl??process.env.ANTHROPIC_BASE_URL??`https://api.anthropic.com`,c=e?.caBundlePath??h(m(),`.ccr`,`ca-bundle.crt`);if(!await H(o,e?.systemCaPath??F,c))return L;try{let e=await D({wsUrl:o.replace(/^http/,`ws`)+`/v1/code/upstreamproxy/ws`,sessionId:n,token:i});s(async()=>e.stop()),L={enabled:!0,port:e.port,caBundlePath:c},a(`[upstreamproxy] enabled on 127.0.0.1:${e.port}`),await v(r).catch(()=>{a(`[upstreamproxy] token file unlink failed`,{level:`warn`})})}catch(e){a(`[upstreamproxy] relay start failed: ${e instanceof Error?e.message:String(e)}; proxy disabled`,{level:`warn`})}return L}function z(){if(!L.enabled||!L.port||!L.caBundlePath){if(process.env.HTTPS_PROXY&&process.env.SSL_CERT_FILE){let e={};for(let t of[`HTTPS_PROXY`,`https_proxy`,`NO_PROXY`,`no_proxy`,`SSL_CERT_FILE`,`NODE_EXTRA_CA_CERTS`,`REQUESTS_CA_BUNDLE`,`CURL_CA_BUNDLE`])process.env[t]&&(e[t]=process.env[t]);return e}return{}}let e=`http://127.0.0.1:${L.port}`;return{HTTPS_PROXY:e,https_proxy:e,NO_PROXY:I,no_proxy:I,SSL_CERT_FILE:L.caBundlePath,NODE_EXTRA_CA_CERTS:L.caBundlePath,REQUESTS_CA_BUNDLE:L.caBundlePath,CURL_CA_BUNDLE:L.caBundlePath}}async function B(e){try{return(await _(e,`utf8`)).trim()||null}catch(e){return r(e)||a(`[upstreamproxy] token read failed: ${e instanceof Error?e.message:String(e)}`,{level:`warn`}),null}}function V(){if(!(process.platform!==`linux`||typeof Bun>`u`))try{e(`bun:ffi`).dlopen(`libc.so.6`,{prctl:{args:[`int`,`u64`,`u64`,`u64`,`u64`],returns:`int`}}).symbols.prctl(4,0n,0n,0n,0n)!==0&&a(`[upstreamproxy] prctl(PR_SET_DUMPABLE,0) returned nonzero`,{level:`warn`})}catch(e){a(`[upstreamproxy] prctl unavailable: ${e instanceof Error?e.message:String(e)}`,{level:`warn`})}}async function H(e,t,n){try{let r=await fetch(`${e}/v1/code/upstreamproxy/ca-cert`,{signal:AbortSignal.timeout(5e3)});if(!r.ok)return a(`[upstreamproxy] ca-cert fetch ${r.status}; proxy disabled`,{level:`warn`}),!1;let i=await r.text(),o=await _(t,`utf8`).catch(()=>``);return await g(h(n,`..`),{recursive:!0}),await y(n,o+`
|
|
11
11
|
`+i,`utf8`),!0}catch(e){return a(`[upstreamproxy] ca-cert download failed: ${e instanceof Error?e.message:String(e)}; proxy disabled`,{level:`warn`}),!1}}export{z as getUpstreamProxyEnv,R as initUpstreamProxy};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{AC as n,hd as r}from"./loadAgentsDir-BXtV2jiO.js";import{Gt as i,et as a,fi as o,t as s,vt as c}from"./src-P_wYS_NJ2.js";function l(e,t,n,r=!0){let{exit:i}=c(),[o,s]=(0,u.useState)({pending:!1,keyName:null}),l=(0,u.useMemo)(()=>n??i,[n,i]),d=a(e=>s({pending:e,keyName:`Ctrl-C`}),l),f=a(e=>s({pending:e,keyName:`Ctrl-D`}),l),p=(0,u.useCallback)(()=>{t?.()||d()},[d,t]),m=(0,u.useCallback)(()=>{f()},[f]);return e((0,u.useMemo)(()=>({"app:interrupt":p,"app:exit":m}),[p,m]),{context:`Global`,isActive:r}),o}var u,d=e((()=>{u=t(o(),1),s(),r()}));function f(e,t,n){return l(i,t,e,n)}var p=e((()=>{n(),d()}));export{f as n,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{og as t,sg as n}from"./loadAgentsDir-BXtV2jiO.js";import{C as r,_ as i,s as a}from"./model-CDnVaVDR.js";function o(){let e=n(e=>e.mainLoopModel);return r(n(e=>e.mainLoopModelForSession)??e??a())}var s=e((()=>{t(),i()}));export{o as n,s as t};
|