@readmagic/workmate 0.0.24 → 0.0.25

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 (402) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-Y5S_lMjD.js +1 -0
  2. package/dist/chunks/AgentsMdExternalIncludesDialog-Bnb1jWcg.js +1 -0
  3. package/dist/chunks/AgentsMdExternalIncludesDialog-DVbU-BaD.js +1 -0
  4. package/dist/chunks/App-B8q8PV77.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-i0TkZgQp.js +2 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-DjqGAL4C.js +1 -0
  7. package/dist/chunks/CustomSelect-BvTftqEH.js +1 -0
  8. package/dist/chunks/DiffDialog-v5r8cBKW.js +6 -0
  9. package/dist/chunks/Doctor-DKpBnbuI.js +1 -0
  10. package/dist/chunks/Doctor-uvO6NM5m.js +3 -0
  11. package/dist/chunks/ExitFlow-Dh9QdaYK.js +2 -0
  12. package/dist/chunks/InvalidConfigDialog-C9boykQn.js +1 -0
  13. package/dist/chunks/{InvalidSettingsDialog-iwh8H52b.js → InvalidSettingsDialog-UN5mleCK.js} +1 -1
  14. package/dist/chunks/KeybindingProviderSetup-DsJqfEt-.js +1 -0
  15. package/dist/chunks/MCPConnectionManager-DkZVxLEj.js +1 -0
  16. package/dist/chunks/MCPToolListView-De1W4jpj.js +1 -0
  17. package/dist/chunks/McpParsingWarnings-zkM_lGd0.js +1 -0
  18. package/dist/chunks/MessageSelector-DW_itlX-.js +3 -0
  19. package/dist/chunks/Messages-BFsCpACq.js +10 -0
  20. package/dist/chunks/Onboarding-BT90cFkn.js +1 -0
  21. package/dist/chunks/PromptInputFooterSuggestions-CCTZYbWI.js +1 -0
  22. package/dist/chunks/PromptInputHelpMenu-Bm5KY0Ma.js +1 -0
  23. package/dist/chunks/{ProviderSetup-BCSPsvfv.js → ProviderSetup-yIj8YOKF.js} +1 -1
  24. package/dist/chunks/QueryEngine-egz5mbaW.js +1 -0
  25. package/dist/chunks/REPL-D27CE4WN.js +124 -0
  26. package/dist/chunks/REPL-e8wAT1wN.js +1 -0
  27. package/dist/chunks/ResumeConversation-CWA27Lke.js +1 -0
  28. package/dist/chunks/SearchExtraToolsTool-BRchtZ9Q.js +1 -0
  29. package/dist/chunks/{SelectMulti-BQRHed-d.js → SelectMulti-BW7Ffk1G.js} +1 -1
  30. package/dist/chunks/Settings-axHLvYIy.js +3 -0
  31. package/dist/chunks/Spinner-VjwI7m_g.js +1 -0
  32. package/dist/chunks/{SpinnerGlyph-CmkRUvHe.js → SpinnerGlyph-CqrOK3Mx.js} +1 -1
  33. package/dist/chunks/TextInput-Cev5Awdd.js +22 -0
  34. package/dist/chunks/ThemePicker-CtQYHmOr.js +1 -0
  35. package/dist/chunks/TrustDialog-8Sjmuu0e.js +1 -0
  36. package/dist/chunks/{ValidationErrorsList-DgNzJQUP.js → ValidationErrorsList-INwwoerV.js} +1 -1
  37. package/dist/chunks/_baseEach-DrPH_FGo.js +1 -0
  38. package/dist/chunks/add-dir-D3RMaYxy.js +1 -0
  39. package/dist/chunks/{agentDisplay-M4pfwbMC.js → agentDisplay-B3npXoCS.js} +1 -1
  40. package/dist/chunks/{agents-DddX7lLX.js → agents-2mPGmeq6.js} +1 -1
  41. package/dist/chunks/agents-DEnmg8Xo.js +101 -0
  42. package/dist/chunks/allErrors-C9kx6lnk.js +1 -0
  43. package/dist/chunks/analytics-COpjZpvd.js +1 -0
  44. package/dist/chunks/{appleTerminalBackup-BArZWB21.js → appleTerminalBackup-CT7g8yOs.js} +1 -1
  45. package/dist/chunks/backgroundHousekeeping-BkFxfjOf.js +1 -0
  46. package/dist/chunks/backgroundHousekeeping-CvWfd99M.js +1 -0
  47. package/dist/chunks/banner-DHpTmEO7.js +2 -0
  48. package/dist/chunks/branch-Be_yDFU8.js +2 -0
  49. package/dist/chunks/{break-cache-BMXqFTeS.js → break-cache-UUt6Dkf2.js} +2 -2
  50. package/dist/chunks/btw-DUml5L1w.js +1 -0
  51. package/dist/chunks/caches-DWjwe-DN.js +1 -0
  52. package/dist/chunks/caches-VLs1tQkZ.js +1 -0
  53. package/dist/chunks/{claudeDesktop-D8ml2767.js → claudeDesktop-mBGFDbI6.js} +1 -1
  54. package/dist/chunks/{clear-B8ZtFPOK.js → clear-CrGjNe6E.js} +1 -1
  55. package/dist/chunks/{client-CpTCeWba.js → client-BDuhbzLD.js} +1 -1
  56. package/dist/chunks/{client-4iqhC8xq.js → client-BYFVVMcf.js} +1 -1
  57. package/dist/chunks/client-CO_6v4yl.js +1 -0
  58. package/dist/chunks/client-DO-O441l.js +1 -0
  59. package/dist/chunks/commands-Cn1P7Tms.js +1 -0
  60. package/dist/chunks/compact-DGUhdXcc.js +2 -0
  61. package/dist/chunks/config-C7GTF4iI.js +1 -0
  62. package/dist/chunks/config-CWPHVTic.js +3 -0
  63. package/dist/chunks/config-Cox0TM2Z.js +1 -0
  64. package/dist/chunks/context-mV5zjqmc.js +1 -0
  65. package/dist/chunks/context-noninteractive--OuiZUzL.js +1 -0
  66. package/dist/chunks/{context-noninteractive-C7wrRZnM.js → context-noninteractive-DvfVvmSE.js} +2 -2
  67. package/dist/chunks/conversation--y8PD2Lk.js +1 -0
  68. package/dist/chunks/conversation-BIPJEOwO.js +1 -0
  69. package/dist/chunks/conversationRecovery-BBJzrA0g.js +1 -0
  70. package/dist/chunks/crossProjectResume-CwZb3cEU.js +40 -0
  71. package/dist/chunks/cwd-BZMp3CZ8.js +1 -0
  72. package/dist/chunks/cwd-BvNt_018.js +1 -0
  73. package/dist/chunks/debug-CRnGsZOV.js +39 -0
  74. package/dist/chunks/{detectRepository-CfX8Lc0A.js → detectRepository-CsJLbVEe.js} +1 -1
  75. package/dist/chunks/{diff-DdpHThJ7.js → diff-DUEoNCnJ.js} +1 -1
  76. package/dist/chunks/{directoryCompletion-D_Rtg-4j.js → directoryCompletion-Bgi8DBT5.js} +1 -1
  77. package/dist/chunks/doctor-4NiE46ZG.js +1 -0
  78. package/dist/chunks/entry-D1iD76SW.js +13 -0
  79. package/dist/chunks/{esm-CGx9qY3q.js → esm-DUH16IqH.js} +1 -1
  80. package/dist/chunks/execAsync-D6SA-YsV.js +1 -0
  81. package/dist/chunks/{execFileNoThrow-BTachNBI.js → execFileNoThrow-BgRsj_SW.js} +3 -3
  82. package/dist/chunks/exit-CrsQsjbx.js +1 -0
  83. package/dist/chunks/extraUsage-BtHE-SBX.js +1 -0
  84. package/dist/chunks/extractMemories-kogJzpit.js +1 -0
  85. package/dist/chunks/fast-CuNVwVTr.js +1 -0
  86. package/dist/chunks/fast-RlFnwGRV.js +1 -0
  87. package/dist/chunks/fetchModelList-Cjow_QGy.js +1 -0
  88. package/dist/chunks/fetchModelList-uiCPVqbJ.js +1 -0
  89. package/dist/chunks/fileSuggestions-C96V9-Ne.js +3 -0
  90. package/dist/chunks/firstPartyEventLogger-CN9UOmEC.js +1 -0
  91. package/dist/chunks/firstPartyEventLogger-RR5rvDtk.js +1 -0
  92. package/dist/chunks/{gemini-C_ApXgwc.js → gemini-4YGElN3H.js} +2 -2
  93. package/dist/chunks/generateSessionName-BHIKyXpz.js +1 -0
  94. package/dist/chunks/{genericProcessUtils-DwQFuna9.js → genericProcessUtils-BNlr-QxM.js} +1 -1
  95. package/dist/chunks/getMachineId-bsd-DTYGimUN.js +1 -0
  96. package/dist/chunks/getMachineId-darwin-DqIFUVvd.js +2 -0
  97. package/dist/chunks/getMachineId-linux-CnCTmdzd.js +1 -0
  98. package/dist/chunks/getMachineId-unsupported-Cx21ssu1.js +1 -0
  99. package/dist/chunks/getMachineId-win-vZhex7KX.js +1 -0
  100. package/dist/chunks/goal-ePK_jLo3.js +3 -0
  101. package/dist/chunks/grok-DnmklTrm.js +1 -0
  102. package/dist/chunks/help-B7xRle-V.js +1 -0
  103. package/dist/chunks/history-kOw3CcLT.js +1 -0
  104. package/dist/chunks/hooks-BDY1jMbS.js +1 -0
  105. package/dist/chunks/{hooks-DR3IYPJ3.js → hooks-BN5f58HY.js} +2 -2
  106. package/dist/chunks/install-DrMiHa2Q.js +1 -0
  107. package/dist/chunks/instrumentation-Oj5xagJG.js +21 -0
  108. package/dist/chunks/{job-YhJQWgE0.js → job-D9ypO0cd.js} +1 -1
  109. package/dist/chunks/keybindings-BRRN_eap.js +1 -0
  110. package/dist/chunks/launchLocalMemory-DliLezJw.js +3 -0
  111. package/dist/chunks/launchOnboarding-A-kk-7ID.js +8 -0
  112. package/dist/chunks/loadAgentsDir-CJAK4kif.js +1 -0
  113. package/dist/chunks/{loadAgentsDir-B0Anodo0.js → loadAgentsDir-DGozQu_6.js} +550 -550
  114. package/dist/chunks/{loadPluginHooks-BSwCtQ6T.js → loadPluginHooks-BiHPKDaY.js} +1 -1
  115. package/dist/chunks/{loader-CICGtLp2.js → loader-CtoR-vO-.js} +1 -1
  116. package/dist/chunks/{localSearch-BxLYi6w_.js → localSearch-BU02Qsv9.js} +1 -1
  117. package/dist/chunks/localSearch-DyaB2Rm-.js +1 -0
  118. package/dist/chunks/{log-D2TIwHBV.js → log-DoSpAwRP.js} +1 -1
  119. package/dist/chunks/logoUtils-DLd6JKqW.js +1 -0
  120. package/dist/chunks/{magicDocs-Bkz7ZcmL.js → magicDocs-Bj8LYrN2.js} +2 -2
  121. package/dist/chunks/main-B_09WbaG.js +345 -0
  122. package/dist/chunks/managedEnv-BJGfe3m7.js +1 -0
  123. package/dist/chunks/{managedEnv-OPlzUPbJ.js → managedEnv-CIWJsuty.js} +1 -1
  124. package/dist/chunks/mcp-1nBvcNxw.js +1 -0
  125. package/dist/chunks/mcp-7DXpXMdT.js +2 -0
  126. package/dist/chunks/mcp-kw99WVi2.js +6 -0
  127. package/dist/chunks/memory-CjWvzR_9.js +1 -0
  128. package/dist/chunks/mode-CBKawxnD.js +2 -0
  129. package/dist/chunks/model-DpZaKZMb.js +1 -0
  130. package/dist/chunks/model-DwbqvCY2.js +1 -0
  131. package/dist/chunks/modelOptions-CXBfKFXA.js +1 -0
  132. package/dist/chunks/nativeInstaller-SmPeEisk.js +1 -0
  133. package/dist/chunks/{notifications-Bc6k-Ozy.js → notifications-ql0eSo0Y.js} +1 -1
  134. package/dist/chunks/onChangeAppState-D85b33R5.js +1 -0
  135. package/dist/chunks/open-Cyrr4E5x.js +1 -0
  136. package/dist/chunks/openai-D_j7-KW6.js +2 -0
  137. package/dist/chunks/overlayContext-CLjlCFBl.js +1 -0
  138. package/dist/chunks/{panel-CVS4SK_E.js → panel-DMZkOEiU.js} +1 -1
  139. package/dist/chunks/parser-2usBI4G-.js +1 -0
  140. package/dist/chunks/{parser-Cg6hSCmn.js → parser-UqADrvxF.js} +1 -1
  141. package/dist/chunks/partition-CwxTlmMd.js +1 -0
  142. package/dist/chunks/{pasteStore-P0zP-ch0.js → pasteStore-ovtxMVR5.js} +1 -1
  143. package/dist/chunks/permissions-CgsvWOk_.js +3 -0
  144. package/dist/chunks/pidLock-B-SW3Nhx.js +3 -0
  145. package/dist/chunks/plan-BJrWtXEh.js +1 -0
  146. package/dist/chunks/platform-DsMIk3eq.js +2 -0
  147. package/dist/chunks/plugin-D97VJAxW.js +17 -0
  148. package/dist/chunks/{pluginAutoupdate-ennb9k8_.js → pluginAutoupdate-DQqYDPVg.js} +1 -1
  149. package/dist/chunks/{pluginBlocklist-9OrNEh--.js → pluginBlocklist-BAr9WTup.js} +1 -1
  150. package/dist/chunks/pluginCliCommands-CUGPc853.js +1 -0
  151. package/dist/chunks/{pluginFlagging-js_-WmYj.js → pluginFlagging-BO_3qjfs.js} +1 -1
  152. package/dist/chunks/pluginOperations-rTrzu6Vg.js +2 -0
  153. package/dist/chunks/pluginStartupCheck-BRHnXlym.js +1 -0
  154. package/dist/chunks/{pluginStartupCheck-SRXOyqr7.js → pluginStartupCheck-BX6cv-vs.js} +1 -1
  155. package/dist/chunks/plugins-9crasx2V.js +4 -0
  156. package/dist/chunks/poorMode-BaS0DBUO.js +1 -0
  157. package/dist/chunks/{poorMode-B0QGV6Ci.js → poorMode-DmvzFAz_.js} +1 -1
  158. package/dist/chunks/print-Bi3xVdB3.js +13 -0
  159. package/dist/chunks/processBashCommand-BBtnCx-7.js +1 -0
  160. package/dist/chunks/processSlashCommand-jzF0GmLO.js +5 -0
  161. package/dist/chunks/{projectOnboardingState-B5YATuc6.js → projectOnboardingState--L3BKjOE.js} +1 -1
  162. package/dist/chunks/prompt-CmijKW7G.js +1 -0
  163. package/dist/chunks/prompt-DYBx_D0H.js +1 -0
  164. package/dist/chunks/{prompt-CJ1l3XXk.js → prompt-DzO1um1h.js} +4 -4
  165. package/dist/chunks/{promptEditor-DoGHJN_W.js → promptEditor-B6S_Rzcu.js} +2 -2
  166. package/dist/chunks/protocolHandler-BWgH1jaF.js +13 -0
  167. package/dist/chunks/{proxy-CDBfZjO7.js → proxy-BjkGlmBu.js} +1 -1
  168. package/dist/chunks/reconciler-CVMmAaCy.js +1 -0
  169. package/dist/chunks/refresh-CAGv8BJY.js +1 -0
  170. package/dist/chunks/reject-CEUkoI2G.js +1 -0
  171. package/dist/chunks/{reload-plugins-CQZFQLWP.js → reload-plugins-DeyJTx4s.js} +1 -1
  172. package/dist/chunks/rename-DPFis9g_.js +1 -0
  173. package/dist/chunks/{renderOptions-DV0dn0IW.js → renderOptions-DRS2EslG.js} +1 -1
  174. package/dist/chunks/resume-N4O5YI-S.js +2 -0
  175. package/dist/chunks/ripgrep-3omwGI-l.js +1 -0
  176. package/dist/chunks/ripgrep-CgQrN3XX.js +5 -0
  177. package/dist/chunks/{runtimeObserver-DEuR8z0f.js → runtimeObserver-C0CJvA3q.js} +1 -1
  178. package/dist/chunks/{runtimeObserver-PJ1o8GRA.js → runtimeObserver-DMSzdFWt.js} +4 -4
  179. package/dist/chunks/sandbox-adapter-D15jjHJR.js +1 -0
  180. package/dist/chunks/sandbox-toggle-Tbbaw18C.js +1 -0
  181. package/dist/chunks/searchExtraTools-BoFc__Eg.js +1 -0
  182. package/dist/chunks/select-Fq6g2Ejk.js +1 -0
  183. package/dist/chunks/sessionFileAccessHooks-Rgsp4_Ex.js +1 -0
  184. package/dist/chunks/{sessionObserver-BtKjvteq.js → sessionObserver-CRie77tp.js} +2 -2
  185. package/dist/chunks/sessionObserver-PcaVCVkX.js +1 -0
  186. package/dist/chunks/sessionStorage-Dkf7FRgA.js +1 -0
  187. package/dist/chunks/sessionTracing-D7rekMdW.js +11 -0
  188. package/dist/chunks/settings-8fwIkMDV.js +1 -0
  189. package/dist/chunks/settings-CodSADx8.js +24 -0
  190. package/dist/chunks/setup-DBiIrXrh.js +3 -0
  191. package/dist/chunks/{shadowedRuleDetection-Bg_aIc5Z.js → shadowedRuleDetection-CTnYVrmP.js} +1 -1
  192. package/dist/chunks/{sideQuestion-D49GsfH7.js → sideQuestion-Cl8m2qYx.js} +3 -3
  193. package/dist/chunks/sinks-CiupmfTg.js +1 -0
  194. package/dist/chunks/sinks-DH83d_kd.js +1 -0
  195. package/dist/chunks/skillChangeDetector-BrrZaFkT.js +1 -0
  196. package/dist/chunks/{skillGapStore-CcFoHNLl.js → skillGapStore-es3K-aYe.js} +2 -2
  197. package/dist/chunks/{skillLifecycle-Bnz_4wE5.js → skillLifecycle-BcgoOQBk.js} +2 -2
  198. package/dist/chunks/{skillSearchPanel-C_5yUhqn.js → skillSearchPanel-CuDDb1L-.js} +4 -4
  199. package/dist/chunks/skills-BRtgqnLz.js +1 -0
  200. package/dist/chunks/{src-CiJCsqUl.js → src-C8gyNm5a.js} +1 -1
  201. package/dist/chunks/src-Db7K3F_i.js +3 -0
  202. package/dist/chunks/startupProfiler-D1NRu2nj.js +1 -0
  203. package/dist/chunks/startupProfiler-DF0AjiDf.js +3 -0
  204. package/dist/chunks/{state-B4jiUise.js → state-BQ4BEGin.js} +1 -1
  205. package/dist/chunks/state-D3gvDiu8.js +1 -0
  206. package/dist/chunks/status-WXA16wIM.js +1 -0
  207. package/dist/chunks/statusNoticeHelpers-BfmIub5L.js +1 -0
  208. package/dist/chunks/{stringUtils-C718f5ey.js → stringUtils-Bu_lJH5c.js} +1 -1
  209. package/dist/chunks/switcher-5gilU5_R.js +1 -0
  210. package/dist/chunks/{switcher-DZwUo5Ed.js → switcher-DMfuKuw_.js} +1 -1
  211. package/dist/chunks/{tasks-DdcUQEeD.js → tasks-B6gYXxOx.js} +1 -1
  212. package/dist/chunks/{templateJobs-C8qsPrLj.js → templateJobs-BW6TaqEC.js} +1 -1
  213. package/dist/chunks/{terminalSetup-B_10N_gE.js → terminalSetup-BgIXFBpd.js} +4 -4
  214. package/dist/chunks/{terminalSetup-qc2PlvOm.js → terminalSetup-C-g9Xvj3.js} +1 -1
  215. package/dist/chunks/{theme-f1h2QI8J.js → theme-9AZceq_m.js} +1 -1
  216. package/dist/chunks/tipRegistry-DtO1H_Wo.js +2 -0
  217. package/dist/chunks/{toolEventObserver-7QP38x4t.js → toolEventObserver-DTuJcREC.js} +1 -1
  218. package/dist/chunks/toolPool-DHS8jWaL.js +1 -0
  219. package/dist/chunks/{types-Dx7P7JLQ.js → types-97nL3naE.js} +16 -16
  220. package/dist/chunks/{udsClient-cQz6nJ_T.js → udsClient-CmYHFiBD.js} +1 -1
  221. package/dist/chunks/{use-select-navigation-hWL5VHnL.js → use-select-navigation-BStVRvcX.js} +1 -1
  222. package/dist/chunks/useExitOnCtrlCDWithKeybindings-DWRFdFoU.js +1 -0
  223. package/dist/chunks/useMainLoopModel-DSN5HjV1.js +1 -0
  224. package/dist/chunks/useManagePlugins-ntnOf5OU.js +1 -0
  225. package/dist/chunks/useMergedTools-C5Yns9Ij.js +1 -0
  226. package/dist/chunks/useSearchInput-B_mY9wBq.js +1 -0
  227. package/dist/chunks/useSettingsErrors-CM7tThcp.js +1 -0
  228. package/dist/chunks/util-Bb2S6g9N.js +1 -0
  229. package/dist/chunks/{validatePlugin-BMSoeb_b.js → validatePlugin-D8WQ5z4W.js} +1 -1
  230. package/dist/chunks/vim-Dpnhgoz_.js +1 -0
  231. package/dist/chunks/worktree-a5oOPSYl.js +1 -0
  232. package/dist/cli.js +1 -1
  233. package/package.json +1 -12
  234. package/dist/chunks/AddWorkspaceDirectory-Ch8IcWXO.js +0 -1
  235. package/dist/chunks/AgentsMdExternalIncludesDialog-Cyia0s4g.js +0 -1
  236. package/dist/chunks/AgentsMdExternalIncludesDialog-LjI_H_Au.js +0 -1
  237. package/dist/chunks/App-BOqh_1tN.js +0 -1
  238. package/dist/chunks/BackgroundTasksDialog-CSEuuoq9.js +0 -2
  239. package/dist/chunks/BypassPermissionsModeDialog-CwfCwUr9.js +0 -1
  240. package/dist/chunks/CustomSelect-wmZ9jz0W.js +0 -1
  241. package/dist/chunks/DiffDialog-BpXIEWiE.js +0 -6
  242. package/dist/chunks/Doctor-CMpr7tdf.js +0 -1
  243. package/dist/chunks/Doctor-DqW6j3_B.js +0 -3
  244. package/dist/chunks/ExitFlow-DacaBTlk.js +0 -2
  245. package/dist/chunks/Grove-CNqYPWI6.js +0 -11
  246. package/dist/chunks/InvalidConfigDialog-0TMJItCC.js +0 -1
  247. package/dist/chunks/KeybindingProviderSetup-D49HHTXD.js +0 -1
  248. package/dist/chunks/MCPConnectionManager-Cie77ZAK.js +0 -1
  249. package/dist/chunks/MCPToolListView-B4ehtkXd.js +0 -1
  250. package/dist/chunks/McpParsingWarnings-Bff66RtJ.js +0 -1
  251. package/dist/chunks/MessageSelector-Dpd6Iywp.js +0 -3
  252. package/dist/chunks/Messages-DN7M3oS_.js +0 -10
  253. package/dist/chunks/Onboarding-CQmE3rUf.js +0 -1
  254. package/dist/chunks/PromptInputFooterSuggestions-HI6HH3TP.js +0 -1
  255. package/dist/chunks/PromptInputHelpMenu-3QNUC2Cg.js +0 -1
  256. package/dist/chunks/QueryEngine-DdLWvJv6.js +0 -1
  257. package/dist/chunks/REPL-BqO9KcK_.js +0 -124
  258. package/dist/chunks/REPL-CmZmypfF.js +0 -1
  259. package/dist/chunks/ResumeConversation-DBqX7gva.js +0 -1
  260. package/dist/chunks/SearchExtraToolsTool-BsSoILFj.js +0 -1
  261. package/dist/chunks/Settings-B-7yBewS.js +0 -3
  262. package/dist/chunks/Spinner-ByQXTvAA.js +0 -1
  263. package/dist/chunks/TextInput-B8ruWRf2.js +0 -22
  264. package/dist/chunks/ThemePicker-BQErFFW1.js +0 -1
  265. package/dist/chunks/TrustDialog-BIhz6AZE.js +0 -1
  266. package/dist/chunks/_baseEach-CsIRoaTH.js +0 -1
  267. package/dist/chunks/add-dir-CrUDs19x.js +0 -1
  268. package/dist/chunks/agents-CGaCQeLw.js +0 -101
  269. package/dist/chunks/allErrors-BF73lon8.js +0 -1
  270. package/dist/chunks/analytics-DJobLaWP.js +0 -1
  271. package/dist/chunks/backgroundHousekeeping-Bq3LMsVR.js +0 -17
  272. package/dist/chunks/backgroundHousekeeping-Cl3Ox7Qh.js +0 -1
  273. package/dist/chunks/banner-Cu2-XUek.js +0 -2
  274. package/dist/chunks/branch-Yg_taNlT.js +0 -2
  275. package/dist/chunks/btw-udbprVvu.js +0 -1
  276. package/dist/chunks/caches-ChjIEcdd.js +0 -1
  277. package/dist/chunks/caches-DLJ6urv-.js +0 -1
  278. package/dist/chunks/client-BiqbIkwr.js +0 -1
  279. package/dist/chunks/client-CZ8nyVh5.js +0 -1
  280. package/dist/chunks/commands-CVCpJo7M.js +0 -1
  281. package/dist/chunks/compact-izk6RKHQ.js +0 -2
  282. package/dist/chunks/config-C-Y2qtB2.js +0 -3
  283. package/dist/chunks/config-CFqpXMFX.js +0 -1
  284. package/dist/chunks/config-DD8fCYXn.js +0 -1
  285. package/dist/chunks/context-BbVm4SWK.js +0 -1
  286. package/dist/chunks/context-noninteractive-x0HAzWhc.js +0 -1
  287. package/dist/chunks/conversation-DouVzO0K.js +0 -1
  288. package/dist/chunks/conversation-DrVkifKy.js +0 -1
  289. package/dist/chunks/conversationRecovery-DliPBo_z.js +0 -1
  290. package/dist/chunks/crossProjectResume-DxMy05_P.js +0 -40
  291. package/dist/chunks/cwd-Dc3NV7s8.js +0 -1
  292. package/dist/chunks/cwd-Pa83R95t.js +0 -1
  293. package/dist/chunks/datadog-Cu3s7P48.js +0 -1
  294. package/dist/chunks/debug-Bglx1aTu.js +0 -39
  295. package/dist/chunks/doctor-D_kV_D_l.js +0 -1
  296. package/dist/chunks/entry-Bxseqbi_.js +0 -13
  297. package/dist/chunks/esm-BXTZz3av.js +0 -1
  298. package/dist/chunks/execAsync-Bv2yxuGe.js +0 -1
  299. package/dist/chunks/exit-C_R_FgzR.js +0 -1
  300. package/dist/chunks/extraUsage-xMuDiNKh.js +0 -1
  301. package/dist/chunks/extractMemories-D4Dl1itt.js +0 -1
  302. package/dist/chunks/fast-DH-C5IZs.js +0 -1
  303. package/dist/chunks/fast-bopOPrtf.js +0 -1
  304. package/dist/chunks/fetchModelList-DC4VQpqa.js +0 -1
  305. package/dist/chunks/fetchModelList-FE8tzTDc.js +0 -1
  306. package/dist/chunks/fileSuggestions-C-9unnoJ.js +0 -3
  307. package/dist/chunks/firstPartyEventLogger-QmjjQmgt.js +0 -3
  308. package/dist/chunks/firstPartyEventLogger-lFeqhtfh.js +0 -1
  309. package/dist/chunks/generateSessionName-CQ03xlYI.js +0 -1
  310. package/dist/chunks/getMachineId-bsd-Cut1kHoA.js +0 -1
  311. package/dist/chunks/getMachineId-darwin-CsRhaP3y.js +0 -2
  312. package/dist/chunks/getMachineId-linux-Bd7UBNRQ.js +0 -1
  313. package/dist/chunks/getMachineId-unsupported-vFGP8E_8.js +0 -1
  314. package/dist/chunks/getMachineId-win-DamF2CH_.js +0 -1
  315. package/dist/chunks/goal-CdL29Y8C.js +0 -3
  316. package/dist/chunks/grok-C6WAslUT.js +0 -1
  317. package/dist/chunks/grove-O6qp7ITR.js +0 -1
  318. package/dist/chunks/help-DxanITNN.js +0 -1
  319. package/dist/chunks/history-BMycjPTT.js +0 -1
  320. package/dist/chunks/hooks-D9ApLkBp.js +0 -1
  321. package/dist/chunks/install-0D9u2dZw.js +0 -1
  322. package/dist/chunks/instrumentation-BFiGwntt.js +0 -21
  323. package/dist/chunks/keybindings-DZrF9iNd.js +0 -1
  324. package/dist/chunks/launchLocalMemory-DhJ56KDc.js +0 -3
  325. package/dist/chunks/launchOnboarding-DmMoZwv5.js +0 -8
  326. package/dist/chunks/loadAgentsDir-BbUR6pqH.js +0 -1
  327. package/dist/chunks/localSearch-zfn7jgrh.js +0 -1
  328. package/dist/chunks/logoUtils-CRxTutvr.js +0 -1
  329. package/dist/chunks/main-9ksgUUY_.js +0 -345
  330. package/dist/chunks/managedEnv-BEqrGqn1.js +0 -1
  331. package/dist/chunks/mcp-ChF12reQ.js +0 -1
  332. package/dist/chunks/mcp-DoEl5uah.js +0 -2
  333. package/dist/chunks/mcp-hp9qqjAy.js +0 -6
  334. package/dist/chunks/memory-Qv-wGNQ5.js +0 -1
  335. package/dist/chunks/mode-bFXPCR2P.js +0 -2
  336. package/dist/chunks/model-6lkW4o2c.js +0 -1
  337. package/dist/chunks/model-BvQFFOf8.js +0 -1
  338. package/dist/chunks/modelOptions-BBvF3wHK.js +0 -1
  339. package/dist/chunks/nativeInstaller-CdjmE9Zy.js +0 -1
  340. package/dist/chunks/onChangeAppState-DLjZ1x95.js +0 -1
  341. package/dist/chunks/open-BtQHzzL9.js +0 -1
  342. package/dist/chunks/openai-D46QvESE.js +0 -2
  343. package/dist/chunks/overlayContext-8--_fbvY.js +0 -1
  344. package/dist/chunks/parser-CG5RuOCK.js +0 -1
  345. package/dist/chunks/partition-DznN4XZH.js +0 -1
  346. package/dist/chunks/permissions-DmGFViHI.js +0 -3
  347. package/dist/chunks/pidLock-Cm4sW35f.js +0 -3
  348. package/dist/chunks/plan-CzGBz_87.js +0 -1
  349. package/dist/chunks/platform-BacQ6ACS.js +0 -2
  350. package/dist/chunks/plugin-CluR79xX.js +0 -17
  351. package/dist/chunks/pluginCliCommands-CJv5uhOG.js +0 -1
  352. package/dist/chunks/pluginOperations-CcUSHAIa.js +0 -2
  353. package/dist/chunks/pluginStartupCheck-CRBUO9gP.js +0 -1
  354. package/dist/chunks/plugins-IwwaCDba.js +0 -4
  355. package/dist/chunks/poorMode-G-pnu6NM.js +0 -1
  356. package/dist/chunks/print-CgszM1ea.js +0 -13
  357. package/dist/chunks/processBashCommand-D098WsqY.js +0 -1
  358. package/dist/chunks/processSlashCommand-DOQFjJ88.js +0 -5
  359. package/dist/chunks/prompt-BKPmDAuL.js +0 -1
  360. package/dist/chunks/prompt-CgOklk7z.js +0 -1
  361. package/dist/chunks/protocolHandler-DjQALaU2.js +0 -13
  362. package/dist/chunks/reconciler-ykkSPR-i.js +0 -1
  363. package/dist/chunks/refresh-Dn_I1R4v.js +0 -1
  364. package/dist/chunks/registerProtocol-CAsDme_E.js +0 -1
  365. package/dist/chunks/reject-DtcCfuZV.js +0 -1
  366. package/dist/chunks/rename-DyEfsZiq.js +0 -1
  367. package/dist/chunks/resume-BcXEDUqZ.js +0 -2
  368. package/dist/chunks/ripgrep-DLs8MraF.js +0 -1
  369. package/dist/chunks/ripgrep-Dl3y5r4m.js +0 -5
  370. package/dist/chunks/sandbox-adapter-DfB9kgQD.js +0 -1
  371. package/dist/chunks/sandbox-toggle-D9GDUsTl.js +0 -1
  372. package/dist/chunks/searchExtraTools-D4gMMQv0.js +0 -1
  373. package/dist/chunks/select-DIxfl_VN.js +0 -1
  374. package/dist/chunks/sessionFileAccessHooks-lbgHnVvi.js +0 -1
  375. package/dist/chunks/sessionObserver-D6qzEdGJ.js +0 -1
  376. package/dist/chunks/sessionStorage-C_7gow_z.js +0 -1
  377. package/dist/chunks/sessionTracing-CtbeAD0s.js +0 -11
  378. package/dist/chunks/settings-B2jvL8Dp.js +0 -24
  379. package/dist/chunks/settings-CisDe8DB.js +0 -1
  380. package/dist/chunks/setup-qecdf-ES.js +0 -3
  381. package/dist/chunks/sinks-C-lP7uyO.js +0 -1
  382. package/dist/chunks/sinks-De-B1lPQ.js +0 -1
  383. package/dist/chunks/skillChangeDetector-DkOJoNhT.js +0 -1
  384. package/dist/chunks/skills-BE5scC-g.js +0 -1
  385. package/dist/chunks/src-CHw1lvBc.js +0 -3
  386. package/dist/chunks/startupProfiler-BH0FoI66.js +0 -1
  387. package/dist/chunks/startupProfiler-CJdr3SxP.js +0 -3
  388. package/dist/chunks/state-BhOKSFi5.js +0 -1
  389. package/dist/chunks/status-Dw09WZLd.js +0 -1
  390. package/dist/chunks/statusNoticeHelpers-BRQpUIlH.js +0 -1
  391. package/dist/chunks/switcher-CgZVah7U.js +0 -1
  392. package/dist/chunks/tipRegistry-B71o4qWr.js +0 -2
  393. package/dist/chunks/toolPool-V-7Yv0GA.js +0 -1
  394. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BKwzUpgb.js +0 -1
  395. package/dist/chunks/useMainLoopModel-DxvV70Ru.js +0 -1
  396. package/dist/chunks/useManagePlugins-BXLXazrR.js +0 -1
  397. package/dist/chunks/useMergedTools-CCgnBJzO.js +0 -1
  398. package/dist/chunks/useSearchInput-CzopttqC.js +0 -1
  399. package/dist/chunks/useSettingsErrors-SFPWfxsA.js +0 -1
  400. package/dist/chunks/util-Cbb3S6SX.js +0 -1
  401. package/dist/chunks/vim-CoRp9lY1.js +0 -1
  402. package/dist/chunks/worktree-Vm-SNY5x.js +0 -1
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./axios-DaWTGg7G.js";import{Pt as n,at as r}from"./state-BQ4BEGin.js";import{$ as i,C as a,c as o,et as s,f as c,i as l,nt as u,rt as d,u as f,x as p}from"./debug-CRnGsZOV.js";import{_ as m,o as h,r as g,t as _,v}from"./log-DoSpAwRP.js";import{n as y}from"./analytics-COpjZpvd.js";import{dirname as b,join as x}from"path";t(),n(),d(),v(),i(),l(),c(),h(),p();var S=g(new Date);function C(){return x(m.errors(),`${S}.jsonl`)}function w(e){return x(m.mcpLogs(e),`${S}.jsonl`)}function T(e){let t=u(e);return{write(e){t.write(`${a(e)}\n`)},flush:t.flush,dispose:t.dispose}}var E=new Map;function D(e){let t=E.get(e);if(!t){let n=b(e);t=T({writeFn:t=>{try{f().appendFileSync(e,t)}catch{f().mkdirSync(n),f().appendFileSync(e,t)}},flushIntervalMs:1e3,maxBufferSize:50}),E.set(e,t),s(async()=>t?.dispose())}return t}function O(e,t){let n={timestamp:new Date().toISOString(),...t,cwd:f().cwd(),userType:process.env.USER_TYPE,sessionId:r(),version:`0.0.25`};D(e).write(n)}function k(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e;if(typeof t.message==`string`)return t.message;if(typeof t.error==`object`&&t.error&&`message`in t.error&&typeof t.error.message==`string`)return t.error.message}}function A(t){let n=t.stack||t.message,r=``;if(e.isAxiosError(t)&&t.config?.url){let e=[`url=${t.config.url}`];t.response?.status!==void 0&&e.push(`status=${t.response.status}`);let n=k(t.response?.data);n&&e.push(`body=${n}`),r=`[${e.join(`,`)}] `}o(`${t.name}: ${r}${n}`,{level:`error`}),O(C(),{error:`${r}${n}`})}function j(e,t){o(`MCP server "${e}" ${t}`,{level:`error`});let n=w(e),i={error:t instanceof Error?t.stack||t.message:String(t),timestamp:new Date().toISOString(),sessionId:r(),cwd:f().cwd()};D(n).write(i)}function M(e,t){o(`MCP server "${e}": ${t}`);let n=w(e),i={debug:t,timestamp:new Date().toISOString(),sessionId:r(),cwd:f().cwd()};D(n).write(i)}function N(){_({logError:A,logMCPError:j,logMCPDebug:M,getErrorsPath:C,getMCPLogsPath:w}),o(`Error log sink initialized`)}y();function P(){N()}export{P as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./sinks-CiupmfTg.js";export{e as initSinks};
@@ -0,0 +1 @@
1
+ import{Gn as e,Hn as t,Kn as n,Pt as r,Tn as i,U as a,at as o,h as s,vn as ee,yn as c}from"./state-BQ4BEGin.js";import{$w as te,A_ as ne,Ci as re,Cm as ie,Gi as ae,Gm as l,Gw as u,Hb as oe,Hf as se,In as ce,Km as le,Mi as d,Nt as ue,Ot as f,Qw as p,Rr as m,Si as de,St as fe,T_ as h,Ub as g,Uf as pe,Ui as _,Vi as me,Wi as he,Ww as ge,Xr as _e,Xs as v,Yr as y,ai as b,am as x,dn as S,ec as C,f_ as w,gr as T,mn as E,nb as D,ni as O,ns as k,p_ as A,pp as j,rb as M,rm as N,ts as P,wm as F,yt as I}from"./loadAgentsDir-DGozQu_6.js";import{n as ve,t as L}from"./cwd-BvNt_018.js";import{$ as ye,c as R,et as be,f as xe,i as z,u as Se}from"./debug-CRnGsZOV.js";import{n as Ce}from"./analytics-COpjZpvd.js";import{f as we,v as Te}from"./model-DpZaKZMb.js";import{Gt as Ee}from"./prompt-DzO1um1h.js";import*as B from"path";import{dirname as De}from"path";r(),le(),w(),Ee(),F(),ne(),j(),v(),ve(),z(),x(),we(),te(),oe(),T(),D(),pe(),fe();function Oe(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.type!==`assistant`)continue;let r=n.message.content.find(e=>e.type===`tool_use`&&e.name===`TodoWrite`);if(r?.type!==`tool_use`)continue;let i=r.input;if(typeof i!=`object`||!i)return[];let a=se().safeParse(i.todos);return a.success?a.data:[]}return[]}function ke(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&N(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),!M()&&e.messages&&e.messages.length>0){let n=Oe(e.messages);if(n.length>0){let e=o();t(t=>({...t,todos:{...t.todos,[e]:n}}))}}}function V(e,t){if(!(!e&&!t))return{name:e??``,color:t==="default"?void 0:t}}function H(e,t,n){if(t)return{agentDefinition:t,agentType:void 0};if(!e)return c(void 0),{agentDefinition:void 0,agentType:void 0};let r=n.activeAgents.find(t=>t.agentType===e);return r?(c(r.agentType),!a()&&r.model&&r.model!==`inherit`&&ee(Te(r.model)),{agentDefinition:r,agentType:r.agentType}):(R(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),c(void 0),{agentDefinition:void 0,agentType:void 0})}function U(e){let t=I();if(t){b(t);return}if(e){try{process.chdir(e.worktreePath)}catch{b(null);return}g(e.worktreePath),i(L()),f(e),h(),l(),p.cache.clear?.()}}function Ae(){let e=I();if(e){f(null),h(),l(),p.cache.clear?.();try{process.chdir(e.originalCwd)}catch{return}g(e.originalCwd),i(L())}}async function je(e,n,r){if(n.forkSession)e.contentReplacements?.length&&await m(e.contentReplacements);else{let r=n.sessionIdOverride??e.sessionId;r&&(t(ie(r),n.transcriptPath?De(n.transcriptPath):null),await y(),A(r))}_e(n.forkSession?{...e,worktreeSession:void 0}:e),n.forkSession||(U(e.worktreeSession),ce());let{agentDefinition:i,agentType:a}=H(e.agentSetting,r.mainThreadAgentDefinition,r.agentDefinitions);O(`normal`),n.includeAttribution;let o=V(e.agentName,e.agentColor);C(e.agentName);let s=r.agentDefinitions;return{messages:e.messages,fileHistorySnapshots:e.fileHistorySnapshots,contentReplacements:e.contentReplacements,agentName:e.agentName,agentColor:e.agentColor==="default"?void 0:e.agentColor,restoredAgentDef:i,initialState:{...r.initialState,...a&&{agent:a},...o&&{standaloneAgentContext:o},agentDefinitions:s}}}u(),r(),d(),Ce(),he(),P(),ye(),z(),xe(),E(),n();var Me=1e3,Ne=500,Pe=300,Fe=2e3,Ie=typeof Bun<`u`,W=null,G=null,K=new Set,q=!1,J=!1,Y=!1,X=null,Z=e();async function Le(){if(q||J)return;q=!0,Y||(Y=!0,ae(()=>{de(),Z.emit()}));let e=await ze();e.length!==0&&(R(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),W=ge.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Me,pollInterval:Ne},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(B.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Ie,interval:Fe,atomic:!0}),W.on(`add`,$),W.on(`change`,$),W.on(`unlink`,$),X=be(async()=>{await Q()}))}function Q(){J=!0,X&&(X(),X=null);let e=Promise.resolve();return W&&(e=W.close(),W=null),G&&(clearTimeout(G),G=null),K.clear(),Z.clear(),e}var Re=Z.subscribe;async function ze(){let e=Se(),t=[],n=_(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=_(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=_(`projectSettings`,`skills`);if(i)try{let n=B.resolve(i);await e.stat(n),t.push(n)}catch{}let a=_(`projectSettings`,`commands`);if(a)try{let n=B.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of s()){let r=B.join(n,`.workmate`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){R(`Detected skill change: ${e}`),Be(e)}function Be(e){K.add(e),G&&clearTimeout(G),G=setTimeout(async()=>{G=null;let e=[...K];if(K.clear(),S(await ue(`skills`,e[0]))){R(`ConfigChange hook blocked skill reload (${e.length} paths)`);return}me(),re(),k(),Z.emit()},Pe)}var Ve={initialize:Le,dispose:Q,subscribe:Re};export{H as a,je as i,V as n,ke as o,Ae as r,U as s,Ve as t};
@@ -1,5 +1,5 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,n,s as r}from"./projectContext-DhtjLv3k.js";import{i,r as a}from"./instinctParser-Dt-lqnDe.js";import{c as o,o as s,s as c}from"./skillLifecycle-Bnz_4wE5.js";import{dirname as l,join as u}from"node:path";import{existsSync as d}from"node:fs";import{createHash as f}from"node:crypto";import{mkdir as p,readFile as m,rename as h,writeFile as g}from"node:fs/promises";async function _(e){let t=e.prompt.trim();if(!t)throw Error(`Cannot record an empty skill gap`);let n=e.project??r(e.cwd),i=await A(n,e.rootDir),a=F(t),o=new Date().toISOString(),s=i.gaps[a],c={key:a,prompt:t,count:(s?.count??0)+1,draftHits:s?.draftHits??0,draftHitSessions:s?.draftHitSessions??[],status:s?.status??`pending`,sessionId:e.sessionId??`unknown-session`,cwd:e.cwd??n.cwd,projectId:n.projectId,projectName:n.projectName,recommendations:(e.recommendations??[]).slice(0,5).map(e=>({name:e.name,description:e.description,score:e.score})),createdAt:s?.createdAt??o,updatedAt:o,draft:s?.draft,active:s?.active};return c.status===`rejected`?(i.gaps[a]=c,await N(n,i,e.rootDir),c):(!c.draft&&C(c)&&(c.draft=await T(c,n),c.status=`draft`,await z()),c.draft&&!c.active&&w(c)&&(c.active=await E(c,n),c.status=`active`,await z()),i.gaps[a]=c,await N(n,i,e.rootDir),c)}async function v(e=r(),t){let n=await A(e,t);return Object.values(n.gaps).sort((e,t)=>e.key.localeCompare(t.key))}async function y(e,t=r(),n){let i=await A(t,n);for(let t of Object.values(i.gaps))if(t.draft?.skillPath===e)return t.key}async function b(e,t=r(),n,i=`unknown-session`){let a=await A(t,n),o=a.gaps[e];if(!o?.draft||o.active)return o;let s=o.draftHitSessions??[];if(s.includes(i))return o;let c=new Date().toISOString(),l={...o,draftHits:o.draftHits+1,draftHitSessions:[...s,i],updatedAt:c};return w(l)&&(l.active=await E(l,t),l.status=`active`,await z()),a.gaps[e]=l,await N(t,a,n),l}async function x(e,t=r(),n){let i=await A(t,n),a=i.gaps[e];if(!a)return;if(a.status===`rejected`||a.draft)return a;let o={...a,draft:await T(a,t),status:`draft`,updatedAt:new Date().toISOString()};return i.gaps[e]=o,await N(t,i,n),await z(),o}async function S(e,t=r(),n){let i=await A(t,n),a=i.gaps[e];if(!a)return;let o={...a,status:`rejected`,updatedAt:new Date().toISOString()};return i.gaps[e]=o,await N(t,i,n),o}function C(e){return e.count>=B}function w(e){return e.draft?e.count>=V||e.draftHits>=H:!1}async function T(e,t){let n=D(e,`pending`),r=u(t.projectRoot??t.cwd,`.workmate`,`skills`,`.drafts`),i=s([n],{cwd:t.projectRoot??t.cwd,outputRoot:r,scope:`project`,name:`draft-${I(e.prompt)}`,description:`Draft learned skill candidate. Promote after repeated evidence or explicit user correction.`}),a=u(i.outputPath,`SKILL.md`);return d(a)||await o({...i,content:i.content+`
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,n,s as r}from"./projectContext-DhtjLv3k.js";import{i,r as a}from"./instinctParser-Dt-lqnDe.js";import{c as o,o as s,s as c}from"./skillLifecycle-BcgoOQBk.js";import{dirname as l,join as u}from"node:path";import{existsSync as d}from"node:fs";import{createHash as f}from"node:crypto";import{mkdir as p,readFile as m,rename as h,writeFile as g}from"node:fs/promises";async function _(e){let t=e.prompt.trim();if(!t)throw Error(`Cannot record an empty skill gap`);let n=e.project??r(e.cwd),i=await A(n,e.rootDir),a=F(t),o=new Date().toISOString(),s=i.gaps[a],c={key:a,prompt:t,count:(s?.count??0)+1,draftHits:s?.draftHits??0,draftHitSessions:s?.draftHitSessions??[],status:s?.status??`pending`,sessionId:e.sessionId??`unknown-session`,cwd:e.cwd??n.cwd,projectId:n.projectId,projectName:n.projectName,recommendations:(e.recommendations??[]).slice(0,5).map(e=>({name:e.name,description:e.description,score:e.score})),createdAt:s?.createdAt??o,updatedAt:o,draft:s?.draft,active:s?.active};return c.status===`rejected`?(i.gaps[a]=c,await N(n,i,e.rootDir),c):(!c.draft&&C(c)&&(c.draft=await T(c,n),c.status=`draft`,await z()),c.draft&&!c.active&&w(c)&&(c.active=await E(c,n),c.status=`active`,await z()),i.gaps[a]=c,await N(n,i,e.rootDir),c)}async function v(e=r(),t){let n=await A(e,t);return Object.values(n.gaps).sort((e,t)=>e.key.localeCompare(t.key))}async function y(e,t=r(),n){let i=await A(t,n);for(let t of Object.values(i.gaps))if(t.draft?.skillPath===e)return t.key}async function b(e,t=r(),n,i=`unknown-session`){let a=await A(t,n),o=a.gaps[e];if(!o?.draft||o.active)return o;let s=o.draftHitSessions??[];if(s.includes(i))return o;let c=new Date().toISOString(),l={...o,draftHits:o.draftHits+1,draftHitSessions:[...s,i],updatedAt:c};return w(l)&&(l.active=await E(l,t),l.status=`active`,await z()),a.gaps[e]=l,await N(t,a,n),l}async function x(e,t=r(),n){let i=await A(t,n),a=i.gaps[e];if(!a)return;if(a.status===`rejected`||a.draft)return a;let o={...a,draft:await T(a,t),status:`draft`,updatedAt:new Date().toISOString()};return i.gaps[e]=o,await N(t,i,n),await z(),o}async function S(e,t=r(),n){let i=await A(t,n),a=i.gaps[e];if(!a)return;let o={...a,status:`rejected`,updatedAt:new Date().toISOString()};return i.gaps[e]=o,await N(t,i,n),o}function C(e){return e.count>=B}function w(e){return e.draft?e.count>=V||e.draftHits>=H:!1}async function T(e,t){let n=D(e,`pending`),r=u(t.projectRoot??t.cwd,`.workmate`,`skills`,`.drafts`),i=s([n],{cwd:t.projectRoot??t.cwd,outputRoot:r,scope:`project`,name:`draft-${I(e.prompt)}`,description:`Draft learned skill candidate. Promote after repeated evidence or explicit user correction.`}),a=u(i.outputPath,`SKILL.md`);return d(a)||await o({...i,content:i.content+`
2
2
  ## Promotion Rule
3
3
 
4
4
  Do not move this draft into active skills until the same gap repeats or the user explicitly confirms this should become reusable.
5
- `}),{type:`draft`,name:i.name,skillPath:a}}async function E(e,t){let n=s([D(e,`active`)],{cwd:t.projectRoot??t.cwd,scope:`project`,name:I(e.prompt),description:O(e.prompt)}),r=u(n.outputPath,`SKILL.md`);return d(r)||await o(n),{type:`active`,name:n.name,skillPath:r}}function D(e,t){return a({trigger:`When the user asks for ${L(e.prompt,120)}`,action:O(e.prompt),confidence:t===`active`?.82:.55,domain:k(e.prompt),source:`session-observation`,scope:`project`,projectId:e.projectId,projectName:e.projectName,evidence:[`Skill gap prompt: ${L(e.prompt,180)}`,`No high-confidence active skill was auto-loaded.`,`Observed ${e.count} time(s).`],status:t})}function O(e){return/feature\s*\(|feature flag|flag_name|stub|no-op|noop|最小实现/i.test(e)?`Audit feature flags by scanning feature() call sites, excluding generated/dependency noise, classifying each candidate as stub, shell, MVP, or thin-toggle, and writing an evidence-backed document.`:/skill|技能|学习|进化|evolve|learning/i.test(e)?`Run skill discovery first; auto-load only high-confidence matching skills; record a skill gap when none match; promote repeated or corrected gaps into learned skills.`:/test|测试|stub|调用链|参数/i.test(e)?`Infer tests from existing files, parameters, exports, and call chains before simplifying mocks or inventing behavior.`:`Reuse the workflow learned from this prompt: ${L(e,180)}.`}function k(e){let t=e.toLowerCase();return/test|测试|stub|fixture|断言/.test(t)?`testing`:/error|bug|fix|失败|错误|修复|debug/.test(t)?`debugging`:/security|安全|漏洞|secret|token/.test(t)?`security`:/git|commit|branch|pr\b/.test(t)?`git`:/style|lint|format|命名|规范/.test(t)?`code-style`:`workflow`}async function A(e,t){let n=P(e,t),r;try{r=await m(n,`utf8`)}catch(e){if(e.code===`ENOENT`)return{version:1,gaps:{}};throw e}try{return j(JSON.parse(r))}catch{let e=`${n}.corrupt-${Date.now()}`;try{await g(e,r,`utf8`)}catch{}return{version:1,gaps:{}}}}function j(e){let t={};for(let[n,r]of Object.entries(e.gaps??{})){let e=r,i=typeof e.draftHits==`number`&&Number.isFinite(e.draftHits)?e.draftHits:0,a=typeof e.count==`number`?e.count:1,o=M(e.status),s=!!e.draft,c=!!e.active,l=o;l===`draft`&&a<B&&!s&&(l=`pending`),l===`active`&&!c&&(l=s?`draft`:`pending`);let u=Array.isArray(e.draftHitSessions)?e.draftHitSessions.filter(e=>typeof e==`string`):[];t[n]={...r,count:a,draftHits:i,draftHitSessions:u,status:l}}return{version:1,gaps:t}}function M(e){return e===`pending`||e===`draft`||e===`active`||e===`rejected`?e:`pending`}async function N(e,t,n){let r=P(e,n);await p(l(r),{recursive:!0});let i=`${r}.tmp-${process.pid}-${Date.now()}`;await g(i,`${JSON.stringify(t,null,2)}\n`,`utf8`),await h(i,r)}function P(e,t){return u(t?e.projectId===`global`?u(t,`global`):u(t,`projects`,e.projectId):n(e.projectId),`skill-gaps.json`)}function F(e){return`${I(e)}-${R(e).slice(0,8)}`}function I(e){let t=e.replaceAll(`技能`,` skill `).replaceAll(`学习`,` learning `).replaceAll(`进化`,` evolution `).replaceAll(`测试`,` testing `).replaceAll(`最小实现`,` minimal implementation `).toLowerCase(),n=new Set([`the`,`and`,`for`,`with`,`this`,`that`,`user`,`about`,`feature`,`flag`,`name`]);return((t.match(/[a-z0-9][a-z0-9_-]{2,}/g)??[]).filter(e=>!n.has(e)).slice(0,5).join(`-`)||`learned-gap`).slice(0,54).replace(/-+$/g,``)}function L(e,t){return e.replace(/\s+/g,` `).trim().slice(0,t)}function R(e){return f(`sha1`).update(e).digest(`hex`)}async function z(){try{let{clearCommandsCache:e}=await import(`./commands-CVCpJo7M.js`);e()}catch{}}var B,V,H;e((()=>{i(),t(),c(),B=2,V=4,H=2}))();export{y as findGapKeyByDraftPath,x as promoteGapToDraft,v as readSkillGaps,b as recordDraftHit,_ as recordSkillGap,S as rejectSkillGap,w as shouldPromoteToActive,C as shouldPromoteToDraft};
5
+ `}),{type:`draft`,name:i.name,skillPath:a}}async function E(e,t){let n=s([D(e,`active`)],{cwd:t.projectRoot??t.cwd,scope:`project`,name:I(e.prompt),description:O(e.prompt)}),r=u(n.outputPath,`SKILL.md`);return d(r)||await o(n),{type:`active`,name:n.name,skillPath:r}}function D(e,t){return a({trigger:`When the user asks for ${L(e.prompt,120)}`,action:O(e.prompt),confidence:t===`active`?.82:.55,domain:k(e.prompt),source:`session-observation`,scope:`project`,projectId:e.projectId,projectName:e.projectName,evidence:[`Skill gap prompt: ${L(e.prompt,180)}`,`No high-confidence active skill was auto-loaded.`,`Observed ${e.count} time(s).`],status:t})}function O(e){return/feature\s*\(|feature flag|flag_name|stub|no-op|noop|最小实现/i.test(e)?`Audit feature flags by scanning feature() call sites, excluding generated/dependency noise, classifying each candidate as stub, shell, MVP, or thin-toggle, and writing an evidence-backed document.`:/skill|技能|学习|进化|evolve|learning/i.test(e)?`Run skill discovery first; auto-load only high-confidence matching skills; record a skill gap when none match; promote repeated or corrected gaps into learned skills.`:/test|测试|stub|调用链|参数/i.test(e)?`Infer tests from existing files, parameters, exports, and call chains before simplifying mocks or inventing behavior.`:`Reuse the workflow learned from this prompt: ${L(e,180)}.`}function k(e){let t=e.toLowerCase();return/test|测试|stub|fixture|断言/.test(t)?`testing`:/error|bug|fix|失败|错误|修复|debug/.test(t)?`debugging`:/security|安全|漏洞|secret|token/.test(t)?`security`:/git|commit|branch|pr\b/.test(t)?`git`:/style|lint|format|命名|规范/.test(t)?`code-style`:`workflow`}async function A(e,t){let n=P(e,t),r;try{r=await m(n,`utf8`)}catch(e){if(e.code===`ENOENT`)return{version:1,gaps:{}};throw e}try{return j(JSON.parse(r))}catch{let e=`${n}.corrupt-${Date.now()}`;try{await g(e,r,`utf8`)}catch{}return{version:1,gaps:{}}}}function j(e){let t={};for(let[n,r]of Object.entries(e.gaps??{})){let e=r,i=typeof e.draftHits==`number`&&Number.isFinite(e.draftHits)?e.draftHits:0,a=typeof e.count==`number`?e.count:1,o=M(e.status),s=!!e.draft,c=!!e.active,l=o;l===`draft`&&a<B&&!s&&(l=`pending`),l===`active`&&!c&&(l=s?`draft`:`pending`);let u=Array.isArray(e.draftHitSessions)?e.draftHitSessions.filter(e=>typeof e==`string`):[];t[n]={...r,count:a,draftHits:i,draftHitSessions:u,status:l}}return{version:1,gaps:t}}function M(e){return e===`pending`||e===`draft`||e===`active`||e===`rejected`?e:`pending`}async function N(e,t,n){let r=P(e,n);await p(l(r),{recursive:!0});let i=`${r}.tmp-${process.pid}-${Date.now()}`;await g(i,`${JSON.stringify(t,null,2)}\n`,`utf8`),await h(i,r)}function P(e,t){return u(t?e.projectId===`global`?u(t,`global`):u(t,`projects`,e.projectId):n(e.projectId),`skill-gaps.json`)}function F(e){return`${I(e)}-${R(e).slice(0,8)}`}function I(e){let t=e.replaceAll(`技能`,` skill `).replaceAll(`学习`,` learning `).replaceAll(`进化`,` evolution `).replaceAll(`测试`,` testing `).replaceAll(`最小实现`,` minimal implementation `).toLowerCase(),n=new Set([`the`,`and`,`for`,`with`,`this`,`that`,`user`,`about`,`feature`,`flag`,`name`]);return((t.match(/[a-z0-9][a-z0-9_-]{2,}/g)??[]).filter(e=>!n.has(e)).slice(0,5).join(`-`)||`learned-gap`).slice(0,54).replace(/-+$/g,``)}function L(e,t){return e.replace(/\s+/g,` `).trim().slice(0,t)}function R(e){return f(`sha1`).update(e).digest(`hex`)}async function z(){try{let{clearCommandsCache:e}=await import(`./commands-Cn1P7Tms.js`);e()}catch{}}var B,V,H;e((()=>{i(),t(),c(),B=2,V=4,H=2}))();export{y as findGapKeyByDraftPath,x as promoteGapToDraft,v as readSkillGaps,b as recordDraftHit,_ as recordSkillGap,S as rejectSkillGap,w as shouldPromoteToActive,C as shouldPromoteToDraft};
@@ -1,6 +1,6 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-DfkgIdYf.js";import{o as r,t as i}from"./localSearch-BxLYi6w_.js";import{l as a,u as o}from"./instinctParser-Dt-lqnDe.js";import{basename as s,dirname as c,join as l}from"node:path";import{existsSync as u}from"node:fs";import{mkdir as d,readFile as f,readdir as p,rename as m,rm as ee,writeFile as h}from"node:fs/promises";function g(e){return e.length!==0&&e.reduce((e,t)=>e+t.confidence,0)/e.length>=a().minConfidence}function te(e){let t=e[0]?.domain??`project`,n=b[t],r=new Set;for(let t of e){for(let e of`${t.trigger} ${t.action}`.toLowerCase().split(/[^a-z0-9]+/))if(y(e)&&r.add(e),r.size>=5)break;if(r.size>=5)break}let i=_([n,...r].join(`-`));return v(i)?`${n}-learned-pattern`:i}function _(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``).slice(0,64).replace(/-$/g,``)||`learned-skill`}function v(e){return x.has(e)}function y(e){return e.length>2&&![`when`,`with`,`this`,`that`,`user`,`project`,`prefer`,`avoid`,`use`,`using`,`the`,`and`,`for`].includes(e)}var b,x,S=e((()=>{o(),b={workflow:`workflow`,testing:`testing`,debugging:`debugging`,"code-style":`style`,security:`security`,git:`git`,project:`project`},x=new Set([`learned-skill`,`better-skill`,`new-skill`,`project-skill`,`workflow-skill`])}));function C(e,t){if(e.length===0)throw Error(`Cannot generate a skill draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=t?.name?_(t.name):E(e),i=e.reduce((e,t)=>e+t.confidence,0)/e.length,a=t?.description??D(e),o=re(r,n,t),s=O({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function w(e,t,n){let r=C(e,t),i=await P(`skill`,r,n);for(let t of i){let n=ie(r,t);if(n>=.8)return{action:`append-evidence`,target:t,overlap:n,appendedPath:await ne(t,e)}}return{action:`create`,draft:r}}async function ne(e,t){let n=await f(e.path,`utf8`).catch(()=>e.content);if(Buffer.byteLength(n,`utf8`)>=M)return e.path;let r=t.flatMap(e=>e.evidence.map(e=>`- ${e}`)),a=r.slice(0,A);a.length<r.length&&a.push(`- [... ${r.length-a.length} more evidence entries omitted]`);let o=[``,`## Learned evidence (${new Date().toISOString()})`,``,...a,``].join(`
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-DfkgIdYf.js";import{o as r,t as i}from"./localSearch-BU02Qsv9.js";import{l as a,u as o}from"./instinctParser-Dt-lqnDe.js";import{basename as s,dirname as c,join as l}from"node:path";import{existsSync as u}from"node:fs";import{mkdir as d,readFile as f,readdir as p,rename as m,rm as ee,writeFile as h}from"node:fs/promises";function g(e){return e.length!==0&&e.reduce((e,t)=>e+t.confidence,0)/e.length>=a().minConfidence}function te(e){let t=e[0]?.domain??`project`,n=b[t],r=new Set;for(let t of e){for(let e of`${t.trigger} ${t.action}`.toLowerCase().split(/[^a-z0-9]+/))if(y(e)&&r.add(e),r.size>=5)break;if(r.size>=5)break}let i=_([n,...r].join(`-`));return v(i)?`${n}-learned-pattern`:i}function _(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``).slice(0,64).replace(/-$/g,``)||`learned-skill`}function v(e){return x.has(e)}function y(e){return e.length>2&&![`when`,`with`,`this`,`that`,`user`,`project`,`prefer`,`avoid`,`use`,`using`,`the`,`and`,`for`].includes(e)}var b,x,S=e((()=>{o(),b={workflow:`workflow`,testing:`testing`,debugging:`debugging`,"code-style":`style`,security:`security`,git:`git`,project:`project`},x=new Set([`learned-skill`,`better-skill`,`new-skill`,`project-skill`,`workflow-skill`])}));function C(e,t){if(e.length===0)throw Error(`Cannot generate a skill draft without instincts`);let n=t?.scope??e[0]?.scope??`project`,r=t?.name?_(t.name):E(e),i=e.reduce((e,t)=>e+t.confidence,0)/e.length,a=t?.description??D(e),o=re(r,n,t),s=O({name:r,description:a,confidence:i,instincts:e});return{name:r,description:a,scope:n,sourceInstinctIds:e.map(e=>e.id),confidence:Number(i.toFixed(2)),content:s,outputPath:o}}async function w(e,t,n){let r=C(e,t),i=await P(`skill`,r,n);for(let t of i){let n=ie(r,t);if(n>=.8)return{action:`append-evidence`,target:t,overlap:n,appendedPath:await ne(t,e)}}return{action:`create`,draft:r}}async function ne(e,t){let n=await f(e.path,`utf8`).catch(()=>e.content);if(Buffer.byteLength(n,`utf8`)>=M)return e.path;let r=t.flatMap(e=>e.evidence.map(e=>`- ${e}`)),a=r.slice(0,A);a.length<r.length&&a.push(`- [... ${r.length-a.length} more evidence entries omitted]`);let o=[``,`## Learned evidence (${new Date().toISOString()})`,``,...a,``].join(`
2
2
  `),s=n.endsWith(`
3
- `)?n+o:`${n}\n${o}`,c=Buffer.byteLength(s,`utf8`)>M?s.slice(0,M):s;return await h(e.path,c,`utf8`),i(),e.path}async function T(e){await d(e.outputPath,{recursive:!0});let t=l(e.outputPath,`SKILL.md`);await h(t,e.content,`utf8`),i();try{let{clearCommandsCache:e}=await import(`./commands-CVCpJo7M.js`);e()}catch{}return t}function re(e,n,r){return r?.outputRoot?l(r.outputRoot,e):n===`project`?l(r?.cwd??process.cwd(),`.workmate`,`skills`,e):l(r?.globalSkillsDir??l(t(),`skills`),e)}function E(e){return te(e)}function D(e){let t=(e[0]?.action??`Apply a learned project pattern`).replace(/\s+/g,` `).slice(0,120);return t.length>0?t:`Apply learned project patterns`}function O(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`# ${k(t)}`,``,`## Trigger`,``,i.map(e=>`- ${e.trigger}`).join(`
3
+ `)?n+o:`${n}\n${o}`,c=Buffer.byteLength(s,`utf8`)>M?s.slice(0,M):s;return await h(e.path,c,`utf8`),i(),e.path}async function T(e){await d(e.outputPath,{recursive:!0});let t=l(e.outputPath,`SKILL.md`);await h(t,e.content,`utf8`),i();try{let{clearCommandsCache:e}=await import(`./commands-Cn1P7Tms.js`);e()}catch{}return t}function re(e,n,r){return r?.outputRoot?l(r.outputRoot,e):n===`project`?l(r?.cwd??process.cwd(),`.workmate`,`skills`,e):l(r?.globalSkillsDir??l(t(),`skills`),e)}function E(e){return te(e)}function D(e){let t=(e[0]?.action??`Apply a learned project pattern`).replace(/\s+/g,` `).slice(0,120);return t.length>0?t:`Apply learned project patterns`}function O(e){let{name:t,description:n,confidence:r,instincts:i}=e;return[`---`,`name: ${t}`,`description: ${JSON.stringify(n)}`,`origin: skill-learning`,`confidence: ${Number(r.toFixed(2))}`,`evolved_from: [${i.map(e=>JSON.stringify(e.id)).join(`, `)}]`,`---`,``,`# ${k(t)}`,``,`## Trigger`,``,i.map(e=>`- ${e.trigger}`).join(`
4
4
  `),``,`## Action`,``,i.map(e=>`- ${e.action}`).join(`
5
5
  `),``,`## Evidence`,``,i.flatMap(e=>e.evidence.map(e=>`- ${e}`)).slice(0,j).join(`
6
6
  `),``].join(`
@@ -1,6 +1,6 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{HC as n,UC as r}from"./loadAgentsDir-B0Anodo0.js";import{I as i,P as a,ai as o,hn as s,t as c,y as l}from"./src-DL3w8VPk.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{i as d,t as f}from"./overlayContext-8--_fbvY.js";function p(){return[`Skill Search (自动技能匹配)`,`Status: ${r()?`enabled`:`disabled`}`,``,`When enabled, relevant skills are automatically matched and`,`injected into conversation context each turn.`].join(`
2
- `)}async function m(){if(r()&&process.env.SKILL_SEARCH_ENABLED!==`0`)return`Skill Search: already enabled`;process.env.SKILL_SEARCH_ENABLED=`1`;let e=[`Skill Search: enabled (SKILL_SEARCH_ENABLED=1)`];try{let{clearSkillIndexCache:t}=await import(`./localSearch-zfn7jgrh.js`);t(),e.push(`Skill index cache: cleared (will rebuild on next search)`)}catch{e.push(`Skill index cache: clear skipped`)}return e.join(`
3
- `)}async function h(){return r()?(process.env.SKILL_SEARCH_ENABLED=`0`,`Skill Search: disabled (SKILL_SEARCH_ENABLED=0)`):`Skill Search: already disabled`}function g({onDone:e}){d(`skill-search-panel`);let[t,n]=(0,v.useState)(0),r=(0,v.useMemo)(()=>[{label:`Status`,description:`显示自动 skill 匹配是否已启用`,run:()=>Promise.resolve(p())},{label:`Start`,description:`为本次会话启用自动 skill 匹配`,run:m},{label:`Stop`,description:`为本次会话禁用自动 skill 匹配`,run:h},{label:`About`,description:`自动 skill 匹配的工作原理`,run:()=>Promise.resolve(x)}],[]),o=()=>{let n=r[t];n&&n.run().then(t=>{e(t,{display:`system`})})};return s((e,t)=>{if(t.upArrow){n(e=>Math.max(0,e-1));return}if(t.downArrow){n(e=>Math.min(r.length-1,e+1));return}t.return&&o()}),(0,y.jsx)(l,{title:`Skill Search`,subtitle:`${r.length} actions`,onCancel:()=>e(`Skill search panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,y.jsxs)(i,{flexDirection:`column`,children:[r.map((e,n)=>(0,y.jsxs)(i,{flexDirection:`row`,children:[(0,y.jsx)(a,{children:`${n===t?`›`:` `} ${e.label}`.padEnd(b)}),(0,y.jsx)(a,{dimColor:!0,children:e.description})]},e.label)),(0,y.jsx)(i,{marginTop:1,children:(0,y.jsx)(a,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function _(e,t,n){let r=n?.trim()??``;return r===`start`?(e(await m(),{display:`system`}),null):r===`stop`?(e(await h(),{display:`system`}),null):r===`about`?(e(x,{display:`system`}),null):r===`status`?(e(p(),{display:`system`}),null):(0,y.jsx)(g,{onDone:e})}var v,y,b,x;e((()=>{v=t(o(),1),c(),f(),n(),y=u(),b=28,x=`# Skill Search (自动技能匹配)
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,ai as i,hn as a,t as o,y as s}from"./src-DL3w8VPk.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{JC as l,qC as u}from"./loadAgentsDir-DGozQu_6.js";import{i as d,t as f}from"./overlayContext-CLjlCFBl.js";function p(){return[`Skill Search (自动技能匹配)`,`Status: ${l()?`enabled`:`disabled`}`,``,`When enabled, relevant skills are automatically matched and`,`injected into conversation context each turn.`].join(`
2
+ `)}async function m(){if(l()&&process.env.SKILL_SEARCH_ENABLED!==`0`)return`Skill Search: already enabled`;process.env.SKILL_SEARCH_ENABLED=`1`;let e=[`Skill Search: enabled (SKILL_SEARCH_ENABLED=1)`];try{let{clearSkillIndexCache:t}=await import(`./localSearch-DyaB2Rm-.js`);t(),e.push(`Skill index cache: cleared (will rebuild on next search)`)}catch{e.push(`Skill index cache: clear skipped`)}return e.join(`
3
+ `)}async function h(){return l()?(process.env.SKILL_SEARCH_ENABLED=`0`,`Skill Search: disabled (SKILL_SEARCH_ENABLED=0)`):`Skill Search: already disabled`}function g({onDone:e}){d(`skill-search-panel`);let[t,i]=(0,v.useState)(0),o=(0,v.useMemo)(()=>[{label:`Status`,description:`显示自动 skill 匹配是否已启用`,run:()=>Promise.resolve(p())},{label:`Start`,description:`为本次会话启用自动 skill 匹配`,run:m},{label:`Stop`,description:`为本次会话禁用自动 skill 匹配`,run:h},{label:`About`,description:`自动 skill 匹配的工作原理`,run:()=>Promise.resolve(x)}],[]),c=()=>{let n=o[t];n&&n.run().then(t=>{e(t,{display:`system`})})};return a((e,t)=>{if(t.upArrow){i(e=>Math.max(0,e-1));return}if(t.downArrow){i(e=>Math.min(o.length-1,e+1));return}t.return&&c()}),(0,y.jsx)(s,{title:`Skill Search`,subtitle:`${o.length} actions`,onCancel:()=>e(`Skill search panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,y.jsxs)(n,{flexDirection:`column`,children:[o.map((e,i)=>(0,y.jsxs)(n,{flexDirection:`row`,children:[(0,y.jsx)(r,{children:`${i===t?`›`:` `} ${e.label}`.padEnd(b)}),(0,y.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,y.jsx)(n,{marginTop:1,children:(0,y.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function _(e,t,n){let r=n?.trim()??``;return r===`start`?(e(await m(),{display:`system`}),null):r===`stop`?(e(await h(),{display:`system`}),null):r===`about`?(e(x,{display:`system`}),null):r===`status`?(e(p(),{display:`system`}),null):(0,y.jsx)(g,{onDone:e})}var v,y,b,x;e((()=>{v=t(i(),1),o(),f(),u(),y=c(),b=28,x=`# Skill Search (自动技能匹配)
4
4
 
5
5
  Skill Search 控制对话中的自动技能匹配功能。
6
6
 
@@ -17,5 +17,5 @@ Skill Search 控制对话中的自动技能匹配功能。
17
17
  - /skill-search stop — 禁用自动匹配
18
18
  - /skill-search status — 查看当前状态
19
19
 
20
- 当前状态: ${r()?`已启用`:`未启用`}
20
+ 当前状态: ${l()?`已启用`:`未启用`}
21
21
  `}))();export{_ as call};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,ai as i,h as a,t as o,y as s}from"./src-DL3w8VPk.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{Hi as l,Mi as u,Ni as d,Wi as f,hd as p,md as m}from"./loadAgentsDir-DGozQu_6.js";import{ln as h,sn as g}from"./settings-CodSADx8.js";import{l as _,o as v}from"./stringUtils-Bu_lJH5c.js";import{_ as y,g as b}from"./startupProfiler-DF0AjiDf.js";function x(e,t){let n=t.trim();if(n===``)return e.slice();let r=n.toLowerCase().split(/\s+/);return e.filter(e=>{let t=`${e.name} ${e.description}`.toLowerCase();return r.every(e=>t.includes(e))})}var S=e((()=>{}));function C(e){return e===`plugin`?`plugin`:e===`mcp`?`mcp`:g(e)}function w({onExit:e,commands:t}){let[i,o]=(0,T.useState)(``),c=(0,T.useMemo)(()=>t.filter(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`commands_DEPRECATED`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)),[t]),u=(0,T.useMemo)(()=>x(c.map(e=>({...e,name:d(e),description:e.description??``})),i),[c,i]),f=(0,T.useMemo)(()=>{let e={policySettings:[],userSettings:[],projectSettings:[],localSettings:[],flagSettings:[],plugin:[],mcp:[]};for(let t of u){let n=t.source;n in e&&e[n].push(t)}for(let t of Object.values(e))t.sort((e,t)=>d(e).localeCompare(d(t)));return e},[u]),p=()=>{e(`Skills dialog dismissed`,{display:`system`})};if(c.length===0)return(0,E.jsxs)(s,{title:`Skills`,subtitle:`No skills found`,onCancel:p,hideInputGuide:!0,children:[(0,E.jsx)(r,{dimColor:!0,children:`Create skills in .workmate/skills/ or ~/.workmate/skills/`}),(0,E.jsx)(r,{dimColor:!0,italic:!0,children:(0,E.jsx)(m,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`close`})})]});let h=e=>{switch(e){case`projectSettings`:case`localSettings`:return{label:`local`,color:`yellow`};case`userSettings`:return{label:`global`,color:`cyan`};case`policySettings`:return{label:`managed`,color:`magenta`};default:return}},g=(e,t)=>{let i=`~${b(l(e))}`,a=e.source===`plugin`?e.pluginInfo?.pluginManifest.name:void 0,o=h(e.source);return(0,E.jsxs)(n,{children:[(0,E.jsx)(r,{color:t?`suggestion`:void 0,children:d(e)}),o&&(0,E.jsxs)(r,{color:o.color,children:[` [`,o.label,`]`]}),(0,E.jsxs)(r,{dimColor:!0,children:[a?` · ${a}`:``,` · `,C(e.source),` · `,i,` tokens`]})]})};return(0,E.jsx)(a,{title:`Skills`,placeholder:`Type to filter skills…`,items:(0,T.useMemo)(()=>D.flatMap(e=>f[e]),[f]),getKey:e=>`${e.name}-${e.source}`,visibleCount:12,direction:`down`,onQueryChange:o,onSelect:t=>{e(`/${d(t)}`,{display:`user`})},onCancel:p,emptyMessage:e=>e.trim()?`No skills matching "${e.trim()}"`:`No skills found`,matchLabel:i.trim()===``?`${c.length} ${_(c.length,`skill`)}`:`${u.length}/${c.length} ${_(c.length,`skill`)}`,selectAction:`invoke skill`,renderItem:(e,t)=>g(e,t)})}var T,E,D,O=e((()=>{T=t(i(),1),u(),o(),f(),y(),h(),v(),p(),S(),E=c(),D=[`projectSettings`,`localSettings`,`userSettings`,`flagSettings`,`policySettings`,`plugin`,`mcp`]}));async function k(e,t){return(0,A.jsx)(w,{onExit:e,commands:t.options.commands})}var A;e((()=>{O(),A=c()}))();export{k as call};