@readmagic/workmate 0.0.27 → 0.0.29
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-DqlPtsVK.js → AddWorkspaceDirectory-C0lrhffT.js} +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-DIahWLha.js +1 -0
- package/dist/chunks/{AgentsMdExternalIncludesDialog-rJS5l6yk.js → AgentsMdExternalIncludesDialog-Dmjjx4ql.js} +1 -1
- package/dist/chunks/App-COz7knHS.js +1 -0
- package/dist/chunks/{BackgroundTasksDialog-CBhSmdz_.js → BackgroundTasksDialog-5IkCQ8lN.js} +2 -2
- package/dist/chunks/{BypassPermissionsModeDialog-zz-lnmJt.js → BypassPermissionsModeDialog-g1FMGfQF.js} +1 -1
- package/dist/chunks/{CustomSelect-CYmc4vRh.js → CustomSelect-BsEd2To5.js} +1 -1
- package/dist/chunks/{DiffDialog-CTUIAcEE.js → DiffDialog-Cwf8CdxZ.js} +5 -5
- package/dist/chunks/Doctor-CcLoI7tF.js +1 -0
- package/dist/chunks/Doctor-GmT5aeAc.js +3 -0
- package/dist/chunks/ExitFlow-DPgUFqeC.js +2 -0
- package/dist/chunks/{InvalidConfigDialog-B-9Z58oD.js → InvalidConfigDialog-Di6HZYDV.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-B4EWjbp7.js → InvalidSettingsDialog-BHL-MERJ.js} +1 -1
- package/dist/chunks/{KeybindingProviderSetup-Dzg77_Xn.js → KeybindingProviderSetup-eE3o0bfp.js} +1 -1
- package/dist/chunks/MCPConnectionManager-D-qpUJLV.js +1 -0
- package/dist/chunks/MCPToolListView-DtHRw4jQ.js +1 -0
- package/dist/chunks/{McpParsingWarnings-Dj_Fu5o-.js → McpParsingWarnings-ByyErvR3.js} +1 -1
- package/dist/chunks/MessageSelector-CFz30wBL.js +3 -0
- package/dist/chunks/Messages-CfY-Oj3M.js +10 -0
- package/dist/chunks/{Onboarding-BRSXxc2E.js → Onboarding-BfWLRx3n.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-ChpyD9B7.js → PromptInputFooterSuggestions-BRyJj7XR.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-CrTT8MKE.js → PromptInputHelpMenu-DLuRCXVS.js} +1 -1
- package/dist/chunks/{ProviderSetup-BEV95bnz.js → ProviderSetup-CKZGG2B9.js} +1 -1
- package/dist/chunks/QueryEngine-B27MOtBA.js +1 -0
- package/dist/chunks/{REPL-BDnZnm__.js → REPL-DMRD5wSN.js} +23 -23
- package/dist/chunks/REPL-gzolQvzu.js +1 -0
- package/dist/chunks/ResumeConversation-7eURPHmQ.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-BINZTstr.js +1 -0
- package/dist/chunks/Settings-4TNYpfUs.js +2 -0
- package/dist/chunks/Spinner-BgjmQLjw.js +1 -0
- package/dist/chunks/{TextInput-ZKU-x_FD.js → TextInput-BVEWdRz9.js} +5 -5
- package/dist/chunks/{ThemePicker-B69oDgXN.js → ThemePicker-th2jdUjh.js} +1 -1
- package/dist/chunks/{TrustDialog-BSG8Ibh8.js → TrustDialog-YsYqHyRR.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-BUYHEft4.js → ValidationErrorsList-CKeHoN2Z.js} +1 -1
- package/dist/chunks/{_baseEach-P0u1zIx6.js → _baseEach-Bz5fQbIq.js} +1 -1
- package/dist/chunks/{add-dir-C8RmmyQK.js → add-dir-BsO6l8Ue.js} +1 -1
- package/dist/chunks/{agentDisplay-np7CH47m.js → agentDisplay-ChkgiTIH.js} +1 -1
- package/dist/chunks/{agents-DedoH0Q4.js → agents-BV1nan6b.js} +6 -6
- package/dist/chunks/{agents-DRQlR5M1.js → agents-DqEB6iwV.js} +1 -1
- package/dist/chunks/allErrors-CkdguCDv.js +1 -0
- package/dist/chunks/{appleTerminalBackup-Bemd4RXh.js → appleTerminalBackup-CN8kS74J.js} +1 -1
- package/dist/chunks/{backgroundHousekeeping-BtEJ6TeC.js → backgroundHousekeeping-1VsWy8xd.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-pMtrl4K2.js +1 -0
- package/dist/chunks/{banner-CuoceXzz.js → banner-BKOzHotb.js} +1 -1
- package/dist/chunks/{branch-ClhlS7f8.js → branch-CTIHtpwz.js} +2 -2
- package/dist/chunks/bridgeControl-C8xaGuwO.js +2 -0
- package/dist/chunks/{btw-B-FLxlx-.js → btw-BA39Zrhm.js} +1 -1
- package/dist/chunks/caches-DHZHqVhf.js +1 -0
- package/dist/chunks/caches-fqs-Y-kW.js +1 -0
- package/dist/chunks/channel-B5FkNSZ3.js +1 -0
- package/dist/chunks/channel-C5yKM1wf.js +1 -0
- package/dist/chunks/{clear-BnWv0i65.js → clear-BmlaYYrD.js} +1 -1
- package/dist/chunks/commands-EUcHifS4.js +1 -0
- package/dist/chunks/compact-D3uePeI7.js +2 -0
- package/dist/chunks/{config-BDn2YIjC.js → config-Bio2EjUK.js} +1 -1
- package/dist/chunks/config-C_AEhZrn.js +1 -0
- package/dist/chunks/config-GgGdlJ9h.js +1 -0
- package/dist/chunks/{context-BvDBAyJ9.js → context-CBEWyVpE.js} +1 -1
- package/dist/chunks/{context-noninteractive-CuHHniJn.js → context-noninteractive-B03nuxfN.js} +2 -2
- package/dist/chunks/context-noninteractive-BLCyyyGL.js +1 -0
- package/dist/chunks/conversation-BFL0rEIx.js +1 -0
- package/dist/chunks/conversation-D-ker4RO.js +1 -0
- package/dist/chunks/{conversationRecovery-NL05oJb1.js → conversationRecovery-Bt84CYO6.js} +1 -1
- package/dist/chunks/crossProjectResume-DwlYY6lV.js +40 -0
- package/dist/chunks/{diff--6gQCx_x.js → diff-CewYzu3Y.js} +1 -1
- package/dist/chunks/doctor-CrQ0UfG2.js +1 -0
- package/dist/chunks/{entry-DWYOrkFS.js → entry-DdVUdGWV.js} +3 -3
- package/dist/chunks/exit-QwCo2aJo.js +1 -0
- package/dist/chunks/{extraUsage-Dr0YXm1w.js → extraUsage-Cu0aV35i.js} +1 -1
- package/dist/chunks/extractMemories-DHlbRc5g.js +1 -0
- package/dist/chunks/{fast-C5-lNCQi.js → fast-BlhpCQ2f.js} +1 -1
- package/dist/chunks/fast-C3JeBy3A.js +1 -0
- package/dist/chunks/{fetchModelList-9w1E4Ue8.js → fetchModelList-DjFCMjVN.js} +1 -1
- package/dist/chunks/fetchModelList-L2XarfAj.js +1 -0
- package/dist/chunks/{fileSuggestions-BYD78vcF.js → fileSuggestions-BRwKV_KA.js} +2 -2
- package/dist/chunks/{gemini-BNBptTET.js → gemini-I-M5_sUA.js} +2 -2
- package/dist/chunks/{generateSessionName-CO2484aJ.js → generateSessionName-CJ0sh6HD.js} +1 -1
- package/dist/chunks/{goal-j0wdadwM.js → goal-DIrBBT5J.js} +3 -3
- package/dist/chunks/{grok-BpO1ZwK_.js → grok-ZLjJN6b9.js} +1 -1
- package/dist/chunks/{help-DwhA0qQ6.js → help-CDMjVOl6.js} +1 -1
- package/dist/chunks/{hooks-DG4_WdZ2.js → hooks-BNKCE023.js} +2 -2
- package/dist/chunks/hooks-ERYtmuNW.js +1 -0
- package/dist/chunks/{install-BbmCNCuM.js → install-xlfTw1j6.js} +1 -1
- package/dist/chunks/{instrumentation-DpPmDyNF.js → instrumentation-DSt0UvGn.js} +3 -3
- package/dist/chunks/{job-GcmX1ALd.js → job-BVElGsu0.js} +1 -1
- package/dist/chunks/{launchLocalMemory-CDgT5lst.js → launchLocalMemory-DUkJCKmd.js} +2 -2
- package/dist/chunks/{launchOnboarding-uQ_ux9sS.js → launchOnboarding-BvD-E_jC.js} +1 -1
- package/dist/chunks/loadAgentsDir-BImZsKrh.js +1 -0
- package/dist/chunks/{loadAgentsDir-uuZYOgKn.js → loadAgentsDir-BfLCckVj.js} +343 -343
- package/dist/chunks/loadPluginHooks-BPwWtBzO.js +1 -0
- package/dist/chunks/{localSearch-yVCDrVrf.js → localSearch-BHG8sp8p.js} +1 -1
- package/dist/chunks/localSearch-D3rvcRRC.js +1 -0
- package/dist/chunks/{logoUtils-B4wCDKs9.js → logoUtils-BsNLv-qi.js} +1 -1
- package/dist/chunks/{magicDocs-D53lV8b5.js → magicDocs-Bue9vxzY.js} +2 -2
- package/dist/chunks/{main-fy_XSXGj.js → main-U71X4Thd.js} +22 -22
- package/dist/chunks/managedEnv-DCGLDTP_.js +1 -0
- package/dist/chunks/{managedEnv-B8YWmM4A.js → managedEnv-EZ2IirNa.js} +1 -1
- package/dist/chunks/{mcp-CZUVaPb3.js → mcp-C4CxCMwJ.js} +3 -3
- package/dist/chunks/mcp-D9HFARDy.js +1 -0
- package/dist/chunks/mcp-De3QGKvT.js +2 -0
- package/dist/chunks/memory-DVRdJFfI.js +1 -0
- package/dist/chunks/{mode-Bteqe2QG.js → mode-Bd5w-RBX.js} +2 -2
- package/dist/chunks/{model-CHDU5yqH.js → model-BCIcUhrc.js} +1 -1
- package/dist/chunks/{model-CcHyMyBv.js → model-BIf2i1is.js} +1 -1
- package/dist/chunks/{modelOptions-CJV1R3Jt.js → modelOptions-COIU5U3w.js} +1 -1
- package/dist/chunks/{nativeInstaller-CIUYh1aD.js → nativeInstaller-CGSNzGNn.js} +1 -1
- package/dist/chunks/{notifications-GLnjirCl.js → notifications-B5gzCmPC.js} +1 -1
- package/dist/chunks/{onChangeAppState-CxGW2d-l.js → onChangeAppState-NWwSE-I4.js} +1 -1
- package/dist/chunks/{openai-BpGQT2Iv.js → openai-CyJ3m4dI.js} +2 -2
- package/dist/chunks/{overlayContext-7wgLio1O.js → overlayContext-DYrGDe63.js} +1 -1
- package/dist/chunks/{partition-djFY9gGI.js → partition-BavNaw1S.js} +1 -1
- package/dist/chunks/permissions-CLYcBXIu.js +3 -0
- package/dist/chunks/{pidLock-CFUBtZck.js → pidLock-Bao7SU6Z.js} +2 -2
- package/dist/chunks/{plan-DI0n7LIV.js → plan-Dwj_ZX8G.js} +1 -1
- package/dist/chunks/plugin-Cscvf8st.js +17 -0
- package/dist/chunks/{pluginAutoupdate-CNrHb4RJ.js → pluginAutoupdate-D5XyiZrP.js} +1 -1
- package/dist/chunks/pluginBlocklist-CpkjXXKQ.js +1 -0
- package/dist/chunks/pluginCliCommands-DmLsxs1M.js +1 -0
- package/dist/chunks/{pluginFlagging-CUvkKGOB.js → pluginFlagging-CRuX6sHR.js} +1 -1
- package/dist/chunks/pluginOperations-orq3bOCp.js +2 -0
- package/dist/chunks/{pluginStartupCheck-DftTiXct.js → pluginStartupCheck-DGDl1WOZ.js} +1 -1
- package/dist/chunks/pluginStartupCheck-GHO77nmg.js +1 -0
- package/dist/chunks/plugins-Cq5c-Qs1.js +4 -0
- package/dist/chunks/{print-DSHypGJa.js → print-zo7Z--Ll.js} +9 -9
- package/dist/chunks/processBashCommand-C7oVqf0B.js +1 -0
- package/dist/chunks/processSlashCommand-CPQB5_0w.js +5 -0
- package/dist/chunks/{projectOnboardingState-nTCycGCD.js → projectOnboardingState-D-_ijZnG.js} +1 -1
- package/dist/chunks/prompt-CAzFDybL.js +1 -0
- package/dist/chunks/prompt-Cm8SKZXY.js +1 -0
- package/dist/chunks/{prompt-BfXryFt-.js → prompt-DaYH88Oe.js} +1 -1
- package/dist/chunks/{protocolHandler-VigBkAQQ.js → protocolHandler-CJO3CRYW.js} +1 -1
- package/dist/chunks/{reconciler-B9XFdL4f.js → reconciler-B5Kr4do0.js} +1 -1
- package/dist/chunks/refresh-DurNMJeS.js +1 -0
- package/dist/chunks/{reject-CBxnwckZ.js → reject-CzjtO3fU.js} +1 -1
- package/dist/chunks/{reload-plugins-5eFWrQlL.js → reload-plugins-C38i_Eb3.js} +1 -1
- package/dist/chunks/rename-BV-3ZpFx.js +1 -0
- package/dist/chunks/{resume-U2D0ybfU.js → resume-CUzQIor4.js} +2 -2
- package/dist/chunks/{runtimeObserver-CWaYMJG8.js → runtimeObserver-BKoQ5IEO.js} +4 -4
- package/dist/chunks/{runtimeObserver-DOYlxx9H.js → runtimeObserver-Ess1Cn8Y.js} +1 -1
- package/dist/chunks/sandbox-adapter-ClRO21Ci.js +1 -0
- package/dist/chunks/{sandbox-toggle-BtiPyjT3.js → sandbox-toggle-Bp6Xpjh3.js} +1 -1
- package/dist/chunks/searchExtraTools-CV_fkuD6.js +1 -0
- package/dist/chunks/{select-BuTJbu_Q.js → select-Bm29ymsI.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-B5kAD4ol.js +1 -0
- package/dist/chunks/{sessionObserver-cfwD8pV8.js → sessionObserver-CBlzrJt1.js} +1 -1
- package/dist/chunks/sessionObserver-CayxkuxO.js +1 -0
- package/dist/chunks/sessionStorage-vLxCo1Mh.js +1 -0
- package/dist/chunks/{sessionTracing-DsdcOqvc.js → sessionTracing-TDsq54Uc.js} +1 -1
- package/dist/chunks/setup-BbyfyeQk.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-DiZUDzxU.js → shadowedRuleDetection-BG3jtA9Y.js} +1 -1
- package/dist/chunks/{sideQuestion-CdgUarC2.js → sideQuestion-C8GNVo4R.js} +3 -3
- package/dist/chunks/{sinks-Cy3NqVbk.js → sinks-BafJR6Fw.js} +1 -1
- package/dist/chunks/sinks-CHtjg7sn.js +1 -0
- package/dist/chunks/skillChangeDetector-CY17weG4.js +1 -0
- package/dist/chunks/{skillGapStore-BJV8ZIB1.js → skillGapStore-Cl4J1WoZ.js} +2 -2
- package/dist/chunks/{skillLifecycle-iO_3s9Ff.js → skillLifecycle-DdfeUHBf.js} +2 -2
- package/dist/chunks/{skillSearchPanel-BL5gXTHU.js → skillSearchPanel-DtQYF9gN.js} +4 -4
- package/dist/chunks/{skills-BEp3_RyT.js → skills-Fd12LJal.js} +1 -1
- package/dist/chunks/status-CGEMRiPI.js +1 -0
- package/dist/chunks/statusNoticeHelpers-D0tonVy0.js +1 -0
- package/dist/chunks/{switcher-DSt2cVjA.js → switcher-BCq9Az_q.js} +1 -1
- package/dist/chunks/switcher-DQMr6Anx.js +1 -0
- package/dist/chunks/{tasks-DyBUXnQb.js → tasks-DQmkY_xD.js} +1 -1
- package/dist/chunks/{templateJobs-BBnReWWj.js → templateJobs-CEDUbFAY.js} +1 -1
- package/dist/chunks/{terminalSetup-CDpFfqqV.js → terminalSetup-CaGbEVjB.js} +1 -1
- package/dist/chunks/{terminalSetup-DedaY1P7.js → terminalSetup-xe_P98fY.js} +1 -1
- package/dist/chunks/{theme-BZOy9Iqh.js → theme-DQjJ4R0o.js} +1 -1
- package/dist/chunks/tipRegistry-BwxZ_G0j.js +2 -0
- package/dist/chunks/{toolEventObserver-ClwWmVbH.js → toolEventObserver-DdZ30on9.js} +1 -1
- package/dist/chunks/toolPool-CWIXwdX7.js +1 -0
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-ClN4NJnB.js → useExitOnCtrlCDWithKeybindings-ClrtNKJ6.js} +1 -1
- package/dist/chunks/useMainLoopModel-CULw8pB_.js +1 -0
- package/dist/chunks/{useManagePlugins-CxHz-gUP.js → useManagePlugins-CmsPSHor.js} +1 -1
- package/dist/chunks/useMergedTools-C8PxReh0.js +1 -0
- package/dist/chunks/{useSearchInput-BIQN_-Hm.js → useSearchInput-BZhTzjgN.js} +1 -1
- package/dist/chunks/useSettingsErrors-GWIxCYyd.js +1 -0
- package/dist/chunks/{util-BHr5l6Bx.js → util-Bih2g-pV.js} +1 -1
- package/dist/chunks/validatePlugin-BwcC_Wbr.js +1 -0
- package/dist/chunks/{vim-CYjMtnwH.js → vim-BlO9V5_5.js} +1 -1
- package/dist/chunks/worktree-BB9lFWBB.js +1 -0
- package/dist/chunks/wrapper-B-Q3Illb.js +1 -0
- package/dist/chunks/{wrapper-K8ZapJVu.js → wrapper-DVKxC5fR.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +2 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-CgSethgo.js +0 -1
- package/dist/chunks/App-DzRQpRKr.js +0 -1
- package/dist/chunks/Doctor-CLOYkPRR.js +0 -3
- package/dist/chunks/Doctor-CiZNe_qx.js +0 -1
- package/dist/chunks/ExitFlow-CATwJC4c.js +0 -2
- package/dist/chunks/MCPConnectionManager-CBY8nqdU.js +0 -1
- package/dist/chunks/MCPToolListView-C7HT6rrl.js +0 -1
- package/dist/chunks/MessageSelector-Dw_ERK_Z.js +0 -3
- package/dist/chunks/Messages-RBfRELKn.js +0 -10
- package/dist/chunks/QueryEngine-BBBkZWu2.js +0 -1
- package/dist/chunks/REPL-BHk0vZDf.js +0 -1
- package/dist/chunks/ResumeConversation-BuSqBrm1.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-CdWB9sO8.js +0 -1
- package/dist/chunks/Settings-DYKmPdbd.js +0 -2
- package/dist/chunks/Spinner-DOI8qqZi.js +0 -1
- package/dist/chunks/allErrors-DvcU0w0F.js +0 -1
- package/dist/chunks/backgroundHousekeeping-B56nFTzq.js +0 -1
- package/dist/chunks/caches-D7arwhaa.js +0 -1
- package/dist/chunks/caches-Dn8yrJmL.js +0 -1
- package/dist/chunks/commands-AcfFLgl5.js +0 -1
- package/dist/chunks/compact-Banc-SNk.js +0 -2
- package/dist/chunks/config-BhBcadjZ.js +0 -1
- package/dist/chunks/config-Bm5pVdCq.js +0 -1
- package/dist/chunks/context-noninteractive-BK2IDLSS.js +0 -1
- package/dist/chunks/conversation-B2dX3X4Z.js +0 -1
- package/dist/chunks/conversation-Cjaftrrw.js +0 -1
- package/dist/chunks/crossProjectResume-BzltC4NJ.js +0 -40
- package/dist/chunks/doctor-CQf8xPZH.js +0 -1
- package/dist/chunks/exit-uKtXb5U3.js +0 -1
- package/dist/chunks/extractMemories-8yvMGZ1J.js +0 -1
- package/dist/chunks/fast-aNkj6WvB.js +0 -1
- package/dist/chunks/fetchModelList-D2quBF6M.js +0 -1
- package/dist/chunks/hooks-B5Wq-KxE.js +0 -1
- package/dist/chunks/loadAgentsDir-BBbIAiay.js +0 -1
- package/dist/chunks/loadPluginHooks-QoVXsBjy.js +0 -1
- package/dist/chunks/localSearch-D6MhwvnR.js +0 -1
- package/dist/chunks/managedEnv-ulQBH73B.js +0 -1
- package/dist/chunks/mcp--LmEVBRg.js +0 -1
- package/dist/chunks/mcp-DCl-Tz-C.js +0 -2
- package/dist/chunks/memory-Bu5ku7y9.js +0 -1
- package/dist/chunks/permissions-DNedQyLg.js +0 -3
- package/dist/chunks/plugin-BQ8gRVYF.js +0 -17
- package/dist/chunks/pluginBlocklist-CKCsgWdY.js +0 -1
- package/dist/chunks/pluginCliCommands-CACeyIwz.js +0 -1
- package/dist/chunks/pluginOperations-Ca_T-HYn.js +0 -2
- package/dist/chunks/pluginStartupCheck-Du9yx2P8.js +0 -1
- package/dist/chunks/plugins-Divl-P-X.js +0 -4
- package/dist/chunks/processBashCommand-BLcFmbyG.js +0 -1
- package/dist/chunks/processSlashCommand-Caif46Gi.js +0 -5
- package/dist/chunks/prompt-BZmu5CeK.js +0 -1
- package/dist/chunks/prompt-Cogr_WZr.js +0 -1
- package/dist/chunks/refresh-CBHbWTGg.js +0 -1
- package/dist/chunks/rename-Cw7cMerG.js +0 -1
- package/dist/chunks/sandbox-adapter-Df7Wpt77.js +0 -1
- package/dist/chunks/searchExtraTools-CbJVb_Zk.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-_mxyfQmn.js +0 -1
- package/dist/chunks/sessionObserver-BZVgzp3W.js +0 -1
- package/dist/chunks/sessionStorage-SC5RfnUP.js +0 -1
- package/dist/chunks/setup-DR-KEmxL.js +0 -3
- package/dist/chunks/sinks-D41OiGE4.js +0 -1
- package/dist/chunks/skillChangeDetector-CVFCJcG7.js +0 -1
- package/dist/chunks/status-6JMz8jmM.js +0 -1
- package/dist/chunks/statusNoticeHelpers-BoloSeXY.js +0 -1
- package/dist/chunks/switcher-95d4TrQH.js +0 -1
- package/dist/chunks/tipRegistry-Cl5sdLRX.js +0 -2
- package/dist/chunks/toolPool-DSTbgGmX.js +0 -1
- package/dist/chunks/useMainLoopModel-Bgxpmn2Q.js +0 -1
- package/dist/chunks/useMergedTools-BUuWew0-.js +0 -1
- package/dist/chunks/useSettingsErrors-BDJCLei_.js +0 -1
- package/dist/chunks/validatePlugin-fx1Y8vam.js +0 -1
- package/dist/chunks/worktree-CGu_58ue.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,H as n,I as r,Lt as i,P as a,ai as o,kt as s,t as c}from"./src-BX54x08P.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as u,qt as d}from"./settings-D4M13toi.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,H as n,I as r,Lt as i,P as a,ai as o,kt as s,t as c}from"./src-BX54x08P.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as u,qt as d}from"./settings-D4M13toi.js";import{rb as f}from"./loadAgentsDir-BfLCckVj.js";import{n as p}from"./analytics-COpjZpvd.js";import{n as m,t as h}from"./useExitOnCtrlCDWithKeybindings-ClrtNKJ6.js";import{n as g,t as _}from"./select-Bm29ymsI.js";import{c as v,i as y,s as b}from"./terminalSetup-xe_P98fY.js";import{r as x}from"./Spinner-BgjmQLjw.js";import{n as S,t as C}from"./ThemePicker-th2jdUjh.js";import{n as w,t as T}from"./PressEnterToContinue-DE1RxMX_.js";var E=e(o(),1),D=l();p(),u(),f(),h(),y(),c(),c(),x(),g(),c();var O=58;function k(){let[e]=n(),t=`Welcome to Work Mate`;return d.terminal===`Apple_Terminal`?(0,D.jsx)(A,{theme:e,welcomeMessage:t}):[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.29`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` ░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` `})]}):(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.29`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` * █████▓▓░ `}),(0,D.jsx)(a,{children:` * ███▓░ ░░ `}),(0,D.jsx)(a,{children:` ░░░░░░ ███▓░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,D.jsxs)(a,{children:[(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{bold:!0,children:`*`}),(0,D.jsx)(a,{children:` ██▓░░ ▓ `})]}),(0,D.jsx)(a,{children:` ░▓▓███▓▓░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * ░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` ░░░░░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * ░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * `})]})}function A({theme:e,welcomeMessage:t}){return[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.29`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` ░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` `})]}):(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.29`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` * █████▓▓░ `}),(0,D.jsx)(a,{children:` * ███▓░ ░░ `}),(0,D.jsx)(a,{children:` ░░░░░░ ███▓░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,D.jsxs)(a,{children:[(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{bold:!0,children:`*`}),(0,D.jsx)(a,{children:` ██▓░░ ▓ `})]}),(0,D.jsx)(a,{children:` ░▓▓███▓▓░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * ░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` ░░░░░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `})]})}S(),w(),c();var j=(0,E.createContext)({marker:``});function M({children:e}){let{marker:t}=(0,E.useContext)(j);return(0,D.jsxs)(r,{gap:1,children:[(0,D.jsx)(a,{dimColor:!0,children:t}),(0,D.jsx)(r,{flexDirection:`column`,children:e})]})}c();var N=(0,E.createContext)({marker:``});function P({children:e}){let{marker:t}=(0,E.useContext)(N),n=0;for(let t of E.Children.toArray(e))!(0,E.isValidElement)(t)||t.type!==M||n++;let i=String(n).length;return(0,D.jsx)(r,{flexDirection:`column`,children:E.Children.map(e,(e,n)=>{if(!(0,E.isValidElement)(e)||e.type!==M)return e;let r=`${String(n+1).padStart(i)}.`,a=`${t}${r}`;return(0,D.jsx)(N.Provider,{value:{marker:a},children:(0,D.jsx)(j.Provider,{value:{marker:a},children:e})})})})}P.Item=M;var F=P;c(),u();function I({onDone:e}){let[o,c]=(0,E.useState)(0),[l,u]=n();(0,E.useEffect)(()=>{},[]);function f(){if(o<x.length-1){let e=o+1;c(e),x[e]?.id}else e()}function p(e){u(e),f()}let h=m(),g=(0,D.jsx)(r,{marginX:1,children:(0,D.jsx)(C,{onThemeSelect:p,showIntroText:!0,helpText:`To change this later, run /theme`,hideEscToCancel:!0,skipExitHandling:!0})}),y=(0,D.jsxs)(r,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,D.jsx)(a,{bold:!0,children:`Before you start, keep in mind:`}),(0,D.jsx)(r,{flexDirection:`column`,width:70,children:(0,D.jsxs)(F,{children:[(0,D.jsxs)(F.Item,{children:[(0,D.jsx)(a,{children:`Always review changes before accepting`}),(0,D.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Work Mate can make mistakes — especially when running commands`,(0,D.jsx)(s,{}),`or editing files. You stay in control of every action.`,(0,D.jsx)(s,{})]})]}),(0,D.jsxs)(F.Item,{children:[(0,D.jsx)(a,{children:`Only use Work Mate on projects you trust`}),(0,D.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Untrusted code could contain prompt injection attacks.`,(0,D.jsx)(s,{}),(0,D.jsx)(i,{url:`https://code.workmate.com/docs/en/security`})]})]})]})}),(0,D.jsx)(T,{})]}),x=[];x.push({id:`theme`,component:g}),x.push({id:`security`,component:y}),v()&&x.push({id:`terminal-setup`,component:(0,D.jsxs)(r,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,D.jsx)(a,{bold:!0,children:`Use Work Mate's terminal setup?`}),(0,D.jsxs)(r,{flexDirection:`column`,width:70,gap:1,children:[(0,D.jsxs)(a,{children:[`For the optimal coding experience, enable the recommended settings`,(0,D.jsx)(s,{}),`for your terminal:`,` `,d.terminal===`Apple_Terminal`?`Option+Enter for newlines and visual bell`:`Shift+Enter for newlines`]}),(0,D.jsx)(_,{options:[{label:`Yes, use recommended settings`,value:`install`},{label:`No, maybe later with /terminal-setup`,value:`no`}],onChange:e=>{e===`install`?b(l).catch(()=>{}).finally(f):f()},onCancel:()=>f()}),(0,D.jsx)(a,{dimColor:!0,children:h.pending?(0,D.jsxs)(D.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,D.jsx)(D.Fragment,{children:`Enter to confirm · Esc to skip`})})]})]})});let S=x[o],w=(0,E.useCallback)(()=>{o===x.length-1?e():f()},[o,x.length,e]),O=(0,E.useCallback)(()=>{f()},[o,x.length,e]);return t({"confirm:yes":w},{context:`Confirmation`,isActive:S?.id===`security`}),t({"confirm:no":O},{context:`Confirmation`,isActive:S?.id===`terminal-setup`}),(0,D.jsxs)(r,{flexDirection:`column`,children:[(0,D.jsx)(k,{}),(0,D.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[S?.component,h.pending&&(0,D.jsx)(r,{padding:1,children:(0,D.jsxs)(a,{dimColor:!0,children:[`Press `,h.keyName,` again to exit`]})})]})]})}export{I as Onboarding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as n,I as r,P as i,ai as a,ot as o,t as s}from"./src-BX54x08P.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as n,I as r,P as i,ai as a,ot as o,t as s}from"./src-BX54x08P.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{lb as l}from"./loadAgentsDir-BfLCckVj.js";import{S as u,_ as d,b as f}from"./startupProfiler-B9Qv2QGH.js";function p(e){return e.startsWith(`file-`)?`+`:e.startsWith(`mcp-resource-`)?`◇`:e.startsWith(`agent-`)?`*`:`+`}function m(e){return e.startsWith(`file-`)||e.startsWith(`mcp-resource-`)||e.startsWith(`agent-`)}function h({suggestions:e,selectedSuggestion:t,maxColumnWidth:i,overlay:a}){let{rows:s}=o(),c=a?5:Math.min(6,Math.max(1,s-3));if(e.length===0)return null;let l=i??Math.max(...e.map(e=>n(e.displayText)))+5,u=Math.max(0,Math.min(t-Math.floor(c/2),e.length-c)),d=Math.min(u+c,e.length),f=e.slice(u,d);return(0,_.jsx)(r,{flexDirection:`column`,justifyContent:a?void 0:`flex-end`,children:f.map(n=>(0,_.jsx)(v,{item:n,maxColumnWidth:l,isSelected:n.id===e[t]?.id},n.id))})}var g,_,v,y,b=e((()=>{g=t(a(),1),l(),s(),d(),_=c(),v=(0,g.memo)(function({item:e,maxColumnWidth:t,isSelected:r}){let a=o().columns;if(m(e.id)){let t=p(e.id),o=r?`suggestion`:void 0,s=!r,c=e.id.startsWith(`file-`),l=e.id.startsWith(`mcp-resource-`),d=e.description?3:0,m;if(c){let t=e.description?Math.min(20,n(e.description)):0,r=a-2-4-d-t;m=f(e.displayText,r)}else m=l?u(e.displayText,30):e.displayText;let h=a-2-n(m)-d-4,g;if(e.description){let n=Math.max(0,h),r=u(e.description.replace(/\s+/g,` `),n);g=`${t} ${m} – ${r}`}else g=`${t} ${m}`;return(0,_.jsx)(i,{color:o,dimColor:s,wrap:`truncate`,children:g})}let s=Math.floor(a*.4),c=Math.min(t??n(e.displayText)+5,s),l=e.color||(r?`suggestion`:void 0),d=!r,h=e.displayText;n(h)>c-2&&(h=u(h,c-2));let g=h+` `.repeat(Math.max(0,c-n(h))),v=e.tag?`[${e.tag}] `:``,y=n(v),b=Math.max(0,a-c-y-4),x=e.description?u(e.description.replace(/\s+/g,` `),b):``;return(0,_.jsxs)(i,{wrap:`truncate`,children:[(0,_.jsx)(i,{color:l,dimColor:d,children:g}),v?(0,_.jsx)(i,{color:e.tag===`local`?`ansi:yellow`:void 0,dimColor:e.tag!==`local`,children:v}):null,(0,_.jsx)(i,{color:r?`suggestion`:void 0,dimColor:!r,children:x})]})}),y=(0,g.memo)(h)}));export{y as n,b as r,h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,t as r}from"./src-BX54x08P.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as a,qt as o}from"./settings-D4M13toi.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,t as r}from"./src-BX54x08P.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as a,qt as o}from"./settings-D4M13toi.js";import{FC as s,MC as c,NC as l,ab as u,ib as d}from"./loadAgentsDir-BfLCckVj.js";import{d as f,o as p}from"./config-Bio2EjUK.js";import{i as m,o as h}from"./bundledMode-D9omqD3L.js";import{a as g,s as _}from"./sleep-xKMbXTJe.js";import{a as v,i as y,r as b}from"./terminalSetup-xe_P98fY.js";function x(){return p().editorMode===`vim`}function S(){return o.terminal===`Apple_Terminal`&&process.platform===`darwin`||v()?`shift + ⏎ for newline`:b()?`\\⏎ for newline`:`backslash (\\) + return (⏎) for newline`}function C(e,t){return t.ctrl||t.meta||t.escape||t.return||t.tab||t.backspace||t.delete||t.upArrow||t.downArrow||t.leftArrow||t.rightArrow||t.pageUp||t.pageDown||t.home||t.end?!1:e.length>0&&!/^\s/.test(e)&&!e.startsWith(`\x1B`)}var w=e((()=>{y(),f(),a()}));function T(e){return e.replace(/\+/g,` + `)}function E(e){let{dimColor:r,fixedWidth:i,gap:a,paddingX:o}=e,c=T(u(`app:toggleTranscript`,`Global`,`ctrl+o`)),d=T(u(`app:toggleTodos`,`Global`,`ctrl+t`)),f=T(u(`chat:undo`,`Chat`,`ctrl+_`)),p=T(u(`chat:stash`,`Chat`,`ctrl+s`)),h=T(u(`chat:cycleMode`,`Chat`,`shift+tab`)),g=T(u(`chat:modelPicker`,`Chat`,`alt+p`)),v=T(u(`chat:fastMode`,`Chat`,`alt+o`)),y=T(u(`chat:externalEditor`,`Chat`,`ctrl+g`));T(u(`app:toggleTerminal`,`Global`,`meta+j`));let b=T(u(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,D.jsxs)(t,{paddingX:o,flexDirection:`row`,gap:a,children:[(0,D.jsxs)(t,{flexDirection:`column`,width:i?24:void 0,children:[(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`! for bash mode`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`/ for commands`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`@ for file paths`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`& for background`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`/btw for side question`})})]}),(0,D.jsxs)(t,{flexDirection:`column`,width:i?35:void 0,children:[(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`double tap esc to clear input`})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[h,` to auto-accept edits`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[c,` for verbose output`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[d,` to toggle tasks`]})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:S()})})]}),(0,D.jsxs)(t,{flexDirection:`column`,children:[(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[f,` to undo`]})}),m()!==`windows`&&(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`ctrl + z to suspend`})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[b,` to paste images`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[g,` to switch model`]})}),s()&&l()&&(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[v,` to toggle fast mode`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[p,` to stash prompt`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[y,` to edit in $EDITOR`]})}),_()&&(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`/keybindings to customize`})})]})]})}var D,O=e((()=>{r(),h(),g(),d(),c(),w(),D=i()}));export{x as a,C as i,O as n,w as r,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,ai as r,kt as i,t as a}from"./src-BX54x08P.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{i as s,n as c}from"./loader-BMAtuwRa.js";import{r as l,t as u}from"./switcher-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,ai as r,kt as i,t as a}from"./src-BX54x08P.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{i as s,n as c}from"./loader-BMAtuwRa.js";import{r as l,t as u}from"./switcher-BCq9Az_q.js";import{n as d,t as f}from"./useExitOnCtrlCDWithKeybindings-ClrtNKJ6.js";import{t as p}from"./select-Bm29ymsI.js";import{t as m}from"./CustomSelect-BsEd2To5.js";var h=e(r(),1);a(),f(),c(),l(),m();var g=o(),_=[{key:`id`,label:`Provider id (kebab-case)`,placeholder:`my-provider`},{key:`baseUrl`,label:`Base URL`,placeholder:`https://api.example.com/v1`},{key:`apiKey`,label:`API Key`,placeholder:`sk-...`},{key:`model`,label:`Default model`,placeholder:`gpt-4o-mini`}],v=[{value:`save-openai`,label:`Save as OpenAI-compat (Chat Completions API)`},{value:`save-anthropic`,label:`Save as Anthropic-compat (Messages API)`},{value:`skip`,label:`Skip — configure later with /provider add`}];function y(e){return e===`save-openai`||e===`save-anthropic`||e===`skip`}function b(e){if(!e.id)return`Provider id is required.`;if(!/^[a-z0-9-]+$/.test(e.id))return`Provider id must be kebab-case (lowercase letters, digits, hyphens).`;if(!e.baseUrl)return`Base URL is required.`;try{new URL(e.baseUrl)}catch{return`Base URL must be a valid URL.`}return e.apiKey?null:`API Key is required.`}function x({onDone:e}){let r=(0,h.useRef)({id:``,baseUrl:``,apiKey:``,model:``}),[a,o]=(0,h.useState)(null),c=d();async function l(t){if(t===`skip`){e();return}let n=t===`save-openai`?`openai-compat`:`anthropic-compat`,i=b(r.current);if(i){o(i);return}let a={id:r.current.id,kind:n,baseUrl:r.current.baseUrl,apiKey:r.current.apiKey,defaultModel:r.current.model||`gpt-4o-mini`};try{s([a]),await u(a.id)}catch(e){let t=e instanceof Error?e.message:String(e);o(`Failed to save provider: ${t}`);return}e()}function f(e){o(null),y(e)&&l(e)}let m=[..._.map(e=>({type:`input`,label:e.label,value:e.key,placeholder:e.placeholder,allowEmptySubmitToCancel:!0,onChange:t=>{r.current[e.key]=t}})),...v.map(e=>({type:`text`,label:e.label,value:e.value}))];return(0,g.jsxs)(t,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,g.jsx)(n,{bold:!0,color:`permission`,children:`Configure an API provider`}),(0,g.jsx)(t,{flexDirection:`column`,width:70,children:(0,g.jsxs)(n,{dimColor:!0,wrap:`wrap`,children:[`No provider is configured yet — `,(0,g.jsx)(n,{children:`~/.workmate/providers.json`}),` was not found.`,(0,g.jsx)(i,{}),`Fill in the fields below to point Work Mate at any OpenAI- or Anthropic-compatible`,(0,g.jsx)(i,{}),`endpoint. Type to edit a focused field, ↑/↓ to move between rows, Enter to trigger`,(0,g.jsx)(i,{}),`the highlighted action.`]})}),(0,g.jsx)(p,{options:m,onChange:f,onCancel:()=>e(),visibleOptionCount:m.length}),a&&(0,g.jsx)(n,{color:`error`,wrap:`wrap`,children:a}),c.pending&&(0,g.jsxs)(n,{dimColor:!0,children:[`Press `,c.keyName,` again to exit`]})]})}export{x as ProviderSetup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,s as r}from"./envUtils-QyzA_cFM.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Kr as o,qr as s}from"./src-BX54x08P.js";import{X as c,d as l,m as u,q as d}from"./settings-D4M13toi.js";import{Ft as ee,K as f,Pt as p,at as m,ft as h,gt as g,rt as _}from"./state-CXY-q5gr.js";import{Aa as te,Cb as ne,Ds as v,Es as re,Gv as y,Hv as b,I_ as x,Ia as S,Kr as C,L_ as w,MC as T,Mi as ie,Pi as E,Q as D,Qn as O,R_ as ae,Ra as oe,SS as k,Sb as se,Ts as ce,Up as A,Vp as j,Vv as M,Xi as le,Xs as ue,Xu as de,YS as fe,Ys as N,Z as pe,_n as P,_v as F,_w as I,bC as me,ct as he,gv as ge,hS as _e,ig as ve,kC as L,lt as ye,ma as be,py as xe,qS as Se,qu as R,qv as z,qx as Ce,ry as B,sg as V,tg as we,tt as Te,uw as H,vn as Ee,vr as De,vw as Oe,ws as ke,yC as Ae}from"./loadAgentsDir-BfLCckVj.js";import{n as U,t as je}from"./cwd-DrEEb4f5.js";import{C as Me,S as Ne,d as W,o as Pe}from"./config-Bio2EjUK.js";import{i as Fe,o as Ie,q as Le}from"./log-L1kqxa_P.js";import{f as G,s as Re,v as ze}from"./model-BIf2i1is.js";import{at as K,bn as Be,nt as Ve,vn as He}from"./prompt-DaYH88Oe.js";import{n as Ue,o as We,r as q}from"./MessageSelector-CFz30wBL.js";import{n as Ge,t as J}from"./systemTheme-Ceakddth.js";import{randomUUID as Y}from"crypto";n(),i(),o(),p(),U(),Ie(),u(),Me(),He(),W(),I(),T(),Ae(),k(),xe(),K(),z(),F(),V(),A(),N(),S(),le(),E(),De(),P(),D(),ye(),ae(),b(),G(),B(),R();async function Ke({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?he(e,t,n,r):Promise.resolve([]),w(),i===void 0?x():Promise.resolve({})]);return{defaultSystemPrompt:a,userContext:o,systemContext:s}}async function qe({tools:e,commands:t,mcpClients:n,messages:r,readFileState:i,getAppState:a,setAppState:o,customSystemPrompt:s,appendSystemPrompt:c,thinkingConfig:l,agents:u}){let d=Re(),ee=a(),{defaultSystemPrompt:f,userContext:p,systemContext:m}=await Ke({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(ee.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),h=Se([...s===void 0?f:[s],...c?[c]:[]]),g=r.at(-1),_=g?.type===`assistant`&&g.message.stop_reason===null?r.slice(0,-1):r;return{systemPrompt:h,userContext:p,systemContext:m,toolUseContext:{options:{commands:t,debug:!1,mainLoopModel:d,tools:e,verbose:!1,thinkingConfig:l??(de()===!1?{type:`disabled`}:{type:`adaptive`}),mcpClients:n,mcpResources:{},isNonInteractiveSession:!0,agentDefinitions:{activeAgents:u,allAgents:[]},customSystemPrompt:s,appendSystemPrompt:c},abortController:M(),readFileState:i,getAppState:a,setAppState:o,messages:_,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}},forkContextMessages:_}}c(),se(),te(),J(),H();function X(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:e.message,uuid:e.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case`user`:return[{type:`user`,message:e.message,uuid:e.uuid??Y(),timestamp:e.timestamp??new Date().toISOString(),isMeta:e.isSynthetic}];default:return[]}})}function Je(e){let t=e.preservedSegment;return{trigger:e.trigger,pre_tokens:e.preTokens,...t&&{preserved_segment:{head_uuid:t.headUuid,anchor_uuid:t.anchorUuid,tail_uuid:t.tailUuid}}}}function Ye(e,t){let n=Ce({content:s(e).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,`$1`).replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,`$1`).trim()});return{type:`assistant`,content:n.message?.content,message:n.message,parent_tool_use_id:null,session_id:m(),uuid:t}}function Z(e){if(e)return{type:`rate_limit`,status:e.status,...e.resetsAt!==void 0&&{resetsAt:e.resetsAt},...e.rateLimitType!==void 0&&{rateLimitType:e.rateLimitType},...e.utilization!==void 0&&{utilization:e.utilization},...e.overageStatus!==void 0&&{overageStatus:e.overageStatus},...e.overageResetsAt!==void 0&&{overageResetsAt:e.overageResetsAt},...e.overageDisabledReason!==void 0&&{overageDisabledReason:e.overageDisabledReason},...e.isUsingOverage!==void 0&&{isUsingOverage:e.isUsingOverage},...e.surpassedThreshold!==void 0&&{surpassedThreshold:e.surpassedThreshold}}}p();function Xe(e){return e===`Agent`?d:e}function Ze(e){let t=l()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:je(),session_id:m(),tools:e.tools.map(e=>Xe(e.name)),mcp_servers:e.mcpClients.map(e=>({name:e.name,status:e.type})),model:e.model,permissionMode:e.permissionMode,slash_commands:e.commands.filter(e=>e.userInvocable!==!1).map(e=>e.name),apiKeySource:process.env.ANTHROPIC_API_KEY?`ANTHROPIC_API_KEY`:`none`,betas:_(),claude_code_version:`0.0.29`,output_style:t,agents:e.agents.map(e=>e.agentType),skills:e.skills.filter(e=>e.userInvocable!==!1).map(e=>e.name),plugins:e.plugins.map(e=>({name:e.name,path:e.path,source:e.source})),uuid:Y()};return n.fast_mode_state=L(e.model,e.fastMode),n}p(),o(),Le(),b(),U(),T(),le(),G(),B(),R(),ce();var Qe=()=>{try{return q(),e(Ue)}catch{return null}},Q=class{constructor(e){a(this,`config`,void 0),a(this,`mutableMessages`,void 0),a(this,`abortController`,void 0),a(this,`permissionDenials`,void 0),a(this,`totalUsage`,void 0),a(this,`hasHandledOrphanedPermission`,!1),a(this,`readFileState`,void 0),a(this,`discoveredSkillNames`,new Set),a(this,`loadedNestedMemoryPaths`,new Set),this.config=e,this.mutableMessages=e.initialMessages??[],this.abortController=e.abortController??M(),this.permissionDenials=[],this.readFileState=e.readFileCache,this.totalUsage=fe}async*submitMessage(e,n){let{cwd:i,commands:a,tools:o,mcpClients:c,verbose:l=!1,thinkingConfig:u,maxTurns:d,maxBudgetUsd:p,taskBudget:_,canUseTool:te,customSystemPrompt:y,appendSystemPrompt:b,userSpecifiedModel:x,fallbackModel:S,jsonSchema:w,getAppState:T,setAppState:E,replayUserMessages:D=!1,includePartialMessages:ae=!1,agents:k=[],setSDKStatus:se,orphanedPermission:ce}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],ne(i);let A=!ee(),M=Date.now(),le=async(e,t,n,r,i,a)=>{let o=await te(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:Xe(e.name),tool_use_id:i,tool_input:t}),o},N=T(),P=x?ze(x):Re(),F=u||(de()===!1?{type:`disabled`}:{type:`adaptive`});j(`before_getSystemPrompt`);let I=typeof y==`string`?y:void 0,{defaultSystemPrompt:he,userContext:ye,systemContext:xe}=await Ke({tools:o,mainLoopModel:P,additionalWorkingDirectories:Array.from(N.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:c,customSystemPrompt:I});j(`after_getSystemPrompt`);let R={...ye},z=I!==void 0&&Ne()?await Oe():null,Ce=Se([...I===void 0?he:[I],...z?[z]:[],...b?[b]:[]]),B=o.some(e=>Be(e,Ve));w&&B&&Ee(E,m());let V={messages:this.mutableMessages,setMessages:e=>{this.mutableMessages=e(this.mutableMessages)},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:l,mainLoopModel:P,thinkingConfig:F,mcpClients:c,mcpResources:{},isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,agentDefinitions:{activeAgents:k,allAgents:[]},theme:Ge(Pe().theme),maxBudgetUsd:p},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{E(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{E(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:se};if(ce&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of ke(ce,o,this.mutableMessages,V))yield e}let{messages:H,shouldQuery:De,allowedTools:Ae,model:U,resultText:Me}=await We({input:e,mode:`prompt`,setToolJSX:()=>{},context:{...V,messages:this.mutableMessages},messages:this.mutableMessages,uuid:n?.uuid,isMeta:n?.isMeta,querySource:`sdk`});this.mutableMessages.push(...H);let W=[...this.mutableMessages];if(A&&H.length>0){let e=C(W);r()||(await e,(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O())}let Ie=Qe(),Le=H.filter(e=>e.type===`user`&&!e.isMeta&&!e.toolUseResult&&(Ie?.selectableUserMessagesFilter(e)??!0)||e.type===`system`&&e.subtype===`compact_boundary`),G=D?Le:[];E(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:Ae}}}));let K=U??P;V={messages:W,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:l,mainLoopModel:K,thinkingConfig:F,mcpClients:c,mcpResources:{},isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,theme:Ge(Pe().theme),agentDefinitions:{activeAgents:k,allAgents:[]},maxBudgetUsd:p},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:V.updateFileHistoryState,updateAttributionState:V.updateAttributionState,setSDKStatus:se},j(`before_skills_plugins`);let[He,{enabled:Ue}]=await Promise.all([ie(je()),oe()]);if(j(`after_skills_plugins`),yield Ze({tools:o,mcpClients:c,model:K,permissionMode:N.toolPermissionContext.mode,commands:a,agents:k,skills:He,plugins:Ue,fastMode:N.fastMode}),j(`system_message_yielded`),!De){for(let e of H)if(e.type===`user`&&typeof e.message.content==`string`&&(e.message.content.includes(`<local-command-stdout>`)||e.message.content.includes(`<local-command-stderr>`)||e.isCompactSummary)&&(yield{type:`user`,message:{...e.message,content:s(e.message.content)},session_id:m(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!e.isCompactSummary,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly}),e.type===`system`&&e.subtype===`local_command`&&typeof e.content==`string`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))&&(yield Ye(e.content,e.uuid)),e.type===`system`&&e.subtype===`compact_boundary`){let t=e;yield{type:`system`,subtype:`compact_boundary`,session_id:m(),uuid:e.uuid,compact_metadata:Je(t.compactMetadata)}}A&&(await C(W),(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-M,duration_api_ms:h(),num_turns:W.length-1,result:Me??``,stop_reason:null,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y()};return}if(we()&&A){let e=Qe()?.selectableUserMessagesFilter??(e=>!0);H.filter(e).forEach(e=>{ve(e=>{E(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let q=fe,J=1,qe=!1,X,Z=null,Q=Fe().at(-1),$e=w?be(this.mutableMessages,Ve):0;for await(let e of ue({messages:W,systemPrompt:Ce,userContext:R,systemContext:xe,canUseTool:le,toolUseContext:V,fallbackModel:S,querySource:`sdk`,maxTurns:d,taskBudget:_})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(A&&e.type===`system`&&e.subtype===`compact_boundary`){let t=e.compactMetadata?.preservedSegment?.tailUuid;if(t){let e=this.mutableMessages.findLastIndex(e=>e.uuid===t);e!==-1&&await C(this.mutableMessages.slice(0,e+1))}}if(W.push(e),A&&(e.type===`assistant`?C(W):await C(W)),!qe&&G.length>0){qe=!0;for(let e of G)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:m(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}}switch(e.type===`user`&&J++,e.type){case`tombstone`:break;case`assistant`:{let t=e,n=t.message?.stop_reason;n!=null&&(Z=n),this.mutableMessages.push(t),yield*v(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),A&&(W.push(t),C(W)),yield*v(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*v(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){q=fe;let e=t.message;q=Te(q,e.usage)}if(t.type===`message_delta`){q=Te(q,t.usage);let e=t.delta;e.stop_reason!=null&&(Z=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=pe(this.totalUsage,q)),ae&&(yield{type:`stream_event`,event:t,session_id:m(),parent_tool_use_id:null,uuid:Y()});break}case`attachment`:{let n=e;this.mutableMessages.push(n),A&&(W.push(n),C(W));let r=n.attachment;if(r.type===`structured_output`)X=r.data;else if(r.type===`max_turns_reached`){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:r.turnCount,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Reached maximum number of turns (${r.maxTurns})`]};return}else D&&r.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:r.prompt},session_id:m(),parent_tool_use_id:null,uuid:r.source_uuid||n.uuid,timestamp:n.timestamp,isReplay:!0});break}case`stream_request_start`:break;case`system`:{let t=e,n=this.config.snipReplay?.(t,this.mutableMessages);if(n!==void 0){n.executed&&(this.mutableMessages.length=0,this.mutableMessages.push(...n.messages));break}if(this.mutableMessages.push(t),t.subtype===`compact_boundary`&&t.compactMetadata){let e=t,n=this.mutableMessages.length-1;n>0&&this.mutableMessages.splice(0,n);let r=W.length-1;r>0&&W.splice(0,r),yield{type:`system`,subtype:`compact_boundary`,session_id:m(),uuid:t.uuid,compact_metadata:Je(e.compactMetadata)}}if(t.subtype===`api_error`){let e=t;yield{type:`system`,subtype:`api_retry`,attempt:e.retryAttempt,max_retries:e.maxRetries,retry_delay_ms:e.retryInMs,error_status:e.error.status??null,error:ge(e.error),session_id:m(),uuid:t.uuid}}break}case`tool_use_summary`:{let t=e;yield{type:`tool_use_summary`,summary:t.summary,preceding_tool_use_ids:t.precedingToolUseIds,session_id:m(),uuid:t.uuid};break}}if(p!==void 0&&g()>=p){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Reached maximum budget ($${p}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&w){let e=be(this.mutableMessages,Ve)-$e,n=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=n){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Failed to provide valid structured output after ${n} attempts`]};return}}}let $=W.findLast(e=>e.type===`assistant`||e.type===`user`),et=$?.type??`undefined`,tt=$?.type===`assistant`?me($.message.content)?.type??`none`:`n/a`;if(A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),!re($,Z)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:(()=>{let e=Fe(),t=Q?e.lastIndexOf(Q)+1:0;return[`[ede_diagnostic] result_type=${et} last_content_type=${tt} stop_reason=${Z}`,...e.slice(t).map(e=>e.error)]})()};return}let nt=``,rt=!1;if($.type===`assistant`){let e=me($.message.content);e?.type===`text`&&!_e.has(e.text)&&(nt=e.text),rt=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:rt,duration_ms:Date.now()-M,duration_api_ms:h(),num_turns:J,result:nt,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,structured_output:X,fast_mode_state:L(K,N.fastMode),uuid:Y()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=M()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return m()}setModel(e){this.config.userSpecifiedModel=e}};async function*$e({commands:e,prompt:t,promptUuid:n,isMeta:r,cwd:i,tools:a,mcpClients:o,verbose:s=!1,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,canUseTool:ee,mutableMessages:f=[],getReadFileCache:p,setReadFileCache:m,customSystemPrompt:h,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:te,jsonSchema:ne,getAppState:v,setAppState:re,abortController:b,replayUserMessages:x=!1,includePartialMessages:S=!1,handleElicitation:C,agents:w=[],setSDKStatus:T,orphanedPermission:ie}){let E=new Q({cwd:i,tools:a,commands:e,mcpClients:o,agents:w??[],canUseTool:ee,getAppState:v,setAppState:re,initialMessages:f,readFileCache:y(p()),customSystemPrompt:h,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:te,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:ne,verbose:s,handleElicitation:C,replayUserMessages:x,includePartialMessages:S,setSDKStatus:T,abortController:b,orphanedPermission:ie});try{yield*E.submitMessage(t,{uuid:n,isMeta:r})}finally{m(E.getReadFileState())}}export{qe as a,Z as i,$e as n,X as r,Q as t};
|