@readmagic/workmate 0.0.27 → 0.0.28

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.
Files changed (216) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-DqlPtsVK.js → AddWorkspaceDirectory-Bmgh8VS3.js} +1 -1
  2. package/dist/chunks/{AgentsMdExternalIncludesDialog-rJS5l6yk.js → AgentsMdExternalIncludesDialog-BJfHqScU.js} +1 -1
  3. package/dist/chunks/AgentsMdExternalIncludesDialog-BjbUilCE.js +1 -0
  4. package/dist/chunks/{App-DzRQpRKr.js → App-COdpsR2w.js} +1 -1
  5. package/dist/chunks/{BackgroundTasksDialog-CBhSmdz_.js → BackgroundTasksDialog-WkoL4g5Q.js} +1 -1
  6. package/dist/chunks/{BypassPermissionsModeDialog-zz-lnmJt.js → BypassPermissionsModeDialog-BT9yl0Qt.js} +1 -1
  7. package/dist/chunks/{CustomSelect-CYmc4vRh.js → CustomSelect-t4wXuXWH.js} +1 -1
  8. package/dist/chunks/{DiffDialog-CTUIAcEE.js → DiffDialog-CXZxnb7Y.js} +1 -1
  9. package/dist/chunks/Doctor-B6isid5K.js +1 -0
  10. package/dist/chunks/{Doctor-CLOYkPRR.js → Doctor-COj-tZBc.js} +1 -1
  11. package/dist/chunks/{ExitFlow-CATwJC4c.js → ExitFlow-CcMYH5iI.js} +1 -1
  12. package/dist/chunks/{InvalidConfigDialog-B-9Z58oD.js → InvalidConfigDialog-riLYEaUP.js} +1 -1
  13. package/dist/chunks/{InvalidSettingsDialog-B4EWjbp7.js → InvalidSettingsDialog-BGXl3V1A.js} +1 -1
  14. package/dist/chunks/{KeybindingProviderSetup-Dzg77_Xn.js → KeybindingProviderSetup-syiDgtpB.js} +1 -1
  15. package/dist/chunks/{MCPConnectionManager-CBY8nqdU.js → MCPConnectionManager-C7RmKzJh.js} +1 -1
  16. package/dist/chunks/{MCPToolListView-C7HT6rrl.js → MCPToolListView-CewNLJus.js} +1 -1
  17. package/dist/chunks/{McpParsingWarnings-Dj_Fu5o-.js → McpParsingWarnings-Czze2JPd.js} +1 -1
  18. package/dist/chunks/{MessageSelector-Dw_ERK_Z.js → MessageSelector-Kc6JlnDX.js} +1 -1
  19. package/dist/chunks/{Messages-RBfRELKn.js → Messages-BvFYO4Zn.js} +1 -1
  20. package/dist/chunks/{Onboarding-BRSXxc2E.js → Onboarding-CD_Uv5h9.js} +1 -1
  21. package/dist/chunks/{PromptInputFooterSuggestions-ChpyD9B7.js → PromptInputFooterSuggestions-CHXJsTtQ.js} +1 -1
  22. package/dist/chunks/{PromptInputHelpMenu-CrTT8MKE.js → PromptInputHelpMenu-BZIVCV7V.js} +1 -1
  23. package/dist/chunks/{ProviderSetup-BEV95bnz.js → ProviderSetup-CwMvjmjh.js} +1 -1
  24. package/dist/chunks/{QueryEngine-BBBkZWu2.js → QueryEngine-DAwfp_ht.js} +1 -1
  25. package/dist/chunks/{REPL-BDnZnm__.js → REPL-CtFtb35A.js} +4 -4
  26. package/dist/chunks/REPL-tFT1FGQF.js +1 -0
  27. package/dist/chunks/{ResumeConversation-BuSqBrm1.js → ResumeConversation-CERzSBvg.js} +1 -1
  28. package/dist/chunks/SearchExtraToolsTool-ndh4aEwQ.js +1 -0
  29. package/dist/chunks/{Settings-DYKmPdbd.js → Settings-CPaqWNdP.js} +2 -2
  30. package/dist/chunks/{Spinner-DOI8qqZi.js → Spinner-C0qHjfIY.js} +1 -1
  31. package/dist/chunks/{TextInput-ZKU-x_FD.js → TextInput-ou7ZhpVY.js} +1 -1
  32. package/dist/chunks/{ThemePicker-B69oDgXN.js → ThemePicker-CVFWqSc7.js} +1 -1
  33. package/dist/chunks/{TrustDialog-BSG8Ibh8.js → TrustDialog-CGXv_LF4.js} +1 -1
  34. package/dist/chunks/{ValidationErrorsList-BUYHEft4.js → ValidationErrorsList-CKeHoN2Z.js} +1 -1
  35. package/dist/chunks/{_baseEach-P0u1zIx6.js → _baseEach-BYhqv77g.js} +1 -1
  36. package/dist/chunks/{add-dir-C8RmmyQK.js → add-dir-BSizpuef.js} +1 -1
  37. package/dist/chunks/{agentDisplay-np7CH47m.js → agentDisplay-JKfYFD1m.js} +1 -1
  38. package/dist/chunks/{agents-DRQlR5M1.js → agents-BDTCH6YB.js} +1 -1
  39. package/dist/chunks/{agents-DedoH0Q4.js → agents-MEaV8P2G.js} +1 -1
  40. package/dist/chunks/{allErrors-DvcU0w0F.js → allErrors-Dhnf6rqg.js} +1 -1
  41. package/dist/chunks/{appleTerminalBackup-Bemd4RXh.js → appleTerminalBackup-CN8kS74J.js} +1 -1
  42. package/dist/chunks/backgroundHousekeeping-Bu-zRFCx.js +1 -0
  43. package/dist/chunks/{backgroundHousekeeping-BtEJ6TeC.js → backgroundHousekeeping-CsXlkIg3.js} +1 -1
  44. package/dist/chunks/{banner-CuoceXzz.js → banner-BKOzHotb.js} +1 -1
  45. package/dist/chunks/{branch-ClhlS7f8.js → branch-BllXcYwS.js} +1 -1
  46. package/dist/chunks/bridgeControl-aDnUrYZR.js +2 -0
  47. package/dist/chunks/{btw-B-FLxlx-.js → btw-DzaRBa6o.js} +1 -1
  48. package/dist/chunks/caches-CMF-MmR-.js +1 -0
  49. package/dist/chunks/{caches-Dn8yrJmL.js → caches-CW5YnYNS.js} +1 -1
  50. package/dist/chunks/channel-DVx21qde.js +1 -0
  51. package/dist/chunks/channel-Gw6skpUh.js +1 -0
  52. package/dist/chunks/{clear-BnWv0i65.js → clear-CDQs9_5P.js} +1 -1
  53. package/dist/chunks/commands-CfYMwgP7.js +1 -0
  54. package/dist/chunks/{compact-Banc-SNk.js → compact-6F2tuItE.js} +1 -1
  55. package/dist/chunks/config-BDkzWBnL.js +1 -0
  56. package/dist/chunks/{config-BDn2YIjC.js → config-Bio2EjUK.js} +1 -1
  57. package/dist/chunks/config-C_AEhZrn.js +1 -0
  58. package/dist/chunks/{context-BvDBAyJ9.js → context-TkdzCK3Y.js} +1 -1
  59. package/dist/chunks/{context-noninteractive-CuHHniJn.js → context-noninteractive-BcBo64vo.js} +1 -1
  60. package/dist/chunks/context-noninteractive-oFcnY1Er.js +1 -0
  61. package/dist/chunks/{conversation-Cjaftrrw.js → conversation-CYZyg1U1.js} +1 -1
  62. package/dist/chunks/conversation-DXzlRhNw.js +1 -0
  63. package/dist/chunks/{conversationRecovery-NL05oJb1.js → conversationRecovery-_hWC7JBO.js} +1 -1
  64. package/dist/chunks/{crossProjectResume-BzltC4NJ.js → crossProjectResume-CCo3iZrB.js} +1 -1
  65. package/dist/chunks/{diff--6gQCx_x.js → diff-BzVUPO4Z.js} +1 -1
  66. package/dist/chunks/doctor-B4jQbGQr.js +1 -0
  67. package/dist/chunks/{entry-DWYOrkFS.js → entry-333L52Lo.js} +1 -1
  68. package/dist/chunks/{exit-uKtXb5U3.js → exit-D5DYnRvR.js} +1 -1
  69. package/dist/chunks/{extraUsage-Dr0YXm1w.js → extraUsage-CmgRR-zH.js} +1 -1
  70. package/dist/chunks/extractMemories-CVUrBFMj.js +1 -0
  71. package/dist/chunks/fast-CRhW9zha.js +1 -0
  72. package/dist/chunks/{fast-C5-lNCQi.js → fast-D7oNjaZ3.js} +1 -1
  73. package/dist/chunks/{fetchModelList-9w1E4Ue8.js → fetchModelList-Cv1vWIpC.js} +1 -1
  74. package/dist/chunks/fetchModelList-DIa1HwAJ.js +1 -0
  75. package/dist/chunks/{fileSuggestions-BYD78vcF.js → fileSuggestions-DF3HTRKr.js} +1 -1
  76. package/dist/chunks/{gemini-BNBptTET.js → gemini-ou7_YyXc.js} +1 -1
  77. package/dist/chunks/{generateSessionName-CO2484aJ.js → generateSessionName-CeN9EZNY.js} +1 -1
  78. package/dist/chunks/{goal-j0wdadwM.js → goal-CCxo4Wyf.js} +1 -1
  79. package/dist/chunks/{grok-BpO1ZwK_.js → grok-BMmUcNbI.js} +1 -1
  80. package/dist/chunks/{help-DwhA0qQ6.js → help-CYtogTZk.js} +1 -1
  81. package/dist/chunks/{hooks-DG4_WdZ2.js → hooks-ByVkvodY.js} +1 -1
  82. package/dist/chunks/hooks-CBGUcyCs.js +1 -0
  83. package/dist/chunks/{install-BbmCNCuM.js → install-DIxyfdXG.js} +1 -1
  84. package/dist/chunks/{instrumentation-DpPmDyNF.js → instrumentation-BmHivmxs.js} +3 -3
  85. package/dist/chunks/{job-GcmX1ALd.js → job-D534P26R.js} +1 -1
  86. package/dist/chunks/{launchLocalMemory-CDgT5lst.js → launchLocalMemory-CWXLb3KF.js} +1 -1
  87. package/dist/chunks/{launchOnboarding-uQ_ux9sS.js → launchOnboarding-CocPmwzz.js} +1 -1
  88. package/dist/chunks/loadAgentsDir-Zw648oQO.js +1 -0
  89. package/dist/chunks/{loadAgentsDir-uuZYOgKn.js → loadAgentsDir-bmpKLPdG.js} +343 -343
  90. package/dist/chunks/{loadPluginHooks-QoVXsBjy.js → loadPluginHooks-BIfM53-_.js} +1 -1
  91. package/dist/chunks/{localSearch-yVCDrVrf.js → localSearch-Da8cVYoI.js} +1 -1
  92. package/dist/chunks/localSearch-Dbj8cXyO.js +1 -0
  93. package/dist/chunks/{logoUtils-B4wCDKs9.js → logoUtils-qNuBc2nI.js} +1 -1
  94. package/dist/chunks/{magicDocs-D53lV8b5.js → magicDocs-BsEiBLQl.js} +1 -1
  95. package/dist/chunks/{main-fy_XSXGj.js → main-B31aPMPP.js} +6 -6
  96. package/dist/chunks/managedEnv-DCGLDTP_.js +1 -0
  97. package/dist/chunks/{managedEnv-B8YWmM4A.js → managedEnv-EZ2IirNa.js} +1 -1
  98. package/dist/chunks/{mcp-DCl-Tz-C.js → mcp-BMeWtYCx.js} +1 -1
  99. package/dist/chunks/{mcp--LmEVBRg.js → mcp-CYbesbfl.js} +1 -1
  100. package/dist/chunks/{mcp-CZUVaPb3.js → mcp-Dd8TBfQQ.js} +1 -1
  101. package/dist/chunks/{memory-Bu5ku7y9.js → memory-DtQQGyPS.js} +1 -1
  102. package/dist/chunks/{mode-Bteqe2QG.js → mode-SM8doWgC.js} +1 -1
  103. package/dist/chunks/{model-CHDU5yqH.js → model-C2r-PaR4.js} +1 -1
  104. package/dist/chunks/{model-CcHyMyBv.js → model-Dd3x121y.js} +1 -1
  105. package/dist/chunks/{modelOptions-CJV1R3Jt.js → modelOptions-BQL4gbNk.js} +1 -1
  106. package/dist/chunks/{nativeInstaller-CIUYh1aD.js → nativeInstaller-DMkZdsof.js} +1 -1
  107. package/dist/chunks/{notifications-GLnjirCl.js → notifications-BwS1XsnZ.js} +1 -1
  108. package/dist/chunks/{onChangeAppState-CxGW2d-l.js → onChangeAppState-C9cYQJPF.js} +1 -1
  109. package/dist/chunks/{openai-BpGQT2Iv.js → openai-Bea4I2Od.js} +1 -1
  110. package/dist/chunks/{overlayContext-7wgLio1O.js → overlayContext-C5WPACKC.js} +1 -1
  111. package/dist/chunks/{partition-djFY9gGI.js → partition-CKgWl7p4.js} +1 -1
  112. package/dist/chunks/{permissions-DNedQyLg.js → permissions-Dv_PCfY0.js} +1 -1
  113. package/dist/chunks/{pidLock-CFUBtZck.js → pidLock-CqkC3-nD.js} +2 -2
  114. package/dist/chunks/{plan-DI0n7LIV.js → plan-Ce6wfjjI.js} +1 -1
  115. package/dist/chunks/{plugin-BQ8gRVYF.js → plugin-aK4tDrVg.js} +1 -1
  116. package/dist/chunks/{pluginAutoupdate-CNrHb4RJ.js → pluginAutoupdate-ByokIVEs.js} +1 -1
  117. package/dist/chunks/{pluginBlocklist-CKCsgWdY.js → pluginBlocklist-ByRQaVPu.js} +1 -1
  118. package/dist/chunks/{pluginCliCommands-CACeyIwz.js → pluginCliCommands-Dyk4HYHs.js} +1 -1
  119. package/dist/chunks/{pluginFlagging-CUvkKGOB.js → pluginFlagging-B2ZX5_oB.js} +1 -1
  120. package/dist/chunks/{pluginOperations-Ca_T-HYn.js → pluginOperations-BCvJvfOC.js} +1 -1
  121. package/dist/chunks/{pluginStartupCheck-DftTiXct.js → pluginStartupCheck-QG0d95dE.js} +1 -1
  122. package/dist/chunks/pluginStartupCheck-o_TC7wIt.js +1 -0
  123. package/dist/chunks/{plugins-Divl-P-X.js → plugins-DzsTDNWJ.js} +1 -1
  124. package/dist/chunks/{print-DSHypGJa.js → print-dUT7E1g9.js} +2 -2
  125. package/dist/chunks/{processBashCommand-BLcFmbyG.js → processBashCommand-DtGCgTkF.js} +1 -1
  126. package/dist/chunks/{processSlashCommand-Caif46Gi.js → processSlashCommand-wXblpK2C.js} +1 -1
  127. package/dist/chunks/{projectOnboardingState-nTCycGCD.js → projectOnboardingState-D-_ijZnG.js} +1 -1
  128. package/dist/chunks/prompt-BdH2zk0S.js +1 -0
  129. package/dist/chunks/{prompt-BfXryFt-.js → prompt-BnDapYGL.js} +1 -1
  130. package/dist/chunks/prompt-D0TFER0A.js +1 -0
  131. package/dist/chunks/{protocolHandler-VigBkAQQ.js → protocolHandler-CJO3CRYW.js} +1 -1
  132. package/dist/chunks/{reconciler-B9XFdL4f.js → reconciler-C_HKsocm.js} +1 -1
  133. package/dist/chunks/{refresh-CBHbWTGg.js → refresh-Cm4jZzLa.js} +1 -1
  134. package/dist/chunks/{reject-CBxnwckZ.js → reject-Tug1RmkE.js} +1 -1
  135. package/dist/chunks/{reload-plugins-5eFWrQlL.js → reload-plugins-CL9LWzpq.js} +1 -1
  136. package/dist/chunks/{rename-Cw7cMerG.js → rename-OfKJSazJ.js} +1 -1
  137. package/dist/chunks/{resume-U2D0ybfU.js → resume-BZ42SpS2.js} +1 -1
  138. package/dist/chunks/{runtimeObserver-DOYlxx9H.js → runtimeObserver-BLq2guVy.js} +1 -1
  139. package/dist/chunks/{runtimeObserver-CWaYMJG8.js → runtimeObserver-DT5P2_XL.js} +2 -2
  140. package/dist/chunks/sandbox-adapter-982rx2cm.js +1 -0
  141. package/dist/chunks/{sandbox-toggle-BtiPyjT3.js → sandbox-toggle-DghmaJhK.js} +1 -1
  142. package/dist/chunks/searchExtraTools-B4N1bpy0.js +1 -0
  143. package/dist/chunks/{select-BuTJbu_Q.js → select-CaxQ-BVq.js} +1 -1
  144. package/dist/chunks/sessionFileAccessHooks-BqQ58T7e.js +1 -0
  145. package/dist/chunks/{sessionObserver-cfwD8pV8.js → sessionObserver-DBoZUvWL.js} +1 -1
  146. package/dist/chunks/sessionObserver-qYpA90El.js +1 -0
  147. package/dist/chunks/sessionStorage-CC0v4zMs.js +1 -0
  148. package/dist/chunks/{sessionTracing-DsdcOqvc.js → sessionTracing-5a7HDF4e.js} +1 -1
  149. package/dist/chunks/{setup-DR-KEmxL.js → setup-DVLnIlse.js} +2 -2
  150. package/dist/chunks/{shadowedRuleDetection-DiZUDzxU.js → shadowedRuleDetection-L3tnySui.js} +1 -1
  151. package/dist/chunks/{sideQuestion-CdgUarC2.js → sideQuestion-BJTVma-5.js} +1 -1
  152. package/dist/chunks/sinks-C9NdbjLo.js +1 -0
  153. package/dist/chunks/{sinks-Cy3NqVbk.js → sinks-CV0SWuZW.js} +1 -1
  154. package/dist/chunks/{skillChangeDetector-CVFCJcG7.js → skillChangeDetector-DlodgOyC.js} +1 -1
  155. package/dist/chunks/{skillGapStore-BJV8ZIB1.js → skillGapStore-Cposc03e.js} +2 -2
  156. package/dist/chunks/{skillLifecycle-iO_3s9Ff.js → skillLifecycle-RXQp0JU7.js} +2 -2
  157. package/dist/chunks/{skillSearchPanel-BL5gXTHU.js → skillSearchPanel-B2pjskqk.js} +2 -2
  158. package/dist/chunks/{skills-BEp3_RyT.js → skills-D2ZjMtv4.js} +1 -1
  159. package/dist/chunks/status-BcSkj9nE.js +1 -0
  160. package/dist/chunks/{statusNoticeHelpers-BoloSeXY.js → statusNoticeHelpers-DsrqBOQt.js} +1 -1
  161. package/dist/chunks/switcher-BietN6il.js +1 -0
  162. package/dist/chunks/{switcher-DSt2cVjA.js → switcher-rep86o4_.js} +1 -1
  163. package/dist/chunks/{tasks-DyBUXnQb.js → tasks-B4coTfrq.js} +1 -1
  164. package/dist/chunks/{templateJobs-BBnReWWj.js → templateJobs-C5ukh6H3.js} +1 -1
  165. package/dist/chunks/{terminalSetup-CDpFfqqV.js → terminalSetup-CaGbEVjB.js} +1 -1
  166. package/dist/chunks/{terminalSetup-DedaY1P7.js → terminalSetup-xe_P98fY.js} +1 -1
  167. package/dist/chunks/{theme-BZOy9Iqh.js → theme-7RmvErYJ.js} +1 -1
  168. package/dist/chunks/{tipRegistry-Cl5sdLRX.js → tipRegistry-BYpJZIjR.js} +1 -1
  169. package/dist/chunks/{toolEventObserver-ClwWmVbH.js → toolEventObserver-Dzwzi5Vi.js} +1 -1
  170. package/dist/chunks/{toolPool-DSTbgGmX.js → toolPool-BGfiNj6h.js} +1 -1
  171. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-ClN4NJnB.js → useExitOnCtrlCDWithKeybindings-BT0nexZw.js} +1 -1
  172. package/dist/chunks/useMainLoopModel-QuE7VkgX.js +1 -0
  173. package/dist/chunks/{useManagePlugins-CxHz-gUP.js → useManagePlugins-pGaGzsEg.js} +1 -1
  174. package/dist/chunks/{useMergedTools-BUuWew0-.js → useMergedTools-BLsIT3R_.js} +1 -1
  175. package/dist/chunks/{useSearchInput-BIQN_-Hm.js → useSearchInput-j12K4wEo.js} +1 -1
  176. package/dist/chunks/{useSettingsErrors-BDJCLei_.js → useSettingsErrors-C8VIzdws.js} +1 -1
  177. package/dist/chunks/{util-BHr5l6Bx.js → util-CCEK8oze.js} +1 -1
  178. package/dist/chunks/{validatePlugin-fx1Y8vam.js → validatePlugin-CTVnWx9H.js} +1 -1
  179. package/dist/chunks/{vim-CYjMtnwH.js → vim-BlO9V5_5.js} +1 -1
  180. package/dist/chunks/worktree-BWL0vR4o.js +1 -0
  181. package/dist/chunks/wrapper-B-Q3Illb.js +1 -0
  182. package/dist/chunks/{wrapper-K8ZapJVu.js → wrapper-DVKxC5fR.js} +1 -1
  183. package/dist/cli.js +1 -1
  184. package/package.json +2 -1
  185. package/dist/chunks/AgentsMdExternalIncludesDialog-CgSethgo.js +0 -1
  186. package/dist/chunks/Doctor-CiZNe_qx.js +0 -1
  187. package/dist/chunks/REPL-BHk0vZDf.js +0 -1
  188. package/dist/chunks/SearchExtraToolsTool-CdWB9sO8.js +0 -1
  189. package/dist/chunks/backgroundHousekeeping-B56nFTzq.js +0 -1
  190. package/dist/chunks/caches-D7arwhaa.js +0 -1
  191. package/dist/chunks/commands-AcfFLgl5.js +0 -1
  192. package/dist/chunks/config-BhBcadjZ.js +0 -1
  193. package/dist/chunks/config-Bm5pVdCq.js +0 -1
  194. package/dist/chunks/context-noninteractive-BK2IDLSS.js +0 -1
  195. package/dist/chunks/conversation-B2dX3X4Z.js +0 -1
  196. package/dist/chunks/doctor-CQf8xPZH.js +0 -1
  197. package/dist/chunks/extractMemories-8yvMGZ1J.js +0 -1
  198. package/dist/chunks/fast-aNkj6WvB.js +0 -1
  199. package/dist/chunks/fetchModelList-D2quBF6M.js +0 -1
  200. package/dist/chunks/hooks-B5Wq-KxE.js +0 -1
  201. package/dist/chunks/loadAgentsDir-BBbIAiay.js +0 -1
  202. package/dist/chunks/localSearch-D6MhwvnR.js +0 -1
  203. package/dist/chunks/managedEnv-ulQBH73B.js +0 -1
  204. package/dist/chunks/pluginStartupCheck-Du9yx2P8.js +0 -1
  205. package/dist/chunks/prompt-BZmu5CeK.js +0 -1
  206. package/dist/chunks/prompt-Cogr_WZr.js +0 -1
  207. package/dist/chunks/sandbox-adapter-Df7Wpt77.js +0 -1
  208. package/dist/chunks/searchExtraTools-CbJVb_Zk.js +0 -1
  209. package/dist/chunks/sessionFileAccessHooks-_mxyfQmn.js +0 -1
  210. package/dist/chunks/sessionObserver-BZVgzp3W.js +0 -1
  211. package/dist/chunks/sessionStorage-SC5RfnUP.js +0 -1
  212. package/dist/chunks/sinks-D41OiGE4.js +0 -1
  213. package/dist/chunks/status-6JMz8jmM.js +0 -1
  214. package/dist/chunks/switcher-95d4TrQH.js +0 -1
  215. package/dist/chunks/useMainLoopModel-Bgxpmn2Q.js +0 -1
  216. package/dist/chunks/worktree-CGu_58ue.js +0 -1
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Bt as t,di as n,fi as r,j as i,t as a}from"./src-BX54x08P.js";import{Xt as o,_n as s,qt as c,vn as l,xn as u}from"./settings-D4M13toi.js";import{C as d,I as f,S as p,x as m,z as h}from"./debug-2pVES-2G.js";import{d as g,h as _,o as v}from"./config-BDn2YIjC.js";import{o as ee,s as y}from"./log-L1kqxa_P.js";import{i as b,t as x}from"./execFileNoThrow-DXSEj8ZO.js";import{i as S,o as C}from"./bundledMode-D9omqD3L.js";import{i as w,r as T}from"./projectOnboardingState-nTCycGCD.js";import{a as E,i as D,n as O,r as k,t as A}from"./appleTerminalBackup-Bemd4RXh.js";import{homedir as j,platform as M}from"os";import{dirname as te,join as N}from"path";import{randomBytes as P}from"crypto";import{copyFile as F,mkdir as I,readFile as L,writeFile as R}from"fs/promises";import{pathToFileURL as z}from"url";function B(){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 V(){return!c.terminal||!(c.terminal in $)?null:$[c.terminal]??null}function H(e){return t()?`\x1b]8;;${z(e).href}\x07${e}\x1b]8;;\x07`:e}function U(){return M()===`darwin`&&c.terminal===`Apple_Terminal`||c.terminal===`vscode`||c.terminal===`cursor`||c.terminal===`windsurf`||c.terminal===`alacritty`||c.terminal===`zed`}async function W(e){let t=``;switch(c.terminal){case`Apple_Terminal`:t=await ne(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 re(e);break;case`zed`:t=await ie(e);break;case null:break}return _(e=>[`vscode`,`cursor`,`windsurf`,`alacritty`,`zed`].includes(c.terminal??``)?e.shiftEnterKeyBindingInstalled===!0?e:{...e,shiftEnterKeyBindingInstalled:!0}:c.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled===!0?e:{...e,optionAsMetaKeyInstalled:!0}:e),w(),t}function G(){return v().shiftEnterKeyBindingInstalled===!0}function K(){return v().hasUsedBackslashReturn===!0}function q(){v().hasUsedBackslashReturn||_(e=>({...e,hasUsedBackslashReturn:!0}))}async function J(e,t,r){if(c.terminal&&c.terminal in $)return e(`Shift+Enter is natively supported in ${$[c.terminal]}.
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Bt as t,di as n,fi as r,j as i,t as a}from"./src-BX54x08P.js";import{Xt as o,_n as s,qt as c,vn as l,xn as u}from"./settings-D4M13toi.js";import{C as d,I as f,S as p,x as m,z as h}from"./debug-2pVES-2G.js";import{d as g,h as _,o as v}from"./config-Bio2EjUK.js";import{o as ee,s as y}from"./log-L1kqxa_P.js";import{i as b,t as x}from"./execFileNoThrow-DXSEj8ZO.js";import{i as S,o as C}from"./bundledMode-D9omqD3L.js";import{i as w,r as T}from"./projectOnboardingState-D-_ijZnG.js";import{a as E,i as D,n as O,r as k,t as A}from"./appleTerminalBackup-CN8kS74J.js";import{homedir as j,platform as M}from"os";import{dirname as te,join as N}from"path";import{randomBytes as P}from"crypto";import{copyFile as F,mkdir as I,readFile as L,writeFile as R}from"fs/promises";import{pathToFileURL as z}from"url";function B(){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 V(){return!c.terminal||!(c.terminal in $)?null:$[c.terminal]??null}function H(e){return t()?`\x1b]8;;${z(e).href}\x07${e}\x1b]8;;\x07`:e}function U(){return M()===`darwin`&&c.terminal===`Apple_Terminal`||c.terminal===`vscode`||c.terminal===`cursor`||c.terminal===`windsurf`||c.terminal===`alacritty`||c.terminal===`zed`}async function W(e){let t=``;switch(c.terminal){case`Apple_Terminal`:t=await ne(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 re(e);break;case`zed`:t=await ie(e);break;case null:break}return _(e=>[`vscode`,`cursor`,`windsurf`,`alacritty`,`zed`].includes(c.terminal??``)?e.shiftEnterKeyBindingInstalled===!0?e:{...e,shiftEnterKeyBindingInstalled:!0}:c.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled===!0?e:{...e,optionAsMetaKeyInstalled:!0}:e),w(),t}function G(){return v().shiftEnterKeyBindingInstalled===!0}function K(){return v().hasUsedBackslashReturn===!0}function q(){v().hasUsedBackslashReturn||_(e=>({...e,hasUsedBackslashReturn:!0}))}async function J(e,t,r){if(c.terminal&&c.terminal in $)return e(`Shift+Enter is natively supported in ${$[c.terminal]}.
2
2
 
3
3
  No configuration needed. Just use Shift+Enter to add newlines.`),null;if(!U()){let t=c.terminal||`your current terminal`,r=S(),i=``;return r===`macos`?i=` • macOS: Apple Terminal
4
4
  `:r===`windows`&&(i=` • Windows: Windows Terminal
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{H as t,t as n,x as r}from"./src-BX54x08P.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{n as a,t as o}from"./ThemePicker-B69oDgXN.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
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{H as t,t as n,x as r}from"./src-BX54x08P.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{n as a,t as o}from"./ThemePicker-CVFWqSc7.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,2 +1,2 @@
1
- import{n as e,t}from"./memoize-BK3gG5ob.js";import{l as n,o as r}from"./envUtils-QyzA_cFM.js";import{di as i,fi as a,j as o,t as s}from"./src-BX54x08P.js";import{Gr as c,Jt as l,Kr as u,Ur as d,Xt as f,d as p,m,qr as h,qt as g,t as _}from"./settings-D4M13toi.js";import{Pt as v,at as y}from"./state-CXY-q5gr.js";import{$a as b,$h as x,Gv as S,Hv as C,Ya as w,_x as T,ab as E,ag as ee,fo as te,gr as ne,mC as D,ob as O,pC as k,uo as A,vr as j,yx as M}from"./loadAgentsDir-uuZYOgKn.js";import{n as N,t as P}from"./cwd-DrEEb4f5.js";import{c as F,i as I}from"./debug-2pVES-2G.js";import{a as L,d as R,h as z,l as B,m as V,o as H}from"./config-BDn2YIjC.js";import{r as U,t as W}from"./execa-CBhG1doD.js";import{o as G,s as K}from"./log-L1kqxa_P.js";import{i as q,n as J}from"./execFileNoThrow-DXSEj8ZO.js";import{i as Y,o as re}from"./bundledMode-D9omqD3L.js";import{Mt as X,Pt as ie}from"./model-CcHyMyBv.js";import{c as ae,i as oe}from"./terminalSetup-DedaY1P7.js";I(),G(),q(),h(),k(),U(),t(),v(),R(),N(),f(),r();async function se(){}e(e=>({deviceId:B(),sessionId:y(),email:void 0,appVersion:`0.0.27`,platform:l(),userType:process.env.USER_TYPE,...n(process.env.GITHUB_ACTIONS)&&{githubActionsMetadata:{actor:process.env.GITHUB_ACTOR,actorId:process.env.GITHUB_ACTOR_ID,repository:process.env.GITHUB_REPOSITORY,repositoryId:process.env.GITHUB_REPOSITORY_ID,repositoryOwner:process.env.GITHUB_REPOSITORY_OWNER,repositoryOwnerId:process.env.GITHUB_REPOSITORY_OWNER_ID}}}));var ce=e(async()=>{let e=await W(`git config --get user.email`,{shell:!0,reject:!1,cwd:P()});return e.exitCode===0&&e.stdout?e.stdout.trim():void 0});t(),N(),R(),f();var le=[/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,/\.generated\./,/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,/\.(?:min\.js|min\.css|map|pyc|pyo)$/,/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,/(?:^|\/)\.(?:github|vscode|idea|claude)\//,/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i];function ue(e){return!le.some(t=>t.test(e))}function de(e,t){let n=[],r=new Set,i=new Map;for(let a=1;n.length<t&&a<=t;a++)for(let o of e){if(n.length>=t)break;if(!ue(o))continue;let e=Math.max(o.lastIndexOf(`/`),o.lastIndexOf(`\\`)),s=e>=0?o.slice(e+1):o;if(!s||r.has(s))continue;let c=e>=0?o.slice(0,e):`.`;(i.get(c)??0)>=a||(n.push(s),r.add(s),i.set(c,(i.get(c)??0)+1))}return n.length>=t?n:[]}async function fe(){if(g.platform===`win32`||!await d())return[];try{let e=await ce(),t=[`log`,`-n`,`1000`,`--pretty=format:`,`--name-only`,`--diff-filter=M`],n=new Map,r=e=>{for(let t of e.split(`
1
+ import{n as e,t}from"./memoize-BK3gG5ob.js";import{l as n,o as r}from"./envUtils-QyzA_cFM.js";import{di as i,fi as a,j as o,t as s}from"./src-BX54x08P.js";import{Gr as c,Jt as l,Kr as u,Ur as d,Xt as f,d as p,m,qr as h,qt as g,t as _}from"./settings-D4M13toi.js";import{Pt as v,at as y}from"./state-CXY-q5gr.js";import{$a as b,$h as x,Gv as S,Hv as C,Ya as w,_x as T,ab as E,ag as ee,fo as te,gr as ne,mC as D,ob as O,pC as k,uo as A,vr as j,yx as M}from"./loadAgentsDir-bmpKLPdG.js";import{n as N,t as P}from"./cwd-DrEEb4f5.js";import{c as F,i as I}from"./debug-2pVES-2G.js";import{a as L,d as R,h as z,l as B,m as V,o as H}from"./config-Bio2EjUK.js";import{r as U,t as W}from"./execa-CBhG1doD.js";import{o as G,s as K}from"./log-L1kqxa_P.js";import{i as q,n as J}from"./execFileNoThrow-DXSEj8ZO.js";import{i as Y,o as re}from"./bundledMode-D9omqD3L.js";import{Mt as X,Pt as ie}from"./model-Dd3x121y.js";import{c as ae,i as oe}from"./terminalSetup-xe_P98fY.js";I(),G(),q(),h(),k(),U(),t(),v(),R(),N(),f(),r();async function se(){}e(e=>({deviceId:B(),sessionId:y(),email:void 0,appVersion:`0.0.28`,platform:l(),userType:process.env.USER_TYPE,...n(process.env.GITHUB_ACTIONS)&&{githubActionsMetadata:{actor:process.env.GITHUB_ACTOR,actorId:process.env.GITHUB_ACTOR_ID,repository:process.env.GITHUB_REPOSITORY,repositoryId:process.env.GITHUB_REPOSITORY_ID,repositoryOwner:process.env.GITHUB_REPOSITORY_OWNER,repositoryOwnerId:process.env.GITHUB_REPOSITORY_OWNER_ID}}}));var ce=e(async()=>{let e=await W(`git config --get user.email`,{shell:!0,reject:!1,cwd:P()});return e.exitCode===0&&e.stdout?e.stdout.trim():void 0});t(),N(),R(),f();var le=[/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,/\.generated\./,/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,/\.(?:min\.js|min\.css|map|pyc|pyo)$/,/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,/(?:^|\/)\.(?:github|vscode|idea|claude)\//,/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i];function ue(e){return!le.some(t=>t.test(e))}function de(e,t){let n=[],r=new Set,i=new Map;for(let a=1;n.length<t&&a<=t;a++)for(let o of e){if(n.length>=t)break;if(!ue(o))continue;let e=Math.max(o.lastIndexOf(`/`),o.lastIndexOf(`\\`)),s=e>=0?o.slice(e+1):o;if(!s||r.has(s))continue;let c=e>=0?o.slice(0,e):`.`;(i.get(c)??0)>=a||(n.push(s),r.add(s),i.set(c,(i.get(c)??0)+1))}return n.length>=t?n:[]}async function fe(){if(g.platform===`win32`||!await d())return[];try{let e=await ce(),t=[`log`,`-n`,`1000`,`--pretty=format:`,`--name-only`,`--diff-filter=M`],n=new Map,r=e=>{for(let t of e.split(`
2
2
  `)){let e=t.trim();e&&n.set(e,(n.get(e)??0)+1)}};if(e){let{stdout:n}=await J(`git`,[...t,`--author=${e}`],{cwd:P()});r(n)}if(n.size<10){let{stdout:e}=await J(u(),t,{cwd:P()});r(e)}return de(Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e])=>e),5)}catch(e){return K(e),[]}}var pe=10080*60*1e3,me=e(()=>{let e=L(),t=e.exampleFiles?.length?D(e.exampleFiles):`<filepath>`;return`Try "${D([`fix lint errors`,`fix typecheck errors`,`how does ${t} work?`,`refactor ${t}`,`how do I log an error?`,`edit ${t} to...`,`write a test for ${t}`,`create a util logging.py that...`])}"`}),he=e(async()=>{let e=L();Date.now()-(e.exampleFilesGeneratedAt??0)>pe&&(e.exampleFiles=[]),e.exampleFiles?.length||fe().then(e=>{e.length&&V(t=>({...t,exampleFiles:e,exampleFilesGeneratedAt:Date.now()}))})});ie();var ge={"claude-3-opus":{modelName:`Work Mate 3 Opus`,retirementDates:{firstParty:`January 5, 2026`,bedrock:`January 15, 2026`,vertex:`January 5, 2026`,foundry:`January 5, 2026`}},"claude-3-7-sonnet":{modelName:`Work Mate 3.7 Sonnet`,retirementDates:{firstParty:`February 19, 2026`,bedrock:`April 28, 2026`,vertex:`May 11, 2026`,foundry:`February 19, 2026`}},"claude-3-5-haiku":{modelName:`Work Mate 3.5 Haiku`,retirementDates:{firstParty:`February 19, 2026`,bedrock:null,vertex:null,foundry:null}}};function _e(e){let t=e.toLowerCase(),n=X();for(let[e,r]of Object.entries(ge)){let i=r.retirementDates[n];if(!(!t.includes(e)||!i))return{isDeprecated:!0,modelName:r.modelName,retirementDate:i}}return{isDeprecated:!1}}function ve(e){if(!e)return null;let t=_e(e);return t.isDeprecated?`⚠ ${t.modelName} will be retired on ${t.retirementDate}. Consider switching to a newer model.`:null}a(),s(),re(),m(),M(),O(),S(),ee(),A(),w(),ne(),oe(),R();function ye(e){let t=H().numStartups;z(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function Z(e){let t=H(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}R(),f(),h();var Q;async function be(){return Q===void 0&&(Q=T in await te()),Q}async function $(e,t,n){if(!await be()||b(`${e}@claude-plugins-official`))return!1;let{bashTools:r}=t??{};return!!(n.cli&&r?.size&&n.cli.some(e=>r.has(e))||n.filePath&&t?.readFileState&&C(t.readFileState).some(e=>n.filePath.test(e)))}var xe=[{id:`new-user-warmup`,content:async()=>`Start with small features or bug fixes, tell Work Mate to propose a plan, and verify its suggested edits`,cooldownSessions:3,async isRelevant(){return H().numStartups<10}},{id:`plan-mode-for-complex-tasks`,content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${E(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let e=H();return(e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0)>7}},{id:`default-permission-mode-config`,content:async()=>`Use /config to change your default permission mode (including Plan Mode)`,cooldownSessions:10,isRelevant:async()=>{try{let e=H(),t=p(),n=!!e.lastPlanModeUse,r=!!t?.permissions?.defaultMode;return n&&!r}catch(e){return F(`Failed to check default-permission-mode-config tip relevance: ${e}`,{level:`warn`}),!1}}},{id:`git-worktrees`,content:async()=>`Use git worktrees to run multiple Work Mate sessions in parallel.`,cooldownSessions:10,isRelevant:async()=>{try{let e=H();return await c()<=1&&e.numStartups>50}catch{return!1}}},{id:`terminal-setup`,content:async()=>g.terminal===`Apple_Terminal`?`Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more`:`Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more`,cooldownSessions:10,async isRelevant(){let e=H();return g.terminal===`Apple_Terminal`?!e.optionAsMetaKeyInstalled:!e.shiftEnterKeyBindingInstalled}},{id:`shift-enter`,content:async()=>g.terminal===`Apple_Terminal`?`Press Option+Enter to send a multi-line message`:`Press Shift+Enter to send a multi-line message`,cooldownSessions:10,async isRelevant(){let e=H();return!!((g.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)&&e.numStartups>3)}},{id:`shift-enter-setup`,content:async()=>g.terminal===`Apple_Terminal`?`Run /terminal-setup to enable Option+Enter for new lines`:`Run /terminal-setup to enable Shift+Enter for new lines`,cooldownSessions:10,async isRelevant(){if(!ae())return!1;let e=H();return!(g.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)}},{id:`memory-command`,content:async()=>`Use /memory to view and manage Work Mate memory`,cooldownSessions:15,async isRelevant(){return H().memoryUsageCount<=0}},{id:`theme-command`,content:async()=>`Use /theme to change the color theme`,cooldownSessions:20,isRelevant:async()=>!0},{id:`colorterm-truecolor`,content:async()=>`Try setting environment variable COLORTERM=truecolor for richer colors`,cooldownSessions:30,isRelevant:async()=>!process.env.COLORTERM&&i.level<3},{id:`powershell-tool-env`,content:async()=>`Set WORKMATE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)`,cooldownSessions:10,isRelevant:async()=>Y()===`windows`&&process.env.WORKMATE_USE_POWERSHELL_TOOL===void 0},{id:`status-line`,content:async()=>`Use /statusline to set up a custom status line that will display beneath the input box`,cooldownSessions:25,isRelevant:async()=>p().statusLine===void 0},{id:`prompt-queue`,content:async()=>`Hit Enter to queue up additional messages while Work Mate is working.`,cooldownSessions:5,async isRelevant(){return H().promptQueueUseCount<=3}},{id:`enter-to-steer-in-relatime`,content:async()=>`Send messages to Work Mate while it works to steer Work Mate in real-time`,cooldownSessions:20,isRelevant:async()=>!0},{id:`todo-list`,content:async()=>`Ask Work Mate to create a todo list when working on complex tasks to track progress and remain on track`,cooldownSessions:20,isRelevant:async()=>!0},{id:`permissions`,content:async()=>`Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools`,cooldownSessions:10,async isRelevant(){return H().numStartups>10}},{id:`drag-and-drop-images`,content:async()=>`Did you know you can drag and drop image files into your terminal?`,cooldownSessions:10,isRelevant:async()=>!g.isSSH()},{id:`paste-images-mac`,content:async()=>`Paste images into Work Mate using control+v (not cmd+v!)`,cooldownSessions:10,isRelevant:async()=>Y()===`macos`},{id:`double-esc`,content:async()=>`Double-tap esc to rewind the conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>!x()},{id:`double-esc-code-restore`,content:async()=>`Double-tap esc to rewind the code and/or conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>x()},{id:`continue`,content:async()=>`Run claude --continue or claude --resume to resume a conversation`,cooldownSessions:10,isRelevant:async()=>!0},{id:`rename-conversation`,content:async()=>`Name your conversations with /rename to find them easily in /resume later`,cooldownSessions:15,isRelevant:async()=>j()&&H().numStartups>10},{id:`custom-commands`,content:async()=>`Create skills by adding .md files to .workmate/skills/ in your project or ~/.workmate/skills/ for skills that work in any project`,cooldownSessions:15,async isRelevant(){return H().numStartups>10}},{id:`shift-tab`,content:async()=>`Hit ${E(`chat:cycleMode`,`Chat`,`shift+tab`)} to cycle between default, accept edits, plan, auto, and bypass modes`,cooldownSessions:10,isRelevant:async()=>!0},{id:`image-paste`,content:async()=>`Use ${E(`chat:imagePaste`,`Chat`,`ctrl+v`)} to paste images from your clipboard`,cooldownSessions:20,isRelevant:async()=>!0},{id:`custom-agents`,content:async()=>`Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer`,cooldownSessions:15,async isRelevant(){return H().numStartups>5}},{id:`agent-flag`,content:async()=>`Use --agent <agent_name> to directly start a conversation with a subagent`,cooldownSessions:15,async isRelevant(){return H().numStartups>5}},{id:`frontend-design-plugin`,content:async e=>`Working with HTML/CSS? Install the frontend-design plugin:\n${o(`suggestion`,e?.theme??`dark`)(`/plugin install frontend-design@${T}`)}`,cooldownSessions:3,isRelevant:async e=>$(`frontend-design`,e,{filePath:/\.(html|css|htm)$/i})},{id:`vercel-plugin`,content:async e=>`Working with Vercel? Install the vercel plugin:\n${o(`suggestion`,e?.theme??`dark`)(`/plugin install vercel@${T}`)}`,cooldownSessions:3,isRelevant:async e=>$(`vercel`,e,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:[`vercel`]})},{id:`subagent-fanout-nudge`,content:async e=>`Say ${o(`suggestion`,e?.theme??`dark`)(`"fan out subagents"`)} and Work Mate sends a team. Each one digs deep so nothing gets missed.`,cooldownSessions:3,isRelevant:async()=>!1}],Se=[];function Ce(){let e=_().spinnerTipsOverride;return e?.tips?.length?e.tips.map((e,t)=>({id:`custom-tip-${t}`,content:async()=>e,cooldownSessions:0,isRelevant:async()=>!0})):[]}async function we(e){let t=_().spinnerTipsOverride,n=Ce();if(t?.excludeDefault&&n.length>0)return n;let r=[...xe,...Se],i=await Promise.all(r.map(t=>t.isRelevant?.(e)??Promise.resolve(!0)));return[...r.filter((e,t)=>i[t]).filter(e=>Z(e.id)>=e.cooldownSessions),...n]}export{me as a,ve as i,Z as n,he as o,ye as r,se as s,we as t};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,i as n}from"./debug-2pVES-2G.js";import{o as r,s as i}from"./log-L1kqxa_P.js";import{r as a,t as o}from"./observationStore-pnSSxec_.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-DnJHynXv.js`),import(`./featureCheck-JOur3pHb.js`),import(`./runtimeObserver-DOYlxx9H.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};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,i as n}from"./debug-2pVES-2G.js";import{o as r,s as i}from"./log-L1kqxa_P.js";import{r as a,t as o}from"./observationStore-pnSSxec_.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-DnJHynXv.js`),import(`./featureCheck-JOur3pHb.js`),import(`./runtimeObserver-BLq2guVy.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};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$d as t,dC as n,ef as r,fC as i}from"./loadAgentsDir-uuZYOgKn.js";import{n as a,t as o}from"./partition-djFY9gGI.js";function s(e,t,n){let[o,s]=a(i([...e,...t],`name`),r),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
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$d as t,dC as n,ef as r,fC as i}from"./loadAgentsDir-bmpKLPdG.js";import{n as a,t as o}from"./partition-CKgWl7p4.js";function s(e,t,n){let[o,s]=a(i([...e,...t],`name`),r),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{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as n,ai as r,et as i,t as a,vt as o}from"./src-BX54x08P.js";import{tb as s}from"./loadAgentsDir-uuZYOgKn.js";import{t as c}from"./useDoublePress-zA5QwIpO.js";function l(e,t,n,r=!0){let{exit:a}=o(),[s,c]=(0,u.useState)({pending:!1,keyName:null}),l=(0,u.useMemo)(()=>n??a,[n,a]),d=i(e=>c({pending:e,keyName:`Ctrl-C`}),l),f=i(e=>c({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}),s}var u,d=e((()=>{u=t(r(),1),a(),c()}));function f(e,t,r){return l(n,t,e,r)}var p=e((()=>{s(),d()}));export{f as n,p as t};
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as n,ai as r,et as i,t as a,vt as o}from"./src-BX54x08P.js";import{tb as s}from"./loadAgentsDir-bmpKLPdG.js";import{t as c}from"./useDoublePress-zA5QwIpO.js";function l(e,t,n,r=!0){let{exit:a}=o(),[s,c]=(0,u.useState)({pending:!1,keyName:null}),l=(0,u.useMemo)(()=>n??a,[n,a]),d=i(e=>c({pending:e,keyName:`Ctrl-C`}),l),f=i(e=>c({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}),s}var u,d=e((()=>{u=t(r(),1),a(),c()}));function f(e,t,r){return l(n,t,e,r)}var p=e((()=>{s(),d()}));export{f as n,p as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Bh as t,zh as n}from"./loadAgentsDir-bmpKLPdG.js";import{f as r,i,v as a}from"./model-Dd3x121y.js";function o(){let e=t(e=>e.mainLoopModel);return a(t(e=>e.mainLoopModelForSession)??e??i())}var s=e((()=>{n(),r()}));export{o as n,s as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as t}from"./src-BX54x08P.js";import{$n as n,Qn as r,di as i,ui as a}from"./settings-D4M13toi.js";import{Bh as o,Fa as s,Go as c,Hh as l,Hm as u,Km as d,Ko as f,Pa as p,Wm as m,Xo as h,Zo as g,_f as _,c_ as v,qm as y,s_ as b,vf as x,zh as S}from"./loadAgentsDir-uuZYOgKn.js";import{I as C,V as w,c as T,i as E}from"./debug-2pVES-2G.js";import{o as D,s as O}from"./log-L1kqxa_P.js";import{n as k}from"./analytics-COpjZpvd.js";import{n as A,t as j}from"./notifications-GLnjirCl.js";import{n as M,r as N}from"./pluginFlagging-CUvkKGOB.js";import{t as P}from"./pluginBlocklist-CKCsgWdY.js";var F=e(t(),1);j(),k(),u(),S(),n(),E(),a(),C(),D(),h(),f(),b(),d(),_(),N(),p();function I({enabled:e=!0}={}){let t=l(),n=o(e=>e.plugins.needsRefresh),{addNotification:a}=A(),u=(0,F.useCallback)(async()=>{try{let{enabled:e,disabled:n,errors:i}=await s();await P();let o=M();Object.keys(o).length>0&&a({key:`plugin-delisted-flagged`,text:`Plugins flagged. Check /plugins`,color:`warning`,priority:`high`});let l=[],u=[];try{l=await c()}catch(e){let t=e instanceof Error?e.message:String(e);i.push({type:`generic-error`,source:`plugin-commands`,error:`Failed to load plugin commands: ${t}`})}try{u=await g()}catch(e){let t=e instanceof Error?e.message:String(e);i.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);i.push({type:`generic-error`,source:`plugin-hooks`,error:`Failed to load plugin hooks: ${t}`})}let d=(await Promise.all(e.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await x(e,i);return t&&(e.mcpServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0),f=(await Promise.all(e.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await y(e,i);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0);m(),t(t=>{let r=t.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),a=new Set(i.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!a.has(t)}),...i];return{...t,plugins:{...t.plugins,enabled:e,disabled:n,commands:l,errors:o}}}),T(`Loaded plugins - Enabled: ${e.length}, Disabled: ${n.length}, Commands: ${l.length}, Agents: ${u.length}, Errors: ${i.length}`);let p=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:n.length,inline_count:r(e,e=>e.source.endsWith(`@inline`)),marketplace_count:r(e,e=>!e.source.endsWith(`@inline`)),error_count:i.length,skill_count:l.length,agent_count:u.length,hook_count:p,mcp_count:d,lsp_count:f}}catch(e){let n=w(e);return O(n),T(`Error loading plugins: ${e}`),t(e=>{let t=e.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r={type:`generic-error`,source:`plugin-system`,error:n.message};return{...e,plugins:{...e.plugins,enabled:[],disabled:[],commands:[],errors:[...t,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}}},[t,a]);(0,F.useEffect)(()=>{e&&u().then(e=>{let{ant_enabled_names:t,...n}=e,r={...n,has_custom_plugin_cache_dir:!!process.env.WORKMATE_PLUGIN_CACHE_DIR};({...r,...t!==void 0&&{enabled_names:t}}),i(`info`,`tengu_plugins_loaded`,r)})},[u,e]),(0,F.useEffect)(()=>{!e||!n||a({key:`plugin-reload-pending`,text:`Plugins changed. Run /reload-plugins to activate.`,color:`suggestion`,priority:`low`})},[e,n,a])}export{I as t};
1
+ import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as t}from"./src-BX54x08P.js";import{$n as n,Qn as r,di as i,ui as a}from"./settings-D4M13toi.js";import{Bh as o,Fa as s,Go as c,Hh as l,Hm as u,Km as d,Ko as f,Pa as p,Wm as m,Xo as h,Zo as g,_f as _,c_ as v,qm as y,s_ as b,vf as x,zh as S}from"./loadAgentsDir-bmpKLPdG.js";import{I as C,V as w,c as T,i as E}from"./debug-2pVES-2G.js";import{o as D,s as O}from"./log-L1kqxa_P.js";import{n as k}from"./analytics-COpjZpvd.js";import{n as A,t as j}from"./notifications-BwS1XsnZ.js";import{n as M,r as N}from"./pluginFlagging-B2ZX5_oB.js";import{t as P}from"./pluginBlocklist-ByRQaVPu.js";var F=e(t(),1);j(),k(),u(),S(),n(),E(),a(),C(),D(),h(),f(),b(),d(),_(),N(),p();function I({enabled:e=!0}={}){let t=l(),n=o(e=>e.plugins.needsRefresh),{addNotification:a}=A(),u=(0,F.useCallback)(async()=>{try{let{enabled:e,disabled:n,errors:i}=await s();await P();let o=M();Object.keys(o).length>0&&a({key:`plugin-delisted-flagged`,text:`Plugins flagged. Check /plugins`,color:`warning`,priority:`high`});let l=[],u=[];try{l=await c()}catch(e){let t=e instanceof Error?e.message:String(e);i.push({type:`generic-error`,source:`plugin-commands`,error:`Failed to load plugin commands: ${t}`})}try{u=await g()}catch(e){let t=e instanceof Error?e.message:String(e);i.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);i.push({type:`generic-error`,source:`plugin-hooks`,error:`Failed to load plugin hooks: ${t}`})}let d=(await Promise.all(e.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await x(e,i);return t&&(e.mcpServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0),f=(await Promise.all(e.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await y(e,i);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0);m(),t(t=>{let r=t.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),a=new Set(i.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!a.has(t)}),...i];return{...t,plugins:{...t.plugins,enabled:e,disabled:n,commands:l,errors:o}}}),T(`Loaded plugins - Enabled: ${e.length}, Disabled: ${n.length}, Commands: ${l.length}, Agents: ${u.length}, Errors: ${i.length}`);let p=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:n.length,inline_count:r(e,e=>e.source.endsWith(`@inline`)),marketplace_count:r(e,e=>!e.source.endsWith(`@inline`)),error_count:i.length,skill_count:l.length,agent_count:u.length,hook_count:p,mcp_count:d,lsp_count:f}}catch(e){let n=w(e);return O(n),T(`Error loading plugins: ${e}`),t(e=>{let t=e.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r={type:`generic-error`,source:`plugin-system`,error:n.message};return{...e,plugins:{...e.plugins,enabled:[],disabled:[],commands:[],errors:[...t,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}}},[t,a]);(0,F.useEffect)(()=>{e&&u().then(e=>{let{ant_enabled_names:t,...n}=e,r={...n,has_custom_plugin_cache_dir:!!process.env.WORKMATE_PLUGIN_CACHE_DIR};({...r,...t!==void 0&&{enabled_names:t}}),i(`info`,`tengu_plugins_loaded`,r)})},[u,e]),(0,F.useEffect)(()=>{!e||!n||a({key:`plugin-reload-pending`,text:`Plugins changed. Run /reload-plugins to activate.`,color:`suggestion`,priority:`low`})},[e,n,a])}export{I as t};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as n}from"./src-BX54x08P.js";import{Cc as r,Dc as i}from"./loadAgentsDir-uuZYOgKn.js";import{n as a,t as o}from"./toolPool-DSTbgGmX.js";function s(e,t,n){return(0,c.useMemo)(()=>a(e,r(n,t),n.mode),[e,t,n,!1,!1])}var c,l=e((()=>{c=t(n(),1),i(),o()}));export{s as n,l as t};
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as n}from"./src-BX54x08P.js";import{Cc as r,Dc as i}from"./loadAgentsDir-bmpKLPdG.js";import{n as a,t as o}from"./toolPool-BGfiNj6h.js";function s(e,t,n){return(0,c.useMemo)(()=>a(e,r(n,t),n.mode),[e,t,n,!1,!1])}var c,l=e((()=>{c=t(n(),1),i(),o()}));export{s as n,l as t};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Vn as n,ai as r,hn as i,ot as a,t as o}from"./src-BX54x08P.js";import{sb as s}from"./loadAgentsDir-uuZYOgKn.js";import{_ as c,b as l,d as u,g as d,h as f,l as p,u as m,v as h,y as g}from"./TextInput-ZKU-x_FD.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:r,onExitUp:o,columns:s,passthroughCtrlKeys:u=[],initialQuery:y=``,backspaceExitsOnEmpty:S=!0}){let{columns:C}=a(),w=s??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=n=>{if(!e)return;let i=p.fromText(T,w,D);if(!(n.ctrl&&u.includes(n.key.toLowerCase()))){if(_(n)||c(),v(n)||h(),n.key===`return`||n.key===`down`){n.preventDefault(),t();return}if(n.key===`up`){n.preventDefault(),o&&o();return}if(n.key===`escape`){n.preventDefault(),r?r():T.length>0?(E(``),O(0)):t();return}if(n.key===`backspace`){if(n.preventDefault(),n.meta){let{cursor:e,killed:t}=i.deleteWordBefore();f(t,`prepend`),E(e.text),O(e.offset);return}if(T.length===0){S&&(r??t)();return}let e=i.backspace();E(e.text),O(e.offset);return}if(n.key===`delete`){n.preventDefault();let e=i.del();E(e.text),O(e.offset);return}if(n.key===`left`&&(n.ctrl||n.meta||n.fn)){n.preventDefault();let e=i.prevWord();O(e.offset);return}if(n.key===`right`&&(n.ctrl||n.meta||n.fn)){n.preventDefault();let e=i.nextWord();O(e.offset);return}if(n.key===`left`){n.preventDefault();let e=i.left();O(e.offset);return}if(n.key===`right`){n.preventDefault();let e=i.right();O(e.offset);return}if(n.key===`home`){n.preventDefault(),O(0);return}if(n.key===`end`){n.preventDefault(),O(T.length);return}if(n.ctrl){switch(n.preventDefault(),n.key.toLowerCase()){case`a`:O(0);return;case`e`:O(T.length);return;case`b`:O(i.left().offset);return;case`f`:O(i.right().offset);return;case`d`:{if(T.length===0){(r??t)();return}let e=i.del();E(e.text),O(e.offset);return}case`h`:{if(T.length===0){S&&(r??t)();return}let e=i.backspace();E(e.text),O(e.offset);return}case`k`:{let{cursor:e,killed:t}=i.deleteToLineEnd();f(t,`append`),E(e.text),O(e.offset);return}case`u`:{let{cursor:e,killed:t}=i.deleteToLineStart();f(t,`prepend`),E(e.text),O(e.offset);return}case`w`:{let{cursor:e,killed:t}=i.deleteWordBefore();f(t,`prepend`),E(e.text),O(e.offset);return}case`y`:{let e=m();if(e.length>0){let t=i.offset,n=i.insert(e);d(t,e.length),E(n.text),O(n.offset)}return}case`g`:case`c`:if(r){r();return}}return}if(n.meta){switch(n.preventDefault(),n.key.toLowerCase()){case`b`:O(i.prevWord().offset);return;case`f`:O(i.nextWord().offset);return;case`d`:{let e=i.deleteWordAfter();E(e.text),O(e.offset);return}case`y`:{let e=l();if(e){let{text:t,start:n,length:r}=e,i=T.slice(0,n),a=T.slice(n+r),o=i+t+a,s=n+t.length;g(t.length),E(o),O(s)}return}}return}if(n.key!==`tab`&&n.key.length>=1&&!x.has(n.key)){n.preventDefault();let e=i.insert(n.key);E(e.text),O(e.offset)}}};return i((e,t,r)=>{A(new n(r.keypress))},{isActive:e}),{query:T,setQuery:k,cursorOffset:D,handleKeyDown:A}}var b,x,S=e((()=>{b=t(r(),1),o(),u(),s(),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};
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Vn as n,ai as r,hn as i,ot as a,t as o}from"./src-BX54x08P.js";import{sb as s}from"./loadAgentsDir-bmpKLPdG.js";import{_ as c,b as l,d as u,g as d,h as f,l as p,u as m,v as h,y as g}from"./TextInput-ou7ZhpVY.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:r,onExitUp:o,columns:s,passthroughCtrlKeys:u=[],initialQuery:y=``,backspaceExitsOnEmpty:S=!0}){let{columns:C}=a(),w=s??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=n=>{if(!e)return;let i=p.fromText(T,w,D);if(!(n.ctrl&&u.includes(n.key.toLowerCase()))){if(_(n)||c(),v(n)||h(),n.key===`return`||n.key===`down`){n.preventDefault(),t();return}if(n.key===`up`){n.preventDefault(),o&&o();return}if(n.key===`escape`){n.preventDefault(),r?r():T.length>0?(E(``),O(0)):t();return}if(n.key===`backspace`){if(n.preventDefault(),n.meta){let{cursor:e,killed:t}=i.deleteWordBefore();f(t,`prepend`),E(e.text),O(e.offset);return}if(T.length===0){S&&(r??t)();return}let e=i.backspace();E(e.text),O(e.offset);return}if(n.key===`delete`){n.preventDefault();let e=i.del();E(e.text),O(e.offset);return}if(n.key===`left`&&(n.ctrl||n.meta||n.fn)){n.preventDefault();let e=i.prevWord();O(e.offset);return}if(n.key===`right`&&(n.ctrl||n.meta||n.fn)){n.preventDefault();let e=i.nextWord();O(e.offset);return}if(n.key===`left`){n.preventDefault();let e=i.left();O(e.offset);return}if(n.key===`right`){n.preventDefault();let e=i.right();O(e.offset);return}if(n.key===`home`){n.preventDefault(),O(0);return}if(n.key===`end`){n.preventDefault(),O(T.length);return}if(n.ctrl){switch(n.preventDefault(),n.key.toLowerCase()){case`a`:O(0);return;case`e`:O(T.length);return;case`b`:O(i.left().offset);return;case`f`:O(i.right().offset);return;case`d`:{if(T.length===0){(r??t)();return}let e=i.del();E(e.text),O(e.offset);return}case`h`:{if(T.length===0){S&&(r??t)();return}let e=i.backspace();E(e.text),O(e.offset);return}case`k`:{let{cursor:e,killed:t}=i.deleteToLineEnd();f(t,`append`),E(e.text),O(e.offset);return}case`u`:{let{cursor:e,killed:t}=i.deleteToLineStart();f(t,`prepend`),E(e.text),O(e.offset);return}case`w`:{let{cursor:e,killed:t}=i.deleteWordBefore();f(t,`prepend`),E(e.text),O(e.offset);return}case`y`:{let e=m();if(e.length>0){let t=i.offset,n=i.insert(e);d(t,e.length),E(n.text),O(n.offset)}return}case`g`:case`c`:if(r){r();return}}return}if(n.meta){switch(n.preventDefault(),n.key.toLowerCase()){case`b`:O(i.prevWord().offset);return;case`f`:O(i.nextWord().offset);return;case`d`:{let e=i.deleteWordAfter();E(e.text),O(e.offset);return}case`y`:{let e=l();if(e){let{text:t,start:n,length:r}=e,i=T.slice(0,n),a=T.slice(n+r),o=i+t+a,s=n+t.length;g(t.length),E(o),O(s)}return}}return}if(n.key!==`tab`&&n.key.length>=1&&!x.has(n.key)){n.preventDefault();let e=i.insert(n.key);E(e.text),O(e.offset)}}};return i((e,t,r)=>{A(new n(r.keypress))},{isActive:e}),{query:T,setQuery:k,cursorOffset:D,handleKeyDown:A}}var b,x,S=e((()=>{b=t(r(),1),o(),u(),s(),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};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as n}from"./src-BX54x08P.js";import{Gh as r,Kh as i}from"./loadAgentsDir-uuZYOgKn.js";import{n as a,t as o}from"./notifications-GLnjirCl.js";import{n as s,t as c}from"./allErrors-DvcU0w0F.js";function l(){let{addNotification:e,removeNotification:t}=a(),[n,r]=(0,u.useState)(()=>{let{errors:e}=c();return e});return i((0,u.useCallback)(()=>{let{errors:e}=c();r(e)},[])),(0,u.useEffect)(()=>{if(n.length>0){let t=`Found ${n.length} settings ${n.length===1?`issue`:`issues`} · /doctor for details`;e({key:d,text:t,color:`warning`,priority:`high`,timeoutMs:6e4})}else t(d)},[n,e,t]),n}var u,d,f=e((()=>{u=t(n(),1),o(),s(),r(),d=`settings-errors`}));export{l as n,f as t};
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as n}from"./src-BX54x08P.js";import{Gh as r,Kh as i}from"./loadAgentsDir-bmpKLPdG.js";import{n as a,t as o}from"./notifications-BwS1XsnZ.js";import{n as s,t as c}from"./allErrors-Dhnf6rqg.js";function l(){let{addNotification:e,removeNotification:t}=a(),[n,r]=(0,u.useState)(()=>{let{errors:e}=c();return e});return i((0,u.useCallback)(()=>{let{errors:e}=c();r(e)},[])),(0,u.useEffect)(()=>{if(n.length>0){let t=`Found ${n.length} settings ${n.length===1?`issue`:`issues`} · /doctor for details`;e({key:d,text:t,color:`warning`,priority:`high`,timeoutMs:6e4})}else t(d)},[n,e,t]),n}var u,d,f=e((()=>{u=t(n(),1),o(),s(),r(),d=`settings-errors`}));export{l as n,f as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as t}from"./src-BX54x08P.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{Lh as r,zh as i}from"./loadAgentsDir-uuZYOgKn.js";import{n as a}from"./analytics-COpjZpvd.js";import{t as o}from"./useManagePlugins-CxHz-gUP.js";import{t as s}from"./KeybindingProviderSetup-Dzg77_Xn.js";import{n as c,t as l}from"./MCPConnectionManager-CBY8nqdU.js";import{cwd as u}from"process";var d=e(t(),1);a(),c(),i();var f=n(),p=d.lazy(()=>import(`./Doctor-CiZNe_qx.js`).then(e=>({default:e.Doctor})));function m({onDone:e}){return o(),(0,f.jsx)(d.Suspense,{fallback:null,children:(0,f.jsx)(p,{onDone:e})})}async function h(e){await new Promise(t=>{e.render((0,f.jsx)(r,{children:(0,f.jsx)(s,{children:(0,f.jsx)(l,{dynamicMcpConfig:void 0,isStrictMcpConfig:!1,children:(0,f.jsx)(m,{onDone:()=>{t()}})})})}))}),e.unmount(),process.exit(0)}async function g(e,t){let{setup:n}=await import(`./setup-DR-KEmxL.js`);await n(u(),`default`,!1,!1,void 0,!1);let{install:r}=await import(`./install-BbmCNCuM.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{h as doctorHandler,g as installHandler};
1
+ import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{ai as t}from"./src-BX54x08P.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{Lh as r,zh as i}from"./loadAgentsDir-bmpKLPdG.js";import{n as a}from"./analytics-COpjZpvd.js";import{t as o}from"./useManagePlugins-pGaGzsEg.js";import{t as s}from"./KeybindingProviderSetup-syiDgtpB.js";import{n as c,t as l}from"./MCPConnectionManager-C7RmKzJh.js";import{cwd as u}from"process";var d=e(t(),1);a(),c(),i();var f=n(),p=d.lazy(()=>import(`./Doctor-B6isid5K.js`).then(e=>({default:e.Doctor})));function m({onDone:e}){return o(),(0,f.jsx)(d.Suspense,{fallback:null,children:(0,f.jsx)(p,{onDone:e})})}async function h(e){await new Promise(t=>{e.render((0,f.jsx)(r,{children:(0,f.jsx)(s,{children:(0,f.jsx)(l,{dynamicMcpConfig:void 0,isStrictMcpConfig:!1,children:(0,f.jsx)(m,{onDone:()=>{t()}})})})}))}),e.unmount(),process.exit(0)}async function g(e,t){let{setup:n}=await import(`./setup-DVLnIlse.js`);await n(u(),`default`,!1,!1,void 0,!1);let{install:r}=await import(`./install-DIxyfdXG.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{h as doctorHandler,g as installHandler};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./axios-DaWTGg7G.js";import{Ni as r,Wi as i,dt as a,gt as o,ht as s,mt as c,pt as l}from"./settings-D4M13toi.js";import{_w as u,bw as d,cx as f,gx as p,hx as m,lx as ee,mx as te,vw as h,xw as g}from"./loadAgentsDir-uuZYOgKn.js";import{C as _,I as v,M as y,N as b,R as x,S,c as C,f as w,i as T,u as E,x as D}from"./debug-2pVES-2G.js";import{o as ne,s as O}from"./log-L1kqxa_P.js";import{homedir as re}from"os";import*as k from"path";import{join as ie,resolve as ae}from"path";import{randomBytes as oe}from"crypto";import{readFile as A,readdir as j,rename as M,stat as N,unlink as P,writeFile as F}from"fs/promises";function I(){return ie(f(),U)}async function L(){let e=I();try{let t=S(await A(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return C(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==H)return C(`Install counts cache version mismatch (got ${n.version}, expected ${H})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return C(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(C(`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>G?(C(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(C(`Install counts cache has malformed entries`),null)}catch(e){return b(e)!==`ENOENT`&&C(`Failed to load install counts cache: ${y(e)}`),null}}async function R(e){let t=I(),n=`${t}.${oe(8).toString(`hex`)}.tmp`;try{let r=f();await E().mkdir(r),await F(n,_(e,null,2),{encoding:`utf-8`,mode:384}),await M(n,t),C(`Install counts cache saved successfully`)}catch(e){O(e);try{await P(n)}catch{}}}async function z(){C(`Fetching install counts from ${W}`);let e=performance.now();try{let n=await t.get(W,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return p(`install_counts`,W,`success`,performance.now()-e),n.data.plugins}catch(t){throw p(`install_counts`,W,`failure`,performance.now()-e,te(t)),t}}async function B(){let e=await L();if(e){C(`Using cached install counts`),p(`install_counts`,W,`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 z();await R({version:H,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 O(e),C(`Failed to fetch install counts: ${y(e)}`),null}}function V(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 H,U,W,G,K=e((()=>{n(),T(),v(),w(),ne(),D(),m(),ee(),H=1,U=`install-counts-cache.json`,W=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,G=1440*60*1e3}));async function se(e){let t=e.trim(),n=E(),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=ae(t.startsWith(`~`)?t.replace(/^~/,re()):t),r;try{r=await n.stat(e)}catch(t){let n=b(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((()=>{v(),w()}));function le(e){let t=k.basename(e),n=k.basename(k.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=k.resolve(e),i;try{i=await A(r,{encoding:`utf-8`})}catch(e){let t=b(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=S(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(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=l().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=k.resolve(e),a;try{a=await A(r,{encoding:`utf-8`})}catch(e){let t=b(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`marketplace`}}let o;try{o=S(a)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:r,fileType:`marketplace`}}if(o&&typeof o==`object`){let e=o;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 l=s().extend({plugins:i(c().strict())}).strict().safeParse(o);if(l.success||t.push(...q(l.error)),l.success){let e=l.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=k.dirname(r),a=k.basename(i)===`.claude-plugin`?k.dirname(i):i;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=k.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=S(await A(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=[],a=t.match(u);if(!a)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 o=a[1]||``,s;try{s=g(o)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${y(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 s!=`object`||!s||Array.isArray(s))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(s)?`an array`:s===null?`null`:typeof s}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let c=s;if(c.description!==void 0){let e=c.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 Work Mate understand when to use this ${n}.`});c.name!==void 0&&c.name!==null&&typeof c.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof c.name}.`});let l=c[`allowed-tools`];l!=null&&(typeof l!=`string`&&!Array.isArray(l)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof l}.`}):Array.isArray(l)&&l.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let d=c.shell;if(d!=null)if(typeof d!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof d}.`});else{let e=d.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${d}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await A(e,{encoding:`utf-8`})}catch(t){return b(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${y(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=S(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=a().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 j(e,{withFileTypes:!0})}catch(e){let t=b(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>k.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=k.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`,k.join(e,`skills`)],[`agent`,k.join(e,`agents`)],[`command`,k.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 A(r,{encoding:`utf-8`})}catch(n){if(x(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${y(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(k.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=k.resolve(e),n=null;try{n=await N(t)}catch(e){if(!x(e))throw e}if(n?.isDirectory()){let e=await X(k.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(k.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=S(await A(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(b(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{r(),v(),h(),D(),d(),o(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{se as a,K as c,ce as i,pe as n,V as o,fe as r,B as s,me as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./axios-DaWTGg7G.js";import{Ni as r,Wi as i,dt as a,gt as o,ht as s,mt as c,pt as l}from"./settings-D4M13toi.js";import{_w as u,bw as d,cx as f,gx as p,hx as m,lx as ee,mx as te,vw as h,xw as g}from"./loadAgentsDir-bmpKLPdG.js";import{C as _,I as v,M as y,N as b,R as x,S,c as C,f as w,i as T,u as E,x as D}from"./debug-2pVES-2G.js";import{o as ne,s as O}from"./log-L1kqxa_P.js";import{homedir as re}from"os";import*as k from"path";import{join as ie,resolve as ae}from"path";import{randomBytes as oe}from"crypto";import{readFile as A,readdir as j,rename as M,stat as N,unlink as P,writeFile as F}from"fs/promises";function I(){return ie(f(),U)}async function L(){let e=I();try{let t=S(await A(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return C(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==H)return C(`Install counts cache version mismatch (got ${n.version}, expected ${H})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return C(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(C(`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>G?(C(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(C(`Install counts cache has malformed entries`),null)}catch(e){return b(e)!==`ENOENT`&&C(`Failed to load install counts cache: ${y(e)}`),null}}async function R(e){let t=I(),n=`${t}.${oe(8).toString(`hex`)}.tmp`;try{let r=f();await E().mkdir(r),await F(n,_(e,null,2),{encoding:`utf-8`,mode:384}),await M(n,t),C(`Install counts cache saved successfully`)}catch(e){O(e);try{await P(n)}catch{}}}async function z(){C(`Fetching install counts from ${W}`);let e=performance.now();try{let n=await t.get(W,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return p(`install_counts`,W,`success`,performance.now()-e),n.data.plugins}catch(t){throw p(`install_counts`,W,`failure`,performance.now()-e,te(t)),t}}async function B(){let e=await L();if(e){C(`Using cached install counts`),p(`install_counts`,W,`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 z();await R({version:H,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 O(e),C(`Failed to fetch install counts: ${y(e)}`),null}}function V(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 H,U,W,G,K=e((()=>{n(),T(),v(),w(),ne(),D(),m(),ee(),H=1,U=`install-counts-cache.json`,W=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,G=1440*60*1e3}));async function se(e){let t=e.trim(),n=E(),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=ae(t.startsWith(`~`)?t.replace(/^~/,re()):t),r;try{r=await n.stat(e)}catch(t){let n=b(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((()=>{v(),w()}));function le(e){let t=k.basename(e),n=k.basename(k.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=k.resolve(e),i;try{i=await A(r,{encoding:`utf-8`})}catch(e){let t=b(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=S(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(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=l().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=k.resolve(e),a;try{a=await A(r,{encoding:`utf-8`})}catch(e){let t=b(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`marketplace`}}let o;try{o=S(a)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:r,fileType:`marketplace`}}if(o&&typeof o==`object`){let e=o;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 l=s().extend({plugins:i(c().strict())}).strict().safeParse(o);if(l.success||t.push(...q(l.error)),l.success){let e=l.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=k.dirname(r),a=k.basename(i)===`.claude-plugin`?k.dirname(i):i;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=k.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=S(await A(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=[],a=t.match(u);if(!a)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 o=a[1]||``,s;try{s=g(o)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${y(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 s!=`object`||!s||Array.isArray(s))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(s)?`an array`:s===null?`null`:typeof s}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let c=s;if(c.description!==void 0){let e=c.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 Work Mate understand when to use this ${n}.`});c.name!==void 0&&c.name!==null&&typeof c.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof c.name}.`});let l=c[`allowed-tools`];l!=null&&(typeof l!=`string`&&!Array.isArray(l)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof l}.`}):Array.isArray(l)&&l.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let d=c.shell;if(d!=null)if(typeof d!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof d}.`});else{let e=d.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${d}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await A(e,{encoding:`utf-8`})}catch(t){return b(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${y(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=S(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=a().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 j(e,{withFileTypes:!0})}catch(e){let t=b(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>k.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=k.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`,k.join(e,`skills`)],[`agent`,k.join(e,`agents`)],[`command`,k.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 A(r,{encoding:`utf-8`})}catch(n){if(x(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${y(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(k.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=k.resolve(e),n=null;try{n=await N(t)}catch(e){if(!x(e))throw e}if(n?.isDirectory()){let e=await X(k.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(k.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=S(await A(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(b(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{r(),v(),h(),D(),d(),o(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{se as a,K as c,ce as i,pe as n,V as o,fe as r,B as s,me as t};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{d as t,h as n,o as r}from"./config-BDn2YIjC.js";import{n as i}from"./analytics-COpjZpvd.js";var a;e((()=>{i(),t(),a=async()=>{let e=r().editorMode||`normal`;e===`emacs`&&(e=`normal`);let t=e===`normal`?`vim`:`normal`;return n(e=>({...e,editorMode:t})),{type:`text`,value:`Editor mode set to ${t}. ${t===`vim`?`Use Escape key to toggle between INSERT and NORMAL modes.`:`Using standard (readline) keyboard bindings.`}`}}}))();export{a as call};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{d as t,h as n,o as r}from"./config-Bio2EjUK.js";import{n as i}from"./analytics-COpjZpvd.js";var a;e((()=>{i(),t(),a=async()=>{let e=r().editorMode||`normal`;e===`emacs`&&(e=`normal`);let t=e===`normal`?`vim`:`normal`;return n(e=>({...e,editorMode:t})),{type:`text`,value:`Editor mode set to ${t}. ${t===`vim`?`Use Escape key to toggle between INSERT and NORMAL modes.`:`Using standard (readline) keyboard bindings.`}`}}}))();export{a as call};
@@ -0,0 +1 @@
1
+ import{St as e,_t as t}from"./loadAgentsDir-bmpKLPdG.js";e();export{t as execIntoTmuxWorktree};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./wrapper-DVKxC5fR.js";e();export{t as default};
@@ -3,4 +3,4 @@ import{a as e,i as t,n,o as r,r as i,t as a}from"./rolldown-runtime-DaDcL9Zw.js"
3
3
  `)),i.removeListener(`error`,T),d.setSocket(i,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(d),d.on(`close`,()=>{this.clients.delete(d),this._shouldEmitClose&&!this.clients.size&&process.nextTick(w,this)})),o(d,r)}};function S(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function w(e){e._state=y,e.emit(`close`)}function T(){this.destroy()}function E(e,t,n,r){n=n||i.STATUS_CODES[t],r={Connection:`close`,"Content-Type":`text/html`,"Content-Length":Buffer.byteLength(n),...r},e.once(`finish`,e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join(`\r
4
4
  `)+`\r
5
5
  \r
6
- `+n)}function D(e,t,n,r,i,a){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,D),e.emit(`wsClientError`,r,n,t)}else E(n,r,i,a)}})),T,E;n((()=>{S(),b(),f(),_(),v(),C(),T=r(x(),1),w(),E=T.default}))();export{E as default};
6
+ `+n)}function D(e,t,n,r,i,a){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,D),e.emit(`wsClientError`,r,n,t)}else E(n,r,i,a)}})),T,E,D=n((()=>{S(),b(),f(),_(),v(),C(),T=r(x(),1),w(),E=T.default}));export{D as n,E as r,T as t};
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- import{l as e,o as t}from"./chunks/envUtils-QyzA_cFM.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),t(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.WORKMATE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),e(process.env.WORKMATE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,"isTTY",{value:!0,configurable:!0})}catch{}}process.env.COREPACK_ENABLE_AUTO_PIN=`0`;async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`0.0.27 (Work Mate)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-DWcM4QBl.js`);if(t(`cli_entry`),process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-DWYOrkFS.js`);await e();return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-BBnReWWj.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: wm job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-BBnReWWj.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-Bm5pVdCq.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-D68iEHpC.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-CGu_58ue.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CNfq37LF.js`);e(n.error)}}}e.includes(`--bare`)&&(process.env.WORKMATE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-BEjRkAtH.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-fy_XSXGj.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
2
+ import{l as e,o as t}from"./chunks/envUtils-QyzA_cFM.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),t(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.WORKMATE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),e(process.env.WORKMATE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,"isTTY",{value:!0,configurable:!0})}catch{}}process.env.COREPACK_ENABLE_AUTO_PIN=`0`;async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`0.0.28 (Work Mate)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-DWcM4QBl.js`);if(t(`cli_entry`),process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-333L52Lo.js`);await e();return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-C5ukh6H3.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: wm job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-C5ukh6H3.js`);await n(e),process.exit(0)}if(e[0]===`channel`){t(`cli_channel_path`);let{enableConfigs:n}=await import(`./chunks/config-C_AEhZrn.js`);n();let{channelMain:r}=await import(`./chunks/channel-DVx21qde.js`);await r(e.slice(1));return}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-C_AEhZrn.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-D68iEHpC.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-BWL0vR4o.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CNfq37LF.js`);e(n.error)}}}e.includes(`--bare`)&&(process.env.WORKMATE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-BEjRkAtH.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-B31aPMPP.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readmagic/workmate",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "workMate",
5
5
  "type": "module",
6
6
  "author": "Frandy",
@@ -67,6 +67,7 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@agentclientprotocol/sdk": "^0.19.0",
70
+ "dingtalk-stream": "^2.1.6-beta.1",
70
71
  "highlight.js": "^11.11.1",
71
72
  "ws": "^8.20.0"
72
73
  },
@@ -1 +0,0 @@
1
- import{n as e,t}from"./AgentsMdExternalIncludesDialog-rJS5l6yk.js";e();export{t as AgentsMdExternalIncludesDialog};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./Doctor-CLOYkPRR.js";e();export{t as Doctor};
@@ -1 +0,0 @@
1
- import{t as e}from"./REPL-BDnZnm__.js";export{e as REPL};
@@ -1 +0,0 @@
1
- import{f_ as e,p_ as t}from"./loadAgentsDir-uuZYOgKn.js";t();export{e as clearSearchExtraToolsDescriptionCache};
@@ -1 +0,0 @@
1
- import{t as e}from"./backgroundHousekeeping-BtEJ6TeC.js";export{e as startBackgroundHousekeeping};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./caches-Dn8yrJmL.js";e();export{t as clearSessionCaches};
@@ -1 +0,0 @@
1
- import{Ci as e,Di as t,Mi as n}from"./loadAgentsDir-uuZYOgKn.js";n();export{e as clearCommandsCache,t as getCommands};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Settings-DYKmPdbd.js";var i,a;e((()=>{n(),i=t(),a=async(e,t)=>(0,i.jsx)(r,{onClose:e,context:t,defaultTab:`Config`})}))();export{a as call};
@@ -1 +0,0 @@
1
- import{d as e,n as t}from"./config-BDn2YIjC.js";e();export{t as enableConfigs};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./context-noninteractive-CuHHniJn.js";t();export{n as call,e as collectContextData};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./conversation-Cjaftrrw.js";e();export{t as clearConversation};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Doctor-CLOYkPRR.js";var i,a;e((()=>{n(),i=t(),a=(e,t,n)=>Promise.resolve((0,i.jsx)(r,{onDone:e}))}))();export{a as call};
@@ -1 +0,0 @@
1
- import{cc as e,dc as t,lc as n,uc as r}from"./loadAgentsDir-uuZYOgKn.js";t();export{e as drainPendingExtraction,n as executeExtractMemories,r as initExtractMemories};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./fast-C5-lNCQi.js";t();export{n as FastModePicker,e as call};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./fetchModelList-9w1E4Ue8.js";e();export{t as fetchAvailableModels};
@@ -1 +0,0 @@
1
- import{mn as e,on as t,qt as n}from"./loadAgentsDir-uuZYOgKn.js";e();export{n as executeSessionEndHooks,t as getSessionEndHookTimeoutMs};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./loadAgentsDir-uuZYOgKn.js";e();export{t as clearAgentDefinitionsCache};
@@ -1 +0,0 @@
1
- import{a as e,o as t,s as n,t as r}from"./localSearch-yVCDrVrf.js";t();export{r as clearSkillIndexCache,e as getSkillIndex,n as searchSkills};
@@ -1 +0,0 @@
1
- import{r as e,t}from"./managedEnv-B8YWmM4A.js";e();export{t as applyConfigEnvironmentVariables};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./pluginStartupCheck-DftTiXct.js";e();export{t as getPluginEditableScopes};
@@ -1 +0,0 @@
1
- import{Qb as e,ix as t}from"./loadAgentsDir-uuZYOgKn.js";t();export{e as clearPromptCache};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./prompt-BfXryFt-.js";t();export{e as isDeferredTool};
@@ -1 +0,0 @@
1
- import{aC as e,sC as t}from"./loadAgentsDir-uuZYOgKn.js";t();export{e as SandboxManager};
@@ -1 +0,0 @@
1
- import{S_ as e,b_ as t}from"./loadAgentsDir-uuZYOgKn.js";t();export{e as isSearchExtraToolsEnabled};
@@ -1 +0,0 @@
1
- import{Am as e,km as t}from"./loadAgentsDir-uuZYOgKn.js";t();export{e as registerSessionFileAccessHooks};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./sessionObserver-cfwD8pV8.js";t();export{e as heuristicObserverBackend};
@@ -1 +0,0 @@
1
- import{Cr as e,Wr as t,gr as n}from"./loadAgentsDir-uuZYOgKn.js";n();export{e as linkSessionToPR,t as recordTranscript};
@@ -1 +0,0 @@
1
- import{t as e}from"./sinks-Cy3NqVbk.js";export{e as initSinks};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Settings-DYKmPdbd.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};
@@ -1 +0,0 @@
1
- import{a as e,r as t}from"./switcher-DSt2cVjA.js";t();export{e as restoreActiveProvider};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Bh as t,zh as n}from"./loadAgentsDir-uuZYOgKn.js";import{f as r,i,v as a}from"./model-CcHyMyBv.js";function o(){let e=t(e=>e.mainLoopModel);return a(t(e=>e.mainLoopModelForSession)??e??i())}var s=e((()=>{n(),r()}));export{o as n,s as t};
@@ -1 +0,0 @@
1
- import{St as e,_t as t}from"./loadAgentsDir-uuZYOgKn.js";e();export{t as execIntoTmuxWorktree};