@readmagic/workmate 0.0.13 → 0.0.14
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-m2d3nOQJ.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-BRXGkHO4.js +1 -0
- package/dist/chunks/{AgentsMdExternalIncludesDialog-CH9x1Ngp.js → AgentsMdExternalIncludesDialog-D58Vn3SK.js} +1 -1
- package/dist/chunks/App-CeC-2dzL.js +1 -0
- package/dist/chunks/ApproveApiKey-DFpddLyp.js +1 -0
- package/dist/chunks/ApproveApiKey-NXTWIAMj.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-9ruzl1jm.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-B0BizN_J.js → BypassPermissionsModeDialog-C4QGpcBT.js} +1 -1
- package/dist/chunks/DiffDialog-LTdtTqsC.js +6 -0
- package/dist/chunks/Doctor-DmiDH-lg.js +1 -0
- package/dist/chunks/Doctor-Yvrzcrvx.js +3 -0
- package/dist/chunks/ExitFlow-DH0L3tyY.js +2 -0
- package/dist/chunks/{Grove-D0nn8zOV.js → Grove-BhhnrFX9.js} +1 -1
- package/dist/chunks/{HybridTransport-BQNLZNa_.js → HybridTransport-CEWG9ZRi.js} +2 -4
- package/dist/chunks/InvalidConfigDialog-Ue3kJUPJ.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-BO2AOTVf.js +1 -0
- package/dist/chunks/MCPConnectionManager-Ciy9y9VV.js +1 -0
- package/dist/chunks/MCPToolListView-Ddmu2UcL.js +1 -0
- package/dist/chunks/{McpParsingWarnings-CUx2zexI.js → McpParsingWarnings-BsCDFWci.js} +1 -1
- package/dist/chunks/MessageSelector-DY5K0NHd.js +3 -0
- package/dist/chunks/Messages-LD6ZO301.js +10 -0
- package/dist/chunks/{Onboarding-t-P6Q5O6.js → Onboarding-w0-VVsDz.js} +1 -1
- package/dist/chunks/PermissionDialog-BPhvs5xH.js +1 -0
- package/dist/chunks/PressEnterToContinue-Dwoh6CaW.js +1 -0
- package/dist/chunks/{PromptInputFooterSuggestions-R12fbdmp.js → PromptInputFooterSuggestions-OEXx0Abp.js} +1 -1
- package/dist/chunks/PromptInputHelpMenu-DyaUsvNx.js +1 -0
- package/dist/chunks/QueryEngine-sH-KjJIq.js +1 -0
- package/dist/chunks/REPL-BMH_RItw.js +128 -0
- package/dist/chunks/REPL-DkPd3vk5.js +1 -0
- package/dist/chunks/RemoteSessionManager-DJhrR1dz.js +2 -0
- package/dist/chunks/ResumeConversation-BbNrpSFB.js +1 -0
- package/dist/chunks/SSETransport-CLiI2qnD.js +2 -0
- package/dist/chunks/{SearchBox-C9vUA4IM.js → SearchBox-CwwV0W-w.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-DupzA6Vm.js +1 -0
- package/dist/chunks/Settings-B1EI5LOU.js +2 -0
- package/dist/chunks/{TeleportProgress-3hmIApkj.js → TeleportProgress-IB--CbqZ.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-BA1a66RK.js → TeleportRepoMismatchDialog-KjdlS_gA.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-BT4O-Wsi.js → TeleportResumeWrapper-DnHTI39O.js} +1 -1
- package/dist/chunks/ThemePicker-BrD_T7xF.js +1 -0
- package/dist/chunks/{TrustDialog-Dpk03V1Y.js → TrustDialog-L0rvvpit.js} +1 -1
- package/dist/chunks/ValidationErrorsList-QZvtUrAy.js +2 -0
- package/dist/chunks/add-dir-CpWXReCi.js +1 -0
- package/dist/chunks/{agentDisplay-D7bdOOG7.js → agentDisplay-CrQvGkTT.js} +1 -1
- package/dist/chunks/agents-BYQO6DbG.js +101 -0
- package/dist/chunks/{agents-22wiC58F.js → agents-C99yMsVF.js} +1 -1
- package/dist/chunks/allErrors-uyOMiF9U.js +1 -0
- package/dist/chunks/{api-f3GN2I_J.js → api-C5I2xwgd.js} +1 -1
- package/dist/chunks/api-j0iE1mkR.js +1 -0
- package/dist/chunks/attributionHooks-C0aXyx9L.js +1 -0
- package/dist/chunks/{auth-Czy7GoRh.js → auth-BYCRa_mb.js} +7 -12
- package/dist/chunks/auth-C9FUZzpW.js +1 -0
- package/dist/chunks/auth-DwPrlTHv.js +1 -0
- package/dist/chunks/backgroundHousekeeping-BxcVB3By.js +1 -0
- package/dist/chunks/backgroundHousekeeping-CjD8bACB.js +17 -0
- package/dist/chunks/{banner-BcAM7iSx.js → banner-HfMnBd03.js} +2 -2
- package/dist/chunks/{bg-Ci7pG4eo.js → bg-DltfF1_K.js} +2 -2
- package/dist/chunks/branch-BOWBZo5K.js +2 -0
- package/dist/chunks/{break-cache-4rlQORVk.js → break-cache-Cd1yQ-0h.js} +2 -3
- package/dist/chunks/bridgeConfig-Bxs5dqjH.js +1 -0
- package/dist/chunks/{bridgeConfig-B80T_lw7.js → bridgeConfig-CgAVrQfz.js} +1 -1
- package/dist/chunks/{bridgeMessaging-DyvHd16Z.js → bridgeMessaging-cOFtbkf_.js} +1 -1
- package/dist/chunks/{bridgePointer-DHWK3LEe.js → bridgePointer-CiHy2tTN.js} +1 -1
- package/dist/chunks/{bridgeStatusUtil-DStiD05t.js → bridgeStatusUtil-BQF0AJDO.js} +1 -1
- package/dist/chunks/btw-B0UmiVKl.js +1 -0
- package/dist/chunks/caches-C9--b9a7.js +1 -0
- package/dist/chunks/caches-wN3JyvNE.js +1 -0
- package/dist/chunks/{capacityWake-ByL6fM6I.js → capacityWake-LRiPhPeM.js} +1 -1
- package/dist/chunks/{ccrClient-BALhzhPF.js → ccrClient-wtUIz75R.js} +1 -1
- package/dist/chunks/{claudeDesktop-Ct_hyICL.js → claudeDesktop-DPIJpc1V.js} +1 -1
- package/dist/chunks/{clear-B_yVyJXP.js → clear-CNzBoL7O.js} +1 -1
- package/dist/chunks/{cliLaunch-OPOtzhvA.js → cliLaunch-xIVvtPZy.js} +1 -1
- package/dist/chunks/{client-BMA05FW8.js → client-B7WkO81L.js} +1 -1
- package/dist/chunks/client-BCzhAEd0.js +1 -0
- package/dist/chunks/client-Dr9AYB-r.js +1 -0
- package/dist/chunks/commands-DTB0Qzd5.js +1 -0
- package/dist/chunks/compact-Bj8mdDYN.js +2 -0
- package/dist/chunks/config-B1kYcRIP.js +1 -0
- package/dist/chunks/{config-9rLTDOYW.js → config-BkbL2e5Q.js} +1 -1
- package/dist/chunks/{config-DMKtiMzJ.js → config-WMxn2jLl.js} +1 -1
- package/dist/chunks/context-DB1Ar85E.js +1 -0
- package/dist/chunks/context-noninteractive-Bno2Xsmp.js +1 -0
- package/dist/chunks/{context-noninteractive-CHzerxnH.js → context-noninteractive-CqnJTDcI.js} +2 -2
- package/dist/chunks/conversation-DOgBzrm0.js +1 -0
- package/dist/chunks/conversation-hNXWaswI.js +1 -0
- package/dist/chunks/{createSSHSession-XkHMiGRN.js → createSSHSession-Cf2tOgK_.js} +3 -4
- package/dist/chunks/createSession-BZx-2UIB.js +1 -0
- package/dist/chunks/{createSession-BNGm9fL4.js → createSession-DD5YaQKM.js} +1 -1
- package/dist/chunks/crossProjectResume-CkiPQYYE.js +40 -0
- package/dist/chunks/{datadog-3WUWcCFn.js → datadog-DcLf1QpG.js} +1 -1
- package/dist/chunks/{debug-Dr1SjdXn.js → debug-BQj6h99Q.js} +1 -1
- package/dist/chunks/debugUtils-B86DM1Sp.js +1 -0
- package/dist/chunks/{detached-CqfQYVOi.js → detached--wGwkuHX.js} +1 -2
- package/dist/chunks/{detectRepository-CMEkS5_2.js → detectRepository-Qy3zKoyn.js} +1 -1
- package/dist/chunks/detectRepository-tRUoPOKy.js +1 -0
- package/dist/chunks/{diff-CKlLimGq.js → diff-dfXWiuLA.js} +1 -1
- package/dist/chunks/directoryCompletion-BtlRKLzw.js +1 -0
- package/dist/chunks/doctor-aKE2bG5C.js +1 -0
- package/dist/chunks/{entry-DCbq734V.js → entry-wISucmYc.js} +4 -5
- package/dist/chunks/esm-CrJVXrKW.js +1 -0
- package/dist/chunks/{execFileNoThrow-mXq4K0rl.js → execFileNoThrow-DYm1GeGn.js} +1 -1
- package/dist/chunks/{execSyncWrapper-Ne33rRiD.js → execSyncWrapper-CqvQqke-.js} +1 -1
- package/dist/chunks/exit-pjN4EJHV.js +1 -0
- package/dist/chunks/exit-s9XGerrH.js +1 -0
- package/dist/chunks/{extraUsage-C86bZVgt.js → extraUsage-CwDhpClH.js} +1 -1
- package/dist/chunks/extractMemories-WmPLOLUT.js +1 -0
- package/dist/chunks/fast-BVABmasw.js +1 -0
- package/dist/chunks/fast-Cuj3bfFm.js +1 -0
- package/dist/chunks/{fileSuggestions-BalHmi1-.js → fileSuggestions-Dy2BUZzd.js} +2 -2
- package/dist/chunks/firstPartyEventLogger-CabA8fu0.js +1 -0
- package/dist/chunks/{firstPartyEventLogger-1RTgXHSz.js → firstPartyEventLogger-D4yuDP-n.js} +3 -5
- package/dist/chunks/flushGate-B6ecrC4j.js +1 -0
- package/dist/chunks/{fpsMetrics-DffAomdg.js → fpsMetrics-Dk_pnSHJ.js} +1 -1
- package/dist/chunks/gemini-BC-BxZmj.js +1 -0
- package/dist/chunks/generateSessionName-JTR8nPYD.js +1 -0
- package/dist/chunks/{genericProcessUtils-Dc1pfb7J.js → genericProcessUtils-Bbcbi11g.js} +1 -1
- package/dist/chunks/git-BaSq69E7.js +1 -0
- package/dist/chunks/{git-CoQQ6YEf.js → git-DplvjXEY.js} +2 -3
- package/dist/chunks/{githubRepoPathMapping-CmpEaQoo.js → githubRepoPathMapping-Bk4FZrng.js} +1 -1
- package/dist/chunks/goal-B09SOyra.js +3 -0
- package/dist/chunks/grok-BBo3jGfP.js +1 -0
- package/dist/chunks/{grove-b9gGKgu4.js → grove-DsAIY-rZ.js} +2 -2
- package/dist/chunks/help-CELr6oJZ.js +1 -0
- package/dist/chunks/hooks-9rkDD2iw.js +1 -0
- package/dist/chunks/{hooks-C-QMGvCg.js → hooks-BI4NY5IC.js} +2 -2
- package/dist/chunks/initReplBridge-BYrL6ou1.js +1 -0
- package/dist/chunks/{install-DGH_bjUh.js → install-Dn3_M1Ui.js} +1 -1
- package/dist/chunks/{instrumentation-DQ705pC7.js → instrumentation-5cSwEKaF.js} +4 -4
- package/dist/chunks/{job-BaMT6Lb2.js → job-rW1mEYtm.js} +1 -1
- package/dist/chunks/{jwtUtils-FQWtM6iM.js → jwtUtils-YCoZL0FW.js} +1 -1
- package/dist/chunks/keybindings-B5kUoxvg.js +1 -0
- package/dist/chunks/{launchLocalMemory-CtZrkmaw.js → launchLocalMemory-CPucX8Xj.js} +2 -2
- package/dist/chunks/launchOnboarding--GCJWeeS.js +8 -0
- package/dist/chunks/loadAgentsDir-D-a1uUb5.js +1 -0
- package/dist/chunks/{loadAgentsDir-mcRW90aq.js → loadAgentsDir-JrGMJN05.js} +656 -693
- package/dist/chunks/loadPluginHooks-C4zrlV0u.js +1 -0
- package/dist/chunks/localSearch-C-stDP9C.js +1 -0
- package/dist/chunks/localSearch-hOERAH9v.js +1 -0
- package/dist/chunks/{log-27kCA_9u.js → log-BlJ7CcKG.js} +1 -1
- package/dist/chunks/{logoV2Utils--8OUQQPd.js → logoV2Utils-J2Sqfube.js} +1 -1
- package/dist/chunks/{magicDocs-26J_l1De.js → magicDocs-Dpe3YhyL.js} +2 -2
- package/dist/chunks/main-C_PDzJdv.js +356 -0
- package/dist/chunks/{main-CGLCy2pM.js → main-Zh18lf2J.js} +2 -2
- package/dist/chunks/managedEnv-AEhH_HUs.js +1 -0
- package/dist/chunks/{managedEnv-Ds6MlFQE.js → managedEnv-C8SisyLk.js} +1 -1
- package/dist/chunks/{mappers-DwZw084m.js → mappers-CMJorgSL.js} +1 -1
- package/dist/chunks/mcp-B2mJmWKt.js +6 -0
- package/dist/chunks/mcp-SuAh71Ht.js +2 -0
- package/dist/chunks/mcp-_tBxhPV-.js +1 -0
- package/dist/chunks/{memoize-Co4vS6UF.js → memoize-_2f7NWDv.js} +1 -1
- package/dist/chunks/memory-DK8bOrUr.js +1 -0
- package/dist/chunks/{modalContext-CUThy6Ph.js → modalContext-wY9CeN4G.js} +1 -1
- package/dist/chunks/{mode-B80CHkqo.js → mode-BhfhEpnW.js} +2 -2
- package/dist/chunks/model-BCM7RpVk.js +1 -0
- package/dist/chunks/model-BWR43D3c.js +1 -0
- package/dist/chunks/model-CmDF8O9G.js +1 -0
- package/dist/chunks/modelOptions-DEQat7lU.js +1 -0
- package/dist/chunks/nativeInstaller-xxyUjXbl.js +1 -0
- package/dist/chunks/{omit-KEhe84f4.js → omit-od_CYp5o.js} +1 -1
- package/dist/chunks/{onChangeAppState-Dq1tIEJI.js → onChangeAppState-CqTb0yEa.js} +1 -1
- package/dist/chunks/openai-qW8mATAs.js +10 -0
- package/dist/chunks/{panel-CoF2a-h4.js → panel-Bg_0PHE6.js} +1 -1
- package/dist/chunks/{parser-CUUiH40T.js → parser-a2S_eFyE.js} +1 -1
- package/dist/chunks/parser-x-w3ikxt.js +1 -0
- package/dist/chunks/{partition-DeT341qu.js → partition-CYoWXLNU.js} +1 -1
- package/dist/chunks/permissions--iKUbWBw.js +3 -0
- package/dist/chunks/pidLock-BR4hzYgp.js +3 -0
- package/dist/chunks/plan-DiHCGXhM.js +1 -0
- package/dist/chunks/{platform-Dg1c9F_1.js → platform-DVeTi9mp.js} +2 -2
- package/dist/chunks/plugin-BeC4D7XF.js +17 -0
- package/dist/chunks/pluginAutoupdate-Bj-CrFuO.js +1 -0
- package/dist/chunks/{pluginBlocklist-BfoLN9a-.js → pluginBlocklist-DzOs-RS1.js} +1 -1
- package/dist/chunks/{pluginCliCommands-Bc2Iybhz.js → pluginCliCommands-DwIGn58t.js} +1 -1
- package/dist/chunks/{pluginFlagging-Cr0d0hBA.js → pluginFlagging-BzuymJuf.js} +1 -1
- package/dist/chunks/pluginOperations-CP1v-nu0.js +2 -0
- package/dist/chunks/pluginStartupCheck-BGN6Je6d.js +1 -0
- package/dist/chunks/{pluginStartupCheck-DiCDQQlr.js → pluginStartupCheck-BUeBiYVq.js} +1 -1
- package/dist/chunks/plugins-D1N31THW.js +4 -0
- package/dist/chunks/{poorMode-DxgO_bUb.js → poorMode-D4L_-yWS.js} +1 -1
- package/dist/chunks/poorMode-XDBnxTiF.js +1 -0
- package/dist/chunks/print-DaJi1wF_.js +14 -0
- package/dist/chunks/processBashCommand-BGCIqxc9.js +1 -0
- package/dist/chunks/processSlashCommand-qR_j1DE8.js +5 -0
- package/dist/chunks/prompt-B0gADAvI.js +1 -0
- package/dist/chunks/{prompt-DIlq8NTy.js → prompt-DnPppVz8.js} +21 -23
- package/dist/chunks/prompt-DqyEtC_I2.js +1 -0
- package/dist/chunks/{promptEditor-BILqOGl1.js → promptEditor-Cilc9N3L.js} +3 -3
- package/dist/chunks/protocolHandler-DdbiucQa.js +13 -0
- package/dist/chunks/{proxy-BEKNaTXI.js → proxy-C0j74LqT.js} +1 -1
- package/dist/chunks/reconciler-Bte4gdP-.js +1 -0
- package/dist/chunks/refresh-MiZ0acBm.js +1 -0
- package/dist/chunks/registerProtocol-Bpte9dly.js +1 -0
- package/dist/chunks/{reload-plugins-CGb0HTsH.js → reload-plugins-GdqFZblC.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-BmteXmI9.js → remoteBridgeCore-CAl3_H-O.js} +1 -1
- package/dist/chunks/{remoteManagedSettings-CwDGxL5p.js → remoteManagedSettings-BcLJLEr7.js} +1 -1
- package/dist/chunks/rename-BDo5qIK0.js +1 -0
- package/dist/chunks/{renderOptions-45A-EdsK.js → renderOptions-CkqTbz6d.js} +1 -1
- package/dist/chunks/resume-Bbweh2hA.js +2 -0
- package/dist/chunks/ripgrep-DrpZ79Pp.js +1 -0
- package/dist/chunks/{ripgrep-DQ_ILUJV.js → ripgrep-X5m4gJ-3.js} +1 -1
- package/dist/chunks/{runtimeObserver-CtNY8Al2.js → runtimeObserver-CxXxUcrm.js} +1 -1
- package/dist/chunks/{runtimeObserver-4ZqaCXYy.js → runtimeObserver-Hjbo43xj.js} +4 -4
- package/dist/chunks/sandbox-adapter-DQ_fJSIo.js +1 -0
- package/dist/chunks/sandbox-toggle-DmNSThQK.js +1 -0
- package/dist/chunks/searchExtraTools-C7b2x2p_.js +1 -0
- package/dist/chunks/{session-wb6X4Wrq.js → session-CkuTMD_4.js} +2 -2
- package/dist/chunks/sessionFileAccessHooks-CQvGAbvL.js +1 -0
- package/dist/chunks/{sessionIdCompat-DMayYBrf.js → sessionIdCompat-Dgp6PW_1.js} +1 -1
- package/dist/chunks/sessionObserver-BoQY7nOa.js +1 -0
- package/dist/chunks/{sessionObserver-BJQ5hwjU.js → sessionObserver-CvQ6oyoj.js} +2 -2
- package/dist/chunks/sessionState-C2REgUrs.js +11 -0
- package/dist/chunks/sessionStorage-BeaEgnaa.js +1 -0
- package/dist/chunks/sessionStoragePortable-x0Yn02-G.js +3 -0
- package/dist/chunks/{sessionTitle-Cbzrb9jT.js → sessionTitle-2IWcNB8H.js} +2 -2
- package/dist/chunks/{sessionTracing-CEsm8pZL.js → sessionTracing-Bm7hQKHA.js} +2 -2
- package/dist/chunks/settings-Da6ax5aI.js +1 -0
- package/dist/chunks/{settings-DiBMs2gM.js → settings-aUygByiZ.js} +4 -5
- package/dist/chunks/settingsSync-DgzCU1BZ.js +1 -0
- package/dist/chunks/setup-CvaG4nl5.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-D5X5fhzj.js → shadowedRuleDetection-CWCQ5dZ0.js} +1 -1
- package/dist/chunks/{shellQuote-C_I6DHLV.js → shellQuote-D3Ocv_U-.js} +1 -1
- package/dist/chunks/{sideQuestion-BHRtwhyj.js → sideQuestion-BoW-xYkh.js} +3 -3
- package/dist/chunks/sinks-B_ehGpvp.js +1 -0
- package/dist/chunks/sinks-ZHKfs6gv.js +1 -0
- package/dist/chunks/skillChangeDetector-C-HWR_8v.js +1 -0
- package/dist/chunks/{skillGapStore-BjQSSz2E.js → skillGapStore-CCNeSjIb.js} +2 -2
- package/dist/chunks/{skillLifecycle-Sp8strFv.js → skillLifecycle-wU4JDNYQ.js} +2 -2
- package/dist/chunks/{skillSearchPanel-3sYRez_Q.js → skillSearchPanel-Cxr1QQn4.js} +4 -4
- package/dist/chunks/skills-BghnKnNo.js +1 -0
- package/dist/chunks/{src-r6ZFgWPx2.js → src-D3yIF9I42.js} +1 -1
- package/dist/chunks/src-DL3w8VPk2.js +51 -0
- package/dist/chunks/{startupProfiler-Dc5r6LgE.js → startupProfiler-2sjXZkIP.js} +1 -1
- package/dist/chunks/startupProfiler-B2fyaBEa.js +1 -0
- package/dist/chunks/{staticRender-DrU6eWoq.js → staticRender-D9AbnQFr.js} +1 -1
- package/dist/chunks/{stats-BkadEKa-.js → stats-unp6R0Ah.js} +1 -1
- package/dist/chunks/status-BraYBx4N.js +2 -0
- package/dist/chunks/status-DwyWiaVc.js +1 -0
- package/dist/chunks/statusNoticeHelpers-Dm1aiibR.js +1 -0
- package/dist/chunks/{stringUtils-Df-Lnjxd.js → stringUtils-BjnclTLB.js} +3 -3
- package/dist/chunks/{switcher-uoQMHmEZ.js → switcher-BUNSEJ-7.js} +1 -1
- package/dist/chunks/switcher-DDUnWU_4.js +1 -0
- package/dist/chunks/{syncCache-BooMjgU6.js → syncCache-1s9xV8WV.js} +1 -1
- package/dist/chunks/tasks-BjFot03S.js +1 -0
- package/dist/chunks/teleport-Dj2Kvbmx.js +1 -0
- package/dist/chunks/{templateJobs-BYYfF4m5.js → templateJobs-CY7GNRo5.js} +1 -3
- package/dist/chunks/{terminalSetup-fwhFTxGi.js → terminalSetup-CpMNk6dc.js} +5 -6
- package/dist/chunks/{terminalSetup-CbXKCpWM.js → terminalSetup-Ty8T8ePM.js} +1 -1
- package/dist/chunks/theme-c6grxWNn.js +1 -0
- package/dist/chunks/{tmux-d3cNCIZA.js → tmux-g0cQ0Buz.js} +1 -1
- package/dist/chunks/{toolEventObserver-BFEl47bq.js → toolEventObserver-D7WbjgFR.js} +1 -1
- package/dist/chunks/toolPool-O5nkEFb1.js +1 -0
- package/dist/chunks/{trustedDevice-BLiKbGpG.js → trustedDevice-BF78PNK8.js} +1 -1
- package/dist/chunks/trustedDevice-D_z7bAQh.js +1 -0
- package/dist/chunks/{types-BJ7qTz75.js → types-BomO8WUz.js} +1 -1
- package/dist/chunks/{udsClient-CF8BmZgN.js → udsClient-DSvRPCvR.js} +1 -1
- package/dist/chunks/updateCCB-ts7Joyve.js +5 -0
- package/dist/chunks/upstreamproxy-DYoLvdM9.js +10 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-qLfN0tc-.js +1 -0
- package/dist/chunks/useMainLoopModel-DkjG_ikT.js +1 -0
- package/dist/chunks/useManagePlugins-E0Qzj-ws.js +1 -0
- package/dist/chunks/useMergedTools-B7iYaNwM.js +1 -0
- package/dist/chunks/{useSearchInput-KFKh2ozY.js → useSearchInput-CsxiM9i0.js} +1 -1
- package/dist/chunks/useSettingsErrors-DdVTahNa.js +1 -0
- package/dist/chunks/{userAgent-DUrr02yh.js → userAgent-BggRZ-ZE.js} +1 -1
- package/dist/chunks/util-Xdy1nOjj.js +1 -0
- package/dist/chunks/validatePlugin-Be5aSSnP.js +1 -0
- package/dist/chunks/{vim-C4Hs5U2h.js → vim-cFcxfuac.js} +1 -1
- package/dist/chunks/{which-mplwBbc0.js → which-BR8YVCCW.js} +1 -1
- package/dist/chunks/{windowsPaths-C7Mdo9aU.js → windowsPaths-BmXyrasP.js} +1 -1
- package/dist/chunks/windowsPaths-BybjGW7e.js +1 -0
- package/dist/chunks/{workSecret-XLodD7tw.js → workSecret-BUd8cQ6-.js} +1 -1
- package/dist/chunks/workerRegistry-GrD7IAVQ.js +2 -0
- package/dist/chunks/worktree-V7xiUAtl.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AddWorkspaceDirectory-BzNj9rS6.js +0 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-CDZPR488.js +0 -1
- package/dist/chunks/App-D-bYAYAl.js +0 -1
- package/dist/chunks/ApproveApiKey-BEGV9Zj9.js +0 -1
- package/dist/chunks/ApproveApiKey-CjacpIqq.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-A9hw_SV0.js +0 -2
- package/dist/chunks/DiffDialog-mQ-5_TSv.js +0 -6
- package/dist/chunks/Doctor-BC6IuQhd.js +0 -3
- package/dist/chunks/Doctor-i_5_AQd-.js +0 -1
- package/dist/chunks/ExitFlow-Bu2cVGpC.js +0 -2
- package/dist/chunks/InvalidConfigDialog-C5CIiSIE.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-Dq7hKXcO.js +0 -1
- package/dist/chunks/MCPConnectionManager-aDDsYkGM.js +0 -1
- package/dist/chunks/MCPToolListView-Cr0MDkzT.js +0 -1
- package/dist/chunks/MessageSelector-DwGOWKKL.js +0 -3
- package/dist/chunks/Messages-C1jh4ixt.js +0 -11
- package/dist/chunks/PermissionDialog-Cb3z8OUP.js +0 -1
- package/dist/chunks/PressEnterToContinue-Dq0Imo9c.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-BgADIzRj.js +0 -1
- package/dist/chunks/QueryEngine-HlLQJmsd.js +0 -1
- package/dist/chunks/REPL-Rs_JQkDc.js +0 -1
- package/dist/chunks/REPL-VKAmKkII.js +0 -133
- package/dist/chunks/RemoteSessionManager-BbgXeM-t.js +0 -2
- package/dist/chunks/ResumeConversation-66zbx12g.js +0 -1
- package/dist/chunks/SSETransport-BBQkdn4e.js +0 -4
- package/dist/chunks/SearchExtraToolsTool-Bq87I_vu.js +0 -1
- package/dist/chunks/Settings-BKdLcyXe.js +0 -2
- package/dist/chunks/ThemePicker-DUlhcoso.js +0 -1
- package/dist/chunks/ValidationErrorsList-DSSUWdgd.js +0 -2
- package/dist/chunks/add-dir-BUr0z-VU.js +0 -1
- package/dist/chunks/agents-8ELI8RJo.js +0 -103
- package/dist/chunks/allErrors-C1eMbHSv.js +0 -1
- package/dist/chunks/api-DgjIFdMn.js +0 -1
- package/dist/chunks/attributionHooks-CUAoGkU6.js +0 -1
- package/dist/chunks/auth-B73a4Cob.js +0 -1
- package/dist/chunks/auth-D_0waidQ.js +0 -1
- package/dist/chunks/autoModeDenials-BxNzGJdR.js +0 -1
- package/dist/chunks/backgroundHousekeeping-C_ArdTFX.js +0 -17
- package/dist/chunks/backgroundHousekeeping-YJhvZ0dh.js +0 -1
- package/dist/chunks/branch-bb4-bErF.js +0 -3
- package/dist/chunks/bridgeConfig-DywkIo_k.js +0 -1
- package/dist/chunks/btw-BRmV51bR.js +0 -1
- package/dist/chunks/caches-C5DIVdvI.js +0 -1
- package/dist/chunks/caches-zDZEgNKq.js +0 -1
- package/dist/chunks/client-7lIxWcaM.js +0 -1
- package/dist/chunks/client-DVg8PpFX.js +0 -1
- package/dist/chunks/commands-ByFXqW43.js +0 -1
- package/dist/chunks/compact-BUShp2eQ.js +0 -2
- package/dist/chunks/config-BwHNU_pI.js +0 -1
- package/dist/chunks/context-6Pk3iVhh.js +0 -1
- package/dist/chunks/context-noninteractive-DFwRQyFE.js +0 -1
- package/dist/chunks/conversation-5zb5XkSA.js +0 -1
- package/dist/chunks/conversation-JP2ZXrwu.js +0 -1
- package/dist/chunks/createSession-VTqzWAu6.js +0 -1
- package/dist/chunks/crossProjectResume-DxgQVYSi.js +0 -40
- package/dist/chunks/debugUtils-cK-iOsEV.js +0 -1
- package/dist/chunks/detectRepository-BsKZDRoI.js +0 -1
- package/dist/chunks/directoryCompletion-ByBTSuLu.js +0 -1
- package/dist/chunks/doctor-Bvx0u0sO.js +0 -1
- package/dist/chunks/esm-CtQkOk5D.js +0 -1
- package/dist/chunks/exit-BOhGfSlm.js +0 -2
- package/dist/chunks/exit-DTsz5Lcb.js +0 -1
- package/dist/chunks/extractMemories-6OnMgL2S.js +0 -1
- package/dist/chunks/fast-B2ziqJEA.js +0 -1
- package/dist/chunks/fast-BkhjaTkZ.js +0 -1
- package/dist/chunks/firstPartyEventLogger-CXMzhLrF.js +0 -1
- package/dist/chunks/flushGate-DWL05x7v.js +0 -1
- package/dist/chunks/gemini-BLpLJyli.js +0 -1
- package/dist/chunks/generateSessionName-CdbMksHi.js +0 -1
- package/dist/chunks/git-Bs1vtuvX.js +0 -1
- package/dist/chunks/goal-V3qix-i1.js +0 -3
- package/dist/chunks/grok-BLLATotv.js +0 -1
- package/dist/chunks/help-BR7UEr5R.js +0 -1
- package/dist/chunks/hooks-D6wtd0Qq.js +0 -1
- package/dist/chunks/initReplBridge-DyScxedy.js +0 -1
- package/dist/chunks/keybindings-CG292HS1.js +0 -2
- package/dist/chunks/launchOnboarding-CyOtdZkT.js +0 -8
- package/dist/chunks/loadAgentsDir-4UC4yLg1.js +0 -1
- package/dist/chunks/loadPluginHooks-CWI0RMUx.js +0 -1
- package/dist/chunks/localSearch-CCCDKpYx.js +0 -1
- package/dist/chunks/localSearch-D4hVR7-d.js +0 -1
- package/dist/chunks/main-DUjtDK1Q.js +0 -513
- package/dist/chunks/managedEnv-BuCurT_S.js +0 -1
- package/dist/chunks/mcp-CEKR7PjL.js +0 -6
- package/dist/chunks/mcp-DCAf2hHD.js +0 -1
- package/dist/chunks/mcp-mCuc8dNe.js +0 -2
- package/dist/chunks/memory-B5SkpC7u.js +0 -1
- package/dist/chunks/model-BqaneI4D.js +0 -1
- package/dist/chunks/model-C29_32BD.js +0 -1
- package/dist/chunks/model-NG8fvuT2.js +0 -1
- package/dist/chunks/modelOptions-CiZgZxZC.js +0 -1
- package/dist/chunks/nativeInstaller-DqbEfGSX.js +0 -1
- package/dist/chunks/openai-BvnsYTpQ.js +0 -10
- package/dist/chunks/parser-B2PlJg4C.js +0 -1
- package/dist/chunks/permissions-BPpeHxpk.js +0 -3
- package/dist/chunks/pidLock-DQGDoFQP.js +0 -3
- package/dist/chunks/plan-BRiC5ujG.js +0 -1
- package/dist/chunks/plugin-Dcg_GGR9.js +0 -17
- package/dist/chunks/pluginAutoupdate-ByH9IPC9.js +0 -1
- package/dist/chunks/pluginOperations-CKNyYjS-.js +0 -2
- package/dist/chunks/pluginStartupCheck-B48_cGgo.js +0 -1
- package/dist/chunks/plugins-BP_36tOl.js +0 -4
- package/dist/chunks/poorMode-Djw0P9Gu.js +0 -1
- package/dist/chunks/print-2uavraPq.js +0 -26
- package/dist/chunks/processBashCommand-g3sAMpHt.js +0 -1
- package/dist/chunks/processSlashCommand-tIbeCrv5.js +0 -5
- package/dist/chunks/prompt-DLv-Cd67.js +0 -1
- package/dist/chunks/prompt-DV5tCLRh.js +0 -1
- package/dist/chunks/protocolHandler-B83fCYI4.js +0 -13
- package/dist/chunks/reconciler-CDq6XgAS.js +0 -1
- package/dist/chunks/refresh-ysrhoWCo.js +0 -1
- package/dist/chunks/registerProtocol-DduKPsn_.js +0 -36
- package/dist/chunks/rename-1GLIUlYk.js +0 -1
- package/dist/chunks/resume-DWtlUiHW.js +0 -2
- package/dist/chunks/ripgrep-BLQnqPnE.js +0 -1
- package/dist/chunks/sandbox-adapter-BzjRQh_r.js +0 -1
- package/dist/chunks/sandbox-toggle-Bz49-F6e.js +0 -1
- package/dist/chunks/searchExtraTools-D6vj8qJ-.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-Da97UA2n.js +0 -1
- package/dist/chunks/sessionObserver-DXO4trhk.js +0 -1
- package/dist/chunks/sessionState-Bn3ESS5f.js +0 -11
- package/dist/chunks/sessionStorage-DlPVsQn9.js +0 -1
- package/dist/chunks/sessionStoragePortable-BhkGMZWp.js +0 -3
- package/dist/chunks/settings-3ionQKNv.js +0 -1
- package/dist/chunks/settingsSync-eHaSngKo.js +0 -1
- package/dist/chunks/setup-DeyiuGNX.js +0 -3
- package/dist/chunks/sinks-Bgy2UNK-.js +0 -2
- package/dist/chunks/sinks-CgzLmim2.js +0 -1
- package/dist/chunks/skillChangeDetector-BlSP16j6.js +0 -1
- package/dist/chunks/skills-CJhWI8t1.js +0 -1
- package/dist/chunks/src-P_wYS_NJ2.js +0 -53
- package/dist/chunks/startupProfiler-CUlV07MD.js +0 -1
- package/dist/chunks/status-CDCurOqs.js +0 -2
- package/dist/chunks/status-yoQIQ2Ni.js +0 -1
- package/dist/chunks/statusNoticeHelpers-Sl4jjauz.js +0 -1
- package/dist/chunks/switcher-C-m6MUwE.js +0 -1
- package/dist/chunks/tasks-CHG_6sXQ.js +0 -1
- package/dist/chunks/teleport-C9KRE4X8.js +0 -1
- package/dist/chunks/theme-MvX7hojJ.js +0 -1
- package/dist/chunks/toolPool-Cq74Cvjp.js +0 -1
- package/dist/chunks/trustedDevice-BGwujSqc.js +0 -1
- package/dist/chunks/updateCCB-CfckOy7T.js +0 -11
- package/dist/chunks/upstreamproxy-BuBFDFAD.js +0 -11
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CPLBDluY.js +0 -1
- package/dist/chunks/useMainLoopModel-C00PbZ1Q.js +0 -1
- package/dist/chunks/useManagePlugins-DFaGntzJ.js +0 -1
- package/dist/chunks/useMergedTools-DYobZ5N4.js +0 -1
- package/dist/chunks/useSettingsErrors-BRgjvaHd.js +0 -1
- package/dist/chunks/util-D7uwPgF1.js +0 -1
- package/dist/chunks/validatePlugin-VukX52bx.js +0 -1
- package/dist/chunks/windowsPaths-B8p9tFRF.js +0 -1
- package/dist/chunks/workerRegistry-BA37PVbv.js +0 -6
- package/dist/chunks/worktree-Lik8xuKd.js +0 -1
- package/dist/chunks/xdg-DcF9ejUM.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
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-
|
|
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-DL3w8VPk2.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-BQj6h99Q.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
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./startupProfiler-2sjXZkIP.js";e();export{t as profileCheckpoint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Kr as n,
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Kr as n,ai as r,kn as i,qr as a,t as o,vt as s}from"./src-DL3w8VPk2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{PassThrough as l}from"stream";function u({children:e}){let{exit:t}=s();return(0,m.useLayoutEffect)(()=>{let e=setTimeout(t,0);return()=>clearTimeout(e)},[t]),(0,h.jsx)(h.Fragment,{children:e})}function d(e){let t=e.indexOf(g);if(t===-1)return e;let n=t+8,r=e.indexOf(_,n);return r===-1?e:e.slice(n,r)}async function f(e,t){let n=``,r=new l;return t!==void 0&&(r.columns=t),r.on(`data`,e=>{n+=e.toString()}),await(await i((0,h.jsx)(u,{children:e}),{stdout:r,patchConsole:!1})).waitUntilExit(),d(n)}async function p(e,t){return a(await f(e,t))}var m,h,g,_,v=e((()=>{m=t(r(),1),n(),o(),h=c(),g=`\x1B[?2026h`,_=`\x1B[?2026l`}));export{f as n,p as r,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as t}from"./src-DL3w8VPk2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{h as r,v as i}from"./config-BkbL2e5Q.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{By as s,Ky as c,Uy as l,Wy as ee,_b as u,fb as d,lb as f,ob as p}from"./loadAgentsDir-JrGMJN05.js";import{P as m,di as h,fi as g,j as _,t as v}from"./src-DL3w8VPk2.js";import{t as y}from"./jsx-runtime-Bb4Xn-E0.js";import{a as b,an as x,c as S,g as C,in as w,ln as T,r as E,wn as D,xn as O}from"./settings-aUygByiZ.js";import{f as k,v as A}from"./startupProfiler-2sjXZkIP.js";import{Bt as j,Gt as M,_ as N,bt as te,i as P,ii as F,oi as I,x as L}from"./model-CmDF8O9G.js";import{h as R,l as z,o as B,p as V}from"./proxy-C0j74LqT.js";import{g as H,h as U}from"./pidLock-BR4hzYgp.js";import{n as W,t as G}from"./nativeInstaller-xxyUjXbl.js";import{n as K,t as q}from"./allErrors-uyOMiF9U.js";function J(){return[]}function Y(e,t=null,n){let r=e?.find(e=>e.name===`ide`);if(t){let e=u(t.ideType),i=d(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 X(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 Z(){let e=l(await ee()),t=[];return e.forEach(e=>{let n=O(e.path);t.push(`Large ${n} will impact performance (${k(e.content.length)} chars > ${k(s)})`)}),t}function Q(){return[{label:`Setting sources`,value:w().filter(e=>{let t=S(e);return t!==null&&Object.keys(t).length>0}).map(e=>{if(e===`policySettings`){let e=b();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}=E();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 x(e)}).filter(e=>e!==null)}]}async function ne(){return(await W()).map(e=>e.message)}async function re(){let e=await U(),t=[],{errors:n}=q();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 ie(){let e=te();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 ae(){let e=F(),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=B();a&&r.push({label:`Proxy`,value:a});let o=V();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 oe(e){let t=L(e);if(e===null&&M()){let e=P();t=`${h.bold(`Default`)} ${e}`}return t}var $,se=e((()=>{g(),a(),v(),j(),c(),H(),r(),D(),A(),f(),N(),I(),R(),G(),z(),K(),T(),C(),$=y()}));export{re as a,J as c,se as d,ne as i,Q as l,ie as n,X as o,Y as r,Z as s,ae as t,oe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Settings-B1EI5LOU.js";async function i(e,t){return(0,a.jsx)(r,{onClose:e,context:t,defaultTab:`Status`})}var a;e((()=>{n(),a=t()}))();export{i as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$i as t,Qi as n}from"./loadAgentsDir-JrGMJN05.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-BR8YVCCW.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
|
-
`);return n.length<=t?e
|
|
4
|
-
`)
|
|
3
|
+
`);return n.length<=t?e:`${n.slice(0,t).join(`
|
|
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{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-
|
|
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-BlJ7CcKG.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-BCzhAEd0.js`);r();let{applyConfigEnvironmentVariables:i}=await import(`./managedEnv-AEhH_HUs.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-Da6ax5aI.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-Da6ax5aI.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,r as t}from"./switcher-BUNSEJ-7.js";e();export{t as restoreActiveProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gn as t,Un as n,Wn as r}from"./settings-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gn as t,Un as n,Wn as r}from"./settings-aUygByiZ.js";import{u as i}from"./oauth-D38aRTUb.js";import{Bt as a,Ot as o,St as s,ii as c,oi as l,si as u}from"./model-CmDF8O9G.js";function d(){p=void 0,r()}function f(){if(p!==void 0)return p;if(c()!==`firstParty`||!u()||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(),l(),n()}));export{f as n,d as r,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./BackgroundTasksDialog-9ruzl1jm.js";async function i(e,t){return(0,a.jsx)(r,{toolUseContext:t,onDone:e})}var a;e((()=>{n(),a=t()}))();export{i as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cu as e,du as t,gu as n,lu as r,pu as i}from"./loadAgentsDir-JrGMJN05.js";r();export{e as checkOutTeleportedSessionBranch,t as processMessagesForTeleportResume,i as teleportResumeCodeSession,n as validateGitState};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-DcaKZlRU.js";import{
|
|
2
|
-
`,`utf-8`)}catch{m(i,a+`
|
|
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(`
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-DcaKZlRU.js";import{g as r,h as i,hE as a,m as o,mE as s}from"./loadAgentsDir-JrGMJN05.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=i(`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 r;try{r=p(n)}catch{continue}for(let i of r){if(!i.endsWith(`.md`))continue;let r=c(i,`.md`);if(t.has(r))continue;t.add(r);let s=l(n,i);try{let{frontmatter:t,content:n}=a(f(s,`utf-8`),s),i=(typeof t.description==`string`?t.description:``)||o(n,`No description`);e.push({name:r,description:i,filePath:s,frontmatter:t,content:n})}catch{}}}return e}function v(e){return _().find(t=>t.name===e)??null}var y=e((()=>{s(),n(),r()}));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}\n`,`utf-8`)}catch{m(i,`${a}\n`,`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
2
|
Template Job Commands:
|
|
5
3
|
|
|
6
4
|
claude job list List available templates
|
|
@@ -1,11 +1,11 @@
|
|
|
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,
|
|
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,fi as a,j as o,t as s}from"./src-DL3w8VPk2.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-BQj6h99Q.js";import{En as m,Kt as h,Yt as g,wn as re}from"./settings-aUygByiZ.js";import{c as _,h as v,o as y,v as b,y as x}from"./config-BkbL2e5Q.js";import{r as S,t as C}from"./execFileNoThrow-DYm1GeGn.js";import{o as w,s as T}from"./log-BlJ7CcKG.js";import{i as ie,o as ae}from"./platform-DVeTi9mp.js";import{d as oe,o as se,s as E}from"./types-BomO8WUz.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
|
|
5
5
|
`),e(`Terminal setup cannot be run from ${t}.
|
|
6
6
|
|
|
7
7
|
This command configures a convenient Shift+Enter shortcut for multi-line prompts.
|
|
8
|
-
${
|
|
8
|
+
${i.dim(`Note: You can already use backslash (\\\\) + return to add newlines.`)}
|
|
9
9
|
|
|
10
10
|
To set up the shortcut (optional):
|
|
11
11
|
1. Exit tmux/screen temporarily
|
|
@@ -14,20 +14,19 @@ ${r} • IDE: VSCode, Cursor, Windsurf, Zed
|
|
|
14
14
|
• Other: Alacritty
|
|
15
15
|
3. Return to tmux/screen - settings will persist
|
|
16
16
|
|
|
17
|
-
${
|
|
17
|
+
${i.dim(`Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter natively.`)}`),null}return e(await J(t.options.theme)),null}async function Y(e=`VSCode`,t){if(pe())return`${o(`warning`,t)(`Cannot install keybindings from a remote ${e} session.`)}${Q}${Q}${e} keybindings must be installed on your local machine, not the remote server.${Q}${Q}To install the Shift+Enter keybinding:${Q}1. Open ${e} on your local machine (not connected to remote)${Q}2. Open the Command Palette (Cmd/Ctrl+Shift+P) → "Preferences: Open Keyboard Shortcuts (JSON)"${Q}3. Add this keybinding (the file must be a JSON array):${Q}${Q}${i.dim(`[
|
|
18
18
|
{
|
|
19
19
|
"key": "shift+enter",
|
|
20
20
|
"command": "workbench.action.terminal.sendSequence",
|
|
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`)),
|
|
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`)),a=k(r,`keybindings.json`);try{await M(r,{recursive:!0});let n=`[]`,s=[],c=!1;try{n=await N(a,{encoding:`utf-8`}),c=!0,s=oe(n)??[]}catch(e){if(!p(e))throw e}if(c){let n=`${a}.${A(4).toString(`hex`)}.bak`;try{await j(a,n)}catch{return`${o(`warning`,t)(`Error backing up existing ${e} terminal keybindings. Bailing out.`)}${Q}${i.dim(`See ${K(a)}`)}${Q}${i.dim(`Backup path: ${K(n)}`)}${Q}`}}return s.find(e=>e.key===`shift+enter`&&e.command===`workbench.action.terminal.sendSequence`&&e.when===`terminalFocus`)?`${o(`warning`,t)(`Found existing ${e} terminal Shift+Enter key binding. Remove it to continue.`)}${Q}${i.dim(`See ${K(a)}`)}${Q}`:(await F(a,se(n,{key:`shift+enter`,command:`workbench.action.terminal.sendSequence`,args:{text:`\x1B\r`},when:`terminalFocus`}),{encoding:`utf-8`}),`${o(`success`,t)(`Installed ${e} terminal Shift+Enter key binding`)}${Q}${i.dim(`See ${K(a)}`)}${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:a}=await C(`defaults`,[`read`,`com.apple.Terminal`,`Startup Window Settings`]);if(a!==0||!r.trim())throw Error(`Failed to read startup Terminal.app profile`);let s=!1,c=t.trim(),l=await X(c),u=await Z(c);(l||u)&&(s=!0);let d=r.trim();if(d!==c){let e=await X(d),t=await Z(d);(e||t)&&(s=!0)}if(!s)throw Error(`Failed to enable Option as Meta key or disable audio bell for any Terminal.app profile`);return await C(`killall`,[`cfprefsd`]),H(),`${o(`success`,e)(`Configured Terminal.app settings:`)}${Q}${o(`success`,e)(`- Enabled "Use Option as Meta key"`)}${Q}${o(`success`,e)(`- Switched to visual bell`)}${Q}${i.dim(`Option+Enter will now enter a newline.`)}${Q}${i.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,a=``,s=!1;for(let e of t)try{a=await N(e,{encoding:`utf-8`}),r=e,s=!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(s){if(a.includes(`mods = "Shift"`)&&a.includes(`key = "Return"`))return`${o(`warning`,e)(`Found existing Alacritty Shift+Enter key binding. Remove it to continue.`)}${Q}${i.dim(`See ${K(r)}`)}${Q}`;let t=A(4).toString(`hex`),n=`${r}.${t}.bak`;try{await j(r,n)}catch{return`${o(`warning`,e)(`Error backing up existing Alacritty config. Bailing out.`)}${Q}${i.dim(`See ${K(r)}`)}${Q}${i.dim(`Backup path: ${K(n)}`)}${Q}`}}else await M(ce(r),{recursive:!0});let t=a;return a&&!a.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`}),`${
|
|
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=`
|
|
31
|
+
`,await F(r,t,{encoding:`utf-8`}),`${o(`success`,e)(`Installed Alacritty Shift+Enter key binding`)}${Q}${o(`success`,e)(`You may need to restart Alacritty for changes to take effect`)}${Q}${i.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=`[]`,a=!1;try{r=await N(n,{encoding:`utf-8`}),a=!0}catch(e){if(!p(e))throw e}if(a){if(r.includes(`shift-enter`))return`${o(`warning`,e)(`Found existing Zed Shift+Enter key binding. Remove it to continue.`)}${Q}${i.dim(`See ${K(n)}`)}${Q}`;let t=`${n}.${A(4).toString(`hex`)}.bak`;try{await j(n,t)}catch{return`${o(`warning`,e)(`Error backing up existing Zed keymap. Bailing out.`)}${Q}${i.dim(`See ${K(n)}`)}${Q}${i.dim(`Backup path: ${K(t)}`)}${Q}`}}let s;try{s=f(r),Array.isArray(s)||(s=[])}catch{s=[]}return s.push({context:`Terminal`,bindings:{"shift-enter":[`terminal::SendText`,`\x1B\r`]}}),await F(n,`${u(s,null,2)}\n`,{encoding:`utf-8`}),`${o(`success`,e)(`Installed Zed Shift+Enter key binding`)}${Q}${i.dim(`See ${K(n)}`)}${Q}`}catch(e){throw T(e),Error(`Failed to install Zed Shift+Enter key binding`)}}var Q,$,Se=e((()=>{a(),s(),B(),G(),v(),g(),d(),S(),E(),w(),ae(),ne(),Q=`
|
|
33
32
|
`,$={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{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-CpMNk6dc.js";n();export{s as call,r as getNativeCSIuTerminalDisplayName,a as hasUsedBackslashReturn,e as isShiftEnterKeyBindingInstalled,i as markBackslashReturnUsed,o as setupTerminal,t as shouldOfferTerminalSetup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{H as t,t as n,x as r}from"./src-DL3w8VPk2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{n as a,t as o}from"./ThemePicker-BrD_T7xF.js";function s({onDone:e}){let[,n]=t();return(0,c.jsx)(r,{color:`permission`,children:(0,c.jsx)(o,{onThemeSelect:t=>{n(t),e(`Theme set to ${t}`)},onCancel:()=>{e(`Theme picker dismissed`,{display:`system`})},skipExitHandling:!0})})}var c,l;e((()=>{n(),a(),c=i(),l=async(e,t)=>(0,c.jsx)(s,{onDone:e})}))();export{l as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./defineProperty-C-QyHrDq.js";import{r as n,t as r}from"./execFileNoThrow-
|
|
1
|
+
import{n as e,t}from"./defineProperty-C-QyHrDq.js";import{r as n,t as r}from"./execFileNoThrow-DYm1GeGn.js";import{i,t as a}from"./cliLaunch-xIVvtPZy.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{c as t,i as n}from"./debug-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,i as n}from"./debug-BQj6h99Q.js";import{o as r,s as i}from"./log-BlJ7CcKG.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-CxXxUcrm.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{Cx as t,_T as n,vT as r,wx as i}from"./loadAgentsDir-JrGMJN05.js";import{n as a,t as o}from"./partition-CYoWXLNU.js";function s(e,t,n){let[o,s]=a(r([...e,...t],`name`),i),c=(e,t)=>e.name.localeCompare(t.name);return[...s.sort(c),...o.sort(c)]}var c=e((()=>{o(),n(),t()}));export{s as n,c as t};
|
|
@@ -1 +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-
|
|
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-BQj6h99Q.js";import{d,f}from"./log-BlJ7CcKG.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-CmDF8O9G.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./trustedDevice-BF78PNK8.js";export{t as clearTrustedDeviceToken,e as enrollTrustedDevice};
|
|
@@ -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{C as p,v as m,x as h,y as g}from"./debug-
|
|
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-BQj6h99Q.js";import{o as _,s as v}from"./log-BlJ7CcKG.js";import{n as y,t as b}from"./memoize-_2f7NWDv.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
|
|
@@ -1 +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-
|
|
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-BQj6h99Q.js";import{o as u}from"./log-BlJ7CcKG.js";import{a as d,i as f}from"./genericProcessUtils-Bbcbi11g.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};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{$d as e,Zd as t}from"./loadAgentsDir-JrGMJN05.js";import{di as n,fi as r}from"./src-DL3w8VPk2.js";import{c as i,i as a}from"./debug-BQj6h99Q.js";import{n as o,o as s}from"./process-gEbdy6uY.js";import{n as c,r as l}from"./execFileNoThrow-DYm1GeGn.js";import{l as u,u as d}from"./ripgrep-X5m4gJ-3.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";r(),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.14`}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 r=y(`bun`),i=b()&&r?`bun`:`npm`;s(`Package manager: ${i}\n`),s(`Checking for updates...
|
|
2
|
+
`);let a=await x();if(!a){process.stderr.write(`${n.red(`Failed to check for updates`)}\n`),process.stderr.write(`Unable to fetch latest version from npm registry.
|
|
3
|
+
`),await t(1);return}if(a===e||S(e,a)){s(`${n.green(`ccb is up to date (${e})`)}\n`),await t(0);return}s(`New version available: ${a} (current: ${e})\n`),s(`Installing update via ${i}...\n`);try{p(i===`bun`?`bun install -g ${_}@latest`:`npm install -g ${_}@latest`,{stdio:`inherit`,cwd:g(),timeout:12e4}),s(`${n.green(`Successfully updated from ${e} to ${a}`)}\n`)}catch(e){process.stderr.write(`${n.red(`Update failed`)}\n`),process.stderr.write(`${e}\n`),process.stderr.write(`
|
|
4
|
+
`),process.stderr.write(`Try manually updating with:
|
|
5
|
+
`),i===`bun`?process.stderr.write(`${n.bold(` bun install -g ${_}@latest`)}\n`):process.stderr.write(`${n.bold(` npm install -g ${_}@latest`)}\n`),await t(1)}await t(0)}export{C as updateCCB};
|
|
@@ -0,0 +1,10 @@
|
|
|
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-BQj6h99Q.js";import{c as l,h as u,l as d,m as f,s as p}from"./proxy-C0j74LqT.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
|
+
\r
|
|
3
|
+
`);if(o===-1){t.connectBuf.length>8192&&(e.write(`HTTP/1.1 400 Bad Request\r
|
|
4
|
+
\r
|
|
5
|
+
`),e.end());return}let s=t.connectBuf.subarray(0,o).toString(`utf8`).split(`\r
|
|
6
|
+
`)[0]??``;if(!s.match(/^CONNECT\s+(\S+)\s+HTTP\/1\.[01]$/i)){e.write(`HTTP/1.1 405 Method Not Allowed\r
|
|
7
|
+
\r
|
|
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
|
+
\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}}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}\n${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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{gd as n,hC as r}from"./loadAgentsDir-JrGMJN05.js";import{Gt as i,ai as a,et as o,t as s,vt as c}from"./src-DL3w8VPk2.js";function l(e,t,n,r=!0){let{exit:i}=c(),[a,s]=(0,u.useState)({pending:!1,keyName:null}),l=(0,u.useMemo)(()=>n??i,[n,i]),d=o(e=>s({pending:e,keyName:`Ctrl-C`}),l),f=o(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}),a}var u,d=e((()=>{u=t(a(),1),s(),n()}));function f(e,t,n){return l(i,t,e,n)}var p=e((()=>{r(),d()}));export{f as n,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Xh as t,Zh as n}from"./loadAgentsDir-JrGMJN05.js";import{C as r,_ as i,s as a}from"./model-CmDF8O9G.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$h as t,Cs as n,Jx as r,Ss as i,Xd as a,Xh as o,Yd as s,Zh as c,_h as l,_s as u,b_ as d,bh as f,co as p,hh as m,lo as h,qx as g,vs as _,x_ as v,yh as y}from"./loadAgentsDir-JrGMJN05.js";import{ai as b}from"./src-DL3w8VPk2.js";import{R as x,U as S,c as C,i as w}from"./debug-BQj6h99Q.js";import{Ln as T,Rn as E}from"./settings-aUygByiZ.js";import{O as D,k as O}from"./git-DplvjXEY.js";import{o as k,s as A}from"./log-BlJ7CcKG.js";import{n as j,r as M}from"./analytics-DJobLaWP.js";import{n as N,r as P}from"./pluginFlagging-BzuymJuf.js";import{t as F}from"./pluginBlocklist-DzOs-RS1.js";var I=e(b(),1);s(),j(),m(),o(),E(),w(),D(),x(),k(),i(),_(),d(),y(),g(),P(),p();function L({enabled:e=!0}={}){let i=t(),o=c(e=>e.plugins.needsRefresh),{addNotification:s}=a(),d=(0,I.useCallback)(async()=>{try{let{enabled:e,disabled:t,errors:a}=await h();await F();let o=N();Object.keys(o).length>0&&s({key:`plugin-delisted-flagged`,text:`Plugins flagged. Check /plugins`,color:`warning`,priority:`high`});let c=[],d=[];try{c=await u()}catch(e){let t=e instanceof Error?e.message:String(e);a.push({type:`generic-error`,source:`plugin-commands`,error:`Failed to load plugin commands: ${t}`})}try{d=await n()}catch(e){let t=e instanceof Error?e.message:String(e);a.push({type:`generic-error`,source:`plugin-agents`,error:`Failed to load plugin agents: ${t}`})}try{await v()}catch(e){let t=e instanceof Error?e.message:String(e);a.push({type:`generic-error`,source:`plugin-hooks`,error:`Failed to load plugin hooks: ${t}`})}let p=(await Promise.all(e.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await r(e,a);return t&&(e.mcpServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0),m=(await Promise.all(e.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await f(e,a);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0);l(),i(n=>{let r=n.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),i=new Set(a.map(e=>e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`)),o=[...r.filter(e=>{let t=e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`;return!i.has(t)}),...a];return{...n,plugins:{...n.plugins,enabled:e,disabled:t,commands:c,errors:o}}}),C(`Loaded plugins - Enabled: ${e.length}, Disabled: ${t.length}, Commands: ${c.length}, Agents: ${d.length}, Errors: ${a.length}`);let g=e.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return{enabled_count:e.length,disabled_count:t.length,inline_count:T(e,e=>e.source.endsWith(`@inline`)),marketplace_count:T(e,e=>!e.source.endsWith(`@inline`)),error_count:a.length,skill_count:c.length,agent_count:d.length,hook_count:g,mcp_count:p,lsp_count:m}}catch(e){let t=S(e);return A(t),C(`Error loading plugins: ${e}`),i(e=>{let n=e.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r={type:`generic-error`,source:`plugin-system`,error:t.message};return{...e,plugins:{...e.plugins,enabled:[],disabled:[],commands:[],errors:[...n,r]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[i,s]);(0,I.useEffect)(()=>{e&&d().then(e=>{let{ant_enabled_names:t,...n}=e,r={...n,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};M(`tengu_plugins_loaded`,{...r,...t!==void 0&&{enabled_names:t}}),O(`info`,`tengu_plugins_loaded`,r)})},[d,e]),(0,I.useEffect)(()=>{!e||!o||s({key:`plugin-reload-pending`,text:`Plugins changed. Run /reload-plugins to activate.`,color:`suggestion`,priority:`low`})},[e,o,s])}export{L as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Uc as n,qc as r}from"./loadAgentsDir-JrGMJN05.js";import{ai as i}from"./src-DL3w8VPk2.js";import{n as a,t as o}from"./toolPool-O5nkEFb1.js";function s(e,t,r){return(0,c.useMemo)(()=>a(e,n(r,t),r.mode),[e,t,r,!1,!1])}var c,l=e((()=>{c=t(i(),1),r(),o()}));export{s as n,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Cd as n,
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Cd as n,Dd as r,Ed as i,Od as a,Td as o,_d as s,vd as c,wd as l,xC as u,yd as d}from"./loadAgentsDir-JrGMJN05.js";import{Vn as f,ai as p,hn as m,ot as h,t as g}from"./src-DL3w8VPk2.js";function _(e){return!!(e.ctrl&&(e.key===`k`||e.key===`u`||e.key===`w`)||e.meta&&e.key===`backspace`)}function v(e){return(e.ctrl||e.meta)&&e.key===`y`}function y({isActive:e,onExit:t,onCancel:u,onExitUp:d,columns:p,passthroughCtrlKeys:g=[],initialQuery:y=``,backspaceExitsOnEmpty:S=!0}){let{columns:C}=h(),w=p??C,[T,E]=(0,b.useState)(y),[D,O]=(0,b.useState)(y.length),k=(0,b.useCallback)(e=>{E(e),O(e.length)},[]),A=f=>{if(!e)return;let p=s.fromText(T,w,D);if(!(f.ctrl&&g.includes(f.key.toLowerCase()))){if(_(f)||o(),v(f)||i(),f.key===`return`||f.key===`down`){f.preventDefault(),t();return}if(f.key===`up`){f.preventDefault(),d&&d();return}if(f.key===`escape`){f.preventDefault(),u?u():T.length>0?(E(``),O(0)):t();return}if(f.key===`backspace`){if(f.preventDefault(),f.meta){let{cursor:e,killed:t}=p.deleteWordBefore();n(t,`prepend`),E(e.text),O(e.offset);return}if(T.length===0){S&&(u??t)();return}let e=p.backspace();E(e.text),O(e.offset);return}if(f.key===`delete`){f.preventDefault();let e=p.del();E(e.text),O(e.offset);return}if(f.key===`left`&&(f.ctrl||f.meta||f.fn)){f.preventDefault();let e=p.prevWord();O(e.offset);return}if(f.key===`right`&&(f.ctrl||f.meta||f.fn)){f.preventDefault();let e=p.nextWord();O(e.offset);return}if(f.key===`left`){f.preventDefault();let e=p.left();O(e.offset);return}if(f.key===`right`){f.preventDefault();let e=p.right();O(e.offset);return}if(f.key===`home`){f.preventDefault(),O(0);return}if(f.key===`end`){f.preventDefault(),O(T.length);return}if(f.ctrl){switch(f.preventDefault(),f.key.toLowerCase()){case`a`:O(0);return;case`e`:O(T.length);return;case`b`:O(p.left().offset);return;case`f`:O(p.right().offset);return;case`d`:{if(T.length===0){(u??t)();return}let e=p.del();E(e.text),O(e.offset);return}case`h`:{if(T.length===0){S&&(u??t)();return}let e=p.backspace();E(e.text),O(e.offset);return}case`k`:{let{cursor:e,killed:t}=p.deleteToLineEnd();n(t,`append`),E(e.text),O(e.offset);return}case`u`:{let{cursor:e,killed:t}=p.deleteToLineStart();n(t,`prepend`),E(e.text),O(e.offset);return}case`w`:{let{cursor:e,killed:t}=p.deleteWordBefore();n(t,`prepend`),E(e.text),O(e.offset);return}case`y`:{let e=c();if(e.length>0){let t=p.offset,n=p.insert(e);l(t,e.length),E(n.text),O(n.offset)}return}case`g`:case`c`:if(u){u();return}}return}if(f.meta){switch(f.preventDefault(),f.key.toLowerCase()){case`b`:O(p.prevWord().offset);return;case`f`:O(p.nextWord().offset);return;case`d`:{let e=p.deleteWordAfter();E(e.text),O(e.offset);return}case`y`:{let e=a();if(e){let{text:t,start:n,length:i}=e,a=T.slice(0,n),o=T.slice(n+i),s=a+t+o,c=n+t.length;r(t.length),E(s),O(c)}return}}return}if(f.key!==`tab`&&f.key.length>=1&&!x.has(f.key)){f.preventDefault();let e=p.insert(f.key);E(e.text),O(e.offset)}}};return m((e,t,n)=>{A(new f(n.keypress))},{isActive:e}),{query:T,setQuery:k,cursorOffset:D,handleKeyDown:A}}var b,x,S=e((()=>{b=t(p(),1),g(),d(),u(),x=new Set([`pageup`,`pagedown`,`insert`,`wheelup`,`wheeldown`,`mouse`,`f1`,`f2`,`f3`,`f4`,`f5`,`f6`,`f7`,`f8`,`f9`,`f10`,`f11`,`f12`])}));export{y as n,S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Xd as n,Yd as r,ng as i,rg as a}from"./loadAgentsDir-JrGMJN05.js";import{ai as o}from"./src-DL3w8VPk2.js";import{B as s,Wt as c}from"./state-BPFYBqm1.js";import{n as l,t as u}from"./allErrors-uyOMiF9U.js";function d(){let{addNotification:e,removeNotification:t}=n(),[r,i]=(0,f.useState)(()=>{let{errors:e}=u();return e});return a((0,f.useCallback)(()=>{let{errors:e}=u();i(e)},[])),(0,f.useEffect)(()=>{if(!s())if(r.length>0){let t=`Found ${r.length} settings ${r.length===1?`issue`:`issues`} · /doctor for details`;e({key:p,text:t,color:`warning`,priority:`high`,timeoutMs:6e4})}else t(p)},[r,e,t]),r}var f,p,m=e((()=>{f=t(o(),1),r(),c(),l(),i(),p=`settings-errors`}));export{d as n,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";function t(){return`workmate/0.0.
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";function t(){return`workmate/0.0.14`}var n=e((()=>{}));export{n,t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Ou as t,Xh as n,Yh as r,ku as i}from"./loadAgentsDir-JrGMJN05.js";import{ai as a}from"./src-DL3w8VPk2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{n as s,r as c}from"./analytics-DJobLaWP.js";import{t as l}from"./useManagePlugins-E0Qzj-ws.js";import{n as u,t as d}from"./MCPConnectionManager-Ciy9y9VV.js";import{cwd as f}from"process";var p=e(a(),1);i(),s(),u(),n();var m=o(),h=p.lazy(()=>import(`./Doctor-DmiDH-lg.js`).then(e=>({default:e.Doctor})));function g({onDone:e}){return l(),(0,m.jsx)(p.Suspense,{fallback:null,children:(0,m.jsx)(h,{onDone:e})})}async function _(e){c(`tengu_doctor_command`,{}),await new Promise(n=>{e.render((0,m.jsx)(r,{children:(0,m.jsx)(t,{children:(0,m.jsx)(d,{dynamicMcpConfig:void 0,isStrictMcpConfig:!1,children:(0,m.jsx)(g,{onDone:()=>{n()}})})})}))}),e.unmount(),process.exit(0)}async function v(e,t){let{setup:n}=await import(`./setup-CvaG4nl5.js`);await n(f(),`default`,!1,!1,void 0,!1);let{install:r}=await import(`./install-Dn3_M1Ui.js`);await new Promise(n=>{let i=[];e&&i.push(e),t.force&&i.push(`--force`),r.call(e=>{n(),process.exit(+!!e.includes(`failed`))},{},i)})}export{_ as doctorHandler,v as installHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./axios-DaWTGg7G.js";import{Ew as r,Tw as i,_E as a,gE as o,mE as s,pE as c,vw as l,ww as u,yw as d}from"./loadAgentsDir-JrGMJN05.js";import{p as f}from"./external-CEp-aPkt.js";import{r as p}from"./lazySchema-B4D4qJVE.js";import{B as m,C as ee,F as h,P as g,R as _,S as v,c as y,f as b,i as te,u as x,x as S}from"./debug-BQj6h99Q.js";import{_t as C,gt as w,ht as T,pt as ne,vt as re}from"./settings-aUygByiZ.js";import{o as ie,s as E}from"./log-BlJ7CcKG.js";import{homedir as ae}from"os";import*as D from"path";import{join as oe,resolve as se}from"path";import{randomBytes as O}from"crypto";import{readFile as k,readdir as A,rename as j,stat as M,unlink as N,writeFile as P}from"fs/promises";function F(){return oe(l(),H)}async function I(){let e=F();try{let t=v(await k(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return y(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==V)return y(`Install counts cache version mismatch (got ${n.version}, expected ${V})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return y(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(y(`Install counts cache has invalid fetchedAt timestamp`),null):n.counts.every(e=>typeof e==`object`&&!!e&&typeof e.plugin==`string`&&typeof e.unique_installs==`number`)?Date.now()-r>W?(y(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(y(`Install counts cache has malformed entries`),null)}catch(e){return h(e)!==`ENOENT`&&y(`Failed to load install counts cache: ${g(e)}`),null}}async function L(e){let t=F(),n=`${t}.${O(8).toString(`hex`)}.tmp`;try{let r=l();await x().mkdir(r),await P(n,ee(e,null,2),{encoding:`utf-8`,mode:384}),await j(n,t),y(`Install counts cache saved successfully`)}catch(e){E(e);try{await N(n)}catch{}}}async function R(){y(`Fetching install counts from ${U}`);let e=performance.now();try{let n=await t.get(U,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return r(`install_counts`,U,`success`,performance.now()-e),n.data.plugins}catch(t){throw r(`install_counts`,U,`failure`,performance.now()-e,u(t)),t}}async function z(){let e=await I();if(e){y(`Using cached install counts`),r(`install_counts`,U,`cache_hit`,0);let t=new Map;for(let n of e.counts)t.set(n.plugin,n.unique_installs);return t}try{let e=await R();await L({version:V,fetchedAt:new Date().toISOString(),counts:e});let t=new Map;for(let n of e)t.set(n.plugin,n.unique_installs);return t}catch(e){return E(e),y(`Failed to fetch install counts: ${g(e)}`),null}}function B(e){if(e<1e3)return String(e);if(e<1e6){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}K`:`${t}K`}let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}var V,H,U,W,G=e((()=>{n(),te(),_(),b(),ie(),S(),i(),d(),V=1,H=`install-counts-cache.json`,U=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,W=1440*60*1e3}));async function K(e){let t=e.trim(),n=x(),r=t.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(r?.[1]){let e=r[1],t=r[3];return t?{source:`git`,url:e,ref:t}:{source:`git`,url:e}}if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=t.match(/^([^#]+)(#(.+))?$/),n=e?.[1]||t,r=e?.[3];if(n.endsWith(`.git`)||n.includes(`/_git/`))return r?{source:`git`,url:n,ref:r}:{source:`git`,url:n};let i;try{i=new URL(n)}catch{return{source:`url`,url:n}}if((i.hostname===`github.com`||i.hostname===`www.github.com`)&&i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let e=n.endsWith(`.git`)?n:`${n}.git`;return r?{source:`git`,url:e,ref:r}:{source:`git`,url:e}}return{source:`url`,url:n}}let i=process.platform===`win32`&&(t.startsWith(`.\\`)||t.startsWith(`..\\`)||/^[a-zA-Z]:[/\\]/.test(t));if(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||t.startsWith(`~`)||i){let e=se(t.startsWith(`~`)?t.replace(/^~/,ae()):t),r;try{r=await n.stat(e)}catch(t){let n=h(t);return{error:n===`ENOENT`?`Path does not exist: ${e}`:`Cannot access path: ${e} (${n??t})`}}return r.isFile()?e.endsWith(`.json`)?{source:`file`,path:e}:{error:`File path must point to a .json file (marketplace.json), but got: ${e}`}:r.isDirectory()?{source:`directory`,path:e}:{error:`Path is neither a file nor a directory: ${e}`}}if(t.includes(`/`)&&!t.startsWith(`@`)){if(t.includes(`:`))return null;let e=t.match(/^([^#@]+)(?:[#@](.+))?$/),n=e?.[1]||t,r=e?.[2];return r?{source:`github`,repo:n,ref:r}:{source:`github`,repo:n}}return null}var ce=e((()=>{_(),b()}));function le(e){let t=D.basename(e),n=D.basename(D.dirname(e));return t===`plugin.json`?`plugin`:t===`marketplace.json`?`marketplace`:n===`.claude-plugin`?`plugin`:`unknown`}function q(e){return e.issues.map(e=>({path:e.path.join(`.`)||`root`,message:e.message,code:e.code}))}function J(e,t,n,r){e.includes(`..`)&&n.push({path:t,message:r?`Path contains "..": ${e}. ${r}`:`Path contains ".." which could be a path traversal attempt: ${e}`})}function ue(e){let t=e.replace(/^(\.\.\/)+/,``);return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${t===e?`./plugins/my-plugin`:`./${t}`}" instead of "${e}".`}async function Y(e){let t=[],n=[],r=D.resolve(e),i;try{i=await k(r,{encoding:`utf-8`})}catch(e){let t=h(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${g(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=v(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${g(e)}`}],warnings:[],filePath:r,fileType:`plugin`}}if(a&&typeof a==`object`){let e=a;e.commands&&(Array.isArray(e.commands)?e.commands:[e.commands]).forEach((e,n)=>{typeof e==`string`&&J(e,`commands[${n}]`,t)}),e.agents&&(Array.isArray(e.agents)?e.agents:[e.agents]).forEach((e,n)=>{typeof e==`string`&&J(e,`agents[${n}]`,t)}),e.skills&&(Array.isArray(e.skills)?e.skills:[e.skills]).forEach((e,n)=>{typeof e==`string`&&J(e,`skills[${n}]`,t)})}let o=a;if(typeof a==`object`&&a){let e=a,t=Object.keys(e).filter(e=>$.has(e));if(t.length>0){let r={...e};for(let e of t)delete r[e],n.push({path:e,message:`Field '${e}' belongs in the marketplace entry (marketplace.json), not plugin.json. It's harmless here but unused — Work Mate ignores it at load time.`});o=r}}let s=T().strict().safeParse(o);if(s.success||t.push(...q(s.error)),s.success){let e=s.data;/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e.name)||n.push({path:`name`,message:`Plugin name "${e.name}" is not kebab-case. Work Mate accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`}),e.version||n.push({path:`version`,message:`No version specified. Consider adding a version following semver (e.g., "1.0.0")`}),e.description||n.push({path:`description`,message:`No description provided. Adding a description helps users understand what your plugin does`}),e.author||n.push({path:`author`,message:`No author information provided. Consider adding author details for plugin attribution`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`plugin`}}async function X(e){let t=[],n=[],r=D.resolve(e),i;try{i=await k(r,{encoding:`utf-8`})}catch(e){let t=h(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${g(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`marketplace`}}let a;try{a=v(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${g(e)}`}],warnings:[],filePath:r,fileType:`marketplace`}}if(a&&typeof a==`object`){let e=a;Array.isArray(e.plugins)&&e.plugins.forEach((e,n)=>{if(e&&typeof e==`object`&&`source`in e){let r=e.source;typeof r==`string`&&J(r,`plugins[${n}].source`,t,ue(r)),r&&typeof r==`object`&&`path`in r&&typeof r.path==`string`&&J(r.path,`plugins[${n}].source.path`,t)}})}let o=C().extend({plugins:f(w().strict())}).strict().safeParse(a);if(o.success||t.push(...q(o.error)),o.success){let e=o.data;if((!e.plugins||e.plugins.length===0)&&n.push({path:`plugins`,message:`Marketplace has no plugins defined`}),e.plugins){e.plugins.forEach((n,r)=>{e.plugins.filter(e=>e.name===n.name).length>1&&t.push({path:`plugins[${r}].name`,message:`Duplicate plugin name "${n.name}" found in marketplace`})});let i=D.dirname(r),a=D.basename(i)===`.claude-plugin`?D.dirname(i):i;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=D.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=v(await k(e,{encoding:`utf-8`}));typeof t.version==`string`&&(i=t.version)}catch{continue}i&&i!==r.version&&n.push({path:`plugins[${t}].version`,message:`Entry declares version "${r.version}" but ${r.source}/.claude-plugin/plugin.json says "${i}". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "${i}" to match.`})}}e.metadata?.description||n.push({path:`metadata.description`,message:`No marketplace description provided. Adding a description helps users understand what this marketplace offers`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`marketplace`}}function de(e,t,n){let r=[],i=[],o=t.match(c);if(!o)return i.push({path:`frontmatter`,message:`No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata.`}),{success:!0,errors:r,warnings:i,filePath:e,fileType:n};let s=o[1]||``,l;try{l=a(s)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${g(t)}. At runtime this ${n} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n}}if(typeof l!=`object`||!l||Array.isArray(l))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(l)?`an array`:l===null?`null`:typeof l}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let u=l;if(u.description!==void 0){let e=u.description;typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`&&e!==null&&r.push({path:`description`,message:`description must be a string, got ${Array.isArray(e)?`array`:typeof e}. At runtime this value is dropped.`})}else i.push({path:`description`,message:`No description in frontmatter. A description helps users and Claude understand when to use this ${n}.`});u.name!==void 0&&u.name!==null&&typeof u.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof u.name}.`});let d=u[`allowed-tools`];d!=null&&(typeof d!=`string`&&!Array.isArray(d)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof d}.`}):Array.isArray(d)&&d.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let f=u.shell;if(f!=null)if(typeof f!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof f}.`});else{let e=f.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${f}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await k(e,{encoding:`utf-8`})}catch(t){return h(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${g(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=v(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${g(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=ne().safeParse(n);return r.success?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:q(r.error),warnings:[],filePath:e,fileType:`hooks`}}async function Q(e,t){let n;try{n=await A(e,{withFileTypes:!0})}catch(e){let t=h(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>D.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=D.join(e,t.name);t.isDirectory()?r.push(...await Q(n,!1)):t.isFile()&&t.name.toLowerCase().endsWith(`.md`)&&r.push(n)}return r}async function fe(e){let t=[],n=[[`skill`,D.join(e,`skills`)],[`agent`,D.join(e,`agents`)],[`command`,D.join(e,`commands`)]];for(let[e,r]of n){let n=await Q(r,e===`skill`);for(let r of n){let n;try{n=await k(r,{encoding:`utf-8`})}catch(n){if(m(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${g(n)}`}],warnings:[],filePath:r,fileType:e});continue}let i=de(r,n,e);(i.errors.length>0||i.warnings.length>0)&&t.push(i)}}let r=await Z(D.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=D.resolve(e),n=null;try{n=await M(t)}catch(e){if(!m(e))throw e}if(n?.isDirectory()){let e=await X(D.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(D.join(t,`.claude-plugin`,`plugin.json`));return n.errors[0]?.code===`ENOENT`?{success:!1,errors:[{path:`directory`,message:`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`}],warnings:[],filePath:t,fileType:`plugin`}:n}switch(le(e)){case`plugin`:return Y(e);case`marketplace`:return X(e);case`unknown`:try{let n=v(await k(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(h(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{p(),_(),s(),S(),o(),re(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{K as a,G as c,ce as i,pe as n,B as o,fe as r,z as s,me as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,h as n,y as r}from"./config-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,h as n,y as r}from"./config-BkbL2e5Q.js";import{n as i,r as a}from"./analytics-DJobLaWP.js";var o;e((()=>{i(),n(),o=async()=>{let e=t().editorMode||`normal`;e===`emacs`&&(e=`normal`);let n=e===`normal`?`vim`:`normal`;return r(e=>({...e,editorMode:n})),a(`tengu_editor_mode_changed`,{mode:n,source:`command`}),{type:`text`,value:`Editor mode set to ${n}. ${n===`vim`?`Use Escape key to toggle between INSERT and NORMAL modes.`:`Using standard (readline) keyboard bindings.`}`}}}))();export{o as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,o as n}from"./execFileNoThrow-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,o as n}from"./execFileNoThrow-DYm1GeGn.js";import{n as r,t as i}from"./execSyncWrapper-CqvQqke-.js";async function a(e){if(process.platform===`win32`){let t=await n(`where.exe ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim().split(/\r?\n/)[0]||null}let t=await n(`which ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim()}function o(e){if(process.platform===`win32`)try{return i(`where.exe ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return i(`which ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim()||null}catch{return null}}var s,c,l,u=e((()=>{t(),r(),s=typeof Bun<`u`&&typeof Bun.which==`function`?Bun.which:null,c=s?async e=>s(e):a,l=s??o}));export{c as n,l as r,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{n as r,t as i}from"./cwd-Besi3Os3.js";import{c as a,i as o}from"./debug-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{n as r,t as i}from"./cwd-Besi3Os3.js";import{c as a,i as o}from"./debug-BQj6h99Q.js";import{n as s,t as c}from"./memoize-_2f7NWDv.js";import{n as l,t as u}from"./execSyncWrapper-CqvQqke-.js";import{i as d,o as f}from"./platform-DVeTi9mp.js";import{existsSync as p}from"fs";import*as m from"path/win32";function h(){if(d()===`windows`){let e=y();process.env.SHELL=e,process.env.CLAUDE_CODE_GIT_BASH_PATH=e,a(`Using bash path: "${e}"`)}}function g(e,t){let n=[`C:\\Program Files\\Git\\bin\\bash.exe`,`C:\\Program Files\\Git\\usr\\bin\\bash.exe`,`C:\\Program Files (x86)\\Git\\bin\\bash.exe`,`C:\\Program Files (x86)\\Git\\usr\\bin\\bash.exe`];t&&n.push(`${t}\\scoop\\apps\\git\\current\\usr\\bin\\bash.exe`);for(let t of n)if(e(t))return t;return null}function _(e,t){if(e===`git`){for(let e of[`C:\\Program Files\\Git\\cmd\\git.exe`,`C:\\Program Files (x86)\\Git\\cmd\\git.exe`])if(t.checkExists(e))return e}try{let n=t.execCommand(`where.exe ${e}`).split(/\r?\n/).map(e=>e.trim()).filter(Boolean),r=m.resolve(t.cwdFn()).toLowerCase();for(let e of n){let t=m.resolve(e).toLowerCase(),n=m.dirname(t).toLowerCase(),i=m.relative(r,n);if(i===``||!i.startsWith(`..`)&&!m.isAbsolute(i)){a(`Skipping potentially malicious executable in current directory: ${e}`);continue}return e}return null}catch{return null}}function v(e=b){let t=e.envOverride??process.env.CLAUDE_CODE_GIT_BASH_PATH;if(t)return e.checkExists(t)?t:null;let n=_(`bash`,e);if(n&&e.checkExists(n))return n;let r=_(`git`,e);if(r){let t=[m.join(r,`..`,`..`,`bin`,`bash.exe`),m.join(r,`..`,`..`,`usr`,`bin`,`bash.exe`),m.join(r,`..`,`bash.exe`)];for(let n of t)if(e.checkExists(n))return n}return g(e.checkExists,e.userProfile)}function y(){let e=x();if(e!==null)return e;let t=process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(t?`Work Mate was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${t}"`:`Work Mate on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe`),process.exit(1)}var b,x,S,C,w=e((()=>{n(),r(),o(),l(),c(),f(),b={checkExists:p,execCommand:e=>u(e,{stdio:`pipe`,encoding:`utf8`}).trim(),cwdFn:i,userProfile:process.env.USERPROFILE,envOverride:void 0},x=t(()=>v()),S=s(e=>{if(e.startsWith(`\\\\`))return e.replace(/\\/g,`/`);let t=e.match(/^([A-Za-z]):[/\\]/);return t?`/${t[1].toLowerCase()}${e.slice(2).replace(/\\/g,`/`)}`:e.replace(/\\/g,`/`)},e=>e,500),C=s(e=>{if(e.startsWith(`//`))return e.replace(/\//g,`\\`);let t=e.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(t)return`${t[1].toUpperCase()}:${(e.slice(`/cygdrive/${t[1]}`.length)||`\\`).replace(/\//g,`\\`)}`;let n=e.match(/^\/([A-Za-z])(\/|$)/);return n?`${n[1].toUpperCase()}:${(e.slice(2)||`\\`).replace(/\//g,`\\`)}`:e.replace(/\//g,`\\`)},e=>e,500)}));export{C as a,w as i,x as n,h as o,v as r,S as s,y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,o as t}from"./windowsPaths-BmXyrasP.js";e();export{t as setShellIfWindows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./axios-DaWTGg7G.js";import{C as n,S as r,x as i}from"./debug-
|
|
1
|
+
import{n as e,t}from"./axios-DaWTGg7G.js";import{C as n,S as r,x as i}from"./debug-BQj6h99Q.js";t(),i();function a(e){let t=r(Buffer.from(e,`base64url`).toString(`utf-8`));if(!t||typeof t!=`object`||!(`version`in t)||t.version!==1)throw Error(`Unsupported work secret version: ${t&&typeof t==`object`&&`version`in t?t.version:`unknown`}`);let n=t;if(typeof n.session_ingress_token!=`string`||n.session_ingress_token.length===0)throw Error(`Invalid work secret: missing or empty session_ingress_token`);if(typeof n.api_base_url!=`string`)throw Error(`Invalid work secret: missing api_base_url`);return t}function o(e,t){let n=e.includes(`localhost`)||e.includes(`127.0.0.1`),r=e.startsWith(`https`)?`wss`:`ws`,i=n?`v2`:`v1`;return`${r}://${e.replace(/^https?:\/\//,``).replace(/\/+$/,``)}/${i}/session_ingress/ws/${t}`}function s(e,t){if(e===t)return!0;let n=e.slice(e.lastIndexOf(`_`)+1),r=t.slice(t.lastIndexOf(`_`)+1);return n.length>=4&&n===r}function c(e,t){return`${e.replace(/\/+$/,``)}/v1/code/sessions/${t}`}async function l(t,r){let i=await e.post(`${t}/worker/register`,{},{headers:{Authorization:`Bearer ${r}`,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`},timeout:1e4}),a=i.data?.worker_epoch,o=typeof a==`string`?Number(a):a;if(typeof o!=`number`||!Number.isFinite(o)||!Number.isSafeInteger(o))throw Error(`registerWorker: invalid worker_epoch in response: ${n(i.data)}`);return o}export{s as a,l as i,o as n,a as r,c as t};
|