@agentxm/client-core 0.16.2 → 0.18.0

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 (494) hide show
  1. package/dist/src/unstable/agent-capabilities/catalog.d.ts +7589 -2945
  2. package/dist/src/unstable/agent-capabilities/catalog.d.ts.map +1 -1
  3. package/dist/src/unstable/agent-capabilities/data/agents/adal.d.ts +46 -24
  4. package/dist/src/unstable/agent-capabilities/data/agents/adal.d.ts.map +1 -1
  5. package/dist/src/unstable/agent-capabilities/data/agents/adal.js +52 -24
  6. package/dist/src/unstable/agent-capabilities/data/agents/adal.js.map +1 -1
  7. package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.d.ts +24 -17
  8. package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.d.ts.map +1 -1
  9. package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.js +24 -17
  10. package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.js.map +1 -1
  11. package/dist/src/unstable/agent-capabilities/data/agents/amp.d.ts +71 -32
  12. package/dist/src/unstable/agent-capabilities/data/agents/amp.d.ts.map +1 -1
  13. package/dist/src/unstable/agent-capabilities/data/agents/amp.js +76 -32
  14. package/dist/src/unstable/agent-capabilities/data/agents/amp.js.map +1 -1
  15. package/dist/src/unstable/agent-capabilities/data/agents/antigravity.d.ts +90 -36
  16. package/dist/src/unstable/agent-capabilities/data/agents/antigravity.d.ts.map +1 -1
  17. package/dist/src/unstable/agent-capabilities/data/agents/antigravity.js +101 -36
  18. package/dist/src/unstable/agent-capabilities/data/agents/antigravity.js.map +1 -1
  19. package/dist/src/unstable/agent-capabilities/data/agents/augment.d.ts +252 -34
  20. package/dist/src/unstable/agent-capabilities/data/agents/augment.d.ts.map +1 -1
  21. package/dist/src/unstable/agent-capabilities/data/agents/augment.js +226 -34
  22. package/dist/src/unstable/agent-capabilities/data/agents/augment.js.map +1 -1
  23. package/dist/src/unstable/agent-capabilities/data/agents/claude-code.d.ts +200 -31
  24. package/dist/src/unstable/agent-capabilities/data/agents/claude-code.d.ts.map +1 -1
  25. package/dist/src/unstable/agent-capabilities/data/agents/claude-code.js +159 -33
  26. package/dist/src/unstable/agent-capabilities/data/agents/claude-code.js.map +1 -1
  27. package/dist/src/unstable/agent-capabilities/data/agents/cline.d.ts +82 -28
  28. package/dist/src/unstable/agent-capabilities/data/agents/cline.d.ts.map +1 -1
  29. package/dist/src/unstable/agent-capabilities/data/agents/cline.js +87 -28
  30. package/dist/src/unstable/agent-capabilities/data/agents/cline.js.map +1 -1
  31. package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.d.ts +24 -17
  32. package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.d.ts.map +1 -1
  33. package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.js +24 -17
  34. package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.js.map +1 -1
  35. package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.d.ts +272 -33
  36. package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.d.ts.map +1 -1
  37. package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.js +253 -33
  38. package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.js.map +1 -1
  39. package/dist/src/unstable/agent-capabilities/data/agents/codemaker.d.ts +24 -17
  40. package/dist/src/unstable/agent-capabilities/data/agents/codemaker.d.ts.map +1 -1
  41. package/dist/src/unstable/agent-capabilities/data/agents/codemaker.js +24 -17
  42. package/dist/src/unstable/agent-capabilities/data/agents/codemaker.js.map +1 -1
  43. package/dist/src/unstable/agent-capabilities/data/agents/codestudio.d.ts +24 -17
  44. package/dist/src/unstable/agent-capabilities/data/agents/codestudio.d.ts.map +1 -1
  45. package/dist/src/unstable/agent-capabilities/data/agents/codestudio.js +24 -17
  46. package/dist/src/unstable/agent-capabilities/data/agents/codestudio.js.map +1 -1
  47. package/dist/src/unstable/agent-capabilities/data/agents/codex.d.ts +222 -56
  48. package/dist/src/unstable/agent-capabilities/data/agents/codex.d.ts.map +1 -1
  49. package/dist/src/unstable/agent-capabilities/data/agents/codex.js +197 -60
  50. package/dist/src/unstable/agent-capabilities/data/agents/codex.js.map +1 -1
  51. package/dist/src/unstable/agent-capabilities/data/agents/command-code.d.ts +24 -19
  52. package/dist/src/unstable/agent-capabilities/data/agents/command-code.d.ts.map +1 -1
  53. package/dist/src/unstable/agent-capabilities/data/agents/command-code.js +24 -19
  54. package/dist/src/unstable/agent-capabilities/data/agents/command-code.js.map +1 -1
  55. package/dist/src/unstable/agent-capabilities/data/agents/continue.d.ts +36 -22
  56. package/dist/src/unstable/agent-capabilities/data/agents/continue.d.ts.map +1 -1
  57. package/dist/src/unstable/agent-capabilities/data/agents/continue.js +39 -22
  58. package/dist/src/unstable/agent-capabilities/data/agents/continue.js.map +1 -1
  59. package/dist/src/unstable/agent-capabilities/data/agents/cortex.d.ts +24 -17
  60. package/dist/src/unstable/agent-capabilities/data/agents/cortex.d.ts.map +1 -1
  61. package/dist/src/unstable/agent-capabilities/data/agents/cortex.js +24 -17
  62. package/dist/src/unstable/agent-capabilities/data/agents/cortex.js.map +1 -1
  63. package/dist/src/unstable/agent-capabilities/data/agents/crush.d.ts +61 -29
  64. package/dist/src/unstable/agent-capabilities/data/agents/crush.d.ts.map +1 -1
  65. package/dist/src/unstable/agent-capabilities/data/agents/crush.js +66 -29
  66. package/dist/src/unstable/agent-capabilities/data/agents/crush.js.map +1 -1
  67. package/dist/src/unstable/agent-capabilities/data/agents/cursor.d.ts +36 -31
  68. package/dist/src/unstable/agent-capabilities/data/agents/cursor.d.ts.map +1 -1
  69. package/dist/src/unstable/agent-capabilities/data/agents/cursor.js +37 -33
  70. package/dist/src/unstable/agent-capabilities/data/agents/cursor.js.map +1 -1
  71. package/dist/src/unstable/agent-capabilities/data/agents/deepagents.d.ts +24 -17
  72. package/dist/src/unstable/agent-capabilities/data/agents/deepagents.d.ts.map +1 -1
  73. package/dist/src/unstable/agent-capabilities/data/agents/deepagents.js +24 -17
  74. package/dist/src/unstable/agent-capabilities/data/agents/deepagents.js.map +1 -1
  75. package/dist/src/unstable/agent-capabilities/data/agents/devin.d.ts +263 -35
  76. package/dist/src/unstable/agent-capabilities/data/agents/devin.d.ts.map +1 -1
  77. package/dist/src/unstable/agent-capabilities/data/agents/devin.js +254 -35
  78. package/dist/src/unstable/agent-capabilities/data/agents/devin.js.map +1 -1
  79. package/dist/src/unstable/agent-capabilities/data/agents/dexto.d.ts +24 -17
  80. package/dist/src/unstable/agent-capabilities/data/agents/dexto.d.ts.map +1 -1
  81. package/dist/src/unstable/agent-capabilities/data/agents/dexto.js +24 -17
  82. package/dist/src/unstable/agent-capabilities/data/agents/dexto.js.map +1 -1
  83. package/dist/src/unstable/agent-capabilities/data/agents/droid.d.ts +24 -19
  84. package/dist/src/unstable/agent-capabilities/data/agents/droid.d.ts.map +1 -1
  85. package/dist/src/unstable/agent-capabilities/data/agents/droid.js +24 -19
  86. package/dist/src/unstable/agent-capabilities/data/agents/droid.js.map +1 -1
  87. package/dist/src/unstable/agent-capabilities/data/agents/firebender.d.ts +24 -17
  88. package/dist/src/unstable/agent-capabilities/data/agents/firebender.d.ts.map +1 -1
  89. package/dist/src/unstable/agent-capabilities/data/agents/firebender.js +24 -17
  90. package/dist/src/unstable/agent-capabilities/data/agents/firebender.js.map +1 -1
  91. package/dist/src/unstable/agent-capabilities/data/agents/forgecode.d.ts +24 -18
  92. package/dist/src/unstable/agent-capabilities/data/agents/forgecode.d.ts.map +1 -1
  93. package/dist/src/unstable/agent-capabilities/data/agents/forgecode.js +24 -18
  94. package/dist/src/unstable/agent-capabilities/data/agents/forgecode.js.map +1 -1
  95. package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.d.ts +207 -38
  96. package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.d.ts.map +1 -1
  97. package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.js +212 -41
  98. package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.js.map +1 -1
  99. package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.d.ts +30 -24
  100. package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.d.ts.map +1 -1
  101. package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.js +33 -24
  102. package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.js.map +1 -1
  103. package/dist/src/unstable/agent-capabilities/data/agents/goose.d.ts +37 -53
  104. package/dist/src/unstable/agent-capabilities/data/agents/goose.d.ts.map +1 -1
  105. package/dist/src/unstable/agent-capabilities/data/agents/goose.js +37 -55
  106. package/dist/src/unstable/agent-capabilities/data/agents/goose.js.map +1 -1
  107. package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.d.ts +59 -28
  108. package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.d.ts.map +1 -1
  109. package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.js +66 -28
  110. package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.js.map +1 -1
  111. package/dist/src/unstable/agent-capabilities/data/agents/hermes.d.ts +49 -21
  112. package/dist/src/unstable/agent-capabilities/data/agents/hermes.d.ts.map +1 -1
  113. package/dist/src/unstable/agent-capabilities/data/agents/hermes.js +39 -21
  114. package/dist/src/unstable/agent-capabilities/data/agents/hermes.js.map +1 -1
  115. package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.d.ts +34 -23
  116. package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.d.ts.map +1 -1
  117. package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.js +37 -23
  118. package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.js.map +1 -1
  119. package/dist/src/unstable/agent-capabilities/data/agents/junie.d.ts +71 -47
  120. package/dist/src/unstable/agent-capabilities/data/agents/junie.d.ts.map +1 -1
  121. package/dist/src/unstable/agent-capabilities/data/agents/junie.js +84 -47
  122. package/dist/src/unstable/agent-capabilities/data/agents/junie.js.map +1 -1
  123. package/dist/src/unstable/agent-capabilities/data/agents/kilo.d.ts +90 -70
  124. package/dist/src/unstable/agent-capabilities/data/agents/kilo.d.ts.map +1 -1
  125. package/dist/src/unstable/agent-capabilities/data/agents/kilo.js +97 -74
  126. package/dist/src/unstable/agent-capabilities/data/agents/kilo.js.map +1 -1
  127. package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.d.ts +24 -18
  128. package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.d.ts.map +1 -1
  129. package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.js +24 -18
  130. package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.js.map +1 -1
  131. package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.d.ts +60 -33
  132. package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.d.ts.map +1 -1
  133. package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.js +69 -33
  134. package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.js.map +1 -1
  135. package/dist/src/unstable/agent-capabilities/data/agents/kode.d.ts +24 -20
  136. package/dist/src/unstable/agent-capabilities/data/agents/kode.d.ts.map +1 -1
  137. package/dist/src/unstable/agent-capabilities/data/agents/kode.js +24 -20
  138. package/dist/src/unstable/agent-capabilities/data/agents/kode.js.map +1 -1
  139. package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.d.ts +24 -17
  140. package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.d.ts.map +1 -1
  141. package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.js +24 -17
  142. package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.js.map +1 -1
  143. package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.d.ts +24 -20
  144. package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.d.ts.map +1 -1
  145. package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.js +24 -20
  146. package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.js.map +1 -1
  147. package/dist/src/unstable/agent-capabilities/data/agents/mux.d.ts +24 -19
  148. package/dist/src/unstable/agent-capabilities/data/agents/mux.d.ts.map +1 -1
  149. package/dist/src/unstable/agent-capabilities/data/agents/mux.js +24 -19
  150. package/dist/src/unstable/agent-capabilities/data/agents/mux.js.map +1 -1
  151. package/dist/src/unstable/agent-capabilities/data/agents/neovate.d.ts +24 -18
  152. package/dist/src/unstable/agent-capabilities/data/agents/neovate.d.ts.map +1 -1
  153. package/dist/src/unstable/agent-capabilities/data/agents/neovate.js +24 -18
  154. package/dist/src/unstable/agent-capabilities/data/agents/neovate.js.map +1 -1
  155. package/dist/src/unstable/agent-capabilities/data/agents/openclaw.d.ts +24 -17
  156. package/dist/src/unstable/agent-capabilities/data/agents/openclaw.d.ts.map +1 -1
  157. package/dist/src/unstable/agent-capabilities/data/agents/openclaw.js +24 -17
  158. package/dist/src/unstable/agent-capabilities/data/agents/openclaw.js.map +1 -1
  159. package/dist/src/unstable/agent-capabilities/data/agents/opencode.d.ts +98 -32
  160. package/dist/src/unstable/agent-capabilities/data/agents/opencode.d.ts.map +1 -1
  161. package/dist/src/unstable/agent-capabilities/data/agents/opencode.js +101 -32
  162. package/dist/src/unstable/agent-capabilities/data/agents/opencode.js.map +1 -1
  163. package/dist/src/unstable/agent-capabilities/data/agents/openhands.d.ts +25 -19
  164. package/dist/src/unstable/agent-capabilities/data/agents/openhands.d.ts.map +1 -1
  165. package/dist/src/unstable/agent-capabilities/data/agents/openhands.js +25 -19
  166. package/dist/src/unstable/agent-capabilities/data/agents/openhands.js.map +1 -1
  167. package/dist/src/unstable/agent-capabilities/data/agents/pi.d.ts +30 -22
  168. package/dist/src/unstable/agent-capabilities/data/agents/pi.d.ts.map +1 -1
  169. package/dist/src/unstable/agent-capabilities/data/agents/pi.js +30 -22
  170. package/dist/src/unstable/agent-capabilities/data/agents/pi.js.map +1 -1
  171. package/dist/src/unstable/agent-capabilities/data/agents/pochi.d.ts +24 -18
  172. package/dist/src/unstable/agent-capabilities/data/agents/pochi.d.ts.map +1 -1
  173. package/dist/src/unstable/agent-capabilities/data/agents/pochi.js +24 -18
  174. package/dist/src/unstable/agent-capabilities/data/agents/pochi.js.map +1 -1
  175. package/dist/src/unstable/agent-capabilities/data/agents/qoder.d.ts +199 -40
  176. package/dist/src/unstable/agent-capabilities/data/agents/qoder.d.ts.map +1 -1
  177. package/dist/src/unstable/agent-capabilities/data/agents/qoder.js +175 -43
  178. package/dist/src/unstable/agent-capabilities/data/agents/qoder.js.map +1 -1
  179. package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.d.ts +239 -34
  180. package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.d.ts.map +1 -1
  181. package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.js +209 -34
  182. package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.js.map +1 -1
  183. package/dist/src/unstable/agent-capabilities/data/agents/replit.d.ts +24 -18
  184. package/dist/src/unstable/agent-capabilities/data/agents/replit.d.ts.map +1 -1
  185. package/dist/src/unstable/agent-capabilities/data/agents/replit.js +24 -18
  186. package/dist/src/unstable/agent-capabilities/data/agents/replit.js.map +1 -1
  187. package/dist/src/unstable/agent-capabilities/data/agents/roo.d.ts +46 -64
  188. package/dist/src/unstable/agent-capabilities/data/agents/roo.d.ts.map +1 -1
  189. package/dist/src/unstable/agent-capabilities/data/agents/roo.js +48 -67
  190. package/dist/src/unstable/agent-capabilities/data/agents/roo.js.map +1 -1
  191. package/dist/src/unstable/agent-capabilities/data/agents/rovodev.d.ts +24 -18
  192. package/dist/src/unstable/agent-capabilities/data/agents/rovodev.d.ts.map +1 -1
  193. package/dist/src/unstable/agent-capabilities/data/agents/rovodev.js +24 -18
  194. package/dist/src/unstable/agent-capabilities/data/agents/rovodev.js.map +1 -1
  195. package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.d.ts +24 -18
  196. package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.d.ts.map +1 -1
  197. package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.js +24 -18
  198. package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.js.map +1 -1
  199. package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.d.ts +24 -19
  200. package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.d.ts.map +1 -1
  201. package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.js +24 -19
  202. package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.js.map +1 -1
  203. package/dist/src/unstable/agent-capabilities/data/agents/trae.d.ts +24 -19
  204. package/dist/src/unstable/agent-capabilities/data/agents/trae.d.ts.map +1 -1
  205. package/dist/src/unstable/agent-capabilities/data/agents/trae.js +24 -19
  206. package/dist/src/unstable/agent-capabilities/data/agents/trae.js.map +1 -1
  207. package/dist/src/unstable/agent-capabilities/data/agents/warp.d.ts +24 -17
  208. package/dist/src/unstable/agent-capabilities/data/agents/warp.d.ts.map +1 -1
  209. package/dist/src/unstable/agent-capabilities/data/agents/warp.js +24 -17
  210. package/dist/src/unstable/agent-capabilities/data/agents/warp.js.map +1 -1
  211. package/dist/src/unstable/agent-capabilities/data/agents/windsurf.d.ts +232 -39
  212. package/dist/src/unstable/agent-capabilities/data/agents/windsurf.d.ts.map +1 -1
  213. package/dist/src/unstable/agent-capabilities/data/agents/windsurf.js +177 -42
  214. package/dist/src/unstable/agent-capabilities/data/agents/windsurf.js.map +1 -1
  215. package/dist/src/unstable/agent-capabilities/data/agents/zencoder.d.ts +34 -23
  216. package/dist/src/unstable/agent-capabilities/data/agents/zencoder.d.ts.map +1 -1
  217. package/dist/src/unstable/agent-capabilities/data/agents/zencoder.js +34 -23
  218. package/dist/src/unstable/agent-capabilities/data/agents/zencoder.js.map +1 -1
  219. package/dist/src/unstable/agent-capabilities/derive.d.ts +76 -14
  220. package/dist/src/unstable/agent-capabilities/derive.d.ts.map +1 -1
  221. package/dist/src/unstable/agent-capabilities/derive.js +167 -38
  222. package/dist/src/unstable/agent-capabilities/derive.js.map +1 -1
  223. package/dist/src/unstable/agent-capabilities/index.d.ts +2 -2
  224. package/dist/src/unstable/agent-capabilities/index.d.ts.map +1 -1
  225. package/dist/src/unstable/agent-capabilities/index.js +2 -2
  226. package/dist/src/unstable/agent-capabilities/index.js.map +1 -1
  227. package/dist/src/unstable/agent-capabilities/schema.d.ts +653 -479
  228. package/dist/src/unstable/agent-capabilities/schema.d.ts.map +1 -1
  229. package/dist/src/unstable/agent-capabilities/schema.js +330 -117
  230. package/dist/src/unstable/agent-capabilities/schema.js.map +1 -1
  231. package/dist/src/unstable/agents/augment/service.d.ts.map +1 -1
  232. package/dist/src/unstable/agents/augment/service.js +4 -9
  233. package/dist/src/unstable/agents/augment/service.js.map +1 -1
  234. package/dist/src/unstable/agents/codex/service.js +1 -1
  235. package/dist/src/unstable/agents/codex/service.js.map +1 -1
  236. package/dist/src/unstable/agents/gemini-cli/service.js +1 -1
  237. package/dist/src/unstable/agents/instructions.d.ts +3 -3
  238. package/dist/src/unstable/agents/instructions.d.ts.map +1 -1
  239. package/dist/src/unstable/agents/instructions.js +16 -4
  240. package/dist/src/unstable/agents/instructions.js.map +1 -1
  241. package/dist/src/unstable/agents/junie/service.d.ts.map +1 -1
  242. package/dist/src/unstable/agents/junie/service.js +5 -0
  243. package/dist/src/unstable/agents/junie/service.js.map +1 -1
  244. package/dist/src/unstable/agents/kiro-cli/service.d.ts.map +1 -1
  245. package/dist/src/unstable/agents/kiro-cli/service.js +3 -8
  246. package/dist/src/unstable/agents/kiro-cli/service.js.map +1 -1
  247. package/dist/src/unstable/agents/mcp-sync.d.ts.map +1 -1
  248. package/dist/src/unstable/agents/mcp-sync.js +27 -11
  249. package/dist/src/unstable/agents/mcp-sync.js.map +1 -1
  250. package/dist/src/unstable/agents/repository.d.ts.map +1 -1
  251. package/dist/src/unstable/agents/repository.js +63 -42
  252. package/dist/src/unstable/agents/repository.js.map +1 -1
  253. package/dist/src/unstable/app-error/cause-chain.d.ts +11 -0
  254. package/dist/src/unstable/app-error/cause-chain.d.ts.map +1 -0
  255. package/dist/src/unstable/app-error/cause-chain.js +91 -0
  256. package/dist/src/unstable/app-error/cause-chain.js.map +1 -0
  257. package/dist/src/unstable/app-error/index.d.ts +1 -0
  258. package/dist/src/unstable/app-error/index.d.ts.map +1 -1
  259. package/dist/src/unstable/app-error/index.js +1 -0
  260. package/dist/src/unstable/app-error/index.js.map +1 -1
  261. package/dist/src/unstable/app-error/render.d.ts.map +1 -1
  262. package/dist/src/unstable/app-error/render.js +11 -29
  263. package/dist/src/unstable/app-error/render.js.map +1 -1
  264. package/dist/src/unstable/auth/auth-client.d.ts +1 -1
  265. package/dist/src/unstable/auth/auth-middleware.d.ts +2 -2
  266. package/dist/src/unstable/auth/device-login.d.ts +1 -1
  267. package/dist/src/unstable/auth/guard.d.ts +1 -1
  268. package/dist/src/unstable/auth/loopback-login.d.ts +1 -1
  269. package/dist/src/unstable/auth/token-resolution.d.ts +1 -1
  270. package/dist/src/unstable/cli/prompt/autocomplete-multiselect.d.ts +1 -0
  271. package/dist/src/unstable/cli/prompt/autocomplete-multiselect.d.ts.map +1 -1
  272. package/dist/src/unstable/cli/prompt/autocomplete-multiselect.js +11 -1
  273. package/dist/src/unstable/cli/prompt/autocomplete-multiselect.js.map +1 -1
  274. package/dist/src/unstable/cli-runtime/command-summary.d.ts +1 -1
  275. package/dist/src/unstable/cli-runtime/command-summary.d.ts.map +1 -1
  276. package/dist/src/unstable/cli-runtime/command-summary.js.map +1 -1
  277. package/dist/src/unstable/cli-runtime/handle-error.d.ts +4 -1
  278. package/dist/src/unstable/cli-runtime/handle-error.d.ts.map +1 -1
  279. package/dist/src/unstable/cli-runtime/handle-error.js +13 -17
  280. package/dist/src/unstable/cli-runtime/handle-error.js.map +1 -1
  281. package/dist/src/unstable/cli-runtime/json-envelope.d.ts +17 -2
  282. package/dist/src/unstable/cli-runtime/json-envelope.d.ts.map +1 -1
  283. package/dist/src/unstable/cli-runtime/json-envelope.js +10 -2
  284. package/dist/src/unstable/cli-runtime/json-envelope.js.map +1 -1
  285. package/dist/src/unstable/cli-runtime/run-cli-main.d.ts.map +1 -1
  286. package/dist/src/unstable/cli-runtime/run-cli-main.js +29 -8
  287. package/dist/src/unstable/cli-runtime/run-cli-main.js.map +1 -1
  288. package/dist/src/unstable/cli-runtime/runtime-envelope.d.ts +1 -1
  289. package/dist/src/unstable/cli-runtime/runtime-envelope.d.ts.map +1 -1
  290. package/dist/src/unstable/cli-runtime/runtime-envelope.js +2 -3
  291. package/dist/src/unstable/cli-runtime/runtime-envelope.js.map +1 -1
  292. package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts +1 -1
  293. package/dist/src/unstable/extensions/configured-entry.d.ts +11 -0
  294. package/dist/src/unstable/extensions/configured-entry.d.ts.map +1 -0
  295. package/dist/src/unstable/extensions/configured-entry.js +8 -0
  296. package/dist/src/unstable/extensions/configured-entry.js.map +1 -0
  297. package/dist/src/unstable/extensions/index.d.ts +1 -0
  298. package/dist/src/unstable/extensions/index.d.ts.map +1 -1
  299. package/dist/src/unstable/extensions/index.js +1 -0
  300. package/dist/src/unstable/extensions/index.js.map +1 -1
  301. package/dist/src/unstable/extensions/materializable-from-disk.d.ts.map +1 -1
  302. package/dist/src/unstable/extensions/materializable-from-disk.js +5 -4
  303. package/dist/src/unstable/extensions/materializable-from-disk.js.map +1 -1
  304. package/dist/src/unstable/files/manager.d.ts.map +1 -1
  305. package/dist/src/unstable/files/manager.js +2 -2
  306. package/dist/src/unstable/files/manager.js.map +1 -1
  307. package/dist/src/unstable/git/detect.d.ts +7 -0
  308. package/dist/src/unstable/git/detect.d.ts.map +1 -0
  309. package/dist/src/unstable/git/detect.js +23 -0
  310. package/dist/src/unstable/git/detect.js.map +1 -0
  311. package/dist/src/unstable/git/index.d.ts +1 -0
  312. package/dist/src/unstable/git/index.d.ts.map +1 -1
  313. package/dist/src/unstable/git/index.js +1 -0
  314. package/dist/src/unstable/git/index.js.map +1 -1
  315. package/dist/src/unstable/hooks/manager.d.ts.map +1 -1
  316. package/dist/src/unstable/hooks/manager.js +169 -49
  317. package/dist/src/unstable/hooks/manager.js.map +1 -1
  318. package/dist/src/unstable/hooks/manifest-schema.d.ts +126 -5
  319. package/dist/src/unstable/hooks/manifest-schema.d.ts.map +1 -1
  320. package/dist/src/unstable/hooks/manifest-schema.js +74 -9
  321. package/dist/src/unstable/hooks/manifest-schema.js.map +1 -1
  322. package/dist/src/unstable/hooks/operations/new-hook.d.ts +2 -2
  323. package/dist/src/unstable/hooks/operations/new-hook.d.ts.map +1 -1
  324. package/dist/src/unstable/hooks/operations/new-hook.js +4 -2
  325. package/dist/src/unstable/hooks/operations/new-hook.js.map +1 -1
  326. package/dist/src/unstable/libraries/index.d.ts +3 -0
  327. package/dist/src/unstable/libraries/index.d.ts.map +1 -0
  328. package/dist/src/unstable/libraries/index.js +2 -0
  329. package/dist/src/unstable/libraries/index.js.map +1 -0
  330. package/dist/src/unstable/libraries/ref.d.ts +17 -0
  331. package/dist/src/unstable/libraries/ref.d.ts.map +1 -0
  332. package/dist/src/unstable/libraries/ref.js +43 -0
  333. package/dist/src/unstable/libraries/ref.js.map +1 -0
  334. package/dist/src/unstable/lint/catalog/hook/matcher-raw-portability.d.ts +4 -0
  335. package/dist/src/unstable/lint/catalog/hook/matcher-raw-portability.d.ts.map +1 -0
  336. package/dist/src/unstable/lint/catalog/hook/matcher-raw-portability.js +51 -0
  337. package/dist/src/unstable/lint/catalog/hook/matcher-raw-portability.js.map +1 -0
  338. package/dist/src/unstable/lint/catalog/hook.d.ts.map +1 -1
  339. package/dist/src/unstable/lint/catalog/hook.js +2 -0
  340. package/dist/src/unstable/lint/catalog/hook.js.map +1 -1
  341. package/dist/src/unstable/lint/catalog/mcp-server/manifest-keys-recognized.js +2 -2
  342. package/dist/src/unstable/lint/catalog/mcp-server/manifest-keys-recognized.js.map +1 -1
  343. package/dist/src/unstable/lint/catalog/mcp-server/manifest-present.js +3 -3
  344. package/dist/src/unstable/lint/catalog/mcp-server/manifest-present.js.map +1 -1
  345. package/dist/src/unstable/lint/catalog/mcp-server/manifest-schema-valid.js +2 -2
  346. package/dist/src/unstable/lint/catalog/mcp-server/manifest-schema-valid.js.map +1 -1
  347. package/dist/src/unstable/lint/catalog/shared/manifest-json.js +1 -1
  348. package/dist/src/unstable/lint/catalog/shared/manifest-json.js.map +1 -1
  349. package/dist/src/unstable/lint/catalog/shared/schema-rule.js +1 -1
  350. package/dist/src/unstable/lint/catalog/shared/schema-rule.js.map +1 -1
  351. package/dist/src/unstable/lint/catalog/workspace/mcp-server-agent-drift.d.ts.map +1 -1
  352. package/dist/src/unstable/lint/catalog/workspace/mcp-server-agent-drift.js +6 -3
  353. package/dist/src/unstable/lint/catalog/workspace/mcp-server-agent-drift.js.map +1 -1
  354. package/dist/src/unstable/lint/catalog/workspace/mcp-server-agent-orphaned.d.ts.map +1 -1
  355. package/dist/src/unstable/lint/catalog/workspace/mcp-server-agent-orphaned.js +4 -1
  356. package/dist/src/unstable/lint/catalog/workspace/mcp-server-agent-orphaned.js.map +1 -1
  357. package/dist/src/unstable/lockfile/index.d.ts +3 -3
  358. package/dist/src/unstable/lockfile/index.d.ts.map +1 -1
  359. package/dist/src/unstable/lockfile/index.js +2 -2
  360. package/dist/src/unstable/lockfile/index.js.map +1 -1
  361. package/dist/src/unstable/lockfile/lockfile.d.ts +969 -36
  362. package/dist/src/unstable/lockfile/lockfile.d.ts.map +1 -1
  363. package/dist/src/unstable/lockfile/lockfile.js +223 -31
  364. package/dist/src/unstable/lockfile/lockfile.js.map +1 -1
  365. package/dist/src/unstable/lockfile/schema.d.ts +96 -0
  366. package/dist/src/unstable/lockfile/schema.d.ts.map +1 -1
  367. package/dist/src/unstable/lockfile/schema.js +54 -0
  368. package/dist/src/unstable/lockfile/schema.js.map +1 -1
  369. package/dist/src/unstable/mcps/config-writer.d.ts.map +1 -1
  370. package/dist/src/unstable/mcps/config-writer.js +89 -58
  371. package/dist/src/unstable/mcps/config-writer.js.map +1 -1
  372. package/dist/src/unstable/mcps/index.d.ts +1 -0
  373. package/dist/src/unstable/mcps/index.d.ts.map +1 -1
  374. package/dist/src/unstable/mcps/index.js +1 -0
  375. package/dist/src/unstable/mcps/index.js.map +1 -1
  376. package/dist/src/unstable/mcps/inspection.d.ts.map +1 -1
  377. package/dist/src/unstable/mcps/inspection.js +29 -8
  378. package/dist/src/unstable/mcps/inspection.js.map +1 -1
  379. package/dist/src/unstable/mcps/manifest-schema.d.ts +3 -3
  380. package/dist/src/unstable/mcps/manifest-schema.d.ts.map +1 -1
  381. package/dist/src/unstable/mcps/manifest-schema.js +4 -4
  382. package/dist/src/unstable/mcps/manifest-schema.js.map +1 -1
  383. package/dist/src/unstable/mcps/metadata.d.ts +26 -0
  384. package/dist/src/unstable/mcps/metadata.d.ts.map +1 -0
  385. package/dist/src/unstable/mcps/metadata.js +75 -0
  386. package/dist/src/unstable/mcps/metadata.js.map +1 -0
  387. package/dist/src/unstable/mcps/operations/publish.d.ts +1 -1
  388. package/dist/src/unstable/mcps/operations/publish.js +1 -1
  389. package/dist/src/unstable/mcps/projection.d.ts.map +1 -1
  390. package/dist/src/unstable/mcps/projection.js +22 -4
  391. package/dist/src/unstable/mcps/projection.js.map +1 -1
  392. package/dist/src/unstable/mcps/resolution.d.ts.map +1 -1
  393. package/dist/src/unstable/mcps/resolution.js +18 -10
  394. package/dist/src/unstable/mcps/resolution.js.map +1 -1
  395. package/dist/src/unstable/packs/dependency-resolution.d.ts +3 -1
  396. package/dist/src/unstable/packs/dependency-resolution.d.ts.map +1 -1
  397. package/dist/src/unstable/packs/dependency-resolution.js +11 -10
  398. package/dist/src/unstable/packs/dependency-resolution.js.map +1 -1
  399. package/dist/src/unstable/packs/expansion.d.ts +3 -0
  400. package/dist/src/unstable/packs/expansion.d.ts.map +1 -1
  401. package/dist/src/unstable/packs/expansion.js +2 -2
  402. package/dist/src/unstable/packs/expansion.js.map +1 -1
  403. package/dist/src/unstable/publish/manifest-policy.d.ts +42 -2
  404. package/dist/src/unstable/publish/manifest-policy.d.ts.map +1 -1
  405. package/dist/src/unstable/registry/__generated__/registry-client.d.ts +2304 -127
  406. package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
  407. package/dist/src/unstable/registry/__generated__/registry-client.js +369 -10
  408. package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
  409. package/dist/src/unstable/registry/admin-client.d.ts +72 -0
  410. package/dist/src/unstable/registry/admin-client.d.ts.map +1 -0
  411. package/dist/src/unstable/registry/admin-client.js +71 -0
  412. package/dist/src/unstable/registry/admin-client.js.map +1 -0
  413. package/dist/src/unstable/registry/client.d.ts +52 -0
  414. package/dist/src/unstable/registry/client.d.ts.map +1 -1
  415. package/dist/src/unstable/registry/client.js.map +1 -1
  416. package/dist/src/unstable/registry/index.d.ts +6 -2
  417. package/dist/src/unstable/registry/index.d.ts.map +1 -1
  418. package/dist/src/unstable/registry/index.js +3 -1
  419. package/dist/src/unstable/registry/index.js.map +1 -1
  420. package/dist/src/unstable/registry/local-client.d.ts.map +1 -1
  421. package/dist/src/unstable/registry/local-client.js +1 -0
  422. package/dist/src/unstable/registry/local-client.js.map +1 -1
  423. package/dist/src/unstable/registry/release-age-policy.d.ts +18 -0
  424. package/dist/src/unstable/registry/release-age-policy.d.ts.map +1 -0
  425. package/dist/src/unstable/registry/release-age-policy.js +41 -0
  426. package/dist/src/unstable/registry/release-age-policy.js.map +1 -0
  427. package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
  428. package/dist/src/unstable/registry/remote-client.js +59 -0
  429. package/dist/src/unstable/registry/remote-client.js.map +1 -1
  430. package/dist/src/unstable/registry/utils.d.ts +2 -0
  431. package/dist/src/unstable/registry/utils.d.ts.map +1 -1
  432. package/dist/src/unstable/registry/utils.js +7 -0
  433. package/dist/src/unstable/registry/utils.js.map +1 -1
  434. package/dist/src/unstable/rules/manager.d.ts.map +1 -1
  435. package/dist/src/unstable/rules/manager.js +2 -2
  436. package/dist/src/unstable/rules/manager.js.map +1 -1
  437. package/dist/src/unstable/settings/index.d.ts +2 -2
  438. package/dist/src/unstable/settings/index.d.ts.map +1 -1
  439. package/dist/src/unstable/settings/index.js +1 -1
  440. package/dist/src/unstable/settings/index.js.map +1 -1
  441. package/dist/src/unstable/settings/schema.d.ts +62 -5
  442. package/dist/src/unstable/settings/schema.d.ts.map +1 -1
  443. package/dist/src/unstable/settings/schema.js +88 -4
  444. package/dist/src/unstable/settings/schema.js.map +1 -1
  445. package/dist/src/unstable/source-resolution/providers/registry/host-provider.d.ts.map +1 -1
  446. package/dist/src/unstable/source-resolution/providers/registry/host-provider.js +8 -7
  447. package/dist/src/unstable/source-resolution/providers/registry/host-provider.js.map +1 -1
  448. package/dist/src/unstable/sources/provider.d.ts +3 -0
  449. package/dist/src/unstable/sources/provider.d.ts.map +1 -1
  450. package/dist/src/unstable/utils/transient-backup.d.ts +27 -0
  451. package/dist/src/unstable/utils/transient-backup.d.ts.map +1 -0
  452. package/dist/src/unstable/utils/transient-backup.js +53 -0
  453. package/dist/src/unstable/utils/transient-backup.js.map +1 -0
  454. package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts +9 -8
  455. package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts.map +1 -1
  456. package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js +30 -0
  457. package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js.map +1 -1
  458. package/dist/src/unstable/workspace/initialization-interaction.d.ts.map +1 -1
  459. package/dist/src/unstable/workspace/initialization-interaction.js +1 -0
  460. package/dist/src/unstable/workspace/initialization-interaction.js.map +1 -1
  461. package/dist/src/unstable/workspace/initialization.d.ts +56 -24
  462. package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
  463. package/dist/src/unstable/workspace/initialization.js +5 -2
  464. package/dist/src/unstable/workspace/initialization.js.map +1 -1
  465. package/dist/src/unstable/workspace/read-model/__fixtures__/builder.d.ts +1 -1
  466. package/dist/src/unstable/workspace/read-model/__fixtures__/builder.d.ts.map +1 -1
  467. package/dist/src/unstable/workspace/read-model/__fixtures__/builder.js +14 -5
  468. package/dist/src/unstable/workspace/read-model/__fixtures__/builder.js.map +1 -1
  469. package/dist/src/unstable/workspace/service-interface.d.ts +27 -2
  470. package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
  471. package/dist/src/unstable/workspace/service-interface.js.map +1 -1
  472. package/dist/src/unstable/workspace/service.d.ts +85 -7
  473. package/dist/src/unstable/workspace/service.d.ts.map +1 -1
  474. package/dist/src/unstable/workspace/service.js +148 -50
  475. package/dist/src/unstable/workspace/service.js.map +1 -1
  476. package/dist/src/unstable/workspace/test-stubs.d.ts +2 -0
  477. package/dist/src/unstable/workspace/test-stubs.d.ts.map +1 -1
  478. package/dist/src/unstable/workspace/test-stubs.js +11 -0
  479. package/dist/src/unstable/workspace/test-stubs.js.map +1 -1
  480. package/dist/src/unstable/workspace/version-currency/collectors.d.ts.map +1 -1
  481. package/dist/src/unstable/workspace/version-currency/collectors.js +2 -3
  482. package/dist/src/unstable/workspace/version-currency/collectors.js.map +1 -1
  483. package/dist/src/unstable/workspace/version-currency/test-stubs.d.ts.map +1 -1
  484. package/dist/src/unstable/workspace/version-currency/test-stubs.js +1 -0
  485. package/dist/src/unstable/workspace/version-currency/test-stubs.js.map +1 -1
  486. package/dist/src/unstable/yaml/index.d.ts +13 -0
  487. package/dist/src/unstable/yaml/index.d.ts.map +1 -0
  488. package/dist/src/unstable/yaml/index.js +73 -0
  489. package/dist/src/unstable/yaml/index.js.map +1 -0
  490. package/package.json +12 -4
  491. package/site-content/__generated__/schemas/axm-lock.schema.json +77 -0
  492. package/site-content/__generated__/schemas/hook.schema.json +166 -10
  493. package/site-content/__generated__/schemas/{mcp-server.schema.json → mcp.schema.json} +1 -1
  494. package/site-content/__generated__/schemas/settings.schema.json +80 -11
@@ -2,10 +2,11 @@
2
2
  * WorkspaceMutations mutation facade implementation.
3
3
  *
4
4
  * This is the sole public gateway for all settings and lockfile read/write
5
- * operations. It reads through `WorkspaceReadModel` and calls the write I/O
6
- * functions (`writeSettings`, `writeLockfile`) directly while managing mutation
7
- * serialization via a single Semaphore(1). No other service should perform
8
- * settings or lockfile I/O in production; the per-service semaphores in
5
+ * operations. It reads through `WorkspaceReadModel`, writes settings directly,
6
+ * and commits lockfile snapshots through the lockfile module so cross-process
7
+ * updates are serialized and merged per entry. It also serializes in-process
8
+ * mutations via a single Semaphore(1). No other service should perform settings
9
+ * or lockfile I/O in production; the per-service semaphores in
9
10
  * `settings/service.ts` and `lockfile/service.ts` have been removed.
10
11
  *
11
12
  * Supporting logic is split into focused modules:
@@ -21,13 +22,14 @@ import * as Path from "effect/Path";
21
22
  import * as Option from "effect/Option";
22
23
  import * as Schema from "effect/Schema";
23
24
  import * as Semaphore from "effect/Semaphore";
24
- import { LOCKFILE_NAME, LOCKFILE_VERSION, makeRegistryPackLockEntry, writeLockfile, } from "../lockfile/index.js";
25
+ import { LOCKFILE_NAME, LOCKFILE_VERSION, commitLockfileSnapshotUpdate, makeRegistryLibraryLockEntry, makeRegistryPackLockEntry, } from "../lockfile/index.js";
25
26
  import { computeSkillPaths } from "../skills/paths.js";
26
27
  import { computePackPaths } from "../packs/paths.js";
27
28
  import { sanitizeName } from "../extensions/utils.js";
28
29
  import { ConfigurableAgentIdSchema, decodeExtensionNameSync, formatFqn, parseExtensionFqnParts, parseRegistrySourcePatternParts, } from "../extensions/index.js";
29
30
  import { makeAppError } from "../app-error/index.js";
30
31
  import { createDefaultSettings, SETTINGS_FILENAME, writeSettings, } from "../settings/index.js";
32
+ import { DEFAULT_MINIMUM_RELEASE_AGE } from "../registry/index.js";
31
33
  import { lockEntryToSourceParams, printSourceParams } from "../sources/index.js";
32
34
  import { makeAbsolutePath } from "../utils/path-types.js";
33
35
  import { getAxmDir } from "./paths.js";
@@ -274,6 +276,19 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
274
276
  return Option.some(globalSettings.owner);
275
277
  return Option.none();
276
278
  }),
279
+ getMinimumReleaseAge: Effect.fn("WorkspaceMutations.getMinimumReleaseAge")(function* () {
280
+ const scopedSettings = yield* readSettingsSafe(workspaceDir);
281
+ if (scopedSettings.minimumReleaseAge !== undefined) {
282
+ return scopedSettings.minimumReleaseAge;
283
+ }
284
+ if (options.scope === "project") {
285
+ const globalSettings = yield* readSettingsSafe(globalDir);
286
+ if (globalSettings.minimumReleaseAge !== undefined) {
287
+ return globalSettings.minimumReleaseAge;
288
+ }
289
+ }
290
+ return DEFAULT_MINIMUM_RELEASE_AGE;
291
+ }),
277
292
  addConfiguredSource: (source) => withMutex(Effect.gen(function* () {
278
293
  const current = yield* readSettingsSafe(workspaceDir);
279
294
  const currentSources = current.sources ?? [];
@@ -337,7 +352,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
337
352
  },
338
353
  },
339
354
  };
340
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
355
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
341
356
  })).pipe(Effect.withSpan("WorkspaceMutations.setFiles")),
342
357
  setFilesLock: ({ name, lockEntry }) => withMutex(Effect.gen(function* () {
343
358
  const currentLockfile = yield* readLockfileSafe(workspaceDir);
@@ -354,7 +369,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
354
369
  },
355
370
  },
356
371
  };
357
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
372
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
358
373
  })).pipe(Effect.withSpan("WorkspaceMutations.setFilesLock")),
359
374
  removeFiles: (name) => withMutex(Effect.gen(function* () {
360
375
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -376,7 +391,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
376
391
  })()
377
392
  : currentLockfile;
378
393
  yield* writeSettings(workspaceDir, remainingSettings).pipe(Effect.provide(fsLayer));
379
- yield* writeLockfile(workspaceDir, remainingLockfile).pipe(Effect.provide(fsLayer));
394
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, remainingLockfile).pipe(Effect.provide(fsLayer));
380
395
  })).pipe(Effect.withSpan("WorkspaceMutations.removeFiles")),
381
396
  removeFilesSettings: (name) => withMutex(Effect.gen(function* () {
382
397
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -397,10 +412,11 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
397
412
  return;
398
413
  const { [name]: _, ...remainingContext } = currentLockedContext;
399
414
  void _;
400
- yield* writeLockfile(workspaceDir, {
415
+ const updatedLockfile = {
401
416
  ...currentLockfile,
402
417
  files: remainingContext,
403
- }).pipe(Effect.provide(fsLayer));
418
+ };
419
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
404
420
  })).pipe(Effect.withSpan("WorkspaceMutations.removeFilesLock")),
405
421
  updateFilesEntry: (name, updater) => withMutex(Effect.gen(function* () {
406
422
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -449,7 +465,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
449
465
  const currentLockfile = yield* readLockfileSafe(workspaceDir);
450
466
  const currentLockedRules = currentLockfile.rules ?? {};
451
467
  const previous = currentLockedRules[name];
452
- yield* writeLockfile(workspaceDir, {
468
+ const updatedLockfile = {
453
469
  ...currentLockfile,
454
470
  rules: {
455
471
  ...currentLockedRules,
@@ -459,13 +475,14 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
459
475
  updatedAt: new Date(),
460
476
  },
461
477
  },
462
- }).pipe(Effect.provide(fsLayer));
478
+ };
479
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
463
480
  })).pipe(Effect.withSpan("WorkspaceMutations.setRule")),
464
481
  setRuleLock: ({ name, lockEntry }) => withMutex(Effect.gen(function* () {
465
482
  const currentLockfile = yield* readLockfileSafe(workspaceDir);
466
483
  const currentLockedRules = currentLockfile.rules ?? {};
467
484
  const previous = currentLockedRules[name];
468
- yield* writeLockfile(workspaceDir, {
485
+ const updatedLockfile = {
469
486
  ...currentLockfile,
470
487
  rules: {
471
488
  ...currentLockedRules,
@@ -475,7 +492,8 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
475
492
  updatedAt: new Date(),
476
493
  },
477
494
  },
478
- }).pipe(Effect.provide(fsLayer));
495
+ };
496
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
479
497
  })).pipe(Effect.withSpan("WorkspaceMutations.setRuleLock")),
480
498
  removeRule: (name) => withMutex(Effect.gen(function* () {
481
499
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -497,7 +515,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
497
515
  })()
498
516
  : currentLockfile;
499
517
  yield* writeSettings(workspaceDir, remainingSettings).pipe(Effect.provide(fsLayer));
500
- yield* writeLockfile(workspaceDir, remainingLockfile).pipe(Effect.provide(fsLayer));
518
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, remainingLockfile).pipe(Effect.provide(fsLayer));
501
519
  })).pipe(Effect.withSpan("WorkspaceMutations.removeRule")),
502
520
  removeRuleSettings: (name) => withMutex(Effect.gen(function* () {
503
521
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -518,10 +536,11 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
518
536
  return;
519
537
  const { [name]: _, ...remainingRules } = currentLockedRules;
520
538
  void _;
521
- yield* writeLockfile(workspaceDir, {
539
+ const updatedLockfile = {
522
540
  ...currentLockfile,
523
541
  rules: remainingRules,
524
- }).pipe(Effect.provide(fsLayer));
542
+ };
543
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
525
544
  })).pipe(Effect.withSpan("WorkspaceMutations.removeRuleLock")),
526
545
  updateRuleEntry: (name, updater) => withMutex(Effect.gen(function* () {
527
546
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -570,7 +589,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
570
589
  const currentLockfile = yield* readLockfileSafe(workspaceDir);
571
590
  const currentLockedHooks = currentLockfile.hooks ?? {};
572
591
  const previous = currentLockedHooks[name];
573
- yield* writeLockfile(workspaceDir, {
592
+ const updatedLockfile = {
574
593
  ...currentLockfile,
575
594
  hooks: {
576
595
  ...currentLockedHooks,
@@ -580,13 +599,14 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
580
599
  updatedAt: new Date(),
581
600
  },
582
601
  },
583
- }).pipe(Effect.provide(fsLayer));
602
+ };
603
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
584
604
  })).pipe(Effect.withSpan("WorkspaceMutations.setHook")),
585
605
  setHookLock: ({ name, lockEntry }) => withMutex(Effect.gen(function* () {
586
606
  const currentLockfile = yield* readLockfileSafe(workspaceDir);
587
607
  const currentLockedHooks = currentLockfile.hooks ?? {};
588
608
  const previous = currentLockedHooks[name];
589
- yield* writeLockfile(workspaceDir, {
609
+ const updatedLockfile = {
590
610
  ...currentLockfile,
591
611
  hooks: {
592
612
  ...currentLockedHooks,
@@ -596,7 +616,8 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
596
616
  updatedAt: new Date(),
597
617
  },
598
618
  },
599
- }).pipe(Effect.provide(fsLayer));
619
+ };
620
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
600
621
  })).pipe(Effect.withSpan("WorkspaceMutations.setHookLock")),
601
622
  removeHook: (name) => withMutex(Effect.gen(function* () {
602
623
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -618,7 +639,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
618
639
  })()
619
640
  : currentLockfile;
620
641
  yield* writeSettings(workspaceDir, remainingSettings).pipe(Effect.provide(fsLayer));
621
- yield* writeLockfile(workspaceDir, remainingLockfile).pipe(Effect.provide(fsLayer));
642
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, remainingLockfile).pipe(Effect.provide(fsLayer));
622
643
  })).pipe(Effect.withSpan("WorkspaceMutations.removeHook")),
623
644
  removeHookSettings: (name) => withMutex(Effect.gen(function* () {
624
645
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -639,10 +660,11 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
639
660
  return;
640
661
  const { [name]: _, ...remainingHooks } = currentLockedHooks;
641
662
  void _;
642
- yield* writeLockfile(workspaceDir, {
663
+ const updatedLockfile = {
643
664
  ...currentLockfile,
644
665
  hooks: remainingHooks,
645
- }).pipe(Effect.provide(fsLayer));
666
+ };
667
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
646
668
  })).pipe(Effect.withSpan("WorkspaceMutations.removeHookLock")),
647
669
  updateHookEntry: (name, updater) => withMutex(Effect.gen(function* () {
648
670
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -733,7 +755,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
733
755
  },
734
756
  },
735
757
  };
736
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
758
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
737
759
  })).pipe(Effect.withSpan("WorkspaceMutations.setSkill")),
738
760
  setSkillLock: ({ name, lockEntry }) => withMutex(Effect.gen(function* () {
739
761
  // Update lockfile only (skip settings) — used for pack dependencies
@@ -751,7 +773,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
751
773
  },
752
774
  },
753
775
  };
754
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
776
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
755
777
  })).pipe(Effect.withSpan("WorkspaceMutations.setSkillLock")),
756
778
  removeSkill: (name) => withMutex(Effect.gen(function* () {
757
779
  // Update settings
@@ -771,7 +793,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
771
793
  const { [name]: __, ...remainingLockSkills } = currentLockfile.skills;
772
794
  void __;
773
795
  const updatedLockfile = { ...currentLockfile, skills: remainingLockSkills };
774
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
796
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
775
797
  }
776
798
  })).pipe(Effect.withSpan("WorkspaceMutations.removeSkill")),
777
799
  removeSkillFromSettings: (name) => withMutex(Effect.gen(function* () {
@@ -814,7 +836,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
814
836
  [name]: { ...oldEntry, agents: [...agents] },
815
837
  },
816
838
  };
817
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
839
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
818
840
  })),
819
841
  addConfiguredAgent: (agentId) => withMutex(Effect.gen(function* () {
820
842
  const validId = yield* Schema.decodeUnknownEffect(ConfigurableAgentIdSchema)(agentId).pipe(Effect.mapError((error) => makeAppError({
@@ -885,7 +907,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
885
907
  },
886
908
  },
887
909
  };
888
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
910
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
889
911
  })).pipe(Effect.withSpan("WorkspaceMutations.setPack")),
890
912
  setPackEntry: (name, entry) => withMutex(Effect.gen(function* () {
891
913
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -913,9 +935,65 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
913
935
  const { [name]: __, ...remainingLockedPacks } = currentLockedPacks;
914
936
  void __;
915
937
  const updatedLockfile = { ...currentLockfile, packs: remainingLockedPacks };
916
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
938
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
917
939
  }
918
940
  })).pipe(Effect.withSpan("WorkspaceMutations.removePack")),
941
+ getConfiguredLibraryEntries: () => readSettingsSafe(workspaceDir).pipe(Effect.map((s) => s.libraries ?? {}), Effect.withSpan("WorkspaceMutations.getConfiguredLibraryEntries")),
942
+ getLockedLibraries: () => readLockfileSafe(workspaceDir).pipe(Effect.map((lf) => lf.libraries ?? {})),
943
+ getLockedLibrary: (name) => readLockfileSafe(workspaceDir).pipe(Effect.map((lf) => Option.fromUndefinedOr((lf.libraries ?? {})[name]))),
944
+ setLibrary: (args) => withMutex(Effect.gen(function* () {
945
+ const { source, name, ...lockFields } = args;
946
+ const lockEntry = makeRegistryLibraryLockEntry({
947
+ ...lockFields,
948
+ name,
949
+ });
950
+ const currentSettings = yield* readSettingsSafe(workspaceDir);
951
+ const currentLibraries = currentSettings.libraries ?? {};
952
+ const existing = currentLibraries[name];
953
+ const enabled = existing?.enabled ?? true;
954
+ const authored = existing?.authored ?? false;
955
+ const updatedSettings = {
956
+ ...currentSettings,
957
+ libraries: { ...currentLibraries, [name]: { source, enabled, authored } },
958
+ };
959
+ yield* writeSettings(workspaceDir, updatedSettings).pipe(Effect.provide(fsLayer));
960
+ const currentLockfile = yield* readLockfileSafe(workspaceDir);
961
+ const currentLockedLibraries = currentLockfile.libraries ?? {};
962
+ const updatedLockfile = {
963
+ ...currentLockfile,
964
+ libraries: {
965
+ ...currentLockedLibraries,
966
+ [name]: {
967
+ ...lockEntry,
968
+ updatedAt: new Date(),
969
+ },
970
+ },
971
+ };
972
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
973
+ })).pipe(Effect.withSpan("WorkspaceMutations.setLibrary")),
974
+ setLibraryEntry: (name, entry) => withMutex(Effect.gen(function* () {
975
+ const currentSettings = yield* readSettingsSafe(workspaceDir);
976
+ const currentLibraries = currentSettings.libraries ?? {};
977
+ const updatedSettings = {
978
+ ...currentSettings,
979
+ libraries: { ...currentLibraries, [name]: entry },
980
+ };
981
+ yield* writeSettings(workspaceDir, updatedSettings).pipe(Effect.provide(fsLayer));
982
+ })).pipe(Effect.withSpan("WorkspaceMutations.setLibraryEntry")),
983
+ removeLibrary: (name) => withMutex(Effect.gen(function* () {
984
+ const currentSettings = yield* readSettingsSafe(workspaceDir);
985
+ const currentLibraries = currentSettings.libraries ?? {};
986
+ const { [name]: removedLibrary, ...remainingLibraries } = currentLibraries;
987
+ void removedLibrary;
988
+ const updatedSettings = { ...currentSettings, libraries: remainingLibraries };
989
+ yield* writeSettings(workspaceDir, updatedSettings).pipe(Effect.provide(fsLayer));
990
+ const currentLockfile = yield* readLockfileSafe(workspaceDir);
991
+ const currentLockedLibraries = currentLockfile.libraries ?? {};
992
+ const { [name]: removedLock, ...remainingLockedLibraries } = currentLockedLibraries;
993
+ void removedLock;
994
+ const updatedLockfile = { ...currentLockfile, libraries: remainingLockedLibraries };
995
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
996
+ })).pipe(Effect.withSpan("WorkspaceMutations.removeLibrary")),
919
997
  getPackDir: (name, owner) => Effect.succeed(computePackPaths(path.join, baseDir, owner, name)),
920
998
  // -----------------------------------------------------------------------
921
999
  // Command methods
@@ -952,7 +1030,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
952
1030
  },
953
1031
  },
954
1032
  };
955
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1033
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
956
1034
  })).pipe(Effect.withSpan("WorkspaceMutations.setCommand")),
957
1035
  setCommandLock: ({ name, lockEntry }) => withMutex(Effect.gen(function* () {
958
1036
  // Update lockfile only (skip settings) — used for pack dependencies
@@ -968,7 +1046,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
968
1046
  },
969
1047
  },
970
1048
  };
971
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1049
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
972
1050
  })),
973
1051
  removeCommand: (name) => withMutex(Effect.gen(function* () {
974
1052
  // Update settings
@@ -991,7 +1069,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
991
1069
  ...currentLockfile,
992
1070
  commands: remainingLockedCommands,
993
1071
  };
994
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1072
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
995
1073
  }
996
1074
  })).pipe(Effect.withSpan("WorkspaceMutations.removeCommand")),
997
1075
  updateCommandEntry: (name, updater) => withMutex(Effect.gen(function* () {
@@ -1059,7 +1137,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1059
1137
  },
1060
1138
  },
1061
1139
  };
1062
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1140
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1063
1141
  })).pipe(Effect.withSpan("WorkspaceMutations.setSubagent")),
1064
1142
  setSubagentLock: ({ name, lockEntry }) => withMutex(Effect.gen(function* () {
1065
1143
  // Update lockfile only (skip settings) — used for pack dependencies
@@ -1078,7 +1156,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1078
1156
  },
1079
1157
  },
1080
1158
  };
1081
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1159
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1082
1160
  })),
1083
1161
  removeSubagent: (name) => withMutex(Effect.gen(function* () {
1084
1162
  // Update settings
@@ -1101,7 +1179,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1101
1179
  ...currentLockfile,
1102
1180
  subagents: remainingLockedSubagents,
1103
1181
  };
1104
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1182
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1105
1183
  }
1106
1184
  })).pipe(Effect.withSpan("WorkspaceMutations.removeSubagent")),
1107
1185
  updateSubagentEntry: (name, updater) => withMutex(Effect.gen(function* () {
@@ -1144,7 +1222,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1144
1222
  const { [name]: _, ...remaining } = currentLockedSubagents;
1145
1223
  void _;
1146
1224
  const updatedLockfile = { ...currentLockfile, subagents: remaining };
1147
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1225
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1148
1226
  })).pipe(Effect.withSpan("WorkspaceMutations.removeSubagentLock")),
1149
1227
  // -----------------------------------------------------------------------
1150
1228
  // MCP Server methods
@@ -1202,7 +1280,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1202
1280
  },
1203
1281
  },
1204
1282
  };
1205
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1283
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1206
1284
  })).pipe(Effect.withSpan("WorkspaceMutations.setMcpServer")),
1207
1285
  setMcpServerLock: ({ name, lockEntry }) => withMutex(Effect.gen(function* () {
1208
1286
  // Update lockfile only (skip settings) — used for pack dependencies
@@ -1218,7 +1296,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1218
1296
  },
1219
1297
  },
1220
1298
  };
1221
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1299
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1222
1300
  })),
1223
1301
  updateMcpServerEntry: (name, updater) => withMutex(Effect.gen(function* () {
1224
1302
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -1264,7 +1342,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1264
1342
  ...currentLockfile,
1265
1343
  mcpServers: remainingLockedMcpServers,
1266
1344
  };
1267
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1345
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1268
1346
  }
1269
1347
  })).pipe(Effect.withSpan("WorkspaceMutations.removeMcpServer")),
1270
1348
  // -----------------------------------------------------------------------
@@ -1277,7 +1355,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1277
1355
  const { [name]: _, ...remainingSkills } = currentLockfile.skills;
1278
1356
  void _;
1279
1357
  const updatedLockfile = { ...currentLockfile, skills: remainingSkills };
1280
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1358
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1281
1359
  })).pipe(Effect.withSpan("WorkspaceMutations.removeSkillLock")),
1282
1360
  removeCommandSettings: (name) => withMutex(Effect.gen(function* () {
1283
1361
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -1297,7 +1375,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1297
1375
  const { [name]: _, ...remainingCommands } = currentLockedCommands;
1298
1376
  void _;
1299
1377
  const updatedLockfile = { ...currentLockfile, commands: remainingCommands };
1300
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1378
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1301
1379
  })),
1302
1380
  removeMcpServerSettings: (name) => withMutex(Effect.gen(function* () {
1303
1381
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -1317,7 +1395,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1317
1395
  const { [name]: _, ...remainingMcpServers } = currentLockedMcpServers;
1318
1396
  void _;
1319
1397
  const updatedLockfile = { ...currentLockfile, mcpServers: remainingMcpServers };
1320
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1398
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1321
1399
  })),
1322
1400
  removePackSettings: (name) => withMutex(Effect.gen(function* () {
1323
1401
  const currentSettings = yield* readSettingsSafe(workspaceDir);
@@ -1337,7 +1415,27 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1337
1415
  const { [name]: _, ...remainingPacks } = currentLockedPacks;
1338
1416
  void _;
1339
1417
  const updatedLockfile = { ...currentLockfile, packs: remainingPacks };
1340
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1418
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1419
+ })),
1420
+ removeLibrarySettings: (name) => withMutex(Effect.gen(function* () {
1421
+ const currentSettings = yield* readSettingsSafe(workspaceDir);
1422
+ const currentLibraries = currentSettings.libraries ?? {};
1423
+ if (!(name in currentLibraries))
1424
+ return;
1425
+ const { [name]: _, ...remainingLibraries } = currentLibraries;
1426
+ void _;
1427
+ const updatedSettings = { ...currentSettings, libraries: remainingLibraries };
1428
+ yield* writeSettings(workspaceDir, updatedSettings).pipe(Effect.provide(fsLayer));
1429
+ })),
1430
+ removeLibraryLock: (name) => withMutex(Effect.gen(function* () {
1431
+ const currentLockfile = yield* readLockfileSafe(workspaceDir);
1432
+ const currentLockedLibraries = currentLockfile.libraries ?? {};
1433
+ if (!(name in currentLockedLibraries))
1434
+ return;
1435
+ const { [name]: _, ...remainingLibraries } = currentLockedLibraries;
1436
+ void _;
1437
+ const updatedLockfile = { ...currentLockfile, libraries: remainingLibraries };
1438
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1341
1439
  })),
1342
1440
  // -----------------------------------------------------------------------
1343
1441
  // Pack dependency queries
@@ -1383,7 +1481,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1383
1481
  [target.name]: { ...entry, retainedByPack: true },
1384
1482
  },
1385
1483
  };
1386
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1484
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1387
1485
  break;
1388
1486
  }
1389
1487
  case "command": {
@@ -1398,7 +1496,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1398
1496
  [target.name]: { ...entry, retainedByPack: true },
1399
1497
  },
1400
1498
  };
1401
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1499
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1402
1500
  break;
1403
1501
  }
1404
1502
  case "mcp-server": {
@@ -1413,7 +1511,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1413
1511
  [target.name]: { ...entry, retainedByPack: true },
1414
1512
  },
1415
1513
  };
1416
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1514
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1417
1515
  break;
1418
1516
  }
1419
1517
  case "files": {
@@ -1428,7 +1526,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1428
1526
  [target.name]: { ...entry, retainedByPack: true },
1429
1527
  },
1430
1528
  };
1431
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1529
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1432
1530
  break;
1433
1531
  }
1434
1532
  case "rule": {
@@ -1443,7 +1541,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1443
1541
  [target.name]: { ...entry, retainedByPack: true },
1444
1542
  },
1445
1543
  };
1446
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1544
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1447
1545
  break;
1448
1546
  }
1449
1547
  case "hook": {
@@ -1458,7 +1556,7 @@ export const loadWorkspace = (options) => Effect.gen(function* () {
1458
1556
  [target.name]: { ...entry, retainedByPack: true },
1459
1557
  },
1460
1558
  };
1461
- yield* writeLockfile(workspaceDir, updatedLockfile).pipe(Effect.provide(fsLayer));
1559
+ yield* commitLockfileSnapshotUpdate(workspaceDir, currentLockfile, updatedLockfile).pipe(Effect.provide(fsLayer));
1462
1560
  break;
1463
1561
  }
1464
1562
  case "pack":